Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data PutObjectLegalHold = PutObjectLegalHold' {}
- newPutObjectLegalHold :: BucketName -> ObjectKey -> PutObjectLegalHold
- putObjectLegalHold_checksumAlgorithm :: Lens' PutObjectLegalHold (Maybe ChecksumAlgorithm)
- putObjectLegalHold_contentMD5 :: Lens' PutObjectLegalHold (Maybe Text)
- putObjectLegalHold_expectedBucketOwner :: Lens' PutObjectLegalHold (Maybe Text)
- putObjectLegalHold_legalHold :: Lens' PutObjectLegalHold (Maybe ObjectLockLegalHold)
- putObjectLegalHold_requestPayer :: Lens' PutObjectLegalHold (Maybe RequestPayer)
- putObjectLegalHold_versionId :: Lens' PutObjectLegalHold (Maybe ObjectVersionId)
- putObjectLegalHold_bucket :: Lens' PutObjectLegalHold BucketName
- putObjectLegalHold_key :: Lens' PutObjectLegalHold ObjectKey
- data PutObjectLegalHoldResponse = PutObjectLegalHoldResponse' {}
- newPutObjectLegalHoldResponse :: Int -> PutObjectLegalHoldResponse
- putObjectLegalHoldResponse_requestCharged :: Lens' PutObjectLegalHoldResponse (Maybe RequestCharged)
- putObjectLegalHoldResponse_httpStatus :: Lens' PutObjectLegalHoldResponse Int
Creating a Request
data PutObjectLegalHold Source #
See: newPutObjectLegalHold
smart constructor.
PutObjectLegalHold' | |
|
Instances
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_requestPayer :: Lens' PutObjectLegalHold (Maybe RequestPayer) Source #
Undocumented member.
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.
PutObjectLegalHoldResponse' | |
|
Instances
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
putObjectLegalHoldResponse_requestCharged :: Lens' PutObjectLegalHoldResponse (Maybe RequestCharged) Source #
Undocumented member.
putObjectLegalHoldResponse_httpStatus :: Lens' PutObjectLegalHoldResponse Int Source #
The response's http status code.