Queries a created CNAME token.
Usage note
By default, an Alibaba Cloud account has the permissions to query a created CNAME token. The oss:GetCnameToken permission is required to query a CNAME token as a RAM user or by using STS. For more information, see Grant a custom policy.
Command syntax
ossutil api get-cname-token --bucket value --cname value --wildcard=value [flags]Parameter | Type | Description |
--bucket | string | The name of the bucket. |
--cname | string | The name of the mapped CNAME. |
--wildcard | bool | Specifies whether to query the CNAME token of a wildcard domain CNAME. Valid values: true and false. For an Agentic Bucket, you must explicitly set this parameter to true or false. For a standard bucket, this parameter is optional and defaults to false (exact CNAME). |
The get-cname-token command corresponds to the GetCnameToken API operation. For more information about the parameters, see GetCnameToken.
The --wildcard option is used for wildcard domain CNAME operations. Make sure that your ossutil version supports this parameter.
For more information about supported global command-line options, see Global command-line options.
Examples
Query the CNAME token for the
example.comdomain mapped toexamplebucket.ossutil api get-cname-token --bucket examplebucket --cname example.comQuery the CNAME token for the
example.comdomain mapped toexamplebucketand display the result in JSON format.ossutil api get-cname-token --bucket examplebucket --cname example.com --output-format jsonQuery the CNAME token for the
example.comdomain mapped toexamplebucketand display the result in YAML format.ossutil api get-cname-token --bucket examplebucket --cname example.com --output-format yamlQuery the CNAME token for the base domain
foo.example.comof a wildcard domain for the Agentic Bucketmyab-$uid-$region-ab-apsr.ossutil api get-cname-token --bucket my-uid-region-ab-apsr --cname foo.example.com --wildcard=true