amazonka-s3-2.0: Amazon Simple Storage Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

  • checksumAlgorithm :: Maybe 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.

  • contentMD5 :: Maybe Text

    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.

  • expectedBucketOwner :: Maybe Text

    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).

  • objectLockConfiguration :: Maybe ObjectLockConfiguration

    The Object Lock configuration that you want to apply to the specified bucket.

  • requestPayer :: Maybe RequestPayer
     
  • token :: Maybe Text

    A token to allow Object Lock to be enabled for an existing bucket.

  • bucket :: BucketName

    The bucket whose Object Lock configuration you want to create or replace.

Instances

Instances details
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

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

Read PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Show PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

NFData PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Eq PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Hashable PutObjectLockConfiguration Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

type AWSResponse 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" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "PutObjectLockConfiguration'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "checksumAlgorithm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ChecksumAlgorithm)) :*: (S1 ('MetaSel ('Just "contentMD5") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "expectedBucketOwner") '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 "token") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BucketName)))))

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

Constructors

PutObjectLockConfigurationResponse' 

Fields

Instances

Instances details
Generic PutObjectLockConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Associated Types

type Rep PutObjectLockConfigurationResponse :: Type -> Type #

Read PutObjectLockConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Show PutObjectLockConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

NFData PutObjectLockConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.PutObjectLockConfiguration

Eq 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" "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