Class: AWSCDK::EC2::CfnNatGatewayProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnNatGatewayProps
- Defined in:
- ec2/cfn_nat_gateway_props.rb
Overview
Properties for defining a CfnNatGateway.
Instance Attribute Summary collapse
-
#allocation_id ⇒ String, ...
readonly
[Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.
-
#availability_mode ⇒ String?
readonly
Indicates whether this is a zonal (single-AZ) or regional (multi-AZ) NAT gateway.
-
#availability_zone_addresses ⇒ AWSCDK::IResolvable, ...
readonly
For regional NAT gateways only: Specifies which Availability Zones you want the NAT gateway to support and the Elastic IP addresses (EIPs) to use in each AZ.
-
#connectivity_type ⇒ String?
readonly
Indicates whether the NAT gateway supports public or private connectivity.
-
#max_drain_duration_seconds ⇒ Numeric?
readonly
The maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress.
-
#private_ip_address ⇒ String?
readonly
The private IPv4 address to assign to the NAT gateway.
-
#secondary_allocation_ids ⇒ Array<String>?
readonly
Secondary EIP allocation IDs.
-
#secondary_private_ip_address_count ⇒ Numeric?
readonly
[Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway.
-
#secondary_private_ip_addresses ⇒ Array<String>?
readonly
Secondary private IPv4 addresses.
-
#subnet_id ⇒ String, ...
readonly
The ID of the subnet in which the NAT gateway is located.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags for the NAT gateway.
-
#vpc_id ⇒ String?
readonly
The ID of the VPC in which the NAT gateway is located.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(allocation_id: nil, availability_mode: nil, availability_zone_addresses: nil, connectivity_type: nil, max_drain_duration_seconds: nil, private_ip_address: nil, secondary_allocation_ids: nil, secondary_private_ip_address_count: nil, secondary_private_ip_addresses: nil, subnet_id: nil, tags: nil, vpc_id: nil) ⇒ CfnNatGatewayProps
constructor
A new instance of CfnNatGatewayProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(allocation_id: nil, availability_mode: nil, availability_zone_addresses: nil, connectivity_type: nil, max_drain_duration_seconds: nil, private_ip_address: nil, secondary_allocation_ids: nil, secondary_private_ip_address_count: nil, secondary_private_ip_addresses: nil, subnet_id: nil, tags: nil, vpc_id: nil) ⇒ CfnNatGatewayProps
Returns a new instance of CfnNatGatewayProps.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'ec2/cfn_nat_gateway_props.rb', line 21 def initialize(allocation_id: nil, availability_mode: nil, availability_zone_addresses: nil, connectivity_type: nil, max_drain_duration_seconds: nil, private_ip_address: nil, secondary_allocation_ids: nil, secondary_private_ip_address_count: nil, secondary_private_ip_addresses: nil, subnet_id: nil, tags: nil, vpc_id: nil) @allocation_id = allocation_id Jsii::Type.check_type(@allocation_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSUVJUFJlZiJ9XX19")), "allocationId") unless @allocation_id.nil? @availability_mode = availability_mode Jsii::Type.check_type(@availability_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityMode") unless @availability_mode.nil? @availability_zone_addresses = availability_zone_addresses Jsii::Type.check_type(@availability_zone_addresses, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmbk5hdEdhdGV3YXkuQXZhaWxhYmlsaXR5Wm9uZUFkZHJlc3NQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "availabilityZoneAddresses") unless @availability_zone_addresses.nil? @connectivity_type = connectivity_type Jsii::Type.check_type(@connectivity_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "connectivityType") unless @connectivity_type.nil? @max_drain_duration_seconds = max_drain_duration_seconds Jsii::Type.check_type(@max_drain_duration_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxDrainDurationSeconds") unless @max_drain_duration_seconds.nil? @private_ip_address = private_ip_address Jsii::Type.check_type(@private_ip_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "privateIpAddress") unless @private_ip_address.nil? @secondary_allocation_ids = secondary_allocation_ids Jsii::Type.check_type(@secondary_allocation_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "secondaryAllocationIds") unless @secondary_allocation_ids.nil? @secondary_private_ip_address_count = secondary_private_ip_address_count Jsii::Type.check_type(@secondary_private_ip_address_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "secondaryPrivateIpAddressCount") unless @secondary_private_ip_address_count.nil? @secondary_private_ip_addresses = secondary_private_ip_addresses Jsii::Type.check_type(@secondary_private_ip_addresses, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "secondaryPrivateIpAddresses") unless @secondary_private_ip_addresses.nil? @subnet_id = subnet_id Jsii::Type.check_type(@subnet_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVN1Ym5ldFJlZiJ9XX19")), "subnetId") unless @subnet_id.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? @vpc_id = vpc_id Jsii::Type.check_type(@vpc_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vpcId") unless @vpc_id.nil? end |
Instance Attribute Details
#allocation_id ⇒ String, ... (readonly)
[Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.
This property is required for a public NAT gateway and cannot be specified with a private NAT gateway.
54 55 56 |
# File 'ec2/cfn_nat_gateway_props.rb', line 54 def allocation_id @allocation_id end |
#availability_mode ⇒ String? (readonly)
Indicates whether this is a zonal (single-AZ) or regional (multi-AZ) NAT gateway.
A zonal NAT gateway is a NAT Gateway that provides redundancy and scalability within a single availability zone. A regional NAT gateway is a single NAT Gateway that works across multiple availability zones (AZs) in your VPC, providing redundancy, scalability and availability across all the AZs in a Region.
For more information, see Regional NAT gateways for automatic multi-AZ expansion in the Amazon VPC User Guide .
63 64 65 |
# File 'ec2/cfn_nat_gateway_props.rb', line 63 def availability_mode @availability_mode end |
#availability_zone_addresses ⇒ AWSCDK::IResolvable, ... (readonly)
For regional NAT gateways only: Specifies which Availability Zones you want the NAT gateway to support and the Elastic IP addresses (EIPs) to use in each AZ.
The regional NAT gateway uses these EIPs to handle outbound NAT traffic from their respective AZs. If not specified, the NAT gateway will automatically expand to new AZs and associate EIPs upon detection of an elastic network interface. If you specify this parameter, auto-expansion is disabled and you must manually manage AZ coverage.
A regional NAT gateway is a single NAT Gateway that works across multiple availability zones (AZs) in your VPC, providing redundancy, scalability and availability across all the AZs in a Region.
For more information, see Regional NAT gateways for automatic multi-AZ expansion in the Amazon VPC User Guide .
74 75 76 |
# File 'ec2/cfn_nat_gateway_props.rb', line 74 def availability_zone_addresses @availability_zone_addresses end |
#connectivity_type ⇒ String? (readonly)
Indicates whether the NAT gateway supports public or private connectivity.
The default is public connectivity.
81 82 83 |
# File 'ec2/cfn_nat_gateway_props.rb', line 81 def connectivity_type @connectivity_type end |
#max_drain_duration_seconds ⇒ Numeric? (readonly)
The maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress.
Default value is 350 seconds.
88 89 90 |
# File 'ec2/cfn_nat_gateway_props.rb', line 88 def max_drain_duration_seconds @max_drain_duration_seconds end |
#private_ip_address ⇒ String? (readonly)
The private IPv4 address to assign to the NAT gateway.
If you don't provide an address, a private IPv4 address will be automatically assigned.
95 96 97 |
# File 'ec2/cfn_nat_gateway_props.rb', line 95 def private_ip_address @private_ip_address end |
#secondary_allocation_ids ⇒ Array<String>? (readonly)
Secondary EIP allocation IDs.
For more information, see Create a NAT gateway in the Amazon VPC User Guide .
102 103 104 |
# File 'ec2/cfn_nat_gateway_props.rb', line 102 def secondary_allocation_ids @secondary_allocation_ids end |
#secondary_private_ip_address_count ⇒ Numeric? (readonly)
[Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway.
For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide .
SecondaryPrivateIpAddressCount and SecondaryPrivateIpAddresses cannot be set at the same time.
111 112 113 |
# File 'ec2/cfn_nat_gateway_props.rb', line 111 def secondary_private_ip_address_count @secondary_private_ip_address_count end |
#secondary_private_ip_addresses ⇒ Array<String>? (readonly)
Secondary private IPv4 addresses.
For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide .
SecondaryPrivateIpAddressCount and SecondaryPrivateIpAddresses cannot be set at the same time.
120 121 122 |
# File 'ec2/cfn_nat_gateway_props.rb', line 120 def secondary_private_ip_addresses @secondary_private_ip_addresses end |
#subnet_id ⇒ String, ... (readonly)
The ID of the subnet in which the NAT gateway is located.
125 126 127 |
# File 'ec2/cfn_nat_gateway_props.rb', line 125 def subnet_id @subnet_id end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags for the NAT gateway.
130 131 132 |
# File 'ec2/cfn_nat_gateway_props.rb', line 130 def @tags end |
#vpc_id ⇒ String? (readonly)
The ID of the VPC in which the NAT gateway is located.
135 136 137 |
# File 'ec2/cfn_nat_gateway_props.rb', line 135 def vpc_id @vpc_id end |
Class Method Details
.jsii_properties ⇒ Object
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'ec2/cfn_nat_gateway_props.rb', line 137 def self.jsii_properties { :allocation_id => "allocationId", :availability_mode => "availabilityMode", :availability_zone_addresses => "availabilityZoneAddresses", :connectivity_type => "connectivityType", :max_drain_duration_seconds => "maxDrainDurationSeconds", :private_ip_address => "privateIpAddress", :secondary_allocation_ids => "secondaryAllocationIds", :secondary_private_ip_address_count => "secondaryPrivateIpAddressCount", :secondary_private_ip_addresses => "secondaryPrivateIpAddresses", :subnet_id => "subnetId", :tags => "tags", :vpc_id => "vpcId", } end |
Instance Method Details
#to_jsii ⇒ Object
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'ec2/cfn_nat_gateway_props.rb', line 154 def to_jsii result = {} result.merge!({ "allocationId" => @allocation_id, "availabilityMode" => @availability_mode, "availabilityZoneAddresses" => @availability_zone_addresses, "connectivityType" => @connectivity_type, "maxDrainDurationSeconds" => @max_drain_duration_seconds, "privateIpAddress" => @private_ip_address, "secondaryAllocationIds" => @secondary_allocation_ids, "secondaryPrivateIpAddressCount" => @secondary_private_ip_address_count, "secondaryPrivateIpAddresses" => @secondary_private_ip_addresses, "subnetId" => @subnet_id, "tags" => @tags, "vpcId" => @vpc_id, }) result.compact end |