@aws-cdk/aws-ec2-alpha 2.169.0-alpha.0 → 2.171.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +442 -111
- package/.jsii.tabl.json.gz +0 -0
- package/.warnings.jsii.js +29 -1
- package/README.md +151 -0
- package/lib/ipam.js +1 -1
- package/lib/route.d.ts +59 -1
- package/lib/route.js +90 -14
- package/lib/subnet-v2.js +2 -2
- package/lib/util.js +1 -1
- package/lib/vpc-v2-base.d.ts +22 -1
- package/lib/vpc-v2-base.js +47 -2
- package/lib/vpc-v2.d.ts +1 -1
- package/lib/vpc-v2.js +3 -3
- package/package.json +7 -7
- package/rosetta/default.ts-fixture +1 -1
package/.jsii
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://aws.amazon.com"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"aws-cdk-lib": "^2.
|
|
11
|
+
"aws-cdk-lib": "^2.171.0",
|
|
12
12
|
"constructs": "^10.0.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencyClosure": {
|
|
@@ -3909,7 +3909,7 @@
|
|
|
3909
3909
|
},
|
|
3910
3910
|
"name": "@aws-cdk/aws-ec2-alpha",
|
|
3911
3911
|
"readme": {
|
|
3912
|
-
"markdown": "# Amazon VpcV2 Construct Library\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\n\n## VpcV2\n\n`VpcV2` is a re-write of the [`ec2.Vpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html) construct. This new construct enables higher level of customization\non the VPC being created. `VpcV2` implements the existing [`IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html), therefore,\n`VpcV2` is compatible with other constructs that accepts `IVpc` (e.g. [`ApplicationLoadBalancer`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer.html#construct-props)).\n\nTo create a VPC with both IPv4 and IPv6 support:\n\n```ts\n\nconst stack = new Stack();\nnew VpcV2(this, 'Vpc', {\n primaryAddressBlock: IpAddresses.ipv4('10.0.0.0/24'),\n secondaryAddressBlocks: [\n IpAddresses.amazonProvidedIpv6({cidrBlockName: 'AmazonProvidedIpv6'}),\n ],\n});\n```\n\n`VpcV2` does not automatically create subnets or allocate IP addresses, which is different from the `Vpc` construct.\n\n## SubnetV2\n\n`SubnetV2` is a re-write of the [`ec2.Subnet`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Subnet.html) construct.\nThis new construct can be used to add subnets to a `VpcV2` instance:\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc', {\n secondaryAddressBlocks: [\n IpAddresses.amazonProvidedIpv6({ cidrBlockName: 'AmazonProvidedIp'}),\n ],\n});\n\nnew SubnetV2(this, 'subnetA', {\n vpc: myVpc,\n availabilityZone: 'us-east-1a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n ipv6CidrBlock: new IpCidr('2a05:d02c:25:4000::/60'),\n subnetType: SubnetType.PRIVATE_ISOLATED,\n})\n```\n\n## IP Addresses Management\n\nBy default `VpcV2` uses `10.0.0.0/16` as the primary CIDR if none is defined.\nAdditional CIDRs can be adding to the VPC via the `secondaryAddressBlocks` prop.\nThe following example illustrates the different options of defining the address blocks:\n\n```ts\n\nconst stack = new Stack();\nconst ipam = new Ipam(this, 'Ipam', {\n operatingRegion: ['us-west-1']\n});\nconst ipamPublicPool = ipam.publicScope.addPool('PublicPoolA', {\n addressFamily: AddressFamily.IP_V6,\n awsService: AwsServiceName.EC2,\n locale: 'us-west-1',\n publicIpSource: IpamPoolPublicIpSource.AMAZON,\n});\nipamPublicPool.provisionCidr('PublicPoolACidrA', { netmaskLength: 52 } );\n\nconst ipamPrivatePool = ipam.privateScope.addPool('PrivatePoolA', {\n addressFamily: AddressFamily.IP_V4,\n});\nipamPrivatePool.provisionCidr('PrivatePoolACidrA', { netmaskLength: 8 } );\n\nnew VpcV2(this, 'Vpc', {\n primaryAddressBlock: IpAddresses.ipv4('10.0.0.0/24'),\n secondaryAddressBlocks: [\n IpAddresses.amazonProvidedIpv6({ cidrBlockName: 'AmazonIpv6' }),\n IpAddresses.ipv6Ipam({\n ipamPool: ipamPublicPool,\n netmaskLength: 52,\n cidrBlockName: 'ipv6Ipam',\n }),\n IpAddresses.ipv4Ipam({\n ipamPool: ipamPrivatePool,\n netmaskLength: 8,\n cidrBlockName: 'ipv4Ipam',\n }),\n ],\n});\n```\n\nSince `VpcV2` does not create subnets automatically, users have full control over IP addresses allocation across subnets.\n\n\n## Routing\n\n`RouteTable` is a new construct that allows for route tables to be customized in a variety of ways. For instance, the following example shows how a custom route table can be created and appended to a subnet:\n\n```ts\n\nconst myVpc = new VpcV2(this, 'Vpc');\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n routeTable,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PRIVATE_ISOLATED,\n});\n```\n\n`Routes` can be created to link subnets to various different AWS services via gateways and endpoints. Each unique route target has its own dedicated construct that can be routed to a given subnet via the `Route` construct. An example using the `InternetGateway` construct can be seen below:\n\n```ts\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc');\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PRIVATE_ISOLATED });\n\nconst igw = new InternetGateway(this, 'IGW', {\n vpc: myVpc,\n});\nnew Route(this, 'IgwRoute', {\n routeTable,\n destination: '0.0.0.0/0',\n target: { gateway: igw },\n});\n```\n\nAlternatively, `Routes` can also be created via method `addRoute` in the `RouteTable` class. An example using the `EgressOnlyInternetGateway` construct can be seen below:\nNote: `EgressOnlyInternetGateway` can only be used to set up outbound IPv6 routing.\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc',{\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n secondaryAddressBlocks: [IpAddresses.amazonProvidedIpv6({\n cidrBlockName: 'AmazonProvided',\n })]\n });\n\nconst eigw = new EgressOnlyInternetGateway(this, 'EIGW', {\n vpc: myVpc,\n});\n\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\n\nrouteTable.addRoute('EIGW', '::/0', { gateway: eigw });\n```\n\nOther route targets may require a deeper set of parameters to set up properly. For instance, the example below illustrates how to set up a `NatGateway`:\n\n```ts\n\nconst myVpc = new VpcV2(this, 'Vpc');\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PRIVATE_ISOLATED });\n\nconst natgw = new NatGateway(this, 'NatGW', {\n subnet: subnet,\n vpc: myVpc,\n connectivityType: NatConnectivityType.PRIVATE,\n privateIpAddress: '10.0.0.42',\n});\nnew Route(this, 'NatGwRoute', {\n routeTable,\n destination: '0.0.0.0/0',\n target: { gateway: natgw },\n});\n```\n\nIt is also possible to set up endpoints connecting other AWS services. For instance, the example below illustrates the linking of a Dynamo DB endpoint via the existing `ec2.GatewayVpcEndpoint` construct as a route target:\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc');\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PRIVATE });\n\nconst dynamoEndpoint = new ec2.GatewayVpcEndpoint(this, 'DynamoEndpoint', {\n service: ec2.GatewayVpcEndpointAwsService.DYNAMODB,\n vpc: myVpc,\n subnets: [subnet],\n});\nnew Route(this, 'DynamoDBRoute', {\n routeTable,\n destination: '0.0.0.0/0',\n target: { endpoint: dynamoEndpoint },\n});\n```\n\n## Adding Egress-Only Internet Gateway to VPC\n\nAn egress-only internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows outbound communication over IPv6 from instances in your VPC to the internet, and prevents the internet from initiating an IPv6 connection with your instances.\n\nFor more information see [Enable outbound IPv6 traffic using an egress-only internet gateway](https://docs.aws.amazon.com/vpc/latest/userguide/egress-only-internet-gateway.html).\n\nVpcV2 supports adding an egress only internet gateway to VPC using the `addEgressOnlyInternetGateway` method.\n\nBy default, this method sets up a route to all outbound IPv6 address ranges, unless a specific destination is provided by the user. It can only be configured for IPv6-enabled VPCs.\nThe `Subnets` parameter accepts a `SubnetFilter`, which can be based on a `SubnetType` in VpcV2. A new route will be added to the route tables of all subnets that match this filter.\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc',{\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n secondaryAddressBlocks: [IpAddresses.amazonProvidedIpv6({\n cidrBlockName: 'AmazonProvided',\n })]\n });\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n ipv6CidrBlock: new IpCidr('2001:db8:1::/64'),\n subnetType: SubnetType.PRIVATE });\n\nmyVpc.addEgressOnlyInternetGateway({\n subnets: [{subnetType: SubnetType.PRIVATE}],\n destination: '::/60',\n})\n```\n\n## Adding NATGateway to the VPC\n\nA NAT gateway is a Network Address Translation (NAT) service.You can use a NAT gateway so that instances in a private subnet can connect to services outside your VPC but external services cannot initiate a connection with those instances.\n\nFor more information, see [NAT gateway basics](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html).\n\nWhen you create a NAT gateway, you specify one of the following connectivity types:\n\n**Public – (Default)**: Instances in private subnets can connect to the internet through a public NAT gateway, but cannot receive unsolicited inbound connections from the internet\n\n**Private**: Instances in private subnets can connect to other VPCs or your on-premises network through a private NAT gateway.\n\nTo define the NAT gateway connectivity type as `ConnectivityType.Public`, you need to ensure that there is an IGW(Internet Gateway) attached to the subnet's VPC.\nSince a NATGW is associated with a particular subnet, providing `subnet` field in the input props is mandatory.\n\nAdditionally, you can set up a route in any route table with the target set to the NAT Gateway. The function `addNatGateway` returns a `NATGateway` object that you can reference later.\n\nThe code example below provides the definition for adding a NAT gateway to your subnet:\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc');\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PUBLIC });\n\nmyVpc.addInternetGateway();\nmyVpc.addNatGateway({\n subnet: subnet,\n connectivityType: NatConnectivityType.PUBLIC,\n});\n```\n\n## Enable VPNGateway for the VPC\n\nA virtual private gateway is the endpoint on the VPC side of your VPN connection.\n\nFor more information, see [What is AWS Site-to-Site VPN?](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html).\n\nVPN route propagation is a feature in Amazon Web Services (AWS) that automatically updates route tables in your Virtual Private Cloud (VPC) with routes learned from a VPN connection.\n\nTo enable VPN route propogation, use the `vpnRoutePropagation` property to specify the subnets as an input to the function. VPN route propagation will then be enabled for each subnet with the corresponding route table IDs.\n\nAdditionally, you can set up a route in any route table with the target set to the VPN Gateway. The function `enableVpnGatewayV2` returns a `VPNGatewayV2` object that you can reference later.\n\nThe code example below provides the definition for setting up a VPN gateway with `vpnRoutePropogation` enabled:\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc');\nconst vpnGateway = myVpc.enableVpnGatewayV2({\n vpnRoutePropagation: [{ subnetType: SubnetType.PUBLIC }],\n type: VpnConnectionType.IPSEC_1,\n});\n\nconst routeTable = new RouteTable(stack, 'routeTable', {\n vpc: myVpc\n } );\n\nnew Route(stack, 'route', {\n destination: '172.31.0.0/24',\n target: { gateway: vpnGateway },\n routeTable: routeTable,\n});\n```\n\n## Adding InternetGateway to the VPC\n\nAn internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows communication between your VPC and the internet. It supports both IPv4 and IPv6 traffic.\n\nFor more information, see [Enable VPC internet access using internet gateways](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html).\n\nYou can add an internet gateway to a VPC using `addInternetGateway` method. By default, this method creates a route in all Public Subnets with outbound destination set to `0.0.0.0` for IPv4 and `::0` for IPv6 enabled VPC.\nInstead of using the default settings, you can configure a custom destinatation range by providing an optional input `destination` to the method.\n\nThe code example below shows how to add an internet gateway with a custom outbound destination IP range:\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc');\n\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PUBLIC });\n\nmyVpc.addInternetGateway({\n ipv4Destination: '192.168.0.0/16',\n});\n```\n\n## Importing an existing VPC\n\nYou can import an existing VPC and its subnets using the `VpcV2.fromVpcV2Attributes()` method or an individual subnet using `SubnetV2.fromSubnetV2Attributes()` method.\n\n### Importing a VPC\n\nTo import an existing VPC, use the `VpcV2.fromVpcV2Attributes()` method. You'll need to provide the VPC ID, primary CIDR block, and information about the subnets. You can import secondary address as well created through IPAM, BYOIP(IPv4) or enabled through Amazon Provided IPv6. You must provide VPC Id and its primary CIDR block for importing it.\n\nIf you wish to add a new subnet to imported VPC, new subnet's IP range(IPv4) will be validated against provided secondary and primary address block to confirm that it is within the the range of VPC.\n\nHere's an example of importing a VPC with only the required parameters\n\n``` ts\n\nconst stack = new Stack();\n\nconst importedVpc = VpcV2.fromVpcV2Attributes(stack, 'ImportedVpc', {\n vpcId: 'mockVpcID',\n vpcCidrBlock: '10.0.0.0/16',\n});\n\n```\n\nIn case of cross account or cross region VPC, its recommended to provide region and ownerAccountId so that these values for the VPC can be used to populate correct arn value for the VPC. If a VPC region and account ID is not provided, then region and account configured in the stack will be used. Furthermore, these fields will be referenced later while setting up VPC peering connection, so its necessary to set these fields to a correct value.\n\nBelow is an example of importing a cross region and cross acount VPC, VPC arn for this case would be 'arn:aws:ec2:us-west-2:123456789012:vpc/mockVpcID'\n\n``` ts\n\nconst stack = new Stack();\n\n//Importing a cross acount or cross region VPC\nconst importedVpc = VpcV2.fromVpcV2Attributes(stack, 'ImportedVpc', {\n vpcId: 'mockVpcID',\n vpcCidrBlock: '10.0.0.0/16',\n ownerAccountId: '123456789012',\n region: 'us-west-2',\n});\n\n```\n\nHere's an example of how to import a VPC with multiple CIDR blocks, IPv6 support, and different subnet types:\n\nIn this example, we're importing a VPC with:\n\n - A primary CIDR block (10.1.0.0/16)\n - One secondary IPv4 CIDR block (10.2.0.0/16)\n - Two secondary address using IPAM pool (IPv4 and IPv6)\n - VPC has Amazon-provided IPv6 CIDR enabled\n - An isolated subnet in us-west-2a\n - A public subnet in us-west-2b\n\n```ts\n\nconst stack = new Stack();\n\nconst importedVpc = VpcV2.fromVpcV2Attributes(this, 'ImportedVPC', {\n vpcId: 'vpc-XXX',\n vpcCidrBlock: '10.1.0.0/16',\n secondaryCidrBlocks: [\n {\n cidrBlock: '10.2.0.0/16',\n cidrBlockName: 'ImportedBlock1',\n },\n {\n ipv6IpamPoolId: 'ipam-pool-XXX',\n ipv6NetmaskLength: 52,\n cidrBlockName: 'ImportedIpamIpv6',\n },\n {\n ipv4IpamPoolId: 'ipam-pool-XXX',\n ipv4IpamProvisionedCidrs: ['10.2.0.0/16'],\n cidrBlockName: 'ImportedIpamIpv4',\n },\n {\n amazonProvidedIpv6CidrBlock: true,\n }\n ],\n subnets: [{\n subnetName: 'IsolatedSubnet2',\n subnetId: 'subnet-03cd773c0fe08ed26',\n subnetType: SubnetType.PRIVATE_ISOLATED,\n availabilityZone: 'us-west-2a',\n ipv4CidrBlock: '10.2.0.0/24',\n routeTableId: 'rtb-0871c310f98da2cbb',\n },\n {\n subnetId: 'subnet-0fa477e01db27d820',\n subnetType: SubnetType.PUBLIC,\n availabilityZone: 'us-west-2b',\n ipv4CidrBlock: '10.3.0.0/24',\n routeTableId: 'rtb-014f3043098fe4b96',\n }],\n});\n\n// You can now use the imported VPC in your stack\n\n// Adding a new subnet to the imported VPC\nconst importedSubnet = new SubnetV2(this, 'NewSubnet', {\n availabilityZone: 'us-west-2a',\n ipv4CidrBlock: new IpCidr('10.2.2.0/24'),\n vpc: importedVpc,\n subnetType: SubnetType.PUBLIC,\n});\n\n// Adding gateways to the imported VPC\nimportedVpc.addInternetGateway();\nimportedVpc.addNatGateway({ subnet: importedSubnet });\nimportedVpc.addEgressOnlyInternetGateway();\n```\n\nYou can add more subnets as needed by including additional entries in the `isolatedSubnets`, `publicSubnets`, or other subnet type arrays (e.g., `privateSubnets`).\n\n### Importing Subnets\n\nYou can also import individual subnets using the `SubnetV2.fromSubnetV2Attributes()` method. This is useful when you need to work with specific subnets independently of a VPC.\n\nHere's an example of how to import a subnet:\n\n```ts\n\nSubnetV2.fromSubnetV2Attributes(this, 'ImportedSubnet', {\n subnetId: 'subnet-0123456789abcdef0',\n availabilityZone: 'us-west-2a',\n ipv4CidrBlock: '10.2.0.0/24',\n routeTableId: 'rtb-0871c310f98da2cbb',\n subnetType: SubnetType.PRIVATE_ISOLATED,\n});\n```\n\nBy importing existing VPCs and subnets, you can easily integrate your existing AWS infrastructure with new resources created through CDK. This is particularly useful when you need to work with pre-existing network configurations or when you're migrating existing infrastructure to CDK.\n"
|
|
3912
|
+
"markdown": "# Amazon VpcV2 Construct Library\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\n\n## VpcV2\n\n`VpcV2` is a re-write of the [`ec2.Vpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html) construct. This new construct enables higher level of customization\non the VPC being created. `VpcV2` implements the existing [`IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html), therefore,\n`VpcV2` is compatible with other constructs that accepts `IVpc` (e.g. [`ApplicationLoadBalancer`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer.html#construct-props)).\n\nTo create a VPC with both IPv4 and IPv6 support:\n\n```ts\n\nconst stack = new Stack();\nnew VpcV2(this, 'Vpc', {\n primaryAddressBlock: IpAddresses.ipv4('10.0.0.0/24'),\n secondaryAddressBlocks: [\n IpAddresses.amazonProvidedIpv6({cidrBlockName: 'AmazonProvidedIpv6'}),\n ],\n});\n```\n\n`VpcV2` does not automatically create subnets or allocate IP addresses, which is different from the `Vpc` construct.\n\n## SubnetV2\n\n`SubnetV2` is a re-write of the [`ec2.Subnet`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Subnet.html) construct.\nThis new construct can be used to add subnets to a `VpcV2` instance:\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc', {\n secondaryAddressBlocks: [\n IpAddresses.amazonProvidedIpv6({ cidrBlockName: 'AmazonProvidedIp'}),\n ],\n});\n\nnew SubnetV2(this, 'subnetA', {\n vpc: myVpc,\n availabilityZone: 'us-east-1a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n ipv6CidrBlock: new IpCidr('2a05:d02c:25:4000::/60'),\n subnetType: SubnetType.PRIVATE_ISOLATED,\n})\n```\n\n## IP Addresses Management\n\nBy default `VpcV2` uses `10.0.0.0/16` as the primary CIDR if none is defined.\nAdditional CIDRs can be adding to the VPC via the `secondaryAddressBlocks` prop.\nThe following example illustrates the different options of defining the address blocks:\n\n```ts\n\nconst stack = new Stack();\nconst ipam = new Ipam(this, 'Ipam', {\n operatingRegion: ['us-west-1']\n});\nconst ipamPublicPool = ipam.publicScope.addPool('PublicPoolA', {\n addressFamily: AddressFamily.IP_V6,\n awsService: AwsServiceName.EC2,\n locale: 'us-west-1',\n publicIpSource: IpamPoolPublicIpSource.AMAZON,\n});\nipamPublicPool.provisionCidr('PublicPoolACidrA', { netmaskLength: 52 } );\n\nconst ipamPrivatePool = ipam.privateScope.addPool('PrivatePoolA', {\n addressFamily: AddressFamily.IP_V4,\n});\nipamPrivatePool.provisionCidr('PrivatePoolACidrA', { netmaskLength: 8 } );\n\nnew VpcV2(this, 'Vpc', {\n primaryAddressBlock: IpAddresses.ipv4('10.0.0.0/24'),\n secondaryAddressBlocks: [\n IpAddresses.amazonProvidedIpv6({ cidrBlockName: 'AmazonIpv6' }),\n IpAddresses.ipv6Ipam({\n ipamPool: ipamPublicPool,\n netmaskLength: 52,\n cidrBlockName: 'ipv6Ipam',\n }),\n IpAddresses.ipv4Ipam({\n ipamPool: ipamPrivatePool,\n netmaskLength: 8,\n cidrBlockName: 'ipv4Ipam',\n }),\n ],\n});\n```\n\nSince `VpcV2` does not create subnets automatically, users have full control over IP addresses allocation across subnets.\n\n\n## Routing\n\n`RouteTable` is a new construct that allows for route tables to be customized in a variety of ways. For instance, the following example shows how a custom route table can be created and appended to a subnet:\n\n```ts\n\nconst myVpc = new VpcV2(this, 'Vpc');\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n routeTable,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PRIVATE_ISOLATED,\n});\n```\n\n`Routes` can be created to link subnets to various different AWS services via gateways and endpoints. Each unique route target has its own dedicated construct that can be routed to a given subnet via the `Route` construct. An example using the `InternetGateway` construct can be seen below:\n\n```ts\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc');\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PRIVATE_ISOLATED });\n\nconst igw = new InternetGateway(this, 'IGW', {\n vpc: myVpc,\n});\nnew Route(this, 'IgwRoute', {\n routeTable,\n destination: '0.0.0.0/0',\n target: { gateway: igw },\n});\n```\n\nAlternatively, `Routes` can also be created via method `addRoute` in the `RouteTable` class. An example using the `EgressOnlyInternetGateway` construct can be seen below:\nNote: `EgressOnlyInternetGateway` can only be used to set up outbound IPv6 routing.\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc',{\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n secondaryAddressBlocks: [IpAddresses.amazonProvidedIpv6({\n cidrBlockName: 'AmazonProvided',\n })]\n });\n\nconst eigw = new EgressOnlyInternetGateway(this, 'EIGW', {\n vpc: myVpc,\n});\n\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\n\nrouteTable.addRoute('EIGW', '::/0', { gateway: eigw });\n```\n\nOther route targets may require a deeper set of parameters to set up properly. For instance, the example below illustrates how to set up a `NatGateway`:\n\n```ts\n\nconst myVpc = new VpcV2(this, 'Vpc');\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PRIVATE_ISOLATED });\n\nconst natgw = new NatGateway(this, 'NatGW', {\n subnet: subnet,\n vpc: myVpc,\n connectivityType: NatConnectivityType.PRIVATE,\n privateIpAddress: '10.0.0.42',\n});\nnew Route(this, 'NatGwRoute', {\n routeTable,\n destination: '0.0.0.0/0',\n target: { gateway: natgw },\n});\n```\n\nIt is also possible to set up endpoints connecting other AWS services. For instance, the example below illustrates the linking of a Dynamo DB endpoint via the existing `ec2.GatewayVpcEndpoint` construct as a route target:\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc');\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PRIVATE });\n\nconst dynamoEndpoint = new ec2.GatewayVpcEndpoint(this, 'DynamoEndpoint', {\n service: ec2.GatewayVpcEndpointAwsService.DYNAMODB,\n vpc: myVpc,\n subnets: [subnet],\n});\nnew Route(this, 'DynamoDBRoute', {\n routeTable,\n destination: '0.0.0.0/0',\n target: { endpoint: dynamoEndpoint },\n});\n\n```\n\n## VPC Peering Connection\n\nVPC peering connection allows you to connect two VPCs and route traffic between them using private IP addresses. The VpcV2 construct supports creating VPC peering connections through the `VPCPeeringConnection` construct from the `route` module.\n\nPeering Connection cannot be established between two VPCs with overlapping CIDR ranges. Please make sure the two VPC CIDRs do not overlap with each other else it will throw an error.\n\nFor more information, see [What is VPC peering?](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html).\n\nThe following show examples of how to create a peering connection between two VPCs for all possible combinations of same-account or cross-account, and same-region or cross-region configurations.\n\nNote: You cannot create a VPC peering connection between VPCs that have matching or overlapping CIDR blocks\n\n**Case 1: Same Account and Same Region Peering Connection**\n\n```ts\nconst stack = new Stack();\n\nconst vpcA = new VpcV2(this, 'VpcA', {\n primaryAddressBlock: IpAddresses.ipv4('10.0.0.0/16'),\n});\n\nconst vpcB = new VpcV2(this, 'VpcB', {\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n});\n\nconst peeringConnection = vpcA.createPeeringConnection('sameAccountSameRegionPeering', {\n acceptorVpc: vpcB,\n});\n```\n\n**Case 2: Same Account and Cross Region Peering Connection**\n\nThere is no difference from Case 1 when calling `createPeeringConnection`. The only change is that one of the VPCs are created in another stack with a different region. To establish cross region VPC peering connection, acceptorVpc needs to be imported to the requestor VPC stack using `fromVpcV2Attributes` method.\n\n```ts\nconst app = new App();\n\nconst stackA = new Stack(app, 'VpcStackA', { env: { account: '000000000000', region: 'us-east-1' } });\nconst stackB = new Stack(app, 'VpcStackB', { env: { account: '000000000000', region: 'us-west-2' } });\n\nconst vpcA = new VpcV2(stackA, 'VpcA', {\n primaryAddressBlock: IpAddresses.ipv4('10.0.0.0/16'),\n});\n\nnew VpcV2(stackB, 'VpcB', {\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n});\n\nconst vpcB = VpcV2.fromVpcV2Attributes(stackA, 'ImportedVpcB', {\n vpcId: 'MockVpcBid',\n vpcCidrBlock: '10.1.0.0/16',\n region: 'us-west-2',\n ownerAccountId: '000000000000',\n });\n\n\nconst peeringConnection = vpcA.createPeeringConnection('sameAccountCrossRegionPeering', {\n acceptorVpc: vpcB,\n});\n```\n\n**Case 3: Cross Account Peering Connection**\n\nFor cross-account connections, the acceptor account needs an IAM role that grants the requestor account permission to initiate the connection. Create a new IAM role in the acceptor account using method `createAcceptorVpcRole` to provide the necessary permissions.\n\nOnce role is created in account, provide role arn for field `peerRoleArn` under method `createPeeringConnection`\n\n```ts\nconst stack = new Stack();\n\nconst acceptorVpc = new VpcV2(this, 'VpcA', {\n primaryAddressBlock: IpAddresses.ipv4('10.0.0.0/16'),\n});\n\nconst acceptorRoleArn = acceptorVpc.createAcceptorVpcRole('000000000000'); // Requestor account ID\n```\n\nAfter creating an IAM role in the acceptor account, we can initiate the peering connection request from the requestor VPC. Import accpeptorVpc to the stack using `fromVpcV2Attributes` method, it is recommended to specify owner account id of the acceptor VPC in case of cross account peering connection, if acceptor VPC is hosted in different region provide region value for import as well.\nThe following code snippet demonstrates how to set up VPC peering between two VPCs in different AWS accounts using CDK:\n\n```ts\nconst stack = new Stack();\n\nconst acceptorVpc = VpcV2.fromVpcV2Attributes(this, 'acceptorVpc', {\n vpcId: 'vpc-XXXX',\n vpcCidrBlock: '10.0.0.0/16',\n region: 'us-east-2',\n ownerAccountId: '111111111111',\n });\n\nconst acceptorRoleArn = 'arn:aws:iam::111111111111:role/VpcPeeringRole';\n\nconst requestorVpc = new VpcV2(this, 'VpcB', {\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n});\n\nconst peeringConnection = requestorVpc.createPeeringConnection('crossAccountCrossRegionPeering', {\n acceptorVpc: acceptorVpc,\n peerRoleArn: acceptorRoleArn,\n});\n```\n\n### Route Table Configuration\n\nAfter establishing the VPC peering connection, routes must be added to the respective route tables in the VPCs to enable traffic flow. If a route is added to the requestor stack, information will be able to flow from the requestor VPC to the acceptor VPC, but not in the reverse direction. For bi-directional communication, routes need to be added in both VPCs from their respective stacks.\n\nFor more information, see [Update your route tables for a VPC peering connection](https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-routing.html).\n\n```ts\nconst stack = new Stack();\n\nconst acceptorVpc = new VpcV2(this, 'VpcA', {\n primaryAddressBlock: IpAddresses.ipv4('10.0.0.0/16'),\n});\n\nconst requestorVpc = new VpcV2(this, 'VpcB', {\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n});\n\nconst peeringConnection = requestorVpc.createPeeringConnection('peeringConnection', {\n acceptorVpc: acceptorVpc,\n});\n\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: requestorVpc,\n});\n\nrouteTable.addRoute('vpcPeeringRoute', '10.0.0.0/16', { gateway: peeringConnection });\n```\n\nThis can also be done using AWS CLI. For more information, see [create-route](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-route.html).\n\n```bash\n# Add a route to the requestor VPC route table\naws ec2 create-route --route-table-id rtb-requestor --destination-cidr-block 10.0.0.0/16 --vpc-peering-connection-id pcx-xxxxxxxx\n\n# For bi-directional add a route in the acceptor vpc account as well\naws ec2 create-route --route-table-id rtb-acceptor --destination-cidr-block 10.1.0.0/16 --vpc-peering-connection-id pcx-xxxxxxxx\n```\n\n### Deleting the Peering Connection\n\nTo delete a VPC peering connection, use the following command:\n\n```bash\naws ec2 delete-vpc-peering-connection --vpc-peering-connection-id pcx-xxxxxxxx\n```\n\nFor more information, see [Delete a VPC peering connection](https://docs.aws.amazon.com/vpc/latest/peering/create-vpc-peering-connection.html#delete-vpc-peering-connection).\n\n## Adding Egress-Only Internet Gateway to VPC\n\nAn egress-only internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows outbound communication over IPv6 from instances in your VPC to the internet, and prevents the internet from initiating an IPv6 connection with your instances.\n\nFor more information see [Enable outbound IPv6 traffic using an egress-only internet gateway](https://docs.aws.amazon.com/vpc/latest/userguide/egress-only-internet-gateway.html).\n\nVpcV2 supports adding an egress only internet gateway to VPC using the `addEgressOnlyInternetGateway` method.\n\nBy default, this method sets up a route to all outbound IPv6 address ranges, unless a specific destination is provided by the user. It can only be configured for IPv6-enabled VPCs.\nThe `Subnets` parameter accepts a `SubnetFilter`, which can be based on a `SubnetType` in VpcV2. A new route will be added to the route tables of all subnets that match this filter.\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc',{\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n secondaryAddressBlocks: [IpAddresses.amazonProvidedIpv6({\n cidrBlockName: 'AmazonProvided',\n })]\n });\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n ipv6CidrBlock: new IpCidr('2001:db8:1::/64'),\n subnetType: SubnetType.PRIVATE });\n\nmyVpc.addEgressOnlyInternetGateway({\n subnets: [{subnetType: SubnetType.PRIVATE}],\n destination: '::/60',\n})\n```\n\n## Adding NATGateway to the VPC\n\nA NAT gateway is a Network Address Translation (NAT) service.You can use a NAT gateway so that instances in a private subnet can connect to services outside your VPC but external services cannot initiate a connection with those instances.\n\nFor more information, see [NAT gateway basics](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html).\n\nWhen you create a NAT gateway, you specify one of the following connectivity types:\n\n**Public – (Default)**: Instances in private subnets can connect to the internet through a public NAT gateway, but cannot receive unsolicited inbound connections from the internet\n\n**Private**: Instances in private subnets can connect to other VPCs or your on-premises network through a private NAT gateway.\n\nTo define the NAT gateway connectivity type as `ConnectivityType.Public`, you need to ensure that there is an IGW(Internet Gateway) attached to the subnet's VPC.\nSince a NATGW is associated with a particular subnet, providing `subnet` field in the input props is mandatory.\n\nAdditionally, you can set up a route in any route table with the target set to the NAT Gateway. The function `addNatGateway` returns a `NATGateway` object that you can reference later.\n\nThe code example below provides the definition for adding a NAT gateway to your subnet:\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc');\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PUBLIC });\n\nmyVpc.addInternetGateway();\nmyVpc.addNatGateway({\n subnet: subnet,\n connectivityType: NatConnectivityType.PUBLIC,\n});\n```\n\n## Enable VPNGateway for the VPC\n\nA virtual private gateway is the endpoint on the VPC side of your VPN connection.\n\nFor more information, see [What is AWS Site-to-Site VPN?](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html).\n\nVPN route propagation is a feature in Amazon Web Services (AWS) that automatically updates route tables in your Virtual Private Cloud (VPC) with routes learned from a VPN connection.\n\nTo enable VPN route propogation, use the `vpnRoutePropagation` property to specify the subnets as an input to the function. VPN route propagation will then be enabled for each subnet with the corresponding route table IDs.\n\nAdditionally, you can set up a route in any route table with the target set to the VPN Gateway. The function `enableVpnGatewayV2` returns a `VPNGatewayV2` object that you can reference later.\n\nThe code example below provides the definition for setting up a VPN gateway with `vpnRoutePropogation` enabled:\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc');\nconst vpnGateway = myVpc.enableVpnGatewayV2({\n vpnRoutePropagation: [{ subnetType: SubnetType.PUBLIC }],\n type: VpnConnectionType.IPSEC_1,\n});\n\nconst routeTable = new RouteTable(stack, 'routeTable', {\n vpc: myVpc\n } );\n\nnew Route(stack, 'route', {\n destination: '172.31.0.0/24',\n target: { gateway: vpnGateway },\n routeTable: routeTable,\n});\n```\n\n## Adding InternetGateway to the VPC\n\nAn internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows communication between your VPC and the internet. It supports both IPv4 and IPv6 traffic.\n\nFor more information, see [Enable VPC internet access using internet gateways](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html).\n\nYou can add an internet gateway to a VPC using `addInternetGateway` method. By default, this method creates a route in all Public Subnets with outbound destination set to `0.0.0.0` for IPv4 and `::0` for IPv6 enabled VPC.\nInstead of using the default settings, you can configure a custom destinatation range by providing an optional input `destination` to the method.\n\nThe code example below shows how to add an internet gateway with a custom outbound destination IP range:\n\n```ts\n\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc');\n\nconst subnet = new SubnetV2(this, 'Subnet', {\n vpc: myVpc,\n availabilityZone: 'eu-west-2a',\n ipv4CidrBlock: new IpCidr('10.0.0.0/24'),\n subnetType: SubnetType.PUBLIC });\n\nmyVpc.addInternetGateway({\n ipv4Destination: '192.168.0.0/16',\n});\n```\n\n## Importing an existing VPC\n\nYou can import an existing VPC and its subnets using the `VpcV2.fromVpcV2Attributes()` method or an individual subnet using `SubnetV2.fromSubnetV2Attributes()` method.\n\n### Importing a VPC\n\nTo import an existing VPC, use the `VpcV2.fromVpcV2Attributes()` method. You'll need to provide the VPC ID, primary CIDR block, and information about the subnets. You can import secondary address as well created through IPAM, BYOIP(IPv4) or enabled through Amazon Provided IPv6. You must provide VPC Id and its primary CIDR block for importing it.\n\nIf you wish to add a new subnet to imported VPC, new subnet's IP range(IPv4) will be validated against provided secondary and primary address block to confirm that it is within the the range of VPC.\n\nHere's an example of importing a VPC with only the required parameters\n\n``` ts\n\nconst stack = new Stack();\n\nconst importedVpc = VpcV2.fromVpcV2Attributes(stack, 'ImportedVpc', {\n vpcId: 'mockVpcID',\n vpcCidrBlock: '10.0.0.0/16',\n});\n\n```\n\nIn case of cross account or cross region VPC, its recommended to provide region and ownerAccountId so that these values for the VPC can be used to populate correct arn value for the VPC. If a VPC region and account ID is not provided, then region and account configured in the stack will be used. Furthermore, these fields will be referenced later while setting up VPC peering connection, so its necessary to set these fields to a correct value.\n\nBelow is an example of importing a cross region and cross acount VPC, VPC arn for this case would be 'arn:aws:ec2:us-west-2:123456789012:vpc/mockVpcID'\n\n``` ts\n\nconst stack = new Stack();\n\n//Importing a cross acount or cross region VPC\nconst importedVpc = VpcV2.fromVpcV2Attributes(stack, 'ImportedVpc', {\n vpcId: 'mockVpcID',\n vpcCidrBlock: '10.0.0.0/16',\n ownerAccountId: '123456789012',\n region: 'us-west-2',\n});\n\n```\n\nHere's an example of how to import a VPC with multiple CIDR blocks, IPv6 support, and different subnet types:\n\nIn this example, we're importing a VPC with:\n\n - A primary CIDR block (10.1.0.0/16)\n - One secondary IPv4 CIDR block (10.2.0.0/16)\n - Two secondary address using IPAM pool (IPv4 and IPv6)\n - VPC has Amazon-provided IPv6 CIDR enabled\n - An isolated subnet in us-west-2a\n - A public subnet in us-west-2b\n\n```ts\n\nconst stack = new Stack();\n\nconst importedVpc = VpcV2.fromVpcV2Attributes(this, 'ImportedVPC', {\n vpcId: 'vpc-XXX',\n vpcCidrBlock: '10.1.0.0/16',\n secondaryCidrBlocks: [\n {\n cidrBlock: '10.2.0.0/16',\n cidrBlockName: 'ImportedBlock1',\n },\n {\n ipv6IpamPoolId: 'ipam-pool-XXX',\n ipv6NetmaskLength: 52,\n cidrBlockName: 'ImportedIpamIpv6',\n },\n {\n ipv4IpamPoolId: 'ipam-pool-XXX',\n ipv4IpamProvisionedCidrs: ['10.2.0.0/16'],\n cidrBlockName: 'ImportedIpamIpv4',\n },\n {\n amazonProvidedIpv6CidrBlock: true,\n }\n ],\n subnets: [{\n subnetName: 'IsolatedSubnet2',\n subnetId: 'subnet-03cd773c0fe08ed26',\n subnetType: SubnetType.PRIVATE_ISOLATED,\n availabilityZone: 'us-west-2a',\n ipv4CidrBlock: '10.2.0.0/24',\n routeTableId: 'rtb-0871c310f98da2cbb',\n },\n {\n subnetId: 'subnet-0fa477e01db27d820',\n subnetType: SubnetType.PUBLIC,\n availabilityZone: 'us-west-2b',\n ipv4CidrBlock: '10.3.0.0/24',\n routeTableId: 'rtb-014f3043098fe4b96',\n }],\n});\n\n// You can now use the imported VPC in your stack\n\n// Adding a new subnet to the imported VPC\nconst importedSubnet = new SubnetV2(this, 'NewSubnet', {\n availabilityZone: 'us-west-2a',\n ipv4CidrBlock: new IpCidr('10.2.2.0/24'),\n vpc: importedVpc,\n subnetType: SubnetType.PUBLIC,\n});\n\n// Adding gateways to the imported VPC\nimportedVpc.addInternetGateway();\nimportedVpc.addNatGateway({ subnet: importedSubnet });\nimportedVpc.addEgressOnlyInternetGateway();\n```\n\nYou can add more subnets as needed by including additional entries in the `isolatedSubnets`, `publicSubnets`, or other subnet type arrays (e.g., `privateSubnets`).\n\n### Importing Subnets\n\nYou can also import individual subnets using the `SubnetV2.fromSubnetV2Attributes()` method. This is useful when you need to work with specific subnets independently of a VPC.\n\nHere's an example of how to import a subnet:\n\n```ts\n\nSubnetV2.fromSubnetV2Attributes(this, 'ImportedSubnet', {\n subnetId: 'subnet-0123456789abcdef0',\n availabilityZone: 'us-west-2a',\n ipv4CidrBlock: '10.2.0.0/24',\n routeTableId: 'rtb-0871c310f98da2cbb',\n subnetType: SubnetType.PRIVATE_ISOLATED,\n});\n```\n\nBy importing existing VPCs and subnets, you can easily integrate your existing AWS infrastructure with new resources created through CDK. This is particularly useful when you need to work with pre-existing network configurations or when you're migrating existing infrastructure to CDK.\n"
|
|
3913
3913
|
},
|
|
3914
3914
|
"repository": {
|
|
3915
3915
|
"directory": "packages/@aws-cdk/aws-ec2-alpha",
|
|
@@ -4029,7 +4029,7 @@
|
|
|
4029
4029
|
},
|
|
4030
4030
|
"locationInModule": {
|
|
4031
4031
|
"filename": "lib/route.ts",
|
|
4032
|
-
"line":
|
|
4032
|
+
"line": 232
|
|
4033
4033
|
},
|
|
4034
4034
|
"parameters": [
|
|
4035
4035
|
{
|
|
@@ -4058,7 +4058,7 @@
|
|
|
4058
4058
|
"kind": "class",
|
|
4059
4059
|
"locationInModule": {
|
|
4060
4060
|
"filename": "lib/route.ts",
|
|
4061
|
-
"line":
|
|
4061
|
+
"line": 216
|
|
4062
4062
|
},
|
|
4063
4063
|
"name": "EgressOnlyInternetGateway",
|
|
4064
4064
|
"properties": [
|
|
@@ -4070,7 +4070,7 @@
|
|
|
4070
4070
|
"immutable": true,
|
|
4071
4071
|
"locationInModule": {
|
|
4072
4072
|
"filename": "lib/route.ts",
|
|
4073
|
-
"line":
|
|
4073
|
+
"line": 230
|
|
4074
4074
|
},
|
|
4075
4075
|
"name": "resource",
|
|
4076
4076
|
"type": {
|
|
@@ -4085,7 +4085,7 @@
|
|
|
4085
4085
|
"immutable": true,
|
|
4086
4086
|
"locationInModule": {
|
|
4087
4087
|
"filename": "lib/route.ts",
|
|
4088
|
-
"line":
|
|
4088
|
+
"line": 225
|
|
4089
4089
|
},
|
|
4090
4090
|
"name": "routerTargetId",
|
|
4091
4091
|
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteTarget",
|
|
@@ -4101,7 +4101,7 @@
|
|
|
4101
4101
|
"immutable": true,
|
|
4102
4102
|
"locationInModule": {
|
|
4103
4103
|
"filename": "lib/route.ts",
|
|
4104
|
-
"line":
|
|
4104
|
+
"line": 220
|
|
4105
4105
|
},
|
|
4106
4106
|
"name": "routerType",
|
|
4107
4107
|
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteTarget",
|
|
@@ -4127,7 +4127,7 @@
|
|
|
4127
4127
|
"kind": "interface",
|
|
4128
4128
|
"locationInModule": {
|
|
4129
4129
|
"filename": "lib/vpc-v2-base.ts",
|
|
4130
|
-
"line":
|
|
4130
|
+
"line": 13
|
|
4131
4131
|
},
|
|
4132
4132
|
"name": "EgressOnlyInternetGatewayOptions",
|
|
4133
4133
|
"properties": [
|
|
@@ -4141,7 +4141,7 @@
|
|
|
4141
4141
|
"immutable": true,
|
|
4142
4142
|
"locationInModule": {
|
|
4143
4143
|
"filename": "lib/vpc-v2-base.ts",
|
|
4144
|
-
"line":
|
|
4144
|
+
"line": 26
|
|
4145
4145
|
},
|
|
4146
4146
|
"name": "destination",
|
|
4147
4147
|
"optional": true,
|
|
@@ -4159,7 +4159,7 @@
|
|
|
4159
4159
|
"immutable": true,
|
|
4160
4160
|
"locationInModule": {
|
|
4161
4161
|
"filename": "lib/vpc-v2-base.ts",
|
|
4162
|
-
"line":
|
|
4162
|
+
"line": 19
|
|
4163
4163
|
},
|
|
4164
4164
|
"name": "subnets",
|
|
4165
4165
|
"optional": true,
|
|
@@ -4541,7 +4541,7 @@
|
|
|
4541
4541
|
"kind": "interface",
|
|
4542
4542
|
"locationInModule": {
|
|
4543
4543
|
"filename": "lib/route.ts",
|
|
4544
|
-
"line":
|
|
4544
|
+
"line": 590
|
|
4545
4545
|
},
|
|
4546
4546
|
"name": "IRouteV2",
|
|
4547
4547
|
"properties": [
|
|
@@ -4555,7 +4555,7 @@
|
|
|
4555
4555
|
"immutable": true,
|
|
4556
4556
|
"locationInModule": {
|
|
4557
4557
|
"filename": "lib/route.ts",
|
|
4558
|
-
"line":
|
|
4558
|
+
"line": 603
|
|
4559
4559
|
},
|
|
4560
4560
|
"name": "destination",
|
|
4561
4561
|
"type": {
|
|
@@ -4574,7 +4574,7 @@
|
|
|
4574
4574
|
"immutable": true,
|
|
4575
4575
|
"locationInModule": {
|
|
4576
4576
|
"filename": "lib/route.ts",
|
|
4577
|
-
"line":
|
|
4577
|
+
"line": 595
|
|
4578
4578
|
},
|
|
4579
4579
|
"name": "routeTable",
|
|
4580
4580
|
"type": {
|
|
@@ -4590,7 +4590,7 @@
|
|
|
4590
4590
|
"immutable": true,
|
|
4591
4591
|
"locationInModule": {
|
|
4592
4592
|
"filename": "lib/route.ts",
|
|
4593
|
-
"line":
|
|
4593
|
+
"line": 608
|
|
4594
4594
|
},
|
|
4595
4595
|
"name": "target",
|
|
4596
4596
|
"type": {
|
|
@@ -4756,7 +4756,7 @@
|
|
|
4756
4756
|
"kind": "interface",
|
|
4757
4757
|
"locationInModule": {
|
|
4758
4758
|
"filename": "lib/vpc-v2-base.ts",
|
|
4759
|
-
"line":
|
|
4759
|
+
"line": 85
|
|
4760
4760
|
},
|
|
4761
4761
|
"methods": [
|
|
4762
4762
|
{
|
|
@@ -4768,7 +4768,7 @@
|
|
|
4768
4768
|
},
|
|
4769
4769
|
"locationInModule": {
|
|
4770
4770
|
"filename": "lib/vpc-v2-base.ts",
|
|
4771
|
-
"line":
|
|
4771
|
+
"line": 127
|
|
4772
4772
|
},
|
|
4773
4773
|
"name": "addEgressOnlyInternetGateway",
|
|
4774
4774
|
"parameters": [
|
|
@@ -4791,7 +4791,7 @@
|
|
|
4791
4791
|
},
|
|
4792
4792
|
"locationInModule": {
|
|
4793
4793
|
"filename": "lib/vpc-v2-base.ts",
|
|
4794
|
-
"line":
|
|
4794
|
+
"line": 135
|
|
4795
4795
|
},
|
|
4796
4796
|
"name": "addInternetGateway",
|
|
4797
4797
|
"parameters": [
|
|
@@ -4814,7 +4814,7 @@
|
|
|
4814
4814
|
},
|
|
4815
4815
|
"locationInModule": {
|
|
4816
4816
|
"filename": "lib/vpc-v2-base.ts",
|
|
4817
|
-
"line":
|
|
4817
|
+
"line": 152
|
|
4818
4818
|
},
|
|
4819
4819
|
"name": "addNatGateway",
|
|
4820
4820
|
"parameters": [
|
|
@@ -4831,6 +4831,64 @@
|
|
|
4831
4831
|
}
|
|
4832
4832
|
}
|
|
4833
4833
|
},
|
|
4834
|
+
{
|
|
4835
|
+
"abstract": true,
|
|
4836
|
+
"docs": {
|
|
4837
|
+
"remarks": "For more information, see the {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/peer-with-vpc-in-another-account.html}.",
|
|
4838
|
+
"stability": "experimental",
|
|
4839
|
+
"summary": "Adds a new role to acceptor VPC account A cross account role is required for the VPC to peer with another account."
|
|
4840
|
+
},
|
|
4841
|
+
"locationInModule": {
|
|
4842
|
+
"filename": "lib/vpc-v2-base.ts",
|
|
4843
|
+
"line": 159
|
|
4844
|
+
},
|
|
4845
|
+
"name": "createAcceptorVpcRole",
|
|
4846
|
+
"parameters": [
|
|
4847
|
+
{
|
|
4848
|
+
"name": "requestorAccountId",
|
|
4849
|
+
"type": {
|
|
4850
|
+
"primitive": "string"
|
|
4851
|
+
}
|
|
4852
|
+
}
|
|
4853
|
+
],
|
|
4854
|
+
"returns": {
|
|
4855
|
+
"type": {
|
|
4856
|
+
"fqn": "aws-cdk-lib.aws_iam.Role"
|
|
4857
|
+
}
|
|
4858
|
+
}
|
|
4859
|
+
},
|
|
4860
|
+
{
|
|
4861
|
+
"abstract": true,
|
|
4862
|
+
"docs": {
|
|
4863
|
+
"remarks": "For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html}.",
|
|
4864
|
+
"stability": "experimental",
|
|
4865
|
+
"summary": "Creates a new peering connection A peering connection is a private virtual network established between two VPCs."
|
|
4866
|
+
},
|
|
4867
|
+
"locationInModule": {
|
|
4868
|
+
"filename": "lib/vpc-v2-base.ts",
|
|
4869
|
+
"line": 166
|
|
4870
|
+
},
|
|
4871
|
+
"name": "createPeeringConnection",
|
|
4872
|
+
"parameters": [
|
|
4873
|
+
{
|
|
4874
|
+
"name": "id",
|
|
4875
|
+
"type": {
|
|
4876
|
+
"primitive": "string"
|
|
4877
|
+
}
|
|
4878
|
+
},
|
|
4879
|
+
{
|
|
4880
|
+
"name": "options",
|
|
4881
|
+
"type": {
|
|
4882
|
+
"fqn": "@aws-cdk/aws-ec2-alpha.VPCPeeringConnectionOptions"
|
|
4883
|
+
}
|
|
4884
|
+
}
|
|
4885
|
+
],
|
|
4886
|
+
"returns": {
|
|
4887
|
+
"type": {
|
|
4888
|
+
"fqn": "@aws-cdk/aws-ec2-alpha.VPCPeeringConnection"
|
|
4889
|
+
}
|
|
4890
|
+
}
|
|
4891
|
+
},
|
|
4834
4892
|
{
|
|
4835
4893
|
"abstract": true,
|
|
4836
4894
|
"docs": {
|
|
@@ -4841,7 +4899,7 @@
|
|
|
4841
4899
|
},
|
|
4842
4900
|
"locationInModule": {
|
|
4843
4901
|
"filename": "lib/vpc-v2-base.ts",
|
|
4844
|
-
"line":
|
|
4902
|
+
"line": 143
|
|
4845
4903
|
},
|
|
4846
4904
|
"name": "enableVpnGatewayV2",
|
|
4847
4905
|
"parameters": [
|
|
@@ -4871,7 +4929,7 @@
|
|
|
4871
4929
|
"immutable": true,
|
|
4872
4930
|
"locationInModule": {
|
|
4873
4931
|
"filename": "lib/vpc-v2-base.ts",
|
|
4874
|
-
"line":
|
|
4932
|
+
"line": 99
|
|
4875
4933
|
},
|
|
4876
4934
|
"name": "ipv4CidrBlock",
|
|
4877
4935
|
"type": {
|
|
@@ -4888,7 +4946,7 @@
|
|
|
4888
4946
|
"immutable": true,
|
|
4889
4947
|
"locationInModule": {
|
|
4890
4948
|
"filename": "lib/vpc-v2-base.ts",
|
|
4891
|
-
"line":
|
|
4949
|
+
"line": 113
|
|
4892
4950
|
},
|
|
4893
4951
|
"name": "ownerAccountId",
|
|
4894
4952
|
"type": {
|
|
@@ -4905,7 +4963,7 @@
|
|
|
4905
4963
|
"immutable": true,
|
|
4906
4964
|
"locationInModule": {
|
|
4907
4965
|
"filename": "lib/vpc-v2-base.ts",
|
|
4908
|
-
"line":
|
|
4966
|
+
"line": 106
|
|
4909
4967
|
},
|
|
4910
4968
|
"name": "region",
|
|
4911
4969
|
"type": {
|
|
@@ -4921,7 +4979,7 @@
|
|
|
4921
4979
|
"immutable": true,
|
|
4922
4980
|
"locationInModule": {
|
|
4923
4981
|
"filename": "lib/vpc-v2-base.ts",
|
|
4924
|
-
"line":
|
|
4982
|
+
"line": 120
|
|
4925
4983
|
},
|
|
4926
4984
|
"name": "ipv4IpamProvisionedCidrs",
|
|
4927
4985
|
"optional": true,
|
|
@@ -4944,7 +5002,7 @@
|
|
|
4944
5002
|
"immutable": true,
|
|
4945
5003
|
"locationInModule": {
|
|
4946
5004
|
"filename": "lib/vpc-v2-base.ts",
|
|
4947
|
-
"line":
|
|
5005
|
+
"line": 91
|
|
4948
5006
|
},
|
|
4949
5007
|
"name": "secondaryCidrBlock",
|
|
4950
5008
|
"optional": true,
|
|
@@ -4979,7 +5037,7 @@
|
|
|
4979
5037
|
},
|
|
4980
5038
|
"locationInModule": {
|
|
4981
5039
|
"filename": "lib/route.ts",
|
|
4982
|
-
"line":
|
|
5040
|
+
"line": 271
|
|
4983
5041
|
},
|
|
4984
5042
|
"parameters": [
|
|
4985
5043
|
{
|
|
@@ -5008,7 +5066,7 @@
|
|
|
5008
5066
|
"kind": "class",
|
|
5009
5067
|
"locationInModule": {
|
|
5010
5068
|
"filename": "lib/route.ts",
|
|
5011
|
-
"line":
|
|
5069
|
+
"line": 250
|
|
5012
5070
|
},
|
|
5013
5071
|
"name": "InternetGateway",
|
|
5014
5072
|
"properties": [
|
|
@@ -5020,7 +5078,7 @@
|
|
|
5020
5078
|
"immutable": true,
|
|
5021
5079
|
"locationInModule": {
|
|
5022
5080
|
"filename": "lib/route.ts",
|
|
5023
|
-
"line":
|
|
5081
|
+
"line": 269
|
|
5024
5082
|
},
|
|
5025
5083
|
"name": "resource",
|
|
5026
5084
|
"type": {
|
|
@@ -5035,7 +5093,7 @@
|
|
|
5035
5093
|
"immutable": true,
|
|
5036
5094
|
"locationInModule": {
|
|
5037
5095
|
"filename": "lib/route.ts",
|
|
5038
|
-
"line":
|
|
5096
|
+
"line": 259
|
|
5039
5097
|
},
|
|
5040
5098
|
"name": "routerTargetId",
|
|
5041
5099
|
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteTarget",
|
|
@@ -5051,7 +5109,7 @@
|
|
|
5051
5109
|
"immutable": true,
|
|
5052
5110
|
"locationInModule": {
|
|
5053
5111
|
"filename": "lib/route.ts",
|
|
5054
|
-
"line":
|
|
5112
|
+
"line": 254
|
|
5055
5113
|
},
|
|
5056
5114
|
"name": "routerType",
|
|
5057
5115
|
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteTarget",
|
|
@@ -5067,7 +5125,7 @@
|
|
|
5067
5125
|
"immutable": true,
|
|
5068
5126
|
"locationInModule": {
|
|
5069
5127
|
"filename": "lib/route.ts",
|
|
5070
|
-
"line":
|
|
5128
|
+
"line": 264
|
|
5071
5129
|
},
|
|
5072
5130
|
"name": "vpcId",
|
|
5073
5131
|
"type": {
|
|
@@ -5092,7 +5150,7 @@
|
|
|
5092
5150
|
"kind": "interface",
|
|
5093
5151
|
"locationInModule": {
|
|
5094
5152
|
"filename": "lib/vpc-v2-base.ts",
|
|
5095
|
-
"line":
|
|
5153
|
+
"line": 32
|
|
5096
5154
|
},
|
|
5097
5155
|
"name": "InternetGatewayOptions",
|
|
5098
5156
|
"properties": [
|
|
@@ -5106,7 +5164,7 @@
|
|
|
5106
5164
|
"immutable": true,
|
|
5107
5165
|
"locationInModule": {
|
|
5108
5166
|
"filename": "lib/vpc-v2-base.ts",
|
|
5109
|
-
"line":
|
|
5167
|
+
"line": 39
|
|
5110
5168
|
},
|
|
5111
5169
|
"name": "ipv4Destination",
|
|
5112
5170
|
"optional": true,
|
|
@@ -5124,7 +5182,7 @@
|
|
|
5124
5182
|
"immutable": true,
|
|
5125
5183
|
"locationInModule": {
|
|
5126
5184
|
"filename": "lib/vpc-v2-base.ts",
|
|
5127
|
-
"line":
|
|
5185
|
+
"line": 46
|
|
5128
5186
|
},
|
|
5129
5187
|
"name": "ipv6Destination",
|
|
5130
5188
|
"optional": true,
|
|
@@ -5924,7 +5982,7 @@
|
|
|
5924
5982
|
},
|
|
5925
5983
|
"locationInModule": {
|
|
5926
5984
|
"filename": "lib/route.ts",
|
|
5927
|
-
"line":
|
|
5985
|
+
"line": 398
|
|
5928
5986
|
},
|
|
5929
5987
|
"parameters": [
|
|
5930
5988
|
{
|
|
@@ -5953,7 +6011,7 @@
|
|
|
5953
6011
|
"kind": "class",
|
|
5954
6012
|
"locationInModule": {
|
|
5955
6013
|
"filename": "lib/route.ts",
|
|
5956
|
-
"line":
|
|
6014
|
+
"line": 367
|
|
5957
6015
|
},
|
|
5958
6016
|
"name": "NatGateway",
|
|
5959
6017
|
"properties": [
|
|
@@ -5965,7 +6023,7 @@
|
|
|
5965
6023
|
"immutable": true,
|
|
5966
6024
|
"locationInModule": {
|
|
5967
6025
|
"filename": "lib/route.ts",
|
|
5968
|
-
"line":
|
|
6026
|
+
"line": 396
|
|
5969
6027
|
},
|
|
5970
6028
|
"name": "resource",
|
|
5971
6029
|
"type": {
|
|
@@ -5980,7 +6038,7 @@
|
|
|
5980
6038
|
"immutable": true,
|
|
5981
6039
|
"locationInModule": {
|
|
5982
6040
|
"filename": "lib/route.ts",
|
|
5983
|
-
"line":
|
|
6041
|
+
"line": 376
|
|
5984
6042
|
},
|
|
5985
6043
|
"name": "routerTargetId",
|
|
5986
6044
|
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteTarget",
|
|
@@ -5996,7 +6054,7 @@
|
|
|
5996
6054
|
"immutable": true,
|
|
5997
6055
|
"locationInModule": {
|
|
5998
6056
|
"filename": "lib/route.ts",
|
|
5999
|
-
"line":
|
|
6057
|
+
"line": 371
|
|
6000
6058
|
},
|
|
6001
6059
|
"name": "routerType",
|
|
6002
6060
|
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteTarget",
|
|
@@ -6013,7 +6071,7 @@
|
|
|
6013
6071
|
"immutable": true,
|
|
6014
6072
|
"locationInModule": {
|
|
6015
6073
|
"filename": "lib/route.ts",
|
|
6016
|
-
"line":
|
|
6074
|
+
"line": 383
|
|
6017
6075
|
},
|
|
6018
6076
|
"name": "connectivityType",
|
|
6019
6077
|
"optional": true,
|
|
@@ -6030,7 +6088,7 @@
|
|
|
6030
6088
|
"immutable": true,
|
|
6031
6089
|
"locationInModule": {
|
|
6032
6090
|
"filename": "lib/route.ts",
|
|
6033
|
-
"line":
|
|
6091
|
+
"line": 391
|
|
6034
6092
|
},
|
|
6035
6093
|
"name": "maxDrainDuration",
|
|
6036
6094
|
"optional": true,
|
|
@@ -6422,7 +6480,7 @@
|
|
|
6422
6480
|
},
|
|
6423
6481
|
"locationInModule": {
|
|
6424
6482
|
"filename": "lib/route.ts",
|
|
6425
|
-
"line":
|
|
6483
|
+
"line": 685
|
|
6426
6484
|
},
|
|
6427
6485
|
"parameters": [
|
|
6428
6486
|
{
|
|
@@ -6451,7 +6509,7 @@
|
|
|
6451
6509
|
"kind": "class",
|
|
6452
6510
|
"locationInModule": {
|
|
6453
6511
|
"filename": "lib/route.ts",
|
|
6454
|
-
"line":
|
|
6512
|
+
"line": 646
|
|
6455
6513
|
},
|
|
6456
6514
|
"name": "Route",
|
|
6457
6515
|
"properties": [
|
|
@@ -6464,7 +6522,7 @@
|
|
|
6464
6522
|
"immutable": true,
|
|
6465
6523
|
"locationInModule": {
|
|
6466
6524
|
"filename": "lib/route.ts",
|
|
6467
|
-
"line":
|
|
6525
|
+
"line": 652
|
|
6468
6526
|
},
|
|
6469
6527
|
"name": "destination",
|
|
6470
6528
|
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteV2",
|
|
@@ -6483,7 +6541,7 @@
|
|
|
6483
6541
|
"immutable": true,
|
|
6484
6542
|
"locationInModule": {
|
|
6485
6543
|
"filename": "lib/route.ts",
|
|
6486
|
-
"line":
|
|
6544
|
+
"line": 663
|
|
6487
6545
|
},
|
|
6488
6546
|
"name": "routeTable",
|
|
6489
6547
|
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteV2",
|
|
@@ -6499,7 +6557,7 @@
|
|
|
6499
6557
|
"immutable": true,
|
|
6500
6558
|
"locationInModule": {
|
|
6501
6559
|
"filename": "lib/route.ts",
|
|
6502
|
-
"line":
|
|
6560
|
+
"line": 657
|
|
6503
6561
|
},
|
|
6504
6562
|
"name": "target",
|
|
6505
6563
|
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteV2",
|
|
@@ -6515,7 +6573,7 @@
|
|
|
6515
6573
|
"immutable": true,
|
|
6516
6574
|
"locationInModule": {
|
|
6517
6575
|
"filename": "lib/route.ts",
|
|
6518
|
-
"line":
|
|
6576
|
+
"line": 668
|
|
6519
6577
|
},
|
|
6520
6578
|
"name": "targetRouterType",
|
|
6521
6579
|
"type": {
|
|
@@ -6530,7 +6588,7 @@
|
|
|
6530
6588
|
"immutable": true,
|
|
6531
6589
|
"locationInModule": {
|
|
6532
6590
|
"filename": "lib/route.ts",
|
|
6533
|
-
"line":
|
|
6591
|
+
"line": 673
|
|
6534
6592
|
},
|
|
6535
6593
|
"name": "resource",
|
|
6536
6594
|
"optional": true,
|
|
@@ -6556,7 +6614,7 @@
|
|
|
6556
6614
|
"kind": "interface",
|
|
6557
6615
|
"locationInModule": {
|
|
6558
6616
|
"filename": "lib/route.ts",
|
|
6559
|
-
"line":
|
|
6617
|
+
"line": 614
|
|
6560
6618
|
},
|
|
6561
6619
|
"name": "RouteProps",
|
|
6562
6620
|
"properties": [
|
|
@@ -6570,7 +6628,7 @@
|
|
|
6570
6628
|
"immutable": true,
|
|
6571
6629
|
"locationInModule": {
|
|
6572
6630
|
"filename": "lib/route.ts",
|
|
6573
|
-
"line":
|
|
6631
|
+
"line": 627
|
|
6574
6632
|
},
|
|
6575
6633
|
"name": "destination",
|
|
6576
6634
|
"type": {
|
|
@@ -6589,7 +6647,7 @@
|
|
|
6589
6647
|
"immutable": true,
|
|
6590
6648
|
"locationInModule": {
|
|
6591
6649
|
"filename": "lib/route.ts",
|
|
6592
|
-
"line":
|
|
6650
|
+
"line": 620
|
|
6593
6651
|
},
|
|
6594
6652
|
"name": "routeTable",
|
|
6595
6653
|
"type": {
|
|
@@ -6605,7 +6663,7 @@
|
|
|
6605
6663
|
"immutable": true,
|
|
6606
6664
|
"locationInModule": {
|
|
6607
6665
|
"filename": "lib/route.ts",
|
|
6608
|
-
"line":
|
|
6666
|
+
"line": 632
|
|
6609
6667
|
},
|
|
6610
6668
|
"name": "target",
|
|
6611
6669
|
"type": {
|
|
@@ -6622,7 +6680,7 @@
|
|
|
6622
6680
|
"immutable": true,
|
|
6623
6681
|
"locationInModule": {
|
|
6624
6682
|
"filename": "lib/route.ts",
|
|
6625
|
-
"line":
|
|
6683
|
+
"line": 639
|
|
6626
6684
|
},
|
|
6627
6685
|
"name": "routeName",
|
|
6628
6686
|
"optional": true,
|
|
@@ -6652,7 +6710,7 @@
|
|
|
6652
6710
|
},
|
|
6653
6711
|
"locationInModule": {
|
|
6654
6712
|
"filename": "lib/route.ts",
|
|
6655
|
-
"line":
|
|
6713
|
+
"line": 758
|
|
6656
6714
|
},
|
|
6657
6715
|
"parameters": [
|
|
6658
6716
|
{
|
|
@@ -6681,7 +6739,7 @@
|
|
|
6681
6739
|
"kind": "class",
|
|
6682
6740
|
"locationInModule": {
|
|
6683
6741
|
"filename": "lib/route.ts",
|
|
6684
|
-
"line":
|
|
6742
|
+
"line": 747
|
|
6685
6743
|
},
|
|
6686
6744
|
"methods": [
|
|
6687
6745
|
{
|
|
@@ -6691,7 +6749,7 @@
|
|
|
6691
6749
|
},
|
|
6692
6750
|
"locationInModule": {
|
|
6693
6751
|
"filename": "lib/route.ts",
|
|
6694
|
-
"line":
|
|
6752
|
+
"line": 775
|
|
6695
6753
|
},
|
|
6696
6754
|
"name": "addRoute",
|
|
6697
6755
|
"parameters": [
|
|
@@ -6732,7 +6790,7 @@
|
|
|
6732
6790
|
"immutable": true,
|
|
6733
6791
|
"locationInModule": {
|
|
6734
6792
|
"filename": "lib/route.ts",
|
|
6735
|
-
"line":
|
|
6793
|
+
"line": 756
|
|
6736
6794
|
},
|
|
6737
6795
|
"name": "resource",
|
|
6738
6796
|
"type": {
|
|
@@ -6747,7 +6805,7 @@
|
|
|
6747
6805
|
"immutable": true,
|
|
6748
6806
|
"locationInModule": {
|
|
6749
6807
|
"filename": "lib/route.ts",
|
|
6750
|
-
"line":
|
|
6808
|
+
"line": 751
|
|
6751
6809
|
},
|
|
6752
6810
|
"name": "routeTableId",
|
|
6753
6811
|
"overrides": "aws-cdk-lib.aws_ec2.IRouteTable",
|
|
@@ -6773,7 +6831,7 @@
|
|
|
6773
6831
|
"kind": "interface",
|
|
6774
6832
|
"locationInModule": {
|
|
6775
6833
|
"filename": "lib/route.ts",
|
|
6776
|
-
"line":
|
|
6834
|
+
"line": 729
|
|
6777
6835
|
},
|
|
6778
6836
|
"name": "RouteTableProps",
|
|
6779
6837
|
"properties": [
|
|
@@ -6786,7 +6844,7 @@
|
|
|
6786
6844
|
"immutable": true,
|
|
6787
6845
|
"locationInModule": {
|
|
6788
6846
|
"filename": "lib/route.ts",
|
|
6789
|
-
"line":
|
|
6847
|
+
"line": 733
|
|
6790
6848
|
},
|
|
6791
6849
|
"name": "vpc",
|
|
6792
6850
|
"type": {
|
|
@@ -6803,7 +6861,7 @@
|
|
|
6803
6861
|
"immutable": true,
|
|
6804
6862
|
"locationInModule": {
|
|
6805
6863
|
"filename": "lib/route.ts",
|
|
6806
|
-
"line":
|
|
6864
|
+
"line": 740
|
|
6807
6865
|
},
|
|
6808
6866
|
"name": "routeTableName",
|
|
6809
6867
|
"optional": true,
|
|
@@ -6829,7 +6887,7 @@
|
|
|
6829
6887
|
"kind": "interface",
|
|
6830
6888
|
"locationInModule": {
|
|
6831
6889
|
"filename": "lib/route.ts",
|
|
6832
|
-
"line":
|
|
6890
|
+
"line": 539
|
|
6833
6891
|
},
|
|
6834
6892
|
"name": "RouteTargetProps",
|
|
6835
6893
|
"properties": [
|
|
@@ -6844,7 +6902,7 @@
|
|
|
6844
6902
|
"immutable": true,
|
|
6845
6903
|
"locationInModule": {
|
|
6846
6904
|
"filename": "lib/route.ts",
|
|
6847
|
-
"line":
|
|
6905
|
+
"line": 554
|
|
6848
6906
|
},
|
|
6849
6907
|
"name": "endpoint",
|
|
6850
6908
|
"optional": true,
|
|
@@ -6863,7 +6921,7 @@
|
|
|
6863
6921
|
"immutable": true,
|
|
6864
6922
|
"locationInModule": {
|
|
6865
6923
|
"filename": "lib/route.ts",
|
|
6866
|
-
"line":
|
|
6924
|
+
"line": 546
|
|
6867
6925
|
},
|
|
6868
6926
|
"name": "gateway",
|
|
6869
6927
|
"optional": true,
|
|
@@ -6891,7 +6949,7 @@
|
|
|
6891
6949
|
},
|
|
6892
6950
|
"locationInModule": {
|
|
6893
6951
|
"filename": "lib/route.ts",
|
|
6894
|
-
"line":
|
|
6952
|
+
"line": 577
|
|
6895
6953
|
},
|
|
6896
6954
|
"parameters": [
|
|
6897
6955
|
{
|
|
@@ -6905,7 +6963,7 @@
|
|
|
6905
6963
|
"kind": "class",
|
|
6906
6964
|
"locationInModule": {
|
|
6907
6965
|
"filename": "lib/route.ts",
|
|
6908
|
-
"line":
|
|
6966
|
+
"line": 560
|
|
6909
6967
|
},
|
|
6910
6968
|
"name": "RouteTargetType",
|
|
6911
6969
|
"properties": [
|
|
@@ -6919,7 +6977,7 @@
|
|
|
6919
6977
|
"immutable": true,
|
|
6920
6978
|
"locationInModule": {
|
|
6921
6979
|
"filename": "lib/route.ts",
|
|
6922
|
-
"line":
|
|
6980
|
+
"line": 575
|
|
6923
6981
|
},
|
|
6924
6982
|
"name": "endpoint",
|
|
6925
6983
|
"optional": true,
|
|
@@ -6937,7 +6995,7 @@
|
|
|
6937
6995
|
"immutable": true,
|
|
6938
6996
|
"locationInModule": {
|
|
6939
6997
|
"filename": "lib/route.ts",
|
|
6940
|
-
"line":
|
|
6998
|
+
"line": 567
|
|
6941
6999
|
},
|
|
6942
7000
|
"name": "gateway",
|
|
6943
7001
|
"optional": true,
|
|
@@ -7733,6 +7791,223 @@
|
|
|
7733
7791
|
],
|
|
7734
7792
|
"symbolId": "lib/vpc-v2:VPCCidrBlockattributes"
|
|
7735
7793
|
},
|
|
7794
|
+
"@aws-cdk/aws-ec2-alpha.VPCPeeringConnection": {
|
|
7795
|
+
"assembly": "@aws-cdk/aws-ec2-alpha",
|
|
7796
|
+
"base": "aws-cdk-lib.Resource",
|
|
7797
|
+
"docs": {
|
|
7798
|
+
"custom": {
|
|
7799
|
+
"resource": "AWS::EC2::VPCPeeringConnection",
|
|
7800
|
+
"exampleMetadata": "infused"
|
|
7801
|
+
},
|
|
7802
|
+
"stability": "experimental",
|
|
7803
|
+
"summary": "Creates a peering connection between two VPCs.",
|
|
7804
|
+
"example": "const stack = new Stack();\n\nconst acceptorVpc = new VpcV2(this, 'VpcA', {\n primaryAddressBlock: IpAddresses.ipv4('10.0.0.0/16'),\n});\n\nconst requestorVpc = new VpcV2(this, 'VpcB', {\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n});\n\nconst peeringConnection = requestorVpc.createPeeringConnection('peeringConnection', {\n acceptorVpc: acceptorVpc,\n});\n\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: requestorVpc,\n});\n\nrouteTable.addRoute('vpcPeeringRoute', '10.0.0.0/16', { gateway: peeringConnection });"
|
|
7805
|
+
},
|
|
7806
|
+
"fqn": "@aws-cdk/aws-ec2-alpha.VPCPeeringConnection",
|
|
7807
|
+
"initializer": {
|
|
7808
|
+
"docs": {
|
|
7809
|
+
"stability": "experimental"
|
|
7810
|
+
},
|
|
7811
|
+
"locationInModule": {
|
|
7812
|
+
"filename": "lib/route.ts",
|
|
7813
|
+
"line": 460
|
|
7814
|
+
},
|
|
7815
|
+
"parameters": [
|
|
7816
|
+
{
|
|
7817
|
+
"name": "scope",
|
|
7818
|
+
"type": {
|
|
7819
|
+
"fqn": "constructs.Construct"
|
|
7820
|
+
}
|
|
7821
|
+
},
|
|
7822
|
+
{
|
|
7823
|
+
"name": "id",
|
|
7824
|
+
"type": {
|
|
7825
|
+
"primitive": "string"
|
|
7826
|
+
}
|
|
7827
|
+
},
|
|
7828
|
+
{
|
|
7829
|
+
"name": "props",
|
|
7830
|
+
"type": {
|
|
7831
|
+
"fqn": "@aws-cdk/aws-ec2-alpha.VPCPeeringConnectionProps"
|
|
7832
|
+
}
|
|
7833
|
+
}
|
|
7834
|
+
]
|
|
7835
|
+
},
|
|
7836
|
+
"interfaces": [
|
|
7837
|
+
"@aws-cdk/aws-ec2-alpha.IRouteTarget"
|
|
7838
|
+
],
|
|
7839
|
+
"kind": "class",
|
|
7840
|
+
"locationInModule": {
|
|
7841
|
+
"filename": "lib/route.ts",
|
|
7842
|
+
"line": 443
|
|
7843
|
+
},
|
|
7844
|
+
"name": "VPCPeeringConnection",
|
|
7845
|
+
"properties": [
|
|
7846
|
+
{
|
|
7847
|
+
"docs": {
|
|
7848
|
+
"stability": "experimental",
|
|
7849
|
+
"summary": "The VPC peering connection CFN resource."
|
|
7850
|
+
},
|
|
7851
|
+
"immutable": true,
|
|
7852
|
+
"locationInModule": {
|
|
7853
|
+
"filename": "lib/route.ts",
|
|
7854
|
+
"line": 458
|
|
7855
|
+
},
|
|
7856
|
+
"name": "resource",
|
|
7857
|
+
"type": {
|
|
7858
|
+
"fqn": "aws-cdk-lib.aws_ec2.CfnVPCPeeringConnection"
|
|
7859
|
+
}
|
|
7860
|
+
},
|
|
7861
|
+
{
|
|
7862
|
+
"docs": {
|
|
7863
|
+
"stability": "experimental",
|
|
7864
|
+
"summary": "The ID of the route target."
|
|
7865
|
+
},
|
|
7866
|
+
"immutable": true,
|
|
7867
|
+
"locationInModule": {
|
|
7868
|
+
"filename": "lib/route.ts",
|
|
7869
|
+
"line": 453
|
|
7870
|
+
},
|
|
7871
|
+
"name": "routerTargetId",
|
|
7872
|
+
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteTarget",
|
|
7873
|
+
"type": {
|
|
7874
|
+
"primitive": "string"
|
|
7875
|
+
}
|
|
7876
|
+
},
|
|
7877
|
+
{
|
|
7878
|
+
"docs": {
|
|
7879
|
+
"stability": "experimental",
|
|
7880
|
+
"summary": "The type of router used in the route."
|
|
7881
|
+
},
|
|
7882
|
+
"immutable": true,
|
|
7883
|
+
"locationInModule": {
|
|
7884
|
+
"filename": "lib/route.ts",
|
|
7885
|
+
"line": 448
|
|
7886
|
+
},
|
|
7887
|
+
"name": "routerType",
|
|
7888
|
+
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteTarget",
|
|
7889
|
+
"type": {
|
|
7890
|
+
"fqn": "aws-cdk-lib.aws_ec2.RouterType"
|
|
7891
|
+
}
|
|
7892
|
+
}
|
|
7893
|
+
],
|
|
7894
|
+
"symbolId": "lib/route:VPCPeeringConnection"
|
|
7895
|
+
},
|
|
7896
|
+
"@aws-cdk/aws-ec2-alpha.VPCPeeringConnectionOptions": {
|
|
7897
|
+
"assembly": "@aws-cdk/aws-ec2-alpha",
|
|
7898
|
+
"datatype": true,
|
|
7899
|
+
"docs": {
|
|
7900
|
+
"stability": "experimental",
|
|
7901
|
+
"summary": "Options to define a VPC peering connection.",
|
|
7902
|
+
"example": "const stack = new Stack();\n\nconst acceptorVpc = new VpcV2(this, 'VpcA', {\n primaryAddressBlock: IpAddresses.ipv4('10.0.0.0/16'),\n});\n\nconst requestorVpc = new VpcV2(this, 'VpcB', {\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n});\n\nconst peeringConnection = requestorVpc.createPeeringConnection('peeringConnection', {\n acceptorVpc: acceptorVpc,\n});\n\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: requestorVpc,\n});\n\nrouteTable.addRoute('vpcPeeringRoute', '10.0.0.0/16', { gateway: peeringConnection });",
|
|
7903
|
+
"custom": {
|
|
7904
|
+
"exampleMetadata": "infused"
|
|
7905
|
+
}
|
|
7906
|
+
},
|
|
7907
|
+
"fqn": "@aws-cdk/aws-ec2-alpha.VPCPeeringConnectionOptions",
|
|
7908
|
+
"kind": "interface",
|
|
7909
|
+
"locationInModule": {
|
|
7910
|
+
"filename": "lib/route.ts",
|
|
7911
|
+
"line": 181
|
|
7912
|
+
},
|
|
7913
|
+
"name": "VPCPeeringConnectionOptions",
|
|
7914
|
+
"properties": [
|
|
7915
|
+
{
|
|
7916
|
+
"abstract": true,
|
|
7917
|
+
"docs": {
|
|
7918
|
+
"stability": "experimental",
|
|
7919
|
+
"summary": "The VPC that is accepting the peering connection."
|
|
7920
|
+
},
|
|
7921
|
+
"immutable": true,
|
|
7922
|
+
"locationInModule": {
|
|
7923
|
+
"filename": "lib/route.ts",
|
|
7924
|
+
"line": 185
|
|
7925
|
+
},
|
|
7926
|
+
"name": "acceptorVpc",
|
|
7927
|
+
"type": {
|
|
7928
|
+
"fqn": "@aws-cdk/aws-ec2-alpha.IVpcV2"
|
|
7929
|
+
}
|
|
7930
|
+
},
|
|
7931
|
+
{
|
|
7932
|
+
"abstract": true,
|
|
7933
|
+
"docs": {
|
|
7934
|
+
"default": "- no peerRoleArn needed if not cross account connection",
|
|
7935
|
+
"stability": "experimental",
|
|
7936
|
+
"summary": "The role arn created in the acceptor account."
|
|
7937
|
+
},
|
|
7938
|
+
"immutable": true,
|
|
7939
|
+
"locationInModule": {
|
|
7940
|
+
"filename": "lib/route.ts",
|
|
7941
|
+
"line": 192
|
|
7942
|
+
},
|
|
7943
|
+
"name": "peerRoleArn",
|
|
7944
|
+
"optional": true,
|
|
7945
|
+
"type": {
|
|
7946
|
+
"primitive": "string"
|
|
7947
|
+
}
|
|
7948
|
+
},
|
|
7949
|
+
{
|
|
7950
|
+
"abstract": true,
|
|
7951
|
+
"docs": {
|
|
7952
|
+
"default": "- peering connection provisioned without any name",
|
|
7953
|
+
"stability": "experimental",
|
|
7954
|
+
"summary": "The resource name of the peering connection."
|
|
7955
|
+
},
|
|
7956
|
+
"immutable": true,
|
|
7957
|
+
"locationInModule": {
|
|
7958
|
+
"filename": "lib/route.ts",
|
|
7959
|
+
"line": 199
|
|
7960
|
+
},
|
|
7961
|
+
"name": "vpcPeeringConnectionName",
|
|
7962
|
+
"optional": true,
|
|
7963
|
+
"type": {
|
|
7964
|
+
"primitive": "string"
|
|
7965
|
+
}
|
|
7966
|
+
}
|
|
7967
|
+
],
|
|
7968
|
+
"symbolId": "lib/route:VPCPeeringConnectionOptions"
|
|
7969
|
+
},
|
|
7970
|
+
"@aws-cdk/aws-ec2-alpha.VPCPeeringConnectionProps": {
|
|
7971
|
+
"assembly": "@aws-cdk/aws-ec2-alpha",
|
|
7972
|
+
"datatype": true,
|
|
7973
|
+
"docs": {
|
|
7974
|
+
"stability": "experimental",
|
|
7975
|
+
"summary": "Properties to define a VPC peering connection.",
|
|
7976
|
+
"example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as ec2_alpha from '@aws-cdk/aws-ec2-alpha';\n\ndeclare const vpcV2: ec2_alpha.VpcV2;\nconst vPCPeeringConnectionProps: ec2_alpha.VPCPeeringConnectionProps = {\n acceptorVpc: vpcV2,\n requestorVpc: vpcV2,\n\n // the properties below are optional\n peerRoleArn: 'peerRoleArn',\n vpcPeeringConnectionName: 'vpcPeeringConnectionName',\n};",
|
|
7977
|
+
"custom": {
|
|
7978
|
+
"exampleMetadata": "fixture=_generated"
|
|
7979
|
+
}
|
|
7980
|
+
},
|
|
7981
|
+
"fqn": "@aws-cdk/aws-ec2-alpha.VPCPeeringConnectionProps",
|
|
7982
|
+
"interfaces": [
|
|
7983
|
+
"@aws-cdk/aws-ec2-alpha.VPCPeeringConnectionOptions"
|
|
7984
|
+
],
|
|
7985
|
+
"kind": "interface",
|
|
7986
|
+
"locationInModule": {
|
|
7987
|
+
"filename": "lib/route.ts",
|
|
7988
|
+
"line": 205
|
|
7989
|
+
},
|
|
7990
|
+
"name": "VPCPeeringConnectionProps",
|
|
7991
|
+
"properties": [
|
|
7992
|
+
{
|
|
7993
|
+
"abstract": true,
|
|
7994
|
+
"docs": {
|
|
7995
|
+
"stability": "experimental",
|
|
7996
|
+
"summary": "The VPC that is requesting the peering connection."
|
|
7997
|
+
},
|
|
7998
|
+
"immutable": true,
|
|
7999
|
+
"locationInModule": {
|
|
8000
|
+
"filename": "lib/route.ts",
|
|
8001
|
+
"line": 209
|
|
8002
|
+
},
|
|
8003
|
+
"name": "requestorVpc",
|
|
8004
|
+
"type": {
|
|
8005
|
+
"fqn": "@aws-cdk/aws-ec2-alpha.IVpcV2"
|
|
8006
|
+
}
|
|
8007
|
+
}
|
|
8008
|
+
],
|
|
8009
|
+
"symbolId": "lib/route:VPCPeeringConnectionProps"
|
|
8010
|
+
},
|
|
7736
8011
|
"@aws-cdk/aws-ec2-alpha.VPNGatewayV2": {
|
|
7737
8012
|
"assembly": "@aws-cdk/aws-ec2-alpha",
|
|
7738
8013
|
"base": "aws-cdk-lib.Resource",
|
|
@@ -7752,7 +8027,7 @@
|
|
|
7752
8027
|
},
|
|
7753
8028
|
"locationInModule": {
|
|
7754
8029
|
"filename": "lib/route.ts",
|
|
7755
|
-
"line":
|
|
8030
|
+
"line": 324
|
|
7756
8031
|
},
|
|
7757
8032
|
"parameters": [
|
|
7758
8033
|
{
|
|
@@ -7781,7 +8056,7 @@
|
|
|
7781
8056
|
"kind": "class",
|
|
7782
8057
|
"locationInModule": {
|
|
7783
8058
|
"filename": "lib/route.ts",
|
|
7784
|
-
"line":
|
|
8059
|
+
"line": 293
|
|
7785
8060
|
},
|
|
7786
8061
|
"name": "VPNGatewayV2",
|
|
7787
8062
|
"properties": [
|
|
@@ -7793,7 +8068,7 @@
|
|
|
7793
8068
|
"immutable": true,
|
|
7794
8069
|
"locationInModule": {
|
|
7795
8070
|
"filename": "lib/route.ts",
|
|
7796
|
-
"line":
|
|
8071
|
+
"line": 312
|
|
7797
8072
|
},
|
|
7798
8073
|
"name": "resource",
|
|
7799
8074
|
"type": {
|
|
@@ -7808,7 +8083,7 @@
|
|
|
7808
8083
|
"immutable": true,
|
|
7809
8084
|
"locationInModule": {
|
|
7810
8085
|
"filename": "lib/route.ts",
|
|
7811
|
-
"line":
|
|
8086
|
+
"line": 302
|
|
7812
8087
|
},
|
|
7813
8088
|
"name": "routerTargetId",
|
|
7814
8089
|
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteTarget",
|
|
@@ -7824,7 +8099,7 @@
|
|
|
7824
8099
|
"immutable": true,
|
|
7825
8100
|
"locationInModule": {
|
|
7826
8101
|
"filename": "lib/route.ts",
|
|
7827
|
-
"line":
|
|
8102
|
+
"line": 297
|
|
7828
8103
|
},
|
|
7829
8104
|
"name": "routerType",
|
|
7830
8105
|
"overrides": "@aws-cdk/aws-ec2-alpha.IRouteTarget",
|
|
@@ -7840,7 +8115,7 @@
|
|
|
7840
8115
|
"immutable": true,
|
|
7841
8116
|
"locationInModule": {
|
|
7842
8117
|
"filename": "lib/route.ts",
|
|
7843
|
-
"line":
|
|
8118
|
+
"line": 307
|
|
7844
8119
|
},
|
|
7845
8120
|
"name": "vpcId",
|
|
7846
8121
|
"type": {
|
|
@@ -7865,7 +8140,7 @@
|
|
|
7865
8140
|
"kind": "interface",
|
|
7866
8141
|
"locationInModule": {
|
|
7867
8142
|
"filename": "lib/vpc-v2-base.ts",
|
|
7868
|
-
"line":
|
|
8143
|
+
"line": 52
|
|
7869
8144
|
},
|
|
7870
8145
|
"name": "VPNGatewayV2Options",
|
|
7871
8146
|
"properties": [
|
|
@@ -7879,7 +8154,7 @@
|
|
|
7879
8154
|
"immutable": true,
|
|
7880
8155
|
"locationInModule": {
|
|
7881
8156
|
"filename": "lib/vpc-v2-base.ts",
|
|
7882
|
-
"line":
|
|
8157
|
+
"line": 57
|
|
7883
8158
|
},
|
|
7884
8159
|
"name": "type",
|
|
7885
8160
|
"type": {
|
|
@@ -7896,7 +8171,7 @@
|
|
|
7896
8171
|
"immutable": true,
|
|
7897
8172
|
"locationInModule": {
|
|
7898
8173
|
"filename": "lib/vpc-v2-base.ts",
|
|
7899
|
-
"line":
|
|
8174
|
+
"line": 64
|
|
7900
8175
|
},
|
|
7901
8176
|
"name": "amazonSideAsn",
|
|
7902
8177
|
"optional": true,
|
|
@@ -7914,7 +8189,7 @@
|
|
|
7914
8189
|
"immutable": true,
|
|
7915
8190
|
"locationInModule": {
|
|
7916
8191
|
"filename": "lib/vpc-v2-base.ts",
|
|
7917
|
-
"line":
|
|
8192
|
+
"line": 71
|
|
7918
8193
|
},
|
|
7919
8194
|
"name": "vpnGatewayName",
|
|
7920
8195
|
"optional": true,
|
|
@@ -7932,7 +8207,7 @@
|
|
|
7932
8207
|
"immutable": true,
|
|
7933
8208
|
"locationInModule": {
|
|
7934
8209
|
"filename": "lib/vpc-v2-base.ts",
|
|
7935
|
-
"line":
|
|
8210
|
+
"line": 78
|
|
7936
8211
|
},
|
|
7937
8212
|
"name": "vpnRoutePropagation",
|
|
7938
8213
|
"optional": true,
|
|
@@ -8194,7 +8469,7 @@
|
|
|
8194
8469
|
"remarks": "For more information, see the {@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html AWS CDK Documentation on VPCs}.",
|
|
8195
8470
|
"stability": "experimental",
|
|
8196
8471
|
"summary": "This class provides a foundation for creating and configuring a VPC with advanced features such as IPAM (IP Address Management) and IPv6 support.",
|
|
8197
|
-
"example": "\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc');\nconst
|
|
8472
|
+
"example": "\nconst stack = new Stack();\nconst myVpc = new VpcV2(this, 'Vpc',{\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n secondaryAddressBlocks: [IpAddresses.amazonProvidedIpv6({\n cidrBlockName: 'AmazonProvided',\n })]\n });\n\nconst eigw = new EgressOnlyInternetGateway(this, 'EIGW', {\n vpc: myVpc,\n});\n\nconst routeTable = new RouteTable(this, 'RouteTable', {\n vpc: myVpc,\n});\n\nrouteTable.addRoute('EIGW', '::/0', { gateway: eigw });"
|
|
8198
8473
|
},
|
|
8199
8474
|
"fqn": "@aws-cdk/aws-ec2-alpha.VpcV2",
|
|
8200
8475
|
"initializer": {
|
|
@@ -8412,7 +8687,7 @@
|
|
|
8412
8687
|
{
|
|
8413
8688
|
"docs": {
|
|
8414
8689
|
"stability": "experimental",
|
|
8415
|
-
"summary": "
|
|
8690
|
+
"summary": "Public Subnets that are part of this VPC."
|
|
8416
8691
|
},
|
|
8417
8692
|
"immutable": true,
|
|
8418
8693
|
"locationInModule": {
|
|
@@ -8605,7 +8880,7 @@
|
|
|
8605
8880
|
"docs": {
|
|
8606
8881
|
"stability": "experimental",
|
|
8607
8882
|
"summary": "Options to import a VPC created outside of CDK stack.",
|
|
8608
|
-
"example": "
|
|
8883
|
+
"example": "const stack = new Stack();\n\nconst acceptorVpc = VpcV2.fromVpcV2Attributes(this, 'acceptorVpc', {\n vpcId: 'vpc-XXXX',\n vpcCidrBlock: '10.0.0.0/16',\n region: 'us-east-2',\n ownerAccountId: '111111111111',\n });\n\nconst acceptorRoleArn = 'arn:aws:iam::111111111111:role/VpcPeeringRole';\n\nconst requestorVpc = new VpcV2(this, 'VpcB', {\n primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),\n});\n\nconst peeringConnection = requestorVpc.createPeeringConnection('crossAccountCrossRegionPeering', {\n acceptorVpc: acceptorVpc,\n peerRoleArn: acceptorRoleArn,\n});",
|
|
8609
8884
|
"custom": {
|
|
8610
8885
|
"exampleMetadata": "infused"
|
|
8611
8886
|
}
|
|
@@ -8799,7 +9074,7 @@
|
|
|
8799
9074
|
"kind": "class",
|
|
8800
9075
|
"locationInModule": {
|
|
8801
9076
|
"filename": "lib/vpc-v2-base.ts",
|
|
8802
|
-
"line":
|
|
9077
|
+
"line": 174
|
|
8803
9078
|
},
|
|
8804
9079
|
"methods": [
|
|
8805
9080
|
{
|
|
@@ -8809,7 +9084,7 @@
|
|
|
8809
9084
|
},
|
|
8810
9085
|
"locationInModule": {
|
|
8811
9086
|
"filename": "lib/vpc-v2-base.ts",
|
|
8812
|
-
"line":
|
|
9087
|
+
"line": 362
|
|
8813
9088
|
},
|
|
8814
9089
|
"name": "addClientVpnEndpoint",
|
|
8815
9090
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -8841,7 +9116,7 @@
|
|
|
8841
9116
|
},
|
|
8842
9117
|
"locationInModule": {
|
|
8843
9118
|
"filename": "lib/vpc-v2-base.ts",
|
|
8844
|
-
"line":
|
|
9119
|
+
"line": 395
|
|
8845
9120
|
},
|
|
8846
9121
|
"name": "addEgressOnlyInternetGateway",
|
|
8847
9122
|
"overrides": "@aws-cdk/aws-ec2-alpha.IVpcV2",
|
|
@@ -8862,7 +9137,7 @@
|
|
|
8862
9137
|
},
|
|
8863
9138
|
"locationInModule": {
|
|
8864
9139
|
"filename": "lib/vpc-v2-base.ts",
|
|
8865
|
-
"line":
|
|
9140
|
+
"line": 497
|
|
8866
9141
|
},
|
|
8867
9142
|
"name": "addFlowLog",
|
|
8868
9143
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -8894,7 +9169,7 @@
|
|
|
8894
9169
|
},
|
|
8895
9170
|
"locationInModule": {
|
|
8896
9171
|
"filename": "lib/vpc-v2-base.ts",
|
|
8897
|
-
"line":
|
|
9172
|
+
"line": 382
|
|
8898
9173
|
},
|
|
8899
9174
|
"name": "addGatewayEndpoint",
|
|
8900
9175
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -8925,7 +9200,7 @@
|
|
|
8925
9200
|
},
|
|
8926
9201
|
"locationInModule": {
|
|
8927
9202
|
"filename": "lib/vpc-v2-base.ts",
|
|
8928
|
-
"line":
|
|
9203
|
+
"line": 372
|
|
8929
9204
|
},
|
|
8930
9205
|
"name": "addInterfaceEndpoint",
|
|
8931
9206
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -8957,7 +9232,7 @@
|
|
|
8957
9232
|
},
|
|
8958
9233
|
"locationInModule": {
|
|
8959
9234
|
"filename": "lib/vpc-v2-base.ts",
|
|
8960
|
-
"line":
|
|
9235
|
+
"line": 436
|
|
8961
9236
|
},
|
|
8962
9237
|
"name": "addInternetGateway",
|
|
8963
9238
|
"overrides": "@aws-cdk/aws-ec2-alpha.IVpcV2",
|
|
@@ -8978,7 +9253,7 @@
|
|
|
8978
9253
|
},
|
|
8979
9254
|
"locationInModule": {
|
|
8980
9255
|
"filename": "lib/vpc-v2-base.ts",
|
|
8981
|
-
"line":
|
|
9256
|
+
"line": 484
|
|
8982
9257
|
},
|
|
8983
9258
|
"name": "addNatGateway",
|
|
8984
9259
|
"overrides": "@aws-cdk/aws-ec2-alpha.IVpcV2",
|
|
@@ -9003,7 +9278,7 @@
|
|
|
9003
9278
|
},
|
|
9004
9279
|
"locationInModule": {
|
|
9005
9280
|
"filename": "lib/vpc-v2-base.ts",
|
|
9006
|
-
"line":
|
|
9281
|
+
"line": 352
|
|
9007
9282
|
},
|
|
9008
9283
|
"name": "addVpnConnection",
|
|
9009
9284
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -9027,6 +9302,62 @@
|
|
|
9027
9302
|
}
|
|
9028
9303
|
}
|
|
9029
9304
|
},
|
|
9305
|
+
{
|
|
9306
|
+
"docs": {
|
|
9307
|
+
"stability": "experimental",
|
|
9308
|
+
"summary": "Creates peering connection role for acceptor VPC."
|
|
9309
|
+
},
|
|
9310
|
+
"locationInModule": {
|
|
9311
|
+
"filename": "lib/vpc-v2-base.ts",
|
|
9312
|
+
"line": 507
|
|
9313
|
+
},
|
|
9314
|
+
"name": "createAcceptorVpcRole",
|
|
9315
|
+
"overrides": "@aws-cdk/aws-ec2-alpha.IVpcV2",
|
|
9316
|
+
"parameters": [
|
|
9317
|
+
{
|
|
9318
|
+
"name": "requestorAccountId",
|
|
9319
|
+
"type": {
|
|
9320
|
+
"primitive": "string"
|
|
9321
|
+
}
|
|
9322
|
+
}
|
|
9323
|
+
],
|
|
9324
|
+
"returns": {
|
|
9325
|
+
"type": {
|
|
9326
|
+
"fqn": "aws-cdk-lib.aws_iam.Role"
|
|
9327
|
+
}
|
|
9328
|
+
}
|
|
9329
|
+
},
|
|
9330
|
+
{
|
|
9331
|
+
"docs": {
|
|
9332
|
+
"stability": "experimental",
|
|
9333
|
+
"summary": "Creates a peering connection."
|
|
9334
|
+
},
|
|
9335
|
+
"locationInModule": {
|
|
9336
|
+
"filename": "lib/vpc-v2-base.ts",
|
|
9337
|
+
"line": 537
|
|
9338
|
+
},
|
|
9339
|
+
"name": "createPeeringConnection",
|
|
9340
|
+
"overrides": "@aws-cdk/aws-ec2-alpha.IVpcV2",
|
|
9341
|
+
"parameters": [
|
|
9342
|
+
{
|
|
9343
|
+
"name": "id",
|
|
9344
|
+
"type": {
|
|
9345
|
+
"primitive": "string"
|
|
9346
|
+
}
|
|
9347
|
+
},
|
|
9348
|
+
{
|
|
9349
|
+
"name": "options",
|
|
9350
|
+
"type": {
|
|
9351
|
+
"fqn": "@aws-cdk/aws-ec2-alpha.VPCPeeringConnectionOptions"
|
|
9352
|
+
}
|
|
9353
|
+
}
|
|
9354
|
+
],
|
|
9355
|
+
"returns": {
|
|
9356
|
+
"type": {
|
|
9357
|
+
"fqn": "@aws-cdk/aws-ec2-alpha.VPCPeeringConnection"
|
|
9358
|
+
}
|
|
9359
|
+
}
|
|
9360
|
+
},
|
|
9030
9361
|
{
|
|
9031
9362
|
"docs": {
|
|
9032
9363
|
"deprecated": "use enableVpnGatewayV2 for compatibility with VPCV2.Route",
|
|
@@ -9035,7 +9366,7 @@
|
|
|
9035
9366
|
},
|
|
9036
9367
|
"locationInModule": {
|
|
9037
9368
|
"filename": "lib/vpc-v2-base.ts",
|
|
9038
|
-
"line":
|
|
9369
|
+
"line": 295
|
|
9039
9370
|
},
|
|
9040
9371
|
"name": "enableVpnGateway",
|
|
9041
9372
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -9055,7 +9386,7 @@
|
|
|
9055
9386
|
},
|
|
9056
9387
|
"locationInModule": {
|
|
9057
9388
|
"filename": "lib/vpc-v2-base.ts",
|
|
9058
|
-
"line":
|
|
9389
|
+
"line": 333
|
|
9059
9390
|
},
|
|
9060
9391
|
"name": "enableVpnGatewayV2",
|
|
9061
9392
|
"overrides": "@aws-cdk/aws-ec2-alpha.IVpcV2",
|
|
@@ -9080,7 +9411,7 @@
|
|
|
9080
9411
|
},
|
|
9081
9412
|
"locationInModule": {
|
|
9082
9413
|
"filename": "lib/vpc-v2-base.ts",
|
|
9083
|
-
"line":
|
|
9414
|
+
"line": 561
|
|
9084
9415
|
},
|
|
9085
9416
|
"name": "selectSubnetObjects",
|
|
9086
9417
|
"parameters": [
|
|
@@ -9112,7 +9443,7 @@
|
|
|
9112
9443
|
},
|
|
9113
9444
|
"locationInModule": {
|
|
9114
9445
|
"filename": "lib/vpc-v2-base.ts",
|
|
9115
|
-
"line":
|
|
9446
|
+
"line": 277
|
|
9116
9447
|
},
|
|
9117
9448
|
"name": "selectSubnets",
|
|
9118
9449
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -9142,7 +9473,7 @@
|
|
|
9142
9473
|
"immutable": true,
|
|
9143
9474
|
"locationInModule": {
|
|
9144
9475
|
"filename": "lib/vpc-v2-base.ts",
|
|
9145
|
-
"line":
|
|
9476
|
+
"line": 209
|
|
9146
9477
|
},
|
|
9147
9478
|
"name": "availabilityZones",
|
|
9148
9479
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -9164,7 +9495,7 @@
|
|
|
9164
9495
|
"immutable": true,
|
|
9165
9496
|
"locationInModule": {
|
|
9166
9497
|
"filename": "lib/vpc-v2-base.ts",
|
|
9167
|
-
"line":
|
|
9498
|
+
"line": 214
|
|
9168
9499
|
},
|
|
9169
9500
|
"name": "internetConnectivityEstablished",
|
|
9170
9501
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -9182,7 +9513,7 @@
|
|
|
9182
9513
|
"immutable": true,
|
|
9183
9514
|
"locationInModule": {
|
|
9184
9515
|
"filename": "lib/vpc-v2-base.ts",
|
|
9185
|
-
"line":
|
|
9516
|
+
"line": 235
|
|
9186
9517
|
},
|
|
9187
9518
|
"name": "ipv4CidrBlock",
|
|
9188
9519
|
"overrides": "@aws-cdk/aws-ec2-alpha.IVpcV2",
|
|
@@ -9199,7 +9530,7 @@
|
|
|
9199
9530
|
"immutable": true,
|
|
9200
9531
|
"locationInModule": {
|
|
9201
9532
|
"filename": "lib/vpc-v2-base.ts",
|
|
9202
|
-
"line":
|
|
9533
|
+
"line": 204
|
|
9203
9534
|
},
|
|
9204
9535
|
"name": "isolatedSubnets",
|
|
9205
9536
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -9221,7 +9552,7 @@
|
|
|
9221
9552
|
"immutable": true,
|
|
9222
9553
|
"locationInModule": {
|
|
9223
9554
|
"filename": "lib/vpc-v2-base.ts",
|
|
9224
|
-
"line":
|
|
9555
|
+
"line": 245
|
|
9225
9556
|
},
|
|
9226
9557
|
"name": "ownerAccountId",
|
|
9227
9558
|
"overrides": "@aws-cdk/aws-ec2-alpha.IVpcV2",
|
|
@@ -9237,7 +9568,7 @@
|
|
|
9237
9568
|
"immutable": true,
|
|
9238
9569
|
"locationInModule": {
|
|
9239
9570
|
"filename": "lib/vpc-v2-base.ts",
|
|
9240
|
-
"line":
|
|
9571
|
+
"line": 199
|
|
9241
9572
|
},
|
|
9242
9573
|
"name": "privateSubnets",
|
|
9243
9574
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -9258,7 +9589,7 @@
|
|
|
9258
9589
|
"immutable": true,
|
|
9259
9590
|
"locationInModule": {
|
|
9260
9591
|
"filename": "lib/vpc-v2-base.ts",
|
|
9261
|
-
"line":
|
|
9592
|
+
"line": 194
|
|
9262
9593
|
},
|
|
9263
9594
|
"name": "publicSubnets",
|
|
9264
9595
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -9280,7 +9611,7 @@
|
|
|
9280
9611
|
"immutable": true,
|
|
9281
9612
|
"locationInModule": {
|
|
9282
9613
|
"filename": "lib/vpc-v2-base.ts",
|
|
9283
|
-
"line":
|
|
9614
|
+
"line": 240
|
|
9284
9615
|
},
|
|
9285
9616
|
"name": "region",
|
|
9286
9617
|
"overrides": "@aws-cdk/aws-ec2-alpha.IVpcV2",
|
|
@@ -9297,7 +9628,7 @@
|
|
|
9297
9628
|
"immutable": true,
|
|
9298
9629
|
"locationInModule": {
|
|
9299
9630
|
"filename": "lib/vpc-v2-base.ts",
|
|
9300
|
-
"line":
|
|
9631
|
+
"line": 184
|
|
9301
9632
|
},
|
|
9302
9633
|
"name": "vpcArn",
|
|
9303
9634
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -9314,7 +9645,7 @@
|
|
|
9314
9645
|
"immutable": true,
|
|
9315
9646
|
"locationInModule": {
|
|
9316
9647
|
"filename": "lib/vpc-v2-base.ts",
|
|
9317
|
-
"line":
|
|
9648
|
+
"line": 189
|
|
9318
9649
|
},
|
|
9319
9650
|
"name": "vpcCidrBlock",
|
|
9320
9651
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -9331,7 +9662,7 @@
|
|
|
9331
9662
|
"immutable": true,
|
|
9332
9663
|
"locationInModule": {
|
|
9333
9664
|
"filename": "lib/vpc-v2-base.ts",
|
|
9334
|
-
"line":
|
|
9665
|
+
"line": 179
|
|
9335
9666
|
},
|
|
9336
9667
|
"name": "vpcId",
|
|
9337
9668
|
"overrides": "aws-cdk-lib.aws_ec2.IVpc",
|
|
@@ -9347,7 +9678,7 @@
|
|
|
9347
9678
|
"immutable": true,
|
|
9348
9679
|
"locationInModule": {
|
|
9349
9680
|
"filename": "lib/vpc-v2-base.ts",
|
|
9350
|
-
"line":
|
|
9681
|
+
"line": 554
|
|
9351
9682
|
},
|
|
9352
9683
|
"name": "internetGatewayId",
|
|
9353
9684
|
"optional": true,
|
|
@@ -9364,7 +9695,7 @@
|
|
|
9364
9695
|
"immutable": true,
|
|
9365
9696
|
"locationInModule": {
|
|
9366
9697
|
"filename": "lib/vpc-v2-base.ts",
|
|
9367
|
-
"line":
|
|
9698
|
+
"line": 252
|
|
9368
9699
|
},
|
|
9369
9700
|
"name": "ipv4IpamProvisionedCidrs",
|
|
9370
9701
|
"optional": true,
|
|
@@ -9387,7 +9718,7 @@
|
|
|
9387
9718
|
"immutable": true,
|
|
9388
9719
|
"locationInModule": {
|
|
9389
9720
|
"filename": "lib/vpc-v2-base.ts",
|
|
9390
|
-
"line":
|
|
9721
|
+
"line": 227
|
|
9391
9722
|
},
|
|
9392
9723
|
"name": "secondaryCidrBlock",
|
|
9393
9724
|
"optional": true,
|
|
@@ -9409,7 +9740,7 @@
|
|
|
9409
9740
|
"immutable": true,
|
|
9410
9741
|
"locationInModule": {
|
|
9411
9742
|
"filename": "lib/vpc-v2-base.ts",
|
|
9412
|
-
"line":
|
|
9743
|
+
"line": 547
|
|
9413
9744
|
},
|
|
9414
9745
|
"name": "vpnGatewayId",
|
|
9415
9746
|
"optional": true,
|
|
@@ -9425,7 +9756,7 @@
|
|
|
9425
9756
|
},
|
|
9426
9757
|
"locationInModule": {
|
|
9427
9758
|
"filename": "lib/vpc-v2-base.ts",
|
|
9428
|
-
"line":
|
|
9759
|
+
"line": 257
|
|
9429
9760
|
},
|
|
9430
9761
|
"name": "incompleteSubnetDefinition",
|
|
9431
9762
|
"protected": true,
|
|
@@ -9576,6 +9907,6 @@
|
|
|
9576
9907
|
"symbolId": "lib/vpc-v2:VpcV2Props"
|
|
9577
9908
|
}
|
|
9578
9909
|
},
|
|
9579
|
-
"version": "2.
|
|
9910
|
+
"version": "2.171.0-alpha.0",
|
|
9580
9911
|
"fingerprint": "**********"
|
|
9581
9912
|
}
|