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,
    "KibanaNode": Map,
    "ZoneId": String,
    "PeriodUnit": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
KibanaWhitelistListNoYesThe IP address whitelist of Kibana. None
PublicWhitelistListNoYesThe public IP address whitelist of the Elasticsearch cluster. None
VSwitchIdStringYesNoThe ID of the vSwitch to which the Elasticsearch cluster is connected. None
InstanceChargeTypeStringNoNoThe billing method of the Elasticsearch cluster. Valid values:
  • PrePaid: subscription
  • PostPaid: pay-as-you-go
PeriodIntegerNoNoThe 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.

VersionStringYesNoThe 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
ResourceGroupIdStringNoYesThe ID of the resource group. None
EnablePublicBooleanNoYesSpecifies whether to enable Internet access for the Elasticsearch cluster. Valid values:
  • true: allows the Elasticsearch cluster to be accessed over the Internet.
  • false: does not allow the Elasticsearch cluster to be accessed over the Internet. This is the default value.
DataNodeMapYesYesThe data node configurations of the Elasticsearch cluster. For more information, see DataNode properties.
PrivateWhitelistListNoYesThe whitelist of IP addresses that can access the Elasticsearch cluster in a virtual private cloud (VPC). None
PasswordStringYesYesThe 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 password can contain the following special characters: ! @ # $ % & * ( ) _ + - =.
MasterNodeMapNoYesThe primary node configurations of the Elasticsearch cluster. If this property is set, one or more dedicated primary nodes are created.

For more information, see MasterNode properties.

TagsListNoYesThe tags of the Elasticsearch cluster. You can add up to 20 tags to an Elasticsearch cluster.

For more information, see Tags properties.

DescriptionStringNoYesThe 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 a letter.
EnableKibanaPublicBooleanNoNoSpecifies whether to enable Internet access for Kibana. Valid values:
  • true: enables Internet access for Kibana.
  • false: disables Internet access for Kibana. This is the default value.
YMLConfigMapNoNoThe configurations in the YAML file.

For more information, see YMLConfig properties.

EnableKibanaPrivateBooleanNoNoSpecifies whether to enable internal network access for Kibana. Valid values:
  • true: enables internal network access for Kibana.
  • false: disables internal network access for Kibana. This is the default value.
ZoneCountIntegerNoNoThe number of zones in which the Elasticsearch cluster is deployed. Valid values:
  • 1: This is the default value.
  • 2
  • 3
KibanaNodeMapNoNoThe configurations of dedicated Kibana nodes. None
ZoneIdStringNoNoThe zone ID of the Elasticsearch cluster. None
PeriodUnitStringNoNoThe unit of the subscription duration. Valid values:
  • Month
  • Year

DataNode syntax

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

DataNode properties

PropertyTypeRequiredEditableDescriptionConstraint
AmountIntegerYesYesThe number of data nodes in the Elasticsearch cluster. Valid values: 2 to 50.
DiskSizeIntegerYesYesThe disk size of each data node. Valid values:
  • 20 to 6144 if the DiskType property is set to cloud_ssd.
  • 20 to 20480 if the DiskType property 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 you want to store more than 5,120 GB of data, the Elasticsearch version must be V6.7 or V7.X, or the Elasticsearch edition must be Advanced Edition.
  • 20 to 6144 if the DiskType property is set to cloud_essd.

Unit: GB.

SpecStringYesYesThe specifications of each data node. None
DiskTypeStringYesYesThe disk type of each data node. Valid values:
  • cloud_ssd: SSD. This type of disk is suitable for online data analytics and searches that require high IOPS and fast responses.
  • cloud_efficiency: ultra disk. This type of disk is cost-effective and suitable for logging and analysis of large volumes of data.
  • cloud_essd: enhanced SSD (ESSD). This type of disk features low latency, fast response, and powerful data throughput. It is suitable for latency-sensitive applications or I/O-intensive business scenarios.
DiskEncryptionBooleanNoNoSpecifies whether to enable disk encryption. Valid values:
  • true: enables disk encryption.
  • false: disables disk encryption. This is the default value.
PerformanceLevelStringNoNoThe performance level of the ESSD. This property is required if the DiskType property is set to cloud_essd. Valid values:
  • PL1
  • PL2
  • PL3

MasterNode syntax

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

MasterNode properties

PropertyTypeRequiredEditableDescriptionConstraint
AmountIntegerNoYesThe number of primary nodes. Default value: 3.
DiskSizeIntegerNoNoThe disk size of each primary node. Default value: 20
SpecStringYesNoThe specifications of each primary node. None
DiskTypeStringNoNoThe disk type of each primary node. None

Tags syntax

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

Tags properties

PropertyTypeRequiredEditableDescriptionConstraint
KeyStringYesNoThe key of the tag. The tag key must be 1 to 128 characters in length and cannot contain http:// or https://. It cannot start with acs: or aliyun.
ValueStringNoNoThe 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

PropertyTypeRequiredEditableDescriptionConstraint
CreateIndexStringNoNoSpecifies whether to automatically create an index for a new document uploaded to the Elasticsearch cluster if 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.
WatcherBooleanNoNoSpecifies whether to enable Watcher. The corresponding field in the YAML file is xpack.watcher.enabled.

Valid values:

  • true: enables Watcher. 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: disables Watcher. This is the default value.
DestructiveRequiresNameBooleanNoNoSpecifies whether the index name is required 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.
Note If you set this property to false, you can use wildcards to delete multiple indexes at a time. Deleted indexes cannot be recovered. Exercise caution when you set this property.
AuditLogBooleanNoNoSpecifies whether to enable audit log indexing. Valid values:
  • true: enables audit log indexing. 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. We recommend that you disable audit log indexing. Exercise caution when you set this property.

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

  • false: disables audit log indexing. This is the default value.
Note This property is unavailable in Elasticsearch clusters of V7.0 or later.
OtherConfigsMapNoNoOther 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.

KibanaNode syntax

"KibanaNode": {
  "Spec": String
}

KibanaNode properties

PropertyTypeRequiredEditableDescriptionConstraint
SpecStringYesNoThe configuration of dedicated Kibana nodes. None

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.

Example

  • YAMLformat

    ROSTemplateFormatVersion: '2015-09-01'
    Description: Test ElasticSearch Instance
    Parameters:
      VSwitchId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    Resources:
      Instance:
        Type: ALIYUN::ElasticSearch::Instance
        Properties:
          DataNode:
            Spec: elasticsearch.sn1ne.large
            Amount: 2
            DiskSize: 20
            DiskType: cloud_essd
          InstanceChargeType: PostPaid
          Version: 7.10_with_X-Pack
          VSwitchId:
            Ref: VSwitchId
          Password: Admin@123!
    Outputs: {}                  
  • JSONformat

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Description": "Test ElasticSearch Instance",
      "Parameters": {
        "VSwitchId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId"
        }
      },
      "Resources": {
        "Instance": {
          "Type": "ALIYUN::ElasticSearch::Instance",
          "Properties": {
            "DataNode": {
              "Spec": "elasticsearch.sn1ne.large",
              "Amount": 2,
              "DiskSize": 20,
              "DiskType": "cloud_essd"
            },
            "InstanceChargeType": "PostPaid",
            "Version": "7.10_with_X-Pack",
            "VSwitchId": {
              "Ref": "VSwitchId"
            },
            "Password": "Admin@123!"
          }
        }
      },
      "Outputs": {
      }
    }

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