class NatGatewayProvider
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.NatGatewayProvider |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#NatGatewayProvider |
Java | software.amazon.awscdk.services.ec2.NatGatewayProvider |
Python | aws_cdk.aws_ec2.NatGatewayProvider |
TypeScript (source) | aws-cdk-lib » aws_ec2 » NatGatewayProvider |
Extends
Nat
Provider for NAT Gateways.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const natGatewayProvider = new ec2.NatGatewayProvider(/* all optional props */ {
eipAllocationIds: ['eipAllocationIds'],
});
Initializer
new NatGatewayProvider(props?: NatGatewayProps)
Parameters
- props
Nat
Gateway Props
Properties
Name | Type | Description |
---|---|---|
configured | Gateway [] | Return list of gateways spawned by the provider. |
configuredGateways
Type:
Gateway
[]
Return list of gateways spawned by the provider.
Methods
Name | Description |
---|---|
configure | Called by the VPC to configure NAT. |
configure | Configures subnet with the gateway. |
configureNat(options)
public configureNat(options: ConfigureNatOptions): void
Parameters
- options
Configure
Nat Options
Called by the VPC to configure NAT.
Don't call this directly, the VPC will call it automatically.
configureSubnet(subnet)
public configureSubnet(subnet: PrivateSubnet): void
Parameters
- subnet
Private
Subnet
Configures subnet with the gateway.
Don't call this directly, the VPC will call it automatically.