--- title: "put-object-acl" slug: "cli-objectstorage-api-level-put-object-acl" updated: 2026-10-08T09:50:34Z published: 2026-10-08T09:50:34Z canonical: "cli.ncloud-docs.com/cli-objectstorage-api-level-put-object-acl" --- > ## 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-object-acl Classic/VPC環境で利用できます。 オブジェクトに適用するアクセス制御リスト(ACL)を設定します。 ## 構文 `put-object-acl`構文は次の通りです。 ``` aws s3api put-object-acl \ --bucket \ --key \ [--acl ] \ [--grant-read ] \ [--grant-write ] \ [--grant-full-control ] \ [--version-id ] \ [--access-control-policy ] \ --endpoint-url ``` ## オプション `put-object-acl`の実行時に指定できるオプションについて説明します。 ### 必須オプション `put-object-acl`の必須オプションです。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--bucket` | String | Required | バケット名 | | `--key` | String | Required | オブジェクト名 | ### 任意オプション `put-object-acl`の任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--acl` | String | Optional | 適用する事前定義 ACL - `private` \| `public-read` \| `public-read-write` \| `authenticated-read` | | `--grant-read` | String | Optional | 読み取り権限を付与する対象 | | `--grant-write` | String | Optional | 書き込み権限を付与する対象 | | `--grant-full-control` | String | Optional | すべての権限を付与する対象 | | `--version-id` | String | Optional | オブジェクトバージョン ID | | `--access-control-policy` | String | Optional | 権限付与リストと所有者を直接指定する ACLポリシー - JSON形式で入力 | ### 共通オプション `aws`コマンドで共通して使用するオプションについては、[Object Storageのオプション](/docs/ja/guide-objectstorage#%EC%98%B5%EC%85%98)をご参照ください。 ## 例 ACL設定リクエストが成功すると、設定が適用され、結果は出力されません。 ### コマンド オブジェクトを公開に設定するコマンドの例は次の通りです。 ``` aws s3api put-object-acl --bucket my-test-bucket \ --key img/image.png \ --acl public-read \ --endpoint-url=https://kr.object.ncloudstorage.com ``` オブジェクトを非公開に設定するコマンドの例は次の通りです。 ``` aws s3api put-object-acl --bucket my-test-bucket \ --key img/image.png \ --acl private \ --endpoint-url=https://kr.object.ncloudstorage.com ```