Class: AWSCDK::RDS::ClusterEngineConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
rds/cluster_engine_config.rb

Overview

The type returned from the IClusterEngine.bindToCluster method.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(features: nil, parameter_group: nil, port: nil) ⇒ ClusterEngineConfig

Returns a new instance of ClusterEngineConfig.

Parameters:

  • features (AWSCDK::RDS::ClusterEngineFeatures, nil) (defaults to: nil)

    Features supported by the database engine.

  • parameter_group (AWSCDK::RDS::IParameterGroup, nil) (defaults to: nil)

    The ParameterGroup to use for the cluster.

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

    The port to use for this cluster, unless the customer specified the port directly.



10
11
12
13
14
15
16
17
# File 'rds/cluster_engine_config.rb', line 10

def initialize(features: nil, parameter_group: nil, port: nil)
  @features = features.is_a?(Hash) ? ::AWSCDK::RDS::ClusterEngineFeatures.new(**features.transform_keys(&:to_sym)) : features
  Jsii::Type.check_type(@features, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLkNsdXN0ZXJFbmdpbmVGZWF0dXJlcyJ9")), "features") unless @features.nil?
  @parameter_group = parameter_group
  Jsii::Type.check_type(@parameter_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLklQYXJhbWV0ZXJHcm91cCJ9")), "parameterGroup") unless @parameter_group.nil?
  @port = port
  Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil?
end

Instance Attribute Details

#featuresAWSCDK::RDS::ClusterEngineFeatures? (readonly)

Note:

Default: - no features

Features supported by the database engine.



24
25
26
# File 'rds/cluster_engine_config.rb', line 24

def features
  @features
end

#parameter_groupAWSCDK::RDS::IParameterGroup? (readonly)

Note:

Default: - no ParameterGroup will be used

The ParameterGroup to use for the cluster.



29
30
31
# File 'rds/cluster_engine_config.rb', line 29

def parameter_group
  @parameter_group
end

#portNumeric? (readonly)

Note:

Default: - use the default port for clusters (3306)

The port to use for this cluster, unless the customer specified the port directly.

Returns:

  • (Numeric, nil)


34
35
36
# File 'rds/cluster_engine_config.rb', line 34

def port
  @port
end

Class Method Details

.jsii_propertiesObject



36
37
38
39
40
41
42
# File 'rds/cluster_engine_config.rb', line 36

def self.jsii_properties
  {
    :features => "features",
    :parameter_group => "parameterGroup",
    :port => "port",
  }
end

Instance Method Details

#to_jsiiObject



44
45
46
47
48
49
50
51
52
# File 'rds/cluster_engine_config.rb', line 44

def to_jsii
  result = {}
  result.merge!({
    "features" => @features,
    "parameterGroup" => @parameter_group,
    "port" => @port,
  })
  result.compact
end