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 |
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_token :: Lens' PutObjectLockConfiguration (Maybe Text)
- putObjectLockConfiguration_objectLockConfiguration :: Lens' PutObjectLockConfiguration (Maybe ObjectLockConfiguration)
- putObjectLockConfiguration_requestPayer :: Lens' PutObjectLockConfiguration (Maybe RequestPayer)
- putObjectLockConfiguration_contentMD5 :: Lens' PutObjectLockConfiguration (Maybe Text)
- putObjectLockConfiguration_expectedBucketOwner :: 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:
$sel:token:PutObjectLockConfiguration'
, putObjectLockConfiguration_token
- A token to allow Object Lock to be enabled for an existing bucket.
$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: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 will fail with an HTTP
403 (Access Denied)
error.
$sel:bucket:PutObjectLockConfiguration'
, putObjectLockConfiguration_bucket
- The bucket whose Object Lock configuration you want to create or
replace.
Request Lenses
putObjectLockConfiguration_token :: Lens' PutObjectLockConfiguration (Maybe Text) Source #
A token to allow Object Lock to be enabled for an existing bucket.
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_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 will fail with an HTTP
403 (Access Denied)
error.
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
Eq PutObjectLockConfigurationResponse Source # | |
Read PutObjectLockConfigurationResponse Source # | |
Show PutObjectLockConfigurationResponse Source # | |
Generic PutObjectLockConfigurationResponse Source # | |
NFData PutObjectLockConfigurationResponse Source # | |
Defined in Amazonka.S3.PutObjectLockConfiguration rnf :: PutObjectLockConfigurationResponse -> () # | |
type Rep PutObjectLockConfigurationResponse Source # | |
Defined in Amazonka.S3.PutObjectLockConfiguration type Rep PutObjectLockConfigurationResponse = D1 ('MetaData "PutObjectLockConfigurationResponse" "Amazonka.S3.PutObjectLockConfiguration" "libZSservicesZSamazonka-s3ZSamazonka-s3" '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.