Class: AWSCDK::Elasticsearch::CfnDomain::ElasticsearchClusterConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elasticsearch/cfn_domain.rb

Overview

The cluster configuration for the OpenSearch Service domain.

You can specify options such as the instance type and the number of instances. For more information, see Creating and managing Amazon OpenSearch Service domains in the Amazon OpenSearch Service Developer Guide .

The AWS::Elasticsearch::Domain resource is being replaced by the AWS::OpenSearchService::Domain resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see New resource types in the Amazon OpenSearch Service Developer Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cold_storage_options: nil, dedicated_master_count: nil, dedicated_master_enabled: nil, dedicated_master_type: nil, instance_count: nil, instance_type: nil, warm_count: nil, warm_enabled: nil, warm_type: nil, zone_awareness_config: nil, zone_awareness_enabled: nil) ⇒ ElasticsearchClusterConfigProperty

Returns a new instance of ElasticsearchClusterConfigProperty.

Parameters:

  • cold_storage_options (AWSCDK::IResolvable, AWSCDK::Elasticsearch::CfnDomain::ColdStorageOptionsProperty, nil) (defaults to: nil)

    Specifies cold storage options for the domain.

  • dedicated_master_count (Numeric, nil) (defaults to: nil)

    The number of instances to use for the master node.

  • dedicated_master_enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether to use a dedicated master node for the OpenSearch Service domain.

  • dedicated_master_type (String, nil) (defaults to: nil)

    The hardware configuration of the computer that hosts the dedicated master node, such as m3.medium.elasticsearch . If you specify this property, you must specify true for the DedicatedMasterEnabled property. For valid values, see Supported instance types in Amazon OpenSearch Service .

  • instance_count (Numeric, nil) (defaults to: nil)

    The number of data nodes (instances) to use in the OpenSearch Service domain.

  • instance_type (String, nil) (defaults to: nil)

    The instance type for your data nodes, such as m3.medium.elasticsearch . For valid values, see Supported instance types in Amazon OpenSearch Service .

  • warm_count (Numeric, nil) (defaults to: nil)

    The number of warm nodes in the cluster.

  • warm_enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Whether to enable warm storage for the cluster.

  • warm_type (String, nil) (defaults to: nil)

    The instance type for the cluster's warm nodes.

  • zone_awareness_config (AWSCDK::IResolvable, AWSCDK::Elasticsearch::CfnDomain::ZoneAwarenessConfigProperty, nil) (defaults to: nil)

    Specifies zone awareness configuration options.

  • zone_awareness_enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether to enable zone awareness for the OpenSearch Service domain.



1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
# File 'elasticsearch/cfn_domain.rb', line 1109

