You can call this 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. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyClusterTemplate

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

BizId String Yes CT-4A6799A79D73****

The ID of the cluster template.

ClusterType String Yes HADOOP

The type of the cluster.

EmrVer String Yes EMR-3.15.0

The version of E-MapReduce (EMR).

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 ID of the zone.

AccessKeyId String No LTAI8ljWyu7y****

The AccessKey ID provided to you by Alibaba Cloud. This parameter identifies the user.

AutoRenew Boolean No false

Specifies whether to enable automatic renewal of the subscription for the cluster.

BootstrapAction.N.Arg String No --a

The argument that you pass into the bootstrap action.

BootstrapAction.N.Name String No action_name

The name of the bootstrap action.

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

The path where the bootstrap action script is stored.

ChargeType String No PostPaid

The billing method of the instance.

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

The key of the custom configuration item.

Config.N.ConfigValue String No 60

The value of the custom configuration item.

Config.N.Encrypt String No 0

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

Config.N.FileName String No yarn-site

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

Config.N.Replace String No 0

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

Config.N.ServiceName String No YARN

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

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 configuration items for services of the cluster. You can use a JSON file to modify service configurations before you start a cluster.

DepositType String No HALF_MANAGED

The hosting type of the cluster.

EasEnable Boolean No true

Specifies whether the cluster is a high-security cluster.

HighAvailabilityEnable Boolean No true

Specifies whether the cluster is a high-availability cluster.

HostGroup.N.AutoRenew Boolean No true

Specifies whether to enable automatic renewal for the instance in the host group.

HostGroup.N.ChargeType String No PostPaid

The billing method of the host group.

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. You do not need to specify this parameter.

HostGroup.N.CreateType String No ON_DEMAND

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

HostGroup.N.DiskCapacity Integer No 80

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

HostGroup.N.DiskCount Integer No 4

The number of data disks in the host group.

HostGroup.N.DiskType String No CLOUD_SSD

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

HostGroup.N.HostGroupId String No 0

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

HostGroup.N.HostGroupName String No Master instance group

The name of the host group.

HostGroup.N.HostGroupType String No MASTER

The type of the host group.

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

The type of the instance in the host group.

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

The types of instances in the host group. Separate each type with a comma (,).

HostGroup.N.NodeCount Integer No 4

The number of nodes in the host group.

HostGroup.N.Period Integer No 36

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

HostGroup.N.SysDiskCapacity Integer No 80

The system disk capacity of the instance in the host group.

HostGroup.N.SysDiskType String No CLOUD_SSD

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

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

The ID of the VSwitch.

InitCustomHiveMetaDb Boolean No false

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

InstanceGeneration String No ecs-3

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

IoOptimized Boolean No true

Specifies whether ECS instances are I/O optimized.

IsOpenPublicIp Boolean No true

Specifies whether to use a public IP address.

KeyPairName String No yourKeyPair****

The name of the AcccessKey pair.

LogPath String No oss//bucketname/path

The storage path of logs in Object Storage Service (OSS) buckets.

MachineType String No ECS

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

MasterPwd String No pwd

The Secure Shell (SSH) password that is used to access the master node.

MetaStoreConf String No {"dbUrl":"jdbc:mysql://yourhost:3306/instance","dbUserName":"db1","dbPassword":"pwd"}

This parameter is valid only after you set the MetaStoreType parameter to user_rds. The configurations of the user-created relational database where the metadata is stored.

MetaStoreType String No local

The storage type of metadata. Valid values: local, unified, and user_rds. The value local indicates that metadata is stored in the local cluster. The value unified indicates that metadata is stored in a unified metadatabase. The value user_rds indicates that metadata is stored in a user-created relational database.

NetType String No vpc

The type of the network.

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

The list of optional services.

Period Integer No 36

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

SecurityGroupId String No sg-bp1id7ajv83kmqwq****

The ID of the security group.

SecurityGroupName String No emr_sg

The name of the security group.

SshEnable Boolean No true

Specifies whether to enable the SSH authentication for connections.

UseCustomHiveMetaDb Boolean No false

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

UseLocalMetaDb Boolean No true

Specifies whether to use the local Hive metadatabase.

UserDefinedEmrEcsRole String No AliyunEmrEcsDefaultRole

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

VSwitchId String No vsw-bp10tvjyc77psy0z5****

The ID of the VSwitch.

VpcId String No vpc-bp1l4urd87xlh7i4b****

The ID of the VPC to which the cluster belongs.

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

<ModifyClusterTemplateResponse>
	  <RequestId>5EDD1207-5DAB-42F9-9BF9-7591286A8F3F</RequestId>
</ModifyClusterTemplateResponse>

JSON format

{
	"RequestId":"5EDD1207-5DAB-42F9-9BF9-7591286A8F3F"
}

