ALIYUN::ElasticSearch::Instance is used to create an Elasticsearch cluster.

Syntax

{
  "Type": "ALIYUN::ElasticSearch::Instance",
  "Properties": {
    "KibanaWhitelist": List,
    "PublicWhitelist": List,
    "VSwitchId": String,
    "InstanceChargeType": String,
    "Period": Integer,
    "Version": String,
    "DataNode": Map,
    "PrivateWhitelist": List,
    "ResourceGroupId": String,
    "EnablePublic": Boolean,
    "Password": String,
    "MasterNode": Map,
    "Tags": List,
    "Description": String,
    "EnableKibanaPublic": Boolean,
    "YMLConfig": Map,
    "EnableKibanaPrivate": Boolean,
    "ZoneCount": Integer
  }
}

Properties

Property Type Required Editable Description Constraint
KibanaWhitelist List No Yes The IP address whitelist of Kibana. None
PublicWhitelist List No Yes The public IP address whitelist of the Elasticsearch cluster. None
VSwitchId String Yes No The ID of the vSwitch. None
InstanceChargeType String No No The billing method of the Elasticsearch cluster. Valid values:
  • PrePaid: subscription.
  • PostPaid: pay-as-you-go.
Period Integer No No The subscription duration of the Elasticsearch cluster. Valid values:
  • 1: This is the default value.
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 12
  • 24
  • 36

Unit: months.

Version String Yes No The version of the Elasticsearch cluster. Valid values:
  • 7.10_with_X-Pack
  • 6.7_with_X-Pack
  • 6.7_with_A-Pack
  • 7.7_with_X-Pack
  • 6.8_with_X-Pack
  • 6.3_with_X-Pack
  • 5.6_with_X-Pack
  • 5.5.3_with_X-Pack
ResourceGroupId String No Yes The ID of the resource group. None
EnablePublic Boolean No Yes Specifies whether to enable Internet access for the Elasticsearch cluster. Valid values:
  • true: Internet access is enabled for the Elasticsearch cluster.
  • false: Internet access is disabled for the Elasticsearch cluster. This is the default value.
DataNode Map Yes Yes The data node configurations of the Elasticsearch cluster. For more information, see DataNode properties.
PrivateWhitelist List No Yes The whitelist of IP addresses that can access the Elasticsearch cluster in a virtual private cloud (VPC). None
Password String Yes Yes The password of the Elasticsearch cluster. The password must be 8 to 32 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The supported special characters include ! @ # $ % & * ( ) _ + - =.
MasterNode Map No Yes The primary node configurations of the Elasticsearch cluster. If this parameter is specified, one or more dedicated primary nodes are created.

For more information, see MasterNode properties.

Tags List No Yes The tags of the Elasticsearch cluster. You can add up to 20 tags to an Elasticsearch cluster.

For more information, see Tags property.

Description String No Yes The description of the Elasticsearch cluster. The description must be 0 to 30 characters in length and can contain letters, digits, underscores (_), and hyphens (-). The description must start with a digit or letter.
EnableKibanaPublic Boolean No No Specifies whether to enable Internet access for Kibana. Valid values:
  • true: Internet access is enabled for Kibana.
  • false: Internet access is disabled for Kibana. This is the default value.
YMLConfig Map No No The configurations in the YAML file.

For more information, see YMLConfig properties.

EnableKibanaPrivate Boolean No No Specifies whether to enable internal network access for Kibana. Valid values:
  • true: Internal network access is enabled for Kibana.
  • false: Internal network access is disabled for Kibana. This is the default value.
ZoneCount Integer No No The number of zones in which the Elasticsearch cluster is deployed. Valid values:
  • 1: This is the default value.
  • 2
  • 3

DataNode syntax

"DataNode": {
  "Amount": Integer,
  "DiskSize": Integer,
  "Spec": String,
  "DiskType": String,
  "DiskEncryption": Boolean,
  "PerformanceLevel": String
}

DataNode properties

Property Type Required Editable Description Constraint
Amount Integer Yes Yes The number of data nodes in the Elasticsearch cluster. Valid values: 2 to 50.
DiskSize Integer Yes Yes The disk size of the data node. Valid values:
  • 20 to 6144 if the DiskType parameter is set to cloud_ssd
  • 20 to 20480 if the DiskType parameter is set to cloud_efficiency. If the data to be stored exceeds 2,048 GB, only the following valid values are supported:
    • 2560
    • 3072
    • 3584
    • 4096
    • 4608
    • 5120
    • 5632
    • 6144
    • 8192
    • 10240
    • 12288
    • 14336
    • 16384
    • 18432
    • 20480
    Note If the data to be stored exceeds 5,120 GB, the Elasticsearch version must be V6.7 or V7.X, or the Elasticsearch edition must be Advanced Edition.
  • 20 to 6144 if the DiskType parameter is set to cloud_essd

Unit: GB.

Spec String Yes Yes The specifications of the data node. None
DiskType String Yes Yes The disk type of the data node. Valid values:
  • cloud_ssd: the SSD that is suitable for online analysis and search scenarios that require high IOPS and fast response.
  • cloud_efficiency: the ultra disk that is cost-effective and suitable for scenarios such as logging and analysis of large amounts of data.
  • cloud_essd: the enhanced SSD that features low latency, fast response, and powerful data throughput. It is suitable for latency-sensitive applications or I/O-intensive business scenarios.
DiskEncryption Boolean No No Specifies whether to enable disk encryption. Valid values:
  • true: Disk encryption is enabled.
  • false: Disk encryption is disabled. This is the default value.
PerformanceLevel String No No The performance level of the enhanced SSD. This parameter is required if the DiskType parameter is set to cloud_essd. Valid values:
  • PL1
  • PL2
  • PL3

MasterNode syntax

"MasterNode": {
  "Amount": Integer,
  "DiskSize": Integer,
  "Spec": String,
  "DiskType": String
}

MasterNode properties

Property Type Required Editable Description Constraint
Amount Integer No Yes The number of primary nodes. Default value: 3.
DiskSize Integer No No The disk size of the primary node. Default value: 20.
Spec String Yes No The specifications of the primary node. None
DiskType String No No The disk type of the master node. None

Tags syntax

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags property

Property Type Required Editable Description Constraint
Key String Yes No The key of the tag. The tag key must be 1 to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with acs: or aliyun.
Value String No No The value of the tag. The tag value must be 0 to 128 characters in length and cannot contain http:// or https://. It cannot start with acs: or aliyun.

YMLConfig syntax

"YMLConfig": {
    "CreateIndex": String,
    "Watcher": String,
    "DestructiveRequiresName": Boolean,
    "AuditLog": Boolean,
    "OtherConfigs": Map
  }

YMLConfig properties

Property Type Required Editable Description Constraint
CreateIndex String No No Specifies whether to automatically create an index if a new document is uploaded to the Elasticsearch cluster but no index exists.

The corresponding field in the YAML file is action.auto_create_index.

Valid values:
  • true: The system is allowed to automatically create indexes.
  • false: The system is not allowed to automatically create indexes. This is the default value.
Watcher Boolean No No Specifies whether to enable Watcher. The corresponding field in the YAML file is xpack.watcher.enabled.

Valid values:

  • true: Watcher is enabled. If you enable Watcher, you can use the X-Pack Watcher feature. You must clear the .watcher-history* index on a regular basis to free up disk space.
  • false: Watcher is disabled. This is the default value.
DestructiveRequiresName Boolean No No Specifies whether you need to specify the index name when you delete an index. The corresponding field in the YAML file is action.destructive_requires_name.
Valid values:
  • true: You need to specify the index name when you delete an index. This is the default value.
  • false: You do not need to specify the index name when you delete an index.
If you set this parameter to false, you can use wildcards to delete multiple indexes at a time. Deleted indexes cannot be recovered. Exercise caution when you set this parameter.
AuditLog Boolean No No Specifies whether to enable audit log indexing. Valid values:
  • true: Audit log indexing is enabled. If you enable audit log indexing, the system generates audit logs for the create, delete, modify, and search operations that are performed in the Elasticsearch cluster. These logs consume disk space and affect cluster performance. Therefore, we recommend that you disable audit log indexing and exercise caution when you set this parameter.

    For more information, see Configure the Audit Log Indexing feature.

  • false: Audit log indexing is disabled. This is the default value.
