Class: AWSCDK::EC2::CfnVPCProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnVPCProps
- Defined in:
- ec2/cfn_vpc_props.rb
Overview
Properties for defining a CfnVPC.
Instance Attribute Summary collapse
-
#cidr_block ⇒ String?
readonly
The IPv4 network range for the VPC, in CIDR notation.
-
#enable_dns_hostnames ⇒ Boolean, ...
readonly
Indicates whether the instances launched in the VPC get DNS hostnames.
-
#enable_dns_support ⇒ Boolean, ...
readonly
Indicates whether the DNS resolution is supported for the VPC.
-
#instance_tenancy ⇒ String?
readonly
The allowed tenancy of instances launched into the VPC.
-
#ipv4_ipam_pool_id ⇒ String?
readonly
The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR.
-
#ipv4_netmask_length ⇒ Numeric?
readonly
The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags for the VPC.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cidr_block: nil, enable_dns_hostnames: nil, enable_dns_support: nil, instance_tenancy: nil, ipv4_ipam_pool_id: nil, ipv4_netmask_length: nil, tags: nil) ⇒ CfnVPCProps
constructor
A new instance of CfnVPCProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cidr_block: nil, enable_dns_hostnames: nil, enable_dns_support: nil, instance_tenancy: nil, ipv4_ipam_pool_id: nil, ipv4_netmask_length: nil, tags: nil) ⇒ CfnVPCProps
Returns a new instance of CfnVPCProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'ec2/cfn_vpc_props.rb', line 16 def initialize(cidr_block: nil, enable_dns_hostnames: nil, enable_dns_support: nil, instance_tenancy: nil, ipv4_ipam_pool_id: nil, ipv4_netmask_length: nil, tags: nil) @cidr_block = cidr_block Jsii::Type.check_type(@cidr_block, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cidrBlock") unless @cidr_block.nil? @enable_dns_hostnames = enable_dns_hostnames Jsii::Type.check_type(@enable_dns_hostnames, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableDnsHostnames") unless @enable_dns_hostnames.nil? @enable_dns_support = enable_dns_support Jsii::Type.check_type(@enable_dns_support, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableDnsSupport") unless @enable_dns_support.nil? @instance_tenancy = instance_tenancy Jsii::Type.check_type(@instance_tenancy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceTenancy") unless @instance_tenancy.nil? @ipv4_ipam_pool_id = ipv4_ipam_pool_id Jsii::Type.check_type(@ipv4_ipam_pool_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipv4IpamPoolId") unless @ipv4_ipam_pool_id.nil? @ipv4_netmask_length = ipv4_netmask_length Jsii::Type.check_type(@ipv4_netmask_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ipv4NetmaskLength") unless @ipv4_netmask_length.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#cidr_block ⇒ String? (readonly)
The IPv4 network range for the VPC, in CIDR notation.
For example, 10.0.0.0/16 . We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .
You must specify either CidrBlock or Ipv4IpamPoolId .
41 42 43 |
# File 'ec2/cfn_vpc_props.rb', line 41 def cidr_block @cidr_block end |
#enable_dns_hostnames ⇒ Boolean, ... (readonly)
Indicates whether the instances launched in the VPC get DNS hostnames.
If enabled, instances in the VPC get DNS hostnames; otherwise, they do not. Disabled by default for nondefault VPCs. For more information, see DNS attributes in your VPC .
You can only enable DNS hostnames if you've enabled DNS support.
50 51 52 |
# File 'ec2/cfn_vpc_props.rb', line 50 def enable_dns_hostnames @enable_dns_hostnames end |
#enable_dns_support ⇒ Boolean, ... (readonly)
Indicates whether the DNS resolution is supported for the VPC.
If enabled, 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 network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled. Enabled by default. For more information, see DNS attributes in your VPC .
57 58 59 |
# File 'ec2/cfn_vpc_props.rb', line 57 def enable_dns_support @enable_dns_support end |
#instance_tenancy ⇒ String? (readonly)
The allowed tenancy of instances launched into the VPC.
default: An instance launched into the VPC runs on shared hardware by default, unless you explicitly specify a different tenancy during instance launch.dedicated: An instance launched into the VPC runs on dedicated hardware by default, unless you explicitly specify a tenancy ofhostduring instance launch. You cannot specify a tenancy ofdefaultduring instance launch.
Updating InstanceTenancy requires no replacement only if you are updating its value from dedicated to default . Updating InstanceTenancy from default to dedicated requires replacement.
67 68 69 |
# File 'ec2/cfn_vpc_props.rb', line 67 def instance_tenancy @instance_tenancy end |
#ipv4_ipam_pool_id ⇒ String? (readonly)
The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR.
For more information, see What is IPAM? in the Amazon VPC IPAM User Guide .
You must specify either CidrBlock or Ipv4IpamPoolId .
76 77 78 |
# File 'ec2/cfn_vpc_props.rb', line 76 def ipv4_ipam_pool_id @ipv4_ipam_pool_id end |
#ipv4_netmask_length ⇒ Numeric? (readonly)
The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool.
For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
83 84 85 |
# File 'ec2/cfn_vpc_props.rb', line 83 def ipv4_netmask_length @ipv4_netmask_length end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags for the VPC.
88 89 90 |
# File 'ec2/cfn_vpc_props.rb', line 88 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 |
# File 'ec2/cfn_vpc_props.rb', line 90 def self.jsii_properties { :cidr_block => "cidrBlock", :enable_dns_hostnames => "enableDnsHostnames", :enable_dns_support => "enableDnsSupport", :instance_tenancy => "instanceTenancy", :ipv4_ipam_pool_id => "ipv4IpamPoolId", :ipv4_netmask_length => "ipv4NetmaskLength", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'ec2/cfn_vpc_props.rb', line 102 def to_jsii result = {} result.merge!({ "cidrBlock" => @cidr_block, "enableDnsHostnames" => @enable_dns_hostnames, "enableDnsSupport" => @enable_dns_support, "instanceTenancy" => @instance_tenancy, "ipv4IpamPoolId" => @ipv4_ipam_pool_id, "ipv4NetmaskLength" => @ipv4_netmask_length, "tags" => @tags, }) result.compact end |