Class: AWSCDK::OpenSearchService::ZoneAwarenessConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
open_search_service/zone_awareness_config.rb

Overview

Specifies zone awareness configuration options.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(availability_zone_count: nil, enabled: nil) ⇒ ZoneAwarenessConfig

Returns a new instance of ZoneAwarenessConfig.

Parameters:

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

    If you enabled multiple Availability Zones (AZs), the number of AZs that you want the domain to use.

  • enabled (Boolean, nil) (defaults to: nil)

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



9
10
11
12
13
14
# File 'open_search_service/zone_awareness_config.rb', line 9

def initialize(availability_zone_count: nil, enabled: nil)
  @availability_zone_count = availability_zone_count
  Jsii::Type.check_type(@availability_zone_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "availabilityZoneCount") unless @availability_zone_count.nil?
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil?
end

Instance Attribute Details

#availability_zone_countNumeric? (readonly)

Note:

Default: - 2 if zone awareness is enabled.

If you enabled multiple Availability Zones (AZs), the number of AZs that you want the domain to use.

Valid values are 2 and 3.

Returns:

  • (Numeric, nil)


22
23
24
# File 'open_search_service/zone_awareness_config.rb', line 22

def availability_zone_count
  @availability_zone_count
end

#enabledBoolean? (readonly)

Note:

Default: - false

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

When you enable zone awareness, Amazon 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 the Amazon OpenSearch Service Developer Guide.

Returns:

  • (Boolean, nil)


35
36
37
# File 'open_search_service/zone_awareness_config.rb', line 35

def enabled
  @enabled
end

Class Method Details

.jsii_propertiesObject



37
38
39
40
41
42
# File 'open_search_service/zone_awareness_config.rb', line 37

def self.jsii_properties
  {
    :availability_zone_count => "availabilityZoneCount",
    :enabled => "enabled",
  }
end

Instance Method Details

#to_jsiiObject



44
45
46
47
48
49
50
51
# File 'open_search_service/zone_awareness_config.rb', line 44

def to_jsii
  result = {}
  result.merge!({
    "availabilityZoneCount" => @availability_zone_count,
    "enabled" => @enabled,
  })
  result.compact
end