libZSservicesZSamazonka-s3ZSamazonka-s3
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.S3.PutObjectLockConfiguration

Description

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 either Days or Years but you must select one. You cannot specify Days and Years 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

Creating a Request

data PutObjectLockConfiguration Source #

See: newPutObjectLockConfiguration smart constructor.

Constructors

PutObjectLockConfiguration' 

Fields

Instances

Instances details
Eq PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Read PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Show PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Generic PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Associated Types

type Rep PutObjectLockConfiguration :: Type -> Type #

NFData PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Hashable PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

AWSRequest PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

ToHeaders PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

ToPath PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

ToQuery PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

ToElement PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

type Rep PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

type Rep PutObjectLockConfiguration = D1 ('MetaData "PutObjectLockConfiguration" "Amazonka.S3.PutObjectLockConfiguration" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "PutObjectLockConfiguration'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "token") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "objectLockConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ObjectLockConfiguration)) :*: S1 ('MetaSel ('Just "requestPayer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RequestPayer)))) :*: (S1 ('MetaSel ('Just "contentMD5") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "expectedBucketOwner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BucketName)))))
type AWSResponse PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

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_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 #

Constructors

PutObjectLockConfigurationResponse' 

Fields

Instances

Instances details
Eq PutObjectLockConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Read PutObjectLockConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Show PutObjectLockConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Generic PutObjectLockConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Associated Types

type Rep PutObjectLockConfigurationResponse :: Type -> Type #

NFData PutObjectLockConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

type Rep PutObjectLockConfigurationResponse Source # 
Instance details

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