Queries all CNAME records that are mapped to a bucket.
Usage notes
By default, an Alibaba Cloud account has the permissions to query all CNAME records that are mapped to a bucket. To query all CNAME records that are mapped to a bucket by using a RAM user or Security Token Service (STS), you must have the oss:ListCname
permission. For more information, see Attach a custom policy to a RAM user.
Command syntax
ossutil api list-cname --bucket value [flags]
Parameter | Type | Description |
--bucket | string | The name of the bucket. |
The list-cname command corresponds to the ListCname operation. For more information about the parameters in the ListCname operation, see ListCname.
For more information about supported global command-line options, see Global command-line options.
Examples
Run the following command to query all CNAME records that are mapped to a bucket named
examplebucket
:ossutil api list-cname --bucket examplebucket
Run the following command to query all CNAME records that are mapped to a bucket named
examplebucket
and display the CNAME records in the JSON format:ossutil api list-cname --bucket examplebucket --output-format json
Run the following command to query all CNAME records that are mapped to a bucket named
examplebucket
and display the CNAME records in the YAML format:ossutil api list-cname --bucket examplebucket --output-format yaml