tencent cloud

Feedback

CreateInstance

Last updated: 2023-02-13 10:21:14

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.

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 Availability Zone
EsVersion Yes String Instance version. Valid values: 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, 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
    WebNodeTypeInfo No WebNodeTypeInfo Visual node configuration
    Protocol No String Valid values: https, http (default)
    OperationDuration No OperationDuration The maintenance time slot
    EnableHybridStorage No Boolean Whether to enable the storage-computing separation feature.
    DiskEnhance No Integer Whether to enable enhanced SSD
    EnableDiagnose No Boolean Whether to enable smart inspection.

    3. Output Parameters

    Parameter Name Type Description
    InstanceId String Instance ID
    DealName String Order ID
    Note: This field may return null, indicating that no valid value was found.
    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

    POST / HTTP/1.1
    Host: es.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": "xxxxxx",
        "InstanceName": "es_test"
    }
    

    Output Example

    {
        "Response": {
            "InstanceId": "xx",
            "RequestId": "xx",
            "DealName": "xx"
        }
    }
    

    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.UnAuthorizedOperation Unauthorized operation.
    FailedOperation.ClusterResourceLimitError An error occurred with the cluster resource quota limit.
    FailedOperation.DiskCountParamError Failed to query the number of disks of the node
    FailedOperation.NoPayment No credit card or PayPal account is linked to the current account. Unable to make a payment.
    FailedOperation.NotAuthenticated Unverified user.
    InternalError Internal error.
    InvalidParameter Invalid parameter.
    ResourceInUse Resource is in use.
    ResourceInsufficient Insufficient resource.
    ResourceInsufficient.Balance Insufficient account balance.
    ResourceInsufficient.HiddenZone Dedicated master node resources in the hidden availability zone are insufficient.
    ResourceInsufficient.Subnet Insufficient number of remaining subnet IPs.