Note This parameter is unavailable in Elasticsearch clusters of V7.0 or later.
OtherConfigs Map No No Other configurations. The following list provides some of the supported fields. Unless otherwise specified, these fields are available in Elasticsearch clusters of V5.X, V6.X, and V7.X.
  • Configure CORS
    • http.cors.enabled
    • http.cors.allow-origin
    • http.cors.max-age
    • http.cors.allow-methods
    • http.cors.allow-headers
    • http.cors.allow-credentials
  • Configure a remote reindex whitelist
    • reindex.remote.whitelist
  • Configure the Audit Log Indexing feature
    • xpack.security.audit.enabled
    • xpack.security.audit.index.bulk_size
    • xpack.security.audit.index.flush_interval
    • xpack.security.audit.index.rollover
    • xpack.security.audit.index.events.include
    • xpack.security.audit.index.events.exclude
    • xpack.security.audit.index.events.emit_request_body
  • Configure queue sizes
    • thread_pool.bulk.queue_size: This field is available in Elasticsearch clusters of V5.X.
    • thread_pool.write.queue_size: This field is available in Elasticsearch clusters of V6.X and V7.X.
    • thread_pool.search.queue_size
  • Configure a custom SQL plug-in
    • xpack.sql.enabled: By default, Elasticsearch clusters use the built-in SQL plug-in provided by X-Pack. If you want to upload a custom SQL plug-in to your Elasticsearch cluster, set the xpack.sql.enabled field to false.

Response parameters

