Call the JoinResourceGroup operation to add EMR-related resources to a resource group.

A resource is a cloud service entity that you create on Alibaba Cloud. E-MapReduce cloud resources that support resource groups are clusters and projects. When a cluster is added to a resource group, the ECS instances of each node in the cluster are added to the resource group to which the cluster belongs. 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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No JoinResourceGroup

The operation that you want to perform. Set the value to JoinResourceGroup.

RegionId String Yes cn-hangzhou

The region ID of the instance. You can call DescribeRegions You can call this operation 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 ID of the resource group.

ResourceId String Yes C-3652B95F654AF****

The ID of the resource. This parameter value depends on the ResourceType value. For example, if the ResourceType parameter is set to cluster, the ResourceId parameter can be interpreted as ClusterId.

ResourceType String Yes cluster

The type of the EMR resource. Valid values:

  • cluster
  • flowproject: project

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request. If the request is successful, the request ID is returned. If the request fails, the corresponding error code is returned.

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"
}