Class: AWSCDK::EC2::VPCProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/vpc_props.rb

Overview

Configuration for Vpc.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(availability_zones: nil, cidr: nil, create_internet_gateway: nil, default_instance_tenancy: nil, enable_dns_hostnames: nil, enable_dns_support: nil, flow_logs: nil, gateway_endpoints: nil, ip_addresses: nil, ip_protocol: nil, ipv6_addresses: nil, max_azs: nil, nat_gateway_provider: nil, nat_gateways: nil, nat_gateway_subnets: nil, reserved_azs: nil, restrict_default_security_group: nil, subnet_configuration: nil, vpc_name: nil, vpn_connections: nil, vpn_gateway: nil, vpn_gateway_asn: nil, vpn_route_propagation: nil) ⇒ VPCProps

Returns a new instance of VPCProps.

Parameters:

  • availability_zones (Array<String>, nil) (defaults to: nil)

    Availability zones this VPC spans.

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

    The CIDR range to use for the VPC, e.g. '10.0.0.0/16'.

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

    If set to false then disable the creation of the default internet gateway.

  • default_instance_tenancy (AWSCDK::EC2::DefaultInstanceTenancy, nil) (defaults to: nil)

    The default tenancy of instances launched into the VPC.

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

    Indicates whether the instances launched in the VPC get public DNS hostnames.

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

    Indicates whether the DNS resolution is supported for the VPC.

  • flow_logs (Hash{String => AWSCDK::EC2::FlowLogOptions}, nil) (defaults to: nil)

    Flow logs to add to this VPC.

  • gateway_endpoints (Hash{String => AWSCDK::EC2::GatewayVPCEndpointOptions}, nil) (defaults to: nil)

    Gateway endpoints to add to this VPC.

  • ip_addresses (AWSCDK::EC2::IIPAddresses, nil) (defaults to: nil)

    The Provider to use to allocate IPv4 Space to your VPC.

  • ip_protocol (AWSCDK::EC2::IPProtocol, nil) (defaults to: nil)

    The protocol of the vpc.

  • ipv6_addresses (AWSCDK::EC2::IIpv6Addresses, nil) (defaults to: nil)

    The Provider to use to allocate IPv6 Space to your VPC.

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

    Define the maximum number of AZs to use in this region.

  • nat_gateway_provider (AWSCDK::EC2::NatProvider, nil) (defaults to: nil)

    What type of NAT provider to use.

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

    The number of NAT Gateways/Instances to create.

  • nat_gateway_subnets (AWSCDK::EC2::SubnetSelection, nil) (defaults to: nil)

    Configures the subnets which will have NAT Gateways/Instances.

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

    Define the number of AZs to reserve.

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

    If set to true then the default inbound & outbound rules will be removed from the default security group.

  • subnet_configuration (Array<AWSCDK::EC2::SubnetConfiguration>, nil) (defaults to: nil)

    Configure the subnets to build for each AZ.

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

    The VPC name.

  • vpn_connections (Hash{String => AWSCDK::EC2::VpnConnectionOptions}, nil) (defaults to: nil)

    VPN connections to this VPC.

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

    Indicates whether a VPN gateway should be created and attached to this VPC.

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

    The private Autonomous System Number (ASN) for the VPN gateway.

  • vpn_route_propagation (Array<AWSCDK::EC2::SubnetSelection>, nil) (defaults to: nil)

    Where to propagate VPN routes.



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'ec2/vpc_props.rb', line 30

