All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ElasticSearch::Instance

Last Updated:Jul 29, 2024

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,
    "InstanceCategory": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

KibanaWhitelist

List

No

Yes

The IP address whitelist of Kibana.

None.

PublicWhitelist

List

No

Yes

The IP address whitelist that allows access to the Elasticsearch cluster over the Internet.

None.

VSwitchId

String

Yes

No

The vSwitch ID.

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 (default)

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 12

  • 24

  • 36

Unit: month.

Version

String

Yes

No

The Elasticsearch version.

Valid values:

  • 7.10_with_X-Pack

  • 6.7_with_X-Pack

  • 6.7_with_X-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 the public endpoint of the Elasticsearch cluster.

Valid values:

  • true

  • false (default)

DataNode

Map

Yes

Yes

The data node configurations of the Elasticsearch cluster.

For more information, see DataNode properties.

PrivateWhitelist

List

No

Yes

The IP address whitelist that allows access to the Elasticsearch cluster over 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 following special characters are supported: ! @ # $ % & * ( ) _ + - =.

MasterNode

Map

No

Yes

The primary node configurations of the Elasticsearch cluster.

If you specify this property, dedicated primary nodes are created.

For more information, see MasterNode properties.

Tags

List

No

Yes

The tags.

You can add up to 20 tags.

For more information, see Tags properties.

Description

String

No

Yes

The description of the Elasticsearch cluster.

The description can be up to 30 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). It must start with a digit or letter.

EnableKibanaPublic

Boolean

No

No

Specifies whether to enable Internet access for Kibana.

Valid values:

  • true

  • false (default)

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

  • false (default)

ZoneCount

Integer

No

No

The number of zones where the Elasticsearch cluster resides.

Valid values:

  • 1 (default)

  • 2

  • 3

KibanaNode

Map

No

No

The configurations of the dedicated Kibana nodes.

None.

ZoneId

String

No

No

The zone ID.

None.

PeriodUnit

String

No

No

The unit of the subscription duration.

Valid values:

  • Month

  • Year

InstanceCategory

String

No

No

The edition of the Elasticsearch cluster.

Valid values:

  • x-pack: Standard Edition, or Kernel-enhanced Edition without Indexing Service and OpenStore enabled

  • IS: Kernel-enhanced Edition with Indexing Service and OpenStore enabled

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 storage space of a data node.

  • Valid values when DiskType is set to cloud_ssd: 20 to 6144.

  • Valid values when DiskType is set to cloud_efficiency: 20 to 20480. If you want to store more than 2,048 GB of data, only the following valid values are supported for DiskSize when DiskType is set to cloud_efficiency:

    • 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.

  • Valid values when DiskType is set to cloud_essd: 20 to 6144.

Unit: GB.

Spec

String

Yes

Yes

The category of the data node in the Elasticsearch cluster.

None.

DiskType

String

Yes

Yes

The disk category of the data node.

Valid values:

  • cloud_ssd: standard SSD. This category of disk is suitable for online data analytics and searches that require high IOPS and fast responses.

  • cloud_efficiency: ultra disk. This category of disk provides cost-effective storage and is suitable for logging and analysis of large volumes of data.

  • cloud_essd: Enterprise SSD (ESSD). This category of disk features low latency, fast response, and powerful data throughput and 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

  • false (default)

PerformanceLevel

String

No

No

The performance level (PL) of the ESSD.

You must specify this property when DiskType 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 storage space of the primary node.

Default value: 20.

Spec

String

Yes

No

The category of the primary node.

None.

DiskType

String

No

No

The disk category of the primary node.

None.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The tag key.

The tag key must be 1 to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Value

String

No

No

The tag value.

The tag value can be up to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

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 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

  • false (default)

Watcher

Boolean

No

No

Specifies whether to enable Watcher.

The corresponding field in the YAML file is xpack.watcher.enabled.

Valid values:

  • true: enable 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 save disk space.

  • false (default): disables Watcher.

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 (default)

  • false

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 specify this property.

AuditLog

Boolean

No

No

Specifies 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 creation, deletion, modification, and search operations that are performed in the Elasticsearch cluster. These logs consume disk space and affect performance. We recommend that you disable Audit Log Indexing. Exercise caution when you specify this property.

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

  • false (default): disables Audit Log Indexing.

Note

This property is unavailable for Elasticsearch V7.0 or later.

OtherConfigs

Map

No

No

Other configurations in the YAML file.

The following information describes specific fields supported in the YAML file. Unless otherwise specified, the fields are available for Elasticsearch 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 (available for Elasticsearch V5.X)

    • thread_pool.write.queue_size (available for Elasticsearch 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

Property

Type

Required

Editable

Description

Constraint

Spec

String

Yes

No

The category of the dedicated Kibana node.

None.

Return values

Fn::GetAtt

  • Status: the state of the Elasticsearch cluster.

  • KibanaDomain: the address of Kibana.

  • 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 of Kibana.

  • Port: the port number of the Elasticsearch cluster.

  • VSwitchId: the vSwitch ID.

  • Version: the Elasticsearch version.

  • InstanceChargeType: the billing method of the Elasticsearch cluster.

Examples

YAML format

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: {}                  

JSON format

{
  "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": {
  }
}