amazonka-s3-2.0: Amazon Simple Storage Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.S3.GetObjectLegalHold

Description

Gets an object's current legal hold status. For more information, see Locking Objects.

This action is not supported by Amazon S3 on Outposts.

The following action is related to GetObjectLegalHold:

Synopsis

Creating a Request

data GetObjectLegalHold Source #

See: newGetObjectLegalHold smart constructor.

Constructors

GetObjectLegalHold' 

Fields

  • expectedBucketOwner :: Maybe Text

    The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

  • requestPayer :: Maybe RequestPayer
     
  • versionId :: Maybe ObjectVersionId

    The version ID of the object whose legal hold status you want to retrieve.

  • bucket :: BucketName

    The bucket name containing the object whose legal hold status you want to retrieve.

    When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

  • key :: ObjectKey

    The key name for the object whose legal hold status you want to retrieve.

Instances

Instances details
ToHeaders GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

ToPath GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

ToQuery GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

AWSRequest GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

Associated Types

type AWSResponse GetObjectLegalHold #

Generic GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

Associated Types

type Rep GetObjectLegalHold :: Type -> Type #

Read GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

Show GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

NFData GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

Methods

rnf :: GetObjectLegalHold -> () #

Eq GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

Hashable GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

type AWSResponse GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

type Rep GetObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

type Rep GetObjectLegalHold = D1 ('MetaData "GetObjectLegalHold" "Amazonka.S3.GetObjectLegalHold" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "GetObjectLegalHold'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "expectedBucketOwner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "requestPayer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RequestPayer))) :*: (S1 ('MetaSel ('Just "versionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ObjectVersionId)) :*: (S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BucketName) :*: S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ObjectKey)))))

newGetObjectLegalHold Source #

Create a value of GetObjectLegalHold with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:expectedBucketOwner:GetObjectLegalHold', getObjectLegalHold_expectedBucketOwner - The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

$sel:requestPayer:GetObjectLegalHold', getObjectLegalHold_requestPayer - Undocumented member.

GetObjectLegalHold, getObjectLegalHold_versionId - The version ID of the object whose legal hold status you want to retrieve.

GetObjectLegalHold, getObjectLegalHold_bucket - The bucket name containing the object whose legal hold status you want to retrieve.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

GetObjectLegalHold, getObjectLegalHold_key - The key name for the object whose legal hold status you want to retrieve.

Request Lenses

getObjectLegalHold_expectedBucketOwner :: Lens' GetObjectLegalHold (Maybe Text) Source #

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

getObjectLegalHold_versionId :: Lens' GetObjectLegalHold (Maybe ObjectVersionId) Source #

The version ID of the object whose legal hold status you want to retrieve.

getObjectLegalHold_bucket :: Lens' GetObjectLegalHold BucketName Source #

The bucket name containing the object whose legal hold status you want to retrieve.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

getObjectLegalHold_key :: Lens' GetObjectLegalHold ObjectKey Source #

The key name for the object whose legal hold status you want to retrieve.

Destructuring the Response

data GetObjectLegalHoldResponse Source #

See: newGetObjectLegalHoldResponse smart constructor.

Constructors

GetObjectLegalHoldResponse' 

Fields

Instances

Instances details
Generic GetObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

Associated Types

type Rep GetObjectLegalHoldResponse :: Type -> Type #

Read GetObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

Show GetObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

NFData GetObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

Eq GetObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

type Rep GetObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectLegalHold

type Rep GetObjectLegalHoldResponse = D1 ('MetaData "GetObjectLegalHoldResponse" "Amazonka.S3.GetObjectLegalHold" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "GetObjectLegalHoldResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "legalHold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ObjectLockLegalHold)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newGetObjectLegalHoldResponse Source #

Create a value of GetObjectLegalHoldResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:legalHold:GetObjectLegalHoldResponse', getObjectLegalHoldResponse_legalHold - The current legal hold status for the specified object.

$sel:httpStatus:GetObjectLegalHoldResponse', getObjectLegalHoldResponse_httpStatus - The response's http status code.

Response Lenses

getObjectLegalHoldResponse_legalHold :: Lens' GetObjectLegalHoldResponse (Maybe ObjectLockLegalHold) Source #

The current legal hold status for the specified object.