mb command is used to create a bucket.cos:PutBucket. For more authorizations, please refer to CAM-Enabled API../coscli mb cos://<BucketName-APPID> -e <endpoint> [flag]
mb command, you need to carry the global flag -e or --endpoint to specify the region where the bucket is located.mb includes the following parameters:Parameter Format | Description | Sample |
cos://<BucketName-APPID> | Customizes the bucket name | cos://examplebucket-1250000000 |
mb includes the following optional flags:Flag Abbreviation | Flag Name | Description |
-h | --help | Views the usage of this command. |
-r | --region | Region of the bucket. |
-m | --maz | Create a multi-az bucket |
-o | --ofs | Create a bucket for ofs |
None | --acl | Set the ACL of the bucket, such as private, public-read, and public-read-write. |
None | --grant-read | Grant the authorized entity permission to read the bucket. The format is 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). The format is 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). The format is 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. The format is id="[OwnerUin]", for example id="100000000001". Use comma (half-width) to separate multiple authorized entities, such as id="100000000001",id="100000000002". |
None | --tags | Bucket tag collection, with a maximum of 50 tags (for example, --tags="Key1=Value1&Key2=Value2") |
mb command to successfully create a bucket, we recommend that you add information about the bucket in the configuration file, so that you can use the bucket alias for quick operations. For command usage, see the following example../coscli mb cos://bucket3-1250000000 -e cos.ap-chengdu.myqcloud.com
./coscli config add -b bucket3-1250000000 -e cos.ap-chengdu.myqcloud.com -a bucket3
Feedback