You can call ModifyClusterTemplate operation to modify a cluster template.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample code.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyClusterTemplate

The operation that you want to perform. This parameter is required for API requests that you create by piecing together HTTP or HTTPS URLs. Set the value to ModifyClusterTemplate.

BizId String Yes CT-4A6799A79D73****

The ID of the cluster template.

BootstrapAction.N.Name String Yes action_name

The name of bootstrap action N.

BootstrapAction.N.Path String Yes oss://bucket/path

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

ClusterType String Yes HADOOP

The type of ACK cluster. Valid values:

Config.N.ConfigKey String Yes fs.trash.interval

The key of custom configuration item N.

Config.N.ConfigValue String Yes 60

The value of custom configuration item N.

Config.N.FileName String Yes yarn-site

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

Config.N.ServiceName String Yes YARN

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

EmrVer String Yes EMR-3.15.0

The EMR version.

HostGroup.N.DiskCapacity Integer Yes 80

The data disk capacity of host group N.

HostGroup.N.DiskCount Integer Yes 4

The number of data disks in the host group.

HostGroup.N.DiskType String Yes CLOUD_SSD

The data disk type of the instance in the host group.

HostGroup.N.HostGroupName String Yes Master Instance Group

The name of host group N.

HostGroup.N.HostGroupType String Yes MASTER

The type of host group N.

HostGroup.N.InstanceType String Yes ecs.mn4.2xlarge

The type of instances in host group N.

HostGroup.N.NodeCount Integer Yes 4

The number of nodes in host group N.

HostGroup.N.SysDiskCapacity Integer Yes 80

The system disk capacity of host group N.

HostGroup.N.SysDiskType String Yes CLOUD_SSD

The system disk type of host group N.

RegionId String Yes cn-hangzhou

The ID of the region to which the cluster belongs.

TemplateName String Yes new_template_name

The name of the cluster template.

ZoneId String Yes cn-hangzhou-b

The zone ID.

LogPath String No oss//bucketname/path

The path of logs that are stored in OSS buckets.

SecurityGroupId String No sg-bp1id7ajv83kmqwq****

The ID of the security group.

IsOpenPublicIp Boolean No true

Specifies whether to use a public IP address.

SecurityGroupName String No emr_sg

The name of the security group.

ChargeType String No PostPaid

The billing method of the host.

Period Integer No 36

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

AutoRenew Boolean No false

Specifies whether to automatically renew the subscription cluster.

VpcId String No vpc-bp1l4urd87xlh7i4b****

The ID of the VPC to which created instances belong.

VSwitchId String No vsw-bp10tvjyc77psy0z5****

The ID of the vSwitch.

NetType String No vpc

The type of the network.

UserDefinedEmrEcsRole String No AliyunEmrEcsDefaultRole

The role that is assigned to EMR to call ECS resources.

OptionSoftWareList.N RepeatList No ["ZOOKEEPER","LIVY"]

The list of optional services.

HighAvailabilityEnable Boolean No true

Specifies whether the cluster is a high-availability cluster.

UseLocalMetaDb Boolean No true

Specifies whether to use the local Hive metadatabase.

IoOptimized Boolean No true

Specifies whether to enable I/O optimization.

SshEnable Boolean No true

Specifies whether to enable the SSH authentication.

InstanceGeneration String No ecs-3

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

MasterPwd String No pwd

The SSH password that is used to access the master node.

KeyPairName String No test_kp

The name of the key pair.

MetaStoreType String No local

The type of unified metadata.

MetaStoreConf String No rdsxxx.com

The configuration information of Hive Metastore.

HostGroup.N.HostGroupId String No 0

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

HostGroup.N.ClusterId String No 0

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

HostGroup.N.Comment String No comment

A reserved parameter.

HostGroup.N.CreateType String No ON_DEMAND

A reserved parameter.

HostGroup.N.ChargeType String No PostPaid

The billing method of the host group.

HostGroup.N.Period Integer No 36

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

HostGroup.N.AutoRenew Boolean No true

Specifies whether to enable auto-renewal for host group N.

HostGroup.N.VSwitchId String No vsw-bp10tvjyc77psy0z5****

The ID of the vSwitch.

HostGroup.N.MultiInstanceTypes String No ecs.sn1.xlarge,ecs.sn2.xlarge

A list of machine models with multiple specifications, separated by commas (,).

BootstrapAction.N.Arg String No --a

The argument that you pass into bootstrap action N.

BootstrapAction.N.ExecutionTarget String No core_group

The scope of script execution. Valid values:

  • For the entire cluster, you can pass in a null value.
  • The name of the machine group.
BootstrapAction.N.ExecutionMoment String No BEFORE_INSTALL

The script execution time. Values are as follows:

  • BEFORE_INSTALL: run before the service is installed.
  • AFTER_STARTED: The task is executed after the service is started.
BootstrapAction.N.ExecutionFailStrategy String No FAILED_BLOCKED

The execution policy for failed scripts. The values are as follows:

  • FAILED_BLOCKED: the workflow is turned to manual for processing after a failure occurs.
  • FAILED_CONTINUE: continue after failure
Configurations String No [{"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.

EasEnable Boolean No true

Specifies whether the cluster is a high-security cluster.

DepositType String No HALF_MANAGED

The hosting type of the cluster.

MachineType String No ECS

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

UseCustomHiveMetaDb Boolean No false

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

InitCustomHiveMetaDb Boolean No false

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

Config.N.Encrypt String No 0

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

Config.N.Replace String No 0

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

Tag.N.Key String No TestKey

The key of Tag n of the EMR instance and ECS instance on the node. Valid values of N: 1 to 20 The tag key cannot be an empty string. Valid values of the tag key: 1 to 128. The tag key cannot start with aliyun or acs: At the beginning. It cannot contain http:// or https:// .

Tag.N.Value String No TestValue

The tag value of the EMR instance and ECS instance on the node. Valid values of N: 1 to 20. The tag value can be an empty string. The value of the tag value ranges from 1 to 128. The value cannot start with acs: At the beginning. It cannot contain http:// or https:// .

ResourceGroupId String No rg-bp67acfmxazb4p****

The ID of the enterprise resource group to which the EMR instances and ECS node instances belong.

Response parameters

Parameter Type Example Description
ClusterTemplateId String CT-4A6799A79D73****

The ID of the cluster template.

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

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ModifyClusterTemplate
&BizId=CT-4A6799A79D73****
&BootstrapAction.1.1ame=action_name
&BootstrapAction.1.Path=oss://bucket/path
&ClusterType=HADOOP
&Config.1.ConfigKey=fs.trash.interval
&Config.1.ConfigValue=60
&Config.1.FileName=yarn-site
&Config.1.ServiceName=YARN
&EmrVer=EMR-3.15.0
&HostGroup.1.HostGroupType=MASTER
&HostGroup.1.InstanceType=ecs.mn4.2xlarge
&HostGroup.1.1odeCount=4
&RegionId=cn-hangzhou
&TemplateName=new_template_name
&<common request parameters>

Sample success responses

XML format

<ClusterTemplateId>CT-4A6799A79D73****</ClusterTemplateId>
<RequestId>BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22</RequestId>

JSON Syntax

{
  "ClusterTemplateId": "CT-4A6799A79D73****",
  "RequestId":"BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22"
}