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

Description

This action uses the encryption subresource to configure default encryption and Amazon S3 Bucket Key for an existing bucket.

Default encryption for a bucket can use server-side encryption with Amazon S3-managed keys (SSE-S3) or customer managed keys (SSE-KMS). If you specify default encryption using SSE-KMS, you can also configure Amazon S3 Bucket Key. For information about default encryption, see Amazon S3 default bucket encryption in the Amazon S3 User Guide. For more information about S3 Bucket Keys, see Amazon S3 Bucket Keys in the Amazon S3 User Guide.

This action requires Amazon Web Services Signature Version 4. For more information, see Authenticating Requests (Amazon Web Services Signature Version 4).

To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the Amazon S3 User Guide.

Related Resources

Synopsis

Creating a Request

data PutBucketEncryption Source #

See: newPutBucketEncryption smart constructor.

Constructors

PutBucketEncryption' 

Fields

Instances

Instances details
Eq PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

Show PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

Generic PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

Associated Types

type Rep PutBucketEncryption :: Type -> Type #

NFData PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

Methods

rnf :: PutBucketEncryption -> () #

Hashable PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

AWSRequest PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

Associated Types

type AWSResponse PutBucketEncryption #

ToHeaders PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

ToPath PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

ToQuery PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

ToElement PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

type Rep PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

type Rep PutBucketEncryption = D1 ('MetaData "PutBucketEncryption" "Amazonka.S3.PutBucketEncryption" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "PutBucketEncryption'" 'PrefixI 'True) ((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) :*: S1 ('MetaSel ('Just "serverSideEncryptionConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ServerSideEncryptionConfiguration))))
type AWSResponse PutBucketEncryption Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

newPutBucketEncryption Source #

Create a value of PutBucketEncryption 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:contentMD5:PutBucketEncryption', putBucketEncryption_contentMD5 - The base64-encoded 128-bit MD5 digest of the server-side encryption configuration.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

$sel:expectedBucketOwner:PutBucketEncryption', putBucketEncryption_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:PutBucketEncryption', putBucketEncryption_bucket - Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3) or customer managed keys (SSE-KMS). For information about the Amazon S3 default encryption feature, see Amazon S3 Default Bucket Encryption in the Amazon S3 User Guide.

$sel:serverSideEncryptionConfiguration:PutBucketEncryption', putBucketEncryption_serverSideEncryptionConfiguration - Undocumented member.

Request Lenses

putBucketEncryption_contentMD5 :: Lens' PutBucketEncryption (Maybe Text) Source #

The base64-encoded 128-bit MD5 digest of the server-side encryption configuration.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

putBucketEncryption_expectedBucketOwner :: Lens' PutBucketEncryption (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.

putBucketEncryption_bucket :: Lens' PutBucketEncryption BucketName Source #

Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3) or customer managed keys (SSE-KMS). For information about the Amazon S3 default encryption feature, see Amazon S3 Default Bucket Encryption in the Amazon S3 User Guide.

Destructuring the Response

data PutBucketEncryptionResponse Source #

See: newPutBucketEncryptionResponse smart constructor.

Instances

Instances details
Eq PutBucketEncryptionResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

Read PutBucketEncryptionResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

Show PutBucketEncryptionResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

Generic PutBucketEncryptionResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

Associated Types

type Rep PutBucketEncryptionResponse :: Type -> Type #

NFData PutBucketEncryptionResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

type Rep PutBucketEncryptionResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketEncryption

type Rep PutBucketEncryptionResponse = D1 ('MetaData "PutBucketEncryptionResponse" "Amazonka.S3.PutBucketEncryption" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "PutBucketEncryptionResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newPutBucketEncryptionResponse :: PutBucketEncryptionResponse Source #

Create a value of PutBucketEncryptionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.