def initialize(availability_zones: nil, cidr: nil, create_internet_gateway: nil, default_instance_tenancy: nil, enable_dns_hostnames: nil, enable_dns_support: nil, flow_logs: nil, gateway_endpoints: nil, ip_addresses: nil, ip_protocol: nil, ipv6_addresses: nil, max_azs: nil, nat_gateway_provider: nil, nat_gateways: nil, nat_gateway_subnets: nil, reserved_azs: nil, restrict_default_security_group: nil, subnet_configuration: nil, vpc_name: nil, vpn_connections: nil, vpn_gateway: nil, vpn_gateway_asn: nil, vpn_route_propagation: nil)
  @availability_zones = availability_zones
  Jsii::Type.check_type(@availability_zones, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "availabilityZones") unless @availability_zones.nil?
  @cidr = cidr
  Jsii::Type.check_type(@cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cidr") unless @cidr.nil?
  @create_internet_gateway = create_internet_gateway
  Jsii::Type.check_type(@create_internet_gateway, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "createInternetGateway") unless @create_internet_gateway.nil?
  @default_instance_tenancy = default_instance_tenancy
  Jsii::Type.check_type(@default_instance_tenancy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkRlZmF1bHRJbnN0YW5jZVRlbmFuY3kifQ==")), "defaultInstanceTenancy") unless @default_instance_tenancy.nil?
  @enable_dns_hostnames = enable_dns_hostnames
  Jsii::Type.check_type(@enable_dns_hostnames, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enableDnsHostnames") unless @enable_dns_hostnames.nil?
  @enable_dns_support = enable_dns_support
  Jsii::Type.check_type(@enable_dns_support, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enableDnsSupport") unless @enable_dns_support.nil?
  @flow_logs = flow_logs.is_a?(Hash) ? flow_logs.transform_values { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EC2::FlowLogOptions.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : flow_logs
  Jsii::Type.check_type(@flow_logs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuRmxvd0xvZ09wdGlvbnMifSwia2luZCI6Im1hcCJ9fQ==")), "flowLogs") unless @flow_logs.nil?
  @gateway_endpoints = gateway_endpoints.is_a?(Hash) ? gateway_endpoints.transform_values { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EC2::GatewayVPCEndpointOptions.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : gateway_endpoints
  Jsii::Type.check_type(@gateway_endpoints, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuR2F0ZXdheVZwY0VuZHBvaW50T3B0aW9ucyJ9LCJraW5kIjoibWFwIn19")), "gatewayEndpoints") unless @gateway_endpoints.nil?
  @ip_addresses = ip_addresses
  Jsii::Type.check_type(@ip_addresses, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklJcEFkZHJlc3NlcyJ9")), "ipAddresses") unless @ip_addresses.nil?
  @ip_protocol = ip_protocol
  Jsii::Type.check_type(@ip_protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklwUHJvdG9jb2wifQ==")), "ipProtocol") unless @ip_protocol.nil?
  @ipv6_addresses = ipv6_addresses
  Jsii::Type.check_type(@ipv6_addresses, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklJcHY2QWRkcmVzc2VzIn0=")), "ipv6Addresses") unless @ipv6_addresses.nil?
  @max_azs = max_azs
  Jsii::Type.check_type(@max_azs, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxAzs") unless @max_azs.nil?
  @nat_gateway_provider = nat_gateway_provider
  Jsii::Type.check_type(@nat_gateway_provider, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLk5hdFByb3ZpZGVyIn0=")), "natGatewayProvider") unless @nat_gateway_provider.nil?
  @nat_gateways = nat_gateways
  Jsii::Type.check_type(@nat_gateways, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "natGateways") unless @nat_gateways.nil?
  @nat_gateway_subnets = nat_gateway_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**nat_gateway_subnets.transform_keys(&:to_sym)) : nat_gateway_subnets
  Jsii::Type.check_type(@nat_gateway_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "natGatewaySubnets") unless @nat_gateway_subnets.nil?
  @reserved_azs = reserved_azs
  Jsii::Type.check_type(@reserved_azs, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "reservedAzs") unless @reserved_azs.nil?
  @restrict_default_security_group = restrict_default_security_group
  Jsii::Type.check_type(@restrict_default_security_group, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "restrictDefaultSecurityGroup") unless @restrict_default_security_group.nil?
  @subnet_configuration = subnet_configuration.is_a?(Array) ? subnet_configuration.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EC2::SubnetConfiguration.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : subnet_configuration
  Jsii::Type.check_type(@subnet_configuration, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuU3VibmV0Q29uZmlndXJhdGlvbiJ9LCJraW5kIjoiYXJyYXkifX0=")), "subnetConfiguration") unless @subnet_configuration.nil?
  @vpc_name = vpc_name
  Jsii::Type.check_type(@vpc_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vpcName") unless @vpc_name.nil?
  @vpn_connections = vpn_connections.is_a?(Hash) ? vpn_connections.transform_values { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EC2::VpnConnectionOptions.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : vpn_connections
  Jsii::Type.check_type(@vpn_connections, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuVnBuQ29ubmVjdGlvbk9wdGlvbnMifSwia2luZCI6Im1hcCJ9fQ==")), "vpnConnections") unless @vpn_connections.nil?
  @vpn_gateway = vpn_gateway
  Jsii::Type.check_type(@vpn_gateway, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "vpnGateway") unless @vpn_gateway.nil?
  @vpn_gateway_asn = vpn_gateway_asn
  Jsii::Type.check_type(@vpn_gateway_asn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "vpnGatewayAsn") unless @vpn_gateway_asn.nil?
  @vpn_route_propagation = vpn_route_propagation.is_a?(Array) ? vpn_route_propagation.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : vpn_route_propagation
  Jsii::Type.check_type(@vpn_route_propagation, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuU3VibmV0U2VsZWN0aW9uIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "vpnRoutePropagation") unless @vpn_route_propagation.nil?
end

Instance Attribute Details

#availability_zonesArray<String>? (readonly)

Note:

Default: - a subset of AZs of the stack

Availability zones this VPC spans.

Specify this option only if you do not specify max_azs.

Returns:

  • (Array<String>, nil)


85
86
87
# File 'ec2/vpc_props.rb', line 85

def availability_zones
  @availability_zones
end

#cidrString? (readonly)

Deprecated.

Use ipAddresses instead

Note:

Default: Vpc.DEFAULT_CIDR_RANGE

The CIDR range to use for the VPC, e.g. '10.0.0.0/16'.

Should be a minimum of /28 and maximum size of /16. The range will be split across all subnets per Availability Zone.

Returns:

  • (String, nil)


94
95
96
# File 'ec2/vpc_props.rb', line 94

def cidr
  @cidr
end

#create_internet_gatewayBoolean? (readonly)

Note:

Default: true

If set to false then disable the creation of the default internet gateway.

Returns:

  • (Boolean, nil)


99
100
101
# File 'ec2/vpc_props.rb', line 99

def create_internet_gateway
  @create_internet_gateway
end

#default_instance_tenancyAWSCDK::EC2::DefaultInstanceTenancy? (readonly)

Note:

Default: DefaultInstanceTenancy.Default (shared) tenancy

The default tenancy of instances launched into the VPC.

By setting this to dedicated tenancy, instances will be launched on hardware dedicated to a single AWS customer, unless specifically specified at instance launch time. Please note, not all instance types are usable with Dedicated tenancy.



109
110
111
# File 'ec2/vpc_props.rb', line 109

def default_instance_tenancy
  @default_instance_tenancy
end

#enable_dns_hostnamesBoolean? (readonly)

Note:

Default: true

Indicates whether the instances launched in the VPC get public DNS hostnames.

If this attribute is true, instances in the VPC get public DNS hostnames, but only if the enableDnsSupport attribute is also set to true.

Returns:

  • (Boolean, nil)


117
118
119
# File 'ec2/vpc_props.rb', line 117

def enable_dns_hostnames
  @enable_dns_hostnames
end

#enable_dns_supportBoolean? (readonly)

Note:

Default: true

Indicates whether the DNS resolution is supported for the VPC.

If this attribute is false, the Amazon-provided DNS server in the VPC that resolves public DNS hostnames to IP addresses is not enabled. If this attribute is true, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC IPv4 network range plus two will succeed.

Returns:

  • (Boolean, nil)


128
129
130
# File 'ec2/vpc_props.rb', line 128

def enable_dns_support
  @enable_dns_support
end

#flow_logsHash{String => AWSCDK::EC2::FlowLogOptions}? (readonly)

Note:

Default: - No flow logs.

Flow logs to add to this VPC.

Returns:



133
134
135
# File 'ec2/vpc_props.rb', line 133

def flow_logs
  @flow_logs
end

#gateway_endpointsHash{String => AWSCDK::EC2::GatewayVPCEndpointOptions}? (readonly)

Note:

Default: - None.

Gateway endpoints to add to this VPC.

Returns:



138
139
140
# File 'ec2/vpc_props.rb', line 138

def gateway_endpoints
  @gateway_endpoints
end

#ip_addressesAWSCDK::EC2::IIPAddresses? (readonly)

Note:

Default: ec2.IpAddresses.cidr

The Provider to use to allocate IPv4 Space to your VPC.

Options include static allocation or from a pool.

Note this is specific to IPv4 addresses.

Returns:



147
148
149
# File 'ec2/vpc_props.rb', line 147

def ip_addresses
  @ip_addresses
end

#ip_protocolAWSCDK::EC2::IPProtocol? (readonly)

Note:

Default: IpProtocol.IPV4_ONLY

The protocol of the vpc.

Options are IPv4 only or dual stack.

Returns:



154
155
156
# File 'ec2/vpc_props.rb', line 154

def ip_protocol
  @ip_protocol
end

#ipv6_addressesAWSCDK::EC2::IIpv6Addresses? (readonly)

Note:

Default: Ipv6Addresses.amazonProvided

The Provider to use to allocate IPv6 Space to your VPC.

Options include amazon provided CIDR block.

Note this is specific to IPv6 addresses.

Returns:



163
164
165
# File 'ec2/vpc_props.rb', line 163

def ipv6_addresses
  @ipv6_addresses
end

#max_azsNumeric? (readonly)

Note:

Default: 3

Define the maximum number of AZs to use in this region.

If the region has more AZs than you want to use (for example, because of EIP limits), pick a lower number here. The AZs will be sorted and picked from the start of the list.

If you pick a higher number than the number of AZs in the region, all AZs in the region will be selected. To use "all AZs" available to your account, use a high number (such as 99).

Be aware that environment-agnostic stacks will be created with access to only 2 AZs, so to use more than 2 AZs, be sure to specify the account and region on your stack.

Specify this option only if you do not specify availability_zones.

Returns:

  • (Numeric, nil)


182
183
184
# File 'ec2/vpc_props.rb', line 182

def max_azs
  @max_azs
end

#nat_gateway_providerAWSCDK::EC2::NatProvider? (readonly)

Note:

Default: NatProvider.gateway()

What type of NAT provider to use.

Select between NAT gateways or NAT instances. NAT gateways may not be available in all AWS regions.

Returns:



190
191
192
# File 'ec2/vpc_props.rb', line 190

def nat_gateway_provider
  @nat_gateway_provider
end

#nat_gateway_subnetsAWSCDK::EC2::SubnetSelection? (readonly)

Note:

Default: - All public subnets.

Configures the subnets which will have NAT Gateways/Instances.

You can pick a specific group of subnets by specifying the group name; the picked subnets must be public subnets.

Only necessary if you have more than one public subnet group.



212
213
214
# File 'ec2/vpc_props.rb', line 212

def nat_gateway_subnets
  @nat_gateway_subnets
end

#nat_gatewaysNumeric? (readonly)

Note:

Default: - One NAT gateway/instance per Availability Zone

The number of NAT Gateways/Instances to create.

The type of NAT gateway or instance will be determined by the nat_gateway_provider parameter.

You can set this number lower than the number of Availability Zones in your VPC in order to save on NAT cost. Be aware you may be charged for cross-AZ data traffic instead.

Returns:

  • (Numeric, nil)


202
203
204
# File 'ec2/vpc_props.rb', line 202

def nat_gateways
  @nat_gateways
end

#reserved_azsNumeric? (readonly)

Note:

Default: 0

Define the number of AZs to reserve.

When specified, the IP space is reserved for the azs but no actual resources are provisioned.

Returns:

  • (Numeric, nil)


220
221
222
# File 'ec2/vpc_props.rb', line 220

def reserved_azs
  @reserved_azs
end

#restrict_default_security_groupBoolean? (readonly)

Note:

Default: true if '@aws-cdk/aws-ec2:restrictDefaultSecurityGroup' is enabled, false otherwise

If set to true then the default inbound & outbound rules will be removed from the default security group.

Returns:

  • (Boolean, nil)


225
226
227
# File 'ec2/vpc_props.rb', line 225

def restrict_default_security_group
  @restrict_default_security_group
end

#subnet_configurationArray<AWSCDK::EC2::SubnetConfiguration>? (readonly)

Note:

Default: - The VPC CIDR will be evenly divided between 1 public and 1 private subnet per AZ.

Configure the subnets to build for each AZ.

Each entry in this list configures a Subnet Group; each group will contain a subnet for each Availability Zone.

For example, if you want 1 public subnet, 1 private subnet, and 1 isolated subnet in each AZ provide the following:

AWSCDK::EC2::VPC.new(self, "VPC", {
    subnet_configuration: [
        {
            cidr_mask: 24,
            name: "ingress",
            subnet_type: AWSCDK::EC2::SubnetType::PUBLIC,
        },
        {
            cidr_mask: 24,
            name: "application",
            subnet_type: AWSCDK::EC2::SubnetType::PRIVATE_WITH_EGRESS,
        },
        {
            cidr_mask: 28,
            name: "rds",
            subnet_type: AWSCDK::EC2::SubnetType::PRIVATE_ISOLATED,
        },
    ],
})

Returns:



258
259
260
# File 'ec2/vpc_props.rb', line 258

def subnet_configuration
  @subnet_configuration
end

#vpc_nameString? (readonly)

Note:

Default: this.node.path

The VPC name.

Since the VPC resource doesn't support providing a physical name, the value provided here will be recorded in the Name tag

Returns:

  • (String, nil)


265
266
267
# File 'ec2/vpc_props.rb', line 265

def vpc_name
  @vpc_name
end

#vpn_connectionsHash{String => AWSCDK::EC2::VpnConnectionOptions}? (readonly)

Note:

Default: - No connections.

VPN connections to this VPC.

Returns:



270
271
272
# File 'ec2/vpc_props.rb', line 270

def vpn_connections
  @vpn_connections
end

#vpn_gatewayBoolean? (readonly)

Note:

Default: - true when vpnGatewayAsn or vpnConnections is specified

Indicates whether a VPN gateway should be created and attached to this VPC.

Returns:

  • (Boolean, nil)


275
276
277
# File 'ec2/vpc_props.rb', line 275

def vpn_gateway
  @vpn_gateway
end

#vpn_gateway_asnNumeric? (readonly)

Note:

Default: - Amazon default ASN.

The private Autonomous System Number (ASN) for the VPN gateway.

Returns:

  • (Numeric, nil)


280
281
282
# File 'ec2/vpc_props.rb', line 280

def vpn_gateway_asn
  @vpn_gateway_asn
end

#vpn_route_propagationArray<AWSCDK::EC2::SubnetSelection>? (readonly)

Note:

Default: - On the route tables associated with private subnets. If no private subnets exists, isolated subnets are used. If no isolated subnets exists, public subnets are used.

Where to propagate VPN routes.

Returns:



285
286
287
# File 'ec2/vpc_props.rb', line 285

def vpn_route_propagation
  @vpn_route_propagation
end

Class Method Details

.jsii_propertiesObject



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
# File 'ec2/vpc_props.rb', line 287

def self.jsii_properties
  {
    :availability_zones => "availabilityZones",
    :cidr => "cidr",
    :create_internet_gateway => "createInternetGateway",
    :default_instance_tenancy => "defaultInstanceTenancy",
    :enable_dns_hostnames => "enableDnsHostnames",
    :enable_dns_support => "enableDnsSupport",
    :flow_logs => "flowLogs",
    :gateway_endpoints => "gatewayEndpoints",
    :ip_addresses => "ipAddresses",
    :ip_protocol => "ipProtocol",
    :ipv6_addresses => "ipv6Addresses",
    :max_azs => "maxAzs",
    :nat_gateway_provider => "natGatewayProvider",
    :nat_gateways => "natGateways",
    :nat_gateway_subnets => "natGatewaySubnets",
    :reserved_azs => "reservedAzs",
    :restrict_default_security_group => "restrictDefaultSecurityGroup",
    :subnet_configuration => "subnetConfiguration",
    :vpc_name => "vpcName",
    :vpn_connections => "vpnConnections",
    :vpn_gateway => "vpnGateway",
    :vpn_gateway_asn => "vpnGatewayAsn",
    :vpn_route_propagation => "vpnRoutePropagation",
  }
end

Instance Method Details

#to_jsiiObject



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
# File 'ec2/vpc_props.rb', line 315

def to_jsii
  result = {}
  result.merge!({
    "availabilityZones" => @availability_zones,
    "cidr" => @cidr,
    "createInternetGateway" => @create_internet_gateway,
    "defaultInstanceTenancy" => @default_instance_tenancy,
    "enableDnsHostnames" => @enable_dns_hostnames,
    "enableDnsSupport" => @enable_dns_support,
    "flowLogs" => @flow_logs,
    "gatewayEndpoints" => @gateway_endpoints,
    "ipAddresses" => @ip_addresses,
    "ipProtocol" => @ip_protocol,
    "ipv6Addresses" => @ipv6_addresses,
    "maxAzs" => @max_azs,
    "natGatewayProvider" => @nat_gateway_provider,
    "natGateways" => @nat_gateways,
    "natGatewaySubnets" => @nat_gateway_subnets,
    "reservedAzs" => @reserved_azs,
    "restrictDefaultSecurityGroup" => @restrict_default_security_group,
    "subnetConfiguration" => @subnet_configuration,
    "vpcName" => @vpc_name,
    "vpnConnections" => @vpn_connections,
    "vpnGateway" => @vpn_gateway,
    "vpnGatewayAsn" => @vpn_gateway_asn,
    "vpnRoutePropagation" => @vpn_route_propagation,
  })
  result.compact
end