libZSservicesZSamazonka-s3ZSamazonka-s3
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.S3.PutObjectLegalHold

Description

Applies a Legal Hold configuration to the specified object. For more information, see Locking Objects.

This action is not supported by Amazon S3 on Outposts.

Synopsis

Creating a Request

data PutObjectLegalHold Source #

See: newPutObjectLegalHold smart constructor.

Constructors

PutObjectLegalHold' 

Fields

  • legalHold :: Maybe ObjectLockLegalHold

    Container element for the Legal Hold configuration you want to apply to the specified object.

  • versionId :: Maybe ObjectVersionId

    The version ID of the object that you want to place a Legal Hold on.

  • requestPayer :: Maybe RequestPayer
     
  • contentMD5 :: Maybe Text

    The MD5 hash for the request body.

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

  • expectedBucketOwner :: Maybe Text

    The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

  • bucket :: BucketName

    The bucket name containing the object that you want to place a Legal Hold on.

    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 that you want to place a Legal Hold on.

Instances

Instances details
Eq PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Read PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Show PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Generic PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Associated Types

type Rep PutObjectLegalHold :: Type -> Type #

NFData PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Methods

rnf :: PutObjectLegalHold -> () #

Hashable PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

AWSRequest PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Associated Types

type AWSResponse PutObjectLegalHold #

ToHeaders PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

ToPath PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

ToQuery PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

ToElement PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

type Rep PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

type AWSResponse PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

newPutObjectLegalHold Source #

Create a value of PutObjectLegalHold 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:PutObjectLegalHold', putObjectLegalHold_legalHold - Container element for the Legal Hold configuration you want to apply to the specified object.

$sel:versionId:PutObjectLegalHold', putObjectLegalHold_versionId - The version ID of the object that you want to place a Legal Hold on.

$sel:requestPayer:PutObjectLegalHold', putObjectLegalHold_requestPayer - Undocumented member.

$sel:contentMD5:PutObjectLegalHold', putObjectLegalHold_contentMD5 - The MD5 hash for the request body.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

$sel:expectedBucketOwner:PutObjectLegalHold', putObjectLegalHold_expectedBucketOwner - The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

$sel:bucket:PutObjectLegalHold', putObjectLegalHold_bucket - The bucket name containing the object that you want to place a Legal Hold on.

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.

$sel:key:PutObjectLegalHold', putObjectLegalHold_key - The key name for the object that you want to place a Legal Hold on.

Request Lenses

putObjectLegalHold_legalHold :: Lens' PutObjectLegalHold (Maybe ObjectLockLegalHold) Source #

Container element for the Legal Hold configuration you want to apply to the specified object.

putObjectLegalHold_versionId :: Lens' PutObjectLegalHold (Maybe ObjectVersionId) Source #

The version ID of the object that you want to place a Legal Hold on.

putObjectLegalHold_contentMD5 :: Lens' PutObjectLegalHold (Maybe Text) Source #

The MD5 hash for the request body.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

putObjectLegalHold_expectedBucketOwner :: Lens' PutObjectLegalHold (Maybe Text) Source #

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

putObjectLegalHold_bucket :: Lens' PutObjectLegalHold BucketName Source #

The bucket name containing the object that you want to place a Legal Hold on.

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.

putObjectLegalHold_key :: Lens' PutObjectLegalHold ObjectKey Source #

The key name for the object that you want to place a Legal Hold on.

Destructuring the Response

data PutObjectLegalHoldResponse Source #

See: newPutObjectLegalHoldResponse smart constructor.

Constructors

PutObjectLegalHoldResponse' 

Fields

Instances

Instances details
Eq PutObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Read PutObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Show PutObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Generic PutObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Associated Types

type Rep PutObjectLegalHoldResponse :: Type -> Type #

NFData PutObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

type Rep PutObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

type Rep PutObjectLegalHoldResponse = D1 ('MetaData "PutObjectLegalHoldResponse" "Amazonka.S3.PutObjectLegalHold" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "PutObjectLegalHoldResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "requestCharged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RequestCharged)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newPutObjectLegalHoldResponse Source #

Create a value of PutObjectLegalHoldResponse 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:requestCharged:PutObjectLegalHoldResponse', putObjectLegalHoldResponse_requestCharged - Undocumented member.

$sel:httpStatus:PutObjectLegalHoldResponse', putObjectLegalHoldResponse_httpStatus - The response's http status code.

Response Lenses