Retrieves a previously created CNAME token for verifying domain name ownership for a bucket.
Prerequisites
Before you begin, make sure you have:
The
oss:GetCnameTokenpermission, if using a RAM user or Security Token Service (STS). By default, an Alibaba Cloud account has this permission. To grant access to a RAM user or STS, attach a custom policy that includesoss:GetCnameToken. For more information, see Attach a custom policy to a RAM user
Synopsis
ossutil api get-cname-token --bucket <value> --cname <value> [flags]Parameters
| Parameter | Type | Description |
|---|---|---|
--bucket | string | The name of the bucket. |
--cname | string | The CNAME record mapped to the bucket. |
get-cname-token corresponds to the GetCnameToken API operation. For supported global flags, see Global command-line options.Examples
Retrieve the CNAME token for example.com mapped to examplebucket:
ossutil api get-cname-token --bucket examplebucket --cname example.comRetrieve the token and display the output in JSON format:
ossutil api get-cname-token --bucket examplebucket --cname example.com --output-format jsonRetrieve the token and display the output in YAML format:
ossutil api get-cname-token --bucket examplebucket --cname example.com --output-format yaml