get-bucket-cors

Prev Next

Available in Classic and VPC

Get the CORS (Cross-Origin Resource Sharing) settings configured for an Ncloud Storage bucket.

Note

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

Syntax

The get-bucket-cors syntax is as follows:

aws s3api get-bucket-cors \
    --bucket <bucket> \
    --endpoint-url <endpoint-url>

Options

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

Required options

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

Options Type Required Description
--bucket String Required Bucket name

Common options

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

Examples

If the request to retrieve CORS rules is successful, information about the allow conditions for each rule configured in the bucket is returned.

Command

The command example is as follows:

aws s3api get-bucket-cors --bucket my-test-bucket \
    --endpoint-url=https://kr.ncloudstorage.com

Output

The output example is as follows:

{
    "CORSRules": [
        {
            "ID": "MhDL7iMcS3Kx3HaLepL4jQ",
            "AllowedHeaders": [
                "*"
            ],
            "AllowedMethods": [
                "GET",
                "PUT"
            ],
            "AllowedOrigins": [
                "*"
            ],
            "MaxAgeSeconds": 3000
        }
    ]
}

Related commands

Related commands are as follows: