tencent cloud

Elasticsearch Service

CreateInstance

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

1. API Description

Domain name for API request: es.intl.tencentcloudapi.com.

Create an ES cluster instance with the specified specification.

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: CreateInstance.
Version Yes String Common Params. The value used for this API: 2018-04-16.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Zone Yes String

AZ.

EsVersion Yes String

Instance version (supported: "5.6.4", "6.4.3", "6.8.2", "7.5.1", "7.10.1")

VpcId Yes String

VPC ID

SubnetId Yes String

Subnet ID.

Password Yes String

Access password (8-16 characters, including at least two of the following: [a-z,A-Z], [0-9], and special characters in [-!@#$%&^*+=_:;,.?])

InstanceName No String

Instance name (1-50 English letters, Chinese characters, digits, hyphens -, or underscores _)

NodeNum No Integer

Abandoned. Please use NodeInfoList
Node quantity (2-50)

ChargeType No String

Billing type

  • PREPAID: prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: pay-as-you-go by hour
  • Default value: POSTPAID_BY_HOUR

    ChargePeriod No Integer

    Annual and monthly subscription duration (unit determined by the TimeUnit parameter)

    RenewFlag No String

    Auto-renewal flag

  • RENEW_FLAG_AUTO: auto renewal
  • RENEW_FLAG_MANUAL: no auto-renewal, user renews manually
  • This needs to be set when ChargeType is PREPAID. If this parameter is not passed, no automatic renewal by default for general users, and auto renewal for SVIP users

    NodeType No String

    Abandoned. Please use NodeInfoList
    Node specification

  • ES.S1.SMALL2: 1-core 2G
  • ES.S1.MEDIUM4: 2-core 4G
  • ES.S1.MEDIUM8: 2-core 8G
  • ES.S1.LARGE16: 4-core 16G
  • ES.S1.2XLARGE32: 8-core 32G
  • ES.S1.4XLARGE32: 16-core 32G
  • ES.S1.4XLARGE64: 16-core 64G
  • DiskType No String

    Abandoned. Please use NodeInfoList
    Node disk type

  • CLOUD_SSD: ssd cloud disk
  • CLOUD_PREMIUM: high-performance cloud block storage
  • CLOUD_HSSD: enhanced SSD cloud disk
  • CLOUD_BSSD: universal type SSD cloud disk
  • Default value: CLOUD_SSD

    DiskSize No Integer

    Abandoned. Please use NodeInfoList
    Node disk capacity (unit: GB)

    TimeUnit No String

    Billing duration unit (needs to be set when ChargeType is PREPAID. Default value: "m", which means month. Currently only support "m")

    AutoVoucher No Integer

    Indicates whether to use vouchers automatically

  • 0: Do not use automatically.
  • 1: Use automatically.
  • Default value: 0.

    VoucherIds.N No Array of String

    Voucher ID list. Only one voucher can be specified.

    EnableDedicatedMaster No Boolean

    Abandoned. Please use NodeInfoList
    Whether to create a dedicated master node

  • true: enable a dedicated master node
  • false: disable a dedicated master node
  • Default value: false

    MasterNodeNum No Integer

    Abandoned. Please use NodeInfoList
    Number of dedicated primary nodes (supports only 3 or 5. Required if EnableDedicatedMaster is true)

    MasterNodeType No String

    Abandoned. Please use NodeInfoList
    Dedicated primary node type (required if EnableDedicatedMaster is true)

  • ES.S1.SMALL2: 1-core 2G
  • ES.S1.MEDIUM4: 2-core 4G
  • ES.S1.MEDIUM8: 2-core 8G
  • ES.S1.LARGE16: 4-core 16G
  • ES.S1.2XLARGE32: 8-core 32G
  • ES.S1.4XLARGE32: 16-core 32G
  • ES.S1.4XLARGE64: 16-core 64G
  • MasterNodeDiskSize No Integer

    Abandoned. Please use NodeInfoList
    Dedicated primary node disk size (in GB, optional; if transmitted, it must be 50. Customization is not supported temporarily)

    ClusterNameInConf No String

    ClusterName in the cluster configuration file (system default configuration is the instance ID, customization is not supported temporarily)

    DeployMode No Integer

    Cluster deployment method

  • 0: single-AZ deployment
  • 1: multi-AZ deployment, Beijing, Shanghai, Shanghai Finance, Guangzhou, Nanjing, Hong Kong, Singapore, Frankfurt (allowlist control)
  • Default value: 0

    MultiZoneInfo.N No Array of ZoneDetail

    Detailed information of availability zones in multi-AZ deployment (required when DeployMode is 1)

    LicenseType No String

    License type

  • oss: open source edition
  • basic: basic version
  • platinum: platinum version
  • Default value: platinum

    NodeInfoList.N No Array of NodeInfo

    Node information list, for description of the specification information of various types of nodes in the cluster, such as node type, number of nodes, node specification, disk type, and disk size

    TagList.N No Array of TagInfo

    Node tag information list

    BasicSecurityType No Integer

    Whether xpack security authentication is enabled for basic version 6.8 (and above versions)

  • 1: not enabled
  • 2: enabled
  • SceneType No Integer

    Scenario template type 0: disabled 1: common 2: log 3: search

    WebNodeTypeInfo No WebNodeTypeInfo

    Visualize node configuration

    Protocol No String

    Create an https cluster. http is selected by default.

    OperationDuration No OperationDuration

    Maintenance time slot

    EnableHybridStorage No Boolean

    Whether storage-compute separation is enabled

    DiskEnhance No Integer

    Additional hard disk performance

    EnableDiagnose No Boolean

    Whether intelligent check is enabled

    EnableCosBackup No Boolean

    Whether to enable automatic backup

    CdcId No String

    cdcId, pass it when using a CDC subnet

    DisasterRecoverGroupAffinity No Integer

    Placement group affinity. Value range: [0,10]. 0 indicates disabled.

    SubProductCode No String

    Enumeration values of sub-product ID: open source edition: "sp_es_io2", basic version: "sp_es_basic", platinum version: "sp_es_platinum", enterprise edition: "sp_es_enterprise", CDC platinum version: "sp_es_CDC_platinum", Log Enhancement Edition: "sp_es_enlogging", tsearch: "sp_tsearch_io2", logstash: "sp_es_logstash". It can be empty. When it is empty, the backend maps this field based on LicenseType.

    ReadWriteMode No Integer

    Read-write separation mode: 0: not enabled; 1: local read/write separation; 2: remote read/write separation.

    EnableScheduleRecoverGroup No Boolean

    Whether the placement group has asynchronous tasks enabled

    EnableScheduleOperationDuration No EnableScheduleOperationDuration

    Maintenance time slot for enabling async tasks in a placement group

    AutoScaleDiskInfoList.N No Array of AutoScaleDiskInfo

    Auto capacity expansion parameter list

    EnableKibanaPublicAccess No String

    Whether to enable public network access to kibana. Enabled by default if not passed

    AlarmPolicyIds.N No Array of String

    Existing cloud monitoring and alarm policy ID

    3. Output Parameters

    Parameter Name Type Description
    InstanceId String

    Instance ID.

    DealName String

    Order 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 Create an ES cluster instance

    Create an ES cluster instance based on the input parameters.

    Input Example

    POST / HTTP/1.1
    Host: es.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateInstance
    <Common request parameters>
    
    {
        "EsVersion": "6.4.3",
        "VpcId": "vpc-xxxxxx",
        "NodeInfoList": [
            {
                "NodeType": "ES.S1.SMALL2",
                "NodeNum": 3,
                "Type": "dedicatedMaster"
            },
            {
                "DiskSize": 100,
                "NodeType": "ES.S1.SMALL2",
                "NodeNum": 2,
                "Type": "hotData",
                "DiskType": "CLOUD_SSD"
            }
        ],
        "Zone": "ap-guangzhou-3",
        "ChargeType": "POSTPAID_BY_HOUR",
        "SubnetId": "subnet-xxxxxx",
        "Password": "ascq23***********cjaw",
        "InstanceName": "es_test"
    }

    Output Example

    {
        "Response": {
            "InstanceId": "es-abc234",
            "RequestId": "ab",
            "DealName": "ab"
        }
    }

    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
    AuthFailure.UnAuthCreateInstance Current user is unauthorized for the create cluster instance operation. Add CAM permission.
    AuthFailure.UnAuthorizedOperation Unauthorized operation.
    FailedOperation.CdcQuotaInsufficient Insufficient resource pack quota in the availability zone.
    FailedOperation.ClusterResourceLimitError Cluster resource quota limit error.
    FailedOperation.DiskCountParamError Node disk block count parameter check failed.
    FailedOperation.NoPayment The account is not bound to a credit card or paypal and cannot pay.
    FailedOperation.NodeNumAndZoneError The number of nodes and AZ info does not meet the corresponding operational rule.
    FailedOperation.NotAuthenticated REAL_NAME_CHECK_FAIL.
    InternalError Internal error.
    InvalidParameter Parameter error.
    InvalidParameter.InvalidAutoVoucher The value of whether to automatically use a voucher AutoVoucher does not match the expectation.
    InvalidParameter.InvalidDeployMode The value of the cluster deployment method InvalidDeployMode does not match the expectation.
    InvalidParameter.InvalidDiskCount The value of the node disk count DiskCount does not match the expectation.
    InvalidParameter.InvalidDiskEncrypt The value of the node disk encryption information DiskEncrypt does not match the expectation.
    InvalidParameter.InvalidDiskEnhance Whether to enable the Enhanced ssd cloud disk DiskEnhance does not match the expectation.
    InvalidParameter.InvalidEsVersion The instance version EsVersion does not match the expectation.
    InvalidParameter.InvalidMultiZoneInfo The information of ZoneDetail in multi-AZ deployment does not meet expectations.
    InvalidParameter.InvalidNodeNum The value of NodeNum does not match the expected value.
    InvalidParameter.InvalidNodeType The value of NodeType does not match the expected value.
    InvalidParameter.InvalidOpType The value of the operation type OpType does not match the expected value.
    InvalidParameter.InvalidOperationDuration The value of the maintenance time slot OperationDuration does not match the expectation.
    InvalidParameter.InvalidRegion The Region value does not meet the expectation.
    InvalidParameter.InvalidTagList The value of the node tag information list TagList does not match the expected value.
    InvalidParameter.InvalidType The value of Type does not match the expected value.
    InvalidParameter.InvalidVoucherIds The value of the voucher ID list VoucherIds does not match the expectation.
    InvalidParameter.InvalidZone The information of the availability zone Zone does not meet expectations.
    InvalidParameterValue.ChargeType Invalid parameter value for billing type ChargeType.
    InvalidParameterValue.RenewFlag The parameter value of the auto-renewal flag RenewFlag is incorrect.
    LimitExceeded.ClusterNum The number of clusters under this account exceeds the limit.
    LimitExceeded.ResourceLimit Exceed the maximum resource limit a user can possess.
    ResourceInUse The resource is occupied.
    ResourceInUse.Order Order locked.
    ResourceInsufficient Insufficient resources.
    ResourceInsufficient.Balance The account balance is insufficient.
    ResourceInsufficient.HiddenZone Insufficient resources for dedicated master nodes in hidden AZs.
    ResourceInsufficient.Subnet Insufficient remaining IPs in subnet.
    ResourceInsufficient.Zone Insufficient resources in the availability zone.
    ResourceNotFound.DiskInfoNotFound Failed to obtain disk-related resources.
    ResourceNotFound.TradeCgwNotFound Failed to obtain the billing resource.
    ResourceNotFound.VPCInfoNotFound Failed to obtain the VPC resource.
    ResourceNotFound.WhiteListNotFound Failed to obtain the allowlist resource.
    UnauthorizedOperation.UinNotInWhiteList Uin is not in the allowlist.
    UnsupportedOperation.BasicSecurityType Authentication method not supported.
    UnsupportedOperation.LicenseError The operation is not supported. The license type is incorrect.
    UnsupportedOperation.NotAgreement Sorry, you need to go to the ES console purchase page to complete confirmation and authentication before we can offer the selected Tencent Cloud service. If you have any questions regarding the confirmation process, contact us: https://www.tencentcloud.com/zh/contact-us.
    UnsupportedOperation.SingleNodeClusterNotSupport This operation is not supported for single-node instances.
    UnsupportedOperation.VPCInfoNotFound Failed to obtain the VPC resource.

    ヘルプとサポート

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

    フィードバック