You can call this operation to query detailed information about a specified or all cluster templates.


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. For API requests using the HTTP or HTTPS URL, this parameter is required. Set the value to ListClusterTemplates.

PageNumber Integer Yes 1

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

PageSize Integer Yes 5

The number of entries to return on each page.

RegionId String No cn-hangzhou

The region ID of the resource. You can call DescribeRegions to view the latest list of Alibaba Cloud regions.

BizId String No CT-1422C105DE88****

The ID of the cluster template.

ProductType String No EMR

The type of the cloud product. static field EMR.

ResourceGroupId String No rg-bp67acfmxazb4p****

The ID of the resource group. You can call ListResourceGroups view the resource group ID.

Response parameters

Parameter Type Example Description
PageNumber Integer 1

The number of the returned page.

PageSize Integer 5

The number of automatic snapshot tasks returned per page.

RequestId String 2DAD3958-DB40-45AC-A08D-01D876AA6D04

The request ID.

TemplateInfoList Array of TemplateInfo

The list of cluster templates.

AllowNotebook Boolean true

A reserved parameter.

BootstrapActionList Array of BootstrapAction

The list of bootstrap actions.

Arg String ---a


Name String create

The name of the action.

Path String oss://bucket/path

The path where the script of bootstrap action N is stored.

ClusterType String HADOOP

The type of the cluster.

ConfigList Array of Config

The list of custom configuration items.

ConfigKey String fs.trash.interval

The key of the custom configuration items.

ConfigValue String 60

The value of custom configuration item N.

Encrypt String 0

A reserved parameter. You do not need to specify this parameter.

FileName String yarn-site

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

Replace String 0

A reserved parameter. You do not need to specify this parameter.

ServiceName String YARN

The name of the service for which the custom configuration item is configured. Specify the entire name in uppercase.

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

Customize software configurations. You can use a JSON file to modify software configurations before you start a cluster.

CreateSource String 2

The method in which the cluster template was created.

DepositType String HALF_MANAGED

Managed type:

  • HALF_MANAGED: Semi-managed
EasEnable Boolean false

Indicates whether the cluster is a high-security cluster template. Valid values:

  • true: high security.
  • false: non-high-security mode
GmtCreate Long 1601361773000

The time when the live domain was created.

GmtModified Long 1601361773000

The time when the cluster template was modified.

HighAvailabilityEnable Boolean false

Indicates whether the cluster is a high-availability cluster. Valid values:

  • true: the cluster is a high-availability cluster.
  • false: The cluster is not a high availability cluster.
HostGroupList Array of HostGroup

The list of host groups.

ChargeType String PostPaid

The billing method. Valid values:

  • PostPaid: pay-as-you-go cluster
  • PrePaid: subscription cluster
DiskCapacity Integer 80

The data disk capacity of host group N. Unit: GB.

DiskCount Integer 1

The number of data disks in host group N.

DiskType String CLOUD_ESSD

The data disk type of host group N.

HostGroupId String 0

A reserved parameter. You do not need to specify this parameter.

HostGroupName String Master instance group

The name of host group N.

HostGroupType String MASTER

The type of host group N.

InstanceType String ecs.g6.xlarge

The type of instances in host group N.

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

The list of machine types. Separate multiple machine types with commas (,).

NodeCount Integer 1

The number of nodes in host group N.

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.

Note This parameter is not available for pay-as-you-go clusters.
SysDiskCapacity Integer 120

The system disk capacity of host group N.

SysDiskType String CLOUD_ESSD

The system disk type of host group N.

Id String CT-53B394A1B559****

The ID of the cluster template.

InitCustomHiveMetaDb Boolean false

A reserved parameter. You do not need to specify this parameter.

InstanceGeneration String ecs-3

The instance family. A reserved field.

IoOptimized Boolean true

Whether I/O optimization:

  • true
  • false
IsOpenPublicIp Boolean true

Specifies whether to assign a public IP address:

  • true: enable public IP address.
  • false: no public IP address is activated.
KeyPairName String test_kp

The name of the key pair.

LogEnable Boolean false

Indicates whether to enable OSS logging:

  • true
  • false
LogPath String oss//bucketname/path

The path of logs that are stored in OSS buckets.

MachineType String ECS

The instance type.

MasterNodeTotal Integer 1

The number of master nodes.

MetaStoreConf String

