cos:GetObjectACL.cos:PutObjectACL../coscli object-acl --method [method] cos://<bucket-name>/object
Parameter Format | Description | Example |
cos://<bucket-name> | Specify the target bucket. Supports using the bucket alias in configuration parameters or the bucket name for access. If using the bucket name for access, you must also 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 object ACL), get (object ACL query). |
None | --acl | Set the file's ACL, such as private, public-read. |
None | --grant-read | Grant the read permission of the object to the authorized. 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 permission to read the object'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 permission to write to the object'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 all permissions on the operation object to the authorized. Format: id="[OwnerUin]", for example id="100000000001". Use comma (half-width) to separate multiple authorized entities, such as id="100000000001",id="100000000002". |
./coscli object-acl --method put cos://example-alias/object --grant-read="id=\\"100000000013\\",id=\\"100000000012\\""
./coscli object-acl --method get cos://example-alias/object
SECTION | KEY | VALUE-----------+--------------+----------------------------------------------Owner | UIN |+ +--------------+---------------------------------------------+| ID | qcs::cam::uin/1000000000:uin/1000000000+ +--------------+ +| 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/1000000000:uin/1000000000 (UIN: )- Total Grants: 2- Permissions:- READ: 2 grants
Feedback