interface EgressOnlyInternetGatewayOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ec2.Alpha.EgressOnlyInternetGatewayOptions |
Go | github.com/aws/aws-cdk-go/awsec2alpha/v2#EgressOnlyInternetGatewayOptions |
Java | software.amazon.awscdk.services.ec2.alpha.EgressOnlyInternetGatewayOptions |
Python | aws_cdk.aws_ec2_alpha.EgressOnlyInternetGatewayOptions |
TypeScript (source) | @aws-cdk/aws-ec2-alpha » EgressOnlyInternetGatewayOptions |
Options to define EgressOnlyInternetGateway for VPC.
Example
const stack = new Stack();
const myVpc = new VpcV2(this, 'Vpc',{
primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),
secondaryAddressBlocks: [IpAddresses.amazonProvidedIpv6({
cidrBlockName: 'AmazonProvided',
})]
});
const routeTable = new RouteTable(this, 'RouteTable', {
vpc: myVpc,
});
const subnet = new SubnetV2(this, 'Subnet', {
vpc: myVpc,
availabilityZone: 'eu-west-2a',
ipv4CidrBlock: new IpCidr('10.0.0.0/24'),
ipv6CidrBlock: new IpCidr('2001:db8:1::/64'),
subnetType: SubnetType.PRIVATE });
myVpc.addEgressOnlyInternetGateway({
subnets: [{subnetType: SubnetType.PRIVATE}],
destination: '::/60',
})
Properties
Name | Type | Description |
---|---|---|
destination? | string | Destination Ipv6 address for EGW route. |
subnets? | Subnet [] | List of subnets where route to EGW will be added. |
destination?
Type:
string
(optional, default: '::/0' all Ipv6 traffic)
Destination Ipv6 address for EGW route.
subnets?
Type:
Subnet
[]
(optional, default: no route created)
List of subnets where route to EGW will be added.