All Products
Search
Document Center

Object Storage Service:list-cname

Last Updated:Mar 20, 2026

Lists all CNAME records mapped to a bucket.

Usage notes

Alibaba Cloud accounts can run this command without additional configuration. To run it as a RAM user or with Security Token Service (STS) credentials, the caller must have the oss:ListCname permission. For details, see Attach a custom policy to a RAM user.

Syntax

ossutil api list-cname --bucket <value> [flags]
ParameterTypeRequiredDescription
--bucketstringYesThe name of the bucket.
Note

This command maps to the ListCname API operation. For supported global flags, see Global command-line options.

Examples

All examples query CNAME records for a bucket named examplebucket. By default, the output uses the native ossutil format. Use --output-format to get JSON or YAML instead.

List CNAME records in the default format:

ossutil api list-cname --bucket examplebucket

List CNAME records in JSON format:

ossutil api list-cname --bucket examplebucket --output-format json

List CNAME records in YAML format:

ossutil api list-cname --bucket examplebucket --output-format yaml