Class: AWSCDK::RDS::ClusterInstanceBindOptions

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

Overview

Options for binding the instance to the cluster.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(monitoring_interval: nil, monitoring_role: nil, promotion_tier: nil, removal_policy: nil, subnet_group: nil) ⇒ ClusterInstanceBindOptions

Returns a new instance of ClusterInstanceBindOptions.

Parameters:

  • monitoring_interval (AWSCDK::Duration, nil) (defaults to: nil)

    The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances.

  • monitoring_role (AWSCDK::Interfaces::AWSIAM::IRoleRef, nil) (defaults to: nil)

    Role that will be used to manage DB instances monitoring.

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

    The promotion tier of the cluster instance.

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    The removal policy on the cluster.

  • subnet_group (AWSCDK::Interfaces::AWSRDS::IDBSubnetGroupRef, nil) (defaults to: nil)

    Existing subnet group for the cluster.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'rds/cluster_instance_bind_options.rb', line 12

def initialize(monitoring_interval: nil, monitoring_role: nil, promotion_tier: nil, removal_policy: nil, subnet_group: nil)
  @monitoring_interval = monitoring_interval
  Jsii::Type.check_type(@monitoring_interval, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "monitoringInterval") unless @monitoring_interval.nil?
  @monitoring_role = monitoring_role
  Jsii::Type.check_type(@monitoring_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifQ==")), "monitoringRole") unless @monitoring_role.nil?
  @promotion_tier = promotion_tier
  Jsii::Type.check_type(@promotion_tier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "promotionTier") unless @promotion_tier.nil?
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
  @subnet_group = subnet_group
  Jsii::Type.check_type(@subnet_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19yZHMuSURCU3VibmV0R3JvdXBSZWYifQ==")), "subnetGroup") unless @subnet_group.nil?
end

Instance Attribute Details

#monitoring_intervalAWSCDK::Duration? (readonly)

Note:

Default: no enhanced monitoring

The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances.

Returns:



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

def monitoring_interval
  @monitoring_interval
end

#monitoring_roleAWSCDK::Interfaces::AWSIAM::IRoleRef? (readonly)

Note:

Default: - A role is automatically created for you

Role that will be used to manage DB instances monitoring.



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

def monitoring_role
  @monitoring_role
end

#promotion_tierNumeric? (readonly)

Note:

Default: 2

The promotion tier of the cluster instance.

This matters more for serverlessV2 instances. If a serverless instance is in tier 0-1 then it will scale with the writer.

For provisioned instances this just determines the failover priority. If multiple instances have the same priority then one will be picked at random

Returns:

  • (Numeric, nil)


45
46
47
# File 'rds/cluster_instance_bind_options.rb', line 45

def promotion_tier
  @promotion_tier
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: - RemovalPolicy.DESTROY (cluster snapshot can restore)

The removal policy on the cluster.

Returns:



50
51
52
# File 'rds/cluster_instance_bind_options.rb', line 50

def removal_policy
  @removal_policy
end

#subnet_groupAWSCDK::Interfaces::AWSRDS::IDBSubnetGroupRef? (readonly)

Note:

Default: - cluster subnet group is used

Existing subnet group for the cluster.

This is only needed when using the isFromLegacyInstanceProps



57
58
59
# File 'rds/cluster_instance_bind_options.rb', line 57

def subnet_group
  @subnet_group
end

Class Method Details

.jsii_propertiesObject



59
60
61
62
63
64
65
66
67
# File 'rds/cluster_instance_bind_options.rb', line 59

def self.jsii_properties
  {
    :monitoring_interval => "monitoringInterval",
    :monitoring_role => "monitoringRole",
    :promotion_tier => "promotionTier",
    :removal_policy => "removalPolicy",
    :subnet_group => "subnetGroup",
  }
end

Instance Method Details

#to_jsiiObject



69
70
71
72
73
74
75
76
77
78
79
# File 'rds/cluster_instance_bind_options.rb', line 69

def to_jsii
  result = {}
  result.merge!({
    "monitoringInterval" => @monitoring_interval,
    "monitoringRole" => @monitoring_role,
    "promotionTier" => @promotion_tier,
    "removalPolicy" => @removal_policy,
    "subnetGroup" => @subnet_group,
  })
  result.compact
end