aws-cdk.aws-ec2-alpha 2.175.1a0__py3-none-any.whl → 2.177.0a0__py3-none-any.whl
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.
Potentially problematic release.
This version of aws-cdk.aws-ec2-alpha might be problematic. Click here for more details.
- aws_cdk/aws_ec2_alpha/__init__.py +291 -9
- aws_cdk/aws_ec2_alpha/_jsii/__init__.py +2 -2
- aws_cdk/aws_ec2_alpha/_jsii/aws-ec2-alpha@2.177.0-alpha.0.jsii.tgz +0 -0
- {aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info → aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info}/METADATA +42 -9
- aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info/RECORD +10 -0
- aws_cdk/aws_ec2_alpha/_jsii/aws-ec2-alpha@2.175.1-alpha.0.jsii.tgz +0 -0
- aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info/RECORD +0 -10
- {aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info → aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info}/LICENSE +0 -0
- {aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info → aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info}/NOTICE +0 -0
- {aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info → aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info}/WHEEL +0 -0
- {aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info → aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info}/top_level.txt +0 -0
|
@@ -101,6 +101,39 @@ VpcV2(self, "Vpc",
|
|
|
101
101
|
|
|
102
102
|
Since `VpcV2` does not create subnets automatically, users have full control over IP addresses allocation across subnets.
|
|
103
103
|
|
|
104
|
+
### Bring your own IPv6 addresses (BYOIP)
|
|
105
|
+
|
|
106
|
+
If you have your own IP address that you would like to use with EC2, you can set up an IPv6 pool via the AWS CLI, and use that pool ID in your application.
|
|
107
|
+
|
|
108
|
+
Once you have certified your IP address block with an ROA and have obtained an X-509 certificate, you can run the following command to provision your CIDR block in your AWS account:
|
|
109
|
+
|
|
110
|
+
```shell
|
|
111
|
+
aws ec2 provision-byoip-cidr --region <region> --cidr <your CIDR block> --cidr-authorization-context Message="1|aws|<account>|<your CIDR block>|<expiration date>|SHA256".Signature="<signature>"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
When your BYOIP CIDR is provisioned, you can run the following command to retrieve your IPv6 pool ID, which will be used in your VPC declaration:
|
|
115
|
+
|
|
116
|
+
```shell
|
|
117
|
+
aws ec2 describe-byoip-cidr --region <region>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
For more help on setting up your IPv6 address, please review the [EC2 Documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html).
|
|
121
|
+
|
|
122
|
+
Once you have provisioned your address block, you can use the IPv6 in your VPC as follows:
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
my_vpc = VpcV2(self, "Vpc",
|
|
126
|
+
primary_address_block=IpAddresses.ipv4("10.1.0.0/16"),
|
|
127
|
+
secondary_address_blocks=[IpAddresses.ipv6_byoip_pool(
|
|
128
|
+
cidr_block_name="MyByoipCidrBlock",
|
|
129
|
+
ipv6_pool_id="ipv6pool-ec2-someHashValue",
|
|
130
|
+
ipv6_cidr_block="2001:db8::/32"
|
|
131
|
+
)],
|
|
132
|
+
enable_dns_hostnames=True,
|
|
133
|
+
enable_dns_support=True
|
|
134
|
+
)
|
|
135
|
+
```
|
|
136
|
+
|
|
104
137
|
## Routing
|
|
105
138
|
|
|
106
139
|
`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:
|
|
@@ -297,7 +330,7 @@ acceptor_vpc = VpcV2(self, "VpcA",
|
|
|
297
330
|
acceptor_role_arn = acceptor_vpc.create_acceptor_vpc_role("000000000000")
|
|
298
331
|
```
|
|
299
332
|
|
|
300
|
-
After creating an IAM role in the acceptor account, we can initiate the peering connection request from the requestor VPC. Import
|
|
333
|
+
After creating an IAM role in the acceptor account, we can initiate the peering connection request from the requestor VPC. Import acceptorVpc 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.
|
|
301
334
|
The following code snippet demonstrates how to set up VPC peering between two VPCs in different AWS accounts using CDK:
|
|
302
335
|
|
|
303
336
|
```python
|
|
@@ -453,11 +486,11 @@ For more information, see [What is AWS Site-to-Site VPN?](https://docs.aws.amazo
|
|
|
453
486
|
|
|
454
487
|
VPN 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.
|
|
455
488
|
|
|
456
|
-
To enable VPN route
|
|
489
|
+
To enable VPN route propagation, 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.
|
|
457
490
|
|
|
458
491
|
Additionally, 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.
|
|
459
492
|
|
|
460
|
-
The code example below provides the definition for setting up a VPN gateway with `
|
|
493
|
+
The code example below provides the definition for setting up a VPN gateway with `vpnRoutePropagation` enabled:
|
|
461
494
|
|
|
462
495
|
```python
|
|
463
496
|
stack = Stack()
|
|
@@ -485,7 +518,7 @@ An internet gateway is a horizontally scaled, redundant, and highly available VP
|
|
|
485
518
|
For more information, see [Enable VPC internet access using internet gateways](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html).
|
|
486
519
|
|
|
487
520
|
You 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.
|
|
488
|
-
Instead of using the default settings, you can configure a custom
|
|
521
|
+
Instead of using the default settings, you can configure a custom destination range by providing an optional input `destination` to the method.
|
|
489
522
|
|
|
490
523
|
The code example below shows how to add an internet gateway with a custom outbound destination IP range:
|
|
491
524
|
|
|
@@ -528,12 +561,12 @@ imported_vpc = VpcV2.from_vpc_v2_attributes(stack, "ImportedVpc",
|
|
|
528
561
|
|
|
529
562
|
In 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.
|
|
530
563
|
|
|
531
|
-
Below is an example of importing a cross region and cross
|
|
564
|
+
Below is an example of importing a cross region and cross account VPC, VPC arn for this case would be 'arn:aws:ec2:us-west-2:123456789012:vpc/mockVpcID'
|
|
532
565
|
|
|
533
566
|
```python
|
|
534
567
|
stack = Stack()
|
|
535
568
|
|
|
536
|
-
# Importing a cross
|
|
569
|
+
# Importing a cross account or cross region VPC
|
|
537
570
|
imported_vpc = VpcV2.from_vpc_v2_attributes(stack, "ImportedVpc",
|
|
538
571
|
vpc_id="mockVpcID",
|
|
539
572
|
vpc_cidr_block="10.0.0.0/16",
|
|
@@ -1491,6 +1524,15 @@ class IVPCCidrBlock(typing_extensions.Protocol):
|
|
|
1491
1524
|
'''
|
|
1492
1525
|
...
|
|
1493
1526
|
|
|
1527
|
+
@builtins.property
|
|
1528
|
+
@jsii.member(jsii_name="ipv6CidrBlock")
|
|
1529
|
+
def ipv6_cidr_block(self) -> typing.Optional[builtins.str]:
|
|
1530
|
+
'''(experimental) The IPv6 CIDR block from the specified IPv6 address pool.
|
|
1531
|
+
|
|
1532
|
+
:stability: experimental
|
|
1533
|
+
'''
|
|
1534
|
+
...
|
|
1535
|
+
|
|
1494
1536
|
@builtins.property
|
|
1495
1537
|
@jsii.member(jsii_name="ipv6IpamPoolId")
|
|
1496
1538
|
def ipv6_ipam_pool_id(self) -> typing.Optional[builtins.str]:
|
|
@@ -1500,6 +1542,15 @@ class IVPCCidrBlock(typing_extensions.Protocol):
|
|
|
1500
1542
|
'''
|
|
1501
1543
|
...
|
|
1502
1544
|
|
|
1545
|
+
@builtins.property
|
|
1546
|
+
@jsii.member(jsii_name="ipv6Pool")
|
|
1547
|
+
def ipv6_pool(self) -> typing.Optional[builtins.str]:
|
|
1548
|
+
'''(experimental) The ID of the IPv6 address pool from which to allocate the IPv6 CIDR block.
|
|
1549
|
+
|
|
1550
|
+
:stability: experimental
|
|
1551
|
+
'''
|
|
1552
|
+
...
|
|
1553
|
+
|
|
1503
1554
|
|
|
1504
1555
|
class _IVPCCidrBlockProxy:
|
|
1505
1556
|
'''(experimental) Interface to create L2 for VPC Cidr Block.
|
|
@@ -1538,6 +1589,15 @@ class _IVPCCidrBlockProxy:
|
|
|
1538
1589
|
'''
|
|
1539
1590
|
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "ipv4IpamPoolId"))
|
|
1540
1591
|
|
|
1592
|
+
@builtins.property
|
|
1593
|
+
@jsii.member(jsii_name="ipv6CidrBlock")
|
|
1594
|
+
def ipv6_cidr_block(self) -> typing.Optional[builtins.str]:
|
|
1595
|
+
'''(experimental) The IPv6 CIDR block from the specified IPv6 address pool.
|
|
1596
|
+
|
|
1597
|
+
:stability: experimental
|
|
1598
|
+
'''
|
|
1599
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "ipv6CidrBlock"))
|
|
1600
|
+
|
|
1541
1601
|
@builtins.property
|
|
1542
1602
|
@jsii.member(jsii_name="ipv6IpamPoolId")
|
|
1543
1603
|
def ipv6_ipam_pool_id(self) -> typing.Optional[builtins.str]:
|
|
@@ -1547,6 +1607,15 @@ class _IVPCCidrBlockProxy:
|
|
|
1547
1607
|
'''
|
|
1548
1608
|
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "ipv6IpamPoolId"))
|
|
1549
1609
|
|
|
1610
|
+
@builtins.property
|
|
1611
|
+
@jsii.member(jsii_name="ipv6Pool")
|
|
1612
|
+
def ipv6_pool(self) -> typing.Optional[builtins.str]:
|
|
1613
|
+
'''(experimental) The ID of the IPv6 address pool from which to allocate the IPv6 CIDR block.
|
|
1614
|
+
|
|
1615
|
+
:stability: experimental
|
|
1616
|
+
'''
|
|
1617
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "ipv6Pool"))
|
|
1618
|
+
|
|
1550
1619
|
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
1551
1620
|
typing.cast(typing.Any, IVPCCidrBlock).__jsii_proxy_class__ = lambda : _IVPCCidrBlockProxy
|
|
1552
1621
|
|
|
@@ -2395,6 +2464,31 @@ class IpAddresses(
|
|
|
2395
2464
|
|
|
2396
2465
|
return typing.cast(IIpAddresses, jsii.sinvoke(cls, "ipv4Ipam", [ipv4_ipam_options]))
|
|
2397
2466
|
|
|
2467
|
+
@jsii.member(jsii_name="ipv6ByoipPool")
|
|
2468
|
+
@builtins.classmethod
|
|
2469
|
+
def ipv6_byoip_pool(
|
|
2470
|
+
cls,
|
|
2471
|
+
*,
|
|
2472
|
+
ipv6_cidr_block: builtins.str,
|
|
2473
|
+
ipv6_pool_id: builtins.str,
|
|
2474
|
+
cidr_block_name: builtins.str,
|
|
2475
|
+
) -> IIpAddresses:
|
|
2476
|
+
'''(experimental) A BYOIP IPv6 address pool.
|
|
2477
|
+
|
|
2478
|
+
:param ipv6_cidr_block: (experimental) A valid IPv6 CIDR block from the IPv6 address pool onboarded to AWS using BYOIP. The most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable and /56 for CIDRs that are not publicly advertisable.
|
|
2479
|
+
:param ipv6_pool_id: (experimental) ID of the IPv6 address pool from which to allocate the IPv6 CIDR block. Note: BYOIP Pool ID is different from the IPAM Pool ID. To onboard your IPv6 address range to your AWS account please refer to the below documentation
|
|
2480
|
+
:param cidr_block_name: (experimental) Required to set Secondary cidr block resource name in order to generate unique logical id for the resource.
|
|
2481
|
+
|
|
2482
|
+
:stability: experimental
|
|
2483
|
+
'''
|
|
2484
|
+
props = Ipv6PoolSecondaryAddressProps(
|
|
2485
|
+
ipv6_cidr_block=ipv6_cidr_block,
|
|
2486
|
+
ipv6_pool_id=ipv6_pool_id,
|
|
2487
|
+
cidr_block_name=cidr_block_name,
|
|
2488
|
+
)
|
|
2489
|
+
|
|
2490
|
+
return typing.cast(IIpAddresses, jsii.sinvoke(cls, "ipv6ByoipPool", [props]))
|
|
2491
|
+
|
|
2398
2492
|
@jsii.member(jsii_name="ipv6Ipam")
|
|
2399
2493
|
@builtins.classmethod
|
|
2400
2494
|
def ipv6_ipam(
|
|
@@ -4050,7 +4144,7 @@ class Route(
|
|
|
4050
4144
|
@builtins.property
|
|
4051
4145
|
@jsii.member(jsii_name="targetRouterType")
|
|
4052
4146
|
def target_router_type(self) -> _aws_cdk_aws_ec2_ceddda9d.RouterType:
|
|
4053
|
-
'''(experimental) The type of router the route is
|
|
4147
|
+
'''(experimental) The type of router the route is targeting.
|
|
4054
4148
|
|
|
4055
4149
|
:stability: experimental
|
|
4056
4150
|
'''
|
|
@@ -5192,8 +5286,10 @@ class SubnetV2Props:
|
|
|
5192
5286
|
"ipv4_ipam_pool_id": "ipv4IpamPoolId",
|
|
5193
5287
|
"ipv4_ipam_provisioned_cidrs": "ipv4IpamProvisionedCidrs",
|
|
5194
5288
|
"ipv4_netmask_length": "ipv4NetmaskLength",
|
|
5289
|
+
"ipv6_cidr_block": "ipv6CidrBlock",
|
|
5195
5290
|
"ipv6_ipam_pool_id": "ipv6IpamPoolId",
|
|
5196
5291
|
"ipv6_netmask_length": "ipv6NetmaskLength",
|
|
5292
|
+
"ipv6_pool": "ipv6Pool",
|
|
5197
5293
|
},
|
|
5198
5294
|
)
|
|
5199
5295
|
class VPCCidrBlockattributes:
|
|
@@ -5206,8 +5302,10 @@ class VPCCidrBlockattributes:
|
|
|
5206
5302
|
ipv4_ipam_pool_id: typing.Optional[builtins.str] = None,
|
|
5207
5303
|
ipv4_ipam_provisioned_cidrs: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
5208
5304
|
ipv4_netmask_length: typing.Optional[jsii.Number] = None,
|
|
5305
|
+
ipv6_cidr_block: typing.Optional[builtins.str] = None,
|
|
5209
5306
|
ipv6_ipam_pool_id: typing.Optional[builtins.str] = None,
|
|
5210
5307
|
ipv6_netmask_length: typing.Optional[jsii.Number] = None,
|
|
5308
|
+
ipv6_pool: typing.Optional[builtins.str] = None,
|
|
5211
5309
|
) -> None:
|
|
5212
5310
|
'''(experimental) Attributes for VPCCidrBlock used for defining a new CIDR Block and also for importing an existing CIDR.
|
|
5213
5311
|
|
|
@@ -5217,8 +5315,10 @@ class VPCCidrBlockattributes:
|
|
|
5217
5315
|
:param ipv4_ipam_pool_id: (experimental) IPAM pool for IPv4 address type. Default: - no IPAM pool Id provided for IPv4
|
|
5218
5316
|
:param ipv4_ipam_provisioned_cidrs: (experimental) IPv4 CIDR provisioned under pool Required to check for overlapping CIDRs after provisioning is complete under IPAM pool. Default: - no IPAM IPv4 CIDR range is provisioned using IPAM
|
|
5219
5317
|
:param ipv4_netmask_length: (experimental) Net mask length for IPv4 address type. Default: - no Net mask length configured for IPv4
|
|
5318
|
+
:param ipv6_cidr_block: (experimental) The IPv6 CIDR block from the specified IPv6 address pool. Default: - No IPv6 CIDR block associated with VPC.
|
|
5220
5319
|
:param ipv6_ipam_pool_id: (experimental) IPAM pool for IPv6 address type. Default: - no IPAM pool Id provided for IPv6
|
|
5221
5320
|
:param ipv6_netmask_length: (experimental) Net mask length for IPv6 address type. Default: - no Net mask length configured for IPv6
|
|
5321
|
+
:param ipv6_pool: (experimental) The ID of the IPv6 address pool from which to allocate the IPv6 CIDR block. Note: BYOIP Pool ID is different than IPAM Pool ID. Default: - No BYOIP pool associated with VPC.
|
|
5222
5322
|
|
|
5223
5323
|
:stability: experimental
|
|
5224
5324
|
:exampleMetadata: fixture=_generated
|
|
@@ -5236,8 +5336,10 @@ class VPCCidrBlockattributes:
|
|
|
5236
5336
|
ipv4_ipam_pool_id="ipv4IpamPoolId",
|
|
5237
5337
|
ipv4_ipam_provisioned_cidrs=["ipv4IpamProvisionedCidrs"],
|
|
5238
5338
|
ipv4_netmask_length=123,
|
|
5339
|
+
ipv6_cidr_block="ipv6CidrBlock",
|
|
5239
5340
|
ipv6_ipam_pool_id="ipv6IpamPoolId",
|
|
5240
|
-
ipv6_netmask_length=123
|
|
5341
|
+
ipv6_netmask_length=123,
|
|
5342
|
+
ipv6_pool="ipv6Pool"
|
|
5241
5343
|
)
|
|
5242
5344
|
'''
|
|
5243
5345
|
if __debug__:
|
|
@@ -5248,8 +5350,10 @@ class VPCCidrBlockattributes:
|
|
|
5248
5350
|
check_type(argname="argument ipv4_ipam_pool_id", value=ipv4_ipam_pool_id, expected_type=type_hints["ipv4_ipam_pool_id"])
|
|
5249
5351
|
check_type(argname="argument ipv4_ipam_provisioned_cidrs", value=ipv4_ipam_provisioned_cidrs, expected_type=type_hints["ipv4_ipam_provisioned_cidrs"])
|
|
5250
5352
|
check_type(argname="argument ipv4_netmask_length", value=ipv4_netmask_length, expected_type=type_hints["ipv4_netmask_length"])
|
|
5353
|
+
check_type(argname="argument ipv6_cidr_block", value=ipv6_cidr_block, expected_type=type_hints["ipv6_cidr_block"])
|
|
5251
5354
|
check_type(argname="argument ipv6_ipam_pool_id", value=ipv6_ipam_pool_id, expected_type=type_hints["ipv6_ipam_pool_id"])
|
|
5252
5355
|
check_type(argname="argument ipv6_netmask_length", value=ipv6_netmask_length, expected_type=type_hints["ipv6_netmask_length"])
|
|
5356
|
+
check_type(argname="argument ipv6_pool", value=ipv6_pool, expected_type=type_hints["ipv6_pool"])
|
|
5253
5357
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
5254
5358
|
if amazon_provided_ipv6_cidr_block is not None:
|
|
5255
5359
|
self._values["amazon_provided_ipv6_cidr_block"] = amazon_provided_ipv6_cidr_block
|
|
@@ -5263,10 +5367,14 @@ class VPCCidrBlockattributes:
|
|
|
5263
5367
|
self._values["ipv4_ipam_provisioned_cidrs"] = ipv4_ipam_provisioned_cidrs
|
|
5264
5368
|
if ipv4_netmask_length is not None:
|
|
5265
5369
|
self._values["ipv4_netmask_length"] = ipv4_netmask_length
|
|
5370
|
+
if ipv6_cidr_block is not None:
|
|
5371
|
+
self._values["ipv6_cidr_block"] = ipv6_cidr_block
|
|
5266
5372
|
if ipv6_ipam_pool_id is not None:
|
|
5267
5373
|
self._values["ipv6_ipam_pool_id"] = ipv6_ipam_pool_id
|
|
5268
5374
|
if ipv6_netmask_length is not None:
|
|
5269
5375
|
self._values["ipv6_netmask_length"] = ipv6_netmask_length
|
|
5376
|
+
if ipv6_pool is not None:
|
|
5377
|
+
self._values["ipv6_pool"] = ipv6_pool
|
|
5270
5378
|
|
|
5271
5379
|
@builtins.property
|
|
5272
5380
|
def amazon_provided_ipv6_cidr_block(self) -> typing.Optional[builtins.bool]:
|
|
@@ -5334,6 +5442,17 @@ class VPCCidrBlockattributes:
|
|
|
5334
5442
|
result = self._values.get("ipv4_netmask_length")
|
|
5335
5443
|
return typing.cast(typing.Optional[jsii.Number], result)
|
|
5336
5444
|
|
|
5445
|
+
@builtins.property
|
|
5446
|
+
def ipv6_cidr_block(self) -> typing.Optional[builtins.str]:
|
|
5447
|
+
'''(experimental) The IPv6 CIDR block from the specified IPv6 address pool.
|
|
5448
|
+
|
|
5449
|
+
:default: - No IPv6 CIDR block associated with VPC.
|
|
5450
|
+
|
|
5451
|
+
:stability: experimental
|
|
5452
|
+
'''
|
|
5453
|
+
result = self._values.get("ipv6_cidr_block")
|
|
5454
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
5455
|
+
|
|
5337
5456
|
@builtins.property
|
|
5338
5457
|
def ipv6_ipam_pool_id(self) -> typing.Optional[builtins.str]:
|
|
5339
5458
|
'''(experimental) IPAM pool for IPv6 address type.
|
|
@@ -5356,6 +5475,19 @@ class VPCCidrBlockattributes:
|
|
|
5356
5475
|
result = self._values.get("ipv6_netmask_length")
|
|
5357
5476
|
return typing.cast(typing.Optional[jsii.Number], result)
|
|
5358
5477
|
|
|
5478
|
+
@builtins.property
|
|
5479
|
+
def ipv6_pool(self) -> typing.Optional[builtins.str]:
|
|
5480
|
+
'''(experimental) The ID of the IPv6 address pool from which to allocate the IPv6 CIDR block.
|
|
5481
|
+
|
|
5482
|
+
Note: BYOIP Pool ID is different than IPAM Pool ID.
|
|
5483
|
+
|
|
5484
|
+
:default: - No BYOIP pool associated with VPC.
|
|
5485
|
+
|
|
5486
|
+
:stability: experimental
|
|
5487
|
+
'''
|
|
5488
|
+
result = self._values.get("ipv6_pool")
|
|
5489
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
5490
|
+
|
|
5359
5491
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
5360
5492
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
5361
5493
|
|
|
@@ -6068,8 +6200,10 @@ class VPNGatewayV2Props(VPNGatewayV2Options):
|
|
|
6068
6200
|
"ipv4_ipam_pool": "ipv4IpamPool",
|
|
6069
6201
|
"ipv4_ipam_provisioned_cidrs": "ipv4IpamProvisionedCidrs",
|
|
6070
6202
|
"ipv4_netmask_length": "ipv4NetmaskLength",
|
|
6203
|
+
"ipv6_cidr_block": "ipv6CidrBlock",
|
|
6071
6204
|
"ipv6_ipam_pool": "ipv6IpamPool",
|
|
6072
6205
|
"ipv6_netmask_length": "ipv6NetmaskLength",
|
|
6206
|
+
"ipv6_pool_id": "ipv6PoolId",
|
|
6073
6207
|
},
|
|
6074
6208
|
)
|
|
6075
6209
|
class VpcCidrOptions:
|
|
@@ -6083,8 +6217,10 @@ class VpcCidrOptions:
|
|
|
6083
6217
|
ipv4_ipam_pool: typing.Optional[IIpamPool] = None,
|
|
6084
6218
|
ipv4_ipam_provisioned_cidrs: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
6085
6219
|
ipv4_netmask_length: typing.Optional[jsii.Number] = None,
|
|
6220
|
+
ipv6_cidr_block: typing.Optional[builtins.str] = None,
|
|
6086
6221
|
ipv6_ipam_pool: typing.Optional[IIpamPool] = None,
|
|
6087
6222
|
ipv6_netmask_length: typing.Optional[jsii.Number] = None,
|
|
6223
|
+
ipv6_pool_id: typing.Optional[builtins.str] = None,
|
|
6088
6224
|
) -> None:
|
|
6089
6225
|
'''(experimental) Consolidated return parameters to pass to VPC construct.
|
|
6090
6226
|
|
|
@@ -6095,8 +6231,10 @@ class VpcCidrOptions:
|
|
|
6095
6231
|
:param ipv4_ipam_pool: (experimental) Ipv4 IPAM Pool. Default: - Only required when using IPAM Ipv4
|
|
6096
6232
|
:param ipv4_ipam_provisioned_cidrs: (experimental) IPv4 CIDR provisioned under pool Required to check for overlapping CIDRs after provisioning is complete under IPAM pool. Default: - no IPAM IPv4 CIDR range is provisioned using IPAM
|
|
6097
6233
|
:param ipv4_netmask_length: (experimental) CIDR Mask for Vpc. Default: - Only required when using IPAM Ipv4
|
|
6234
|
+
:param ipv6_cidr_block: (experimental) IPv6 CIDR block from the BOYIP IPv6 address pool. Default: - None
|
|
6098
6235
|
:param ipv6_ipam_pool: (experimental) Ipv6 IPAM pool id for VPC range, can only be defined under public scope. Default: - no pool id
|
|
6099
6236
|
:param ipv6_netmask_length: (experimental) CIDR Mask for Vpc. Default: - Only required when using AWS Ipam
|
|
6237
|
+
:param ipv6_pool_id: (experimental) ID of the BYOIP IPv6 address pool from which to allocate the IPv6 CIDR block. Default: - None
|
|
6100
6238
|
|
|
6101
6239
|
:stability: experimental
|
|
6102
6240
|
:exampleMetadata: fixture=_generated
|
|
@@ -6119,8 +6257,10 @@ class VpcCidrOptions:
|
|
|
6119
6257
|
ipv4_ipam_pool=ipam_pool,
|
|
6120
6258
|
ipv4_ipam_provisioned_cidrs=["ipv4IpamProvisionedCidrs"],
|
|
6121
6259
|
ipv4_netmask_length=123,
|
|
6260
|
+
ipv6_cidr_block="ipv6CidrBlock",
|
|
6122
6261
|
ipv6_ipam_pool=ipam_pool,
|
|
6123
|
-
ipv6_netmask_length=123
|
|
6262
|
+
ipv6_netmask_length=123,
|
|
6263
|
+
ipv6_pool_id="ipv6PoolId"
|
|
6124
6264
|
)
|
|
6125
6265
|
'''
|
|
6126
6266
|
if __debug__:
|
|
@@ -6132,8 +6272,10 @@ class VpcCidrOptions:
|
|
|
6132
6272
|
check_type(argname="argument ipv4_ipam_pool", value=ipv4_ipam_pool, expected_type=type_hints["ipv4_ipam_pool"])
|
|
6133
6273
|
check_type(argname="argument ipv4_ipam_provisioned_cidrs", value=ipv4_ipam_provisioned_cidrs, expected_type=type_hints["ipv4_ipam_provisioned_cidrs"])
|
|
6134
6274
|
check_type(argname="argument ipv4_netmask_length", value=ipv4_netmask_length, expected_type=type_hints["ipv4_netmask_length"])
|
|
6275
|
+
check_type(argname="argument ipv6_cidr_block", value=ipv6_cidr_block, expected_type=type_hints["ipv6_cidr_block"])
|
|
6135
6276
|
check_type(argname="argument ipv6_ipam_pool", value=ipv6_ipam_pool, expected_type=type_hints["ipv6_ipam_pool"])
|
|
6136
6277
|
check_type(argname="argument ipv6_netmask_length", value=ipv6_netmask_length, expected_type=type_hints["ipv6_netmask_length"])
|
|
6278
|
+
check_type(argname="argument ipv6_pool_id", value=ipv6_pool_id, expected_type=type_hints["ipv6_pool_id"])
|
|
6137
6279
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
6138
6280
|
if amazon_provided is not None:
|
|
6139
6281
|
self._values["amazon_provided"] = amazon_provided
|
|
@@ -6149,10 +6291,14 @@ class VpcCidrOptions:
|
|
|
6149
6291
|
self._values["ipv4_ipam_provisioned_cidrs"] = ipv4_ipam_provisioned_cidrs
|
|
6150
6292
|
if ipv4_netmask_length is not None:
|
|
6151
6293
|
self._values["ipv4_netmask_length"] = ipv4_netmask_length
|
|
6294
|
+
if ipv6_cidr_block is not None:
|
|
6295
|
+
self._values["ipv6_cidr_block"] = ipv6_cidr_block
|
|
6152
6296
|
if ipv6_ipam_pool is not None:
|
|
6153
6297
|
self._values["ipv6_ipam_pool"] = ipv6_ipam_pool
|
|
6154
6298
|
if ipv6_netmask_length is not None:
|
|
6155
6299
|
self._values["ipv6_netmask_length"] = ipv6_netmask_length
|
|
6300
|
+
if ipv6_pool_id is not None:
|
|
6301
|
+
self._values["ipv6_pool_id"] = ipv6_pool_id
|
|
6156
6302
|
|
|
6157
6303
|
@builtins.property
|
|
6158
6304
|
def amazon_provided(self) -> typing.Optional[builtins.bool]:
|
|
@@ -6233,6 +6379,17 @@ class VpcCidrOptions:
|
|
|
6233
6379
|
result = self._values.get("ipv4_netmask_length")
|
|
6234
6380
|
return typing.cast(typing.Optional[jsii.Number], result)
|
|
6235
6381
|
|
|
6382
|
+
@builtins.property
|
|
6383
|
+
def ipv6_cidr_block(self) -> typing.Optional[builtins.str]:
|
|
6384
|
+
'''(experimental) IPv6 CIDR block from the BOYIP IPv6 address pool.
|
|
6385
|
+
|
|
6386
|
+
:default: - None
|
|
6387
|
+
|
|
6388
|
+
:stability: experimental
|
|
6389
|
+
'''
|
|
6390
|
+
result = self._values.get("ipv6_cidr_block")
|
|
6391
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
6392
|
+
|
|
6236
6393
|
@builtins.property
|
|
6237
6394
|
def ipv6_ipam_pool(self) -> typing.Optional[IIpamPool]:
|
|
6238
6395
|
'''(experimental) Ipv6 IPAM pool id for VPC range, can only be defined under public scope.
|
|
@@ -6255,6 +6412,17 @@ class VpcCidrOptions:
|
|
|
6255
6412
|
result = self._values.get("ipv6_netmask_length")
|
|
6256
6413
|
return typing.cast(typing.Optional[jsii.Number], result)
|
|
6257
6414
|
|
|
6415
|
+
@builtins.property
|
|
6416
|
+
def ipv6_pool_id(self) -> typing.Optional[builtins.str]:
|
|
6417
|
+
'''(experimental) ID of the BYOIP IPv6 address pool from which to allocate the IPv6 CIDR block.
|
|
6418
|
+
|
|
6419
|
+
:default: - None
|
|
6420
|
+
|
|
6421
|
+
:stability: experimental
|
|
6422
|
+
'''
|
|
6423
|
+
result = self._values.get("ipv6_pool_id")
|
|
6424
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
6425
|
+
|
|
6258
6426
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
6259
6427
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
6260
6428
|
|
|
@@ -7488,6 +7656,106 @@ class EgressOnlyInternetGateway(
|
|
|
7488
7656
|
return typing.cast(_aws_cdk_aws_ec2_ceddda9d.RouterType, jsii.get(self, "routerType"))
|
|
7489
7657
|
|
|
7490
7658
|
|
|
7659
|
+
@jsii.data_type(
|
|
7660
|
+
jsii_type="@aws-cdk/aws-ec2-alpha.Ipv6PoolSecondaryAddressProps",
|
|
7661
|
+
jsii_struct_bases=[SecondaryAddressProps],
|
|
7662
|
+
name_mapping={
|
|
7663
|
+
"cidr_block_name": "cidrBlockName",
|
|
7664
|
+
"ipv6_cidr_block": "ipv6CidrBlock",
|
|
7665
|
+
"ipv6_pool_id": "ipv6PoolId",
|
|
7666
|
+
},
|
|
7667
|
+
)
|
|
7668
|
+
class Ipv6PoolSecondaryAddressProps(SecondaryAddressProps):
|
|
7669
|
+
def __init__(
|
|
7670
|
+
self,
|
|
7671
|
+
*,
|
|
7672
|
+
cidr_block_name: builtins.str,
|
|
7673
|
+
ipv6_cidr_block: builtins.str,
|
|
7674
|
+
ipv6_pool_id: builtins.str,
|
|
7675
|
+
) -> None:
|
|
7676
|
+
'''(experimental) Additional props needed for BYOIP IPv6 address props.
|
|
7677
|
+
|
|
7678
|
+
:param cidr_block_name: (experimental) Required to set Secondary cidr block resource name in order to generate unique logical id for the resource.
|
|
7679
|
+
:param ipv6_cidr_block: (experimental) A valid IPv6 CIDR block from the IPv6 address pool onboarded to AWS using BYOIP. The most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable and /56 for CIDRs that are not publicly advertisable.
|
|
7680
|
+
:param ipv6_pool_id: (experimental) ID of the IPv6 address pool from which to allocate the IPv6 CIDR block. Note: BYOIP Pool ID is different from the IPAM Pool ID. To onboard your IPv6 address range to your AWS account please refer to the below documentation
|
|
7681
|
+
|
|
7682
|
+
:stability: experimental
|
|
7683
|
+
:exampleMetadata: infused
|
|
7684
|
+
|
|
7685
|
+
Example::
|
|
7686
|
+
|
|
7687
|
+
my_vpc = VpcV2(self, "Vpc",
|
|
7688
|
+
primary_address_block=IpAddresses.ipv4("10.1.0.0/16"),
|
|
7689
|
+
secondary_address_blocks=[IpAddresses.ipv6_byoip_pool(
|
|
7690
|
+
cidr_block_name="MyByoipCidrBlock",
|
|
7691
|
+
ipv6_pool_id="ipv6pool-ec2-someHashValue",
|
|
7692
|
+
ipv6_cidr_block="2001:db8::/32"
|
|
7693
|
+
)],
|
|
7694
|
+
enable_dns_hostnames=True,
|
|
7695
|
+
enable_dns_support=True
|
|
7696
|
+
)
|
|
7697
|
+
'''
|
|
7698
|
+
if __debug__:
|
|
7699
|
+
type_hints = typing.get_type_hints(_typecheckingstub__fe24765d3db4942e3a01304186ffb0bfd8bd3a825440b594d0126aa9ae100ef7)
|
|
7700
|
+
check_type(argname="argument cidr_block_name", value=cidr_block_name, expected_type=type_hints["cidr_block_name"])
|
|
7701
|
+
check_type(argname="argument ipv6_cidr_block", value=ipv6_cidr_block, expected_type=type_hints["ipv6_cidr_block"])
|
|
7702
|
+
check_type(argname="argument ipv6_pool_id", value=ipv6_pool_id, expected_type=type_hints["ipv6_pool_id"])
|
|
7703
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
7704
|
+
"cidr_block_name": cidr_block_name,
|
|
7705
|
+
"ipv6_cidr_block": ipv6_cidr_block,
|
|
7706
|
+
"ipv6_pool_id": ipv6_pool_id,
|
|
7707
|
+
}
|
|
7708
|
+
|
|
7709
|
+
@builtins.property
|
|
7710
|
+
def cidr_block_name(self) -> builtins.str:
|
|
7711
|
+
'''(experimental) Required to set Secondary cidr block resource name in order to generate unique logical id for the resource.
|
|
7712
|
+
|
|
7713
|
+
:stability: experimental
|
|
7714
|
+
'''
|
|
7715
|
+
result = self._values.get("cidr_block_name")
|
|
7716
|
+
assert result is not None, "Required property 'cidr_block_name' is missing"
|
|
7717
|
+
return typing.cast(builtins.str, result)
|
|
7718
|
+
|
|
7719
|
+
@builtins.property
|
|
7720
|
+
def ipv6_cidr_block(self) -> builtins.str:
|
|
7721
|
+
'''(experimental) A valid IPv6 CIDR block from the IPv6 address pool onboarded to AWS using BYOIP.
|
|
7722
|
+
|
|
7723
|
+
The most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable
|
|
7724
|
+
and /56 for CIDRs that are not publicly advertisable.
|
|
7725
|
+
|
|
7726
|
+
:see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#byoip-definitions
|
|
7727
|
+
:stability: experimental
|
|
7728
|
+
'''
|
|
7729
|
+
result = self._values.get("ipv6_cidr_block")
|
|
7730
|
+
assert result is not None, "Required property 'ipv6_cidr_block' is missing"
|
|
7731
|
+
return typing.cast(builtins.str, result)
|
|
7732
|
+
|
|
7733
|
+
@builtins.property
|
|
7734
|
+
def ipv6_pool_id(self) -> builtins.str:
|
|
7735
|
+
'''(experimental) ID of the IPv6 address pool from which to allocate the IPv6 CIDR block.
|
|
7736
|
+
|
|
7737
|
+
Note: BYOIP Pool ID is different from the IPAM Pool ID.
|
|
7738
|
+
To onboard your IPv6 address range to your AWS account please refer to the below documentation
|
|
7739
|
+
|
|
7740
|
+
:see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/byoip-onboard.html
|
|
7741
|
+
:stability: experimental
|
|
7742
|
+
'''
|
|
7743
|
+
result = self._values.get("ipv6_pool_id")
|
|
7744
|
+
assert result is not None, "Required property 'ipv6_pool_id' is missing"
|
|
7745
|
+
return typing.cast(builtins.str, result)
|
|
7746
|
+
|
|
7747
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
7748
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
7749
|
+
|
|
7750
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
7751
|
+
return not (rhs == self)
|
|
7752
|
+
|
|
7753
|
+
def __repr__(self) -> str:
|
|
7754
|
+
return "Ipv6PoolSecondaryAddressProps(%s)" % ", ".join(
|
|
7755
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
7756
|
+
)
|
|
7757
|
+
|
|
7758
|
+
|
|
7491
7759
|
class VpcV2(
|
|
7492
7760
|
VpcV2Base,
|
|
7493
7761
|
metaclass=jsii.JSIIMeta,
|
|
@@ -7815,6 +8083,7 @@ __all__ = [
|
|
|
7815
8083
|
"IpamProps",
|
|
7816
8084
|
"IpamScopeOptions",
|
|
7817
8085
|
"IpamScopeType",
|
|
8086
|
+
"Ipv6PoolSecondaryAddressProps",
|
|
7818
8087
|
"NatConnectivityType",
|
|
7819
8088
|
"NatGateway",
|
|
7820
8089
|
"NatGatewayOptions",
|
|
@@ -8191,8 +8460,10 @@ def _typecheckingstub__4302f03d1c3aa687fb9a6d3011f239c94d844badf36d9d2e8270a543f
|
|
|
8191
8460
|
ipv4_ipam_pool_id: typing.Optional[builtins.str] = None,
|
|
8192
8461
|
ipv4_ipam_provisioned_cidrs: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
8193
8462
|
ipv4_netmask_length: typing.Optional[jsii.Number] = None,
|
|
8463
|
+
ipv6_cidr_block: typing.Optional[builtins.str] = None,
|
|
8194
8464
|
ipv6_ipam_pool_id: typing.Optional[builtins.str] = None,
|
|
8195
8465
|
ipv6_netmask_length: typing.Optional[jsii.Number] = None,
|
|
8466
|
+
ipv6_pool: typing.Optional[builtins.str] = None,
|
|
8196
8467
|
) -> None:
|
|
8197
8468
|
"""Type checking stubs"""
|
|
8198
8469
|
pass
|
|
@@ -8271,8 +8542,10 @@ def _typecheckingstub__dc5a774224468f268ba34d837f3aec361583306c8694ae77cdb19bb4c
|
|
|
8271
8542
|
ipv4_ipam_pool: typing.Optional[IIpamPool] = None,
|
|
8272
8543
|
ipv4_ipam_provisioned_cidrs: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
8273
8544
|
ipv4_netmask_length: typing.Optional[jsii.Number] = None,
|
|
8545
|
+
ipv6_cidr_block: typing.Optional[builtins.str] = None,
|
|
8274
8546
|
ipv6_ipam_pool: typing.Optional[IIpamPool] = None,
|
|
8275
8547
|
ipv6_netmask_length: typing.Optional[jsii.Number] = None,
|
|
8548
|
+
ipv6_pool_id: typing.Optional[builtins.str] = None,
|
|
8276
8549
|
) -> None:
|
|
8277
8550
|
"""Type checking stubs"""
|
|
8278
8551
|
pass
|
|
@@ -8416,6 +8689,15 @@ def _typecheckingstub__8ff67e43de6a050a1b2238939edd2b432686ecfc1a3e2758af2b92732
|
|
|
8416
8689
|
"""Type checking stubs"""
|
|
8417
8690
|
pass
|
|
8418
8691
|
|
|
8692
|
+
def _typecheckingstub__fe24765d3db4942e3a01304186ffb0bfd8bd3a825440b594d0126aa9ae100ef7(
|
|
8693
|
+
*,
|
|
8694
|
+
cidr_block_name: builtins.str,
|
|
8695
|
+
ipv6_cidr_block: builtins.str,
|
|
8696
|
+
ipv6_pool_id: builtins.str,
|
|
8697
|
+
) -> None:
|
|
8698
|
+
"""Type checking stubs"""
|
|
8699
|
+
pass
|
|
8700
|
+
|
|
8419
8701
|
def _typecheckingstub__43890f4b3ccf690abe4140abf07c3436fde6604bac35ff6b2e8fe5da2a20b481(
|
|
8420
8702
|
scope: _constructs_77d1e7e8.Construct,
|
|
8421
8703
|
id: builtins.str,
|
|
@@ -33,9 +33,9 @@ import constructs._jsii
|
|
|
33
33
|
|
|
34
34
|
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
|
35
35
|
"@aws-cdk/aws-ec2-alpha",
|
|
36
|
-
"2.
|
|
36
|
+
"2.177.0-alpha.0",
|
|
37
37
|
__name__[0:-6],
|
|
38
|
-
"aws-ec2-alpha@2.
|
|
38
|
+
"aws-ec2-alpha@2.177.0-alpha.0.jsii.tgz",
|
|
39
39
|
)
|
|
40
40
|
|
|
41
41
|
__all__ = [
|
|
Binary file
|
{aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info → aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aws-cdk.aws-ec2-alpha
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.177.0a0
|
|
4
4
|
Summary: The CDK construct library for VPC V2
|
|
5
5
|
Home-page: https://github.com/aws/aws-cdk
|
|
6
6
|
Author: Amazon Web Services
|
|
@@ -23,9 +23,9 @@ Requires-Python: ~=3.8
|
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE
|
|
25
25
|
License-File: NOTICE
|
|
26
|
-
Requires-Dist: aws-cdk-lib<3.0.0,>=2.
|
|
26
|
+
Requires-Dist: aws-cdk-lib<3.0.0,>=2.177.0
|
|
27
27
|
Requires-Dist: constructs<11.0.0,>=10.0.0
|
|
28
|
-
Requires-Dist: jsii<2.0.0,>=1.
|
|
28
|
+
Requires-Dist: jsii<2.0.0,>=1.106.0
|
|
29
29
|
Requires-Dist: publication>=0.0.3
|
|
30
30
|
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
31
31
|
|
|
@@ -131,6 +131,39 @@ VpcV2(self, "Vpc",
|
|
|
131
131
|
|
|
132
132
|
Since `VpcV2` does not create subnets automatically, users have full control over IP addresses allocation across subnets.
|
|
133
133
|
|
|
134
|
+
### Bring your own IPv6 addresses (BYOIP)
|
|
135
|
+
|
|
136
|
+
If you have your own IP address that you would like to use with EC2, you can set up an IPv6 pool via the AWS CLI, and use that pool ID in your application.
|
|
137
|
+
|
|
138
|
+
Once you have certified your IP address block with an ROA and have obtained an X-509 certificate, you can run the following command to provision your CIDR block in your AWS account:
|
|
139
|
+
|
|
140
|
+
```shell
|
|
141
|
+
aws ec2 provision-byoip-cidr --region <region> --cidr <your CIDR block> --cidr-authorization-context Message="1|aws|<account>|<your CIDR block>|<expiration date>|SHA256".Signature="<signature>"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
When your BYOIP CIDR is provisioned, you can run the following command to retrieve your IPv6 pool ID, which will be used in your VPC declaration:
|
|
145
|
+
|
|
146
|
+
```shell
|
|
147
|
+
aws ec2 describe-byoip-cidr --region <region>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
For more help on setting up your IPv6 address, please review the [EC2 Documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html).
|
|
151
|
+
|
|
152
|
+
Once you have provisioned your address block, you can use the IPv6 in your VPC as follows:
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
my_vpc = VpcV2(self, "Vpc",
|
|
156
|
+
primary_address_block=IpAddresses.ipv4("10.1.0.0/16"),
|
|
157
|
+
secondary_address_blocks=[IpAddresses.ipv6_byoip_pool(
|
|
158
|
+
cidr_block_name="MyByoipCidrBlock",
|
|
159
|
+
ipv6_pool_id="ipv6pool-ec2-someHashValue",
|
|
160
|
+
ipv6_cidr_block="2001:db8::/32"
|
|
161
|
+
)],
|
|
162
|
+
enable_dns_hostnames=True,
|
|
163
|
+
enable_dns_support=True
|
|
164
|
+
)
|
|
165
|
+
```
|
|
166
|
+
|
|
134
167
|
## Routing
|
|
135
168
|
|
|
136
169
|
`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:
|
|
@@ -327,7 +360,7 @@ acceptor_vpc = VpcV2(self, "VpcA",
|
|
|
327
360
|
acceptor_role_arn = acceptor_vpc.create_acceptor_vpc_role("000000000000")
|
|
328
361
|
```
|
|
329
362
|
|
|
330
|
-
After creating an IAM role in the acceptor account, we can initiate the peering connection request from the requestor VPC. Import
|
|
363
|
+
After creating an IAM role in the acceptor account, we can initiate the peering connection request from the requestor VPC. Import acceptorVpc 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.
|
|
331
364
|
The following code snippet demonstrates how to set up VPC peering between two VPCs in different AWS accounts using CDK:
|
|
332
365
|
|
|
333
366
|
```python
|
|
@@ -483,11 +516,11 @@ For more information, see [What is AWS Site-to-Site VPN?](https://docs.aws.amazo
|
|
|
483
516
|
|
|
484
517
|
VPN 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.
|
|
485
518
|
|
|
486
|
-
To enable VPN route
|
|
519
|
+
To enable VPN route propagation, 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.
|
|
487
520
|
|
|
488
521
|
Additionally, 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.
|
|
489
522
|
|
|
490
|
-
The code example below provides the definition for setting up a VPN gateway with `
|
|
523
|
+
The code example below provides the definition for setting up a VPN gateway with `vpnRoutePropagation` enabled:
|
|
491
524
|
|
|
492
525
|
```python
|
|
493
526
|
stack = Stack()
|
|
@@ -515,7 +548,7 @@ An internet gateway is a horizontally scaled, redundant, and highly available VP
|
|
|
515
548
|
For more information, see [Enable VPC internet access using internet gateways](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html).
|
|
516
549
|
|
|
517
550
|
You 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.
|
|
518
|
-
Instead of using the default settings, you can configure a custom
|
|
551
|
+
Instead of using the default settings, you can configure a custom destination range by providing an optional input `destination` to the method.
|
|
519
552
|
|
|
520
553
|
The code example below shows how to add an internet gateway with a custom outbound destination IP range:
|
|
521
554
|
|
|
@@ -558,12 +591,12 @@ imported_vpc = VpcV2.from_vpc_v2_attributes(stack, "ImportedVpc",
|
|
|
558
591
|
|
|
559
592
|
In 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.
|
|
560
593
|
|
|
561
|
-
Below is an example of importing a cross region and cross
|
|
594
|
+
Below is an example of importing a cross region and cross account VPC, VPC arn for this case would be 'arn:aws:ec2:us-west-2:123456789012:vpc/mockVpcID'
|
|
562
595
|
|
|
563
596
|
```python
|
|
564
597
|
stack = Stack()
|
|
565
598
|
|
|
566
|
-
# Importing a cross
|
|
599
|
+
# Importing a cross account or cross region VPC
|
|
567
600
|
imported_vpc = VpcV2.from_vpc_v2_attributes(stack, "ImportedVpc",
|
|
568
601
|
vpc_id="mockVpcID",
|
|
569
602
|
vpc_cidr_block="10.0.0.0/16",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
aws_cdk/aws_ec2_alpha/__init__.py,sha256=v9ELcwCVBmqkC7GL-4hHqFRXHdfdAzUf9Rbk1PRrh1k,379812
|
|
2
|
+
aws_cdk/aws_ec2_alpha/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
3
|
+
aws_cdk/aws_ec2_alpha/_jsii/__init__.py,sha256=Eax1Hbu1ZjDx6rJGBkoK9FJBnn5bMvsjwz8-rwMdX6M,1479
|
|
4
|
+
aws_cdk/aws_ec2_alpha/_jsii/aws-ec2-alpha@2.177.0-alpha.0.jsii.tgz,sha256=7qzTZSM9123VfwKDFua1IhKy0HOODbWvmqJ3ZZVvWz0,188138
|
|
5
|
+
aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info/LICENSE,sha256=y47tc38H0C4DpGljYUZDl8XxidQjNxxGLq-K4jwv6Xc,11391
|
|
6
|
+
aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info/METADATA,sha256=T9d0VkioXyuGztwTI3AvxVb8z8TCUSr3jn1BoLk4Q0A,27282
|
|
7
|
+
aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info/NOTICE,sha256=ZDV6_xBfMvhFtjjBh_f6lJjhZ2AEWWAGGkx2kLKHiuc,113
|
|
8
|
+
aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
9
|
+
aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info/top_level.txt,sha256=1TALAKbuUGsMSrfKWEf268lySCmcqSEO6cDYe_XlLHM,8
|
|
10
|
+
aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info/RECORD,,
|
|
Binary file
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
aws_cdk/aws_ec2_alpha/__init__.py,sha256=J6gjyyTlgwI9LWD9SfFnODSCIS8eh3xKSorOpPPt5vI,366855
|
|
2
|
-
aws_cdk/aws_ec2_alpha/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
3
|
-
aws_cdk/aws_ec2_alpha/_jsii/__init__.py,sha256=detGWV9fXbNOeSDBSrDahLBO_1wp7-r_gnFhip0Ld2w,1479
|
|
4
|
-
aws_cdk/aws_ec2_alpha/_jsii/aws-ec2-alpha@2.175.1-alpha.0.jsii.tgz,sha256=GPLnW3YJL5iECcKWJaxhZqERkNnvZVb3sPUnJiF2SC0,182206
|
|
5
|
-
aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info/LICENSE,sha256=y47tc38H0C4DpGljYUZDl8XxidQjNxxGLq-K4jwv6Xc,11391
|
|
6
|
-
aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info/METADATA,sha256=ROrIXu-XBjzlME3gdMWS7xM7omheXCpAeKolUW_rpNA,25873
|
|
7
|
-
aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info/NOTICE,sha256=ZDV6_xBfMvhFtjjBh_f6lJjhZ2AEWWAGGkx2kLKHiuc,113
|
|
8
|
-
aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
9
|
-
aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info/top_level.txt,sha256=1TALAKbuUGsMSrfKWEf268lySCmcqSEO6cDYe_XlLHM,8
|
|
10
|
-
aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info/RECORD,,
|
{aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info → aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info}/LICENSE
RENAMED
|
File without changes
|
{aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info → aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info}/NOTICE
RENAMED
|
File without changes
|
{aws_cdk.aws_ec2_alpha-2.175.1a0.dist-info → aws_cdk.aws_ec2_alpha-2.177.0a0.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|