aws-cdk.aws-ec2-alpha 2.187.0a0__py3-none-any.whl → 2.189.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.

@@ -43,6 +43,7 @@ VpcV2(self, "Vpc",
43
43
  `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.
44
44
  This new construct can be used to add subnets to a `VpcV2` instance:
45
45
  Note: When defining a subnet with `SubnetV2`, CDK automatically creates a new route table, unless a route table is explicitly provided as an input to the construct.
46
+ To enable the `mapPublicIpOnLaunch` feature (which is `false` by default), set the property to `true` when creating the subnet.
46
47
 
47
48
  ```python
48
49
  stack = Stack()
@@ -57,7 +58,8 @@ SubnetV2(self, "subnetA",
57
58
  availability_zone="us-east-1a",
58
59
  ipv4_cidr_block=IpCidr("10.0.0.0/24"),
59
60
  ipv6_cidr_block=IpCidr("2a05:d02c:25:4000::/60"),
60
- subnet_type=SubnetType.PRIVATE_ISOLATED
61
+ subnet_type=SubnetType.PUBLIC,
62
+ map_public_ip_on_launch=True
61
63
  )
62
64
  ```
63
65
 
@@ -2983,7 +2985,7 @@ class IVpcV2(_aws_cdk_aws_ec2_ceddda9d.IVpc, typing_extensions.Protocol):
2983
2985
  destination: typing.Optional[builtins.str] = None,
2984
2986
  egress_only_internet_gateway_name: typing.Optional[builtins.str] = None,
2985
2987
  subnets: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
2986
- ) -> None:
2988
+ ) -> "EgressOnlyInternetGateway":
2987
2989
  '''(experimental) Add an Egress only Internet Gateway to current VPC.
2988
2990
 
2989
2991
  Can only be used for ipv6 enabled VPCs.
@@ -3005,7 +3007,7 @@ class IVpcV2(_aws_cdk_aws_ec2_ceddda9d.IVpc, typing_extensions.Protocol):
3005
3007
  ipv4_destination: typing.Optional[builtins.str] = None,
3006
3008
  ipv6_destination: typing.Optional[builtins.str] = None,
3007
3009
  subnets: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
3008
- ) -> None:
3010
+ ) -> "InternetGateway":
3009
3011
  '''(experimental) Adds an Internet Gateway to current VPC.
3010
3012
 
3011
3013
  For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html}.
@@ -3200,7 +3202,7 @@ class _IVpcV2Proxy(
3200
3202
  destination: typing.Optional[builtins.str] = None,
3201
3203
  egress_only_internet_gateway_name: typing.Optional[builtins.str] = None,
3202
3204
  subnets: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
3203
- ) -> None:
3205
+ ) -> "EgressOnlyInternetGateway":
3204
3206
  '''(experimental) Add an Egress only Internet Gateway to current VPC.
3205
3207
 
3206
3208
  Can only be used for ipv6 enabled VPCs.
@@ -3218,7 +3220,7 @@ class _IVpcV2Proxy(
3218
3220
  subnets=subnets,
3219
3221
  )
3220
3222
 
3221
- return typing.cast(None, jsii.invoke(self, "addEgressOnlyInternetGateway", [options]))
3223
+ return typing.cast("EgressOnlyInternetGateway", jsii.invoke(self, "addEgressOnlyInternetGateway", [options]))
3222
3224
 
3223
3225
  @jsii.member(jsii_name="addInternetGateway")
3224
3226
  def add_internet_gateway(
@@ -3228,7 +3230,7 @@ class _IVpcV2Proxy(
3228
3230
  ipv4_destination: typing.Optional[builtins.str] = None,
3229
3231
  ipv6_destination: typing.Optional[builtins.str] = None,
3230
3232
  subnets: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
3231
- ) -> None:
3233
+ ) -> "InternetGateway":
3232
3234
  '''(experimental) Adds an Internet Gateway to current VPC.
3233
3235
 
3234
3236
  For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html}.
@@ -3249,7 +3251,7 @@ class _IVpcV2Proxy(
3249
3251
  subnets=subnets,
3250
3252
  )
3251
3253
 
3252
- return typing.cast(None, jsii.invoke(self, "addInternetGateway", [options]))
3254
+ return typing.cast("InternetGateway", jsii.invoke(self, "addInternetGateway", [options]))
3253
3255
 
3254
3256
  @jsii.member(jsii_name="addNatGateway")
3255
3257
  def add_nat_gateway(
@@ -6055,6 +6057,7 @@ class SubnetV2(
6055
6057
  vpc: IVpcV2,
6056
6058
  assign_ipv6_address_on_creation: typing.Optional[builtins.bool] = None,
6057
6059
  ipv6_cidr_block: typing.Optional[IpCidr] = None,
6060
+ map_public_ip_on_launch: typing.Optional[builtins.bool] = None,
6058
6061
  route_table: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IRouteTable] = None,
6059
6062
  subnet_name: typing.Optional[builtins.str] = None,
6060
6063
  ) -> None:
@@ -6068,6 +6071,7 @@ class SubnetV2(
6068
6071
  :param vpc: (experimental) VPC Prop.
6069
6072
  :param assign_ipv6_address_on_creation: (experimental) Indicates whether a network interface created in this subnet receives an IPv6 address. If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock. Default: - undefined in case not provided as an input
6070
6073
  :param ipv6_cidr_block: (experimental) Ipv6 CIDR Range for subnet. Default: - No Ipv6 address
6074
+ :param map_public_ip_on_launch: (experimental) Controls if instances launched into the subnet should be assigned a public IP address. This property can only be set for public subnets. Default: - undefined in case not provided as an input
6071
6075
  :param route_table: (experimental) Custom Route for subnet. Default: - a default route table created
6072
6076
  :param subnet_name: (experimental) Subnet name. Default: - provisioned with an autogenerated name by CDK
6073
6077
 
@@ -6084,6 +6088,7 @@ class SubnetV2(
6084
6088
  vpc=vpc,
6085
6089
  assign_ipv6_address_on_creation=assign_ipv6_address_on_creation,
6086
6090
  ipv6_cidr_block=ipv6_cidr_block,
6091
+ map_public_ip_on_launch=map_public_ip_on_launch,
6087
6092
  route_table=route_table,
6088
6093
  subnet_name=subnet_name,
6089
6094
  )
@@ -6398,6 +6403,7 @@ class SubnetV2Attributes:
6398
6403
  "vpc": "vpc",
6399
6404
  "assign_ipv6_address_on_creation": "assignIpv6AddressOnCreation",
6400
6405
  "ipv6_cidr_block": "ipv6CidrBlock",
6406
+ "map_public_ip_on_launch": "mapPublicIpOnLaunch",
6401
6407
  "route_table": "routeTable",
6402
6408
  "subnet_name": "subnetName",
6403
6409
  },
@@ -6412,6 +6418,7 @@ class SubnetV2Props:
6412
6418
  vpc: IVpcV2,
6413
6419
  assign_ipv6_address_on_creation: typing.Optional[builtins.bool] = None,
6414
6420
  ipv6_cidr_block: typing.Optional[IpCidr] = None,
6421
+ map_public_ip_on_launch: typing.Optional[builtins.bool] = None,
6415
6422
  route_table: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IRouteTable] = None,
6416
6423
  subnet_name: typing.Optional[builtins.str] = None,
6417
6424
  ) -> None:
@@ -6423,6 +6430,7 @@ class SubnetV2Props:
6423
6430
  :param vpc: (experimental) VPC Prop.
6424
6431
  :param assign_ipv6_address_on_creation: (experimental) Indicates whether a network interface created in this subnet receives an IPv6 address. If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock. Default: - undefined in case not provided as an input
6425
6432
  :param ipv6_cidr_block: (experimental) Ipv6 CIDR Range for subnet. Default: - No Ipv6 address
6433
+ :param map_public_ip_on_launch: (experimental) Controls if instances launched into the subnet should be assigned a public IP address. This property can only be set for public subnets. Default: - undefined in case not provided as an input
6426
6434
  :param route_table: (experimental) Custom Route for subnet. Default: - a default route table created
6427
6435
  :param subnet_name: (experimental) Subnet name. Default: - provisioned with an autogenerated name by CDK
6428
6436
 
@@ -6462,6 +6470,7 @@ class SubnetV2Props:
6462
6470
  check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
6463
6471
  check_type(argname="argument assign_ipv6_address_on_creation", value=assign_ipv6_address_on_creation, expected_type=type_hints["assign_ipv6_address_on_creation"])
6464
6472
  check_type(argname="argument ipv6_cidr_block", value=ipv6_cidr_block, expected_type=type_hints["ipv6_cidr_block"])
6473
+ check_type(argname="argument map_public_ip_on_launch", value=map_public_ip_on_launch, expected_type=type_hints["map_public_ip_on_launch"])
6465
6474
  check_type(argname="argument route_table", value=route_table, expected_type=type_hints["route_table"])
6466
6475
  check_type(argname="argument subnet_name", value=subnet_name, expected_type=type_hints["subnet_name"])
6467
6476
  self._values: typing.Dict[builtins.str, typing.Any] = {
@@ -6474,6 +6483,8 @@ class SubnetV2Props:
6474
6483
  self._values["assign_ipv6_address_on_creation"] = assign_ipv6_address_on_creation
6475
6484
  if ipv6_cidr_block is not None:
6476
6485
  self._values["ipv6_cidr_block"] = ipv6_cidr_block
6486
+ if map_public_ip_on_launch is not None:
6487
+ self._values["map_public_ip_on_launch"] = map_public_ip_on_launch
6477
6488
  if route_table is not None:
6478
6489
  self._values["route_table"] = route_table
6479
6490
  if subnet_name is not None:
@@ -6550,6 +6561,19 @@ class SubnetV2Props:
6550
6561
  result = self._values.get("ipv6_cidr_block")
6551
6562
  return typing.cast(typing.Optional[IpCidr], result)
6552
6563
 
6564
+ @builtins.property
6565
+ def map_public_ip_on_launch(self) -> typing.Optional[builtins.bool]:
6566
+ '''(experimental) Controls if instances launched into the subnet should be assigned a public IP address.
6567
+
6568
+ This property can only be set for public subnets.
6569
+
6570
+ :default: - undefined in case not provided as an input
6571
+
6572
+ :stability: experimental
6573
+ '''
6574
+ result = self._values.get("map_public_ip_on_launch")
6575
+ return typing.cast(typing.Optional[builtins.bool], result)
6576
+
6553
6577
  @builtins.property
6554
6578
  def route_table(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IRouteTable]:
6555
6579
  '''(experimental) Custom Route for subnet.
@@ -9699,7 +9723,7 @@ class VpcV2Base(
9699
9723
  destination: typing.Optional[builtins.str] = None,
9700
9724
  egress_only_internet_gateway_name: typing.Optional[builtins.str] = None,
9701
9725
  subnets: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
9702
- ) -> None:
9726
+ ) -> "EgressOnlyInternetGateway":
9703
9727
  '''(experimental) Adds a new Egress Only Internet Gateway to this VPC and defines a new route to the route table of given subnets.
9704
9728
 
9705
9729
  :param destination: (experimental) Destination Ipv6 address for EGW route. Default: - '::/0' all Ipv6 traffic
@@ -9716,7 +9740,7 @@ class VpcV2Base(
9716
9740
  subnets=subnets,
9717
9741
  )
9718
9742
 
9719
- return typing.cast(None, jsii.invoke(self, "addEgressOnlyInternetGateway", [options]))
9743
+ return typing.cast("EgressOnlyInternetGateway", jsii.invoke(self, "addEgressOnlyInternetGateway", [options]))
9720
9744
 
9721
9745
  @jsii.member(jsii_name="addFlowLog")
9722
9746
  def add_flow_log(
@@ -9821,7 +9845,7 @@ class VpcV2Base(
9821
9845
  ipv4_destination: typing.Optional[builtins.str] = None,
9822
9846
  ipv6_destination: typing.Optional[builtins.str] = None,
9823
9847
  subnets: typing.Optional[typing.Sequence[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]]] = None,
9824
- ) -> None:
9848
+ ) -> InternetGateway:
9825
9849
  '''(experimental) Adds a new Internet Gateway to this VPC.
9826
9850
 
9827
9851
  :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
@@ -9840,7 +9864,7 @@ class VpcV2Base(
9840
9864
  subnets=subnets,
9841
9865
  )
9842
9866
 
9843
- return typing.cast(None, jsii.invoke(self, "addInternetGateway", [options]))
9867
+ return typing.cast(InternetGateway, jsii.invoke(self, "addInternetGateway", [options]))
9844
9868
 
9845
9869
  @jsii.member(jsii_name="addNatGateway")
9846
9870
  def add_nat_gateway(
@@ -11460,6 +11484,7 @@ def _typecheckingstub__df9294d0dd8fd099bad5e4bd408f0f8b8bffbcdc6e4f624de6a1bf541
11460
11484
  vpc: IVpcV2,
11461
11485
  assign_ipv6_address_on_creation: typing.Optional[builtins.bool] = None,
11462
11486
  ipv6_cidr_block: typing.Optional[IpCidr] = None,
11487
+ map_public_ip_on_launch: typing.Optional[builtins.bool] = None,
11463
11488
  route_table: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IRouteTable] = None,
11464
11489
  subnet_name: typing.Optional[builtins.str] = None,
11465
11490
  ) -> None:
@@ -11509,6 +11534,7 @@ def _typecheckingstub__95ce99f8025433ac8b79825abef6ff91da4dfd0693fd24dadedcee63e
11509
11534
  vpc: IVpcV2,
11510
11535
  assign_ipv6_address_on_creation: typing.Optional[builtins.bool] = None,
11511
11536
  ipv6_cidr_block: typing.Optional[IpCidr] = None,
11537
+ map_public_ip_on_launch: typing.Optional[builtins.bool] = None,
11512
11538
  route_table: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IRouteTable] = None,
11513
11539
  subnet_name: typing.Optional[builtins.str] = None,
11514
11540
  ) -> None:
@@ -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.187.0-alpha.0",
36
+ "2.189.0-alpha.0",
37
37
  __name__[0:-6],
38
- "aws-ec2-alpha@2.187.0-alpha.0.jsii.tgz",
38
+ "aws-ec2-alpha@2.189.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.187.0a0
3
+ Version: 2.189.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
@@ -22,7 +22,7 @@ Requires-Python: ~=3.9
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  License-File: NOTICE
25
- Requires-Dist: aws-cdk-lib<3.0.0,>=2.187.0
25
+ Requires-Dist: aws-cdk-lib<3.0.0,>=2.189.0
26
26
  Requires-Dist: constructs<11.0.0,>=10.0.0
27
27
  Requires-Dist: jsii<2.0.0,>=1.110.0
28
28
  Requires-Dist: publication>=0.0.3
@@ -72,6 +72,7 @@ VpcV2(self, "Vpc",
72
72
  `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.
73
73
  This new construct can be used to add subnets to a `VpcV2` instance:
74
74
  Note: When defining a subnet with `SubnetV2`, CDK automatically creates a new route table, unless a route table is explicitly provided as an input to the construct.
75
+ To enable the `mapPublicIpOnLaunch` feature (which is `false` by default), set the property to `true` when creating the subnet.
75
76
 
76
77
  ```python
77
78
  stack = Stack()
@@ -86,7 +87,8 @@ SubnetV2(self, "subnetA",
86
87
  availability_zone="us-east-1a",
87
88
  ipv4_cidr_block=IpCidr("10.0.0.0/24"),
88
89
  ipv6_cidr_block=IpCidr("2a05:d02c:25:4000::/60"),
89
- subnet_type=SubnetType.PRIVATE_ISOLATED
90
+ subnet_type=SubnetType.PUBLIC,
91
+ map_public_ip_on_launch=True
90
92
  )
91
93
  ```
92
94
 
@@ -0,0 +1,10 @@
1
+ aws_cdk/aws_ec2_alpha/__init__.py,sha256=2peIs99yY-GLls0V86ECyLL5AXbwyc7ExoxeNORTFs4,524313
2
+ aws_cdk/aws_ec2_alpha/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ aws_cdk/aws_ec2_alpha/_jsii/__init__.py,sha256=klwYGrtKkxf0QruaDyr0EpOT0AzQXTaoL5tQgCVrq3s,1479
4
+ aws_cdk/aws_ec2_alpha/_jsii/aws-ec2-alpha@2.189.0-alpha.0.jsii.tgz,sha256=xgCoau0af7RRzFA-DHJBXBY-qRkrdTP-D2xOrmoGdas,232546
5
+ aws_cdk_aws_ec2_alpha-2.189.0a0.dist-info/LICENSE,sha256=y47tc38H0C4DpGljYUZDl8XxidQjNxxGLq-K4jwv6Xc,11391
6
+ aws_cdk_aws_ec2_alpha-2.189.0a0.dist-info/METADATA,sha256=n6V4seNfmMWyIYehYJj2gE986EITOpxsVipDNK0SkFU,36668
7
+ aws_cdk_aws_ec2_alpha-2.189.0a0.dist-info/NOTICE,sha256=ZDV6_xBfMvhFtjjBh_f6lJjhZ2AEWWAGGkx2kLKHiuc,113
8
+ aws_cdk_aws_ec2_alpha-2.189.0a0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
9
+ aws_cdk_aws_ec2_alpha-2.189.0a0.dist-info/top_level.txt,sha256=1TALAKbuUGsMSrfKWEf268lySCmcqSEO6cDYe_XlLHM,8
10
+ aws_cdk_aws_ec2_alpha-2.189.0a0.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- aws_cdk/aws_ec2_alpha/__init__.py,sha256=AWTUHm3fqGgSQxp3VDckVj1AxpnKnhFx0uXq02OD3ko,522310
2
- aws_cdk/aws_ec2_alpha/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
- aws_cdk/aws_ec2_alpha/_jsii/__init__.py,sha256=zbmwgiV0B3qBGx5YTvlGKxyeCVmaBncu3Zq4pbeH7Zg,1479
4
- aws_cdk/aws_ec2_alpha/_jsii/aws-ec2-alpha@2.187.0-alpha.0.jsii.tgz,sha256=mlKSo6fqLNudb-jsx-h9LTx9ZN_A6PtYDIqQHvhFqq8,231288
5
- aws_cdk_aws_ec2_alpha-2.187.0a0.dist-info/LICENSE,sha256=y47tc38H0C4DpGljYUZDl8XxidQjNxxGLq-K4jwv6Xc,11391
6
- aws_cdk_aws_ec2_alpha-2.187.0a0.dist-info/METADATA,sha256=_t0MNNiJ2DX3KFslI-BT4PFcdDNMLIZqiHA8YlLoH4w,36516
7
- aws_cdk_aws_ec2_alpha-2.187.0a0.dist-info/NOTICE,sha256=ZDV6_xBfMvhFtjjBh_f6lJjhZ2AEWWAGGkx2kLKHiuc,113
8
- aws_cdk_aws_ec2_alpha-2.187.0a0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
9
- aws_cdk_aws_ec2_alpha-2.187.0a0.dist-info/top_level.txt,sha256=1TALAKbuUGsMSrfKWEf268lySCmcqSEO6cDYe_XlLHM,8
10
- aws_cdk_aws_ec2_alpha-2.187.0a0.dist-info/RECORD,,