ALIYUN::ElasticSearch::Instance类型用于创建Elasticsearch实例。
语法
{
"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
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
KibanaWhitelist | List | 否 | 是 | Kibana的IP白名单列表。 | 无 |
PublicWhitelist | List | 否 | 是 | 实例的公网IP白名单列表。 | 无 |
VSwitchId | String | 是 | 否 | 交换机ID。 | 无 |
InstanceChargeType | String | 否 | 否 | 实例付费类型。 | 取值:
|
Period | Integer | 否 | 否 | 购买Elasticsearch实例的持续时间。 | 取值:
单位:月。 |
Version | String | 是 | 否 | Elasticsearch版本。 | 取值:
|
ResourceGroupId | String | 否 | 是 | 资源组ID。 | 无 |
EnablePublic | Boolean | 否 | 是 | 是否开启实例的公网地址。 | 取值:
|
DataNode | Map | 是 | 是 | Elasticsearch集群的数据节点设置。 | 更多信息,请参见DataNode属性。 |
PrivateWhitelist | List | 否 | 是 | 在专有网络中设置实例的IP白名单列表。 | 无 |
Password | String | 是 | 是 | 实例的密码。 | 长度为8~32个字符,必须同时包含大写英文字母、小写英文字母、数字和特殊字符中的三项。支持的特殊字符为:!@#$%&*()_+-= 。
|
MasterNode | Map | 否 | 是 | 主节点设置。 | 如果指定该参数,将创建专用主节点。
更多信息,请参见MasterNode属性。 |
Tags | List | 否 | 是 | 标签。 | 最多支持添加20个标签。
更多信息,请参见Tags属性。 |
Description | String | 否 | 是 | 实例的描述。 | 长度为0~30个字符,必须以英文字母、数字或汉字开头,可包含英文字母、数字、汉字、下划线(_)和短划线(-)。 |
EnableKibanaPublic | Boolean | 否 | 否 | 是否开启Kibana公网访问。 | 取值:
|
YMLConfig | Map | 否 | 否 | YAML文件配置。 |
更多信息,请参见YMLConfig属性。 |
EnableKibanaPrivate | Boolean | 否 | 否 | 是否开启Kibana私网访问。 | 取值:
|
ZoneCount | Integer | 否 | 否 | 实例的可用区个数。 | 取值:
|
KibanaNode | Map | 否 | 否 | Kibana专用节点设置。 | 无 |
ZoneId | String | 否 | 否 | 可用区ID。 | 无 |
DataNode语法
"DataNode": {
"Amount": Integer,
"DiskSize": Integer,
"Spec": String,
"DiskType": String,
"DiskEncryption": Boolean,
"PerformanceLevel": String
}
DataNode属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Amount | Integer | 是 | 是 | Elasticsearch集群的数据节点数量。 | 取值范围:2~50。 |
DiskSize | Integer | 是 | 是 | 单数据节点存储空间。 | 取值范围:
单位:GB。 |
Spec | String | 是 | 是 | Elasticsearch实例的数据节点规格。 | 无 |
DiskType | String | 是 | 是 | 数据节点磁盘类型。 | 取值:
|
DiskEncryption | Boolean | 否 | 否 | 是否开启云盘加密。 | 取值:
|
PerformanceLevel | String | 否 | 否 | ESSD云盘的性能级别。 | 当DiskType取值为cloud_essd时,该参数必选。取值:
|
MasterNode语法
"MasterNode": {
"Amount": Integer,
"DiskSize": Integer,
"Spec": String,
"DiskType": String
}
MasterNode属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Amount | Integer | 否 | 是 | 主节点数量。 | 默认值:3。 |
DiskSize | Integer | 否 | 否 | 主节点存储空间。 | 默认值:20。 |
Spec | String | 是 | 否 | 主节点规格。 | 无 |
DiskType | String | 否 | 否 | 主节点磁盘类型。 | 无 |
Tags语法
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Key | String | 是 | 否 | 标签键。 | 长度为1~128个字符,不能以aliyun 和acs: 开头,不能包含http:// 或者https:// 。
|
Value | String | 否 | 否 | 标签值。 | 长度为0~128个字符,不能以aliyun 和acs: 开头,不能包含http:// 或者https:// 。
|
YMLConfig语法
"YMLConfig": {
"CreateIndex": String,
"Watcher": String,
"DestructiveRequiresName": Boolean,
"AuditLog": Boolean,
"OtherConfigs": Map
}
YMLConfig属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
CreateIndex | String | 否 | 否 | 当Elasticsearch实例接收到新文件后,如果没有对应索引,是否允许系统自动创建索引。 |
对应的YAML文件的配置项为action.auto_create_index。 取值:
|
Watcher | Boolean | 否 | 否 | 是否开启Watcher。 | 对应的YAML文件的配置项为xpack.watcher.enabled。
取值:
|
DestructiveRequiresName | Boolean | 否 | 否 | 在删除索引时,是否需要明确指定索引名称。 | 对应的YAML文件的配置项为action.destructive_requires_name。
取值:
说明 如果选择删除或关闭时索引名称支持通配符,则可以使用通配符进行批量删除索引。索引删除后不可恢复,请谨慎使用此配置。
|
AuditLog | Boolean | 否 | 否 | 是否开启Auditlog索引。 | 取值:
说明 Elasticsearch 7.0及以上版本暂不支持配置该参数。
|
OtherConfigs | Map | 否 | 否 | 其他配置。 | 支持的部分配置项如下(以下配置项,如果没有标识Elasticsearch的适用版本,则默认兼容Elasticsearch 5.x、6.x和7.x版本):
|
KibanaNode语法
"KibanaNode": {
"Spec": String
}
KibanaNode属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Spec | String | 是 | 否 | 专用Kibana节点规范。 | 无 |
返回值
Fn::GetAtt
- Status:Elasticsearch实例的状态。
- KibanaDomain:Kibana地址。
- PublicDomain:实例的公网地址。
- Domain:实例的内网地址。
- InstanceId:Elasticsearch实例的ID。
- KibanaPort:Kibana的访问端口。
- Port:实例连接端口。
- VSwitchId:交换机ID。
- Version:实例版本。
- InstanceChargeType:实例付费类型。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "Test ElasticSearch Instance",
"Parameters": {
"DataNode": {
"Type": "Json",
"Description": "The Elasticsearch cluster's data node setting.",
"Default": {
"Amount": 3,
"DiskSize": 150,
"Spec": "elasticsearch.sn1ne.large",
"DiskType": "cloud_essd"
}
},
"InstanceChargeType": {
"Default": "PostPaid",
"Type": "String",
"Description": "Valid values are PrePaid, PostPaid, Default to PostPaid.",
"AllowedValues": [
"PrePaid",
"PostPaid"
]
},
"Version": {
"Type": "String",
"Description": "Elasticsearch version. Supported values: 5.5.3_with_X-Pack, 6.3_with_X-Pack and 6.7_with_X-Pack.",
"AllowedValues": [
"5.5.3_with_X-Pack",
"6.3_with_X-Pack",
"6.7_with_X-Pack"
]
},
"VSwitchId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"Description": "The ID of VSwitch."
},
"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": {
"DataNode": {
"Ref": "DataNode"
},
"InstanceChargeType": {
"Ref": "InstanceChargeType"
},
"Version": {
"Ref": "Version"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"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"
]
}
},
"KibanaDomain": {
"Description": "Kibana console domain (Internet access supported).",
"Value": {
"Fn::GetAtt": [
"Instance",
"KibanaDomain"
]
}
},
"Domain": {
"Description": "Instance connection domain (only VPC network access supported).",
"Value": {
"Fn::GetAtt": [
"Instance",
"Domain"
]
}
},
"InstanceId": {
"Description": "The ID of the Elasticsearch instance.",
"Value": {
"Fn::GetAtt": [
"Instance",
"InstanceId"
]
}
},
"KibanaPort": {
"Description": "Kibana console port.",
"Value": {
"Fn::GetAtt": [
"Instance",
"KibanaPort"
]
}
},
"Port": {
"Description": " Instance connection port.",
"Value": {
"Fn::GetAtt": [
"Instance",
"Port"
]
}
}
}
}