Class: AWSCDK::CXAPI::VPCSubnetGroup Deprecated

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cxapi/vpc_subnet_group.rb

Overview

Deprecated.

The definition of this type has moved to @aws-cdk/cloud-assembly-api.

A group of subnets returned by the VPC provider.

The included subnets do NOT have to be symmetric!

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, subnets:, type:) ⇒ VPCSubnetGroup

Returns a new instance of VPCSubnetGroup.

Parameters:



14
15
16
17
18
19
20
21
# File 'cxapi/vpc_subnet_group.rb', line 14

def initialize(name:, subnets:, type:)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @subnets = subnets.is_a?(Array) ? subnets.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CXAPI::VPCSubnet.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : subnets
  Jsii::Type.check_type(@subnets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmN4X2FwaS5WcGNTdWJuZXQifSwia2luZCI6ImFycmF5In19")), "subnets")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jeF9hcGkuVnBjU3VibmV0R3JvdXBUeXBlIn0=")), "type")
end

Instance Attribute Details

#nameString (readonly)

The name of the subnet group, determined by looking at the tags of of the subnets that belong to it.

Returns:

  • (String)


26
27
28
# File 'cxapi/vpc_subnet_group.rb', line 26

def name
  @name
end

#subnetsArray<AWSCDK::CXAPI::VPCSubnet> (readonly)

The subnets that are part of this group.

There is no condition that the subnets have to be symmetric in the group.

Returns:



33
34
35
# File 'cxapi/vpc_subnet_group.rb', line 33

def subnets
  @subnets
end

#typeAWSCDK::CXAPI::VPCSubnetGroupType (readonly)

The type of the subnet group.



37
38
39
# File 'cxapi/vpc_subnet_group.rb', line 37

def type
  @type
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 'cxapi/vpc_subnet_group.rb', line 39

def self.jsii_properties
  {
    :name => "name",
    :subnets => "subnets",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 'cxapi/vpc_subnet_group.rb', line 47

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "subnets" => @subnets,
    "type" => @type,
  })
  result.compact
end