Class: AWSCDK::RDS::SubnetGroupProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::RDS::SubnetGroupProps
- Defined in:
- rds/subnet_group_props.rb
Overview
Properties for creating a SubnetGroup.
Instance Attribute Summary collapse
-
#description ⇒ String
readonly
Description of the subnet group.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
The removal policy to apply when the subnet group are removed from the stack or replaced during an update.
-
#subnet_group_name ⇒ String?
readonly
The name of the subnet group.
-
#vpc ⇒ AWSCDK::EC2::IVPC
readonly
The VPC to place the subnet group in.
-
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
Which subnets within the VPC to associate with this group.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(description:, vpc:, removal_policy: nil, subnet_group_name: nil, vpc_subnets: nil) ⇒ SubnetGroupProps
constructor
A new instance of SubnetGroupProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(description:, vpc:, removal_policy: nil, subnet_group_name: nil, vpc_subnets: nil) ⇒ SubnetGroupProps
Returns a new instance of SubnetGroupProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'rds/subnet_group_props.rb', line 12 def initialize(description:, vpc:, removal_policy: nil, subnet_group_name: nil, vpc_subnets: nil) @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? @subnet_group_name = subnet_group_name Jsii::Type.check_type(@subnet_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subnetGroupName") unless @subnet_group_name.nil? @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil? end |
Instance Attribute Details
#description ⇒ String (readonly)
Description of the subnet group.
28 29 30 |
# File 'rds/subnet_group_props.rb', line 28 def description @description end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Note:
Default: RemovalPolicy.DESTROY
The removal policy to apply when the subnet group are removed from the stack or replaced during an update.
37 38 39 |
# File 'rds/subnet_group_props.rb', line 37 def removal_policy @removal_policy end |
#subnet_group_name ⇒ String? (readonly)
Note:
Default: - a name is generated
The name of the subnet group.
42 43 44 |
# File 'rds/subnet_group_props.rb', line 42 def subnet_group_name @subnet_group_name end |
#vpc ⇒ AWSCDK::EC2::IVPC (readonly)
The VPC to place the subnet group in.
32 33 34 |
# File 'rds/subnet_group_props.rb', line 32 def vpc @vpc end |
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Note:
Default: - private subnets
Which subnets within the VPC to associate with this group.
47 48 49 |
# File 'rds/subnet_group_props.rb', line 47 def vpc_subnets @vpc_subnets end |
Class Method Details
.jsii_properties ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'rds/subnet_group_props.rb', line 49 def self.jsii_properties { :description => "description", :vpc => "vpc", :removal_policy => "removalPolicy", :subnet_group_name => "subnetGroupName", :vpc_subnets => "vpcSubnets", } end |
Instance Method Details
#to_jsii ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 |
# File 'rds/subnet_group_props.rb', line 59 def to_jsii result = {} result.merge!({ "description" => @description, "vpc" => @vpc, "removalPolicy" => @removal_policy, "subnetGroupName" => @subnet_group_name, "vpcSubnets" => @vpc_subnets, }) result.compact end |