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.GetObjectRetention

Description

Retrieves an object's retention settings. For more information, see Locking Objects.

This action is not supported by Amazon S3 on Outposts.

The following action is related to GetObjectRetention:

Synopsis

Creating a Request

data GetObjectRetention Source #

See: newGetObjectRetention smart constructor.

Constructors

GetObjectRetention' 

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 for the object whose retention settings you want to retrieve.

  • bucket :: BucketName

    The bucket name containing the object whose retention settings 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 retention settings you want to retrieve.

Instances

Instances details
ToHeaders GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

ToPath GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

ToQuery GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

AWSRequest GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

Associated Types

type AWSResponse GetObjectRetention #

Generic GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

Associated Types

type Rep GetObjectRetention :: Type -> Type #

Read GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

Show GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

NFData GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

Methods

rnf :: GetObjectRetention -> () #

Eq GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

Hashable GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

type AWSResponse GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

type Rep GetObjectRetention Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

type Rep GetObjectRetention = D1 ('MetaData "GetObjectRetention" "Amazonka.S3.GetObjectRetention" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "GetObjectRetention'" '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)))))

newGetObjectRetention Source #

Create a value of GetObjectRetention 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:GetObjectRetention', getObjectRetention_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:GetObjectRetention', getObjectRetention_requestPayer - Undocumented member.

GetObjectRetention, getObjectRetention_versionId - The version ID for the object whose retention settings you want to retrieve.

GetObjectRetention, getObjectRetention_bucket - The bucket name containing the object whose retention settings 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.

GetObjectRetention, getObjectRetention_key - The key name for the object whose retention settings you want to retrieve.

Request Lenses

getObjectRetention_expectedBucketOwner :: Lens' GetObjectRetention (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).

getObjectRetention_versionId :: Lens' GetObjectRetention (Maybe ObjectVersionId) Source #

The version ID for the object whose retention settings you want to retrieve.

getObjectRetention_bucket :: Lens' GetObjectRetention BucketName Source #

The bucket name containing the object whose retention settings 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.

getObjectRetention_key :: Lens' GetObjectRetention ObjectKey Source #

The key name for the object whose retention settings you want to retrieve.

Destructuring the Response

data GetObjectRetentionResponse Source #

See: newGetObjectRetentionResponse smart constructor.

Constructors

GetObjectRetentionResponse' 

Fields

Instances

Instances details
Generic GetObjectRetentionResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

Associated Types

type Rep GetObjectRetentionResponse :: Type -> Type #

Read GetObjectRetentionResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

Show GetObjectRetentionResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

NFData GetObjectRetentionResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

Eq GetObjectRetentionResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

type Rep GetObjectRetentionResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectRetention

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

newGetObjectRetentionResponse Source #

Create a value of GetObjectRetentionResponse 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:retention:GetObjectRetentionResponse', getObjectRetentionResponse_retention - The container element for an object's retention settings.

$sel:httpStatus:GetObjectRetentionResponse', getObjectRetentionResponse_httpStatus - The response's http status code.

Response Lenses

getObjectRetentionResponse_retention :: Lens' GetObjectRetentionResponse (Maybe ObjectLockRetention) Source #

The container element for an object's retention settings.