Skip to main content

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

NameLocationTypeRequiredSample valueDescription
Tag.N.KeyBODYstringNoTestthe 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.NBODYrepeatlistYesi-bp67acfmxazb4ph***resource ID, n values range from 1 to 50.
regionIdBODYstringYesNo sample value for this parameter.region id
Tag.N.ValueBODYstringNoTestthe 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://.
ResourceTypeBODYstringYesinstanceresource 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
RegionIdBODYstringYescn-qingdao-env17-d01the region ID to which the resource belongs. You can call the DescribeRegions to view the latest Alibaba Cloud region list.
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}