Available in Classic and VPC
Register CORS (Cross-Origin Resource Sharing) settings for an Ncloud Storage bucket or overwrite existing settings.
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
|
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: