aws-cdk-lib 2.136.1__py3-none-any.whl → 2.138.0__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-lib might be problematic. Click here for more details.

Files changed (61) hide show
  1. aws_cdk/__init__.py +8 -0
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.136.1.jsii.tgz → aws-cdk-lib@2.138.0.jsii.tgz} +0 -0
  4. aws_cdk/assertions/__init__.py +152 -5
  5. aws_cdk/aws_amplify/__init__.py +29 -113
  6. aws_cdk/aws_appconfig/__init__.py +26 -33
  7. aws_cdk/aws_apprunner/__init__.py +5 -2
  8. aws_cdk/aws_appsync/__init__.py +400 -13
  9. aws_cdk/aws_aps/__init__.py +64 -47
  10. aws_cdk/aws_b2bi/__init__.py +2 -6
  11. aws_cdk/aws_backup/__init__.py +27 -23
  12. aws_cdk/aws_batch/__init__.py +103 -0
  13. aws_cdk/aws_bcmdataexports/__init__.py +1114 -0
  14. aws_cdk/aws_chatbot/__init__.py +6 -4
  15. aws_cdk/aws_cleanrooms/__init__.py +526 -3
  16. aws_cdk/aws_cleanroomsml/__init__.py +960 -0
  17. aws_cdk/aws_cloudfront/__init__.py +196 -15
  18. aws_cdk/aws_cloudtrail/__init__.py +10 -10
  19. aws_cdk/aws_cloudwatch/__init__.py +124 -8
  20. aws_cdk/aws_codebuild/__init__.py +27 -22
  21. aws_cdk/aws_codeconnections/__init__.py +435 -0
  22. aws_cdk/aws_cognito/__init__.py +175 -79
  23. aws_cdk/aws_deadline/__init__.py +5394 -0
  24. aws_cdk/aws_ec2/__init__.py +379 -173
  25. aws_cdk/aws_ecr_assets/__init__.py +3 -4
  26. aws_cdk/aws_ecs/__init__.py +240 -1
  27. aws_cdk/aws_efs/__init__.py +2 -2
  28. aws_cdk/aws_elasticache/__init__.py +86 -32
  29. aws_cdk/aws_elasticloadbalancingv2/__init__.py +275 -5
  30. aws_cdk/aws_emr/__init__.py +2 -2
  31. aws_cdk/aws_entityresolution/__init__.py +1982 -773
  32. aws_cdk/aws_globalaccelerator/__init__.py +443 -0
  33. aws_cdk/aws_iam/__init__.py +24 -40
  34. aws_cdk/aws_internetmonitor/__init__.py +14 -6
  35. aws_cdk/aws_ivs/__init__.py +1273 -71
  36. aws_cdk/aws_kms/__init__.py +8 -13
  37. aws_cdk/aws_mediatailor/__init__.py +41 -0
  38. aws_cdk/aws_personalize/__init__.py +8 -6
  39. aws_cdk/aws_pinpoint/__init__.py +5 -3
  40. aws_cdk/aws_pipes/__init__.py +5 -1
  41. aws_cdk/aws_quicksight/__init__.py +12 -6
  42. aws_cdk/aws_rds/__init__.py +355 -85
  43. aws_cdk/aws_route53/__init__.py +591 -18
  44. aws_cdk/aws_s3_deployment/__init__.py +84 -7
  45. aws_cdk/aws_sagemaker/__init__.py +233 -2
  46. aws_cdk/aws_securityhub/__init__.py +4940 -102
  47. aws_cdk/aws_securitylake/__init__.py +1237 -55
  48. aws_cdk/aws_sns/__init__.py +183 -4
  49. aws_cdk/aws_ssmcontacts/__init__.py +11 -4
  50. aws_cdk/aws_stepfunctions/__init__.py +8 -16
  51. aws_cdk/aws_stepfunctions_tasks/__init__.py +676 -1
  52. aws_cdk/aws_transfer/__init__.py +4 -4
  53. aws_cdk/aws_verifiedpermissions/__init__.py +114 -37
  54. aws_cdk/aws_workspacesthinclient/__init__.py +8 -8
  55. aws_cdk/custom_resources/__init__.py +248 -26
  56. {aws_cdk_lib-2.136.1.dist-info → aws_cdk_lib-2.138.0.dist-info}/METADATA +3 -3
  57. {aws_cdk_lib-2.136.1.dist-info → aws_cdk_lib-2.138.0.dist-info}/RECORD +61 -57
  58. {aws_cdk_lib-2.136.1.dist-info → aws_cdk_lib-2.138.0.dist-info}/LICENSE +0 -0
  59. {aws_cdk_lib-2.136.1.dist-info → aws_cdk_lib-2.138.0.dist-info}/NOTICE +0 -0
  60. {aws_cdk_lib-2.136.1.dist-info → aws_cdk_lib-2.138.0.dist-info}/WHEEL +0 -0
  61. {aws_cdk_lib-2.136.1.dist-info → aws_cdk_lib-2.138.0.dist-info}/top_level.txt +0 -0
@@ -196,6 +196,12 @@ The construct will automatically selects the latest version of Amazon Linux 2023
196
196
  If you prefer to use a custom AMI, use `machineImage: MachineImage.genericLinux({ ... })` and configure the right AMI ID for the
197
197
  regions you want to deploy to.
198
198
 
199
+ > **Warning**
200
+ > The NAT instances created using this method will be **unmonitored**.
201
+ > They are not part of an Auto Scaling Group,
202
+ > and if they become unavailable or are terminated for any reason,
203
+ > will not be restarted or replaced.
204
+
199
205
  By default, the NAT instances will route all traffic. To control what traffic
200
206
  gets routed, pass a custom value for `defaultAllowedTraffic` and access the
201
207
  `NatInstanceProvider.connections` member after having passed the NAT provider to
@@ -212,7 +218,37 @@ provider = ec2.NatProvider.instance_v2(
212
218
  ec2.Vpc(self, "TheVPC",
213
219
  nat_gateway_provider=provider
214
220
  )
215
- provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.tcp(80))
221
+ provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.HTTP)
222
+ ```
223
+
224
+ You can also customize the characteristics of your NAT instances, including their security group,
225
+ as well as their initialization scripts:
226
+
227
+ ```python
228
+ # bucket: s3.Bucket
229
+
230
+
231
+ user_data = ec2.UserData.for_linux()
232
+ user_data.add_commands(
233
+ (SpreadElement ...ec2.NatInstanceProviderV2.DEFAULT_USER_DATA_COMMANDS
234
+ ec2.NatInstanceProviderV2.DEFAULT_USER_DATA_COMMANDS), "echo \"hello world!\" > hello.txt", f"aws s3 cp hello.txt s3://{bucket.bucketName}")
235
+
236
+ provider = ec2.NatProvider.instance_v2(
237
+ instance_type=ec2.InstanceType("t3.small"),
238
+ credit_specification=ec2.CpuCredits.UNLIMITED,
239
+ default_allowed_traffic=ec2.NatTrafficDirection.NONE
240
+ )
241
+
242
+ vpc = ec2.Vpc(self, "TheVPC",
243
+ nat_gateway_provider=provider,
244
+ nat_gateways=2
245
+ )
246
+
247
+ security_group = ec2.SecurityGroup(self, "SecurityGroup", vpc=vpc)
248
+ security_group.add_egress_rule(ec2.Peer.any_ipv4(), ec2.Port.tcp(443))
249
+ for gateway in provider.gateway_instances:
250
+ bucket.grant_write(gateway)
251
+ gateway.add_security_group(security_group)
216
252
  ```
217
253
 
218
254
  ```python
@@ -229,7 +265,7 @@ vpc = ec2.Vpc(self, "MyVpc",
229
265
  )
230
266
  ```
231
267
 
232
- The construct will use the AWS official NAT instance AMI, which has already
268
+ The V1 `NatProvider.instance` construct will use the AWS official NAT instance AMI, which has already
233
269
  reached EOL on Dec 31, 2023. For more information, see the following blog post:
234
270
  [Amazon Linux AMI end of life](https://aws.amazon.com/blogs/aws/update-on-amazon-linux-ami-end-of-life/).
235
271
 
@@ -244,7 +280,7 @@ provider = ec2.NatProvider.instance(
244
280
  ec2.Vpc(self, "TheVPC",
245
281
  nat_gateway_provider=provider
246
282
  )
247
- provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.tcp(80))
283
+ provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.HTTP)
248
284
  ```
249
285
 
250
286
  ### Ip Address Management
@@ -731,13 +767,13 @@ take care of this for you:
731
767
 
732
768
 
733
769
  # Allow connections from anywhere
734
- load_balancer.connections.allow_from_any_ipv4(ec2.Port.tcp(443), "Allow inbound HTTPS")
770
+ load_balancer.connections.allow_from_any_ipv4(ec2.Port.HTTPS, "Allow inbound HTTPS")
735
771
 
736
772
  # The same, but an explicit IP address
737
- load_balancer.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/32"), ec2.Port.tcp(443), "Allow inbound HTTPS")
773
+ load_balancer.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/32"), ec2.Port.HTTPS, "Allow inbound HTTPS")
738
774
 
739
775
  # Allow connection between AutoScalingGroups
740
- app_fleet.connections.allow_to(db_fleet, ec2.Port.tcp(443), "App can call database")
776
+ app_fleet.connections.allow_to(db_fleet, ec2.Port.HTTPS, "App can call database")
741
777
  ```
742
778
 
743
779
  ### Connection Peers
@@ -755,7 +791,7 @@ peer = ec2.Peer.any_ipv4()
755
791
  peer = ec2.Peer.ipv6("::0/0")
756
792
  peer = ec2.Peer.any_ipv6()
757
793
  peer = ec2.Peer.prefix_list("pl-12345")
758
- app_fleet.connections.allow_to(peer, ec2.Port.tcp(443), "Allow outbound HTTPS")
794
+ app_fleet.connections.allow_to(peer, ec2.Port.HTTPS, "Allow outbound HTTPS")
759
795
  ```
760
796
 
761
797
  Any object that has a security group can itself be used as a connection peer:
@@ -767,9 +803,9 @@ Any object that has a security group can itself be used as a connection peer:
767
803
 
768
804
 
769
805
  # These automatically create appropriate ingress and egress rules in both security groups
770
- fleet1.connections.allow_to(fleet2, ec2.Port.tcp(80), "Allow between fleets")
806
+ fleet1.connections.allow_to(fleet2, ec2.Port.HTTP, "Allow between fleets")
771
807
 
772
- app_fleet.connections.allow_from_any_ipv4(ec2.Port.tcp(80), "Allow from load balancer")
808
+ app_fleet.connections.allow_from_any_ipv4(ec2.Port.HTTP, "Allow from load balancer")
773
809
  ```
774
810
 
775
811
  ### Port Ranges
@@ -779,6 +815,7 @@ the connection specifier:
779
815
 
780
816
  ```python
781
817
  ec2.Port.tcp(80)
818
+ ec2.Port.HTTPS
782
819
  ec2.Port.tcp_range(60000, 65535)
783
820
  ec2.Port.all_tcp()
784
821
  ec2.Port.all_icmp()
@@ -833,7 +870,7 @@ my_security_group_without_inline_rules = ec2.SecurityGroup(self, "SecurityGroup"
833
870
  disable_inline_rules=True
834
871
  )
835
872
  # This will add the rule as an external cloud formation construct
836
- my_security_group_without_inline_rules.add_ingress_rule(ec2.Peer.any_ipv4(), ec2.Port.tcp(22), "allow ssh access from the world")
873
+ my_security_group_without_inline_rules.add_ingress_rule(ec2.Peer.any_ipv4(), ec2.Port.SSH, "allow ssh access from the world")
837
874
  ```
838
875
 
839
876
  ### Importing an existing security group
@@ -9317,6 +9354,7 @@ class CfnCustomerGateway(
9317
9354
  type="type",
9318
9355
 
9319
9356
  # the properties below are optional
9357
+ certificate_arn="certificateArn",
9320
9358
  device_name="deviceName",
9321
9359
  tags=[CfnTag(
9322
9360
  key="key",
@@ -9333,6 +9371,7 @@ class CfnCustomerGateway(
9333
9371
  bgp_asn: jsii.Number,
9334
9372
  ip_address: builtins.str,
9335
9373
  type: builtins.str,
9374
+ certificate_arn: typing.Optional[builtins.str] = None,
9336
9375
  device_name: typing.Optional[builtins.str] = None,
9337
9376
  tags: typing.Optional[typing.Sequence[typing.Union[_CfnTag_f6864754, typing.Dict[builtins.str, typing.Any]]]] = None,
9338
9377
  ) -> None:
@@ -9342,6 +9381,7 @@ class CfnCustomerGateway(
9342
9381
  :param bgp_asn: For devices that support BGP, the customer gateway's BGP ASN. Default: 65000 Default: - 65000
9343
9382
  :param ip_address: IPv4 address for the customer gateway device's outside interface. The address must be static.
9344
9383
  :param type: The type of VPN connection that this customer gateway supports ( ``ipsec.1`` ).
9384
+ :param certificate_arn: The Amazon Resource Name (ARN) for the customer gateway certificate.
9345
9385
  :param device_name: The name of customer gateway device.
9346
9386
  :param tags: One or more tags for the customer gateway.
9347
9387
  '''
@@ -9353,6 +9393,7 @@ class CfnCustomerGateway(
9353
9393
  bgp_asn=bgp_asn,
9354
9394
  ip_address=ip_address,
9355
9395
  type=type,
9396
+ certificate_arn=certificate_arn,
9356
9397
  device_name=device_name,
9357
9398
  tags=tags,
9358
9399
  )
@@ -9448,6 +9489,19 @@ class CfnCustomerGateway(
9448
9489
  check_type(argname="argument value", value=value, expected_type=type_hints["value"])
9449
9490
  jsii.set(self, "type", value)
9450
9491
 
9492
+ @builtins.property
9493
+ @jsii.member(jsii_name="certificateArn")
9494
+ def certificate_arn(self) -> typing.Optional[builtins.str]:
9495
+ '''The Amazon Resource Name (ARN) for the customer gateway certificate.'''
9496
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "certificateArn"))
9497
+
9498
+ @certificate_arn.setter
9499
+ def certificate_arn(self, value: typing.Optional[builtins.str]) -> None:
9500
+ if __debug__:
9501
+ type_hints = typing.get_type_hints(_typecheckingstub__4a4b900e840c5be3a2b16a5177f91335cf813daeca359e549a639cb05a03ac63)
9502
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
9503
+ jsii.set(self, "certificateArn", value)
9504
+
9451
9505
  @builtins.property
9452
9506
  @jsii.member(jsii_name="deviceName")
9453
9507
  def device_name(self) -> typing.Optional[builtins.str]:
@@ -9482,6 +9536,7 @@ class CfnCustomerGateway(
9482
9536
  "bgp_asn": "bgpAsn",
9483
9537
  "ip_address": "ipAddress",
9484
9538
  "type": "type",
9539
+ "certificate_arn": "certificateArn",
9485
9540
  "device_name": "deviceName",
9486
9541
  "tags": "tags",
9487
9542
  },
@@ -9493,6 +9548,7 @@ class CfnCustomerGatewayProps:
9493
9548
  bgp_asn: jsii.Number,
9494
9549
  ip_address: builtins.str,
9495
9550
  type: builtins.str,
9551
+ certificate_arn: typing.Optional[builtins.str] = None,
9496
9552
  device_name: typing.Optional[builtins.str] = None,
9497
9553
  tags: typing.Optional[typing.Sequence[typing.Union[_CfnTag_f6864754, typing.Dict[builtins.str, typing.Any]]]] = None,
9498
9554
  ) -> None:
@@ -9501,6 +9557,7 @@ class CfnCustomerGatewayProps:
9501
9557
  :param bgp_asn: For devices that support BGP, the customer gateway's BGP ASN. Default: 65000 Default: - 65000
9502
9558
  :param ip_address: IPv4 address for the customer gateway device's outside interface. The address must be static.
9503
9559
  :param type: The type of VPN connection that this customer gateway supports ( ``ipsec.1`` ).
9560
+ :param certificate_arn: The Amazon Resource Name (ARN) for the customer gateway certificate.
9504
9561
  :param device_name: The name of customer gateway device.
9505
9562
  :param tags: One or more tags for the customer gateway.
9506
9563
 
@@ -9519,6 +9576,7 @@ class CfnCustomerGatewayProps:
9519
9576
  type="type",
9520
9577
 
9521
9578
  # the properties below are optional
9579
+ certificate_arn="certificateArn",
9522
9580
  device_name="deviceName",
9523
9581
  tags=[CfnTag(
9524
9582
  key="key",
@@ -9531,6 +9589,7 @@ class CfnCustomerGatewayProps:
9531
9589
  check_type(argname="argument bgp_asn", value=bgp_asn, expected_type=type_hints["bgp_asn"])
9532
9590
  check_type(argname="argument ip_address", value=ip_address, expected_type=type_hints["ip_address"])
9533
9591
  check_type(argname="argument type", value=type, expected_type=type_hints["type"])
9592
+ check_type(argname="argument certificate_arn", value=certificate_arn, expected_type=type_hints["certificate_arn"])
9534
9593
  check_type(argname="argument device_name", value=device_name, expected_type=type_hints["device_name"])
9535
9594
  check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
9536
9595
  self._values: typing.Dict[builtins.str, typing.Any] = {
@@ -9538,6 +9597,8 @@ class CfnCustomerGatewayProps:
9538
9597
  "ip_address": ip_address,
9539
9598
  "type": type,
9540
9599
  }
9600
+ if certificate_arn is not None:
9601
+ self._values["certificate_arn"] = certificate_arn
9541
9602
  if device_name is not None:
9542
9603
  self._values["device_name"] = device_name
9543
9604
  if tags is not None:
@@ -9579,6 +9640,15 @@ class CfnCustomerGatewayProps:
9579
9640
  assert result is not None, "Required property 'type' is missing"
9580
9641
  return typing.cast(builtins.str, result)
9581
9642
 
9643
+ @builtins.property
9644
+ def certificate_arn(self) -> typing.Optional[builtins.str]:
9645
+ '''The Amazon Resource Name (ARN) for the customer gateway certificate.
9646
+
9647
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-customergateway.html#cfn-ec2-customergateway-certificatearn
9648
+ '''
9649
+ result = self._values.get("certificate_arn")
9650
+ return typing.cast(typing.Optional[builtins.str], result)
9651
+
9582
9652
  @builtins.property
9583
9653
  def device_name(self) -> typing.Optional[builtins.str]:
9584
9654
  '''The name of customer gateway device.
@@ -19146,8 +19216,8 @@ class CfnInstance(
19146
19216
  :param credit_specification: The credit option for CPU usage of the burstable performance instance. Valid values are ``standard`` and ``unlimited`` . To change this attribute after launch, use `ModifyInstanceCreditSpecification <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html>`_ . For more information, see `Burstable performance instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html>`_ in the *Amazon EC2 User Guide* . Default: ``standard`` (T2 instances) or ``unlimited`` (T3/T3a/T4g instances) For T3 instances with ``host`` tenancy, only ``standard`` is supported.
19147
19217
  :param disable_api_termination: If you set this parameter to ``true`` , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use `ModifyInstanceAttribute <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html>`_ . Alternatively, if you set ``InstanceInitiatedShutdownBehavior`` to ``terminate`` , you can terminate the instance by running the shutdown command from the instance. Default: ``false``
19148
19218
  :param ebs_optimized: Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance. Default: ``false``
19149
- :param elastic_gpu_specifications: Deprecated. .. epigraph:: Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, G4dn, or G5 instances.
19150
- :param elastic_inference_accelerators: An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads. You cannot specify accelerators from different generations in the same request. .. epigraph:: Starting April 15, 2023, AWS will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.
19219
+ :param elastic_gpu_specifications: An elastic GPU to associate with the instance. .. epigraph:: Amazon Elastic Graphics reached end of life on January 8, 2024.
19220
+ :param elastic_inference_accelerators: An elastic inference accelerator to associate with the instance. .. epigraph:: Amazon Elastic Inference (EI) is no longer available to new customers. For more information, see `Amazon Elastic Inference FAQs <https://docs.aws.amazon.com/machine-learning/elastic-inference/faqs/>`_ .
19151
19221
  :param enclave_options: Indicates whether the instance is enabled for AWS Nitro Enclaves.
19152
19222
  :param hibernation_options: Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the `hibernation prerequisites <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html>`_ . For more information, see `Hibernate your instance <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html>`_ in the *Amazon EC2 User Guide* . You can't enable hibernation and AWS Nitro Enclaves on the same instance.
19153
19223
  :param host_id: If you specify host for the ``Affinity`` property, the ID of a dedicated host that the instance is associated with. If you don't specify an ID, Amazon EC2 launches the instance onto any available, compatible dedicated host in your account. This type of launch is called an untargeted launch. Note that for untargeted launches, you must have a compatible, dedicated host available to successfully launch instances.
@@ -19173,7 +19243,7 @@ class CfnInstance(
19173
19243
  :param security_groups: [Default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead. You cannot specify this option and the network interfaces option in the same request. The list can contain both the name of existing Amazon EC2 security groups or references to AWS::EC2::SecurityGroup resources created in the template. Default: Amazon EC2 uses the default security group.
19174
19244
  :param source_dest_check: Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is ``true`` , source/destination checks are enabled; otherwise, they are disabled. The default value is ``true`` . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.
19175
19245
  :param ssm_associations: The SSM `document <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-document.html>`_ and parameter values in AWS Systems Manager to associate with this instance. To use this property, you must specify an IAM instance profile role for the instance. For more information, see `Create an IAM instance profile for Systems Manager <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-configuring-access-role.html>`_ in the *AWS Systems Manager User Guide* . .. epigraph:: You can associate only one document with an instance.
19176
- :param subnet_id: The ID of the subnet to launch the instance into. If you specify a network interface, you must specify any subnets as part of the network interface.
19246
+ :param subnet_id: The ID of the subnet to launch the instance into. If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
19177
19247
  :param tags: The tags to add to the instance. These tags are not applied to the EBS volumes, such as the root volume, unless `PropagateTagsToVolumeOnCreation <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-propagatetagstovolumeoncreation>`_ is ``true`` .
19178
19248
  :param tenancy: The tenancy of the instance. An instance with a tenancy of ``dedicated`` runs on single-tenant hardware.
19179
19249
  :param user_data: The parameters or scripts to store as user data. Any scripts in user data are run when you launch the instance. User data is limited to 16 KB. You must provide base64-encoded text. For more information, see `Fn::Base64 <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-base64.html>`_ . If the root volume is an EBS volume and you update user data, CloudFormation restarts the instance. If the root volume is an instance store volume and you update user data, the instance is replaced.
@@ -19266,14 +19336,6 @@ class CfnInstance(
19266
19336
  '''
19267
19337
  return typing.cast(builtins.str, jsii.get(self, "attrAvailabilityZone"))
19268
19338
 
19269
- @builtins.property
19270
- @jsii.member(jsii_name="attrId")
19271
- def attr_id(self) -> builtins.str:
19272
- '''
19273
- :cloudformationAttribute: Id
19274
- '''
19275
- return typing.cast(builtins.str, jsii.get(self, "attrId"))
19276
-
19277
19339
  @builtins.property
19278
19340
  @jsii.member(jsii_name="attrInstanceId")
19279
19341
  def attr_instance_id(self) -> builtins.str:
@@ -19481,7 +19543,7 @@ class CfnInstance(
19481
19543
  def elastic_gpu_specifications(
19482
19544
  self,
19483
19545
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnInstance.ElasticGpuSpecificationProperty"]]]]:
19484
- '''Deprecated.'''
19546
+ '''An elastic GPU to associate with the instance.'''
19485
19547
  return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnInstance.ElasticGpuSpecificationProperty"]]]], jsii.get(self, "elasticGpuSpecifications"))
19486
19548
 
19487
19549
  @elastic_gpu_specifications.setter
@@ -20909,11 +20971,9 @@ class CfnInstance(
20909
20971
  - The ID or the name of the launch template, but not both.
20910
20972
  - The version of the launch template.
20911
20973
 
20912
- ``LaunchTemplateSpecification`` is a property of the `AWS::EC2::Instance <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html>`_ resource.
20913
-
20914
20974
  For information about creating a launch template, see `AWS::EC2::LaunchTemplate <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html>`_ and `Create a launch template <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template>`_ in the *Amazon EC2 User Guide* .
20915
20975
 
20916
- For examples of launch templates, see `Examples <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#aws-resource-ec2-launchtemplate--examples>`_ .
20976
+ For example launch templates, see the `Examples <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#aws-resource-ec2-launchtemplate--examples>`_ for ``AWS::EC2::LaunchTemplate`` .
20917
20977
 
20918
20978
  :param version: The version number of the launch template. Specifying ``$Latest`` or ``$Default`` for the template version number is not supported. However, you can specify ``LatestVersionNumber`` or ``DefaultVersionNumber`` using the ``Fn::GetAtt`` intrinsic function. For more information, see `Fn::GetAtt <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#aws-resource-ec2-launchtemplate-return-values-fn--getatt>`_ .
20919
20979
  :param launch_template_id: The ID of the launch template. You must specify the ``LaunchTemplateId`` or the ``LaunchTemplateName`` , but not both.
@@ -21103,7 +21163,7 @@ class CfnInstance(
21103
21163
  :param private_ip_address: The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance.
21104
21164
  :param private_ip_addresses: One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary.
21105
21165
  :param secondary_private_ip_address_count: The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option.
21106
- :param subnet_id: The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.
21166
+ :param subnet_id: The ID of the subnet associated with the network interface.
21107
21167
 
21108
21168
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-networkinterface.html
21109
21169
  :exampleMetadata: fixture=_generated
@@ -21329,8 +21389,6 @@ class CfnInstance(
21329
21389
  def subnet_id(self) -> typing.Optional[builtins.str]:
21330
21390
  '''The ID of the subnet associated with the network interface.
21331
21391
 
21332
- Applies only if creating a network interface when launching an instance.
21333
-
21334
21392
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-networkinterface.html#cfn-ec2-instance-networkinterface-subnetid
21335
21393
  '''
21336
21394
  result = self._values.get("subnet_id")
@@ -22140,8 +22198,8 @@ class CfnInstanceProps:
22140
22198
  :param credit_specification: The credit option for CPU usage of the burstable performance instance. Valid values are ``standard`` and ``unlimited`` . To change this attribute after launch, use `ModifyInstanceCreditSpecification <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html>`_ . For more information, see `Burstable performance instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html>`_ in the *Amazon EC2 User Guide* . Default: ``standard`` (T2 instances) or ``unlimited`` (T3/T3a/T4g instances) For T3 instances with ``host`` tenancy, only ``standard`` is supported.
22141
22199
  :param disable_api_termination: If you set this parameter to ``true`` , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use `ModifyInstanceAttribute <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html>`_ . Alternatively, if you set ``InstanceInitiatedShutdownBehavior`` to ``terminate`` , you can terminate the instance by running the shutdown command from the instance. Default: ``false``
22142
22200
  :param ebs_optimized: Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance. Default: ``false``
22143
- :param elastic_gpu_specifications: Deprecated. .. epigraph:: Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, G4dn, or G5 instances.
22144
- :param elastic_inference_accelerators: An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads. You cannot specify accelerators from different generations in the same request. .. epigraph:: Starting April 15, 2023, AWS will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.
22201
+ :param elastic_gpu_specifications: An elastic GPU to associate with the instance. .. epigraph:: Amazon Elastic Graphics reached end of life on January 8, 2024.
22202
+ :param elastic_inference_accelerators: An elastic inference accelerator to associate with the instance. .. epigraph:: Amazon Elastic Inference (EI) is no longer available to new customers. For more information, see `Amazon Elastic Inference FAQs <https://docs.aws.amazon.com/machine-learning/elastic-inference/faqs/>`_ .
22145
22203
  :param enclave_options: Indicates whether the instance is enabled for AWS Nitro Enclaves.
22146
22204
  :param hibernation_options: Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the `hibernation prerequisites <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html>`_ . For more information, see `Hibernate your instance <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html>`_ in the *Amazon EC2 User Guide* . You can't enable hibernation and AWS Nitro Enclaves on the same instance.
22147
22205
  :param host_id: If you specify host for the ``Affinity`` property, the ID of a dedicated host that the instance is associated with. If you don't specify an ID, Amazon EC2 launches the instance onto any available, compatible dedicated host in your account. This type of launch is called an untargeted launch. Note that for untargeted launches, you must have a compatible, dedicated host available to successfully launch instances.
@@ -22167,7 +22225,7 @@ class CfnInstanceProps:
22167
22225
  :param security_groups: [Default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead. You cannot specify this option and the network interfaces option in the same request. The list can contain both the name of existing Amazon EC2 security groups or references to AWS::EC2::SecurityGroup resources created in the template. Default: Amazon EC2 uses the default security group.
22168
22226
  :param source_dest_check: Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is ``true`` , source/destination checks are enabled; otherwise, they are disabled. The default value is ``true`` . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.
22169
22227
  :param ssm_associations: The SSM `document <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-document.html>`_ and parameter values in AWS Systems Manager to associate with this instance. To use this property, you must specify an IAM instance profile role for the instance. For more information, see `Create an IAM instance profile for Systems Manager <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-configuring-access-role.html>`_ in the *AWS Systems Manager User Guide* . .. epigraph:: You can associate only one document with an instance.
22170
- :param subnet_id: The ID of the subnet to launch the instance into. If you specify a network interface, you must specify any subnets as part of the network interface.
22228
+ :param subnet_id: The ID of the subnet to launch the instance into. If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
22171
22229
  :param tags: The tags to add to the instance. These tags are not applied to the EBS volumes, such as the root volume, unless `PropagateTagsToVolumeOnCreation <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-propagatetagstovolumeoncreation>`_ is ``true`` .
22172
22230
  :param tenancy: The tenancy of the instance. An instance with a tenancy of ``dedicated`` runs on single-tenant hardware.
22173
22231
  :param user_data: The parameters or scripts to store as user data. Any scripts in user data are run when you launch the instance. User data is limited to 16 KB. You must provide base64-encoded text. For more information, see `Fn::Base64 <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-base64.html>`_ . If the root volume is an EBS volume and you update user data, CloudFormation restarts the instance. If the root volume is an instance store volume and you update user data, the instance is replaced.
@@ -22544,11 +22602,11 @@ class CfnInstanceProps:
22544
22602
  def elastic_gpu_specifications(
22545
22603
  self,
22546
22604
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, CfnInstance.ElasticGpuSpecificationProperty]]]]:
22547
- '''Deprecated.
22605
+ '''An elastic GPU to associate with the instance.
22548
22606
 
22549
22607
  .. epigraph::
22550
22608
 
22551
- Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, G4dn, or G5 instances.
22609
+ Amazon Elastic Graphics reached end of life on January 8, 2024.
22552
22610
 
22553
22611
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-instance.html#cfn-ec2-instance-elasticgpuspecifications
22554
22612
  '''
@@ -22561,12 +22619,9 @@ class CfnInstanceProps:
22561
22619
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, CfnInstance.ElasticInferenceAcceleratorProperty]]]]:
22562
22620
  '''An elastic inference accelerator to associate with the instance.
22563
22621
 
22564
- Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.
22565
-
22566
- You cannot specify accelerators from different generations in the same request.
22567
22622
  .. epigraph::
22568
22623
 
22569
- Starting April 15, 2023, AWS will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.
22624
+ Amazon Elastic Inference (EI) is no longer available to new customers. For more information, see `Amazon Elastic Inference FAQs <https://docs.aws.amazon.com/machine-learning/elastic-inference/faqs/>`_ .
22570
22625
 
22571
22626
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-instance.html#cfn-ec2-instance-elasticinferenceaccelerators
22572
22627
  '''
@@ -22893,7 +22948,7 @@ class CfnInstanceProps:
22893
22948
  def subnet_id(self) -> typing.Optional[builtins.str]:
22894
22949
  '''The ID of the subnet to launch the instance into.
22895
22950
 
22896
- If you specify a network interface, you must specify any subnets as part of the network interface.
22951
+ If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
22897
22952
 
22898
22953
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-instance.html#cfn-ec2-instance-subnetid
22899
22954
  '''