Error codes

HTTP status code Error code Error message Description
403 Forbidden User not authorized to operate on the specified resource. The error message returned because you are not authorized to manage the specified resource. Contact the Alibaba Cloud account user for authorization.
400 ECSInfo.DiskSize.TooSmall disk size per ecs should be >= 80GB. The error message returned because the disk capacity is insufficient. Extend the disk capacity.
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 User.Account.Abnormal The User Account maybe is out of service! The error message returned because the Alibaba Cloud account is out of service.
403 Master.Pwd.Cannot.Blank Master password can not be blank when enable password! The error message returned because the password for the master node is left blank. Enter a valid password.
403 LogPath.Cannot.Blank Log path can not be blank when enable log! The error message returned because the log path is left blank. Enter a valid log path.
403 EMR.Version.Not.Exist Specified emr version [%s] does not exist in region [%s]! The error message returned because the specified EMR version does not exist. Specify a valid EMR version.
400 HighAvailability.Master.NodeCount.Not.Match HighAvailability parameter does not match the master's node count. The error message returned because the value of the HighAvailability parameter does not match the number of master nodes. A high-availability (HA) cluster requires two master nodes.
400 HighAvailability.is.not.permitted.in.this.emr.version HighAvailability parameter is not permitted in this emr version. The error message returned because the EMR version does not support HA clusters. Change the EMR version.
400 InvalidParameter.Period Invalid parameter 'period'. The error message returned because the period parameter for the subscription cluster is invalid.
400 Balance.Not.Enough Account balance is not enough! The error message returned because the balance of your Alibaba Cloud account is insufficient. An account must have a balance of at least CNY 100.
403 VSwitch.NotBelongTo.Zone VSwitchid should belong to the ZoneId! The error message returned because the specified VSwitch does not belong to the zone.
400 InsufficientBalance Your account does not have enough balance. The error message returned because the balance of your Alibaba Cloud account is insufficient. An account must have a balance of at least CNY 100.
400 Create.PrePaid.Cluster.Failed Create prepaid cluster order failed:[%s]. The error message returned because an error occurred when you created a subscription cluster.
400 ECSInfo.ECSOrder.INVALID invalid parameter format(ecsorderinfo). The error message returned because one or more parameters are invalid when you created an ECS instance.
400 Ecs.InstanceType.NotSupported Unsupported ecs instance type [%s] at zone [%s] with IO-optimized [%s] and network type [%s]. The error message returned because the specified instance type is not supported. Specify a valid instance type.
400 DiskType.Invalid Unsupported disk type [%s] at zone [%s] with IO-optimized [%s] and network type [%s]. The error message returned because the disk type is not supported. Change the disk type.
400 Unsupported.DiskType Ecs instance type [%s] does not support disk type [%]. The error message returned because the disk type is not supported.
400 Unsupported.ZoneId Zone [%s] is invalid or not supported in emr. The error message returned because EMR cannot be deployed in the specified zone. Switch to a valid zone.
400 ECSInfo.DiskSize.TooBig Disk size exceeded max value limit. The error message returned because the disk capacity exceeds the limit. Reduce the disk capacity.
400 ECSInfo.DiskCount.ExceedLimit Disk count exceeded max value limit. The error message returned because the number of disks exceeds the limit. Reduce the number of disks.
400 ECSInfo.NodeType.Unsupported the specified node type is unsupported. The error message returned because the specified node type is not supported. Change the node type.
400 Must.Specify.MasterNode master node is mandatory. The error message returned because you have not specified the master node.
400 Only.Support.One.Master Only one master node is supported in emr cluster. The error message returned because only one master node is supported in the EMR cluster.
400 Have.Orders.Wait.For.Pay Have other orders wait for pay. The error message returned because you need to pay for other orders.
400 Unsupported.IoOptimization.Option IO-optimization option [%s] is not supported at zone [%s] and network type [%s]. The error message returned because I/O optimized instances of the specified network type are not supported in the current zone.
400 Unsupported.EcsInstanceGeneration Unsupported ecs instance generation [%s] at zone [%s] with IO-optimized [%s] and network type [%s]. The error message returned because the network type in the zone does not support I/O optimized instances.
400 AuthRealNameNotPass User real name authenticate failed! The error message returned because the Alibaba Cloud account has not passed real-name verification.
403 EMR.Version.OptionSoftWare.UnSupported only emr version >= 2.0.0 support optional software. The error message returned because you cannot configure any optional software. Only EMR 2.0.0 or later versions support optional software.
403 Check.Account.Failed Verify account's registration info failed:[%s]. The error message returned because the information about the Alibaba Cloud account is incomplete and an error occurred when you verified the account. Complete the information about the account.

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