TagResources
Description
call TagResources to uniformly create and bind tags for the specified ECS resource list.
Request Method
POST
Request Path
/apsara/route/Ecs/TagResources
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
Tag.N.Key | BODY | string | No | Test | the tag key of the resource. The value range of n is 1~20. Once the value is passed in, an empty string is not allowed. it can be up to 128 characters in length. it cannot start with aliyun or acs: and cannot contain http:// or https://. |
ResourceId.N | BODY | repeatlist | Yes | i-bp67acfmxazb4ph*** | resource ID, n values range from 1 to 50. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
Tag.N.Value | BODY | string | No | Test | the tag value of the resource. The value range of n is 1~20. Once the value is passed in, it can be an empty string. it can be up to 128 characters and cannot start with acs: and cannot contain http:// or https://. |
ResourceType | BODY | string | Yes | instance | resource type definition. Value range: instance:ECS instance disk: disk snapshot: snapshot image: mirror securitygroup: security group volume: storage volume eni: ENI ddh: dedicated host keypair:SSH key pair |
RegionId | BODY | string | Yes | cn-qingdao-env17-d01 | the region ID to which the resource belongs. You can call the DescribeRegions to view the latest Alibaba Cloud region list. |
version | BODY | string | No | 2016-01-01 | version of api |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}