tencent cloud

Elastic MapReduce

  • Release Notes and Announcements
  • Product Introduction
  • Purchase Guide
    • EMR on CVM Billing Instructions
    • EMR on TKE Billing Instructions
    • EMR Serverless HBase Billing Instructions
    • EMR Serverless TCBase Billing Overview
  • Getting Started
  • EMR on CVM Operation Guide
    • Planning Cluster
    • Administrative rights
    • Configuring Cluster
    • Managing Cluster
    • Managing Service
    • Monitoring and Alarms
    • TCInsight
  • EMR on TKE Operation Guide
  • EMR Serverless HBase Operation Guide
  • EMR Serverless TCBase Operation Guide
  • EMR Development Guide
    • Hadoop Development Guide
    • Spark Development Guide
    • HBase Development Guide
    • Phoenix on Hbase Development Guide
    • Hive Development Guide
    • Presto Development Guide
    • Sqoop Development Guide
    • Hue Development Guide
    • Oozie Development Guide
    • Flume Development Guide
    • Kerberos Development Guide
    • Knox Development Guide
    • Alluxio Development Guide
    • Kylin Development Guide
    • Livy Development Guide
    • Kyuubi Development Guide
    • Zeppelin Development Guide
    • Hudi Development Guide
    • Superset Development Guide
    • Impala Development Guide
    • Druid Development Guide
    • TensorFlow Development Guide
    • Kudu Development Guide
    • Ranger Development Guide
    • Kafka Development Guide
    • StarRocks Development Guide
    • Flink Development Guide
    • JupyterLab Development Guide
    • MLflow Development Guide
  • Practical Tutorial
    • Practice of EMR on CVM Ops
    • Data Migration
    • Practical Tutorial on Custom Scaling
  • API Documentation
    • History
    • Introduction
    • API Category
    • Making API Requests
    • Cluster Resource Management APIs
    • Cluster Service APIs
    • User Management APIs
    • Information Query APIs
    • Information Query APIs
    • Scaling APIs
    • Configuration APIs
    • Other APIs
    • Cluster Lifecycle APIs
    • Serverless HBase APIs
    • YARN Resource Scheduling APIs
    • Data Types
    • Error Codes
  • FAQs
    • EMR on CVM
  • Service Level Agreement
  • Contact Us

CreateCluster

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-10-10 14:59:18

1. API Description

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.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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:

  • true: yes
  • false: no
  • InstanceName Yes String

    Instance name.

  • The value can contain 6 to 36 characters.
  • Only Chinese characters, letters, digits, hyphens (-), and underscores (_) are allowed.
  • InstanceChargeType Yes String

    Instance billing mode. Valid values:

  • PREPAID: prepaid, that is, yearly/monthly subscription
  • POSTPAID_BY_HOUR: pay-as-you-go on an hourly basis
  • LoginSettings Yes LoginSettings

    Instance login settings. This parameter is used to set the login method for the purchased node, either the password or key.

  • When a key is set, the password is only used to log in to the native WebUI shortcut entry for the component.
  • When no key is set, the password is used to log in to the purchased node as well as the native WebUI shortcut entry for the component.
  • 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:

  • NEED_MASTER_WAN: yes
  • NOT_NEED_MASTER_WAN: no
  • By default, public network access is enabled for the cluster Master node.
    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:

  • true: enable
  • false: disable
  • EnableKerberosFlag No Boolean

    Whether to enable Kerberos authentication. It is disabled by default. Valid values:

  • true: enabled
  • false: disabled
  • CustomConf No String

    Custom software configuration.

    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.
    This parameter can be obtained by calling the DisasterRecoverGroupId field in the response result of DescribeDisasterRecoverGroups.

    EnableCbsEncryptFlag No Boolean

    Whether to enable cluster-level CBS encryption. It is not encrypted by default. Valid values:

  • true: encrypted
  • false: not encrypted
  • MetaDBInfo No CustomMetaDBInfo

    MetaDB information. When MetaType is set to EMR_NEW_META, MetaDataJdbcUrl, MetaDataUser, MetaDataPass, and UnifyMetaInstanceId can be left empty.
    When MetaType is set to EMR_EXIT_META, set UnifyMetaInstanceId.
    When MetaType is set to USER_CUSTOM_META, set MetaDataJdbcUrl, MetaDataUser, and MetaDataPass.

    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:

    • 0: Service UI address. Only one service UI address is returned.
    • 1: Service UI address. If the service has multiple UI addresses, all results are returned, such as Impalad, StateStore, and Catalogd of Impala.

    Default value: 0.

    EnableCbsSysEncryptFlag No Boolean

    Whether the system disk is encrypted.

    MetaDBGroupInfo.N No Array of CustomMetaDBInfo

    Custom MetaDB data.

    3. Output Parameters

    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.

    4. Example

    Example1 Creating an EMR Cluster

    Input Example

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

    Output Example

    {
        "Response": {
            "InstanceId": "emr-rx5",
            "RequestId": "fsafa-232"
        }
    }

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    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.

    ヘルプとサポート

    この記事はお役に立ちましたか?

    フィードバック