Class: AWSCDK::OpenSearchService::CapacityConfig

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

Overview

Configures the capacity of the cluster such as the instance type and the number of instances.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_node_instance_type: nil, data_nodes: nil, master_node_instance_type: nil, master_nodes: nil, multi_az_with_standby_enabled: nil, node_options: nil, warm_instance_type: nil, warm_nodes: nil) ⇒ CapacityConfig

Returns a new instance of CapacityConfig.

Parameters:

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

    The instance type for your data nodes, such as m3.medium.search. For valid values, see Supported Instance Types in the Amazon OpenSearch Service Developer Guide.

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

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

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

    The hardware configuration of the computer that hosts the dedicated master node, such as m3.medium.search. For valid values, see Supported Instance Types in the Amazon OpenSearch Service Developer Guide.

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

    The number of instances to use for the master node.

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

    Indicates whether Multi-AZ with Standby deployment option is enabled.

  • node_options (Array<AWSCDK::OpenSearchService::NodeOptions>, nil) (defaults to: nil)

    Additional node options for the domain.

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

    The instance type for your UltraWarm node, such as ultrawarm1.medium.search. For valid values, see UltraWarm Storage Limits in the Amazon OpenSearch Service Developer Guide.

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

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



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'open_search_service/capacity_config.rb', line 15

def initialize(data_node_instance_type: nil, data_nodes: nil, master_node_instance_type: nil, master_nodes: nil, multi_az_with_standby_enabled: nil, node_options: nil, warm_instance_type: nil, warm_nodes: nil)
  @data_node_instance_type = data_node_instance_type
  Jsii::Type.check_type(@data_node_instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dataNodeInstanceType") unless @data_node_instance_type.nil?
  @data_nodes = data_nodes
  Jsii::Type.check_type(@data_nodes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "dataNodes") unless @data_nodes.nil?
  @master_node_instance_type = master_node_instance_type
  Jsii::Type.check_type(@master_node_instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "masterNodeInstanceType") unless @master_node_instance_type.nil?
  @master_nodes = master_nodes
  Jsii::Type.check_type(@master_nodes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "masterNodes") unless @master_nodes.nil?
  @multi_az_with_standby_enabled = multi_az_with_standby_enabled
  Jsii::Type.check_type(@multi_az_with_standby_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "multiAzWithStandbyEnabled") unless @multi_az_with_standby_enabled.nil?
  @node_options = node_options.is_a?(Array) ? node_options.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::OpenSearchService::NodeOptions.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : node_options
  Jsii::Type.check_type(@node_options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vcGVuc2VhcmNoc2VydmljZS5Ob2RlT3B0aW9ucyJ9LCJraW5kIjoiYXJyYXkifX0=")), "nodeOptions") unless @node_options.nil?
  @warm_instance_type = warm_instance_type
  Jsii::Type.check_type(@warm_instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "warmInstanceType") unless @warm_instance_type.nil?
  @warm_nodes = warm_nodes
  Jsii::Type.check_type(@warm_nodes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "warmNodes") unless @warm_nodes.nil?
end

Instance Attribute Details

#data_node_instance_typeString? (readonly)

Note:

Default: - r5.large.search

The instance type for your data nodes, such as m3.medium.search. For valid values, see Supported Instance Types in the Amazon OpenSearch Service Developer Guide.

Returns:

  • (String, nil)


38
39
40
# File 'open_search_service/capacity_config.rb', line 38

def data_node_instance_type
  @data_node_instance_type
end

#data_nodesNumeric? (readonly)

Note:

Default: - 1

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

Returns:

  • (Numeric, nil)


43
44
45
# File 'open_search_service/capacity_config.rb', line 43

def data_nodes
  @data_nodes
end

#master_node_instance_typeString? (readonly)

Note:

Default: - r5.large.search

The hardware configuration of the computer that hosts the dedicated master node, such as m3.medium.search. For valid values, see Supported Instance Types in the Amazon OpenSearch Service Developer Guide.

Returns:

  • (String, nil)


48
49
50
# File 'open_search_service/capacity_config.rb', line 48

def master_node_instance_type
  @master_node_instance_type
end

#master_nodesNumeric? (readonly)

Note:

Default: - no dedicated master nodes

The number of instances to use for the master node.

Returns:

  • (Numeric, nil)


53
54
55
# File 'open_search_service/capacity_config.rb', line 53

def master_nodes
  @master_nodes
end

#multi_az_with_standby_enabledBoolean? (readonly)

Note:

Default: - multi-az with standby if the feature flag ENABLE_OPENSEARCH_MULTIAZ_WITH_STANDBY is true, no multi-az with standby otherwise

Indicates whether Multi-AZ with Standby deployment option is enabled.

For more information, see Multi-AZ with Standby

Returns:

  • (Boolean, nil)


61
62
63
# File 'open_search_service/capacity_config.rb', line 61

def multi_az_with_standby_enabled
  @multi_az_with_standby_enabled
end

#node_optionsArray<AWSCDK::OpenSearchService::NodeOptions>? (readonly)

Note:

Default: - no additional node options

Additional node options for the domain.



66
67
68
# File 'open_search_service/capacity_config.rb', line 66

def node_options
  @node_options
end

#warm_instance_typeString? (readonly)

Note:

Default: - ultrawarm1.medium.search

The instance type for your UltraWarm node, such as ultrawarm1.medium.search. For valid values, see UltraWarm Storage Limits in the Amazon OpenSearch Service Developer Guide.

Returns:

  • (String, nil)


71
72
73
# File 'open_search_service/capacity_config.rb', line 71

def warm_instance_type
  @warm_instance_type
end

#warm_nodesNumeric? (readonly)

Note:

Default: - no UltraWarm nodes

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

Returns:

  • (Numeric, nil)


76
77
78
# File 'open_search_service/capacity_config.rb', line 76

def warm_nodes
  @warm_nodes
end

Class Method Details

.jsii_propertiesObject



78
79
80
81
82
83
84
85
86
87
88
89
# File 'open_search_service/capacity_config.rb', line 78

def self.jsii_properties
  {
    :data_node_instance_type => "dataNodeInstanceType",
    :data_nodes => "dataNodes",
    :master_node_instance_type => "masterNodeInstanceType",
    :master_nodes => "masterNodes",
    :multi_az_with_standby_enabled => "multiAzWithStandbyEnabled",
    :node_options => "nodeOptions",
    :warm_instance_type => "warmInstanceType",
    :warm_nodes => "warmNodes",
  }
end

Instance Method Details

#to_jsiiObject



91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'open_search_service/capacity_config.rb', line 91

def to_jsii
  result = {}
  result.merge!({
    "dataNodeInstanceType" => @data_node_instance_type,
    "dataNodes" => @data_nodes,
    "masterNodeInstanceType" => @master_node_instance_type,
    "masterNodes" => @master_nodes,
    "multiAzWithStandbyEnabled" => @multi_az_with_standby_enabled,
    "nodeOptions" => @node_options,
    "warmInstanceType" => @warm_instance_type,
    "warmNodes" => @warm_nodes,
  })
  result.compact
end