@@ -26061,12 +26116,12 @@ class CfnLaunchTemplate(
26061
26116
  :param maintenance_options: The maintenance options of your instance.
26062
26117
  :param metadata_options: The metadata options for the instance. For more information, see `Instance metadata and user data <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .
26063
26118
  :param monitoring: The monitoring for the instance.
26064
- :param network_interfaces: One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.
26119
+ :param network_interfaces: The network interfaces for the instance.
26065
26120
  :param placement: The placement for the instance.
26066
26121
  :param private_dns_name_options: The hostname type for EC2 instances launched into this subnet and how DNS A and AAAA record queries should be handled. For more information, see `Amazon EC2 instance hostname types <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-naming.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .
26067
26122
  :param ram_disk_id: The ID of the RAM disk. .. epigraph:: We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see `User provided kernels <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .
26068
- :param security_group_ids: The IDs of the security groups. You can specify the IDs of existing security groups and references to resources created by the stack template.
26069
- :param security_groups: One or more security group names. For a nondefault VPC, you must use security group IDs instead.
26123
+ :param security_group_ids: The IDs of the security groups. You can specify the IDs of existing security groups and references to resources created by the stack template. If you specify a network interface, you must specify any security groups as part of the network interface instead.
26124
+ :param security_groups: The names of the security groups. For a nondefault VPC, you must use security group IDs instead. If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
26070
26125
  :param tag_specifications: The tags to apply to the resources that are created during instance launch. To tag a resource after it has been created, see `CreateTags <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html>`_ . To tag the launch template itself, use `TagSpecifications <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#cfn-ec2-launchtemplate-tagspecifications>`_ .
26071
26126
  :param user_data: The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see `Run commands on your Linux instance at launch <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html>`_ (Linux) or `Work with instance user data <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instancedata-add-user-data.html>`_ (Windows) in the *Amazon Elastic Compute Cloud User Guide* . If you are creating the launch template for use with AWS Batch , the user data must be provided in the `MIME multi-part archive format <https://docs.aws.amazon.com/https://cloudinit.readthedocs.io/en/latest/topics/format.html#mime-multi-part-archive>`_ . For more information, see `Amazon EC2 user data in launch templates <https://docs.aws.amazon.com/batch/latest/userguide/launch-templates.html>`_ in the *AWS Batch User Guide* .
26072
26127
 
@@ -26202,8 +26257,7 @@ class CfnLaunchTemplate(
26202
26257
  license_configuration_arn="licenseConfigurationArn"
26203
26258
  )],
26204
26259
  maintenance_options=ec2.CfnLaunchTemplate.MaintenanceOptionsProperty(
26205
- auto_recovery="autoRecovery",
26206
- reboot_migration="rebootMigration"
26260
+ auto_recovery="autoRecovery"
26207
26261
  ),
