--- title: "put-bucket-cors" slug: "cli-objectstorage-api-level-put-bucket-cors" updated: 2026-10-08T09:50:49Z published: 2026-10-08T09:50:49Z canonical: "cli.ncloud-docs.com/cli-objectstorage-api-level-put-bucket-cors" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # put-bucket-cors Classic/VPC環境で利用できます。 バケットに CORSルールを設定します。 ## 構文 `put-bucket-cors`構文は次の通りです。 ``` aws s3api put-bucket-cors \ --bucket \ --cors-configuration \ --endpoint-url ``` ## オプション `put-bucket-cors`の実行時に指定できるオプションについて説明します。 ### 必須オプション `put-bucket-cors`の必須オプションです。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--bucket` | String | Required | バケット名 | | `--cors-configuration` | String | Required | CORS設定 - `CORSRules`リストにルールを含めて指定 - 最大100個のルールを設定可能 | ### 共通オプション `aws`コマンドで共通して使用するオプションについては、[Object Storageのオプション](/docs/ja/guide-objectstorage#%EC%98%B5%EC%85%98)をご参照ください。 ## 例 CORSルールの設定リクエストが成功すると、ルールが適用され、結果は出力されません。 ### コマンド コマンドの例は次の通りです。 ``` aws s3api put-bucket-cors --bucket my-test-bucket \ --cors-configuration file://cors.json \ --endpoint-url=https://kr.object.ncloudstorage.com ```