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

  • checksumAlgorithm :: Maybe ChecksumAlgorithm

    Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more information, see Checking object integrity in the Amazon S3 User Guide.

    If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.

  • 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 fails with the HTTP status code 403 Forbidden (access denied).

  • legalHold :: Maybe ObjectLockLegalHold

    Container element for the legal hold configuration you want to apply to the specified object.

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

    The version ID of the object that you want to place a legal hold on.

  • 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
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

AWSRequest PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Associated Types

type AWSResponse PutObjectLegalHold #

Generic PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Associated Types

type Rep PutObjectLegalHold :: Type -> Type #

Read PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Show PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

NFData PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Methods

rnf :: PutObjectLegalHold -> () #

Eq PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Hashable PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

type AWSResponse PutObjectLegalHold Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

type Rep 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:

PutObjectLegalHold, putObjectLegalHold_checksumAlgorithm - Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more information, see Checking object integrity in the Amazon S3 User Guide.

If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.

$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 fails with the HTTP status code 403 Forbidden (access denied).

$sel:legalHold:PutObjectLegalHold', putObjectLegalHold_legalHold - Container element for the legal hold configuration you want to apply to the specified object.

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

PutObjectLegalHold, putObjectLegalHold_versionId - The version ID of the object that you want to place a legal hold on.

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.

PutObjectLegalHold, putObjectLegalHold_key - The key name for the object that you want to place a legal hold on.

Request Lenses

putObjectLegalHold_checksumAlgorithm :: Lens' PutObjectLegalHold (Maybe ChecksumAlgorithm) Source #

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more information, see Checking object integrity in the Amazon S3 User Guide.

If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.

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 fails with the HTTP status code 403 Forbidden (access denied).

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_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
Generic PutObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Associated Types

type Rep PutObjectLegalHoldResponse :: Type -> Type #

Read PutObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Show PutObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

NFData PutObjectLegalHoldResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLegalHold

Eq 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" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" '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