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 |
Places an Object Retention configuration on an object. For more
information, see
Locking Objects.
Users or accounts require the s3:PutObjectRetention
permission in
order to place an Object Retention configuration on objects. Bypassing a
Governance Retention configuration requires the
s3:BypassGovernanceRetention
permission.
This action is not supported by Amazon S3 on Outposts.
Synopsis
- data PutObjectRetention = PutObjectRetention' {}
- newPutObjectRetention :: BucketName -> ObjectKey -> PutObjectRetention
- putObjectRetention_bypassGovernanceRetention :: Lens' PutObjectRetention (Maybe Bool)
- putObjectRetention_checksumAlgorithm :: Lens' PutObjectRetention (Maybe ChecksumAlgorithm)
- putObjectRetention_contentMD5 :: Lens' PutObjectRetention (Maybe Text)
- putObjectRetention_expectedBucketOwner :: Lens' PutObjectRetention (Maybe Text)
- putObjectRetention_requestPayer :: Lens' PutObjectRetention (Maybe RequestPayer)
- putObjectRetention_retention :: Lens' PutObjectRetention (Maybe ObjectLockRetention)
- putObjectRetention_versionId :: Lens' PutObjectRetention (Maybe ObjectVersionId)
- putObjectRetention_bucket :: Lens' PutObjectRetention BucketName
- putObjectRetention_key :: Lens' PutObjectRetention ObjectKey
- data PutObjectRetentionResponse = PutObjectRetentionResponse' {}
- newPutObjectRetentionResponse :: Int -> PutObjectRetentionResponse
- putObjectRetentionResponse_requestCharged :: Lens' PutObjectRetentionResponse (Maybe RequestCharged)
- putObjectRetentionResponse_httpStatus :: Lens' PutObjectRetentionResponse Int
Creating a Request
data PutObjectRetention Source #
See: newPutObjectRetention
smart constructor.
PutObjectRetention' | |
|
Instances
newPutObjectRetention Source #
Create a value of PutObjectRetention
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:bypassGovernanceRetention:PutObjectRetention'
, putObjectRetention_bypassGovernanceRetention
- Indicates whether this action should bypass Governance-mode
restrictions.
PutObjectRetention
, putObjectRetention_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:PutObjectRetention'
, putObjectRetention_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:PutObjectRetention'
, putObjectRetention_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:PutObjectRetention'
, putObjectRetention_requestPayer
- Undocumented member.
$sel:retention:PutObjectRetention'
, putObjectRetention_retention
- The container element for the Object Retention configuration.
PutObjectRetention
, putObjectRetention_versionId
- The version ID for the object that you want to apply this Object
Retention configuration to.
PutObjectRetention
, putObjectRetention_bucket
- The bucket name that contains the object you want to apply this Object
Retention configuration to.
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.
PutObjectRetention
, putObjectRetention_key
- The key name for the object that you want to apply this Object Retention
configuration to.
Request Lenses
putObjectRetention_bypassGovernanceRetention :: Lens' PutObjectRetention (Maybe Bool) Source #
Indicates whether this action should bypass Governance-mode restrictions.
putObjectRetention_checksumAlgorithm :: Lens' PutObjectRetention (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.
putObjectRetention_contentMD5 :: Lens' PutObjectRetention (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.
putObjectRetention_expectedBucketOwner :: Lens' PutObjectRetention (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).
putObjectRetention_requestPayer :: Lens' PutObjectRetention (Maybe RequestPayer) Source #
Undocumented member.
putObjectRetention_retention :: Lens' PutObjectRetention (Maybe ObjectLockRetention) Source #
The container element for the Object Retention configuration.
putObjectRetention_versionId :: Lens' PutObjectRetention (Maybe ObjectVersionId) Source #
The version ID for the object that you want to apply this Object Retention configuration to.
putObjectRetention_bucket :: Lens' PutObjectRetention BucketName Source #
The bucket name that contains the object you want to apply this Object Retention configuration to.
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.
putObjectRetention_key :: Lens' PutObjectRetention ObjectKey Source #
The key name for the object that you want to apply this Object Retention configuration to.
Destructuring the Response
data PutObjectRetentionResponse Source #
See: newPutObjectRetentionResponse
smart constructor.
PutObjectRetentionResponse' | |
|
Instances
newPutObjectRetentionResponse Source #
Create a value of PutObjectRetentionResponse
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:PutObjectRetentionResponse'
, putObjectRetentionResponse_requestCharged
- Undocumented member.
$sel:httpStatus:PutObjectRetentionResponse'
, putObjectRetentionResponse_httpStatus
- The response's http status code.
Response Lenses
putObjectRetentionResponse_requestCharged :: Lens' PutObjectRetentionResponse (Maybe RequestCharged) Source #
Undocumented member.
putObjectRetentionResponse_httpStatus :: Lens' PutObjectRetentionResponse Int Source #
The response's http status code.