Fn::GetAtt

  • Status: the status of the Elasticsearch cluster.
  • KibanaDomain: the Kibana endpoint of the Elasticsearch cluster.
  • PublicDomain: the public endpoint of the Elasticsearch cluster.
  • Domain: the internal endpoint of the Elasticsearch cluster.
  • InstanceId: the ID of the Elasticsearch cluster.
  • KibanaPort: the port number that is used to connect to the Kibana console.
  • Port: the port number that is used to connect to the Elasticsearch cluster.
  • VSwitchId: the ID of the vSwitch.
  • Version: the version of the Elasticsearch cluster.
  • InstanceChargeType: the billing method of the Elasticsearch cluster.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "MasterNode": {
      "Type": "Json",
      "Description": "The dedicated master node setting. If specified, dedicated master node will be created."
    },
    "Description": {
      "Type": "String",
      "Description": "The description of instance. It a string of 0 to 30 characters. It can contain numbers, letters, underscores, (_) and hyphens (-). It must start with a letter, a number or Chinese character.",
      "MaxLength": 30
    },
    "EnableKibanaPrivate": {
      "Type": "Boolean",
      "Description": "Enables or disables intranet access to Kibana.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "ResourceGroupId": {
      "Type": "String",
      "Description": "The ID of the resource group."
    },
    "PublicWhitelist": {
      "Type": "CommaDelimitedList",
      "Description": "Set the instance's IP whitelist in Internet. The AllocatePublicAddress should be true."
    },
    "InstanceChargeType": {
      "Type": "String",
      "Description": "Valid values are PrePaid, PostPaid, Default to PostPaid.",
      "AllowedValues": [
        "Subscription",
        "PrePaid",
        "PrePay",
        "Prepaid",
        "PayAsYouGo",
        "PostPaid",
        "PayOnDemand",
        "Postpaid"
      ],
      "Default": "PostPaid"
    },
    "EnableKibanaPublic": {
      "Type": "Boolean",
      "Description": "Enables or disables Internet access to Kibana.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "The ID of VSwitch."
    },
    "Period": {
      "Type": "Number",
      "Description": "The duration that you will buy Elasticsearch instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.",
      "AllowedValues": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        12,
        24,
        36
      ],
      "Default": 1
    },
    "EnablePublic": {
      "Type": "Boolean",
      "Description": "Whether enable public access. If properties is true, will allocate public address.Default: false.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "PrivateWhitelist": {
      "Type": "CommaDelimitedList",
      "Description": "Set the instance's IP whitelist in VPC network."
    },
    "Version": {
      "Type": "String",
      "Description": "Elasticsearch version. Supported values: 5.5.3_with_X-Pack, 6.3_with_X-Pack, 6.7_with_X-Pack, 7.4_with_X-Pack, 6.8, 7.4, 7.7 and so on."
    },
    "DataNode": {
      "Type": "Json",
      "Description": "The Elasticsearch cluster's data node setting."
    },
    "KibanaWhitelist": {
      "Type": "CommaDelimitedList",
      "Description": "Set the Kibana's IP whitelist in internet network."
    },
    "YMLConfig": {
      "Type": "Json",
      "Description": "In the YML Configuration section of the Cluster \nConfiguration page of your Alibaba Cloud Elasticsearch cluster, \nyou can enable the Auto Indexing, Audit Log Indexing, or Watcher feature."
    },
    "Tags": {
      "Type": "Json",
      "Description": "Tags to attach to instance. Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.",
      "MaxLength": 20
    },
    "ZoneCount": {
      "Type": "Number",
      "AllowedValues": [
        1,
        2,
        3
      ]
    },
    "Password": {
      "Type": "String",
      "Description": "The password of the instance. The password can be 8 to 32 characters in length and must contain three of the following conditions: uppercase letters, lowercase letters, numbers, and special characters (!@#$%*()_+-=)."
    }
  },
  "Resources": {
    "Instance": {
      "Type": "ALIYUN::ElasticSearch::Instance",
      "Properties": {
        "MasterNode": {
          "Ref": "MasterNode"
        },
        "Description": {
          "Ref": "Description"
        },
        "EnableKibanaPrivate": {
          "Ref": "EnableKibanaPrivate"
        },
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "PublicWhitelist": {
          "Ref": "PublicWhitelist"
        },
        "InstanceChargeType": {
          "Ref": "InstanceChargeType"
        },
        "EnableKibanaPublic": {
          "Ref": "EnableKibanaPublic"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "Period": {
          "Ref": "Period"
        },
        "EnablePublic": {
          "Ref": "EnablePublic"
        },
        "PrivateWhitelist": {
          "Ref": "PrivateWhitelist"
        },
        "Version": {
          "Ref": "Version"
        },
        "DataNode": {
          "Ref": "DataNode"
        },
        "KibanaWhitelist": {
          "Ref": "KibanaWhitelist"
        },
        "YMLConfig": {
          "Ref": "YMLConfig"
        },
        "Tags": {
          "Ref": "Tags"
        },
        "ZoneCount": {
          "Ref": "ZoneCount"
        },
        "Password": {
          "Ref": "Password"
        }
      }
    }
  },
  "Outputs": {
    "Status": {
      "Description": "The Elasticsearch instance status. Includes active, activating, inactive. Some operations are denied when status is not active.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "Status"
        ]
      }
    },
    "Version": {
      "Description": "Elasticsearch version.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "Version"
        ]
      }
    },
    "InstanceId": {
      "Description": "The ID of the Elasticsearch instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceId"
        ]
      }
    },
    "InstanceChargeType": {
      "Description": "Instance charge type.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceChargeType"
        ]
      }
    },
    "KibanaPort": {
      "Description": "Kibana console port.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "KibanaPort"
        ]
      }
    },
    "VSwitchId": {
      "Description": "The ID of VSwitch.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "VSwitchId"
        ]
      }
    },
    "Port": {
      "Description": " Instance connection port.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "Port"
        ]
      }
    },
    "Domain": {
      "Description": "Instance connection domain (only VPC network access supported).",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "Domain"
        ]
      }
    },
    "KibanaDomain": {
      "Description": "Kibana console domain (Internet access supported).",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "KibanaDomain"
        ]
      }
    },
    "PublicDomain": {
      "Description": "Instance public connection domain.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "PublicDomain"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DataNode:
    Description: The Elasticsearch cluster's data node setting.
    Type: Json
  Description:
    Description: The description of instance. It a string of 0 to 30 characters. It
      can contain numbers, letters, underscores, (_) and hyphens (-). It must start
      with a letter, a number or Chinese character.
    MaxLength: 30
    Type: String
  EnableKibanaPrivate:
    AllowedValues:
    - 'True'
    - 'true'
    - 'False'
    - 'false'
    Description: Enables or disables intranet access to Kibana.
    Type: Boolean
  EnableKibanaPublic:
    AllowedValues:
    - 'True'
    - 'true'
    - 'False'
    - 'false'
    Description: Enables or disables Internet access to Kibana.
    Type: Boolean
  EnablePublic:
    AllowedValues:
    - 'True'
    - 'true'
    - 'False'
    - 'false'
    Description: 'Whether enable public access. If properties is true, will allocate
      public address.Default: false.'
    Type: Boolean
  InstanceChargeType:
    AllowedValues:
    - Subscription
    - PrePaid
    - PrePay
    - Prepaid
    - PayAsYouGo
    - PostPaid
    - PayOnDemand
    - Postpaid
    Default: PostPaid
    Description: Valid values are PrePaid, PostPaid, Default to PostPaid.
    Type: String
  KibanaWhitelist:
    Description: Set the Kibana's IP whitelist in internet network.
    Type: CommaDelimitedList
  MasterNode:
    Description: The dedicated master node setting. If specified, dedicated master
      node will be created.
    Type: Json
  Password:
    Description: 'The password of the instance. The password can be 8 to 32 characters
      in length and must contain three of the following conditions: uppercase letters,
      lowercase letters, numbers, and special characters (!@#$%*()_+-=).'
    Type: String
  Period:
    AllowedValues:
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    - 12
    - 24
    - 36
    Default: 1
    Description: 'The duration that you will buy Elasticsearch instance (in month).
      It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24,
      36. Default to 1.'
    Type: Number
  PrivateWhitelist:
    Description: Set the instance's IP whitelist in VPC network.
    Type: CommaDelimitedList
  PublicWhitelist:
    Description: Set the instance's IP whitelist in Internet. The AllocatePublicAddress
      should be true.
    Type: CommaDelimitedList
  ResourceGroupId:
    Description: The ID of the resource group.
    Type: String
  Tags:
    Description: Tags to attach to instance. Max support 20 tags to add during create
      instance. Each tag with two properties Key and Value, and Key is required.
    MaxLength: 20
    Type: Json
  VSwitchId:
    Description: The ID of VSwitch.
    Type: String
  Version:
    Description: 'Elasticsearch version. Supported values: 5.5.3_with_X-Pack, 6.3_with_X-Pack,
      6.7_with_X-Pack, 7.4_with_X-Pack, 6.8, 7.4, 7.7 and so on.'
    Type: String
  YMLConfig:
    Description: "In the YML Configuration section of the Cluster \nConfiguration\
      \ page of your Alibaba Cloud Elasticsearch cluster, \nyou can enable the Auto\
      \ Indexing, Audit Log Indexing, or Watcher feature."
    Type: Json
  ZoneCount:
    AllowedValues:
    - 1
    - 2
    - 3
    Type: Number
Resources:
  Instance:
    Properties:
      DataNode:
        Ref: DataNode
      Description:
        Ref: Description
      EnableKibanaPrivate:
        Ref: EnableKibanaPrivate
      EnableKibanaPublic:
        Ref: EnableKibanaPublic
      EnablePublic:
        Ref: EnablePublic
      InstanceChargeType:
        Ref: InstanceChargeType
      KibanaWhitelist:
        Ref: KibanaWhitelist
      MasterNode:
        Ref: MasterNode
      Password:
        Ref: Password
      Period:
        Ref: Period
      PrivateWhitelist:
        Ref: PrivateWhitelist
      PublicWhitelist:
        Ref: PublicWhitelist
      ResourceGroupId:
        Ref: ResourceGroupId
      Tags:
        Ref: Tags
      VSwitchId:
        Ref: VSwitchId
      Version:
        Ref: Version
      YMLConfig:
        Ref: YMLConfig
      ZoneCount:
        Ref: ZoneCount
    Type: ALIYUN::ElasticSearch::Instance
Outputs:
  Domain:
    Description: Instance connection domain (only VPC network access supported).
    Value:
      Fn::GetAtt:
      - Instance
      - Domain
  InstanceChargeType:
    Description: Instance charge type.
    Value:
      Fn::GetAtt:
      - Instance
      - InstanceChargeType
  InstanceId:
    Description: The ID of the Elasticsearch instance.
    Value:
      Fn::GetAtt:
      - Instance
      - InstanceId
  KibanaDomain:
    Description: Kibana console domain (Internet access supported).
    Value:
      Fn::GetAtt:
      - Instance
      - KibanaDomain
  KibanaPort:
    Description: Kibana console port.
    Value:
      Fn::GetAtt:
      - Instance
      - KibanaPort
  Port:
    Description: ' Instance connection port.'
    Value:
      Fn::GetAtt:
      - Instance
      - Port
  PublicDomain:
    Description: Instance public connection domain.
    Value:
      Fn::GetAtt:
      - Instance
      - PublicDomain
  Status:
    Description: The Elasticsearch instance status. Includes active, activating, inactive.
      Some operations are denied when status is not active.
    Value:
      Fn::GetAtt:
      - Instance
      - Status
  VSwitchId:
    Description: The ID of VSwitch.
    Value:
      Fn::GetAtt:
      - Instance
      - VSwitchId
  Version:
    Description: Elasticsearch version.
    Value:
      Fn::GetAtt:
      - Instance
      - Version

To view more examples, visit Instance.json and Instance.yml.