You can call JoinResourceGroup operation to add EMR-related resources to a resource group.
Resources are cloud service entities that you create in Alibaba Cloud. The cloud resources that E-MapReduce support resource groups are clusters and projects. When you add an ECS instance to a resource group to a cluster, each node in the cluster is added to the resource group. A resource group is a collection of infrastructure for projects, environments, or stacks. In a resource group, you can manage resources and monitor and run tasks in a centralized manner without switching between Alibaba Cloud services.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | JoinResourceGroup |
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 JoinResourceGroup. |
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. |
ResourceGroupId | String | Yes | rg-bp67acfmxazb4p**** |
The ID of the resource group to which the snapshot belongs. You can call ListResourceGroups View the resource group ID. |
ResourceId | String | Yes | C-3652B95F654AF**** |
The ID of the resource. This parameter depends on the ResourceType value. For example, when ResourceType is set to cluster, ResourceId can be interpreted as ClusterId. |
ResourceType | String | Yes | cluster |
The type of the EMR resource. Valid values:
|
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=JoinResourceGroup
&RegionId=cn-hangzhou
&ResourceGroupId=rg-bp67acfmxazb4p****
&ResourceId=C-3652B95F654AF****
&ResourceType=cluster
&<common request parameters>
Sample success responses
XML
format
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
JSON
Syntax
{
"RequestId":"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}