CreateInstance

Last updated: 2020-10-16 18:27:17

1. API Description

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

This API is used to create an ES cluster instance with the specified specification.

A maximum of 20 requests can be initiated per second for this API.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: es.ap-shanghai-fsi.tencentcloudapi.com

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 parameter. The value used for this API: CreateInstance.
Version Yes String Common parameter. The value used for this API: 2018-04-16.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
Zone Yes String Availability Zone
EsVersion Yes String Instance version ("5.6.4", "6.4.3", "6.8.2", or "7.5.1")
VpcId Yes String VPC ID
SubnetId Yes String Subnet ID
Password Yes String Access password, which must contain 8 to 16 characters, and include at least two 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 (_)
NodeNum No Integer This parameter has been disused. Please use NodeInfoList
Number of nodes (2-50)
ChargeType No String Billing mode
  • POSTPAID_BY_HOUR: Pay-as-you-go hourly
  • Default value: POSTPAID_BY_HOUR
    ChargePeriod No Integer This parameter is not used on the global website
    RenewFlag No String This parameter is not used on the global website
    NodeType No String This parameter has been disused. Please use NodeInfoList
    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
  • DiskType No String This parameter has been disused. Please use NodeInfoList
    Node storage type
  • CLOUD_SSD: SSD cloud storage
  • CLOUD_PREMIUM: premium cloud storage
  • Default value: CLOUD_SSD
    DiskSize No Integer This parameter has been disused. Please use NodeInfoList
    Node disk size in GB
    TimeUnit No String This parameter is not used on the global website
    AutoVoucher No Integer Whether to automatically use vouchers
  • 0: No
  • 1: Yes
  • Default value: 0
    VoucherIds.N No Array of String List of voucher IDs (only one voucher can be specified at a time currently)
    EnableDedicatedMaster No Boolean This parameter has been disused. Please use NodeInfoList
    Whether to create a dedicated primary node
  • true: yes
  • false: no
  • Default value: false
    MasterNodeNum No Integer This parameter has been disused. Please use NodeInfoList
    Number of dedicated primary nodes (only 3 and 5 are supported. This value must be passed in if EnableDedicatedMaster is true)
    MasterNodeType No String This parameter has been disused. Please use NodeInfoList
    Dedicated primary 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 This parameter has been disused. Please use NodeInfoList
    Dedicated primary 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 currently cannot be customized
    DeployMode No Integer Cluster deployment mode
  • 0: single-AZ deployment
  • 1: multi-AZ deployment
  • Default value: 0
    MultiZoneInfo.N No Array of ZoneDetail Details of AZs in multi-AZ deployment mode (which is required when DeployMode is 1)
    LicenseType No String License type
  • oss: Open Source Edition
  • basic: Basic Edition
  • platinum: Platinum Edition
  • Default value: Platinum
    NodeInfoList.N No Array of NodeInfo Node information list, which is used to describe the specification information of various types of nodes in the cluster, such as node type, node quantity, node specification, disk type, and disk size
    TagList.N No Array of TagInfo Node tag information list
    BasicSecurityType No Integer Whether to enable X-Pack security authentication in Basic Edition 6.8 (and above)
  • 1: disabled
  • 2: enabled
  • SceneType No Integer Scenario template type. 0: not enabled; 1: general; 2: log; 3: search

    3. Output Parameters

    Parameter Name Type Description
    InstanceId String Instance ID
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Creating an ES Cluster Instance

    This example shows you how to create an ES cluster instance based on the input parameters

    Input Example

    https://es.tencentcloudapi.com/?Action=CreateInstance?
    InstanceName=es_test
    &EsVersion=6.4.3
    &ChargeType=POSTPAID_BY_HOUR
    &VpcId=vpc-xxxxxx
    &SubnetId=subnet-xxxxxx
    &Zone=ap-guangzhou-3
    &Password=xxxxxx
    &NodeInfoList.0.Type=hotData
    &NodeInfoList.0.NodeNum=2
    &NodeInfoList.0.NodeType=ES.S1.SMALL2
    &NodeInfoList.0.DiskType=CLOUD_SSD
    &NodeInfoList.0.DiskSize=100
    &NodeInfoList.1.Type=dedicatedMaster
    &NodeInfoList.1.NodeNum=3
    &NodeInfoList.1.NodeType=ES.S1.SMALL2
    &<common request parameters>

    Output Example

    {
      "Response": {
        "InstanceId": "es-xxxxxx",
        "RequestId": "d7b76d5e-ad7d-4abd-b3b2-43b96dxxxxxx"
      }
    }

    5. Developer Resources

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

    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.ClusterResourceLimitError An error occurred with the cluster resource quota limit.
    FailedOperation.NoPayment No credit card or PayPal account is linked to the current account. Unable to make a payment.
    InternalError Internal error.
    InvalidParameter Invalid parameter.
    ResourceInUse Resource is in use.
    ResourceInsufficient Insufficient resource.
    ResourceInsufficient.Balance Insufficient account balance.
    ResourceInsufficient.Subnet Insufficient number of remaining subnet IPs.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help