Last updated: 2019-12-14 13:50:07


1. API Description

API domain name:

This API creates an ES cluster instance with the specified specification.

Default API request rate limit: 20 requests/sec.

Note: This API supports financial regions. As financial regions and non-financial regions are isolated, if a financial region, such as ap-shanghai-fsi, is assigned to the common parameter Region, we recommend you include that financial region in your domain name , such as

2. Input Parameters

The following parameters are required for requesting this API, including action-specific parameters and common parameters. For more information about common parameters for all requests, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The name of this API: CreateInstance
Version Yes String Common parameter. The version of this API: 2018-04-16
Region Yes String Common parameter. For more information, see the list of regions supported by the product.
Zone Yes String Availability zone
NodeNum Yes Integer Number of nodes (2-50)
EsVersion Yes String Instance version ("5.6.4" or "6.4.3")
NodeType Yes String Node specification
  • ES.S1.SMALL2: 1-core 2 GB
  • ES.S1.MEDIUM4: 2-core 4 GB
  • ES.S1.MEDIUM8: 2-core 8 GB
  • ES.S1.LARGE16: 4-core 16 GB
  • ES.S1.2XLARGE32: 8-core 32 GB
  • ES.S1.4XLARGE32: 16-core 32 GB
  • ES.S1.4XLARGE64: 16-core 64 GB
  • DiskSize Yes Integer Node disk size in GB
    VpcId Yes String VPC ID
    SubnetId Yes String Subnet ID
    Password Yes String Access password, which must contain 8 to 16 characters, including at least two out of the following three types of characters: [a-z,A-Z], [0-9] and [-!@#$%&^*+=_:;,.?]
    InstanceName No String Instance name, which can contain 1 to 50 English letters, Chinese characters, digits, dashes - or underscores _
    ChargeType No String Billing method
  • PREPAID: Monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go on an hourly basis
  • POSTPAID_BY_HOUR by default
    ChargePeriod No Integer Purchased duration for monthly subscription (in the unit determined by the TimeUint parameter)
    RenewFlag Yes String Auto-renewal flag
  • RENEW_FLAG_AUTO: Auto-renewal enabled
  • RENEW_FLAG_MANUAL: Auto-renewal disabled
  • This parameter has to be set if ChargeType is PREPAID. If it is not passed in, auto-renewal is disabled for regular users and enabled for SVIP users by default
    DiskType No String Node disk type
  • CLOUD_SSD: SSD cloud disk
  • CLOUD_PREMIUM: Premium cloud disk
  • CLOUD_SSD by default
    TimeUnit No String Billing duration unit, which has to be set if ChargeType is PREPAID. The default value is "m" (month), and only "m" is supported currently
    AutoVoucher No Integer Whether to automatically use vouchers
  • 0: No
  • 1: Yes
  • 0 by default
    VoucherIds.N No Array of String List of voucher IDs (currently, only one voucher can be specified at a time)
    EnableDedicatedMaster No Boolean Whether to create a dedicated master node
  • true: Yes
  • false: No
  • false by default
    MasterNodeNum No Integer Number of dedicated master nodes (only 3 and 5 are supported. This value must be passed in if EnableDedicatedMaster is true)
    MasterNodeType No String Dedicated master node type, which must be passed in if EnableDedicatedMaster is true
  • ES.S1.SMALL2: 1-core 2 GB
  • ES.S1.MEDIUM4: 2-core 4 GB
  • ES.S1.MEDIUM8: 2-core 8 GB
  • ES.S1.LARGE16: 4-core 16 GB
  • ES.S1.2XLARGE32: 8-core 32 GB
  • ES.S1.4XLARGE32: 16-core 32 GB
  • ES.S1.4XLARGE64: 16-core 64 GB
  • MasterNodeDiskSize No Integer Dedicated master node disk size in GB, which is optional. If passed in, it can only be 50 and cannot be customized currently
    ClusterNameInConf No String ClusterName in the cluster configuration file, which is the instance ID by default and cannot be customized currently
    DeployMode No Integer Cluster deployment mode
  • 0: Single-AZ deployment
  • 1: Multi-AZ deployment
  • 0 by default
    MultiZoneInfo.N No Array of MultiZoneInfo Details of AZs in multi-AZ deployment mode, which has to be passed in if DeployMode is 1
    LicenseType No String License type
  • oss: Open Source Edition
  • basic: Basic Edition
  • platinum: Platinum Edition
  • platinum by default

    3. Output Parameters

    Parameter name Type Description
    InstanceId String Instance ID
    RequestId String The unique ID of a request, which is required for each troubleshooting case.

    4. Examples

    Example 1. Creating an ES Cluster Instance

    Create an ES cluster instance based on the input parameters

    Input Sample Code
    &<Common request parameter>

    Output Sample Code

      "Response": {
        "InstanceId": "es-qlpn5o2a",
        "RequestId": "d7b76d5e-ad7d-4abd-b3b2-43b96dd08d16"

    5. Developer Resources

    API Explorer

    This tool provides various capabilities such as online call, signature verification, SDK code generation, and quick API retrieval that significantly reduce the difficulty of using TencentCloud API.

    6. Error Codes

    The following error codes are API business logic-related. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation.NoPayment No credit card or PayPal account is bound to the current account. Unable to make a payment.
    InternalError Internal error.
    InvalidParameter Incorrect parameter.
    ResourceInUse Resource is occupied.
    ResourceInsufficient Insufficient resource.
    ResourceInsufficient.Balance Insufficient account balance.