> **Experimental**
>
> `@aws-cdk/aws-ec2-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# EgressOnlyInternetGatewayOptions

Options to define EgressOnlyInternetGateway for VPC.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/vpc-v2-base.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2-base.ts#L54)

## Example

```ts
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

- `destination`: string — Destination Ipv6 address for EGW route.

  **Default:** '::/0' all Ipv6 traffic

- `egressOnlyInternetGatewayName`: string — The resource name of the egress-only internet gateway.

  **Default:** no name tag associated and provisioned without a resource name

  Provided name will be used for tagging

- `subnets`: [SubnetSelection](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetSelection.html)[] — List of subnets where route to EGW will be added.

  **Default:** no route created
