put-bucket-cors

Prev Next

The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.

Available in Classic and VPC

Register CORS (Cross-Origin Resource Sharing) settings for an Ncloud Storage bucket or overwrite existing settings.

Note

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

Syntax

The put-bucket-cors syntax is as follows:

aws s3api put-bucket-cors \
    --bucket <bucket> \
    --cors-configuration <cors-configuration> \
    --endpoint-url <endpoint-url>

Options

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

Required options

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

Options Type Required Description
--bucket String Required Bucket name
--cors-configuration String Required CORS settings
  • Specify rules by including them in the CORSRules list.
  • Up to 100 rules can be specified.

Common options

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

Examples

If the request to set a CORS rule is successful, the rule is applied, and no result is displayed.

Command

The command example is as follows:

aws s3api put-bucket-cors --bucket my-test-bucket \
    --cors-configuration file://cors.json \
    --endpoint-url=https://kr.ncloudstorage.com

Related commands

Related commands are as follows: