aws-cdk.aws-ec2-alpha 2.174.1a0__tar.gz → 2.175.0a0__tar.gz

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.

Files changed (18) hide show
  1. {aws_cdk_aws_ec2_alpha-2.174.1a0/src/aws_cdk.aws_ec2_alpha.egg-info → aws_cdk_aws_ec2_alpha-2.175.0a0}/PKG-INFO +20 -2
  2. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/README.md +18 -0
  3. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/setup.py +3 -3
  4. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/src/aws_cdk/aws_ec2_alpha/__init__.py +186 -6
  5. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/src/aws_cdk/aws_ec2_alpha/_jsii/__init__.py +2 -2
  6. aws_cdk_aws_ec2_alpha-2.175.0a0/src/aws_cdk/aws_ec2_alpha/_jsii/aws-ec2-alpha@2.175.0-alpha.0.jsii.tgz +0 -0
  7. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0/src/aws_cdk.aws_ec2_alpha.egg-info}/PKG-INFO +20 -2
  8. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/src/aws_cdk.aws_ec2_alpha.egg-info/SOURCES.txt +1 -1
  9. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/src/aws_cdk.aws_ec2_alpha.egg-info/requires.txt +1 -1
  10. aws_cdk_aws_ec2_alpha-2.174.1a0/src/aws_cdk/aws_ec2_alpha/_jsii/aws-ec2-alpha@2.174.1-alpha.0.jsii.tgz +0 -0
  11. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/LICENSE +0 -0
  12. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/MANIFEST.in +0 -0
  13. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/NOTICE +0 -0
  14. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/pyproject.toml +0 -0
  15. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/setup.cfg +0 -0
  16. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/src/aws_cdk/aws_ec2_alpha/py.typed +0 -0
  17. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/src/aws_cdk.aws_ec2_alpha.egg-info/dependency_links.txt +0 -0
  18. {aws_cdk_aws_ec2_alpha-2.174.1a0 → aws_cdk_aws_ec2_alpha-2.175.0a0}/src/aws_cdk.aws_ec2_alpha.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aws-cdk.aws-ec2-alpha
3
- Version: 2.174.1a0
3
+ Version: 2.175.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,7 +23,7 @@ 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.174.1
26
+ Requires-Dist: aws-cdk-lib<3.0.0,>=2.175.0
27
27
  Requires-Dist: constructs<11.0.0,>=10.0.0
28
28
  Requires-Dist: jsii<2.0.0,>=1.104.0
29
29
  Requires-Dist: publication>=0.0.3
@@ -655,3 +655,21 @@ SubnetV2.from_subnet_v2_attributes(self, "ImportedSubnet",
655
655
  ```
656
656
 
657
657
  By 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.
658
+
659
+ ### Tagging VPC and its components
660
+
661
+ By default, when a resource name is given to the construct, it automatically adds a tag with the key `Name` and the value set to the provided resource name. To add additional custom tags, use the Tag Manager, like this: `Tags.of(myConstruct).add('key', 'value');`.
662
+
663
+ For example, if the `vpcName` is set to `TestVpc`, the following code will add a tag to the VPC with `key: Name` and `value: TestVpc`.
664
+
665
+ ```python
666
+ vpc = VpcV2(self, "VPC-integ-test-tag",
667
+ primary_address_block=IpAddresses.ipv4("10.1.0.0/16"),
668
+ enable_dns_hostnames=True,
669
+ enable_dns_support=True,
670
+ vpc_name="CDKintegTestVPC"
671
+ )
672
+
673
+ # Add custom tags if needed
674
+ Tags.of(vpc).add("Environment", "Production")
675
+ ```
@@ -624,3 +624,21 @@ SubnetV2.from_subnet_v2_attributes(self, "ImportedSubnet",
624
624
  ```
625
625
 
626
626
  By 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.
627
+
628
+ ### Tagging VPC and its components
629
+
630
+ By default, when a resource name is given to the construct, it automatically adds a tag with the key `Name` and the value set to the provided resource name. To add additional custom tags, use the Tag Manager, like this: `Tags.of(myConstruct).add('key', 'value');`.
631
+
632
+ For example, if the `vpcName` is set to `TestVpc`, the following code will add a tag to the VPC with `key: Name` and `value: TestVpc`.
633
+
634
+ ```python
635
+ vpc = VpcV2(self, "VPC-integ-test-tag",
636
+ primary_address_block=IpAddresses.ipv4("10.1.0.0/16"),
637
+ enable_dns_hostnames=True,
638
+ enable_dns_support=True,
639
+ vpc_name="CDKintegTestVPC"
640
+ )
641
+
642
+ # Add custom tags if needed
643
+ Tags.of(vpc).add("Environment", "Production")
644
+ ```
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "aws-cdk.aws-ec2-alpha",
8
- "version": "2.174.1.a0",
8
+ "version": "2.175.0.a0",
9
9
  "description": "The CDK construct library for VPC V2",
10
10
  "license": "Apache-2.0",
11
11
  "url": "https://github.com/aws/aws-cdk",
@@ -26,7 +26,7 @@ kwargs = json.loads(
26
26
  ],
27
27
  "package_data": {
28
28
  "aws_cdk.aws_ec2_alpha._jsii": [
29
- "aws-ec2-alpha@2.174.1-alpha.0.jsii.tgz"
29
+ "aws-ec2-alpha@2.175.0-alpha.0.jsii.tgz"
30
30
  ],
31
31
  "aws_cdk.aws_ec2_alpha": [
32
32
  "py.typed"
@@ -34,7 +34,7 @@ kwargs = json.loads(
34
34
  },
35
35
  "python_requires": "~=3.8",
36
36
  "install_requires": [
37
- "aws-cdk-lib>=2.174.1, <3.0.0",
37
+ "aws-cdk-lib>=2.175.0, <3.0.0",
38
38
  "constructs>=10.0.0, <11.0.0",
39
39
  "jsii>=1.104.0, <2.0.0",
40
40
  "publication>=0.0.3",
@@ -625,6 +625,24 @@ SubnetV2.from_subnet_v2_attributes(self, "ImportedSubnet",
625
625
  ```
626
626
 
627
627
  By 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.
628
+
629
+ ### Tagging VPC and its components
630
+
631
+ By default, when a resource name is given to the construct, it automatically adds a tag with the key `Name` and the value set to the provided resource name. To add additional custom tags, use the Tag Manager, like this: `Tags.of(myConstruct).add('key', 'value');`.
632
+
633
+ For example, if the `vpcName` is set to `TestVpc`, the following code will add a tag to the VPC with `key: Name` and `value: TestVpc`.
634
+
635
+ ```python
636
+ vpc = VpcV2(self, "VPC-integ-test-tag",
637
+ primary_address_block=IpAddresses.ipv4("10.1.0.0/16"),
638
+ enable_dns_hostnames=True,
639
+ enable_dns_support=True,
640
+ vpc_name="CDKintegTestVPC"
641
+ )
642
+
643
+ # Add custom tags if needed
644
+ Tags.of(vpc).add("Environment", "Production")
645
+ ```
628
646
  '''
629
647
  from pkgutil import extend_path
630
648
  __path__ = extend_path(__path__, __name__)
@@ -746,18 +764,24 @@ class AwsServiceName(enum.Enum):
746
764
  @jsii.data_type(
747
765
  jsii_type="@aws-cdk/aws-ec2-alpha.EgressOnlyInternetGatewayOptions",
748
766
  jsii_struct_bases=[],
749
- name_mapping={"destination": "destination", "subnets": "subnets"},
767
+ name_mapping={
768
+ "destination": "destination",
769
+ "egress_only_internet_gateway_name": "egressOnlyInternetGatewayName",
770
+ "subnets": "subnets",
771
+ },
750
772
  )
751
773
  class EgressOnlyInternetGatewayOptions:
752
774
  def __init__(
753
775
  self,
754
776
  *,
755
777
  destination: typing.Optional[builtins.str] = None,
778
+ egress_only_internet_gateway_name: typing.Optional[builtins.str] = None,
756
779
  subnets: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
757
780
  ) -> None:
758
781
  '''(experimental) Options to define EgressOnlyInternetGateway for VPC.
759
782
 
760
783
  :param destination: (experimental) Destination Ipv6 address for EGW route. Default: - '::/0' all Ipv6 traffic
784
+ :param egress_only_internet_gateway_name: (experimental) The resource name of the egress-only internet gateway. Provided name will be used for tagging Default: - no name tag associated and provisioned without a resource name
761
785
  :param subnets: (experimental) List of subnets where route to EGW will be added. Default: - no route created
762
786
 
763
787
  :stability: experimental
@@ -791,10 +815,13 @@ class EgressOnlyInternetGatewayOptions:
791
815
  if __debug__:
792
816
  type_hints = typing.get_type_hints(_typecheckingstub__47cf639398ded64820e35dac43908a70a34ddc76a3ed35cc0c24357b0e01f48d)
793
817
  check_type(argname="argument destination", value=destination, expected_type=type_hints["destination"])
818
+ check_type(argname="argument egress_only_internet_gateway_name", value=egress_only_internet_gateway_name, expected_type=type_hints["egress_only_internet_gateway_name"])
794
819
  check_type(argname="argument subnets", value=subnets, expected_type=type_hints["subnets"])
795
820
  self._values: typing.Dict[builtins.str, typing.Any] = {}
796
821
  if destination is not None:
797
822
  self._values["destination"] = destination
823
+ if egress_only_internet_gateway_name is not None:
824
+ self._values["egress_only_internet_gateway_name"] = egress_only_internet_gateway_name
798
825
  if subnets is not None:
799
826
  self._values["subnets"] = subnets
800
827
 
@@ -809,6 +836,19 @@ class EgressOnlyInternetGatewayOptions:
809
836
  result = self._values.get("destination")
810
837
  return typing.cast(typing.Optional[builtins.str], result)
811
838
 
839
+ @builtins.property
840
+ def egress_only_internet_gateway_name(self) -> typing.Optional[builtins.str]:
841
+ '''(experimental) The resource name of the egress-only internet gateway.
842
+
843
+ Provided name will be used for tagging
844
+
845
+ :default: - no name tag associated and provisioned without a resource name
846
+
847
+ :stability: experimental
848
+ '''
849
+ result = self._values.get("egress_only_internet_gateway_name")
850
+ return typing.cast(typing.Optional[builtins.str], result)
851
+
812
852
  @builtins.property
813
853
  def subnets(
814
854
  self,
@@ -1116,6 +1156,7 @@ class IIpamScopeBase(typing_extensions.Protocol):
1116
1156
  *,
1117
1157
  address_family: AddressFamily,
1118
1158
  aws_service: typing.Optional[AwsServiceName] = None,
1159
+ ipam_pool_name: typing.Optional[builtins.str] = None,
1119
1160
  ipv4_provisioned_cidrs: typing.Optional[typing.Sequence[builtins.str]] = None,
1120
1161
  locale: typing.Optional[builtins.str] = None,
1121
1162
  public_ip_source: typing.Optional["IpamPoolPublicIpSource"] = None,
@@ -1125,6 +1166,7 @@ class IIpamScopeBase(typing_extensions.Protocol):
1125
1166
  :param id: -
1126
1167
  :param address_family: (experimental) addressFamily - The address family of the pool (ipv4 or ipv6).
1127
1168
  :param aws_service: (experimental) Limits which service in AWS that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs. Default: - required in case of an IPv6, throws an error if not provided.
1169
+ :param ipam_pool_name: (experimental) IPAM Pool resource name to be used for tagging. Default: - autogenerated by CDK if not provided
1128
1170
  :param ipv4_provisioned_cidrs: (experimental) Information about the CIDRs provisioned to the pool. Default: - No CIDRs are provisioned
1129
1171
  :param locale: (experimental) The locale (AWS Region) of the pool. Should be one of the IPAM operating region. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an AWS Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error. Default: - Current operating region of IPAM
1130
1172
  :param public_ip_source: (experimental) The IP address source for pools in the public scope. Only used for IPv6 address Only allowed values to this are 'byoip' or 'amazon' Default: amazon
@@ -1176,6 +1218,7 @@ class _IIpamScopeBaseProxy:
1176
1218
  *,
1177
1219
  address_family: AddressFamily,
1178
1220
  aws_service: typing.Optional[AwsServiceName] = None,
1221
+ ipam_pool_name: typing.Optional[builtins.str] = None,
1179
1222
  ipv4_provisioned_cidrs: typing.Optional[typing.Sequence[builtins.str]] = None,
1180
1223
  locale: typing.Optional[builtins.str] = None,
1181
1224
  public_ip_source: typing.Optional["IpamPoolPublicIpSource"] = None,
@@ -1185,6 +1228,7 @@ class _IIpamScopeBaseProxy:
1185
1228
  :param id: -
1186
1229
  :param address_family: (experimental) addressFamily - The address family of the pool (ipv4 or ipv6).
1187
1230
  :param aws_service: (experimental) Limits which service in AWS that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs. Default: - required in case of an IPv6, throws an error if not provided.
1231
+ :param ipam_pool_name: (experimental) IPAM Pool resource name to be used for tagging. Default: - autogenerated by CDK if not provided
1188
1232
  :param ipv4_provisioned_cidrs: (experimental) Information about the CIDRs provisioned to the pool. Default: - No CIDRs are provisioned
1189
1233
  :param locale: (experimental) The locale (AWS Region) of the pool. Should be one of the IPAM operating region. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an AWS Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error. Default: - Current operating region of IPAM
1190
1234
  :param public_ip_source: (experimental) The IP address source for pools in the public scope. Only used for IPv6 address Only allowed values to this are 'byoip' or 'amazon' Default: amazon
@@ -1197,6 +1241,7 @@ class _IIpamScopeBaseProxy:
1197
1241
  options = PoolOptions(
1198
1242
  address_family=address_family,
1199
1243
  aws_service=aws_service,
1244
+ ipam_pool_name=ipam_pool_name,
1200
1245
  ipv4_provisioned_cidrs=ipv4_provisioned_cidrs,
1201
1246
  locale=locale,
1202
1247
  public_ip_source=public_ip_source,
@@ -1568,11 +1613,22 @@ class IVpcV2(_aws_cdk_aws_ec2_ceddda9d.IVpc, typing_extensions.Protocol):
1568
1613
  '''
1569
1614
  ...
1570
1615
 
1616
+ @builtins.property
1617
+ @jsii.member(jsii_name="vpcName")
1618
+ def vpc_name(self) -> typing.Optional[builtins.str]:
1619
+ '''(experimental) VpcName to be used for tagging its components.
1620
+
1621
+ :stability: experimental
1622
+ :attribute: true
1623
+ '''
1624
+ ...
1625
+
1571
1626
  @jsii.member(jsii_name="addEgressOnlyInternetGateway")
1572
1627
  def add_egress_only_internet_gateway(
1573
1628
  self,
1574
1629
  *,
1575
1630
  destination: typing.Optional[builtins.str] = None,
1631
+ egress_only_internet_gateway_name: typing.Optional[builtins.str] = None,
1576
1632
  subnets: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
1577
1633
  ) -> None:
1578
1634
  '''(experimental) Add an Egress only Internet Gateway to current VPC.
@@ -1581,6 +1637,7 @@ class IVpcV2(_aws_cdk_aws_ec2_ceddda9d.IVpc, typing_extensions.Protocol):
1581
1637
  For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/userguide/egress-only-internet-gateway-basics.html}.
1582
1638
 
1583
1639
  :param destination: (experimental) Destination Ipv6 address for EGW route. Default: - '::/0' all Ipv6 traffic
1640
+ :param egress_only_internet_gateway_name: (experimental) The resource name of the egress-only internet gateway. Provided name will be used for tagging Default: - no name tag associated and provisioned without a resource name
1584
1641
  :param subnets: (experimental) List of subnets where route to EGW will be added. Default: - no route created
1585
1642
 
1586
1643
  :stability: experimental
@@ -1591,6 +1648,7 @@ class IVpcV2(_aws_cdk_aws_ec2_ceddda9d.IVpc, typing_extensions.Protocol):
1591
1648
  def add_internet_gateway(
1592
1649
  self,
1593
1650
  *,
1651
+ internet_gateway_name: typing.Optional[builtins.str] = None,
1594
1652
  ipv4_destination: typing.Optional[builtins.str] = None,
1595
1653
  ipv6_destination: typing.Optional[builtins.str] = None,
1596
1654
  ) -> None:
@@ -1598,6 +1656,7 @@ class IVpcV2(_aws_cdk_aws_ec2_ceddda9d.IVpc, typing_extensions.Protocol):
1598
1656
 
1599
1657
  For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html}.
1600
1658
 
1659
+ :param internet_gateway_name: (experimental) The resource name of the internet gateway. Provided name will be used for tagging Default: - provisioned without a resource name
1601
1660
  :param ipv4_destination: (experimental) Destination Ipv6 address for EGW route. Default: - '0.0.0.0' all Ipv4 traffic
1602
1661
  :param ipv6_destination: (experimental) Destination Ipv6 address for EGW route. Default: - '::/0' all Ipv6 traffic
1603
1662
 
@@ -1769,11 +1828,22 @@ class _IVpcV2Proxy(
1769
1828
  '''
1770
1829
  return typing.cast(typing.Optional[typing.List[IVPCCidrBlock]], jsii.get(self, "secondaryCidrBlock"))
1771
1830
 
1831
+ @builtins.property
1832
+ @jsii.member(jsii_name="vpcName")
1833
+ def vpc_name(self) -> typing.Optional[builtins.str]:
1834
+ '''(experimental) VpcName to be used for tagging its components.
1835
+
1836
+ :stability: experimental
1837
+ :attribute: true
1838
+ '''
1839
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "vpcName"))
1840
+
1772
1841
  @jsii.member(jsii_name="addEgressOnlyInternetGateway")
1773
1842
  def add_egress_only_internet_gateway(
1774
1843
  self,
1775
1844
  *,
1776
1845
  destination: typing.Optional[builtins.str] = None,
1846
+ egress_only_internet_gateway_name: typing.Optional[builtins.str] = None,
1777
1847
  subnets: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
1778
1848
  ) -> None:
1779
1849
  '''(experimental) Add an Egress only Internet Gateway to current VPC.
@@ -1782,12 +1852,15 @@ class _IVpcV2Proxy(
1782
1852
  For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/userguide/egress-only-internet-gateway-basics.html}.
1783
1853
 
1784
1854
  :param destination: (experimental) Destination Ipv6 address for EGW route. Default: - '::/0' all Ipv6 traffic
1855
+ :param egress_only_internet_gateway_name: (experimental) The resource name of the egress-only internet gateway. Provided name will be used for tagging Default: - no name tag associated and provisioned without a resource name
1785
1856
  :param subnets: (experimental) List of subnets where route to EGW will be added. Default: - no route created
1786
1857
 
1787
1858
  :stability: experimental
1788
1859
  '''
1789
1860
  options = EgressOnlyInternetGatewayOptions(
1790
- destination=destination, subnets=subnets
1861
+ destination=destination,
1862
+ egress_only_internet_gateway_name=egress_only_internet_gateway_name,
1863
+ subnets=subnets,
1791
1864
  )
1792
1865
 
1793
1866
  return typing.cast(None, jsii.invoke(self, "addEgressOnlyInternetGateway", [options]))
@@ -1796,6 +1869,7 @@ class _IVpcV2Proxy(
1796
1869
  def add_internet_gateway(
1797
1870
  self,
1798
1871
  *,
1872
+ internet_gateway_name: typing.Optional[builtins.str] = None,
1799
1873
  ipv4_destination: typing.Optional[builtins.str] = None,
1800
1874
  ipv6_destination: typing.Optional[builtins.str] = None,
1801
1875
  ) -> None:
@@ -1803,6 +1877,7 @@ class _IVpcV2Proxy(
1803
1877
 
1804
1878
  For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html}.
1805
1879
 
1880
+ :param internet_gateway_name: (experimental) The resource name of the internet gateway. Provided name will be used for tagging Default: - provisioned without a resource name
1806
1881
  :param ipv4_destination: (experimental) Destination Ipv6 address for EGW route. Default: - '0.0.0.0' all Ipv4 traffic
1807
1882
  :param ipv6_destination: (experimental) Destination Ipv6 address for EGW route. Default: - '::/0' all Ipv6 traffic
1808
1883
 
@@ -1811,7 +1886,9 @@ class _IVpcV2Proxy(
1811
1886
  :stability: experimental
1812
1887
  '''
1813
1888
  options = InternetGatewayOptions(
1814
- ipv4_destination=ipv4_destination, ipv6_destination=ipv6_destination
1889
+ internet_gateway_name=internet_gateway_name,
1890
+ ipv4_destination=ipv4_destination,
1891
+ ipv6_destination=ipv6_destination,
1815
1892
  )
1816
1893
 
1817
1894
  return typing.cast(None, jsii.invoke(self, "addInternetGateway", [options]))
@@ -2050,6 +2127,7 @@ class InternetGateway(
2050
2127
  jsii_type="@aws-cdk/aws-ec2-alpha.InternetGatewayOptions",
2051
2128
  jsii_struct_bases=[],
2052
2129
  name_mapping={
2130
+ "internet_gateway_name": "internetGatewayName",
2053
2131
  "ipv4_destination": "ipv4Destination",
2054
2132
  "ipv6_destination": "ipv6Destination",
2055
2133
  },
@@ -2058,11 +2136,13 @@ class InternetGatewayOptions:
2058
2136
  def __init__(
2059
2137
  self,
2060
2138
  *,
2139
+ internet_gateway_name: typing.Optional[builtins.str] = None,
2061
2140
  ipv4_destination: typing.Optional[builtins.str] = None,
2062
2141
  ipv6_destination: typing.Optional[builtins.str] = None,
2063
2142
  ) -> None:
2064
2143
  '''(experimental) Options to define InternetGateway for VPC.
2065
2144
 
2145
+ :param internet_gateway_name: (experimental) The resource name of the internet gateway. Provided name will be used for tagging Default: - provisioned without a resource name
2066
2146
  :param ipv4_destination: (experimental) Destination Ipv6 address for EGW route. Default: - '0.0.0.0' all Ipv4 traffic
2067
2147
  :param ipv6_destination: (experimental) Destination Ipv6 address for EGW route. Default: - '::/0' all Ipv6 traffic
2068
2148
 
@@ -2087,14 +2167,30 @@ class InternetGatewayOptions:
2087
2167
  '''
2088
2168
  if __debug__:
2089
2169
  type_hints = typing.get_type_hints(_typecheckingstub__1767be14586e30c26bcd910b9753aae1720568db2bf09fbf8dd100e10ab1fc09)
2170
+ check_type(argname="argument internet_gateway_name", value=internet_gateway_name, expected_type=type_hints["internet_gateway_name"])
2090
2171
  check_type(argname="argument ipv4_destination", value=ipv4_destination, expected_type=type_hints["ipv4_destination"])
2091
2172
  check_type(argname="argument ipv6_destination", value=ipv6_destination, expected_type=type_hints["ipv6_destination"])
2092
2173
  self._values: typing.Dict[builtins.str, typing.Any] = {}
2174
+ if internet_gateway_name is not None:
2175
+ self._values["internet_gateway_name"] = internet_gateway_name
2093
2176
  if ipv4_destination is not None:
2094
2177
  self._values["ipv4_destination"] = ipv4_destination
2095
2178
  if ipv6_destination is not None:
2096
2179
  self._values["ipv6_destination"] = ipv6_destination
2097
2180
 
2181
+ @builtins.property
2182
+ def internet_gateway_name(self) -> typing.Optional[builtins.str]:
2183
+ '''(experimental) The resource name of the internet gateway.
2184
+
2185
+ Provided name will be used for tagging
2186
+
2187
+ :default: - provisioned without a resource name
2188
+
2189
+ :stability: experimental
2190
+ '''
2191
+ result = self._values.get("internet_gateway_name")
2192
+ return typing.cast(typing.Optional[builtins.str], result)
2193
+
2098
2194
  @builtins.property
2099
2195
  def ipv4_destination(self) -> typing.Optional[builtins.str]:
2100
2196
  '''(experimental) Destination Ipv6 address for EGW route.
@@ -2527,6 +2623,18 @@ class Ipam(
2527
2623
  '''
2528
2624
  return typing.cast(typing.List[IIpamScopeBase], jsii.get(self, "scopes"))
2529
2625
 
2626
+ @builtins.property
2627
+ @jsii.member(jsii_name="ipamName")
2628
+ def ipam_name(self) -> typing.Optional[builtins.str]:
2629
+ '''(experimental) IPAM name to be used for tagging.
2630
+
2631
+ :default: no tag specified
2632
+
2633
+ :stability: experimental
2634
+ :attribute: IpamName
2635
+ '''
2636
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "ipamName"))
2637
+
2530
2638
 
2531
2639
  @jsii.data_type(
2532
2640
  jsii_type="@aws-cdk/aws-ec2-alpha.IpamOptions",
@@ -3129,6 +3237,16 @@ class NatGateway(
3129
3237
 
3130
3238
  jsii.create(self.__class__, self, [scope, id, props])
3131
3239
 
3240
+ @builtins.property
3241
+ @jsii.member(jsii_name="natGatewayId")
3242
+ def nat_gateway_id(self) -> builtins.str:
3243
+ '''(experimental) Id of the NatGateway.
3244
+
3245
+ :stability: experimental
3246
+ :attribute: true
3247
+ '''
3248
+ return typing.cast(builtins.str, jsii.get(self, "natGatewayId"))
3249
+
3132
3250
  @builtins.property
3133
3251
  @jsii.member(jsii_name="resource")
3134
3252
  def resource(self) -> _aws_cdk_aws_ec2_ceddda9d.CfnNatGateway:
@@ -3651,6 +3769,7 @@ class NatGatewayProps(NatGatewayOptions):
3651
3769
  name_mapping={
3652
3770
  "address_family": "addressFamily",
3653
3771
  "aws_service": "awsService",
3772
+ "ipam_pool_name": "ipamPoolName",
3654
3773
  "ipv4_provisioned_cidrs": "ipv4ProvisionedCidrs",
3655
3774
  "locale": "locale",
3656
3775
  "public_ip_source": "publicIpSource",
@@ -3662,6 +3781,7 @@ class PoolOptions:
3662
3781
  *,
3663
3782
  address_family: AddressFamily,
3664
3783
  aws_service: typing.Optional[AwsServiceName] = None,
3784
+ ipam_pool_name: typing.Optional[builtins.str] = None,
3665
3785
  ipv4_provisioned_cidrs: typing.Optional[typing.Sequence[builtins.str]] = None,
3666
3786
  locale: typing.Optional[builtins.str] = None,
3667
3787
  public_ip_source: typing.Optional[IpamPoolPublicIpSource] = None,
@@ -3670,6 +3790,7 @@ class PoolOptions:
3670
3790
 
3671
3791
  :param address_family: (experimental) addressFamily - The address family of the pool (ipv4 or ipv6).
3672
3792
  :param aws_service: (experimental) Limits which service in AWS that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs. Default: - required in case of an IPv6, throws an error if not provided.
3793
+ :param ipam_pool_name: (experimental) IPAM Pool resource name to be used for tagging. Default: - autogenerated by CDK if not provided
3673
3794
  :param ipv4_provisioned_cidrs: (experimental) Information about the CIDRs provisioned to the pool. Default: - No CIDRs are provisioned
3674
3795
  :param locale: (experimental) The locale (AWS Region) of the pool. Should be one of the IPAM operating region. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an AWS Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error. Default: - Current operating region of IPAM
3675
3796
  :param public_ip_source: (experimental) The IP address source for pools in the public scope. Only used for IPv6 address Only allowed values to this are 'byoip' or 'amazon' Default: amazon
@@ -3718,6 +3839,7 @@ class PoolOptions:
3718
3839
  type_hints = typing.get_type_hints(_typecheckingstub__60b5a95424fdb1e7fb6ae3da82efaf806f125de298a951d9b7f9b24181fd5c41)
3719
3840
  check_type(argname="argument address_family", value=address_family, expected_type=type_hints["address_family"])
3720
3841
  check_type(argname="argument aws_service", value=aws_service, expected_type=type_hints["aws_service"])
3842
+ check_type(argname="argument ipam_pool_name", value=ipam_pool_name, expected_type=type_hints["ipam_pool_name"])
3721
3843
  check_type(argname="argument ipv4_provisioned_cidrs", value=ipv4_provisioned_cidrs, expected_type=type_hints["ipv4_provisioned_cidrs"])
3722
3844
  check_type(argname="argument locale", value=locale, expected_type=type_hints["locale"])
3723
3845
  check_type(argname="argument public_ip_source", value=public_ip_source, expected_type=type_hints["public_ip_source"])
@@ -3726,6 +3848,8 @@ class PoolOptions:
3726
3848
  }
3727
3849
  if aws_service is not None:
3728
3850
  self._values["aws_service"] = aws_service
3851
+ if ipam_pool_name is not None:
3852
+ self._values["ipam_pool_name"] = ipam_pool_name
3729
3853
  if ipv4_provisioned_cidrs is not None:
3730
3854
  self._values["ipv4_provisioned_cidrs"] = ipv4_provisioned_cidrs
3731
3855
  if locale is not None:
@@ -3757,6 +3881,17 @@ class PoolOptions:
3757
3881
  result = self._values.get("aws_service")
3758
3882
  return typing.cast(typing.Optional[AwsServiceName], result)
3759
3883
 
3884
+ @builtins.property
3885
+ def ipam_pool_name(self) -> typing.Optional[builtins.str]:
3886
+ '''(experimental) IPAM Pool resource name to be used for tagging.
3887
+
3888
+ :default: - autogenerated by CDK if not provided
3889
+
3890
+ :stability: experimental
3891
+ '''
3892
+ result = self._values.get("ipam_pool_name")
3893
+ return typing.cast(typing.Optional[builtins.str], result)
3894
+
3760
3895
  @builtins.property
3761
3896
  def ipv4_provisioned_cidrs(self) -> typing.Optional[typing.List[builtins.str]]:
3762
3897
  '''(experimental) Information about the CIDRs provisioned to the pool.
@@ -4117,12 +4252,14 @@ class RouteTable(
4117
4252
  id: builtins.str,
4118
4253
  destination: builtins.str,
4119
4254
  target: "RouteTargetType",
4255
+ route_name: typing.Optional[builtins.str] = None,
4120
4256
  ) -> None:
4121
4257
  '''(experimental) Adds a new custom route to the route table.
4122
4258
 
4123
4259
  :param id: -
4124
4260
  :param destination: The IPv4 or IPv6 CIDR block used for the destination match.
4125
4261
  :param target: The gateway or endpoint targeted by the route.
4262
+ :param route_name: The resource name of the route.
4126
4263
 
4127
4264
  :stability: experimental
4128
4265
  '''
@@ -4131,7 +4268,8 @@ class RouteTable(
4131
4268
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
4132
4269
  check_type(argname="argument destination", value=destination, expected_type=type_hints["destination"])
4133
4270
  check_type(argname="argument target", value=target, expected_type=type_hints["target"])
4134
- return typing.cast(None, jsii.invoke(self, "addRoute", [id, destination, target]))
4271
+ check_type(argname="argument route_name", value=route_name, expected_type=type_hints["route_name"])
4272
+ return typing.cast(None, jsii.invoke(self, "addRoute", [id, destination, target, route_name]))
4135
4273
 
4136
4274
  @builtins.property
4137
4275
  @jsii.member(jsii_name="resource")
@@ -6428,11 +6566,13 @@ class VpcV2Base(
6428
6566
  self,
6429
6567
  *,
6430
6568
  destination: typing.Optional[builtins.str] = None,
6569
+ egress_only_internet_gateway_name: typing.Optional[builtins.str] = None,
6431
6570
  subnets: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
6432
6571
  ) -> None:
6433
6572
  '''(experimental) Adds a new Egress Only Internet Gateway to this VPC and defines a new route to the route table of given subnets.
6434
6573
 
6435
6574
  :param destination: (experimental) Destination Ipv6 address for EGW route. Default: - '::/0' all Ipv6 traffic
6575
+ :param egress_only_internet_gateway_name: (experimental) The resource name of the egress-only internet gateway. Provided name will be used for tagging Default: - no name tag associated and provisioned without a resource name
6436
6576
  :param subnets: (experimental) List of subnets where route to EGW will be added. Default: - no route created
6437
6577
 
6438
6578
  :default: - in case of no input subnets, no route is created
@@ -6440,7 +6580,9 @@ class VpcV2Base(
6440
6580
  :stability: experimental
6441
6581
  '''
6442
6582
  options = EgressOnlyInternetGatewayOptions(
6443
- destination=destination, subnets=subnets
6583
+ destination=destination,
6584
+ egress_only_internet_gateway_name=egress_only_internet_gateway_name,
6585
+ subnets=subnets,
6444
6586
  )
6445
6587
 
6446
6588
  return typing.cast(None, jsii.invoke(self, "addEgressOnlyInternetGateway", [options]))
@@ -6544,11 +6686,13 @@ class VpcV2Base(
6544
6686
  def add_internet_gateway(
6545
6687
  self,
6546
6688
  *,
6689
+ internet_gateway_name: typing.Optional[builtins.str] = None,
6547
6690
  ipv4_destination: typing.Optional[builtins.str] = None,
6548
6691
  ipv6_destination: typing.Optional[builtins.str] = None,
6549
6692
  ) -> None:
6550
6693
  '''(experimental) Adds a new Internet Gateway to this VPC.
6551
6694
 
6695
+ :param internet_gateway_name: (experimental) The resource name of the internet gateway. Provided name will be used for tagging Default: - provisioned without a resource name
6552
6696
  :param ipv4_destination: (experimental) Destination Ipv6 address for EGW route. Default: - '0.0.0.0' all Ipv4 traffic
6553
6697
  :param ipv6_destination: (experimental) Destination Ipv6 address for EGW route. Default: - '::/0' all Ipv6 traffic
6554
6698
 
@@ -6557,7 +6701,9 @@ class VpcV2Base(
6557
6701
  :stability: experimental
6558
6702
  '''
6559
6703
  options = InternetGatewayOptions(
6560
- ipv4_destination=ipv4_destination, ipv6_destination=ipv6_destination
6704
+ internet_gateway_name=internet_gateway_name,
6705
+ ipv4_destination=ipv4_destination,
6706
+ ipv6_destination=ipv6_destination,
6561
6707
  )
6562
6708
 
6563
6709
  return typing.cast(None, jsii.invoke(self, "addInternetGateway", [options]))
@@ -6940,6 +7086,16 @@ class VpcV2Base(
6940
7086
  '''
6941
7087
  ...
6942
7088
 
7089
+ @builtins.property
7090
+ @jsii.member(jsii_name="vpcName")
7091
+ @abc.abstractmethod
7092
+ def vpc_name(self) -> typing.Optional[builtins.str]:
7093
+ '''(experimental) VpcName to be used for tagging its components.
7094
+
7095
+ :stability: experimental
7096
+ '''
7097
+ ...
7098
+
6943
7099
  @builtins.property
6944
7100
  @jsii.member(jsii_name="vpnGatewayId")
6945
7101
  def vpn_gateway_id(self) -> typing.Optional[builtins.str]:
@@ -7064,6 +7220,15 @@ class _VpcV2BaseProxy(
7064
7220
  '''
7065
7221
  return typing.cast(typing.Optional[typing.List[IVPCCidrBlock]], jsii.get(self, "secondaryCidrBlock"))
7066
7222
 
7223
+ @builtins.property
7224
+ @jsii.member(jsii_name="vpcName")
7225
+ def vpc_name(self) -> typing.Optional[builtins.str]:
7226
+ '''(experimental) VpcName to be used for tagging its components.
7227
+
7228
+ :stability: experimental
7229
+ '''
7230
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "vpcName"))
7231
+
7067
7232
  # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
7068
7233
  typing.cast(typing.Any, VpcV2Base).__jsii_proxy_class__ = lambda : _VpcV2BaseProxy
7069
7234
 
@@ -7613,6 +7778,16 @@ class VpcV2(
7613
7778
  '''
7614
7779
  return typing.cast(typing.Optional[typing.List[IVPCCidrBlock]], jsii.get(self, "secondaryCidrBlock"))
7615
7780
 
7781
+ @builtins.property
7782
+ @jsii.member(jsii_name="vpcName")
7783
+ def vpc_name(self) -> typing.Optional[builtins.str]:
7784
+ '''(experimental) VpcName to be used for tagging its components.
7785
+
7786
+ :stability: experimental
7787
+ :attribute: true
7788
+ '''
7789
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "vpcName"))
7790
+
7616
7791
 
7617
7792
  __all__ = [
7618
7793
  "AddressFamily",
@@ -7674,6 +7849,7 @@ publication.publish()
7674
7849
  def _typecheckingstub__47cf639398ded64820e35dac43908a70a34ddc76a3ed35cc0c24357b0e01f48d(
7675
7850
  *,
7676
7851
  destination: typing.Optional[builtins.str] = None,
7852
+ egress_only_internet_gateway_name: typing.Optional[builtins.str] = None,
7677
7853
  subnets: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
7678
7854
  ) -> None:
7679
7855
  """Type checking stubs"""
@@ -7701,6 +7877,7 @@ def _typecheckingstub__1ab59e34a032c2ecbc5b1f46184e5eafc041fe87fd1c685e9d6723df4
7701
7877
  *,
7702
7878
  address_family: AddressFamily,
7703
7879
  aws_service: typing.Optional[AwsServiceName] = None,
7880
+ ipam_pool_name: typing.Optional[builtins.str] = None,
7704
7881
  ipv4_provisioned_cidrs: typing.Optional[typing.Sequence[builtins.str]] = None,
7705
7882
  locale: typing.Optional[builtins.str] = None,
7706
7883
  public_ip_source: typing.Optional[IpamPoolPublicIpSource] = None,
@@ -7736,6 +7913,7 @@ def _typecheckingstub__a1ed9b26ff938b529db1af6f12978e1aa57b9cdaf5a5c589675cf7b8f
7736
7913
 
7737
7914
  def _typecheckingstub__1767be14586e30c26bcd910b9753aae1720568db2bf09fbf8dd100e10ab1fc09(
7738
7915
  *,
7916
+ internet_gateway_name: typing.Optional[builtins.str] = None,
7739
7917
  ipv4_destination: typing.Optional[builtins.str] = None,
7740
7918
  ipv6_destination: typing.Optional[builtins.str] = None,
7741
7919
  ) -> None:
@@ -7868,6 +8046,7 @@ def _typecheckingstub__60b5a95424fdb1e7fb6ae3da82efaf806f125de298a951d9b7f9b2418
7868
8046
  *,
7869
8047
  address_family: AddressFamily,
7870
8048
  aws_service: typing.Optional[AwsServiceName] = None,
8049
+ ipam_pool_name: typing.Optional[builtins.str] = None,
7871
8050
  ipv4_provisioned_cidrs: typing.Optional[typing.Sequence[builtins.str]] = None,
7872
8051
  locale: typing.Optional[builtins.str] = None,
7873
8052
  public_ip_source: typing.Optional[IpamPoolPublicIpSource] = None,
@@ -7911,6 +8090,7 @@ def _typecheckingstub__920d6a12797cd2ad571157da68e37100c7d72b72ff09fd42451a65b73
7911
8090
  id: builtins.str,
7912
8091
  destination: builtins.str,
7913
8092
  target: RouteTargetType,
8093
+ route_name: typing.Optional[builtins.str] = None,
7914
8094
  ) -> None:
7915
8095
  """Type checking stubs"""
7916
8096
  pass
@@ -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.174.1-alpha.0",
36
+ "2.175.0-alpha.0",
37
37
  __name__[0:-6],
38
- "aws-ec2-alpha@2.174.1-alpha.0.jsii.tgz",
38
+ "aws-ec2-alpha@2.175.0-alpha.0.jsii.tgz",
39
39
  )
40
40
 
41
41
  __all__ = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aws-cdk.aws-ec2-alpha
3
- Version: 2.174.1a0
3
+ Version: 2.175.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,7 +23,7 @@ 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.174.1
26
+ Requires-Dist: aws-cdk-lib<3.0.0,>=2.175.0
27
27
  Requires-Dist: constructs<11.0.0,>=10.0.0
28
28
  Requires-Dist: jsii<2.0.0,>=1.104.0
29
29
  Requires-Dist: publication>=0.0.3
@@ -655,3 +655,21 @@ SubnetV2.from_subnet_v2_attributes(self, "ImportedSubnet",
655
655
  ```
656
656
 
657
657
  By 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.
658
+
659
+ ### Tagging VPC and its components
660
+
661
+ By default, when a resource name is given to the construct, it automatically adds a tag with the key `Name` and the value set to the provided resource name. To add additional custom tags, use the Tag Manager, like this: `Tags.of(myConstruct).add('key', 'value');`.
662
+
663
+ For example, if the `vpcName` is set to `TestVpc`, the following code will add a tag to the VPC with `key: Name` and `value: TestVpc`.
664
+
665
+ ```python
666
+ vpc = VpcV2(self, "VPC-integ-test-tag",
667
+ primary_address_block=IpAddresses.ipv4("10.1.0.0/16"),
668
+ enable_dns_hostnames=True,
669
+ enable_dns_support=True,
670
+ vpc_name="CDKintegTestVPC"
671
+ )
672
+
673
+ # Add custom tags if needed
674
+ Tags.of(vpc).add("Environment", "Production")
675
+ ```
@@ -12,4 +12,4 @@ src/aws_cdk.aws_ec2_alpha.egg-info/top_level.txt
12
12
  src/aws_cdk/aws_ec2_alpha/__init__.py
13
13
  src/aws_cdk/aws_ec2_alpha/py.typed
14
14
  src/aws_cdk/aws_ec2_alpha/_jsii/__init__.py
15
- src/aws_cdk/aws_ec2_alpha/_jsii/aws-ec2-alpha@2.174.1-alpha.0.jsii.tgz
15
+ src/aws_cdk/aws_ec2_alpha/_jsii/aws-ec2-alpha@2.175.0-alpha.0.jsii.tgz
@@ -1,4 +1,4 @@
1
- aws-cdk-lib<3.0.0,>=2.174.1
1
+ aws-cdk-lib<3.0.0,>=2.175.0
2
2
  constructs<11.0.0,>=10.0.0
3
3
  jsii<2.0.0,>=1.104.0
4
4
  publication>=0.0.3