put-bucket-encryption

Prev Next

Available in Classic and VPC

Register or override the default server-side encryption (SSE) settings for an Ncloud Storage bucket. If default encryption is enabled for the bucket, these settings are automatically applied during upload without the need to specify a separate encryption header.

Note

For a Sub Account user to execute this command, they must have the Change/PutEncryptionConfiguration action permission.

Syntax

The put-bucket-encryption syntax is as follows:

aws s3api put-bucket-encryption \
    --bucket <bucket> \
    --server-side-encryption-configuration <server-side-encryption-configuration> \
    --endpoint-url <endpoint-url>

Options

This section describes the options available when running put-bucket-encryption.

Required options

The following options are required for put-bucket-encryption.

Options Type Required Description
--bucket String Required Bucket name
--server-side-encryption-configuration String Required Encryption settings
  • Specify by including the ApplyServerSideEncryptionByDefault object in the Rules list.
  • Only exactly one Rules is allowed.

Common options

For information about the options common to all aws subcommands, see Ncloud Storage options.

Examples

If the encryption configuration request is successful, the settings are applied, and no result is displayed.

Command

The command example is as follows:

aws s3api put-bucket-encryption --bucket my-test-bucket \
    --server-side-encryption-configuration '{"Rules":[{"ApplyServerSideEncryptionByDefault":{"SSEAlgorithm":"AES256"}}]}' \
    --endpoint-url=https://kr.ncloudstorage.com

Related commands

Related commands are as follows: