Class: AWSCDK::EC2::NatGatewayProvider

Inherits:
NatProvider
  • Object
show all
Defined in:
ec2/nat_gateway_provider.rb

Overview

Provider for NAT Gateways.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(props = nil) ⇒ NatGatewayProvider

Returns a new instance of NatGatewayProvider.

Parameters:



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_methodsObject



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.

Parameters:



36
37
38
39
40
# File 'ec2/nat_gateway_provider.rb', line 36

def configure_nat(options)
  options = options.is_a?(Hash) ? ::AWSCDK::EC2::ConfigureNatOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNvbmZpZ3VyZU5hdE9wdGlvbnMifQ==")), "options")
  jsii_call_method("configureNat", [options])
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.

Parameters:



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_gatewaysArray<AWSCDK::EC2::GatewayConfig>

Return list of gateways spawned by the provider.

Returns:



26
27
28
# File 'ec2/nat_gateway_provider.rb', line 26

def configured_gateways()
  jsii_get_property("configuredGateways")
end