Queries the created CNAME token.
Usage notes
By default, an Alibaba Cloud account has the permissions to query the created CNAME token. If you want to query the created CNAME token by using a RAM user or Security Token Service (STS), you must have the oss:GetCnameToken
permission. For more information, see Attach a custom policy to a RAM user.
Command syntax
ossutil api get-cname-token --bucket value --cname value [flags]
Parameter | Type | Description |
--bucket | string | The name of the bucket. |
--cname | string | The name of the CNAME record that is mapped to the bucket. |
The get-cname-token command corresponds to the GetCnameToken operation. For more information about the parameters in the GetCnameToken operation, see GetCnameToken.
For more information about supported global command-line options, see Global command-line options.
Examples
Run the following command to query the CNAME token used to verify the ownership of the
example.com
domain name that is mapped to theexamplebucket
bucket:ossutil api get-cname-token --bucket examplebucket --cname example.com
Run the following command to query the CNAME token used to verify the ownership of the
example.com
domain name that is mapped to theexamplebucket
bucket and display the CNAME token in the JSON format:ossutil api get-cname-token --bucket examplebucket --cname example.com --output-format json
Run the following command to query the CNAME token used to verify the ownership of the
example.com
domain name that is mapped to theexamplebucket
bucket and display the CNAME token in the YAML format:ossutil api get-cname-token --bucket examplebucket --cname example.com --output-format yaml