Class NatInstanceProvider
NAT provider which uses NAT Instances.
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class NatInstanceProvider : NatProvider, IConnectable
Syntax (vb)
Public Class NatInstanceProvider
Inherits NatProvider
Implements IConnectable
Remarks
ExampleMetadata: lit=test/integ.nat-instances.lit.ts infused
Examples
// Configure the `natGatewayProvider` when defining a Vpc
var natGatewayProvider = NatProvider.Instance(new NatInstanceProps {
InstanceType = new InstanceType("t3.small")
});
var vpc = new Vpc(this, "MyVpc", new VpcProps {
NatGatewayProvider = natGatewayProvider,
// The 'natGateways' parameter now controls the number of NAT instances
NatGateways = 2
});
Synopsis
Constructors
NatInstanceProvider(INatInstanceProps) | |
NatInstanceProvider(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
NatInstanceProvider(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
ConfiguredGateways | Return list of gateways spawned by the provider. |
Connections | Manage the Security Groups associated with the NAT instances. |
SecurityGroup | The Security Group associated with the NAT instances. |
Methods
ConfigureNat(IConfigureNatOptions) | Called by the VPC to configure NAT. |
ConfigureSubnet(PrivateSubnet) | Configures subnet with the gateway. |
Constructors
NatInstanceProvider(INatInstanceProps)
NatInstanceProvider(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected NatInstanceProvider(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
NatInstanceProvider(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected NatInstanceProvider(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
ConfiguredGateways
Return list of gateways spawned by the provider.
public override IGatewayConfig[] ConfiguredGateways { get; }
Property Value
Overrides
Connections
Manage the Security Groups associated with the NAT instances.
public virtual Connections_ Connections { get; }
Property Value
SecurityGroup
The Security Group associated with the NAT instances.
public virtual ISecurityGroup SecurityGroup { get; }
Property Value
Methods
ConfigureNat(IConfigureNatOptions)
Called by the VPC to configure NAT.
public override void ConfigureNat(IConfigureNatOptions options)
Parameters
- options IConfigureNatOptions
Overrides
Remarks
Don't call this directly, the VPC will call it automatically.
ConfigureSubnet(PrivateSubnet)
Configures subnet with the gateway.
public override void ConfigureSubnet(PrivateSubnet subnet)
Parameters
- subnet PrivateSubnet
Overrides
Remarks
Don't call this directly, the VPC will call it automatically.