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: CreateInstance. |
| 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. |
| ProductId | Yes | Integer | Product ID. Different product IDs indicate different EMR product versions. Valid values: |
| Software.N | Yes | Array of String | List of deployed components. Different EMR product IDs correspond to different optional component lists (ProductId: For details about its meaning, see the ProductId request parameter). For details about how to query optional component lists for different product versions, see Component Version. |
| SupportHA | Yes | Integer | Whether to enable high availability for the node. Valid values: |
| InstanceName | Yes | String | Instance name. |
| PayMode | Yes | Integer | Instance billing mode. Valid values: |
| TimeSpan | Yes | Integer | Instance purchase duration, which is used together with TimeUnit. |
| TimeUnit | Yes | String | Time unit for purchasing instances. 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. |
| VPCSettings | No | VPCSettings | VPC-related information configuration. This parameter can be used to specify the VPC ID, subnet ID, and so on. |
| ResourceSpec | No | NewResourceSpec | Node resource specifications. |
| COSSettings | No | COSSettings | Specifies the parameters to be set for enabling COS access. |
| Placement | No | Placement | Location of the instance. This parameter can be used to specify attributes such as the AZ and associated project of the instance. |
| SgId | No | 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. |
| PreExecutedFileSettings.N | No | Array of PreExecuteFileSettings | Bootstrap operation script settings. |
| AutoRenew | No | Integer | Whether a yearly/monthly subscription instance is automatically renewed. Valid values: |
| ClientToken | No | String | Unique random identifier, which is valid for five minutes and needs to be specified by the caller. This prevents the client from repeatedly creating resources. Example value: a9a90aa6---****-fae36063280. |
| NeedMasterWan | No | String | Whether to enable public network access for the cluster Master node. Valid values: |
| RemoteLoginAtCreate | No | Integer | Whether to enable remote public network login, that is, port 22. If SgId is passed, this parameter is invalid. |
| CheckSecurity | No | Integer | Whether the security cluster is enabled. Valid values: 0 (no) and values other than 0 (yes). |
| ExtendFsField | No | String | Specifies the external file system to be accessed. |
| 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. |
| CbsEncrypt | No | Integer | CBS encryption disk at the cluster level. Valid values: 0 (not encrypted) and 1 (encrypted). Default value: 0. |
| MetaType | No | String | Hive shared metadata database type. Valid values: |
| UnifyMetaInstanceId | No | String | EMR-MetaDB instance. |
| MetaDBInfo | No | CustomMetaInfo | Custom MetaDB information. |
| ApplicationRole | No | String | Custom application role. |
| SceneName | No | String | Scenario-based values: |
| ExternalService.N | No | Array of ExternalService | Shared component information. |
| VersionID | No | Integer | If this parameter is set to 0, MultiZone, MultiDeployStrategy, and MultiZoneSettings are disabled. If this parameter is set to 1, ResourceSpec is deprecated and MultiZoneSettings is used. |
| MultiZone | No | Boolean | true: indicates that cross-AZ deployment is enabled. It is only a user parameter for cluster creation and cannot be adjusted subsequently. |
| MultiZoneSettings.N | No | Array of MultiZoneSetting | 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 type. Valid values: mysql8/tdsql8. |
| NeedCdbAudit | No | Integer | Whether to enable audit. Valid values: 0 (no) and 1 (yes). |
| 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. |
| CbsSysEncrypt | No | Integer | Whether to enable cluster-level CBS system disk encryption. Valid values: 0 (no) and 1 (yes). |
| 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: CreateInstance
<Common request parameters>
{
"ResourceSpec": {
"MasterResourceSpec": {
"StorageType": 5,
"DiskType": "CLOUD_PREMIUM",
"Cpu": 4,
"DiskSize": 100,
"MemSize": 8192,
"RootSize": 100,
"Spec": "CVM.S2"
},
"CoreCount": 2,
"CoreResourceSpec": {
"StorageType": 5,
"DiskType": "CLOUD_PREMIUM",
"Cpu": 4,
"DiskSize": 100,
"MemSize": 8192,
"RootSize": 100,
"Spec": "CVM.S2"
},
"MasterCount": 1
},
"Placement": {
"ProjectId": 0,
"Zone": "ap-guangzhou-3"
},
"SupportHA": 0,
"TimeSpan": 3600,
"VPCSettings": {
"SubnetId": "subnet-sf1314",
"VpcId": "vpc-dfa11"
},
"LoginSettings": {
"Password": "tencent@cloud123"
},
"PayMode": 0,
"AutoRenew": 0,
"TimeUnit": "s",
"Software": [
"zookeeper-3.4.9",
"hadoop-2.8.4",
"knox-1.2.0"
],
"InstanceName": "emr test",
"ProductId": 4
}
{
"Response": {
"RequestId": "d830face-6587-4263-8ab0-56bda265787d",
"InstanceId": "emr-xxxx"
}
}
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.DuplicateOrderNotAllowed | Duplicate order. Please check the EMR console. |
| FailedOperation.GetCvmServerFailed | Failed to call the CVM service. |
| InternalError | Internal error. |
| InternalError.AccountCgwError | Internal service call exception. |
| InternalError.CamCgwError | Internal service call exception. |
| InternalError.CamError | Internal service call exception. |
| InternalError.CbsCgwError | Internal service call exception. |
| InternalError.CbsError | Internal service call exception. |
| InternalError.CdbCgwError | Internal service call exception. |
| InternalError.CdbError | Internal service call exception. |
| InternalError.CheckQuotaErr | Insufficient CVM or CBS resources, or invalid software. |
| InternalError.ConfigCgwError | Internal service call exception. |
| InternalError.CvmError | Internal service call exception. |
| InternalError.KmsError | Internal service call exception. |
| InternalError.ProjectCgwError | Internal service call exception. |
| InternalError.SgError | An exception occurred when the security group API is called. |
| InternalError.TagError | Internal service call exception. |
| InternalError.TradeCgwError | Internal service call exception. |
| InternalError.VpcCgwError | Internal service call exception. |
| InternalError.VpcError | Internal service call exception. |
| InternalError.WoodServerError | Internal service call exception. |
| InvalidParameter | Parameter error. |
| InvalidParameter.HALessMasterCount | Parameter error. |
| InvalidParameter.IncorrectCommonCount | Invalid Common node quantity. |
| InvalidParameter.IncorrectMasterCount | Invalid Master node quantity. |
| InvalidParameter.InvalidAutoRenew | Invalid auto-renewal flag. |
| InvalidParameter.InvalidClientToken | Invalid ClientToken. |
| InvalidParameter.InvalidComponent | Invalid component. |
| InvalidParameter.InvalidCoreCount | Invalid Core node quantity. |
| InvalidParameter.InvalidCosBucket | Invalid CosBucket. |
| InvalidParameter.InvalidCosFileURI | Invalid CosFileUri parameter value. |
| InvalidParameter.InvalidDiskSize | Invalid disk size. |
| InvalidParameter.InvalidExtendField | Invalid CustomConfig parameter value. |
| InvalidParameter.InvalidInstanceName | Invalid cluster name. |
| InvalidParameter.InvalidInstanceType | Invalid instance type. |
| InvalidParameter.InvalidLoadBalancer | Invalid LoadBalancerId. |
| InvalidParameter.InvalidLoginSetting | Invalid login settings. |
| InvalidParameter.InvalidMetaDataJdbcUrl | Invalid metadata database URL. |
| InvalidParameter.InvalidMetaType | Invalid metadata table type. |
| InvalidParameter.InvalidPassword | Invalid password. |
| InvalidParameter.InvalidPaymode | Invalid payment type. |
| InvalidParameter.InvalidPreExecutedFile | Invalid bootstrap operation script. |
| InvalidParameter.InvalidProductId | Invalid product ID. |
| InvalidParameter.InvalidProjectId | Invalid project ID. |
| InvalidParameter.InvalidResourceSpec | Invalid resource specifications. |
| InvalidParameter.InvalidSecuritySupport | This EMR version does not support enabling security mode. |
| InvalidParameter.InvalidSercurityGrpupId | Invalid security group ID. |
| InvalidParameter.InvalidServiceName | Invalid service name. |
| InvalidParameter.InvalidSoftDeployInfo | The InvalidSoftDeployInfo parameter is invalid or incorrect. |
| InvalidParameter.InvalidSoftInfo | The SoftInfo parameter is invalid. |
| InvalidParameter.InvalidSoftWare | Parameter error. |
| InvalidParameter.InvalidSoftWareName | Invalid software name. |
| InvalidParameter.InvalidSoftWareVersion | Invalid software version. |
| InvalidParameter.InvalidSubnetId | Invalid subnet ID. |
| InvalidParameter.InvalidSupportHA | Invalid high availability parameter. |
| InvalidParameter.InvalidTimeSpan | Invalid timespan. |
| InvalidParameter.InvalidTimeUnit | Invalid TimeUnit. |
| InvalidParameter.InvalidUnifyMeta | Invalid unified metadata database. |
| InvalidParameter.InvalidVpcId | Invalid VPC ID. |
| InvalidParameter.InvalidZone | Invalid AZ. |
| InvalidParameter.NotContainMustSelectSoftware | Invalid parameter. It does not contain required components. |
| InvalidParameter.PayModeResourceNotMatch | The payment mode does not match resources. |
| InvalidParameter.SoftwareNotInProduct | Invalid product components exist. |
| InvalidParameter.UngrantedPolicy | The policy is authorization. |
| InvalidParameter.UngrantedRole | Role not authorized. |
| InvalidParameter.ZoneResourceNotMatch | The AZ does not match resources. |
| InvalidParameterValue | Parameter value error. |
| LimitExceeded.SecurityGroupNumLimitExceeded | The number of security groups exceeds the limit. |
| MissingParameter | Missing parameter error. |
| ResourceInsufficient.DiskInsufficient | The specifications of the hard disk do not meet the requirements. |
| ResourceInsufficient.InstanceInsufficient | The node specifications are not supported or have been sold out. |
| ResourceNotFound.SubnetNotFound | The corresponding subnet cannot be found. |
| ResourceNotFound.TagsNotFound | The specified tag is not found. |
| ResourcesSoldOut | Resources have been sold out. |
| ResourcesSoldOut.CbsSoldOut | CBS resources have been sold out. |
| ResourcesSoldOut.CvmSoldOut | CVMs have been sold out. |
| UnknownParameter | Unknown parameter error. |
| UnsupportedOperation | The operation is not supported. |
フィードバック