def initialize(cold_storage_options: nil, dedicated_master_count: nil, dedicated_master_enabled: nil, dedicated_master_type: nil, instance_count: nil, instance_type: nil, warm_count: nil, warm_enabled: nil, warm_type: nil, zone_awareness_config: nil, zone_awareness_enabled: nil)
  @cold_storage_options = cold_storage_options.is_a?(Hash) ? ::AWSCDK::Elasticsearch::CfnDomain::ColdStorageOptionsProperty.new(**cold_storage_options.transform_keys(&:to_sym)) : cold_storage_options
  Jsii::Type.check_type(@cold_storage_options, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljc2VhcmNoLkNmbkRvbWFpbi5Db2xkU3RvcmFnZU9wdGlvbnNQcm9wZXJ0eSJ9XX19")), "coldStorageOptions") unless @cold_storage_options.nil?
  @dedicated_master_count = dedicated_master_count
  Jsii::Type.check_type(@dedicated_master_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "dedicatedMasterCount") unless @dedicated_master_count.nil?
  @dedicated_master_enabled = dedicated_master_enabled
  Jsii::Type.check_type(@dedicated_master_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "dedicatedMasterEnabled") unless @dedicated_master_enabled.nil?
  @dedicated_master_type = dedicated_master_type
  Jsii::Type.check_type(@dedicated_master_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dedicatedMasterType") unless @dedicated_master_type.nil?
  @instance_count = instance_count
  Jsii::Type.check_type(@instance_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "instanceCount") unless @instance_count.nil?
  @instance_type = instance_type
  Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType") unless @instance_type.nil?
  @warm_count = warm_count
  Jsii::Type.check_type(@warm_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "warmCount") unless @warm_count.nil?
  @warm_enabled = warm_enabled
  Jsii::Type.check_type(@warm_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "warmEnabled") unless @warm_enabled.nil?
  @warm_type = warm_type
  Jsii::Type.check_type(@warm_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "warmType") unless @warm_type.nil?
  @zone_awareness_config = zone_awareness_config.is_a?(Hash) ? ::AWSCDK::Elasticsearch::CfnDomain::ZoneAwarenessConfigProperty.new(**zone_awareness_config.transform_keys(&:to_sym)) : zone_awareness_config
  Jsii::Type.check_type(@zone_awareness_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljc2VhcmNoLkNmbkRvbWFpbi5ab25lQXdhcmVuZXNzQ29uZmlnUHJvcGVydHkifV19fQ==")), "zoneAwarenessConfig") unless @zone_awareness_config.nil?
  @zone_awareness_enabled = zone_awareness_enabled
  Jsii::Type.check_type(@zone_awareness_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "zoneAwarenessEnabled") unless @zone_awareness_enabled.nil?
end

Instance Attribute Details

#cold_storage_optionsAWSCDK::IResolvable, ... (readonly)

Specifies cold storage options for the domain.



1138
1139
1140
# File 'elasticsearch/cfn_domain.rb', line 1138

def cold_storage_options
  @cold_storage_options
end

#dedicated_master_countNumeric? (readonly)

The number of instances to use for the master node.

If you specify this property, you must specify true for the DedicatedMasterEnabled property.



1145
1146
1147
# File 'elasticsearch/cfn_domain.rb', line 1145

def dedicated_master_count
  @dedicated_master_count
end

#dedicated_master_enabledBoolean, ... (readonly)

Indicates whether to use a dedicated master node for the OpenSearch Service domain.

A dedicated master node is a cluster node that performs cluster management tasks, but doesn't hold data or respond to data upload requests. Dedicated master nodes offload cluster management tasks to increase the stability of your search clusters. See Dedicated master nodes in Amazon OpenSearch Service .



1152
1153
1154
# File 'elasticsearch/cfn_domain.rb', line 1152

def dedicated_master_enabled
  @dedicated_master_enabled
end

#dedicated_master_typeString? (readonly)

The hardware configuration of the computer that hosts the dedicated master node, such as m3.medium.elasticsearch . If you specify this property, you must specify true for the DedicatedMasterEnabled property. For valid values, see Supported instance types in Amazon OpenSearch Service .



1157
1158
1159
# File 'elasticsearch/cfn_domain.rb', line 1157

def dedicated_master_type
  @dedicated_master_type
end

#instance_countNumeric? (readonly)

The number of data nodes (instances) to use in the OpenSearch Service domain.



1162
1163
1164
# File 'elasticsearch/cfn_domain.rb', line 1162

def instance_count
  @instance_count
end

#instance_typeString? (readonly)

The instance type for your data nodes, such as m3.medium.elasticsearch . For valid values, see Supported instance types in Amazon OpenSearch Service .



1167
1168
1169
# File 'elasticsearch/cfn_domain.rb', line 1167

def instance_type
  @instance_type
end

#warm_countNumeric? (readonly)

The number of warm nodes in the cluster.

Required if you enable warm storage.



1174
1175
1176
# File 'elasticsearch/cfn_domain.rb', line 1174

def warm_count
  @warm_count
end

#warm_enabledBoolean, ... (readonly)

Whether to enable warm storage for the cluster.



1179
1180
1181
# File 'elasticsearch/cfn_domain.rb', line 1179

def warm_enabled
  @warm_enabled
end

#warm_typeString? (readonly)

The instance type for the cluster's warm nodes.

Required if you enable warm storage.



1186
1187
1188
# File 'elasticsearch/cfn_domain.rb', line 1186

def warm_type
  @warm_type
end

#zone_awareness_configAWSCDK::IResolvable, ... (readonly)

Specifies zone awareness configuration options.

Only use if ZoneAwarenessEnabled is true .



1193
1194
1195
# File 'elasticsearch/cfn_domain.rb', line 1193

def zone_awareness_config
  @zone_awareness_config
end

#zone_awareness_enabledBoolean, ... (readonly)

Indicates whether to enable zone awareness for the OpenSearch Service domain.

When you enable zone awareness, OpenSearch Service allocates the nodes and replica index shards that belong to a cluster across two Availability Zones (AZs) in the same region to prevent data loss and minimize downtime in the event of node or data center failure. Don't enable zone awareness if your cluster has no replica index shards or is a single-node cluster. For more information, see Configuring a multi-AZ domain in Amazon OpenSearch Service .



1200
1201
1202
# File 'elasticsearch/cfn_domain.rb', line 1200

def zone_awareness_enabled
  @zone_awareness_enabled
end

Class Method Details

.jsii_propertiesObject



1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
# File 'elasticsearch/cfn_domain.rb', line 1202

def self.jsii_properties
  {
    :cold_storage_options => "coldStorageOptions",
    :dedicated_master_count => "dedicatedMasterCount",
    :dedicated_master_enabled => "dedicatedMasterEnabled",
    :dedicated_master_type => "dedicatedMasterType",
    :instance_count => "instanceCount",
    :instance_type => "instanceType",
    :warm_count => "warmCount",
    :warm_enabled => "warmEnabled",
    :warm_type => "warmType",
    :zone_awareness_config => "zoneAwarenessConfig",
    :zone_awareness_enabled => "zoneAwarenessEnabled",
  }
end

Instance Method Details

#to_jsiiObject



1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
# File 'elasticsearch/cfn_domain.rb', line 1218

def to_jsii
  result = {}
  result.merge!({
    "coldStorageOptions" => @cold_storage_options,
    "dedicatedMasterCount" => @dedicated_master_count,
    "dedicatedMasterEnabled" => @dedicated_master_enabled,
    "dedicatedMasterType" => @dedicated_master_type,
    "instanceCount" => @instance_count,
    "instanceType" => @instance_type,
    "warmCount" => @warm_count,
    "warmEnabled" => @warm_enabled,
    "warmType" => @warm_type,
    "zoneAwarenessConfig" => @zone_awareness_config,
    "zoneAwarenessEnabled" => @zone_awareness_enabled,
  })
  result.compact
end