Domain name for API request: emr.intl.tencentcloudapi.com.
This API is used to create an EMR cluster.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateCluster. |
| Version | Yes | String | Common Params. The value used for this API: 2019-01-03. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| ProductVersion | Yes | String | EMR product version name, for example, EMR-V2.3.0 (EMR 2.3.0). Currently, product version names can be queried. For details, see Product Version Name. |
| EnableSupportHAFlag | Yes | Boolean | Whether to enable high availability for the node. Valid values: |
| InstanceName | Yes | String | Instance name. |
| InstanceChargeType | Yes | String | Instance billing mode. Valid values: |
| LoginSettings | Yes | LoginSettings | Instance login settings. This parameter is used to set the login method for the purchased node, either the password or key. |
| SceneSoftwareConfig | Yes | SceneSoftwareConfig | Cluster application scenario and supported deployment component configuration. |
| InstanceChargePrepaid | No | InstanceChargePrepaid | Parameter settings related to yearly/monthly subscription. This parameter can be used to specify the purchase duration of a yearly/monthly subscription instance, whether to enable auto-renewal, and other attributes. This parameter is required if the billing mode of the specified instance is prepaid. |
| SecurityGroupIds.N | No | Array of String | ID of the security group to which the instance belongs, for example, sg-xxxxxxxx. This parameter can be obtained by calling the SecurityGroupId field in the response result of DescribeSecurityGroups. |
| ScriptBootstrapActionConfig.N | No | Array of ScriptBootstrapActionConfig | Bootstrap operation script settings. |
| ClientToken | No | String | Unique random identifier with a time-to-live of 5 minutes, which needs to be specified by the caller to prevent the client from repeatedly creating resources, for example, a9a90aa6---****-fae360632808. |
| NeedMasterWan | No | String | Whether to enable public network access for the cluster Master node. Valid values: |
| EnableRemoteLoginFlag | No | Boolean | Whether to enable remote login in the public network. (When SecurityGroupId is not empty, this parameter is invalid.) If this parameter is left empty, it is disabled by default. Valid values: |
| EnableKerberosFlag | No | Boolean | Whether to enable Kerberos authentication. It is disabled by default. Valid values: |
| CustomConf | No | String | |
| Tags.N | No | Array of Tag | List of tag descriptions. When this parameter is specified, tags are bound to the corresponding instance. |
| DisasterRecoverGroupIds.N | No | Array of String | List of dispersed placement group IDs. Currently, only one ID can be specified. |
| EnableCbsEncryptFlag | No | Boolean | Whether to enable cluster-level CBS encryption. It is not encrypted by default. Valid values: |
| MetaDBInfo | No | CustomMetaDBInfo | MetaDB information. When MetaType is set to EMR_NEW_META, MetaDataJdbcUrl, MetaDataUser, MetaDataPass, and UnifyMetaInstanceId can be left empty. |
| DependService.N | No | Array of DependService | Shared component information. |
| ZoneResourceConfiguration.N | No | Array of ZoneResourceConfiguration | Specifications of node resources. Set one for each AZ. The first is the primary AZ, the second is the secondary AZ, and the third is the arbitration AZ. If cross-AZ is disabled, the length only needs to be 1. |
| CosBucket | No | String | COS bucket path, which is used when a StarRocks compute-storage separation cluster is created. |
| NodeMarks.N | No | Array of NodeMark | Node flag information, which is currently only provided for the Terraform platform. |
| LoadBalancerId | No | String | clb id |
| DefaultMetaVersion | No | String | Database version. Valid values: mysql8/tdsql8/mysql5. |
| NeedCdbAudit | No | Integer | Whether database audit is enabled. |
| SgIP | No | String | Source IP address, which is specified in the security group. |
| PartitionNumber | No | Integer | Partition of a partition placement group. |
| WebUiVersion | No | Integer | Service UI address. Enumeration values:
Default value: 0. |
| EnableCbsSysEncryptFlag | No | Boolean | Whether the system disk is encrypted. |
| MetaDBGroupInfo.N | No | Array of CustomMetaDBInfo | Custom MetaDB data. |
| Parameter Name | Type | Description |
|---|---|---|
| InstanceId | String | Instance ID. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: emr.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateCluster
<Common request parameters>
{
"EnableKerberosFlag": false,
"SceneSoftwareConfig": {
"SceneName": "Hadoop-Default",
"Software": [
"hdfs-3.2.2",
"yarn-3.2.2",
"zookeeper-3.6.3",
"openldap-2.4.44",
"knox-1.6.1",
"hive-3.1.3"
]
},
"MetaDBInfo": {
"MetaType": "EMR_DEFAULT_META"
},
"NeedMasterWan": "NEED_MASTER_WAN",
"EnableCbsEncryptFlag": false,
"LoginSettings": {
"Password": "xxxxxxx"
},
"SecurityGroupIds": [
"sg-xxx"
],
"InstanceChargeType": "POSTPAID_BY_HOUR",
"ProductVersion": "EMR-V3.5.0",
"ClientToken": "fasdlfhaldfhdlahfd4134322",
"EnableRemoteLoginFlag": true,
"InstanceChargePrepaid": {
"RenewFlag": true,
"Period": 1
},
"InstanceName": "EMR350-JH6",
"EnableSupportHAFlag": false,
"ZoneResourceConfiguration": [
{
"VirtualPrivateCloud": {
"SubnetId": "subnet-xxx",
"VpcId": "vpc-1df1dafd"
},
"AllNodeResourceSpec": {
"MasterResourceSpec": {
"SystemDisk": [
{
"Count": 1,
"DiskSize": 50,
"DiskType": "CLOUD_HSSD"
}
],
"DataDisk": [
{
"Count": 1,
"DiskSize": 100,
"DiskType": "CLOUD_SSD"
}
],
"LocalDataDisk": [],
"InstanceType": "S6.2XLARGE32",
"Tags": []
},
"CoreCount": 2,
"CoreResourceSpec": {
"SystemDisk": [
{
"Count": 1,
"DiskSize": 50,
"DiskType": "CLOUD_SSD"
}
],
"DataDisk": [
{
"Count": 1,
"DiskSize": 300,
"DiskType": "CLOUD_TSSD"
}
],
"LocalDataDisk": [],
"InstanceType": "SA4.8XLARGE64",
"Tags": []
},
"TaskCount": 0,
"CommonCount": 0,
"MasterCount": 1
},
"Placement": {
"ProjectId": 0,
"Zone": "ap-guangzhou-7"
}
}
]
}
{
"Response": {
"InstanceId": "emr-rx5",
"RequestId": "fsafa-232"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| FailedOperation.GetCvmServerFailed | Failed to call the CVM service. |
| InternalError.CdbError | Internal service call exception. |
| InternalError.CvmError | Internal service call exception. |
| InternalError.TradeCgwError | Internal service call exception. |
| InvalidParameter.HALessMasterCount | Parameter error. |
| InvalidParameter.IncorrectMasterCount | Invalid Master node quantity. |
| InvalidParameter.InvalidAllNodeResourceSpec | Invalid AllNodeResourceSpec parameter. |
| InvalidParameter.InvalidComponent | Invalid component. |
| InvalidParameter.InvalidCoreCount | Invalid Core node quantity. |
| InvalidParameter.InvalidCoreDiskType | Parameter error. |
| InvalidParameter.InvalidCosBucket | Invalid CosBucket. |
| InvalidParameter.InvalidDependServiceAndEnableKerberosConflict | The DependService and EnableKerberos parameters conflict. |
| InvalidParameter.InvalidDiskNum | Number of invalid disks. |
| InvalidParameter.InvalidInstanceChargeType | Illegal instance billing mode. |
| InvalidParameter.InvalidInstanceType | Invalid instance type. |
| InvalidParameter.InvalidLoadBalancer | Invalid LoadBalancerId. |
| InvalidParameter.InvalidMasterDiskType | Parameter error. |
| InvalidParameter.InvalidMetaType | Invalid metadata table type. |
| InvalidParameter.InvalidPassword | Invalid password. |
| InvalidParameter.InvalidProductVersion | Invalid product version. |
| InvalidParameter.InvalidRenewFlag | Illegal auto-renewal flag. |
| InvalidParameter.InvalidResourceSpec | Invalid resource specifications. |
| InvalidParameter.InvalidScriptBootstrapActionConfig | Invalid bootstrap script execution parameters. |
| InvalidParameter.InvalidSoftInfo | The SoftInfo parameter is invalid. |
| InvalidParameter.InvalidZone | Invalid AZ. |
| InvalidParameter.KerberosSupport | Invalid Kerberos support flag. |
| ResourceInsufficient.InstanceInsufficient | The node specifications are not supported or have been sold out. |
| ResourceNotFound.SubnetNotFound | The corresponding subnet cannot be found. |
| ResourcesSoldOut.CvmSoldOut | CVMs have been sold out. |
文档反馈