You can call this operation to query the list of cluster templates.

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 ListClusterTemplates

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

PageNumber Integer Yes 1

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

PageSize Integer Yes 10

The number of entries to return on each page.

AccessKeyId String No LTAI8ljWyu7y***

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

BizId String No CT-4A6799A79D73385B

The ID of the cluster template.

RegionId String No cn-hangzhou-b

The ID of the region where your cluster resides.

Response parameters

Parameter Type Example Description 
PageNumber Integer 1

The page number of the returned page. Pages start from page 1.

PageSize Integer 10

The number of entries returned per page.

RequestId String EC911E1F-8F04-4059-A7A2-6B97EE46A943

The ID of the request.

TemplateInfoList

The list of cluster templates.

TemplateInfo

The information of a cluster template.

AllowNotebook Boolean true

A reserved parameter.

BootstrapActionList

The list of bootstrap actions.

BootstrapAction

The information of a bootstrap action.

Arg String ---a

The argument that you passed to the bootstrap action.

Name String create

The name of the bootstrap action.

Path String oss://bucket/path

The path of the bootstrap action script.

ClusterType String HADOOP

The type of the cluster.

ConfigList

The list of custom configuration items.

Config

The information of a custom configuration item.

ConfigKey String fs.trash.interval

The key of the custom configuration item.

ConfigValue String 60

The value of the custom configuration item.

Encrypt String 0

A reserved parameter.

FileName String yarn-site

The name of the file that contains the custom configuration item.

Replace String 0

A reserved parameter.

ServiceName String YARN

The name of the service that is configured by using the custom configuration item. The name must be capitalized.

Configurations String [{"classification": "core-site","properties": {"fs.trash.interval": "61"}},{"classification": "hadoop-log4j","properties": {"hadoop.log.file": "hadoop1.log","hadoop.root.logger": "INFO","a.b.c": "ABC"}}]

The custom software configurations. You can use a JSON file to modify the software configurations before you start a cluster.

CreateSource String 2

The method in which the cluster template was created.

DepositType String HALF_MANAGED

The hosting type.

EasEnable Boolean true

Indicates whether the cluster is a high-security cluster.

GmtCreate Long 1543765033000

The time when the cluster template was created.

GmtModified Long 1543765033000

The time when the cluster template was modified.

HighAvailabilityEnable Boolean true

Indicates whether the cluster is a high-availability cluster.

HostGroupList

The list of host groups.

HostGroup

The information of a host group.

ChargeType String PostPaid

The billing method.

DiskCapacity Integer 80

The data disk capacity of the host group.

DiskCount Integer 4

The number of data disks of the host group.

DiskType String CLOUD_SSD

The data disk type of the host group.

HostGroupId String 0

A reserved parameter.

HostGroupName String Master instance group

The name of the host group.

HostGroupType String MASTER

The type of the host group.

InstanceType String ecs.mn4.2xlarge

The instance type of the host group.

MultiInstanceTypes String ecs.sn1.xlarge,ecs.sn2.xlarge

The multiple instance types, separated with commas (,).

NodeCount Integer 2

The number of nodes in the host group.

Period String 36

The validity period of the subscription. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36.

SysDiskCapacity Integer 40

The system disk capacity of the host group.

SysDiskType String CLOUD_SSD

The system disk type of the host group.

Id String CT-4A6799A79D73****

The ID of the cluster template.

InitCustomHiveMetaDb Boolean true

A value of true indicates that the value of the init.meta.db configuration item in the hive-site.xml file is set to true.

InstanceGeneration String ecs-3

The generation of ECS instances.

IoOptimized Boolean true

Indicates whether ECS instances are I/O optimized.

IsOpenPublicIp Boolean true

Indicates whether a public IP address is assigned.

KeyPairName String test_kp

The name of the Secure Shell (SSH) key pair.

LogEnable Boolean true

Indicates whether Object Storage Service (OSS) logging is enabled.

LogPath String oss//bucketname/path

The path of logs that are stored in OSS buckets.

MachineType String ECS

The type of hosts in the cluster.

MasterNodeTotal Integer   1

The number of master nodes.

MetaStoreConf String rdsxxx.com

The configuration information of Hive Metastore.

MetaStoreType String local

The mode in which Hive Metastore is deployed.

NetType String vpc

The type of the network.

SecurityGroupId String sg-bp1id7ajv83kmqwq****

The ID of the security group.

SecurityGroupName String emr_sg

The name of the security group to be created.

SoftwareInfoList ["ZOOKEEPER"]

The list of optional services.

SoftwareInfo

The information of an optional service.

SshEnable Boolean true

Indicates whether the SSH authentication is enabled.

TemplateName String template_name_2

The name of the cluster template.

UseCustomHiveMetaDb Boolean  false

A reserved parameter.

UseLocalMetaDb Boolean  false

Indicates whether the local Hive metadatabase is used.

UserDefinedEmrEcsRole String AliyunEmrEcsDefaultRole

The RAM role that is assigned to EMR to access ECS resources.

UserId String 125046002175****

The ID of the user.

VSwitchId String vsw-bp10tvjyc77psy0z****

The ID of the VSwitch.

VpcId String vpc-bp1l4urd87xlh7i4b****

The ID of the VPC to which the cluster belongs.

ZoneId String cn-hangzhou-b

The ID of the zone.

TotalCount Integer 12

The total number of cluster templates.

Examples

Sample requests


http(s)://[Endpoint]/? Action=ListClusterTemplates
&PageNumber=1
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

