You need to enable JavaScript to run this app.
E-MapReduce

E-MapReduce

Copy page
Download PDF
Cluster management
GetCluster - Retrieve a cluster
Copy page
Download PDF
GetCluster - Retrieve a cluster

Retrieve a cluster

Note

Call GetCluster to query the details of E-MapReduce (EMR) clusters under your account.

important notes

You have already logged in to Volcano Engine with your account.

Request description

Request method: POST
Request URL: https://emr.cn-beijing.volcengineapi.com/?Version=2023-08-15&Action=GetCluster

Debug

request parameters

The table below lists only the unique request parameters for this API and some common parameters. For more information, see common parameters.

Parameter
Type
Required
Example value
Description
Action
String
Yes

GetCluster

Operation to be performed. Value: GetCluster.

Version
String
Yes

2023-08-15

API version. Value: 2023-08-15.

ClusterId
String
No

emr-xxx

Cluster ID

response parameters

The table below lists only the unique response parameters for this API. For more information, see response structure

const columns = [ 
  { 
title: 'Parameter', 
    dataIndex: 'Name', 
  }, 
  { 
title: 'Type', 
    dataIndex: 'DataType', 
    width: '10%', 
  }, 
  { 
title: 'Example value', 
    dataIndex: 'Example', 
    width: '20%', 
  }, 
  { 
title: 'Description', 
    dataIndex: 'Description', 
    width: '60%', 
  }, 
]; 
    
