You can call TagResources operation to create and bind tags to specified EMR clusters.
Note the following limits when you call this operation:
- You can bind a maximum of 20 tags to a cluster.
- Tags bound to an EMR cluster are synchronized to the ECS instances of the nodes.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | TagResources |
The operation that you want to perform. This parameter is required for API requests that you create by piecing together HTTP or HTTPS URLs. Set the value to TagResources. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the instance. You can call DescribeRegions Interface to view the latest list of Alibaba Cloud regions. |
ResourceId.N | RepeatList | Yes | C-3652B95F6596**** |
The ID of resource N. Valid values of N: 1 to 50. |
ResourceType | String | Yes | cluster |
The type of the resource. The EMR cluster is cluster. |
Tag.N.Key | String | No | DevDept |
The key of tag N of the resource. Valid values of N: 1 to 20 The tag key cannot be an empty string. The value of a tag key ranges from 1 to 128. It cannot start with aliyun or acs: and cannot contain http:// or https://. |
Tag.N.Value | String | No | DevNianmin |
The value of tag N of the resource. Valid values of N: 1 to 20. The tag value can be an empty string. The value of the tag ranges from 1 to 128. It cannot start with acs: and cannot contain http:// or https://. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=TagResources &RegionId=cn-hangzhou &ResourceId.1=C-3652B95F6596****
&ResourceType=cluster
&Tag.1.Key=DevDept
&<common request parameters>
Sample success responses
XML
format
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
JSON
Syntax
{
"RequestId":"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}