Calls the TagResources operation to add labels to resources.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
drds:TagResources |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| ResourceType |
string |
Yes |
The resource type. Set this parameter to INSTANCE. |
INSTANCE |
| Tag |
array<object> |
Yes |
The labels. |
|
|
object |
No |
|||
| Key |
string |
No |
The key of the label. |
color |
| Value |
string |
No |
The value of the label. |
red |
| ResourceId |
array |
Yes |
The resources. |
|
|
string |
No |
The resource ID. |
dm-hbgau1zp**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Success |
boolean |
Indicates whether the request was successful. |
true |
| RequestId |
string |
The request ID. |
FE5D94E3-3C93-3594-95D9-AAED2A980915 |
Examples
Success response
JSON format
{
"Success": true,
"RequestId": "FE5D94E3-3C93-3594-95D9-AAED2A980915"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.tagKey | Check the parameter tagKey %s | |
| 400 | InvalidParameter.tagValue | Check the parameter tagValue %s | |
| 400 | InvalidParameter.tags.exceed | Tags num exceed 10 | |
| 400 | InvalidParameter.tags.notFound | Tags connot be empty | |
| 400 | TagService.%s | TagService return errorMsg: %s | |
| 400 | TagApi.InvalidParameter.resourceId.exceed | ResourceId num exceed 50 | |
| 500 | InternalError | The request processing has failed due to some unknown error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.