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 Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see Locking Objects.
- The
DefaultRetention
settings require both a mode and a period. - The
DefaultRetention
period can be eitherDays
orYears
but you must select one. You cannot specifyDays
andYears
at the same time. - You can only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact Amazon Web Services Support.
Synopsis
- data PutObjectLockConfiguration = PutObjectLockConfiguration' {}
- newPutObjectLockConfiguration :: BucketName -> PutObjectLockConfiguration
- putObjectLockConfiguration_checksumAlgorithm :: Lens' PutObjectLockConfiguration (Maybe ChecksumAlgorithm)
- putObjectLockConfiguration_contentMD5 :: Lens' PutObjectLockConfiguration (Maybe Text)
- putObjectLockConfiguration_expectedBucketOwner :: Lens' PutObjectLockConfiguration (Maybe Text)
- putObjectLockConfiguration_objectLockConfiguration :: Lens' PutObjectLockConfiguration (Maybe ObjectLockConfiguration)
- putObjectLockConfiguration_requestPayer :: Lens' PutObjectLockConfiguration (Maybe RequestPayer)
- putObjectLockConfiguration_token :: Lens' PutObjectLockConfiguration (Maybe Text)
- putObjectLockConfiguration_bucket :: Lens' PutObjectLockConfiguration BucketName
- data PutObjectLockConfigurationResponse = PutObjectLockConfigurationResponse' {}
- newPutObjectLockConfigurationResponse :: Int -> PutObjectLockConfigurationResponse
- putObjectLockConfigurationResponse_requestCharged :: Lens' PutObjectLockConfigurationResponse (Maybe RequestCharged)
- putObjectLockConfigurationResponse_httpStatus :: Lens' PutObjectLockConfigurationResponse Int
Creating a Request
data PutObjectLockConfiguration Source #
See: newPutObjectLockConfiguration
smart constructor.
PutObjectLockConfiguration' | |
|
Instances
newPutObjectLockConfiguration Source #
Create a value of PutObjectLockConfiguration
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:
PutObjectLockConfiguration
, putObjectLockConfiguration_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:PutObjectLockConfiguration'
, putObjectLockConfiguration_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:PutObjectLockConfiguration'
, putObjectLockConfiguration_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:objectLockConfiguration:PutObjectLockConfiguration'
, putObjectLockConfiguration_objectLockConfiguration
- The Object Lock configuration that you want to apply to the specified
bucket.
$sel:requestPayer:PutObjectLockConfiguration'
, putObjectLockConfiguration_requestPayer
- Undocumented member.
$sel:token:PutObjectLockConfiguration'
, putObjectLockConfiguration_token
- A token to allow Object Lock to be enabled for an existing bucket.
PutObjectLockConfiguration
, putObjectLockConfiguration_bucket
- The bucket whose Object Lock configuration you want to create or
replace.
Request Lenses
putObjectLockConfiguration_checksumAlgorithm :: Lens' PutObjectLockConfiguration (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.
putObjectLockConfiguration_contentMD5 :: Lens' PutObjectLockConfiguration (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.
putObjectLockConfiguration_expectedBucketOwner :: Lens' PutObjectLockConfiguration (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).
putObjectLockConfiguration_objectLockConfiguration :: Lens' PutObjectLockConfiguration (Maybe ObjectLockConfiguration) Source #
The Object Lock configuration that you want to apply to the specified bucket.
putObjectLockConfiguration_requestPayer :: Lens' PutObjectLockConfiguration (Maybe RequestPayer) Source #
Undocumented member.
putObjectLockConfiguration_token :: Lens' PutObjectLockConfiguration (Maybe Text) Source #
A token to allow Object Lock to be enabled for an existing bucket.
putObjectLockConfiguration_bucket :: Lens' PutObjectLockConfiguration BucketName Source #
The bucket whose Object Lock configuration you want to create or replace.
Destructuring the Response
data PutObjectLockConfigurationResponse Source #
See: newPutObjectLockConfigurationResponse
smart constructor.
PutObjectLockConfigurationResponse' | |
|
Instances
Generic PutObjectLockConfigurationResponse Source # | |
Read PutObjectLockConfigurationResponse Source # | |
Show PutObjectLockConfigurationResponse Source # | |
NFData PutObjectLockConfigurationResponse Source # | |
Defined in Amazonka.S3.PutObjectLockConfiguration rnf :: PutObjectLockConfigurationResponse -> () # | |
Eq PutObjectLockConfigurationResponse Source # | |
type Rep PutObjectLockConfigurationResponse Source # | |
Defined in Amazonka.S3.PutObjectLockConfiguration type Rep PutObjectLockConfigurationResponse = D1 ('MetaData "PutObjectLockConfigurationResponse" "Amazonka.S3.PutObjectLockConfiguration" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "PutObjectLockConfigurationResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "requestCharged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RequestCharged)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newPutObjectLockConfigurationResponse Source #
Create a value of PutObjectLockConfigurationResponse
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:PutObjectLockConfigurationResponse'
, putObjectLockConfigurationResponse_requestCharged
- Undocumented member.
$sel:httpStatus:PutObjectLockConfigurationResponse'
, putObjectLockConfigurationResponse_httpStatus
- The response's http status code.
Response Lenses
putObjectLockConfigurationResponse_requestCharged :: Lens' PutObjectLockConfigurationResponse (Maybe RequestCharged) Source #
Undocumented member.
putObjectLockConfigurationResponse_httpStatus :: Lens' PutObjectLockConfigurationResponse Int Source #
The response's http status code.