Creates and binds tags to the specified resources.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nlb:TagResources |
create |
ServerGroup
SecurityPolicy
LoadBalancer
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceId |
array |
Yes |
The resource IDs. You can specify up to 50 resource IDs in each call. |
|
|
string |
No |
The resource ID. You can specify up to 50 resource IDs in each call. |
nlb-nrnrxwd15en27r**** |
|
| Tag |
array<object> |
Yes |
The tags. |
|
|
object |
No |
The tag. |
||
| Key |
string |
No |
The tag key. The tag key can be up to 64 characters in length, cannot start with You can specify up to 20 tags in each call. |
env |
| Value |
string |
No |
The tag value. The tag value can be up to 128 characters in length, cannot start with You can specify up to 20 tags in each call. |
product |
| ResourceType |
string |
Yes |
The resource type. Valid values:
|
loadbalancer |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run, without actually performing the operation. Valid values:
|
true |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token. Make sure that the token is unique among different requests. Only ASCII characters are allowed. Note
If you do not specify this parameter, the system uses the value of RequestId as the client token. The value of RequestId is different for each API request. |
123e4567-e89b-12d3-a456-426655440000 |
| RegionId |
string |
No |
The region ID of the resources. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Add tags to resources. |
||
| RequestId |
string |
The request ID. |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
Examples
Success response
JSON format
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParam | The param of %s is illegal. | |
| 400 | MissingParam.%s | The parameter of %s is missing. | |
| 403 | Forbidden.NoPermission | Authentication is failed for NoPermission. | Authentication is failed for NoPermission. |
| 404 | ResourceNotFound.securitypolicy | The specified resource of securitypolicy is not found. | |
| 404 | ResourceNotFound.loadBalancer | The specified resource of loadbalancer is not found. | The specified load balancer resource was not found. Please check the input parameters. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.