cos:GetBucketACL.cos:PutBucketACL../coscli bucket-acl --method [method] cos://<bucket-name>
Parameter Format | Description | Example |
cos://<bucket-name> | Specifies the target bucket, which is accessible by using the bucket alias or bucket name configured in the configuration file as detailed in Download and Installation Configuration. If you use the bucket name for access, you also need to include the endpoint flag. | Access with the bucket alias: cos://example-alias Access with the bucket name: cos://examplebucket-1250000000 |
Flag Abbreviation | Flag Name | Description |
-h | --help | Views the usage of this command. |
None | --method | Specify the required operation, including put (set bucket ACL), get (query bucket ACL). |
None | --acl | Set the file's ACL, such as private, public-read, public-read-write. |
None | --grant-read | Grant the authorized entity permission to read the bucket. Format: id="[OwnerUin]", for example id="100000000001". Use comma (half-width) to separate multiple authorized entities, such as id="100000000001",id="100000000002". |
None | --grant-read-acp | Grant the authorized entity permission to read the bucket's access control list (ACL). Format: id="[OwnerUin]", for example id="100000000001". Use comma (half-width) to separate multiple authorized entities, such as id="100000000001",id="100000000002". |
None | --grant-write-acp | Grant the authorized entity permission to write to the bucket's access control list (ACL). Format: id="[OwnerUin]", for example id="100000000001". Use comma (half-width) to separate multiple authorized entities, such as id="100000000001",id="100000000002". |
None | --grant-full-control | Grant the authorized entity all permissions to operate the bucket. Format: id="[OwnerUin]", for example id="100000000001". Use comma (half-width) to separate multiple authorized entities, such as id="100000000001",id="100000000002". |
./coscli bucket-acl --method put cos://example-alias --grant-read="id=\\"100000000013\\",id=\\"100000000012\\""
./coscli bucket-acl --method get cos://example-alias
SECTION | KEY | VALUE-----------+--------------+----------------------------------------------Owner | UIN |+ +--------------+---------------------------------------------+| ID | qcs::cam::uin/100000000:uin/100000000+ +--------------+ +| Display Name |+----------+--------------+---------------------------------------------+| |+----------+--------------+---------------------------------------------+Grant #1 | Permission | READ+ +--------------+---------------------------------------------+| Grantee Type | CanonicalUser+ +--------------+---------------------------------------------+| ID | qcs::cam::uin/100000000013:uin/100000000013+ +--------------+ +| Display Name |+----------+--------------+---------------------------------------------+| |+----------+--------------+---------------------------------------------+Grant #2 | Permission | READ+ +--------------+---------------------------------------------+| Grantee Type | CanonicalUser+ +--------------+---------------------------------------------+| ID | qcs::cam::uin/100000000012:uin/100000000012+ +--------------+ +| Display Name |-----------+--------------+----------------------------------------------Access Control List (ACL) InformationSummary:- Owner: qcs::cam::uin/100000000:uin/100000000 (UIN: )- Total Grants: 2- Permissions:- READ: 2 grants
Feedback