The configuration information of Hive Metastore.

MetaStoreType String local

The type of unified metadata.

NetType String vpc

The network type of the instance.

SecurityGroupId String sg-bp1gldj1nzq5t3b8****

The ID of the security group.

SecurityGroupName String emr_sg

The name of the security group to be created.

SoftwareInfoList List ["ZOOKEEPER"]

The information of an optional service.

SshEnable Boolean true

Indicates whether SSH is enabled:

  • true
  • false
TemplateName String template_name_2

The name of the cluster template.

UseCustomHiveMetaDb Boolean false

A reserved field.

UseLocalMetaDb Boolean true

Whether local Hive metadata is used:

  • true
  • false
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-bp1g6ftcv6p1w6h8x****

The ID of the VSwitch.

VpcId String pc-bp15pknn5td3mkc4g****

The ID of the VPC to which the read-only instance belongs.

ZoneId String cn-hangzhou-i

The zone ID of the available node.

TotalCount Integer 1

The total number of cluster templates.


Sample requests

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

Sample success responses

XML format

                <HostGroupName>Master instance group</HostGroupName>
                <HostGroupName>Core instance group</HostGroupName>

JSON format

    "TotalCount": 1,
    "RequestId": "2DAD3958-DB40-45AC-A08D-01D876AA6D04",
    "PageSize": 5,
    "PageNumber": 1,
    "TemplateInfoList": {
        "TemplateInfo": [
                "SecurityGroupName": "emr_sg",
                "BootstrapActionList": {
                    "BootstrapAction": [
                            "Path": "oss://bucket/path",
                            "Arg": "---a",
                            "Name": "create"
                "CreateSource": 2,
                "LogEnable": false,
                "GmtModified": 1601361773000,
                "HighAvailabilityEnable": false,
                "SshEnable": true,
                "IsOpenPublicIp": true,
                "TemplateName": "template_name_2",
                "UserDefinedEmrEcsRole": "AliyunEmrEcsDefaultRole",
                "NetType": "vpc",
                "SoftwareInfoList": {
                    "SoftwareInfo": []
                "UseLocalMetaDb": true,
                "KeyPairName": "test_kp",
                "IoOptimized": true,
                "ZoneId": "cn-hangzhou-i",
                "VSwitchId": "vsw-bp1g6ftcv6p1w6h8x****",
                "SecurityGroupId": "sg-bp1gldj1nzq5t3b8****",
                "DepositType": "HALF_MANAGED",
                "MachineType": "ECS",
                "MetaStoreType": "LOCAL",
                "MasterNodeTotal": 1,
                "ClusterType": "HADOOP",
                "EasEnable": false,
                "GmtCreate": 1601361773000,
                "VpcId": "vpc-bp15pknn5td3mkc4g****",
                "UserId": "125046002175****",
                "HostGroupList": {
                    "HostGroup": [
                            "HostGroupType": "MASTER",
                            "DiskType": "CLOUD_ESSD",
                            "DiskCount": 1,
                            "DiskCapacity": 80,
                            "HostGroupId": "0",
                            "NodeCount": 1,
                            "SysDiskType": "CLOUD_ESSD",
                            "ChargeType": "PostPaid",
                            "HostGroupName": "Master instance group",
                            "InstanceType": "ecs.g6.xlarge",
                            "SysDiskCapacity": 120
                            "HostGroupType": "CORE",
                            "DiskType": "CLOUD_ESSD",
                            "DiskCount": 4,
                            "DiskCapacity": 80,
                            "HostGroupId": "0",
                            "NodeCount": 2,
                            "SysDiskType": "CLOUD_ESSD",
                            "ChargeType": "PostPaid",
                            "HostGroupName": "core instance group",
                            "InstanceType": "ecs.g6.xlarge",
                            "SysDiskCapacity": 120
                "Id": "CT-53B394A1B559****",
                "ConfigList": {
                    "Config": []

Error codes

HttpCode Error code Error message Description
403 Params.Illegal The specified parameters are wrongly formed.. The error message returned because the format of the specified parameters is invalid.
403 User.OtherUserResource.NotAllow It is not allowed to operate other user's resource The error message returned because you are not authorized to manage the resources of other users.
403 Invalid.Cluster.Status Invalid cluster status %s in status list The error message returned because the specified cluster status 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 the request processing has failed due to an internal error. Submit a ticket.

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