<ListClusterTemplatesResponse>
	  <pageNumber>1</pageNumber>
	  <pageSize>10</pageSize>
	  <requestId>EC911E1F-8F04-4059-A7A2-6B97EE46A943</requestId>
	  <templateInfoList>
		    <clusterType>HADOOP</clusterType>
		    <createSource>2</createSource>
		    <depositType>HALF_MANAGED</depositType>
		    <easEnable>false</easEnable>
		    <gmtCreate>1543765033000</gmtCreate>
		    <gmtModified>1543765033000</gmtModified>
		    <highAvailabilityEnable>false</highAvailabilityEnable>
		    <hostGroupList>
			      <chargeType>PostPaid</chargeType>
			      <diskCapacity>80</diskCapacity>
			      <diskCount>1</diskCount>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <hostGroupId></hostGroupId>
			      <hostGroupName>Master instance group</hostGroupName>
			      <hostGroupType>MASTER</hostGroupType>
			      <instanceType>ecs.n4.xlarge</instanceType>
			      <nodeCount>1</nodeCount>
		    </hostGroupList>
		    <hostGroupList>
			      <chargeType>PostPaid</chargeType>
			      <diskCapacity>80</diskCapacity>
			      <diskCount>4</diskCount>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <hostGroupId></hostGroupId>
			      <hostGroupName>Core instance group</hostGroupName>
			      <hostGroupType>CORE</hostGroupType>
			      <instanceType>ecs.n4.xlarge</instanceType>
			      <nodeCount>2</nodeCount>
		    </hostGroupList>
		    <id>CT-35498C56B3F1****</id>
		    <ioOptimized>true</ioOptimized>
		    <isOpenPublicIp>true</isOpenPublicIp>
		    <logEnable>false</logEnable>
		    <machineType>ECS</machineType>
		    <masterNodeTotal>0</masterNodeTotal>
		    <netType>vpc</netType>
		    <securityGroupId>sg-bp1id7ajv83kmqwq****</securityGroupId>
		    <securityGroupName>emxxx</securityGroupName>
		    <softwareInfoList>FLUME</softwareInfoList>
		    <softwareInfoList>FLINK</softwareInfoList>
		    <sshEnable>false</sshEnable>
		    <templateName>template_name_2</templateName>
		    <useLocalMetaDb>true</useLocalMetaDb>
		    <userDefinedEmrEcsRole>AliyunEmrEcsDefaultRole</userDefinedEmrEcsRole>
		    <userId>125046002175****</userId>
		    <vSwitchId>vsw-bp10tvjyc77psy0z5****</vSwitchId>
		    <vpcId>vpc-bp1l4urd87xlh7i4b****</vpcId>
		    <zoneId>cn-hangzhou-b</zoneId>
	  </templateInfoList>
	  <totalCount>1</totalCount>
</ListClusterTemplatesResponse>

JSON format

{
	"totalCount":1,
	"requestId":"EC911E1F-8F04-4059-A7A2-6B97EE46A943",
	"templateInfoList":[
		{
			"gmtModified":1543765033000,
			"clusterType":"HADOOP",
			"logEnable":false,
			"configList":[],
			"id":"CT-35498C56B3F1****",
			"useLocalMetaDb":true,
			"masterNodeTotal":0,
			"vpcId":"vpc-bp1l4urd87xlh7i4b****",
			"userId":"125046002175****",
			"isOpenPublicIp":true,
			"highAvailabilityEnable":false,
			"depositType":"HALF_MANAGED",
			"gmtCreate":1543765033000,
			"machineType":"ECS",
			"sshEnable":false,
			"vSwitchId":"vsw-bp10tvjyc77psy0z5****",
			"bootstrapActionList":[],
			"securityGroupId":"sg-bp1id7ajv83kmqwq****",
			"easEnable":false,
			"zoneId":"cn-hangzhou-b",
			"userDefinedEmrEcsRole":"AliyunEmrEcsDefaultRole",
			"softwareInfoList":[
				"FLUME",
				"FLINK"
			],
			"hostGroupList":[
				{
					"instanceType":"ecs.n4.xlarge",
					"diskCount":1,
					"diskCapacity":80,
					"diskType":"CLOUD_EFFICIENCY",
					"chargeType":"PostPaid",
					"hostGroupName":"Master instance group",
					"hostGroupId":"",
					"nodeCount":1,
					"hostGroupType":"MASTER"
				},
				{
					"instanceType":"ecs.n4.xlarge",
					"diskCount":4,
					"diskCapacity":80,
					"diskType":"CLOUD_EFFICIENCY",
					"chargeType":"PostPaid",
					"hostGroupName":"Core instance group",
					"hostGroupId":"",
					"nodeCount":2,
					"hostGroupType":"CORE"
				}
			],
			"netType":"vpc",
			"securityGroupName":"emxxx",
			"ioOptimized":true,
			"createSource":"2",
			"templateName":"template_name_2"
		}
	],
	"pageSize":10,
	"pageNumber":1
}

Error codes

HTTP status code Error code Error message Description
403 Params.Illegal The specified parameters are wrongly formed.. The error message returned because the format of the specified parameter is invalid.
403 User.OtherUserResource.NotAllow It is not allowed to operate other user's resource The error message returned because you are not allowed to manage resources of other users.
403 Invalid.Cluster.Status Invalid cluster status %s in status list The error message returned because the status of the specified cluster is invalid.
403 Invalid.Cluster.Type Invalid cluster type %s in cluster type list The error message returned because the type of the specified cluster is invalid.
500 InternalError The request processing has failed due to some unknown error. The error message returned because an internal error has occurred. Submit a ticket.

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