Class: AWSCDK::OpenSearchService::ZoneAwarenessConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::OpenSearchService::ZoneAwarenessConfig
- Defined in:
- open_search_service/zone_awareness_config.rb
Overview
Specifies zone awareness configuration options.
Instance Attribute Summary collapse
-
#availability_zone_count ⇒ Numeric?
readonly
If you enabled multiple Availability Zones (AZs), the number of AZs that you want the domain to use.
-
#enabled ⇒ Boolean?
readonly
Indicates whether to enable zone awareness for the Amazon OpenSearch Service domain.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(availability_zone_count: nil, enabled: nil) ⇒ ZoneAwarenessConfig
constructor
A new instance of ZoneAwarenessConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(availability_zone_count: nil, enabled: nil) ⇒ ZoneAwarenessConfig
Returns a new instance of ZoneAwarenessConfig.
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_count ⇒ Numeric? (readonly)
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.
22 23 24 |
# File 'open_search_service/zone_awareness_config.rb', line 22 def availability_zone_count @availability_zone_count end |
#enabled ⇒ Boolean? (readonly)
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.
35 36 37 |
# File 'open_search_service/zone_awareness_config.rb', line 35 def enabled @enabled end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |