Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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_legalHold :: Lens' PutObjectLegalHold (Maybe ObjectLockLegalHold)
- putObjectLegalHold_versionId :: Lens' PutObjectLegalHold (Maybe ObjectVersionId)
- putObjectLegalHold_requestPayer :: Lens' PutObjectLegalHold (Maybe RequestPayer)
- putObjectLegalHold_contentMD5 :: Lens' PutObjectLegalHold (Maybe Text)
- putObjectLegalHold_expectedBucketOwner :: Lens' PutObjectLegalHold (Maybe Text)
- 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:
$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_requestPayer :: Lens' PutObjectLegalHold (Maybe RequestPayer) Source #
Undocumented member.
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.
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.