Class: Aws::S3::Types::PutBucketEncryptionRequest

Inherits:
Struct
  • Object
show all
Includes:
Aws::Structure
Defined in:
lib/aws-sdk-s3/types.rb

Overview

Note:

When making an API call, you may pass PutBucketEncryptionRequest data as a hash:

{
  bucket: "BucketName", # required
  content_md5: "ContentMD5",
  server_side_encryption_configuration: { # required
    rules: [ # required
      {
        apply_server_side_encryption_by_default: {
          sse_algorithm: "AES256", # required, accepts AES256, aws:kms
          kms_master_key_id: "SSEKMSKeyId",
        },
        bucket_key_enabled: false,
      },
    ],
  },
  expected_bucket_owner: "AccountId",
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#bucketString

Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3) or customer master keys stored in AWS KMS (SSE-KMS). For information about the Amazon S3 default encryption feature, see [Amazon S3 Default Bucket Encryption] in the *Amazon Simple Storage Service Developer Guide*.

[1]: docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html

Returns:

  • (String)


10284
10285
10286
10287
10288
10289
10290
10291
# File 'lib/aws-sdk-s3/types.rb', line 10284

class PutBucketEncryptionRequest < Struct.new(
  :bucket,
  :content_md5,
  :server_side_encryption_configuration,
  :expected_bucket_owner)
  SENSITIVE = []
  include Aws::Structure
end

#content_md5String

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

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

Returns:

  • (String)


10284
10285
10286
10287
10288
10289
10290
10291
# File 'lib/aws-sdk-s3/types.rb', line 10284

class PutBucketEncryptionRequest < Struct.new(
  :bucket,
  :content_md5,
  :server_side_encryption_configuration,
  :expected_bucket_owner)
  SENSITIVE = []
  include Aws::Structure
end

#expected_bucket_ownerString

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.

Returns:

  • (String)


10284
10285
10286
10287
10288
10289
10290
10291
# File 'lib/aws-sdk-s3/types.rb', line 10284

class PutBucketEncryptionRequest < Struct.new(
  :bucket,
  :content_md5,
  :server_side_encryption_configuration,
  :expected_bucket_owner)
  SENSITIVE = []
  include Aws::Structure
end

#server_side_encryption_configurationTypes::ServerSideEncryptionConfiguration

Specifies the default server-side-encryption configuration.



10284
10285
10286
10287
10288
10289
10290
10291
# File 'lib/aws-sdk-s3/types.rb', line 10284

class PutBucketEncryptionRequest < Struct.new(
  :bucket,
  :content_md5,
  :server_side_encryption_configuration,
  :expected_bucket_owner)
  SENSITIVE = []
  include Aws::Structure
end