Class: AWSCDK::EC2::NatGatewayProvider
- Inherits:
-
NatProvider
- Object
- NatProvider
- AWSCDK::EC2::NatGatewayProvider
- Defined in:
- ec2/nat_gateway_provider.rb
Overview
Provider for NAT Gateways.
Class Method Summary collapse
Instance Method Summary collapse
-
#configure_nat(options) ⇒ void
Called by the VPC to configure NAT.
-
#configure_subnet(subnet) ⇒ void
Configures subnet with the gateway.
-
#configured_gateways ⇒ Array<AWSCDK::EC2::GatewayConfig>
Return list of gateways spawned by the provider.
-
#initialize(props = nil) ⇒ NatGatewayProvider
constructor
A new instance of NatGatewayProvider.
Constructor Details
#initialize(props = nil) ⇒ NatGatewayProvider
Returns a new instance of NatGatewayProvider.
9 10 11 12 13 |
# File 'ec2/nat_gateway_provider.rb', line 9 def initialize(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::EC2::NatGatewayProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLk5hdEdhdGV3YXlQcm9wcyJ9")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
15 16 17 18 19 20 21 |
# File 'ec2/nat_gateway_provider.rb', line 15 def self.jsii_overridable_methods { :configured_gateways => { kind: :property, name: "configuredGateways", is_optional: false }, :configure_nat => { kind: :method, name: "configureNat", is_optional: false }, :configure_subnet => { kind: :method, name: "configureSubnet", is_optional: false }, } end |
Instance Method Details
#configure_nat(options) ⇒ void
This method returns an undefined value.
Called by the VPC to configure NAT.
Don't call this directly, the VPC will call it automatically.
36 37 38 39 40 |
# File 'ec2/nat_gateway_provider.rb', line 36 def configure_nat() = .is_a?(Hash) ? ::AWSCDK::EC2::ConfigureNatOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNvbmZpZ3VyZU5hdE9wdGlvbnMifQ==")), "options") jsii_call_method("configureNat", []) end |
#configure_subnet(subnet) ⇒ void
This method returns an undefined value.
Configures subnet with the gateway.
Don't call this directly, the VPC will call it automatically.
48 49 50 51 |
# File 'ec2/nat_gateway_provider.rb', line 48 def configure_subnet(subnet) Jsii::Type.check_type(subnet, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlByaXZhdGVTdWJuZXQifQ==")), "subnet") jsii_call_method("configureSubnet", [subnet]) end |
#configured_gateways ⇒ Array<AWSCDK::EC2::GatewayConfig>
Return list of gateways spawned by the provider.
26 27 28 |
# File 'ec2/nat_gateway_provider.rb', line 26 def configured_gateways() jsii_get_property("configuredGateways") end |