Adds tags to hosts.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the host. | ap-southeast-1 |
ResourceId | array | Yes | The ID of host N. You can specify multiple host IDs. | |
string | Yes | The ID of host N. You can specify multiple host IDs. N specifies the serial number of the host. Examples:
| ch-bp1yp3mqggn8**** | |
Tag | object [] | Yes | The tags. | |
Key | string | Yes | The key of tag N.
| demokey |
Value | string | Yes | The value of tag N.
| demovalue |
ResourceType | string | Yes | The resource type. Set the value to DEDICATEDHOST. | DEDICATEDHOST |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "4B938011-874B-5F54-8B9E-7E2A08B3AA13"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | OperationDenied.QuotaExceed | The Tags parameter number is exceed. Valid is 20. | The Tags parameter number is exceed. Valid is 20. |
400 | NoPermission.SystemTag | The operator is not permission for the system tag | The operator is not permission for the system tag |
400 | InvalidParameter.TagValue | The Tag.%s.Value parameter - %s is invalid | The Tag.%s.Value parameter - %s is invalid |
400 | InvalidParameter.TagKey | The Tag.%s.Key parameter - %s is invalid | The Tag.%s.Key parameter - %s is invalid |
400 | NumberExceed.ResourceIds | The ResourceIds parameter's number is exceed , Valid : 50 | - |
400 | InvalidTagValue.Malformed | The specified parameter "Tag.n.Value" is not valid. | - |
400 | InvalidDedicatedHostId.NotFound | The parameter - ResourceIds.N is not found. | The parameter - ResourceIds.N is not found. |
400 | InvalidParameter.ResourceType | The specified parameter "ResourceType" is not valid. | - |
400 | NumberExceed.Tags | The Tags parameter's number is exceed, Valid : 20. | - |
400 | MissingParameter.ResourceIds | The parameter - ResourceIds.N should not be null. | The parameter - ResourceIds.N should not be null. |
400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | - |
400 | InvalidTagKey.Malformed | The Tag.N.Key parameter is invalid. | - |
For a list of error codes, visit the Service error codes.