26208
26262
  metadata_options=ec2.CfnLaunchTemplate.MetadataOptionsProperty(
26209
26263
  http_endpoint="httpEndpoint",
@@ -26701,9 +26755,7 @@ class CfnLaunchTemplate(
26701
26755
  def network_interfaces(
26702
26756
  self,
26703
26757
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnLaunchTemplate.NetworkInterfaceProperty"]]]]:
26704
- '''One or more network interfaces.
26705
-
26706
- If you specify a network interface, you must specify any security groups and subnets as part of the network interface.
26758
+ '''The network interfaces for the instance.
26707
26759
 
26708
26760
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html#cfn-ec2-launchtemplate-launchtemplatedata-networkinterfaces
26709
26761
  '''
@@ -26753,6 +26805,8 @@ class CfnLaunchTemplate(
26753
26805
 
26754
26806
  You can specify the IDs of existing security groups and references to resources created by the stack template.
26755
26807
 
26808
+ If you specify a network interface, you must specify any security groups as part of the network interface instead.
26809
+
26756
26810
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html#cfn-ec2-launchtemplate-launchtemplatedata-securitygroupids
26757
26811
  '''
26758
26812
  result = self._values.get("security_group_ids")
@@ -26760,9 +26814,9 @@ class CfnLaunchTemplate(
26760
26814
 
26761
26815
  @builtins.property
26762
26816
  def security_groups(self) -> typing.Optional[typing.List[builtins.str]]:
26763
- '''One or more security group names.
26817
+ '''The names of the security groups. For a nondefault VPC, you must use security group IDs instead.
26764
26818
 
26765
- For a nondefault VPC, you must use security group IDs instead.
26819
+ If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
26766
26820
 
26767
26821
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html#cfn-ec2-launchtemplate-launchtemplatedata-securitygroups
26768
26822
  '''
@@ -27021,22 +27075,17 @@ class CfnLaunchTemplate(
27021
27075
  @jsii.data_type(
27022
27076
  jsii_type="aws-cdk-lib.aws_ec2.CfnLaunchTemplate.MaintenanceOptionsProperty",
27023
27077
  jsii_struct_bases=[],
27024
- name_mapping={
27025
- "auto_recovery": "autoRecovery",
27026
- "reboot_migration": "rebootMigration",
27027
- },
27078
+ name_mapping={"auto_recovery": "autoRecovery"},
27028
27079
  )
27029
27080
  class MaintenanceOptionsProperty:
27030
27081
  def __init__(
27031
27082
  self,
27032
27083
  *,
27033
27084
  auto_recovery: typing.Optional[builtins.str] = None,
27034
- reboot_migration: typing.Optional[builtins.str] = None,
27035
27085
  ) -> None:
27036
27086
  '''The maintenance options of your instance.
27037
27087
 
27038
27088
  :param auto_recovery: Disables the automatic recovery behavior of your instance or sets it to default.
27039
- :param reboot_migration:
27040
27089
 
27041
27090
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-maintenanceoptions.html
27042
27091
  :exampleMetadata: fixture=_generated
@@ -27048,19 +27097,15 @@ class CfnLaunchTemplate(
27048
27097
  from aws_cdk import aws_ec2 as ec2
27049
27098
 
27050
27099
  maintenance_options_property = ec2.CfnLaunchTemplate.MaintenanceOptionsProperty(
27051
- auto_recovery="autoRecovery",
27052
- reboot_migration="rebootMigration"
27100
+ auto_recovery="autoRecovery"
27053
27101
  )
27054
27102
  '''
27055
27103
  if __debug__:
27056
27104
  type_hints = typing.get_type_hints(_typecheckingstub__62e0d77a7fa9500aab5a08e932dc82213f11e05b31cf56f4654431c48342979e)
27057
27105
  check_type(argname="argument auto_recovery", value=auto_recovery, expected_type=type_hints["auto_recovery"])
27058
- check_type(argname="argument reboot_migration", value=reboot_migration, expected_type=type_hints["reboot_migration"])
27059
27106
  self._values: typing.Dict[builtins.str, typing.Any] = {}
27060
27107
  if auto_recovery is not None:
27061
27108
  self._values["auto_recovery"] = auto_recovery
27062
- if reboot_migration is not None:
27063
- self._values["reboot_migration"] = reboot_migration
27064
27109
 
27065
27110
  @builtins.property
27066
27111
  def auto_recovery(self) -> typing.Optional[builtins.str]:
@@ -27071,14 +27116,6 @@ class CfnLaunchTemplate(
27071
27116
  result = self._values.get("auto_recovery")
27072
27117
  return typing.cast(typing.Optional[builtins.str], result)
27073
27118
 
27074
- @builtins.property
27075
- def reboot_migration(self) -> typing.Optional[builtins.str]:
27076
- '''
27077
- :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-maintenanceoptions.html#cfn-ec2-launchtemplate-maintenanceoptions-rebootmigration
27078
- '''
27079
- result = self._values.get("reboot_migration")
27080
- return typing.cast(typing.Optional[builtins.str], result)
27081
-
27082
27119
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
27083
27120
  return isinstance(rhs, self.__class__) and rhs._values == self._values
27084
27121
 
@@ -40398,7 +40435,7 @@ class CfnSecurityGroup(
40398
40435
 
40399
40436
  To create a security group, use the `VpcId <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2-securitygroup-vpcid>`_ property to specify the VPC for which to create the security group.
40400
40437
 
40401
- If you do not specify an egress rule, we add egress rules that allow IPv4 and IPv6 traffic on all ports and protocols to any destination. We do not add these rules if you specify your own egress rules. If you later remove your egress rules, we restore the default egress rules.
40438
+ If you do not specify an egress rule, we add egress rules that allow IPv4 and IPv6 traffic on all ports and protocols to any destination. We do not add these rules if you specify your own egress rules.
40402
40439
 
40403
40440
  This type supports updates. For more information about updating stacks, see `AWS CloudFormation Stacks Updates <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html>`_ .
40404
40441
  .. epigraph::
@@ -40430,7 +40467,6 @@ class CfnSecurityGroup(
40430
40467
  destination_prefix_list_id="destinationPrefixListId",
40431
40468
  destination_security_group_id="destinationSecurityGroupId",
40432
40469
  from_port=123,
40433
- source_security_group_id="sourceSecurityGroupId",
40434
40470
  to_port=123
40435
40471
  )],
40436
40472
  security_group_ingress=[ec2.CfnSecurityGroup.IngressProperty(
@@ -40661,7 +40697,6 @@ class CfnSecurityGroup(
40661
40697
  "destination_prefix_list_id": "destinationPrefixListId",
40662
40698
  "destination_security_group_id": "destinationSecurityGroupId",
40663
40699
  "from_port": "fromPort",
40664
- "source_security_group_id": "sourceSecurityGroupId",
40665
40700
  "to_port": "toPort",
40666
40701
  },
40667
40702
  )
@@ -40676,7 +40711,6 @@ class CfnSecurityGroup(
40676
40711
  destination_prefix_list_id: typing.Optional[builtins.str] = None,
40677
40712
  destination_security_group_id: typing.Optional[builtins.str] = None,
40678
40713
  from_port: typing.Optional[jsii.Number] = None,
40679
- source_security_group_id: typing.Optional[builtins.str] = None,
40680
40714
  to_port: typing.Optional[jsii.Number] = None,
40681
40715
  ) -> None:
40682
40716
  '''Adds the specified outbound (egress) rule to a security group.
@@ -40696,7 +40730,6 @@ class CfnSecurityGroup(
40696
40730
  :param destination_prefix_list_id: The prefix list IDs for the destination AWS service. This is the AWS service that you want to access through a VPC endpoint from instances associated with the security group. You must specify exactly one of the following: ``CidrIp`` , ``CidrIpv6`` , ``DestinationPrefixListId`` , or ``DestinationSecurityGroupId`` .
40697
40731
  :param destination_security_group_id: The ID of the destination VPC security group. You must specify exactly one of the following: ``CidrIp`` , ``CidrIpv6`` , ``DestinationPrefixListId`` , or ``DestinationSecurityGroupId`` .
40698
40732
  :param from_port: If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).
40699
- :param source_security_group_id:
40700
40733
  :param to_port: If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).
40701
40734
 
40702
40735
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-securitygroup-egress.html
@@ -40718,7 +40751,6 @@ class CfnSecurityGroup(
40718
40751
  destination_prefix_list_id="destinationPrefixListId",
40719
40752
  destination_security_group_id="destinationSecurityGroupId",
40720
40753
  from_port=123,
40721
- source_security_group_id="sourceSecurityGroupId",
40722
40754
  to_port=123
40723
40755
  )
40724
40756
  '''
@@ -40731,7 +40763,6 @@ class CfnSecurityGroup(
40731
40763
  check_type(argname="argument destination_prefix_list_id", value=destination_prefix_list_id, expected_type=type_hints["destination_prefix_list_id"])
40732
40764
  check_type(argname="argument destination_security_group_id", value=destination_security_group_id, expected_type=type_hints["destination_security_group_id"])
40733
40765
  check_type(argname="argument from_port", value=from_port, expected_type=type_hints["from_port"])
40734
- check_type(argname="argument source_security_group_id", value=source_security_group_id, expected_type=type_hints["source_security_group_id"])
40735
40766
  check_type(argname="argument to_port", value=to_port, expected_type=type_hints["to_port"])
40736
40767
  self._values: typing.Dict[builtins.str, typing.Any] = {
40737
40768
  "ip_protocol": ip_protocol,
@@ -40748,8 +40779,6 @@ class CfnSecurityGroup(
40748
40779
  self._values["destination_security_group_id"] = destination_security_group_id
40749
40780
  if from_port is not None:
40750
40781
  self._values["from_port"] = from_port
40751
- if source_security_group_id is not None:
40752
- self._values["source_security_group_id"] = source_security_group_id
40753
40782
  if to_port is not None:
40754
40783
  self._values["to_port"] = to_port
40755
40784
 
@@ -40837,14 +40866,6 @@ class CfnSecurityGroup(
40837
40866
  result = self._values.get("from_port")
40838
40867
  return typing.cast(typing.Optional[jsii.Number], result)
40839
40868
 
40840
- @builtins.property
40841
- def source_security_group_id(self) -> typing.Optional[builtins.str]:
40842
- '''
40843
- :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-securitygroup-egress.html#cfn-ec2-securitygroup-egress-sourcesecuritygroupid
40844
- '''
40845
- result = self._values.get("source_security_group_id")
40846
- return typing.cast(typing.Optional[builtins.str], result)
40847
-
40848
40869
  @builtins.property
40849
40870
  def to_port(self) -> typing.Optional[jsii.Number]:
40850
40871
  '''If the protocol is TCP or UDP, this is the end of the port range.
@@ -42202,7 +42223,6 @@ class CfnSecurityGroupProps:
42202
42223
  destination_prefix_list_id="destinationPrefixListId",
42203
42224
  destination_security_group_id="destinationSecurityGroupId",
42204
42225
  from_port=123,
42205
- source_security_group_id="sourceSecurityGroupId",
42206
42226
  to_port=123
42207
42227
  )],
42208
42228
  security_group_ingress=[ec2.CfnSecurityGroup.IngressProperty(
@@ -42517,10 +42537,7 @@ class CfnSpotFleet(
42517
42537
 
42518
42538
  You can specify tags for the Spot Fleet request and instances launched by the fleet. You cannot tag other resource types in a Spot Fleet request because only the ``spot-fleet-request`` and ``instance`` resource types are supported.
42519
42539
 
42520
- For more information, see `Spot Fleet <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet.html>`_ in the *Amazon EC2 User Guide for Linux Instances* .
42521
- .. epigraph::
42522
-
42523
- We strongly discourage using the RequestSpotFleet API because it is a legacy API with no planned investment. For options for requesting Spot Instances, see `Which is the best Spot request method to use? <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use>`_ in the *Amazon EC2 User Guide for Linux Instances* .
42540
+ For more information, see `Spot Fleet <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet.html>`_ in the *Amazon EC2 User Guide* .
42524
42541
 
42525
42542
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-spotfleet.html
42526
42543
  :cloudformationResource: AWS::EC2::SpotFleet
@@ -43811,7 +43828,7 @@ class CfnSpotFleet(
43811
43828
  :param network_interface_id: The ID of the network interface. If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.
43812
43829
  :param private_ip_addresses: The private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a `RunInstances <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html>`_ request.
43813
43830
  :param secondary_private_ip_address_count: The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a `RunInstances <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html>`_ request.
43814
- :param subnet_id: The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.
43831
+ :param subnet_id: The ID of the subnet associated with the network interface.
43815
43832
 
43816
43833
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-instancenetworkinterfacespecification.html
43817
43834
  :exampleMetadata: fixture=_generated
@@ -44004,8 +44021,6 @@ class CfnSpotFleet(
44004
44021
  def subnet_id(self) -> typing.Optional[builtins.str]:
44005
44022
  '''The ID of the subnet associated with the network interface.
44006
44023
 
44007
- Applies only if creating a network interface when launching an instance.
44008
-
44009
44024
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-instancenetworkinterfacespecification.html#cfn-ec2-spotfleet-instancenetworkinterfacespecification-subnetid
44010
44025
  '''
44011
44026
  result = self._values.get("subnet_id")
@@ -45653,12 +45668,12 @@ class CfnSpotFleet(
45653
45668
  :param kernel_id: The ID of the kernel.
45654
45669
  :param key_name: The name of the key pair.
45655
45670
  :param monitoring: Enable or disable monitoring for the instances.
45656
- :param network_interfaces: One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface. .. epigraph:: ``SpotFleetLaunchSpecification`` currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use `LaunchTemplateConfig <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateConfig.html>`_ .
45671
+ :param network_interfaces: The network interfaces.
45657
45672
  :param placement: The placement information.
45658
45673
  :param ramdisk_id: The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the AWS Resource Center and search for the kernel ID.
45659
- :param security_groups: The security groups.
45674
+ :param security_groups: The security groups. If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
45660
45675
  :param spot_price: The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price. .. epigraph:: If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
45661
- :param subnet_id: The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".
45676
+ :param subnet_id: The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2". If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
45662
45677
  :param tag_specifications: The tags to apply during creation.
45663
45678
  :param user_data: The base64-encoded user data that instances use when starting up. User data is limited to 16 KB.
45664
45679
  :param weighted_capacity: The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O. If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
@@ -45963,12 +45978,7 @@ class CfnSpotFleet(
45963
45978
  def network_interfaces(
45964
45979
  self,
45965
45980
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnSpotFleet.InstanceNetworkInterfaceSpecificationProperty"]]]]:
45966
- '''One or more network interfaces.
45967
-
45968
- If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.
45969
- .. epigraph::
45970
-
45971
- ``SpotFleetLaunchSpecification`` currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use `LaunchTemplateConfig <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateConfig.html>`_ .
45981
+ '''The network interfaces.
45972
45982
 
45973
45983
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-networkinterfaces
45974
45984
  '''
@@ -46003,6 +46013,8 @@ class CfnSpotFleet(
46003
46013
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnSpotFleet.GroupIdentifierProperty"]]]]:
46004
46014
  '''The security groups.
46005
46015
 
46016
+ If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
46017
+
46006
46018
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-securitygroups
46007
46019
  '''
46008
46020
  result = self._values.get("security_groups")
@@ -46028,6 +46040,8 @@ class CfnSpotFleet(
46028
46040
 
46029
46041
  To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".
46030
46042
 
46043
+ If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
46044
+
46031
46045
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetlaunchspecification.html#cfn-ec2-spotfleet-spotfleetlaunchspecification-subnetid
46032
46046
  '''
46033
46047
  result = self._values.get("subnet_id")
@@ -54281,14 +54295,6 @@ class CfnTransitGatewayRouteTableAssociation(
54281
54295
  '''The CloudFormation resource type name for this resource class.'''
54282
54296
  return typing.cast(builtins.str, jsii.sget(cls, "CFN_RESOURCE_TYPE_NAME"))
54283
54297
 
54284
- @builtins.property
54285
- @jsii.member(jsii_name="attrId")
54286
- def attr_id(self) -> builtins.str:
54287
- '''
54288
- :cloudformationAttribute: Id
54289
- '''
54290
- return typing.cast(builtins.str, jsii.get(self, "attrId"))
54291
-
54292
54298
  @builtins.property
54293
54299
  @jsii.member(jsii_name="cfnProperties")
54294
54300
  def _cfn_properties(self) -> typing.Mapping[builtins.str, typing.Any]:
@@ -73441,7 +73447,8 @@ class InstanceType(
73441
73447
  subnet_type=ec2.SubnetType.PUBLIC
73442
73448
  ),
73443
73449
  vpc=vpc,
73444
- removal_policy=RemovalPolicy.SNAPSHOT
73450
+ removal_policy=RemovalPolicy.SNAPSHOT,
73451
+ instance_removal_policy=RemovalPolicy.RETAIN
73445
73452
  )
73446
73453
  '''
73447
73454
 
@@ -78835,6 +78842,7 @@ class NatInstanceImage(
78835
78842
  "key_pair": "keyPair",
78836
78843
  "machine_image": "machineImage",
78837
78844
  "security_group": "securityGroup",
78845
+ "user_data": "userData",
78838
78846
  },
78839
78847
  )
78840
78848
  class NatInstanceProps:
@@ -78848,6 +78856,7 @@ class NatInstanceProps:
78848
78856
  key_pair: typing.Optional[IKeyPair] = None,
78849
78857
  machine_image: typing.Optional[IMachineImage] = None,
78850
78858
  security_group: typing.Optional[ISecurityGroup] = None,
78859
+ user_data: typing.Optional["UserData"] = None,
78851
78860
  ) -> None:
78852
78861
  '''Properties for a NAT instance.
78853
78862
 
@@ -78857,20 +78866,24 @@ class NatInstanceProps:
78857
78866
  :param key_name: (deprecated) Name of SSH keypair to grant access to instance. Default: - No SSH access will be possible.
78858
78867
  :param key_pair: The SSH keypair to grant access to the instance. Default: - No SSH access will be possible.
78859
78868
  :param machine_image: The machine image (AMI) to use. By default, will do an AMI lookup for the latest NAT instance image. If you have a specific AMI ID you want to use, pass a ``GenericLinuxImage``. For example:: ec2.NatProvider.instance({ instanceType: new ec2.InstanceType('t3.micro'), machineImage: new ec2.GenericLinuxImage({ 'us-east-2': 'ami-0f9c61b5a562a16af' }) }) Default: - Latest NAT instance image
78860
- :param security_group: Security Group for NAT instances. Default: - A new security group will be created
78869
+ :param security_group: (deprecated) Security Group for NAT instances. Default: - A new security group will be created
78870
+ :param user_data: Custom user data to run on the NAT instances. Default: UserData.forLinux().addCommands(...NatInstanceProviderV2.DEFAULT_USER_DATA_COMMANDS); - Appropriate user data commands to initialize and configure the NAT instances
78861
78871
 
78862
78872
  :exampleMetadata: infused
78863
78873
 
78864
78874
  Example::
78865
78875
 
78866
- nat_instance_provider = ec2.NatProvider.instance(
78867
- instance_type=ec2.InstanceType.of(ec2.InstanceClass.T4G, ec2.InstanceSize.LARGE),
78868
- machine_image=ec2.AmazonLinuxImage(),
78869
- credit_specification=ec2.CpuCredits.UNLIMITED
78876
+ # instance_type: ec2.InstanceType
78877
+
78878
+
78879
+ provider = ec2.NatProvider.instance_v2(
78880
+ instance_type=instance_type,
78881
+ default_allowed_traffic=ec2.NatTrafficDirection.OUTBOUND_ONLY
78870
78882
  )
78871
- ec2.Vpc(self, "VPC",
78872
- nat_gateway_provider=nat_instance_provider
78883
+ ec2.Vpc(self, "TheVPC",
78884
+ nat_gateway_provider=provider
78873
78885
  )
78886
+ provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.HTTP)
78874
78887
  '''
78875
78888
  if __debug__:
78876
78889
  type_hints = typing.get_type_hints(_typecheckingstub__d7c7c717447859e1ccc181bc97f7752cc3f7fa7afaee4c3a4266eeac32c08643)
@@ -78881,6 +78894,7 @@ class NatInstanceProps:
78881
78894
  check_type(argname="argument key_pair", value=key_pair, expected_type=type_hints["key_pair"])
78882
78895
  check_type(argname="argument machine_image", value=machine_image, expected_type=type_hints["machine_image"])
78883
78896
  check_type(argname="argument security_group", value=security_group, expected_type=type_hints["security_group"])
78897
+ check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
78884
78898
  self._values: typing.Dict[builtins.str, typing.Any] = {
78885
78899
  "instance_type": instance_type,
78886
78900
  }
@@ -78896,6 +78910,8 @@ class NatInstanceProps:
78896
78910
  self._values["machine_image"] = machine_image
78897
78911
  if security_group is not None:
78898
78912
  self._values["security_group"] = security_group
78913
+ if user_data is not None:
78914
+ self._values["user_data"] = user_data
78899
78915
 
78900
78916
  @builtins.property
78901
78917
  def instance_type(self) -> InstanceType:
@@ -78976,13 +78992,50 @@ class NatInstanceProps:
78976
78992
 
78977
78993
  @builtins.property
78978
78994
  def security_group(self) -> typing.Optional[ISecurityGroup]:
78979
- '''Security Group for NAT instances.
78995
+ '''(deprecated) Security Group for NAT instances.
78980
78996
 
78981
78997
  :default: - A new security group will be created
78998
+
78999
+ :deprecated:
79000
+
79001
+ - Cannot create a new security group before the VPC is created,
79002
+ and cannot create the VPC without the NAT provider.
79003
+ Set {@link defaultAllowedTraffic } to {@link NatTrafficDirection.NONE }
79004
+ and use {@link NatInstanceProviderV2.gatewayInstances } to retrieve
79005
+ the instances on the fly and add security groups
79006
+
79007
+ :stability: deprecated
79008
+
79009
+ Example::
79010
+
79011
+ nat_gateway_provider = ec2.NatProvider.instance_v2(
79012
+ instance_type=ec2.InstanceType("t3.small"),
79013
+ default_allowed_traffic=ec2.NatTrafficDirection.NONE
79014
+ )
79015
+ vpc = ec2.Vpc(self, "Vpc", nat_gateway_provider=nat_gateway_provider)
79016
+
79017
+ security_group = ec2.SecurityGroup(self, "SecurityGroup",
79018
+ vpc=vpc,
79019
+ allow_all_outbound=False
79020
+ )
79021
+ security_group.add_egress_rule(ec2.Peer.any_ipv4(), ec2.Port.tcp(443))
79022
+ for gateway_instance in nat_gateway_provider.gateway_instances:
79023
+ gateway_instance.add_security_group(security_group)
78982
79024
  '''
78983
79025
  result = self._values.get("security_group")
78984
79026
  return typing.cast(typing.Optional[ISecurityGroup], result)
78985
79027
 
79028
+ @builtins.property
79029
+ def user_data(self) -> typing.Optional["UserData"]:
79030
+ '''Custom user data to run on the NAT instances.
79031
+
79032
+ :default: UserData.forLinux().addCommands(...NatInstanceProviderV2.DEFAULT_USER_DATA_COMMANDS); - Appropriate user data commands to initialize and configure the NAT instances
79033
+
79034
+ :see: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html#create-nat-ami
79035
+ '''
79036
+ result = self._values.get("user_data")
79037
+ return typing.cast(typing.Optional["UserData"], result)
79038
+
78986
79039
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
78987
79040
  return isinstance(rhs, self.__class__) and rhs._values == self._values
78988
79041
 
@@ -79018,7 +79071,7 @@ class NatProvider(
79018
79071
  ec2.Vpc(self, "TheVPC",
79019
79072
  nat_gateway_provider=provider
79020
79073
  )
79021
- provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.tcp(80))
79074
+ provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.HTTP)
79022
79075
  '''
79023
79076
 
79024
79077
  def __init__(self) -> None:
@@ -79055,6 +79108,7 @@ class NatProvider(
79055
79108
  key_pair: typing.Optional[IKeyPair] = None,
79056
79109
  machine_image: typing.Optional[IMachineImage] = None,
79057
79110
  security_group: typing.Optional[ISecurityGroup] = None,
79111
+ user_data: typing.Optional["UserData"] = None,
79058
79112
  ) -> "NatInstanceProvider":
79059
79113
  '''(deprecated) Use NAT instances to provide NAT services for your VPC.
79060
79114
 
@@ -79070,7 +79124,8 @@ class NatProvider(
79070
79124
  :param key_name: (deprecated) Name of SSH keypair to grant access to instance. Default: - No SSH access will be possible.
79071
79125
  :param key_pair: The SSH keypair to grant access to the instance. Default: - No SSH access will be possible.
79072
79126
  :param machine_image: The machine image (AMI) to use. By default, will do an AMI lookup for the latest NAT instance image. If you have a specific AMI ID you want to use, pass a ``GenericLinuxImage``. For example:: ec2.NatProvider.instance({ instanceType: new ec2.InstanceType('t3.micro'), machineImage: new ec2.GenericLinuxImage({ 'us-east-2': 'ami-0f9c61b5a562a16af' }) }) Default: - Latest NAT instance image
79073
- :param security_group: Security Group for NAT instances. Default: - A new security group will be created
79127
+ :param security_group: (deprecated) Security Group for NAT instances. Default: - A new security group will be created
79128
+ :param user_data: Custom user data to run on the NAT instances. Default: UserData.forLinux().addCommands(...NatInstanceProviderV2.DEFAULT_USER_DATA_COMMANDS); - Appropriate user data commands to initialize and configure the NAT instances
79074
79129
 
79075
79130
  :deprecated:
79076
79131
 
@@ -79088,6 +79143,7 @@ class NatProvider(
79088
79143
  key_pair=key_pair,
79089
79144
  machine_image=machine_image,
79090
79145
  security_group=security_group,
79146
+ user_data=user_data,
79091
79147
  )
79092
79148
 
79093
79149
  return typing.cast("NatInstanceProvider", jsii.sinvoke(cls, "instance", [props]))
@@ -79104,6 +79160,7 @@ class NatProvider(
79104
79160
  key_pair: typing.Optional[IKeyPair] = None,
79105
79161
  machine_image: typing.Optional[IMachineImage] = None,
79106
79162
  security_group: typing.Optional[ISecurityGroup] = None,
79163
+ user_data: typing.Optional["UserData"] = None,
79107
79164
  ) -> "NatInstanceProviderV2":
79108
79165
  '''Use NAT instances to provide NAT services for your VPC.
79109
79166
 
@@ -79119,7 +79176,8 @@ class NatProvider(
79119
79176
  :param key_name: (deprecated) Name of SSH keypair to grant access to instance. Default: - No SSH access will be possible.
79120
79177
  :param key_pair: The SSH keypair to grant access to the instance. Default: - No SSH access will be possible.
79121
79178
  :param machine_image: The machine image (AMI) to use. By default, will do an AMI lookup for the latest NAT instance image. If you have a specific AMI ID you want to use, pass a ``GenericLinuxImage``. For example:: ec2.NatProvider.instance({ instanceType: new ec2.InstanceType('t3.micro'), machineImage: new ec2.GenericLinuxImage({ 'us-east-2': 'ami-0f9c61b5a562a16af' }) }) Default: - Latest NAT instance image
79122
- :param security_group: Security Group for NAT instances. Default: - A new security group will be created
79179
+ :param security_group: (deprecated) Security Group for NAT instances. Default: - A new security group will be created
79180
+ :param user_data: Custom user data to run on the NAT instances. Default: UserData.forLinux().addCommands(...NatInstanceProviderV2.DEFAULT_USER_DATA_COMMANDS); - Appropriate user data commands to initialize and configure the NAT instances
79123
79181
 
79124
79182
  :see: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html
79125
79183
  '''
@@ -79131,6 +79189,7 @@ class NatProvider(
79131
79189
  key_pair=key_pair,
79132
79190
  machine_image=machine_image,
79133
79191
  security_group=security_group,
79192
+ user_data=user_data,
79134
79193
  )
79135
79194
 
79136
79195
  return typing.cast("NatInstanceProviderV2", jsii.sinvoke(cls, "instanceV2", [props]))
@@ -79227,17 +79286,19 @@ class NatTrafficDirection(enum.Enum):
79227
79286
 
79228
79287
  Example::
79229
79288
 
79230
- # instance_type: ec2.InstanceType
79231
-
79232
-
79233
- provider = ec2.NatProvider.instance_v2(
79234
- instance_type=instance_type,
79235
- default_allowed_traffic=ec2.NatTrafficDirection.OUTBOUND_ONLY
79289
+ nat_gateway_provider = ec2.NatProvider.instance_v2(
79290
+ instance_type=ec2.InstanceType("t3.small"),
79291
+ default_allowed_traffic=ec2.NatTrafficDirection.NONE
79236
79292
  )
79237
- ec2.Vpc(self, "TheVPC",
79238
- nat_gateway_provider=provider
79293
+ vpc = ec2.Vpc(self, "Vpc", nat_gateway_provider=nat_gateway_provider)
79294
+
79295
+ security_group = ec2.SecurityGroup(self, "SecurityGroup",
79296
+ vpc=vpc,
79297
+ allow_all_outbound=False
79239
79298
  )
79240
- provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.tcp(80))
79299
+ security_group.add_egress_rule(ec2.Peer.any_ipv4(), ec2.Port.tcp(443))
79300
+ for gateway_instance in nat_gateway_provider.gateway_instances:
79301
+ gateway_instance.add_security_group(security_group)
79241
79302
  '''
79242
79303
 
79243
79304
  OUTBOUND_ONLY = "OUTBOUND_ONLY"
@@ -79844,17 +79905,20 @@ class Peer(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_ec2.Peer"):
79844
79905
 
79845
79906
  Example::
79846
79907
 
79847
- # instance_type: ec2.InstanceType
79848
-
79908
+ # vpc: ec2.Vpc
79849
79909
 
79850
- provider = ec2.NatProvider.instance_v2(
79851
- instance_type=instance_type,
79852
- default_allowed_traffic=ec2.NatTrafficDirection.OUTBOUND_ONLY
79853
- )
79854
- ec2.Vpc(self, "TheVPC",
79855
- nat_gateway_provider=provider
79910
+ cluster = msk.Cluster(self, "Cluster",
79911
+ cluster_name="myCluster",
79912
+ kafka_version=msk.KafkaVersion.V2_8_1,
79913
+ vpc=vpc
79856
79914
  )
79857
- provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.tcp(80))
79915
+
79916
+ cluster.connections.allow_from(
79917
+ ec2.Peer.ipv4("1.2.3.4/8"),
79918
+ ec2.Port.tcp(2181))
79919
+ cluster.connections.allow_from(
79920
+ ec2.Peer.ipv4("1.2.3.4/8"),
79921
+ ec2.Port.tcp(9094))
79858
79922
  '''
79859
79923
 
79860
79924
  def __init__(self) -> None:
@@ -80226,7 +80290,7 @@ class Port(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_ec2.Port"):
80226
80290
  ec2.Vpc(self, "TheVPC",
80227
80291
  nat_gateway_provider=provider
80228
80292
  )
80229
- provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.tcp(80))
80293
+ provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.HTTP)
80230
80294
  '''
80231
80295
 
80232
80296
  def __init__(
@@ -80389,6 +80453,108 @@ class Port(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_ec2.Port"):
80389
80453
  def to_string(self) -> builtins.str:
80390
80454
  return typing.cast(builtins.str, jsii.invoke(self, "toString", []))
80391
80455
 
80456
+ @jsii.python.classproperty
80457
+ @jsii.member(jsii_name="DNS_TCP")
80458
+ def DNS_TCP(cls) -> "Port":
80459
+ '''Well-known DNS port (TCP 53).'''
80460
+ return typing.cast("Port", jsii.sget(cls, "DNS_TCP"))
80461
+
80462
+ @jsii.python.classproperty
80463
+ @jsii.member(jsii_name="DNS_UDP")
80464
+ def DNS_UDP(cls) -> "Port":
80465
+ '''Well-known DNS port (UDP 53).'''
80466
+ return typing.cast("Port", jsii.sget(cls, "DNS_UDP"))
80467
+
80468
+ @jsii.python.classproperty
80469
+ @jsii.member(jsii_name="HTTP")
80470
+ def HTTP(cls) -> "Port":
80471
+ '''Well-known HTTP port (TCP 80).'''
80472
+ return typing.cast("Port", jsii.sget(cls, "HTTP"))
80473
+
80474
+ @jsii.python.classproperty
80475
+ @jsii.member(jsii_name="HTTPS")
80476
+ def HTTPS(cls) -> "Port":
80477
+ '''Well-known HTTPS port (TCP 443).'''
80478
+ return typing.cast("Port", jsii.sget(cls, "HTTPS"))
80479
+
80480
+ @jsii.python.classproperty
80481
+ @jsii.member(jsii_name="IMAP")
80482
+ def IMAP(cls) -> "Port":
80483
+ '''Well-known IMAP port (TCP 143).'''
80484
+ return typing.cast("Port", jsii.sget(cls, "IMAP"))
80485
+
80486
+ @jsii.python.classproperty
80487
+ @jsii.member(jsii_name="IMAPS")
80488
+ def IMAPS(cls) -> "Port":
80489
+ '''Well-known IMAPS port (TCP 993).'''
80490
+ return typing.cast("Port", jsii.sget(cls, "IMAPS"))
80491
+
80492
+ @jsii.python.classproperty
80493
+ @jsii.member(jsii_name="LDAP")
80494
+ def LDAP(cls) -> "Port":
80495
+ '''Well-known LDAP port (TCP 389).'''
80496
+ return typing.cast("Port", jsii.sget(cls, "LDAP"))
80497
+
80498
+ @jsii.python.classproperty
80499
+ @jsii.member(jsii_name="MSSQL")
80500
+ def MSSQL(cls) -> "Port":
80501
+ '''Well-known Microsoft SQL Server port (TCP 1433).'''
80502
+ return typing.cast("Port", jsii.sget(cls, "MSSQL"))
80503
+
80504
+ @jsii.python.classproperty
80505
+ @jsii.member(jsii_name="MYSQL_AURORA")
80506
+ def MYSQL_AURORA(cls) -> "Port":
80507
+ '''Well-known MySQL and Aurora port (TCP 3306).'''
80508
+ return typing.cast("Port", jsii.sget(cls, "MYSQL_AURORA"))
80509
+
80510
+ @jsii.python.classproperty
80511
+ @jsii.member(jsii_name="NFS")
80512
+ def NFS(cls) -> "Port":
80513
+ '''Well-known NFS port (TCP 2049).'''
80514
+ return typing.cast("Port", jsii.sget(cls, "NFS"))
80515
+
80516
+ @jsii.python.classproperty
80517
+ @jsii.member(jsii_name="POP3")
80518
+ def POP3(cls) -> "Port":
80519
+ '''Well-known POP3 port (TCP 110).'''
80520
+ return typing.cast("Port", jsii.sget(cls, "POP3"))
80521
+
80522
+ @jsii.python.classproperty
80523
+ @jsii.member(jsii_name="POP3S")
80524
+ def POP3_S(cls) -> "Port":
80525
+ '''Well-known POP3S port (TCP 995).'''
80526
+ return typing.cast("Port", jsii.sget(cls, "POP3S"))
80527
+
80528
+ @jsii.python.classproperty
80529
+ @jsii.member(jsii_name="POSTGRES")
80530
+ def POSTGRES(cls) -> "Port":
80531
+ '''Well-known PostgreSQL port (TCP 5432).'''
80532
+ return typing.cast("Port", jsii.sget(cls, "POSTGRES"))
80533
+
80534
+ @jsii.python.classproperty
80535
+ @jsii.member(jsii_name="RDP")
80536
+ def RDP(cls) -> "Port":
80537
+ '''Well-known Microsoft Remote Desktop Protocol port (TCP 3389).'''
80538
+ return typing.cast("Port", jsii.sget(cls, "RDP"))
80539
+
80540
+ @jsii.python.classproperty
80541
+ @jsii.member(jsii_name="SMB")
80542
+ def SMB(cls) -> "Port":
80543
+ '''Well-known SMB port (TCP 445).'''
80544
+ return typing.cast("Port", jsii.sget(cls, "SMB"))
80545
+
80546
+ @jsii.python.classproperty
80547
+ @jsii.member(jsii_name="SMTP")
80548
+ def SMTP(cls) -> "Port":
80549
+ '''Well-known SMTP port (TCP 25).'''
80550
+ return typing.cast("Port", jsii.sget(cls, "SMTP"))
80551
+
80552
+ @jsii.python.classproperty
80553
+ @jsii.member(jsii_name="SSH")
80554
+ def SSH(cls) -> "Port":
80555
+ '''Well-known SSH port (TCP 22).'''
80556
+ return typing.cast("Port", jsii.sget(cls, "SSH"))
80557
+
80392
80558
  @builtins.property
80393
80559
  @jsii.member(jsii_name="canInlineRule")
80394
80560
  def can_inline_rule(self) -> builtins.bool:
@@ -81441,18 +81607,20 @@ class SecurityGroup(
81441
81607
  mutable=False
81442
81608
  )
81443
81609
 
81444
- :exampleMetadata: fixture=with-vpc infused
81610
+ :exampleMetadata: infused
81445
81611
 
81446
81612
  Example::
81447
81613
 
81448
- my_security_group_without_inline_rules = ec2.SecurityGroup(self, "SecurityGroup",
81614
+ # vpc: ec2.Vpc
81615
+
81616
+
81617
+ my_security_group = ec2.SecurityGroup(self, "SecurityGroup", vpc=vpc)
81618
+ autoscaling.AutoScalingGroup(self, "ASG",
81449
81619
  vpc=vpc,
81450
- description="Allow ssh access to ec2 instances",
81451
- allow_all_outbound=True,
81452
- disable_inline_rules=True
81620
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.MICRO),
81621
+ machine_image=ec2.MachineImage.latest_amazon_linux2(),
81622
+ security_group=my_security_group
81453
81623
  )
81454
- # This will add the rule as an external cloud formation construct
81455
- my_security_group_without_inline_rules.add_ingress_rule(ec2.Peer.any_ipv4(), ec2.Port.tcp(22), "allow ssh access from the world")
81456
81624
  '''
81457
81625
 
81458
81626
  def __init__(
@@ -81912,15 +82080,13 @@ class SecurityGroupProps:
81912
82080
  # vpc: ec2.Vpc
81913
82081
 
81914
82082
 
81915
- security_group1 = ec2.SecurityGroup(self, "SecurityGroup1", vpc=vpc)
81916
- lb = elbv2.ApplicationLoadBalancer(self, "LB",
82083
+ my_security_group = ec2.SecurityGroup(self, "SecurityGroup", vpc=vpc)
82084
+ autoscaling.AutoScalingGroup(self, "ASG",
81917
82085
  vpc=vpc,
81918
- internet_facing=True,
81919
- security_group=security_group1
82086
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.MICRO),
82087
+ machine_image=ec2.MachineImage.latest_amazon_linux2(),
82088
+ security_group=my_security_group
81920
82089
  )
81921
-
81922
- security_group2 = ec2.SecurityGroup(self, "SecurityGroup2", vpc=vpc)
81923
- lb.add_security_group(security_group2)
81924
82090
  '''
81925
82091
  if __debug__:
81926
82092
  type_hints = typing.get_type_hints(_typecheckingstub__4e55e0c52b51f92e83b1f8d6b7a5b22268d0369a14dab808b8f2f5f233e5b622)
@@ -83942,13 +84108,23 @@ class UserData(
83942
84108
 
83943
84109
  Example::
83944
84110
 
83945
- multipart_user_data = ec2.MultipartUserData()
83946
- commands_user_data = ec2.UserData.for_linux()
83947
- multipart_user_data.add_user_data_part(commands_user_data, ec2.MultipartBody.SHELL_SCRIPT, True)
84111
+ # cluster: eks.Cluster
83948
84112
 
83949
- # Adding commands to the multipartUserData adds them to commandsUserData, and vice-versa.
83950
- multipart_user_data.add_commands("touch /root/multi.txt")
83951
- commands_user_data.add_commands("touch /root/userdata.txt")
84113
+ user_data = ec2.UserData.for_linux()
84114
+ user_data.add_commands("set -o xtrace", f"/etc/eks/bootstrap.sh {cluster.clusterName}")
84115
+ lt = ec2.CfnLaunchTemplate(self, "LaunchTemplate",
84116
+ launch_template_data=ec2.CfnLaunchTemplate.LaunchTemplateDataProperty(
84117
+ image_id="some-ami-id", # custom AMI
84118
+ instance_type="t3.small",
84119
+ user_data=Fn.base64(user_data.render())
84120
+ )
84121
+ )
84122
+ cluster.add_nodegroup_capacity("extra-ng",
84123
+ launch_template_spec=eks.LaunchTemplateSpec(
84124
+ id=lt.ref,
84125
+ version=lt.attr_latest_version_number
84126
+ )
84127
+ )
83952
84128
  '''
83953
84129
 
83954
84130
  def __init__(self) -> None:
@@ -91307,6 +91483,7 @@ class NatInstanceProvider(
91307
91483
  key_pair: typing.Optional[IKeyPair] = None,
91308
91484
  machine_image: typing.Optional[IMachineImage] = None,
91309
91485
  security_group: typing.Optional[ISecurityGroup] = None,
91486
+ user_data: typing.Optional[UserData] = None,
91310
91487
  ) -> None:
91311
91488
  '''
91312
91489
  :param instance_type: Instance type of the NAT instance.
@@ -91315,7 +91492,8 @@ class NatInstanceProvider(
91315
91492
  :param key_name: (deprecated) Name of SSH keypair to grant access to instance. Default: - No SSH access will be possible.
91316
91493
  :param key_pair: The SSH keypair to grant access to the instance. Default: - No SSH access will be possible.
91317
91494
  :param machine_image: The machine image (AMI) to use. By default, will do an AMI lookup for the latest NAT instance image. If you have a specific AMI ID you want to use, pass a ``GenericLinuxImage``. For example:: ec2.NatProvider.instance({ instanceType: new ec2.InstanceType('t3.micro'), machineImage: new ec2.GenericLinuxImage({ 'us-east-2': 'ami-0f9c61b5a562a16af' }) }) Default: - Latest NAT instance image
91318
- :param security_group: Security Group for NAT instances. Default: - A new security group will be created
91495
+ :param security_group: (deprecated) Security Group for NAT instances. Default: - A new security group will be created
91496
+ :param user_data: Custom user data to run on the NAT instances. Default: UserData.forLinux().addCommands(...NatInstanceProviderV2.DEFAULT_USER_DATA_COMMANDS); - Appropriate user data commands to initialize and configure the NAT instances
91319
91497
 
91320
91498
  :stability: deprecated
91321
91499
  '''
@@ -91327,6 +91505,7 @@ class NatInstanceProvider(
91327
91505
  key_pair=key_pair,
91328
91506
  machine_image=machine_image,
91329
91507
  security_group=security_group,
91508
+ user_data=user_data,
91330
91509
  )
91331
91510
 
91332
91511
  jsii.create(self.__class__, self, [props])
@@ -91412,17 +91591,19 @@ class NatInstanceProviderV2(
91412
91591
 
91413
91592
  Example::
91414
91593
 
91415
- # instance_type: ec2.InstanceType
91416
-
91417
-
91418
- provider = ec2.NatProvider.instance_v2(
91419
- instance_type=instance_type,
91420
- default_allowed_traffic=ec2.NatTrafficDirection.OUTBOUND_ONLY
91594
+ nat_gateway_provider = ec2.NatProvider.instance_v2(
91595
+ instance_type=ec2.InstanceType("t3.small"),
91596
+ default_allowed_traffic=ec2.NatTrafficDirection.NONE
91421
91597
  )
91422
- ec2.Vpc(self, "TheVPC",
91423
- nat_gateway_provider=provider
91598
+ vpc = ec2.Vpc(self, "Vpc", nat_gateway_provider=nat_gateway_provider)
91599
+
91600
+ security_group = ec2.SecurityGroup(self, "SecurityGroup",
91601
+ vpc=vpc,
91602
+ allow_all_outbound=False
91424
91603
  )
91425
- provider.connections.allow_from(ec2.Peer.ipv4("1.2.3.4/8"), ec2.Port.tcp(80))
91604
+ security_group.add_egress_rule(ec2.Peer.any_ipv4(), ec2.Port.tcp(443))
91605
+ for gateway_instance in nat_gateway_provider.gateway_instances:
91606
+ gateway_instance.add_security_group(security_group)
91426
91607
  '''
91427
91608
 
91428
91609
  def __init__(
@@ -91435,6 +91616,7 @@ class NatInstanceProviderV2(
91435
91616
  key_pair: typing.Optional[IKeyPair] = None,
91436
91617
  machine_image: typing.Optional[IMachineImage] = None,
91437
91618
  security_group: typing.Optional[ISecurityGroup] = None,
91619
+ user_data: typing.Optional[UserData] = None,
91438
91620
  ) -> None:
91439
91621
  '''
91440
91622
  :param instance_type: Instance type of the NAT instance.
@@ -91443,7 +91625,8 @@ class NatInstanceProviderV2(
91443
91625
  :param key_name: (deprecated) Name of SSH keypair to grant access to instance. Default: - No SSH access will be possible.
91444
91626
  :param key_pair: The SSH keypair to grant access to the instance. Default: - No SSH access will be possible.
91445
91627
  :param machine_image: The machine image (AMI) to use. By default, will do an AMI lookup for the latest NAT instance image. If you have a specific AMI ID you want to use, pass a ``GenericLinuxImage``. For example:: ec2.NatProvider.instance({ instanceType: new ec2.InstanceType('t3.micro'), machineImage: new ec2.GenericLinuxImage({ 'us-east-2': 'ami-0f9c61b5a562a16af' }) }) Default: - Latest NAT instance image
91446
- :param security_group: Security Group for NAT instances. Default: - A new security group will be created
91628
+ :param security_group: (deprecated) Security Group for NAT instances. Default: - A new security group will be created
91629
+ :param user_data: Custom user data to run on the NAT instances. Default: UserData.forLinux().addCommands(...NatInstanceProviderV2.DEFAULT_USER_DATA_COMMANDS); - Appropriate user data commands to initialize and configure the NAT instances
91447
91630
  '''
91448
91631
  props = NatInstanceProps(
91449
91632
  instance_type=instance_type,
@@ -91453,6 +91636,7 @@ class NatInstanceProviderV2(
91453
91636
  key_pair=key_pair,
91454
91637
  machine_image=machine_image,
91455
91638
  security_group=security_group,
91639
+ user_data=user_data,
91456
91640
  )
91457
91641
 
91458
91642
  jsii.create(self.__class__, self, [props])
@@ -91492,6 +91676,15 @@ class NatInstanceProviderV2(
91492
91676
  check_type(argname="argument subnet", value=subnet, expected_type=type_hints["subnet"])
91493
91677
  return typing.cast(None, jsii.invoke(self, "configureSubnet", [subnet]))
91494
91678
 
91679
+ @jsii.python.classproperty
91680
+ @jsii.member(jsii_name="DEFAULT_USER_DATA_COMMANDS")
91681
+ def DEFAULT_USER_DATA_COMMANDS(cls) -> typing.List[builtins.str]:
91682
+ '''Amazon Linux 2023 NAT instance user data commands Enable iptables on the instance, enable persistent IP forwarding, configure NAT on instance.
91683
+
91684
+ :see: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html#create-nat-ami
91685
+ '''
91686
+ return typing.cast(typing.List[builtins.str], jsii.sget(cls, "DEFAULT_USER_DATA_COMMANDS"))
91687
+
91495
91688
  @builtins.property
91496
91689
  @jsii.member(jsii_name="configuredGateways")
91497
91690
  def configured_gateways(self) -> typing.List[GatewayConfig]:
@@ -91504,6 +91697,12 @@ class NatInstanceProviderV2(
91504
91697
  '''Manage the Security Groups associated with the NAT instances.'''
91505
91698
  return typing.cast(Connections, jsii.get(self, "connections"))
91506
91699
 
91700
+ @builtins.property
91701
+ @jsii.member(jsii_name="gatewayInstances")
91702
+ def gateway_instances(self) -> typing.List[Instance]:
91703
+ '''Array of gateway instances spawned by the provider after internal configuration.'''
91704
+ return typing.cast(typing.List[Instance], jsii.get(self, "gatewayInstances"))
91705
+
91507
91706
  @builtins.property
91508
91707
  @jsii.member(jsii_name="securityGroup")
91509
91708
  def security_group(self) -> ISecurityGroup:
@@ -94699,6 +94898,7 @@ def _typecheckingstub__16b41182e007e05b84fd0c97afc1e26001e78a56de2eb5b10c9f809de
94699
94898
  bgp_asn: jsii.Number,
94700
94899
  ip_address: builtins.str,
94701
94900
  type: builtins.str,
94901
+ certificate_arn: typing.Optional[builtins.str] = None,
94702
94902
  device_name: typing.Optional[builtins.str] = None,
94703
94903
  tags: typing.Optional[typing.Sequence[typing.Union[_CfnTag_f6864754, typing.Dict[builtins.str, typing.Any]]]] = None,
94704
94904
  ) -> None:
@@ -94735,6 +94935,12 @@ def _typecheckingstub__ae973d5ca9904c069d03cbf10a1e3fdf7736cc00ca43663eb07598f97
94735
94935
  """Type checking stubs"""
94736
94936
  pass
94737
94937
 
94938
+ def _typecheckingstub__4a4b900e840c5be3a2b16a5177f91335cf813daeca359e549a639cb05a03ac63(
94939
+ value: typing.Optional[builtins.str],
94940
+ ) -> None:
94941
+ """Type checking stubs"""
94942
+ pass
94943
+
94738
94944
  def _typecheckingstub__71d74664cf79e34328f5f6958fdd674c45b2780c9910dd252b7c5e9caba963f0(
94739
94945
  value: typing.Optional[builtins.str],
94740
94946
  ) -> None:
@@ -94752,6 +94958,7 @@ def _typecheckingstub__b0ef9a2e3e2b6937b21db500a1cd795126e924d9b920931a413ecdb66
94752
94958
  bgp_asn: jsii.Number,
94753
94959
  ip_address: builtins.str,
94754
94960
  type: builtins.str,
94961
+ certificate_arn: typing.Optional[builtins.str] = None,
94755
94962
  device_name: typing.Optional[builtins.str] = None,
94756
94963
  tags: typing.Optional[typing.Sequence[typing.Union[_CfnTag_f6864754, typing.Dict[builtins.str, typing.Any]]]] = None,
94757
94964
  ) -> None:
@@ -97121,7 +97328,6 @@ def _typecheckingstub__da6f057643821e4198778db605300559763cd1d337144d841e7dd3934
97121
97328
  def _typecheckingstub__62e0d77a7fa9500aab5a08e932dc82213f11e05b31cf56f4654431c48342979e(
97122
97329
  *,
97123
97330
  auto_recovery: typing.Optional[builtins.str] = None,
97124
- reboot_migration: typing.Optional[builtins.str] = None,
97125
97331
  ) -> None:
97126
97332
  """Type checking stubs"""
97127
97333
  pass
@@ -99031,7 +99237,6 @@ def _typecheckingstub__f7f9c3e8bd9fe395c2fb15fd9d38e6ef1ebca888c954597574840d202
99031
99237
  destination_prefix_list_id: typing.Optional[builtins.str] = None,
99032
99238
  destination_security_group_id: typing.Optional[builtins.str] = None,
99033
99239
  from_port: typing.Optional[jsii.Number] = None,
99034
- source_security_group_id: typing.Optional[builtins.str] = None,
99035
99240
  to_port: typing.Optional[jsii.Number] = None,
99036
99241
  ) -> None:
99037
99242
  """Type checking stubs"""
@@ -104109,6 +104314,7 @@ def _typecheckingstub__d7c7c717447859e1ccc181bc97f7752cc3f7fa7afaee4c3a4266eeac3
104109
104314
  key_pair: typing.Optional[IKeyPair] = None,
104110
104315
  machine_image: typing.Optional[IMachineImage] = None,
104111
104316
  security_group: typing.Optional[ISecurityGroup] = None,
104317
+ user_data: typing.Optional[UserData] = None,
104112
104318
  ) -> None:
104113
104319
  """Type checking stubs"""
104114
104320
  pass