All Products
Search
Document Center

Service Catalog:CreateTagOption

Last Updated:Mar 03, 2024

Creates a tag option.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
KeystringYes

The key of the tag option.

The key can be up to 128 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://.

k1
ValuestringYes

The value of the tag option.

The value can be up to 128 characters in length. It cannot start with acs:and cannot contain http:// or https://.

v1

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TagOptionDetailobject

An array that consists of the details of the tag option.

Activeboolean

Indicates whether the tag option is enabled. Valid values:

  • true (default)
  • false
true
TagOptionIdstring

The ID of the tag option.

tag-bp1r3mxq3t****
Keystring

The key of the tag option.

The key must be 1 to 128 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://.

k1
Valuestring

The value of the tag option.

The value must be 1 to 128 characters in length. It cannot start with acs: and cannot contain http:// or https://.

v1
Ownerstring

The ID of the Alibaba Cloud account to which the tag option belongs.

133413081827****
RequestIdstring

The ID of the request.

A48A5F12-6098-54A1-A389-6834AF27****

Examples

Sample success responses

JSONformat

{
  "TagOptionDetail": {
    "Active": true,
    "TagOptionId": "tag-bp1r3mxq3t****",
    "Key": "k1",
    "Value": "v1",
    "Owner": "133413081827****\n"
  },
  "RequestId": "A48A5F12-6098-54A1-A389-6834AF27****"
}

Error codes

HTTP status codeError codeError message
500InternalErrorA system error occurred.

For a list of error codes, visit the Service error codes.