const data = [ 
  { 
    rowKey: "->Tags", 
    Name: "Tags", 
    DataType: "Array of Tag", 
    Example: <RenderMd content={"[\n            {\n                "Key": "volc:emr:create_by",\n                "Value": "EMR"\n            },\n            {\n                "Key": "volc:emr:emr_cluster_type",\n                "Value": "Hadoop"\n            },\n            {\n                "Key": "volc:emr:location",\n                "Value": "cn-beijing/cn-beijing-b"\n            }\n        ]"} />, 
Description: <RenderMd content={"Tag list"} />, 
    children: [ 
        { 
          rowKey: "->Tags->Key", 
          Name: "Key", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Tag key"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Tags->Value", 
          Name: "Value", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Tag value"} />, 
          children: [ 
          ] 
        }, 
    ] 
  }, 
  { 
    rowKey: "->RegionId", 
    Name: "RegionId", 
    DataType: "String", 
    Example: <RenderMd content={"cn-beijing"} />, 
Description: <RenderMd content={"Region ID"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->ProjectName", 
    Name: "ProjectName", 
    DataType: "String", 
    Example: <RenderMd content={"default"} />, 
Description: <RenderMd content={"Project name"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->ClusterId", 
    Name: "ClusterId", 
    DataType: "String", 
    Example: <RenderMd content={"emr-xxx"} />, 
Description: <RenderMd content={"Cluster ID"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->ClusterName", 
    Name: "ClusterName", 
    DataType: "String", 
    Example: <RenderMd content={"OpenApiHadoop3.7.0-xxx"} />, 
Description: <RenderMd content={"Cluster name"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->ClusterType", 
    Name: "ClusterType", 
    DataType: "String", 
    Example: <RenderMd content={"Hadoop"} />, 
Description: <RenderMd content={"Cluster type"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->ReleaseVersion", 
    Name: "ReleaseVersion", 
    DataType: "String", 
    Example: <RenderMd content={"3.7.0"} />, 
Description: <RenderMd content={"Cluster version"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->SecurityGroupId", 
    Name: "SecurityGroupId", 
    DataType: "String", 
    Example: <RenderMd content={"sg-xxx"} />, 
Description: <RenderMd content={"Cluster global security group ID"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->VpcId", 
    Name: "VpcId", 
    DataType: "String", 
    Example: <RenderMd content={"vpc-xxx"} />, 
Description: <RenderMd content={"Cluster vpcId"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->NodeAttribute", 
    Name: "NodeAttribute", 
    DataType: "NodeAttribute", 
    Example: <RenderMd content={"{\n            "ZoneId": "cn-beijing-b",\n            "EcsIamRole": "VEECSforEMRRole"\n        }"} />, 
Description: <RenderMd content={"Cluster global node information"} />, 
    children: [ 
        { 
          rowKey: "->NodeAttribute->ZoneId", 
          Name: "ZoneId", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
          Description: <RenderMd content={"zoneId"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->NodeAttribute->EcsIamRole", 
          Name: "EcsIamRole", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"IAM role name bound to ECS."} />, "} />, 
          children: [ 
          ] 
        }, 
    ] 
  }, 
  { 
    rowKey: "->ClusterDomainNames", 
    Name: "ClusterDomainNames", 
    DataType: "Array of String", 
    Example: <RenderMd content={"[\n            "emr-xxx.offline-cn-beijing.emr-volces.com",\n            "offline-cn-beijing.emr-volces.com"\n        ]"} />, 
children: [ 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->AccountId", 
    Name: "AccountId", 
    DataType: "Long", 
    Example: <RenderMd content={"2100xxx"} />, 
Description: <RenderMd content={"Account ID"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->CreatorId", 
    Name: "CreatorId", 
    DataType: "Long", 
    Example: <RenderMd content={"6xxx"} />, 
Description: <RenderMd content={"Creator ID"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->CreatorName", 
    Name: "CreatorName", 
    DataType: "String", 
    Example: <RenderMd content={"xxx"} />, 
Description: <RenderMd content={"Creator name"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->Autorenew", 
    Name: "Autorenew", 
    DataType: "Boolean", 
    Example: <RenderMd content={"false"} />, 
Description: <RenderMd content={"Auto-renewal"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->AutorenewPeriod", 
    Name: "AutorenewPeriod", 
    DataType: "Integer", 
    Example: <RenderMd content={"1"} />, 
Description: <RenderMd content={"Auto-renewal period"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->AutorenewPeriodUnit", 
    Name: "AutorenewPeriodUnit", 
    DataType: "String", 
Example: <RenderMd content={"Week, //by week\nMonth, //by month\nYear; //by year"} />, 
Description: <RenderMd content={"Auto-renewal period unit"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->ClusterState", 
    Name: "ClusterState", 
    DataType: "String", 
    Example: <RenderMd content={"PENDING_FOR_PAYMENT,\nCREATING,\nRUNNING,\nTERMINATING,\nTERMINATED,\nTERMINATED_WITH_ERROR,\nFAILED,\nSHUTDOWN"} />, 
Description: <RenderMd content={"Cluster state"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->ChargeType", 
    Name: "ChargeType", 
    DataType: "String", 
    Example: <RenderMd content={"PRE,POST"} />, 
Description: <RenderMd content={"Charge type"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->DeployMode", 
    Name: "DeployMode", 
    DataType: "String", 
    Example: <RenderMd content={"NORMAL,\nHA"} />, 
Description: <RenderMd content={"Cluster deployment mode"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->SecurityMode", 
    Name: "SecurityMode", 
    DataType: "String", 
    Example: <RenderMd content={"NORMAL,\nKERBEROS"} />, 
Description: <RenderMd content={"Security mode"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->CreateTime", 
    Name: "CreateTime", 
    DataType: "Long", 
    Example: <RenderMd content={"1703437906000"} />, 
Description: <RenderMd content={"Cluster creation time"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->ReadyTime", 
    Name: "ReadyTime", 
    DataType: "Long", 
    Example: <RenderMd content={"1703437906000"} />, 
Description: <RenderMd content={"Cluster ready time"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->ExpireTime", 
    Name: "ExpireTime", 
    DataType: "Long", 
    Example: <RenderMd content={"1703437906000"} />, 
Description: <RenderMd content={"Cluster expiry time"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->TerminateTime", 
    Name: "TerminateTime", 
    DataType: "Long", 
    Example: <RenderMd content={"1703437906000"} />, 
Description: <RenderMd content={"Cluster termination time"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->StateChangeReason", 
    Name: "StateChangeReason", 
    DataType: "StateChangeReason", 
    Example: <RenderMd content={"xxx"} />, 
Description: <RenderMd content={"Reason for state change"} />, 
    children: [ 
        { 
          rowKey: "->StateChangeReason->code", 
          Name: "code", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"State update code"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->StateChangeReason->reason", 
          Name: "reason", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Details of the reason for state update"} />, 
          children: [ 
          ] 
        }, 
    ] 
  }, 
]; 

return (<Table 
  rowKey="rowKey" 
  className="openapi-doc-parameter-table" 
  columns={columns} 
  data={data} 
  border={ { cell: true, wrapper: true } } 
  pagination={false} 
/>);

sample request

{ 
   "ClusterId":"emr-xxx" 
}

sample response

{ 
    "ResponseMetadata": { 
        "RequestId": "20231205194333E4CF0C48565Cxxx", 
        "Action": "GetCluster", 
        "Version": "2023-08-15", 
        "Service": "emr", 
        "Region": "cn-beijing", 
        "Error": null, 
        "Deprecated": false 
    }, 
    "Result": { 
        "RegionId": "cn-beijing", 
        "ProjectName": "default", 
        "ClusterId": "emr-xxx", 
        "ClusterName": "OpenApiHadoop3.7.0-xxx", 
        "ClusterType": "Hadoop", 
        "ReleaseVersion": "3.7.0", 
        "SecurityGroupId": "sg-xxx", 
        "VpcId": "vpc-xxx", 
        "NodeAttribute": { 
            "ZoneId": "cn-beijing-b", 
            "EcsIamRole": "VEECSforEMRRole", 
            "LoginUserName": null 
        }, 
        "ClusterDomainNames": [ 
            "emr-xxx.offline-cn-beijing.emr-volces.com", 
            "offline-cn-beijing.emr-volces.com" 
        ], 
        "AccountId": 210xxx, 
        "CreatorId": 64xxx, 
        "CreatorName": null, 
        "Autorenew": false, 
        "AutorenewPeriod": 1, 
        "AutorenewPeriodUnit": null, 
        "ClusterState": "RUNNING", 
        "ChargeType": "POST", 
        "DeployMode": "HIGH_AVAILABLE", 
        "SecurityMode": "SIMPLE", 
        "CreateTime": 1701764286214, 
        "ReadyTime": 1701770482932, 
        "ExpireTime": null, 
        "TerminateTime": null, 
        "Tags": null, 
        "StateChangeReason": null 
    } 
}

error codes

The table below lists the error codes related to the business logic of this API. For common error codes, see the common error codes documentation.

Status code
Error code
Error message
Note
400
InvalidClusterId
cluster id {clusterId} not found
400
InvalidRequest
Access Denied {clusterId}
Last updated: 2026.06.01 17:04:20