Creates tags and adds them to resources.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ResourceId | array | Yes | The resource ID. You can specify at most 20 IDs. | |
string | Yes | The resource ID. You can specify up to 20 resource IDs. Note
When you call this operation, ResourceId.N is required.
| aeip-2zeerraiwb7ujsxdc**** | |
ResourceType | string | Yes | The resource type. Set the value to ANYCASTEIPADDRESS. | ANYCASTEIPADDRESS |
Tag | object [] | Yes | The tag information. | |
Key | string | No | The key of tag N to add to the resource. You must enter at least one tag key and at most 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain Note
When you call this operation, Tag.N.Key is required.
| FinanceDept |
Value | string | No | The value of tag N to add to the resource. You must enter at least one tag value and at most 20 tag values. The tag value can be an empty string. It can be up to 128 characters in length and cannot start with Note
When you call this operation, Tag.N.Value is required.
| FinanceJoshua |
Response parameters
Examples
Sample success responses
JSON
format
{
"Success": true,
"RequestId": "C46FF5A8-C5F0-4024-8262-B16B639225A0"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | NumberExceed.Tags | The maximum number of tags is exceeded. |
400 | NumberExceed.ResourceIds | The maximum number of resource IDs is exceeded. |
400 | Forbidden.TagKeys | The tag key cannot be operated by the request. |
400 | Forbidden.TagKey.Duplicated | The specified tag key already exists. |
400 | InvalidInstanceIds.NotFound | The instance IDs are not found. |
400 | InvalidInstanceType.NotFound | The instance type is not found. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|