You can call this operation to query the versions of EMR.

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 Yes ListEmrMainVersion

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

RegionId String Yes cn-hangzhou

The ID of the region where your cluster resides.

AccessKeyId String No LTAI8ljWyu7y****

The AccessKey ID provided to you by Alibaba Cloud, which specifies the ID of the user.

EmrVersion String No EMR-3.15.0

The EMR version.

PageNumber Integer No 1

The number of the page to return. Pages start from page 1.

PageSize Integer No 10

The number of entries to return on each page.

StackName String No EMR

The name of the software stack. Set the value to EMR.

StackVersion String No 3.15.1.1.0

The version of the software stack.

Response parameters

Parameter Type Example Description 
EmrMainVersionList

The list of EMR versions.

EmrMainVersion

The information of EMR versions.

ClusterTypeInfoList

The list of cluster types.

ClusterTypeInfo

The information of a cluster type.

ClusterType String HADOOP

The type of the cluster.

ServiceInfoList

The list of services.

ServiceInfo

The information of a service.

Display Boolean true

Indicates whether the service is displayed.

Mandatory Boolean true

Indicates whether the service is required.

ServiceDisplayName String Hive

The display name of the service.

ServiceDisplayVersion String 2.3.3

The display version of the service.

ServiceName String HIVE

The name of the service.

ServiceVersion String 2.3.3.0.1

The internal version of the service.

Display Boolean true

Indicates whether the cluster type is available.

EcmVersion Boolean true

Indicates whether the cluster type supports the software stack version.

EmrVersion String EMR-3.16.0

The EMR version.

ImageId String m-bp1hdwryap03nxpl1rcd

The ID of the image.

RegionId String cn-hangzhou

The ID of the region where your cluster resides.

StackName String ""

A reserved parameter.

StackVersion String ""

A reserved parameter.

WhiteUserList ""

A reserved parameter.

WhiteUser

A reserved parameter.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page.

RequestId String BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22

The ID of the request.

TotalCount Integer 12

The total number of EMR versions queried.

Examples

Sample requests


http(s)://[Endpoint]/? Action=ListEmrMainVersion
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ListEmrMainVersionResponse>
	  <emrMainVersionList>
		    <display>false</display>
		    <ecmVersion>true</ecmVersion>
		    <emrVersion>EMR-3.16.0</emrVersion>
		    <imageId>m-bp1amnkvohr8eb6wud0f</imageId>
		    <regionId>cn-hangzhou</regionId>
		    <stackName>EMR</stackName>
		    <stackVersion>3.16.0.1.2</stackVersion>
	  </emrMainVersionList>
	  <emrMainVersionList>
		    <display>false</display>
		    <ecmVersion>true</ecmVersion>
		    <emrVersion>EMR-3.16.1</emrVersion>
		    <imageId>m-bp1amnkvohr8eb6wud0f</imageId>
		    <regionId>cn-hangzhou</regionId>
		    <stackName>EMR</stackName>
		    <stackVersion>3.16.0.1.3</stackVersion>
	  </emrMainVersionList>
	  <emrMainVersionList>
		    <display>false</display>
		    <ecmVersion>true</ecmVersion>
		    <emrVersion>EMR-3.15.1</emrVersion>
		    <imageId>m-bp1ddn41swc2fqjgj3ik</imageId>
		    <regionId>cn-hangzhou</regionId>
		    <stackName>EMR</stackName>
		    <stackVersion>3.15.1.1.0</stackVersion>
	  </emrMainVersionList>
	  <emrMainVersionList>
		    <display>false</display>
		    <ecmVersion>true</ecmVersion>
		    <emrVersion>EMR-3.15.2</emrVersion>
		    <imageId>m-bp1hdwryap03nxpl1rcd</imageId>
		    <regionId>cn-hangzhou</regionId>
		    <stackName>EMR</stackName>
		    <stackVersion>3.15.1.1.0</stackVersion>
	  </emrMainVersionList>
	  <emrMainVersionList>
		    <display>false</display>
		    <ecmVersion>true</ecmVersion>
		    <emrVersion>EMR-3.15.3</emrVersion>
		    <imageId>m-bp1hdwryap03nxpl1rcd</imageId>
		    <regionId>cn-hangzhou</regionId>
		    <stackName>EMR</stackName>
		    <stackVersion>3.15.1.1.0</stackVersion>
	  </emrMainVersionList>
	  <pageNumber>1</pageNumber>
	  <pageSize>5</pageSize>
	  <requestId>D835118F-3198-461E-B06E-7A73C4353F59</requestId>
	  <totalCount>140</totalCount>
</ListEmrMainVersionResponse>

JSON format

{
	"totalCount":140,
	"requestId":"D835118F-3198-461E-B06E-7A73C4353F59",
	"pageSize":5,
	"emrMainVersionList":[
		{
			"imageId":"m-bp1amnkvohr8eb6wud0f",
			"emrVersion":"EMR-3.16.0",
			"clusterTypeInfoList":[],
			"ecmVersion":true,
			"stackName":"EMR",
			"display":false,
			"whiteUserList":[],
			"stackVersion":"3.16.0.1.2",
			"regionId":"cn-hangzhou"
		},
		{
			"imageId":"m-bp1amnkvohr8eb6wud0f",
			"emrVersion":"EMR-3.16.1",
			"clusterTypeInfoList":[],
			"ecmVersion":true,
			"stackName":"EMR",
			"display":false,
			"whiteUserList":[],
			"stackVersion":"3.16.0.1.3",
			"regionId":"cn-hangzhou"
		},
		{
			"imageId":"m-bp1ddn41swc2fqjgj3ik",
			"emrVersion":"EMR-3.15.1",
			"clusterTypeInfoList":[],
			"ecmVersion":true,
			"stackName":"EMR",
			"display":false,
			"whiteUserList":[],
			"stackVersion":"3.15.1.1.0",
			"regionId":"cn-hangzhou"
		},
		{
			"imageId":"m-bp1hdwryap03nxpl1rcd",
			"emrVersion":"EMR-3.15.2",
			"clusterTypeInfoList":[],
			"ecmVersion":true,
			"stackName":"EMR",
			"display":false,
			"whiteUserList":[],
			"stackVersion":"3.15.1.1.0",
			"regionId":"cn-hangzhou"
		},
		{
			"imageId":"m-bp1hdwryap03nxpl1rcd",
			"emrVersion":"EMR-3.15.3",
			"clusterTypeInfoList":[],
			"ecmVersion":true,
			"stackName":"EMR",
			"display":false,
			"whiteUserList":[],
			"stackVersion":"3.15.1.1.0",
			"regionId":"cn-hangzhou"
		}
	],
	"pageNumber":1,
}

Error codes

For a list of error codes, visit the API Error Center.