aws-cdk-lib 2.200.2__py3-none-any.whl → 2.201.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 (53) hide show
  1. aws_cdk/__init__.py +105 -13
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.200.2.jsii.tgz → aws-cdk-lib@2.201.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_amazonmq/__init__.py +2 -3
  5. aws_cdk/aws_amplify/__init__.py +3 -3
  6. aws_cdk/aws_apigateway/__init__.py +21 -17
  7. aws_cdk/aws_apigatewayv2/__init__.py +87 -45
  8. aws_cdk/aws_appconfig/__init__.py +38 -1
  9. aws_cdk/aws_appsync/__init__.py +10 -10
  10. aws_cdk/aws_athena/__init__.py +226 -0
  11. aws_cdk/aws_autoscaling/__init__.py +38 -37
  12. aws_cdk/aws_bedrock/__init__.py +5108 -1571
  13. aws_cdk/aws_cloudfront/__init__.py +8 -0
  14. aws_cdk/aws_cloudtrail/__init__.py +178 -0
  15. aws_cdk/aws_cloudwatch/__init__.py +7 -3
  16. aws_cdk/aws_codepipeline_actions/__init__.py +746 -0
  17. aws_cdk/aws_connect/__init__.py +5 -5
  18. aws_cdk/aws_customerprofiles/__init__.py +377 -8
  19. aws_cdk/aws_datasync/__init__.py +189 -160
  20. aws_cdk/aws_datazone/__init__.py +512 -170
  21. aws_cdk/aws_deadline/__init__.py +32 -4
  22. aws_cdk/aws_dsql/__init__.py +150 -10
  23. aws_cdk/aws_ec2/__init__.py +793 -56
  24. aws_cdk/aws_ecs/__init__.py +94 -11
  25. aws_cdk/aws_efs/__init__.py +92 -12
  26. aws_cdk/aws_eks/__init__.py +166 -19
  27. aws_cdk/aws_elasticloadbalancingv2/__init__.py +2 -2
  28. aws_cdk/aws_emr/__init__.py +10 -4
  29. aws_cdk/aws_entityresolution/__init__.py +25 -10
  30. aws_cdk/aws_evs/__init__.py +2204 -0
  31. aws_cdk/aws_fsx/__init__.py +7 -7
  32. aws_cdk/aws_lambda/__init__.py +409 -32
  33. aws_cdk/aws_lightsail/__init__.py +17 -13
  34. aws_cdk/aws_logs/__init__.py +1 -0
  35. aws_cdk/aws_networkfirewall/__init__.py +562 -0
  36. aws_cdk/aws_opensearchservice/__init__.py +3 -3
  37. aws_cdk/aws_opsworkscm/__init__.py +9 -43
  38. aws_cdk/aws_rds/__init__.py +284 -87
  39. aws_cdk/aws_s3/__init__.py +23 -15
  40. aws_cdk/aws_sagemaker/__init__.py +223 -3
  41. aws_cdk/aws_securityhub/__init__.py +18 -34
  42. aws_cdk/aws_ssm/__init__.py +83 -1
  43. aws_cdk/aws_stepfunctions/__init__.py +235 -45
  44. aws_cdk/aws_synthetics/__init__.py +74 -0
  45. aws_cdk/aws_transfer/__init__.py +3 -3
  46. aws_cdk/aws_verifiedpermissions/__init__.py +17 -6
  47. aws_cdk/aws_wafv2/__init__.py +39 -2
  48. {aws_cdk_lib-2.200.2.dist-info → aws_cdk_lib-2.201.0.dist-info}/METADATA +2 -2
  49. {aws_cdk_lib-2.200.2.dist-info → aws_cdk_lib-2.201.0.dist-info}/RECORD +53 -52
  50. {aws_cdk_lib-2.200.2.dist-info → aws_cdk_lib-2.201.0.dist-info}/LICENSE +0 -0
  51. {aws_cdk_lib-2.200.2.dist-info → aws_cdk_lib-2.201.0.dist-info}/NOTICE +0 -0
  52. {aws_cdk_lib-2.200.2.dist-info → aws_cdk_lib-2.201.0.dist-info}/WHEEL +0 -0
  53. {aws_cdk_lib-2.200.2.dist-info → aws_cdk_lib-2.201.0.dist-info}/top_level.txt +0 -0
@@ -929,7 +929,10 @@ If the security group ID is known and configuration details are unknown, use met
929
929
  sg = ec2.SecurityGroup.from_lookup_by_id(self, "SecurityGroupLookup", "sg-1234")
930
930
  ```
931
931
 
932
- The result of `SecurityGroup.fromLookupByName` and `SecurityGroup.fromLookupById` operations will be written to a file called `cdk.context.json`. You must commit this file to source control so that the lookup values are available in non-privileged environments such as CI build steps, and to ensure your template builds are repeatable.
932
+ The result of `SecurityGroup.fromLookupByName` and `SecurityGroup.fromLookupById` operations will be
933
+ written to a file called `cdk.context.json`.
934
+ You must commit this file to source control so that the lookup values are available in non-privileged
935
+ environments such as CI build steps, and to ensure your template builds are repeatable.
933
936
 
934
937
  ### Cross Stack Connections
935
938
 
@@ -1054,6 +1057,13 @@ generic_windows = ec2.MachineImage.generic_windows({
1054
1057
  > [Runtime Context](https://docs.aws.amazon.com/cdk/latest/guide/context.html) in the CDK
1055
1058
  > developer guide.
1056
1059
  >
1060
+ > To customize the cache key, use the `additionalCacheKey` parameter.
1061
+ > This allows you to have multiple lookups with the same parameters
1062
+ > cache their values separately. This can be useful if you want to
1063
+ > scope the context variable to a construct (ie, using `additionalCacheKey: this.node.path`),
1064
+ > so that if the value in the cache needs to be updated, it does not need to be updated
1065
+ > for all constructs at the same time.
1066
+ >
1057
1067
  > `MachineImage.genericLinux()`, `MachineImage.genericWindows()` will use `CfnMapping` in
1058
1068
  > an agnostic stack.
1059
1069
 
@@ -1479,6 +1489,30 @@ ec2.Instance(self, "LatestAl2023",
1479
1489
  # context cache is turned on by default
1480
1490
  machine_image=ec2.AmazonLinux2023ImageSsmParameter()
1481
1491
  )
1492
+
1493
+ # or
1494
+ ec2.Instance(self, "LatestAl2023",
1495
+ vpc=vpc,
1496
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.C7G, ec2.InstanceSize.LARGE),
1497
+ machine_image=ec2.MachineImage.latest_amazon_linux2023(
1498
+ cached_in_context=True,
1499
+ # creates a distinct context variable for this image, instead of resolving to the same
1500
+ # value anywhere this lookup is done in your app
1501
+ additional_cache_key=self.node.path
1502
+ )
1503
+ )
1504
+
1505
+ # or
1506
+ ec2.Instance(self, "LatestAl2023",
1507
+ vpc=vpc,
1508
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.C7G, ec2.InstanceSize.LARGE),
1509
+ # context cache is turned on by default
1510
+ machine_image=ec2.AmazonLinux2023ImageSsmParameter(
1511
+ # creates a distinct context variable for this image, instead of resolving to the same
1512
+ # value anywhere this lookup is done in your app
1513
+ additional_cache_key=self.node.path
1514
+ )
1515
+ )
1482
1516
  ```
1483
1517
 
1484
1518
  #### Kernel Versions
@@ -1958,6 +1992,25 @@ ec2.Volume(self, "Volume",
1958
1992
  )
1959
1993
  ```
1960
1994
 
1995
+ #### Volume initialization rate
1996
+
1997
+ When creating an EBS volume from a snapshot, you can specify the [volume initialization rate](https://docs.aws.amazon.com/ebs/latest/userguide/initalize-volume.html#volume-initialization-rate) at which the snapshot blocks are downloaded from Amazon S3 to the volume.
1998
+ Specifying a volume initialization rate ensures that the volume is initialized at a predictable and consistent rate after creation.
1999
+
2000
+ ```python
2001
+ ec2.Volume(self, "Volume",
2002
+ availability_zone="us-east-1a",
2003
+ size=Size.gibibytes(500),
2004
+ snapshot_id="snap-1234567890abcdef0",
2005
+ volume_initialization_rate=Size.mebibytes(250)
2006
+ )
2007
+ ```
2008
+
2009
+ The `volumeInitializationRate` must be:
2010
+
2011
+ * Between 100 and 300 MiB/s
2012
+ * Only specified when creating a volume from a snapshot
2013
+
1961
2014
  ### Configuring Instance Metadata Service (IMDS)
1962
2015
 
1963
2016
  #### Toggling IMDSv1
@@ -4108,6 +4161,7 @@ class AmazonLinuxGeneration(enum.Enum):
4108
4161
  jsii_type="aws-cdk-lib.aws_ec2.AmazonLinuxImageProps",
4109
4162
  jsii_struct_bases=[],
4110
4163
  name_mapping={
4164
+ "additional_cache_key": "additionalCacheKey",
4111
4165
  "cached_in_context": "cachedInContext",
4112
4166
  "cpu_type": "cpuType",
4113
4167
  "edition": "edition",
@@ -4122,6 +4176,7 @@ class AmazonLinuxImageProps:
4122
4176
  def __init__(
4123
4177
  self,
4124
4178
  *,
4179
+ additional_cache_key: typing.Optional[builtins.str] = None,
4125
4180
  cached_in_context: typing.Optional[builtins.bool] = None,
4126
4181
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
4127
4182
  edition: typing.Optional[AmazonLinuxEdition] = None,
@@ -4133,6 +4188,7 @@ class AmazonLinuxImageProps:
4133
4188
  ) -> None:
4134
4189
  '''Amazon Linux image properties.
4135
4190
 
4191
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
4136
4192
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
4137
4193
  :param cpu_type: CPU Type. Default: X86_64
4138
4194
  :param edition: What edition of Amazon Linux to use. Default: Standard
@@ -4163,6 +4219,7 @@ class AmazonLinuxImageProps:
4163
4219
  '''
4164
4220
  if __debug__:
4165
4221
  type_hints = typing.get_type_hints(_typecheckingstub__dd95a518c06563a07debc9bf1ca51713b747cf64bded6f7cc81a28680d7ea9fc)
4222
+ check_type(argname="argument additional_cache_key", value=additional_cache_key, expected_type=type_hints["additional_cache_key"])
4166
4223
  check_type(argname="argument cached_in_context", value=cached_in_context, expected_type=type_hints["cached_in_context"])
4167
4224
  check_type(argname="argument cpu_type", value=cpu_type, expected_type=type_hints["cpu_type"])
4168
4225
  check_type(argname="argument edition", value=edition, expected_type=type_hints["edition"])
@@ -4172,6 +4229,8 @@ class AmazonLinuxImageProps:
4172
4229
  check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
4173
4230
  check_type(argname="argument virtualization", value=virtualization, expected_type=type_hints["virtualization"])
4174
4231
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4232
+ if additional_cache_key is not None:
4233
+ self._values["additional_cache_key"] = additional_cache_key
4175
4234
  if cached_in_context is not None:
4176
4235
  self._values["cached_in_context"] = cached_in_context
4177
4236
  if cpu_type is not None:
@@ -4189,6 +4248,15 @@ class AmazonLinuxImageProps:
4189
4248
  if virtualization is not None:
4190
4249
  self._values["virtualization"] = virtualization
4191
4250
 
4251
+ @builtins.property
4252
+ def additional_cache_key(self) -> typing.Optional[builtins.str]:
4253
+ '''Adds an additional discriminator to the ``cdk.context.json`` cache key.
4254
+
4255
+ :default: - no additional cache key
4256
+ '''
4257
+ result = self._values.get("additional_cache_key")
4258
+ return typing.cast(typing.Optional[builtins.str], result)
4259
+
4192
4260
  @builtins.property
4193
4261
  def cached_in_context(self) -> typing.Optional[builtins.bool]:
4194
4262
  '''Whether the AMI ID is cached to be stable between deployments.
@@ -4290,17 +4358,23 @@ class AmazonLinuxImageProps:
4290
4358
  @jsii.data_type(
4291
4359
  jsii_type="aws-cdk-lib.aws_ec2.AmazonLinuxImageSsmParameterBaseOptions",
4292
4360
  jsii_struct_bases=[],
4293
- name_mapping={"cached_in_context": "cachedInContext", "user_data": "userData"},
4361
+ name_mapping={
4362
+ "additional_cache_key": "additionalCacheKey",
4363
+ "cached_in_context": "cachedInContext",
4364
+ "user_data": "userData",
4365
+ },
4294
4366
  )
4295
4367
  class AmazonLinuxImageSsmParameterBaseOptions:
4296
4368
  def __init__(
4297
4369
  self,
4298
4370
  *,
4371
+ additional_cache_key: typing.Optional[builtins.str] = None,
4299
4372
  cached_in_context: typing.Optional[builtins.bool] = None,
4300
4373
  user_data: typing.Optional["UserData"] = None,
4301
4374
  ) -> None:
4302
4375
  '''Base options for amazon linux ssm parameters.
4303
4376
 
4377
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
4304
4378
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
4305
4379
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
4306
4380
 
@@ -4315,20 +4389,33 @@ class AmazonLinuxImageSsmParameterBaseOptions:
4315
4389
  # user_data: ec2.UserData
4316
4390
 
4317
4391
  amazon_linux_image_ssm_parameter_base_options = ec2.AmazonLinuxImageSsmParameterBaseOptions(
4392
+ additional_cache_key="additionalCacheKey",
4318
4393
  cached_in_context=False,
4319
4394
  user_data=user_data
4320
4395
  )
4321
4396
  '''
4322
4397
  if __debug__:
4323
4398
  type_hints = typing.get_type_hints(_typecheckingstub__08eb71b09afb1d361b3f043a5c2d7d4be91f84b114302afefc8a69963ee6333f)
4399
+ check_type(argname="argument additional_cache_key", value=additional_cache_key, expected_type=type_hints["additional_cache_key"])
4324
4400
  check_type(argname="argument cached_in_context", value=cached_in_context, expected_type=type_hints["cached_in_context"])
4325
4401
  check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
4326
4402
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4403
+ if additional_cache_key is not None:
4404
+ self._values["additional_cache_key"] = additional_cache_key
4327
4405
  if cached_in_context is not None:
4328
4406
  self._values["cached_in_context"] = cached_in_context
4329
4407
  if user_data is not None:
4330
4408
  self._values["user_data"] = user_data
4331
4409
 
4410
+ @builtins.property
4411
+ def additional_cache_key(self) -> typing.Optional[builtins.str]:
4412
+ '''Adds an additional discriminator to the ``cdk.context.json`` cache key.
4413
+
4414
+ :default: - no additional cache key
4415
+ '''
4416
+ result = self._values.get("additional_cache_key")
4417
+ return typing.cast(typing.Optional[builtins.str], result)
4418
+
4332
4419
  @builtins.property
4333
4420
  def cached_in_context(self) -> typing.Optional[builtins.bool]:
4334
4421
  '''Whether the AMI ID is cached to be stable between deployments.
@@ -4377,6 +4464,7 @@ class AmazonLinuxImageSsmParameterBaseOptions:
4377
4464
  jsii_type="aws-cdk-lib.aws_ec2.AmazonLinuxImageSsmParameterBaseProps",
4378
4465
  jsii_struct_bases=[AmazonLinuxImageSsmParameterBaseOptions],
4379
4466
  name_mapping={
4467
+ "additional_cache_key": "additionalCacheKey",
4380
4468
  "cached_in_context": "cachedInContext",
4381
4469
  "user_data": "userData",
4382
4470
  "parameter_name": "parameterName",
@@ -4386,12 +4474,14 @@ class AmazonLinuxImageSsmParameterBaseProps(AmazonLinuxImageSsmParameterBaseOpti
4386
4474
  def __init__(
4387
4475
  self,
4388
4476
  *,
4477
+ additional_cache_key: typing.Optional[builtins.str] = None,
4389
4478
  cached_in_context: typing.Optional[builtins.bool] = None,
4390
4479
  user_data: typing.Optional["UserData"] = None,
4391
4480
  parameter_name: builtins.str,
4392
4481
  ) -> None:
4393
4482
  '''Base properties for an Amazon Linux SSM Parameter.
4394
4483
 
4484
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
4395
4485
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
4396
4486
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
4397
4487
  :param parameter_name: The name of the SSM parameter that contains the AMI value.
@@ -4410,23 +4500,36 @@ class AmazonLinuxImageSsmParameterBaseProps(AmazonLinuxImageSsmParameterBaseOpti
4410
4500
  parameter_name="parameterName",
4411
4501
 
4412
4502
  # the properties below are optional
4503
+ additional_cache_key="additionalCacheKey",
4413
4504
  cached_in_context=False,
4414
4505
  user_data=user_data
4415
4506
  )
4416
4507
  '''
4417
4508
  if __debug__:
4418
4509
  type_hints = typing.get_type_hints(_typecheckingstub__78a32cfc14171e780d6e44d3e6a99faa6da50655ac09560f7b229b0c0c7383f1)
4510
+ check_type(argname="argument additional_cache_key", value=additional_cache_key, expected_type=type_hints["additional_cache_key"])
4419
4511
  check_type(argname="argument cached_in_context", value=cached_in_context, expected_type=type_hints["cached_in_context"])
4420
4512
  check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
4421
4513
  check_type(argname="argument parameter_name", value=parameter_name, expected_type=type_hints["parameter_name"])
4422
4514
  self._values: typing.Dict[builtins.str, typing.Any] = {
4423
4515
  "parameter_name": parameter_name,
4424
4516
  }
4517
+ if additional_cache_key is not None:
4518
+ self._values["additional_cache_key"] = additional_cache_key
4425
4519
  if cached_in_context is not None:
4426
4520
  self._values["cached_in_context"] = cached_in_context
4427
4521
  if user_data is not None:
4428
4522
  self._values["user_data"] = user_data
4429
4523
 
4524
+ @builtins.property
4525
+ def additional_cache_key(self) -> typing.Optional[builtins.str]:
4526
+ '''Adds an additional discriminator to the ``cdk.context.json`` cache key.
4527
+
4528
+ :default: - no additional cache key
4529
+ '''
4530
+ result = self._values.get("additional_cache_key")
4531
+ return typing.cast(typing.Optional[builtins.str], result)
4532
+
4430
4533
  @builtins.property
4431
4534
  def cached_in_context(self) -> typing.Optional[builtins.bool]:
4432
4535
  '''Whether the AMI ID is cached to be stable between deployments.
@@ -4482,6 +4585,7 @@ class AmazonLinuxImageSsmParameterBaseProps(AmazonLinuxImageSsmParameterBaseOpti
4482
4585
  jsii_type="aws-cdk-lib.aws_ec2.AmazonLinuxImageSsmParameterCommonOptions",
4483
4586
  jsii_struct_bases=[AmazonLinuxImageSsmParameterBaseOptions],
4484
4587
  name_mapping={
4588
+ "additional_cache_key": "additionalCacheKey",
4485
4589
  "cached_in_context": "cachedInContext",
4486
4590
  "user_data": "userData",
4487
4591
  "cpu_type": "cpuType",
@@ -4494,6 +4598,7 @@ class AmazonLinuxImageSsmParameterCommonOptions(
4494
4598
  def __init__(
4495
4599
  self,
4496
4600
  *,
4601
+ additional_cache_key: typing.Optional[builtins.str] = None,
4497
4602
  cached_in_context: typing.Optional[builtins.bool] = None,
4498
4603
  user_data: typing.Optional["UserData"] = None,
4499
4604
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
@@ -4501,6 +4606,7 @@ class AmazonLinuxImageSsmParameterCommonOptions(
4501
4606
  ) -> None:
4502
4607
  '''Common options across all generations.
4503
4608
 
4609
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
4504
4610
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
4505
4611
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
4506
4612
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
@@ -4517,6 +4623,7 @@ class AmazonLinuxImageSsmParameterCommonOptions(
4517
4623
  # user_data: ec2.UserData
4518
4624
 
4519
4625
  amazon_linux_image_ssm_parameter_common_options = ec2.AmazonLinuxImageSsmParameterCommonOptions(
4626
+ additional_cache_key="additionalCacheKey",
4520
4627
  cached_in_context=False,
4521
4628
  cpu_type=ec2.AmazonLinuxCpuType.ARM_64,
4522
4629
  edition=ec2.AmazonLinuxEdition.STANDARD,
@@ -4525,11 +4632,14 @@ class AmazonLinuxImageSsmParameterCommonOptions(
4525
4632
  '''
4526
4633
  if __debug__:
4527
4634
  type_hints = typing.get_type_hints(_typecheckingstub__8fcdd01a6ab45c77447fba339b5a9358c3ab40c4833c1f86c68009a6a3bb1422)
4635
+ check_type(argname="argument additional_cache_key", value=additional_cache_key, expected_type=type_hints["additional_cache_key"])
4528
4636
  check_type(argname="argument cached_in_context", value=cached_in_context, expected_type=type_hints["cached_in_context"])
4529
4637
  check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
4530
4638
  check_type(argname="argument cpu_type", value=cpu_type, expected_type=type_hints["cpu_type"])
4531
4639
  check_type(argname="argument edition", value=edition, expected_type=type_hints["edition"])
4532
4640
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4641
+ if additional_cache_key is not None:
4642
+ self._values["additional_cache_key"] = additional_cache_key
4533
4643
  if cached_in_context is not None:
4534
4644
  self._values["cached_in_context"] = cached_in_context
4535
4645
  if user_data is not None:
@@ -4539,6 +4649,15 @@ class AmazonLinuxImageSsmParameterCommonOptions(
4539
4649
  if edition is not None:
4540
4650
  self._values["edition"] = edition
4541
4651
 
4652
+ @builtins.property
4653
+ def additional_cache_key(self) -> typing.Optional[builtins.str]:
4654
+ '''Adds an additional discriminator to the ``cdk.context.json`` cache key.
4655
+
4656
+ :default: - no additional cache key
4657
+ '''
4658
+ result = self._values.get("additional_cache_key")
4659
+ return typing.cast(typing.Optional[builtins.str], result)
4660
+
4542
4661
  @builtins.property
4543
4662
  def cached_in_context(self) -> typing.Optional[builtins.bool]:
4544
4663
  '''Whether the AMI ID is cached to be stable between deployments.
@@ -11030,6 +11149,20 @@ class CfnEC2Fleet(
11030
11149
  ),
11031
11150
  overrides=[ec2.CfnEC2Fleet.FleetLaunchTemplateOverridesRequestProperty(
11032
11151
  availability_zone="availabilityZone",
11152
+ block_device_mappings=[ec2.CfnEC2Fleet.BlockDeviceMappingProperty(
11153
+ device_name="deviceName",
11154
+ ebs=ec2.CfnEC2Fleet.EbsBlockDeviceProperty(
11155
+ delete_on_termination=False,
11156
+ encrypted=False,
11157
+ iops=123,
11158
+ kms_key_id="kmsKeyId",
11159
+ snapshot_id="snapshotId",
11160
+ volume_size=123,
11161
+ volume_type="volumeType"
11162
+ ),
11163
+ no_device="noDevice",
11164
+ virtual_name="virtualName"
11165
+ )],
11033
11166
  instance_requirements=ec2.CfnEC2Fleet.InstanceRequirementsRequestProperty(
11034
11167
  accelerator_count=ec2.CfnEC2Fleet.AcceleratorCountRequestProperty(
11035
11168
  max=123,
@@ -11750,6 +11883,129 @@ class CfnEC2Fleet(
11750
11883
  k + "=" + repr(v) for k, v in self._values.items()
11751
11884
  )
11752
11885
 
11886
+ @jsii.data_type(
11887
+ jsii_type="aws-cdk-lib.aws_ec2.CfnEC2Fleet.BlockDeviceMappingProperty",
11888
+ jsii_struct_bases=[],
11889
+ name_mapping={
11890
+ "device_name": "deviceName",
11891
+ "ebs": "ebs",
11892
+ "no_device": "noDevice",
11893
+ "virtual_name": "virtualName",
11894
+ },
11895
+ )
11896
+ class BlockDeviceMappingProperty:
11897
+ def __init__(
11898
+ self,
11899
+ *,
11900
+ device_name: typing.Optional[builtins.str] = None,
11901
+ ebs: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnEC2Fleet.EbsBlockDeviceProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
11902
+ no_device: typing.Optional[builtins.str] = None,
11903
+ virtual_name: typing.Optional[builtins.str] = None,
11904
+ ) -> None:
11905
+ '''Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.
11906
+
11907
+ :param device_name: The device name (for example, ``/dev/sdh`` or ``xvdh`` ).
11908
+ :param ebs: Parameters used to automatically set up EBS volumes when the instance is launched.
11909
+ :param no_device: To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.
11910
+ :param virtual_name: The virtual device name ( ``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` . The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume. NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect. Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
11911
+
11912
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-blockdevicemapping.html
11913
+ :exampleMetadata: fixture=_generated
11914
+
11915
+ Example::
11916
+
11917
+ # The code below shows an example of how to instantiate this type.
11918
+ # The values are placeholders you should change.
11919
+ from aws_cdk import aws_ec2 as ec2
11920
+
11921
+ block_device_mapping_property = ec2.CfnEC2Fleet.BlockDeviceMappingProperty(
11922
+ device_name="deviceName",
11923
+ ebs=ec2.CfnEC2Fleet.EbsBlockDeviceProperty(
11924
+ delete_on_termination=False,
11925
+ encrypted=False,
11926
+ iops=123,
11927
+ kms_key_id="kmsKeyId",
11928
+ snapshot_id="snapshotId",
11929
+ volume_size=123,
11930
+ volume_type="volumeType"
11931
+ ),
11932
+ no_device="noDevice",
11933
+ virtual_name="virtualName"
11934
+ )
11935
+ '''
11936
+ if __debug__:
11937
+ type_hints = typing.get_type_hints(_typecheckingstub__2ac1bca7bdb78c6a00383adcdf8e49157dfa7db32559bd0d8033ff9f9ea819c7)
11938
+ check_type(argname="argument device_name", value=device_name, expected_type=type_hints["device_name"])
11939
+ check_type(argname="argument ebs", value=ebs, expected_type=type_hints["ebs"])
11940
+ check_type(argname="argument no_device", value=no_device, expected_type=type_hints["no_device"])
11941
+ check_type(argname="argument virtual_name", value=virtual_name, expected_type=type_hints["virtual_name"])
11942
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
11943
+ if device_name is not None:
11944
+ self._values["device_name"] = device_name
11945
+ if ebs is not None:
11946
+ self._values["ebs"] = ebs
11947
+ if no_device is not None:
11948
+ self._values["no_device"] = no_device
11949
+ if virtual_name is not None:
11950
+ self._values["virtual_name"] = virtual_name
11951
+
11952
+ @builtins.property
11953
+ def device_name(self) -> typing.Optional[builtins.str]:
11954
+ '''The device name (for example, ``/dev/sdh`` or ``xvdh`` ).
11955
+
11956
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-blockdevicemapping.html#cfn-ec2-ec2fleet-blockdevicemapping-devicename
11957
+ '''
11958
+ result = self._values.get("device_name")
11959
+ return typing.cast(typing.Optional[builtins.str], result)
11960
+
11961
+ @builtins.property
11962
+ def ebs(
11963
+ self,
11964
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEC2Fleet.EbsBlockDeviceProperty"]]:
11965
+ '''Parameters used to automatically set up EBS volumes when the instance is launched.
11966
+
11967
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-blockdevicemapping.html#cfn-ec2-ec2fleet-blockdevicemapping-ebs
11968
+ '''
11969
+ result = self._values.get("ebs")
11970
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEC2Fleet.EbsBlockDeviceProperty"]], result)
11971
+
11972
+ @builtins.property
11973
+ def no_device(self) -> typing.Optional[builtins.str]:
11974
+ '''To omit the device from the block device mapping, specify an empty string.
11975
+
11976
+ When this property is specified, the device is removed from the block device mapping regardless of the assigned value.
11977
+
11978
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-blockdevicemapping.html#cfn-ec2-ec2fleet-blockdevicemapping-nodevice
11979
+ '''
11980
+ result = self._values.get("no_device")
11981
+ return typing.cast(typing.Optional[builtins.str], result)
11982
+
11983
+ @builtins.property
11984
+ def virtual_name(self) -> typing.Optional[builtins.str]:
11985
+ '''The virtual device name ( ``ephemeral`` N).
11986
+
11987
+ Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` . The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
11988
+
11989
+ NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.
11990
+
11991
+ Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
11992
+
11993
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-blockdevicemapping.html#cfn-ec2-ec2fleet-blockdevicemapping-virtualname
11994
+ '''
11995
+ result = self._values.get("virtual_name")
11996
+ return typing.cast(typing.Optional[builtins.str], result)
11997
+
11998
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
11999
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
12000
+
12001
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
12002
+ return not (rhs == self)
12003
+
12004
+ def __repr__(self) -> str:
12005
+ return "BlockDeviceMappingProperty(%s)" % ", ".join(
12006
+ k + "=" + repr(v) for k, v in self._values.items()
12007
+ )
12008
+
11753
12009
  @jsii.data_type(
11754
12010
  jsii_type="aws-cdk-lib.aws_ec2.CfnEC2Fleet.CapacityRebalanceProperty",
11755
12011
  jsii_struct_bases=[],
@@ -11964,6 +12220,206 @@ class CfnEC2Fleet(
11964
12220
  k + "=" + repr(v) for k, v in self._values.items()
11965
12221
  )
11966
12222
 
12223
+ @jsii.data_type(
12224
+ jsii_type="aws-cdk-lib.aws_ec2.CfnEC2Fleet.EbsBlockDeviceProperty",
12225
+ jsii_struct_bases=[],
12226
+ name_mapping={
12227
+ "delete_on_termination": "deleteOnTermination",
12228
+ "encrypted": "encrypted",
12229
+ "iops": "iops",
12230
+ "kms_key_id": "kmsKeyId",
12231
+ "snapshot_id": "snapshotId",
12232
+ "volume_size": "volumeSize",
12233
+ "volume_type": "volumeType",
12234
+ },
12235
+ )
12236
+ class EbsBlockDeviceProperty:
12237
+ def __init__(
12238
+ self,
12239
+ *,
12240
+ delete_on_termination: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
12241
+ encrypted: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
12242
+ iops: typing.Optional[jsii.Number] = None,
12243
+ kms_key_id: typing.Optional[builtins.str] = None,
12244
+ snapshot_id: typing.Optional[builtins.str] = None,
12245
+ volume_size: typing.Optional[jsii.Number] = None,
12246
+ volume_type: typing.Optional[builtins.str] = None,
12247
+ ) -> None:
12248
+ '''Describes a block device for an EBS volume.
12249
+
12250
+ :param delete_on_termination: Indicates whether the EBS volume is deleted on instance termination. For more information, see `Preserving Amazon EBS volumes on instance termination <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#preserving-volumes-on-termination>`_ in the *Amazon EC2 User Guide* .
12251
+ :param encrypted: Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to ``true`` depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see `Amazon EBS encryption <https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption.html#encryption-parameters>`_ in the *Amazon EBS User Guide* . In no case can you remove encryption from an encrypted volume. Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see `Supported instance types <https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption-requirements.html#ebs-encryption_supported_instances>`_ . This parameter is not returned by ``DescribeImageAttribute`` . For ``CreateImage`` and ``RegisterImage`` , whether you can include this parameter, and the allowed values differ depending on the type of block device mapping you are creating. - If you are creating a block device mapping for a *new (empty) volume* , you can include this parameter, and specify either ``true`` for an encrypted volume, or ``false`` for an unencrypted volume. If you omit this parameter, it defaults to ``false`` (unencrypted). - If you are creating a block device mapping from an *existing encrypted or unencrypted snapshot* , you must omit this parameter. If you include this parameter, the request will fail, regardless of the value that you specify. - If you are creating a block device mapping from an *existing unencrypted volume* , you can include this parameter, but you must specify ``false`` . If you specify ``true`` , the request will fail. In this case, we recommend that you omit the parameter. - If you are creating a block device mapping from an *existing encrypted volume* , you can include this parameter, and specify either ``true`` or ``false`` . However, if you specify ``false`` , the parameter is ignored and the block device mapping is always encrypted. In this case, we recommend that you omit the parameter.
12252
+ :param iops: The number of I/O operations per second (IOPS). For ``gp3`` , ``io1`` , and ``io2`` volumes, this represents the number of IOPS that are provisioned for the volume. For ``gp2`` volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. The following are the supported values for each volume type: - ``gp3`` : 3,000 - 16,000 IOPS - ``io1`` : 100 - 64,000 IOPS - ``io2`` : 100 - 256,000 IOPS For ``io2`` volumes, you can achieve up to 256,000 IOPS on `instances built on the Nitro System <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances>`_ . On other instances, you can achieve performance up to 32,000 IOPS. This parameter is required for ``io1`` and ``io2`` volumes. The default for ``gp3`` volumes is 3,000 IOPS.
12253
+ :param kms_key_id: Identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed KMS key to use for EBS encryption. This parameter is only supported on ``BlockDeviceMapping`` objects called by `RunInstances <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html>`_ , `RequestSpotFleet <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html>`_ , and `RequestSpotInstances <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html>`_ .
12254
+ :param snapshot_id: The ID of the snapshot.
12255
+ :param volume_size: The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size. The following are the supported sizes for each volume type: - ``gp2`` and ``gp3`` : 1 - 16,384 GiB - ``io1`` : 4 - 16,384 GiB - ``io2`` : 4 - 65,536 GiB - ``st1`` and ``sc1`` : 125 - 16,384 GiB - ``standard`` : 1 - 1024 GiB
12256
+ :param volume_type: The volume type. For more information, see `Amazon EBS volume types <https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html>`_ in the *Amazon EBS User Guide* .
12257
+
12258
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-ebsblockdevice.html
12259
+ :exampleMetadata: fixture=_generated
12260
+
12261
+ Example::
12262
+
12263
+ # The code below shows an example of how to instantiate this type.
12264
+ # The values are placeholders you should change.
12265
+ from aws_cdk import aws_ec2 as ec2
12266
+
12267
+ ebs_block_device_property = ec2.CfnEC2Fleet.EbsBlockDeviceProperty(
12268
+ delete_on_termination=False,
12269
+ encrypted=False,
12270
+ iops=123,
12271
+ kms_key_id="kmsKeyId",
12272
+ snapshot_id="snapshotId",
12273
+ volume_size=123,
12274
+ volume_type="volumeType"
12275
+ )
12276
+ '''
12277
+ if __debug__:
12278
+ type_hints = typing.get_type_hints(_typecheckingstub__98937edeb55103aa31b4f310bc1c5cdf31ffd54c5c2d451314118a9d43196bbd)
12279
+ check_type(argname="argument delete_on_termination", value=delete_on_termination, expected_type=type_hints["delete_on_termination"])
12280
+ check_type(argname="argument encrypted", value=encrypted, expected_type=type_hints["encrypted"])
12281
+ check_type(argname="argument iops", value=iops, expected_type=type_hints["iops"])
12282
+ check_type(argname="argument kms_key_id", value=kms_key_id, expected_type=type_hints["kms_key_id"])
12283
+ check_type(argname="argument snapshot_id", value=snapshot_id, expected_type=type_hints["snapshot_id"])
12284
+ check_type(argname="argument volume_size", value=volume_size, expected_type=type_hints["volume_size"])
12285
+ check_type(argname="argument volume_type", value=volume_type, expected_type=type_hints["volume_type"])
12286
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
12287
+ if delete_on_termination is not None:
12288
+ self._values["delete_on_termination"] = delete_on_termination
12289
+ if encrypted is not None:
12290
+ self._values["encrypted"] = encrypted
12291
+ if iops is not None:
12292
+ self._values["iops"] = iops
12293
+ if kms_key_id is not None:
12294
+ self._values["kms_key_id"] = kms_key_id
12295
+ if snapshot_id is not None:
12296
+ self._values["snapshot_id"] = snapshot_id
12297
+ if volume_size is not None:
12298
+ self._values["volume_size"] = volume_size
12299
+ if volume_type is not None:
12300
+ self._values["volume_type"] = volume_type
12301
+
12302
+ @builtins.property
12303
+ def delete_on_termination(
12304
+ self,
12305
+ ) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
12306
+ '''Indicates whether the EBS volume is deleted on instance termination.
12307
+
12308
+ For more information, see `Preserving Amazon EBS volumes on instance termination <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#preserving-volumes-on-termination>`_ in the *Amazon EC2 User Guide* .
12309
+
12310
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-ebsblockdevice.html#cfn-ec2-ec2fleet-ebsblockdevice-deleteontermination
12311
+ '''
12312
+ result = self._values.get("delete_on_termination")
12313
+ return typing.cast(typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]], result)
12314
+
12315
+ @builtins.property
12316
+ def encrypted(
12317
+ self,
12318
+ ) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
12319
+ '''Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot.
12320
+
12321
+ The effect of setting the encryption state to ``true`` depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see `Amazon EBS encryption <https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption.html#encryption-parameters>`_ in the *Amazon EBS User Guide* .
12322
+
12323
+ In no case can you remove encryption from an encrypted volume.
12324
+
12325
+ Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see `Supported instance types <https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption-requirements.html#ebs-encryption_supported_instances>`_ .
12326
+
12327
+ This parameter is not returned by ``DescribeImageAttribute`` .
12328
+
12329
+ For ``CreateImage`` and ``RegisterImage`` , whether you can include this parameter, and the allowed values differ depending on the type of block device mapping you are creating.
12330
+
12331
+ - If you are creating a block device mapping for a *new (empty) volume* , you can include this parameter, and specify either ``true`` for an encrypted volume, or ``false`` for an unencrypted volume. If you omit this parameter, it defaults to ``false`` (unencrypted).
12332
+ - If you are creating a block device mapping from an *existing encrypted or unencrypted snapshot* , you must omit this parameter. If you include this parameter, the request will fail, regardless of the value that you specify.
12333
+ - If you are creating a block device mapping from an *existing unencrypted volume* , you can include this parameter, but you must specify ``false`` . If you specify ``true`` , the request will fail. In this case, we recommend that you omit the parameter.
12334
+ - If you are creating a block device mapping from an *existing encrypted volume* , you can include this parameter, and specify either ``true`` or ``false`` . However, if you specify ``false`` , the parameter is ignored and the block device mapping is always encrypted. In this case, we recommend that you omit the parameter.
12335
+
12336
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-ebsblockdevice.html#cfn-ec2-ec2fleet-ebsblockdevice-encrypted
12337
+ '''
12338
+ result = self._values.get("encrypted")
12339
+ return typing.cast(typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]], result)
12340
+
12341
+ @builtins.property
12342
+ def iops(self) -> typing.Optional[jsii.Number]:
12343
+ '''The number of I/O operations per second (IOPS).
12344
+
12345
+ For ``gp3`` , ``io1`` , and ``io2`` volumes, this represents the number of IOPS that are provisioned for the volume. For ``gp2`` volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.
12346
+
12347
+ The following are the supported values for each volume type:
12348
+
12349
+ - ``gp3`` : 3,000 - 16,000 IOPS
12350
+ - ``io1`` : 100 - 64,000 IOPS
12351
+ - ``io2`` : 100 - 256,000 IOPS
12352
+
12353
+ For ``io2`` volumes, you can achieve up to 256,000 IOPS on `instances built on the Nitro System <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances>`_ . On other instances, you can achieve performance up to 32,000 IOPS.
12354
+
12355
+ This parameter is required for ``io1`` and ``io2`` volumes. The default for ``gp3`` volumes is 3,000 IOPS.
12356
+
12357
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-ebsblockdevice.html#cfn-ec2-ec2fleet-ebsblockdevice-iops
12358
+ '''
12359
+ result = self._values.get("iops")
12360
+ return typing.cast(typing.Optional[jsii.Number], result)
12361
+
12362
+ @builtins.property
12363
+ def kms_key_id(self) -> typing.Optional[builtins.str]:
12364
+ '''Identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed KMS key to use for EBS encryption.
12365
+
12366
+ This parameter is only supported on ``BlockDeviceMapping`` objects called by `RunInstances <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html>`_ , `RequestSpotFleet <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html>`_ , and `RequestSpotInstances <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html>`_ .
12367
+
12368
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-ebsblockdevice.html#cfn-ec2-ec2fleet-ebsblockdevice-kmskeyid
12369
+ '''
12370
+ result = self._values.get("kms_key_id")
12371
+ return typing.cast(typing.Optional[builtins.str], result)
12372
+
12373
+ @builtins.property
12374
+ def snapshot_id(self) -> typing.Optional[builtins.str]:
12375
+ '''The ID of the snapshot.
12376
+
12377
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-ebsblockdevice.html#cfn-ec2-ec2fleet-ebsblockdevice-snapshotid
12378
+ '''
12379
+ result = self._values.get("snapshot_id")
12380
+ return typing.cast(typing.Optional[builtins.str], result)
12381
+
12382
+ @builtins.property
12383
+ def volume_size(self) -> typing.Optional[jsii.Number]:
12384
+ '''The size of the volume, in GiBs.
12385
+
12386
+ You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.
12387
+
12388
+ The following are the supported sizes for each volume type:
12389
+
12390
+ - ``gp2`` and ``gp3`` : 1 - 16,384 GiB
12391
+ - ``io1`` : 4 - 16,384 GiB
12392
+ - ``io2`` : 4 - 65,536 GiB
12393
+ - ``st1`` and ``sc1`` : 125 - 16,384 GiB
12394
+ - ``standard`` : 1 - 1024 GiB
12395
+
12396
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-ebsblockdevice.html#cfn-ec2-ec2fleet-ebsblockdevice-volumesize
12397
+ '''
12398
+ result = self._values.get("volume_size")
12399
+ return typing.cast(typing.Optional[jsii.Number], result)
12400
+
12401
+ @builtins.property
12402
+ def volume_type(self) -> typing.Optional[builtins.str]:
12403
+ '''The volume type.
12404
+
12405
+ For more information, see `Amazon EBS volume types <https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html>`_ in the *Amazon EBS User Guide* .
12406
+
12407
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-ebsblockdevice.html#cfn-ec2-ec2fleet-ebsblockdevice-volumetype
12408
+ '''
12409
+ result = self._values.get("volume_type")
12410
+ return typing.cast(typing.Optional[builtins.str], result)
12411
+
12412
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
12413
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
12414
+
12415
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
12416
+ return not (rhs == self)
12417
+
12418
+ def __repr__(self) -> str:
12419
+ return "EbsBlockDeviceProperty(%s)" % ", ".join(
12420
+ k + "=" + repr(v) for k, v in self._values.items()
12421
+ )
12422
+
11967
12423
  @jsii.data_type(
11968
12424
  jsii_type="aws-cdk-lib.aws_ec2.CfnEC2Fleet.FleetLaunchTemplateConfigRequestProperty",
11969
12425
  jsii_struct_bases=[],
@@ -12005,6 +12461,20 @@ class CfnEC2Fleet(
12005
12461
  ),
12006
12462
  overrides=[ec2.CfnEC2Fleet.FleetLaunchTemplateOverridesRequestProperty(
12007
12463
  availability_zone="availabilityZone",
12464
+ block_device_mappings=[ec2.CfnEC2Fleet.BlockDeviceMappingProperty(
12465
+ device_name="deviceName",
12466
+ ebs=ec2.CfnEC2Fleet.EbsBlockDeviceProperty(
12467
+ delete_on_termination=False,
12468
+ encrypted=False,
12469
+ iops=123,
12470
+ kms_key_id="kmsKeyId",
12471
+ snapshot_id="snapshotId",
12472
+ volume_size=123,
12473
+ volume_type="volumeType"
12474
+ ),
12475
+ no_device="noDevice",
12476
+ virtual_name="virtualName"
12477
+ )],
12008
12478
  instance_requirements=ec2.CfnEC2Fleet.InstanceRequirementsRequestProperty(
12009
12479
  accelerator_count=ec2.CfnEC2Fleet.AcceleratorCountRequestProperty(
12010
12480
  max=123,
@@ -12135,6 +12605,7 @@ class CfnEC2Fleet(
12135
12605
  jsii_struct_bases=[],
12136
12606
  name_mapping={
12137
12607
  "availability_zone": "availabilityZone",
12608
+ "block_device_mappings": "blockDeviceMappings",
12138
12609
  "instance_requirements": "instanceRequirements",
12139
12610
  "instance_type": "instanceType",
12140
12611
  "max_price": "maxPrice",
@@ -12149,6 +12620,7 @@ class CfnEC2Fleet(
12149
12620
  self,
12150
12621
  *,
12151
12622
  availability_zone: typing.Optional[builtins.str] = None,
12623
+ block_device_mappings: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnEC2Fleet.BlockDeviceMappingProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
12152
12624
  instance_requirements: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnEC2Fleet.InstanceRequirementsRequestProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
12153
12625
  instance_type: typing.Optional[builtins.str] = None,
12154
12626
  max_price: typing.Optional[builtins.str] = None,
@@ -12162,6 +12634,7 @@ class CfnEC2Fleet(
12162
12634
  ``FleetLaunchTemplateOverridesRequest`` is a property of the `FleetLaunchTemplateConfigRequest <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-fleetlaunchtemplateconfigrequest.html>`_ property type.
12163
12635
 
12164
12636
  :param availability_zone: The Availability Zone in which to launch the instances.
12637
+ :param block_device_mappings: The block device mappings, which define the EBS volumes and instance store volumes to attach to the instance at launch. Supported only for fleets of type ``instant`` . For more information, see `Block device mappings for volumes on Amazon EC2 instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html>`_ in the *Amazon EC2 User Guide* .
12165
12638
  :param instance_requirements: The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes. .. epigraph:: If you specify ``InstanceRequirements`` , you can't specify ``InstanceType`` .
12166
12639
  :param instance_type: The instance type. ``mac1.metal`` is not supported as a launch template override. .. epigraph:: If you specify ``InstanceType`` , you can't specify ``InstanceRequirements`` .
12167
12640
  :param max_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. If you specify a maximum price, it must be more than USD $0.001. Specifying a value below USD $0.001 will result in an ``InvalidParameterValue`` error message.
@@ -12181,6 +12654,20 @@ class CfnEC2Fleet(
12181
12654
 
12182
12655
  fleet_launch_template_overrides_request_property = ec2.CfnEC2Fleet.FleetLaunchTemplateOverridesRequestProperty(
12183
12656
  availability_zone="availabilityZone",
12657
+ block_device_mappings=[ec2.CfnEC2Fleet.BlockDeviceMappingProperty(
12658
+ device_name="deviceName",
12659
+ ebs=ec2.CfnEC2Fleet.EbsBlockDeviceProperty(
12660
+ delete_on_termination=False,
12661
+ encrypted=False,
12662
+ iops=123,
12663
+ kms_key_id="kmsKeyId",
12664
+ snapshot_id="snapshotId",
12665
+ volume_size=123,
12666
+ volume_type="volumeType"
12667
+ ),
12668
+ no_device="noDevice",
12669
+ virtual_name="virtualName"
12670
+ )],
12184
12671
  instance_requirements=ec2.CfnEC2Fleet.InstanceRequirementsRequestProperty(
12185
12672
  accelerator_count=ec2.CfnEC2Fleet.AcceleratorCountRequestProperty(
12186
12673
  max=123,
@@ -12261,6 +12748,7 @@ class CfnEC2Fleet(
12261
12748
  if __debug__:
12262
12749
  type_hints = typing.get_type_hints(_typecheckingstub__d758750d188cce1b749f19591d20310ad5bc697f0e6f94f495c9619297998763)
12263
12750
  check_type(argname="argument availability_zone", value=availability_zone, expected_type=type_hints["availability_zone"])
12751
+ check_type(argname="argument block_device_mappings", value=block_device_mappings, expected_type=type_hints["block_device_mappings"])
12264
12752
  check_type(argname="argument instance_requirements", value=instance_requirements, expected_type=type_hints["instance_requirements"])
12265
12753
  check_type(argname="argument instance_type", value=instance_type, expected_type=type_hints["instance_type"])
12266
12754
  check_type(argname="argument max_price", value=max_price, expected_type=type_hints["max_price"])
@@ -12271,6 +12759,8 @@ class CfnEC2Fleet(
12271
12759
  self._values: typing.Dict[builtins.str, typing.Any] = {}
12272
12760
  if availability_zone is not None:
12273
12761
  self._values["availability_zone"] = availability_zone
12762
+ if block_device_mappings is not None:
12763
+ self._values["block_device_mappings"] = block_device_mappings
12274
12764
  if instance_requirements is not None:
12275
12765
  self._values["instance_requirements"] = instance_requirements
12276
12766
  if instance_type is not None:
@@ -12295,6 +12785,21 @@ class CfnEC2Fleet(
12295
12785
  result = self._values.get("availability_zone")
12296
12786
  return typing.cast(typing.Optional[builtins.str], result)
12297
12787
 
12788
+ @builtins.property
12789
+ def block_device_mappings(
12790
+ self,
12791
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnEC2Fleet.BlockDeviceMappingProperty"]]]]:
12792
+ '''The block device mappings, which define the EBS volumes and instance store volumes to attach to the instance at launch.
12793
+
12794
+ Supported only for fleets of type ``instant`` .
12795
+
12796
+ For more information, see `Block device mappings for volumes on Amazon EC2 instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html>`_ in the *Amazon EC2 User Guide* .
12797
+
12798
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-fleetlaunchtemplateoverridesrequest.html#cfn-ec2-ec2fleet-fleetlaunchtemplateoverridesrequest-blockdevicemappings
12799
+ '''
12800
+ result = self._values.get("block_device_mappings")
12801
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnEC2Fleet.BlockDeviceMappingProperty"]]]], result)
12802
+
12298
12803
  @builtins.property
12299
12804
  def instance_requirements(
12300
12805
  self,
@@ -14627,6 +15132,20 @@ class CfnEC2FleetProps:
14627
15132
  ),
14628
15133
  overrides=[ec2.CfnEC2Fleet.FleetLaunchTemplateOverridesRequestProperty(
14629
15134
  availability_zone="availabilityZone",
15135
+ block_device_mappings=[ec2.CfnEC2Fleet.BlockDeviceMappingProperty(
15136
+ device_name="deviceName",
15137
+ ebs=ec2.CfnEC2Fleet.EbsBlockDeviceProperty(
15138
+ delete_on_termination=False,
15139
+ encrypted=False,
15140
+ iops=123,
15141
+ kms_key_id="kmsKeyId",
15142
+ snapshot_id="snapshotId",
15143
+ volume_size=123,
15144
+ volume_type="volumeType"
15145
+ ),
15146
+ no_device="noDevice",
15147
+ virtual_name="virtualName"
15148
+ )],
14630
15149
  instance_requirements=ec2.CfnEC2Fleet.InstanceRequirementsRequestProperty(
14631
15150
  accelerator_count=ec2.CfnEC2Fleet.AcceleratorCountRequestProperty(
14632
15151
  max=123,
@@ -53720,8 +54239,7 @@ class CfnTrafficMirrorFilter(
53720
54239
  @builtins.property
53721
54240
  @jsii.member(jsii_name="attrId")
53722
54241
  def attr_id(self) -> builtins.str:
53723
- '''The ID of a traffic mirror filter.
53724
-
54242
+ '''
53725
54243
  :cloudformationAttribute: Id
53726
54244
  '''
53727
54245
  return typing.cast(builtins.str, jsii.get(self, "attrId"))
@@ -82206,6 +82724,16 @@ class InterfaceVpcEndpointAwsService(
82206
82724
  def DIRECTORY_SERVICE_DATA(cls) -> "InterfaceVpcEndpointAwsService":
82207
82725
  return typing.cast("InterfaceVpcEndpointAwsService", jsii.sget(cls, "DIRECTORY_SERVICE_DATA"))
82208
82726
 
82727
+ @jsii.python.classproperty
82728
+ @jsii.member(jsii_name="DSQL_MANAGEMENT")
82729
+ def DSQL_MANAGEMENT(cls) -> "InterfaceVpcEndpointAwsService":
82730
+ '''The management endpoint for DSQL.
82731
+
82732
+ For the Connection endpoint, use ``new InterfaceVpcEndpointService(cfnCluster.attrVpcEndpointServiceName)``.
82733
+ See https://docs.aws.amazon.com/aurora-dsql/latest/userguide/privatelink-managing-clusters.html#endpoint-types-dsql for details
82734
+ '''
82735
+ return typing.cast("InterfaceVpcEndpointAwsService", jsii.sget(cls, "DSQL_MANAGEMENT"))
82736
+
82209
82737
  @jsii.python.classproperty
82210
82738
  @jsii.member(jsii_name="DYNAMODB")
82211
82739
  def DYNAMODB(cls) -> "InterfaceVpcEndpointAwsService":
@@ -84889,7 +85417,7 @@ class LaunchTemplate(
84889
85417
  :param role: An IAM role to associate with the instance profile that is used by instances. The role must be assumable by the service principal ``ec2.amazonaws.com``. Note: You can provide an instanceProfile or a role, but not both. Default: - No new role is created.
84890
85418
  :param security_group: Security group to assign to instances created with the launch template. Default: No security group is assigned.
84891
85419
  :param spot_options: If this property is defined, then the Launch Template's InstanceMarketOptions will be set to use Spot instances, and the options for the Spot instances will be as defined. Default: - Instance launched with this template will not be spot instances.
84892
- :param user_data: The AMI that will be used by instances. Default: - This Launch Template creates a UserData based on the type of provided machineImage; no UserData is created if a machineImage is not provided
85420
+ :param user_data: The user data to make available to the instance. Default: - This Launch Template creates a UserData based on the type of provided machineImage; no UserData is created if a machineImage is not provided
84893
85421
  :param version_description: A description for the first version of the launch template. The version description must be maximum 255 characters long. Default: - No description
84894
85422
  '''
84895
85423
  if __debug__:
@@ -85301,7 +85829,7 @@ class LaunchTemplateProps:
85301
85829
  :param role: An IAM role to associate with the instance profile that is used by instances. The role must be assumable by the service principal ``ec2.amazonaws.com``. Note: You can provide an instanceProfile or a role, but not both. Default: - No new role is created.
85302
85830
  :param security_group: Security group to assign to instances created with the launch template. Default: No security group is assigned.
85303
85831
  :param spot_options: If this property is defined, then the Launch Template's InstanceMarketOptions will be set to use Spot instances, and the options for the Spot instances will be as defined. Default: - Instance launched with this template will not be spot instances.
85304
- :param user_data: The AMI that will be used by instances. Default: - This Launch Template creates a UserData based on the type of provided machineImage; no UserData is created if a machineImage is not provided
85832
+ :param user_data: The user data to make available to the instance. Default: - This Launch Template creates a UserData based on the type of provided machineImage; no UserData is created if a machineImage is not provided
85305
85833
  :param version_description: A description for the first version of the launch template. The version description must be maximum 255 characters long. Default: - No description
85306
85834
 
85307
85835
  :exampleMetadata: infused
@@ -85694,7 +86222,7 @@ class LaunchTemplateProps:
85694
86222
 
85695
86223
  @builtins.property
85696
86224
  def user_data(self) -> typing.Optional["UserData"]:
85697
- '''The AMI that will be used by instances.
86225
+ '''The user data to make available to the instance.
85698
86226
 
85699
86227
  :default:
85700
86228
 
@@ -86512,6 +87040,8 @@ class LookupMachineImage(
86512
87040
  will be used on future runs. To refresh the AMI lookup, you will have to
86513
87041
  evict the value from the cache using the ``cdk context`` command. See
86514
87042
  https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information.
87043
+ If ``props.additionalCacheKey`` is set, the context key uses that value as a discriminator
87044
+ rather than the cached value being global across all lookups.
86515
87045
 
86516
87046
  :exampleMetadata: fixture=_generated
86517
87047
 
@@ -86527,6 +87057,7 @@ class LookupMachineImage(
86527
87057
  name="name",
86528
87058
 
86529
87059
  # the properties below are optional
87060
+ additional_cache_key="additionalCacheKey",
86530
87061
  filters={
86531
87062
  "filters_key": ["filters"]
86532
87063
  },
@@ -86540,6 +87071,7 @@ class LookupMachineImage(
86540
87071
  self,
86541
87072
  *,
86542
87073
  name: builtins.str,
87074
+ additional_cache_key: typing.Optional[builtins.str] = None,
86543
87075
  filters: typing.Optional[typing.Mapping[builtins.str, typing.Sequence[builtins.str]]] = None,
86544
87076
  owners: typing.Optional[typing.Sequence[builtins.str]] = None,
86545
87077
  user_data: typing.Optional["UserData"] = None,
@@ -86547,6 +87079,7 @@ class LookupMachineImage(
86547
87079
  ) -> None:
86548
87080
  '''
86549
87081
  :param name: Name of the image (may contain wildcards).
87082
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
86550
87083
  :param filters: Additional filters on the AMI. Default: - No additional filters
86551
87084
  :param owners: Owner account IDs or aliases. Default: - All owners
86552
87085
  :param user_data: Custom userdata for this image. Default: - Empty user data appropriate for the platform type
@@ -86554,6 +87087,7 @@ class LookupMachineImage(
86554
87087
  '''
86555
87088
  props = LookupMachineImageProps(
86556
87089
  name=name,
87090
+ additional_cache_key=additional_cache_key,
86557
87091
  filters=filters,
86558
87092
  owners=owners,
86559
87093
  user_data=user_data,
@@ -86564,7 +87098,7 @@ class LookupMachineImage(
86564
87098
 
86565
87099
  @jsii.member(jsii_name="getImage")
86566
87100
  def get_image(self, scope: _constructs_77d1e7e8.Construct) -> "MachineImageConfig":
86567
- '''Return the image to use in the given context.
87101
+ '''Return the correct image.
86568
87102
 
86569
87103
  :param scope: -
86570
87104
  '''
@@ -86579,6 +87113,7 @@ class LookupMachineImage(
86579
87113
  jsii_struct_bases=[],
86580
87114
  name_mapping={
86581
87115
  "name": "name",
87116
+ "additional_cache_key": "additionalCacheKey",
86582
87117
  "filters": "filters",
86583
87118
  "owners": "owners",
86584
87119
  "user_data": "userData",
@@ -86590,6 +87125,7 @@ class LookupMachineImageProps:
86590
87125
  self,
86591
87126
  *,
86592
87127
  name: builtins.str,
87128
+ additional_cache_key: typing.Optional[builtins.str] = None,
86593
87129
  filters: typing.Optional[typing.Mapping[builtins.str, typing.Sequence[builtins.str]]] = None,
86594
87130
  owners: typing.Optional[typing.Sequence[builtins.str]] = None,
86595
87131
  user_data: typing.Optional["UserData"] = None,
@@ -86598,6 +87134,7 @@ class LookupMachineImageProps:
86598
87134
  '''Properties for looking up an image.
86599
87135
 
86600
87136
  :param name: Name of the image (may contain wildcards).
87137
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
86601
87138
  :param filters: Additional filters on the AMI. Default: - No additional filters
86602
87139
  :param owners: Owner account IDs or aliases. Default: - All owners
86603
87140
  :param user_data: Custom userdata for this image. Default: - Empty user data appropriate for the platform type
@@ -86648,6 +87185,7 @@ class LookupMachineImageProps:
86648
87185
  if __debug__:
86649
87186
  type_hints = typing.get_type_hints(_typecheckingstub__9c44b2bd75c4714250889165d6fd2d06ab6a906b90c817320a7c5f526dcbfc2f)
86650
87187
  check_type(argname="argument name", value=name, expected_type=type_hints["name"])
87188
+ check_type(argname="argument additional_cache_key", value=additional_cache_key, expected_type=type_hints["additional_cache_key"])
86651
87189
  check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
86652
87190
  check_type(argname="argument owners", value=owners, expected_type=type_hints["owners"])
86653
87191
  check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
@@ -86655,6 +87193,8 @@ class LookupMachineImageProps:
86655
87193
  self._values: typing.Dict[builtins.str, typing.Any] = {
86656
87194
  "name": name,
86657
87195
  }
87196
+ if additional_cache_key is not None:
87197
+ self._values["additional_cache_key"] = additional_cache_key
86658
87198
  if filters is not None:
86659
87199
  self._values["filters"] = filters
86660
87200
  if owners is not None:
@@ -86671,6 +87211,15 @@ class LookupMachineImageProps:
86671
87211
  assert result is not None, "Required property 'name' is missing"
86672
87212
  return typing.cast(builtins.str, result)
86673
87213
 
87214
+ @builtins.property
87215
+ def additional_cache_key(self) -> typing.Optional[builtins.str]:
87216
+ '''Adds an additional discriminator to the ``cdk.context.json`` cache key.
87217
+
87218
+ :default: - no additional cache key
87219
+ '''
87220
+ result = self._values.get("additional_cache_key")
87221
+ return typing.cast(typing.Optional[builtins.str], result)
87222
+
86674
87223
  @builtins.property
86675
87224
  def filters(
86676
87225
  self,
@@ -86754,6 +87303,7 @@ class MachineImage(
86754
87303
  cls,
86755
87304
  parameter_name: builtins.str,
86756
87305
  *,
87306
+ additional_cache_key: typing.Optional[builtins.str] = None,
86757
87307
  cached_in_context: typing.Optional[builtins.bool] = None,
86758
87308
  os: typing.Optional["OperatingSystemType"] = None,
86759
87309
  parameter_version: typing.Optional[builtins.str] = None,
@@ -86770,6 +87320,7 @@ class MachineImage(
86770
87320
  to the newest AMI ID.
86771
87321
 
86772
87322
  :param parameter_name: -
87323
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
86773
87324
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
86774
87325
  :param os: Operating system. Default: OperatingSystemType.LINUX
86775
87326
  :param parameter_version: The version of the SSM parameter. Default: no version specified.
@@ -86779,6 +87330,7 @@ class MachineImage(
86779
87330
  type_hints = typing.get_type_hints(_typecheckingstub__677afd5ea9b4639913a489ab67346107c0d290e015be12483e980d3a19e33a6e)
86780
87331
  check_type(argname="argument parameter_name", value=parameter_name, expected_type=type_hints["parameter_name"])
86781
87332
  options = SsmParameterImageOptions(
87333
+ additional_cache_key=additional_cache_key,
86782
87334
  cached_in_context=cached_in_context,
86783
87335
  os=os,
86784
87336
  parameter_version=parameter_version,
@@ -86832,6 +87384,7 @@ class MachineImage(
86832
87384
  def latest_amazon_linux(
86833
87385
  cls,
86834
87386
  *,
87387
+ additional_cache_key: typing.Optional[builtins.str] = None,
86835
87388
  cached_in_context: typing.Optional[builtins.bool] = None,
86836
87389
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
86837
87390
  edition: typing.Optional[AmazonLinuxEdition] = None,
@@ -86860,6 +87413,7 @@ class MachineImage(
86860
87413
  generation=ec2.AmazonLinuxGeneration.AMAZON_LINUX_2
86861
87414
  )
86862
87415
 
87416
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
86863
87417
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
86864
87418
  :param cpu_type: CPU Type. Default: X86_64
86865
87419
  :param edition: What edition of Amazon Linux to use. Default: Standard
@@ -86874,6 +87428,7 @@ class MachineImage(
86874
87428
  :stability: deprecated
86875
87429
  '''
86876
87430
  props = AmazonLinuxImageProps(
87431
+ additional_cache_key=additional_cache_key,
86877
87432
  cached_in_context=cached_in_context,
86878
87433
  cpu_type=cpu_type,
86879
87434
  edition=edition,
@@ -86896,6 +87451,7 @@ class MachineImage(
86896
87451
  virtualization: typing.Optional[AmazonLinuxVirt] = None,
86897
87452
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
86898
87453
  edition: typing.Optional[AmazonLinuxEdition] = None,
87454
+ additional_cache_key: typing.Optional[builtins.str] = None,
86899
87455
  cached_in_context: typing.Optional[builtins.bool] = None,
86900
87456
  user_data: typing.Optional["UserData"] = None,
86901
87457
  ) -> IMachineImage:
@@ -86911,6 +87467,7 @@ class MachineImage(
86911
87467
  :param virtualization: Virtualization type. Default: HVM
86912
87468
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
86913
87469
  :param edition: What edition of Amazon Linux to use. Default: AmazonLinuxEdition.Standard
87470
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
86914
87471
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
86915
87472
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
86916
87473
  '''
@@ -86920,6 +87477,7 @@ class MachineImage(
86920
87477
  virtualization=virtualization,
86921
87478
  cpu_type=cpu_type,
86922
87479
  edition=edition,
87480
+ additional_cache_key=additional_cache_key,
86923
87481
  cached_in_context=cached_in_context,
86924
87482
  user_data=user_data,
86925
87483
  )
@@ -86934,6 +87492,7 @@ class MachineImage(
86934
87492
  kernel: typing.Optional[AmazonLinux2022Kernel] = None,
86935
87493
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
86936
87494
  edition: typing.Optional[AmazonLinuxEdition] = None,
87495
+ additional_cache_key: typing.Optional[builtins.str] = None,
86937
87496
  cached_in_context: typing.Optional[builtins.bool] = None,
86938
87497
  user_data: typing.Optional["UserData"] = None,
86939
87498
  ) -> IMachineImage:
@@ -86947,6 +87506,7 @@ class MachineImage(
86947
87506
  :param kernel: What kernel version of Amazon Linux to use. Default: AmazonLinux2022Kernel.DEFAULT
86948
87507
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
86949
87508
  :param edition: What edition of Amazon Linux to use. Default: AmazonLinuxEdition.Standard
87509
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
86950
87510
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
86951
87511
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
86952
87512
 
@@ -86958,6 +87518,7 @@ class MachineImage(
86958
87518
  kernel=kernel,
86959
87519
  cpu_type=cpu_type,
86960
87520
  edition=edition,
87521
+ additional_cache_key=additional_cache_key,
86961
87522
  cached_in_context=cached_in_context,
86962
87523
  user_data=user_data,
86963
87524
  )
@@ -86972,6 +87533,7 @@ class MachineImage(
86972
87533
  kernel: typing.Optional[AmazonLinux2023Kernel] = None,
86973
87534
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
86974
87535
  edition: typing.Optional[AmazonLinuxEdition] = None,
87536
+ additional_cache_key: typing.Optional[builtins.str] = None,
86975
87537
  cached_in_context: typing.Optional[builtins.bool] = None,
86976
87538
  user_data: typing.Optional["UserData"] = None,
86977
87539
  ) -> IMachineImage:
@@ -86985,6 +87547,7 @@ class MachineImage(
86985
87547
  :param kernel: What kernel version of Amazon Linux to use. Default: AmazonLinux2023Kernel.DEFAULT
86986
87548
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
86987
87549
  :param edition: What edition of Amazon Linux to use. Default: AmazonLinuxEdition.Standard
87550
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
86988
87551
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
86989
87552
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
86990
87553
  '''
@@ -86992,6 +87555,7 @@ class MachineImage(
86992
87555
  kernel=kernel,
86993
87556
  cpu_type=cpu_type,
86994
87557
  edition=edition,
87558
+ additional_cache_key=additional_cache_key,
86995
87559
  cached_in_context=cached_in_context,
86996
87560
  user_data=user_data,
86997
87561
  )
@@ -87029,6 +87593,7 @@ class MachineImage(
87029
87593
  cls,
87030
87594
  *,
87031
87595
  name: builtins.str,
87596
+ additional_cache_key: typing.Optional[builtins.str] = None,
87032
87597
  filters: typing.Optional[typing.Mapping[builtins.str, typing.Sequence[builtins.str]]] = None,
87033
87598
  owners: typing.Optional[typing.Sequence[builtins.str]] = None,
87034
87599
  user_data: typing.Optional["UserData"] = None,
@@ -87048,6 +87613,7 @@ class MachineImage(
87048
87613
  This function can not be used in environment-agnostic stacks.
87049
87614
 
87050
87615
  :param name: Name of the image (may contain wildcards).
87616
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
87051
87617
  :param filters: Additional filters on the AMI. Default: - No additional filters
87052
87618
  :param owners: Owner account IDs or aliases. Default: - All owners
87053
87619
  :param user_data: Custom userdata for this image. Default: - Empty user data appropriate for the platform type
@@ -87055,6 +87621,7 @@ class MachineImage(
87055
87621
  '''
87056
87622
  props = LookupMachineImageProps(
87057
87623
  name=name,
87624
+ additional_cache_key=additional_cache_key,
87058
87625
  filters=filters,
87059
87626
  owners=owners,
87060
87627
  user_data=user_data,
@@ -87069,6 +87636,7 @@ class MachineImage(
87069
87636
  cls,
87070
87637
  parameter_name: builtins.str,
87071
87638
  *,
87639
+ additional_cache_key: typing.Optional[builtins.str] = None,
87072
87640
  cached_in_context: typing.Optional[builtins.bool] = None,
87073
87641
  os: typing.Optional["OperatingSystemType"] = None,
87074
87642
  parameter_version: typing.Optional[builtins.str] = None,
@@ -87079,6 +87647,7 @@ class MachineImage(
87079
87647
  The AMI ID will be resolved at instance launch time.
87080
87648
 
87081
87649
  :param parameter_name: The name of SSM parameter containing the AMI ID.
87650
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
87082
87651
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
87083
87652
  :param os: Operating system. Default: OperatingSystemType.LINUX
87084
87653
  :param parameter_version: The version of the SSM parameter. Default: no version specified.
@@ -87090,6 +87659,7 @@ class MachineImage(
87090
87659
  type_hints = typing.get_type_hints(_typecheckingstub__5e832dd82a3ef447ebf9a639dc9d6983793ce7321287fb2370dbed898b67d02a)
87091
87660
  check_type(argname="argument parameter_name", value=parameter_name, expected_type=type_hints["parameter_name"])
87092
87661
  options = SsmParameterImageOptions(
87662
+ additional_cache_key=additional_cache_key,
87093
87663
  cached_in_context=cached_in_context,
87094
87664
  os=os,
87095
87665
  parameter_version=parameter_version,
@@ -90185,6 +90755,7 @@ class ResolveSsmParameterAtLaunchImage(
90185
90755
  # user_data: ec2.UserData
90186
90756
 
90187
90757
  resolve_ssm_parameter_at_launch_image = ec2.ResolveSsmParameterAtLaunchImage("parameterName",
90758
+ additional_cache_key="additionalCacheKey",
90188
90759
  cached_in_context=False,
90189
90760
  os=ec2.OperatingSystemType.LINUX,
90190
90761
  parameter_version="parameterVersion",
@@ -90196,6 +90767,7 @@ class ResolveSsmParameterAtLaunchImage(
90196
90767
  self,
90197
90768
  parameter_name: builtins.str,
90198
90769
  *,
90770
+ additional_cache_key: typing.Optional[builtins.str] = None,
90199
90771
  cached_in_context: typing.Optional[builtins.bool] = None,
90200
90772
  os: typing.Optional[OperatingSystemType] = None,
90201
90773
  parameter_version: typing.Optional[builtins.str] = None,
@@ -90203,6 +90775,7 @@ class ResolveSsmParameterAtLaunchImage(
90203
90775
  ) -> None:
90204
90776
  '''
90205
90777
  :param parameter_name: -
90778
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
90206
90779
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
90207
90780
  :param os: Operating system. Default: OperatingSystemType.LINUX
90208
90781
  :param parameter_version: The version of the SSM parameter. Default: no version specified.
@@ -90212,6 +90785,7 @@ class ResolveSsmParameterAtLaunchImage(
90212
90785
  type_hints = typing.get_type_hints(_typecheckingstub__ae85933c688e38a0dd9faa69a685488b55c8c19f918eabcacbd33c964c7bb468)
90213
90786
  check_type(argname="argument parameter_name", value=parameter_name, expected_type=type_hints["parameter_name"])
90214
90787
  props = SsmParameterImageOptions(
90788
+ additional_cache_key=additional_cache_key,
90215
90789
  cached_in_context=cached_in_context,
90216
90790
  os=os,
90217
90791
  parameter_version=parameter_version,
@@ -91411,6 +91985,7 @@ class SpotRequestType(enum.Enum):
91411
91985
  jsii_type="aws-cdk-lib.aws_ec2.SsmParameterImageOptions",
91412
91986
  jsii_struct_bases=[],
91413
91987
  name_mapping={
91988
+ "additional_cache_key": "additionalCacheKey",
91414
91989
  "cached_in_context": "cachedInContext",
91415
91990
  "os": "os",
91416
91991
  "parameter_version": "parameterVersion",
@@ -91421,6 +91996,7 @@ class SsmParameterImageOptions:
91421
91996
  def __init__(
91422
91997
  self,
91423
91998
  *,
91999
+ additional_cache_key: typing.Optional[builtins.str] = None,
91424
92000
  cached_in_context: typing.Optional[builtins.bool] = None,
91425
92001
  os: typing.Optional[OperatingSystemType] = None,
91426
92002
  parameter_version: typing.Optional[builtins.str] = None,
@@ -91428,6 +92004,7 @@ class SsmParameterImageOptions:
91428
92004
  ) -> None:
91429
92005
  '''Properties for GenericSsmParameterImage.
91430
92006
 
92007
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
91431
92008
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
91432
92009
  :param os: Operating system. Default: OperatingSystemType.LINUX
91433
92010
  :param parameter_version: The version of the SSM parameter. Default: no version specified.
@@ -91477,11 +92054,14 @@ class SsmParameterImageOptions:
91477
92054
  '''
91478
92055
  if __debug__:
91479
92056
  type_hints = typing.get_type_hints(_typecheckingstub__a03f16dc6f5eb3eb6f69587f84001af20bc314a1c46a530aa5fb21da814be237)
92057
+ check_type(argname="argument additional_cache_key", value=additional_cache_key, expected_type=type_hints["additional_cache_key"])
91480
92058
  check_type(argname="argument cached_in_context", value=cached_in_context, expected_type=type_hints["cached_in_context"])
91481
92059
  check_type(argname="argument os", value=os, expected_type=type_hints["os"])
91482
92060
  check_type(argname="argument parameter_version", value=parameter_version, expected_type=type_hints["parameter_version"])
91483
92061
  check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
91484
92062
  self._values: typing.Dict[builtins.str, typing.Any] = {}
92063
+ if additional_cache_key is not None:
92064
+ self._values["additional_cache_key"] = additional_cache_key
91485
92065
  if cached_in_context is not None:
91486
92066
  self._values["cached_in_context"] = cached_in_context
91487
92067
  if os is not None:
@@ -91491,6 +92071,15 @@ class SsmParameterImageOptions:
91491
92071
  if user_data is not None:
91492
92072
  self._values["user_data"] = user_data
91493
92073
 
92074
+ @builtins.property
92075
+ def additional_cache_key(self) -> typing.Optional[builtins.str]:
92076
+ '''Adds an additional discriminator to the ``cdk.context.json`` cache key.
92077
+
92078
+ :default: - no additional cache key
92079
+ '''
92080
+ result = self._values.get("additional_cache_key")
92081
+ return typing.cast(typing.Optional[builtins.str], result)
92082
+
91494
92083
  @builtins.property
91495
92084
  def cached_in_context(self) -> typing.Optional[builtins.bool]:
91496
92085
  '''Whether the AMI ID is cached to be stable between deployments.
@@ -93385,17 +93974,12 @@ class Volume(
93385
93974
 
93386
93975
  Example::
93387
93976
 
93388
- # instance: ec2.Instance
93389
- # role: iam.Role
93390
-
93391
-
93392
- volume = ec2.Volume(self, "Volume",
93393
- availability_zone="us-west-2a",
93394
- size=Size.gibibytes(500),
93395
- encrypted=True
93977
+ ec2.Volume(self, "Volume",
93978
+ availability_zone="us-east-1a",
93979
+ size=Size.gibibytes(125),
93980
+ volume_type=ec2.EbsDeviceVolumeType.GP3,
93981
+ throughput=125
93396
93982
  )
93397
-
93398
- volume.grant_attach_volume(role, [instance])
93399
93983
  '''
93400
93984
 
93401
93985
  def __init__(
@@ -93413,6 +93997,7 @@ class Volume(
93413
93997
  size: typing.Optional[_Size_7b441c34] = None,
93414
93998
  snapshot_id: typing.Optional[builtins.str] = None,
93415
93999
  throughput: typing.Optional[jsii.Number] = None,
94000
+ volume_initialization_rate: typing.Optional[_Size_7b441c34] = None,
93416
94001
  volume_name: typing.Optional[builtins.str] = None,
93417
94002
  volume_type: typing.Optional[EbsDeviceVolumeType] = None,
93418
94003
  ) -> None:
@@ -93423,13 +94008,14 @@ class Volume(
93423
94008
  :param auto_enable_io: Indicates whether the volume is auto-enabled for I/O operations. By default, Amazon EBS disables I/O to the volume from attached EC2 instances when it determines that a volume's data is potentially inconsistent. If the consistency of the volume is not a concern, and you prefer that the volume be made available immediately if it's impaired, you can configure the volume to automatically enable I/O. Default: false
93424
94009
  :param enable_multi_attach: Indicates whether Amazon EBS Multi-Attach is enabled. See `Considerations and limitations <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html#considerations>`_ for the constraints of multi-attach. Default: false
93425
94010
  :param encrypted: Specifies whether the volume should be encrypted. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see `Encryption by Default <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default>`_ in the Amazon Elastic Compute Cloud User Guide. Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see `Supported Instance Types <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances>`_. Default: false
93426
- :param encryption_key: The customer-managed encryption key that is used to encrypt the Volume. The encrypted property must be true if this is provided. Note: If using an ``aws-kms.IKey`` created from a ``aws-kms.Key.fromKeyArn()`` here, then the KMS key **must** have the following in its Key policy; otherwise, the Volume will fail to create:: { "Effect": "Allow", "Principal": { "AWS": "<arn for your account-user> ex: arn:aws:iam::00000000000:root" }, "Resource": "*", "Action": [ "kms:DescribeKey", "kms:GenerateDataKeyWithoutPlainText", ], "Condition": { "StringEquals": { "kms:ViaService": "ec2.<Region>.amazonaws.com", (eg: ec2.us-east-1.amazonaws.com) "kms:CallerAccount": "0000000000" (your account ID) } } } Default: The default KMS key for the account, region, and EC2 service is used.
94011
+ :param encryption_key: The customer-managed encryption key that is used to encrypt the Volume. The encrypted property must be true if this is provided. Note: If using an ``aws-kms.IKey`` created from a ``aws-kms.Key.fromKeyArn()`` here, then the KMS key **must** have the following in its Key policy; otherwise, the Volume will fail to create:: { "Effect": "Allow", "Principal": { "AWS": "<arn for your account-user> ex: arn:aws:iam::00000000000:root" }, "Resource": "*", "Action": [ "kms:DescribeKey", "kms:GenerateDataKeyWithoutPlainText", ], "Condition": { "StringEquals": { "kms:ViaService": "ec2.<Region>.amazonaws.com", (eg: ec2.us-east-1.amazonaws.com) "kms:CallerAccount": "0000000000" (your account ID) } } } Default: - The default KMS key for the account, region, and EC2 service is used.
93427
94012
  :param iops: The number of I/O operations per second (IOPS) to provision for the volume. The maximum ratio is 50 IOPS/GiB for PROVISIONED_IOPS_SSD, and 500 IOPS/GiB for both PROVISIONED_IOPS_SSD_IO2 and GENERAL_PURPOSE_SSD_GP3. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html for more information. This parameter is valid only for PROVISIONED_IOPS_SSD, PROVISIONED_IOPS_SSD_IO2 and GENERAL_PURPOSE_SSD_GP3 volumes. Default: None -- Required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS if omitted.
93428
94013
  :param removal_policy: Policy to apply when the volume is removed from the stack. Default: RemovalPolicy.RETAIN
93429
- :param size: The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html for details on the allowable size for each type of volume. Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
93430
- :param snapshot_id: The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size. Default: The EBS volume is not created from a snapshot.
94014
+ :param size: The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html for details on the allowable size for each type of volume. Default: - If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
94015
+ :param snapshot_id: The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size. Default: - The EBS volume is not created from a snapshot.
93431
94016
  :param throughput: The throughput that the volume supports, in MiB/s Takes a minimum of 125 and maximum of 1000. Default: - 125 MiB/s. Only valid on gp3 volumes.
93432
- :param volume_name: The value of the physicalName property of this resource. Default: The physical name will be allocated by CloudFormation at deployment time
94017
+ :param volume_initialization_rate: Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), at which to download the snapshot blocks from Amazon S3 to the volume. Valid range is between 100 and 300 MiB/s. This parameter is supported only for volumes created from snapshots. Default: undefined - The volume initialization rate is not set.
94018
+ :param volume_name: The value of the physicalName property of this resource. Default: - The physical name will be allocated by CloudFormation at deployment time
93433
94019
  :param volume_type: The type of the volume; what type of storage to use to form the EBS Volume. Default: ``EbsDeviceVolumeType.GENERAL_PURPOSE_SSD``
93434
94020
  '''
93435
94021
  if __debug__:
@@ -93447,6 +94033,7 @@ class Volume(
93447
94033
  size=size,
93448
94034
  snapshot_id=snapshot_id,
93449
94035
  throughput=throughput,
94036
+ volume_initialization_rate=volume_initialization_rate,
93450
94037
  volume_name=volume_name,
93451
94038
  volume_type=volume_type,
93452
94039
  )
@@ -93592,6 +94179,7 @@ class Volume(
93592
94179
  size: typing.Optional[_Size_7b441c34] = None,
93593
94180
  snapshot_id: typing.Optional[builtins.str] = None,
93594
94181
  throughput: typing.Optional[jsii.Number] = None,
94182
+ volume_initialization_rate: typing.Optional[_Size_7b441c34] = None,
93595
94183
  volume_name: typing.Optional[builtins.str] = None,
93596
94184
  volume_type: typing.Optional[EbsDeviceVolumeType] = None,
93597
94185
  ) -> None:
@@ -93600,13 +94188,14 @@ class Volume(
93600
94188
  :param auto_enable_io: Indicates whether the volume is auto-enabled for I/O operations. By default, Amazon EBS disables I/O to the volume from attached EC2 instances when it determines that a volume's data is potentially inconsistent. If the consistency of the volume is not a concern, and you prefer that the volume be made available immediately if it's impaired, you can configure the volume to automatically enable I/O. Default: false
93601
94189
  :param enable_multi_attach: Indicates whether Amazon EBS Multi-Attach is enabled. See `Considerations and limitations <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html#considerations>`_ for the constraints of multi-attach. Default: false
93602
94190
  :param encrypted: Specifies whether the volume should be encrypted. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see `Encryption by Default <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default>`_ in the Amazon Elastic Compute Cloud User Guide. Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see `Supported Instance Types <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances>`_. Default: false
93603
- :param encryption_key: The customer-managed encryption key that is used to encrypt the Volume. The encrypted property must be true if this is provided. Note: If using an ``aws-kms.IKey`` created from a ``aws-kms.Key.fromKeyArn()`` here, then the KMS key **must** have the following in its Key policy; otherwise, the Volume will fail to create:: { "Effect": "Allow", "Principal": { "AWS": "<arn for your account-user> ex: arn:aws:iam::00000000000:root" }, "Resource": "*", "Action": [ "kms:DescribeKey", "kms:GenerateDataKeyWithoutPlainText", ], "Condition": { "StringEquals": { "kms:ViaService": "ec2.<Region>.amazonaws.com", (eg: ec2.us-east-1.amazonaws.com) "kms:CallerAccount": "0000000000" (your account ID) } } } Default: The default KMS key for the account, region, and EC2 service is used.
94191
+ :param encryption_key: The customer-managed encryption key that is used to encrypt the Volume. The encrypted property must be true if this is provided. Note: If using an ``aws-kms.IKey`` created from a ``aws-kms.Key.fromKeyArn()`` here, then the KMS key **must** have the following in its Key policy; otherwise, the Volume will fail to create:: { "Effect": "Allow", "Principal": { "AWS": "<arn for your account-user> ex: arn:aws:iam::00000000000:root" }, "Resource": "*", "Action": [ "kms:DescribeKey", "kms:GenerateDataKeyWithoutPlainText", ], "Condition": { "StringEquals": { "kms:ViaService": "ec2.<Region>.amazonaws.com", (eg: ec2.us-east-1.amazonaws.com) "kms:CallerAccount": "0000000000" (your account ID) } } } Default: - The default KMS key for the account, region, and EC2 service is used.
93604
94192
  :param iops: The number of I/O operations per second (IOPS) to provision for the volume. The maximum ratio is 50 IOPS/GiB for PROVISIONED_IOPS_SSD, and 500 IOPS/GiB for both PROVISIONED_IOPS_SSD_IO2 and GENERAL_PURPOSE_SSD_GP3. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html for more information. This parameter is valid only for PROVISIONED_IOPS_SSD, PROVISIONED_IOPS_SSD_IO2 and GENERAL_PURPOSE_SSD_GP3 volumes. Default: None -- Required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS if omitted.
93605
94193
  :param removal_policy: Policy to apply when the volume is removed from the stack. Default: RemovalPolicy.RETAIN
93606
- :param size: The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html for details on the allowable size for each type of volume. Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
93607
- :param snapshot_id: The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size. Default: The EBS volume is not created from a snapshot.
94194
+ :param size: The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html for details on the allowable size for each type of volume. Default: - If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
94195
+ :param snapshot_id: The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size. Default: - The EBS volume is not created from a snapshot.
93608
94196
  :param throughput: The throughput that the volume supports, in MiB/s Takes a minimum of 125 and maximum of 1000. Default: - 125 MiB/s. Only valid on gp3 volumes.
93609
- :param volume_name: The value of the physicalName property of this resource. Default: The physical name will be allocated by CloudFormation at deployment time
94197
+ :param volume_initialization_rate: Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), at which to download the snapshot blocks from Amazon S3 to the volume. Valid range is between 100 and 300 MiB/s. This parameter is supported only for volumes created from snapshots. Default: undefined - The volume initialization rate is not set.
94198
+ :param volume_name: The value of the physicalName property of this resource. Default: - The physical name will be allocated by CloudFormation at deployment time
93610
94199
  :param volume_type: The type of the volume; what type of storage to use to form the EBS Volume. Default: ``EbsDeviceVolumeType.GENERAL_PURPOSE_SSD``
93611
94200
  '''
93612
94201
  props = VolumeProps(
@@ -93620,6 +94209,7 @@ class Volume(
93620
94209
  size=size,
93621
94210
  snapshot_id=snapshot_id,
93622
94211
  throughput=throughput,
94212
+ volume_initialization_rate=volume_initialization_rate,
93623
94213
  volume_name=volume_name,
93624
94214
  volume_type=volume_type,
93625
94215
  )
@@ -93754,6 +94344,7 @@ class VolumeAttributes:
93754
94344
  "size": "size",
93755
94345
  "snapshot_id": "snapshotId",
93756
94346
  "throughput": "throughput",
94347
+ "volume_initialization_rate": "volumeInitializationRate",
93757
94348
  "volume_name": "volumeName",
93758
94349
  "volume_type": "volumeType",
93759
94350
  },
@@ -93772,6 +94363,7 @@ class VolumeProps:
93772
94363
  size: typing.Optional[_Size_7b441c34] = None,
93773
94364
  snapshot_id: typing.Optional[builtins.str] = None,
93774
94365
  throughput: typing.Optional[jsii.Number] = None,
94366
+ volume_initialization_rate: typing.Optional[_Size_7b441c34] = None,
93775
94367
  volume_name: typing.Optional[builtins.str] = None,
93776
94368
  volume_type: typing.Optional[EbsDeviceVolumeType] = None,
93777
94369
  ) -> None:
@@ -93781,30 +94373,26 @@ class VolumeProps:
93781
94373
  :param auto_enable_io: Indicates whether the volume is auto-enabled for I/O operations. By default, Amazon EBS disables I/O to the volume from attached EC2 instances when it determines that a volume's data is potentially inconsistent. If the consistency of the volume is not a concern, and you prefer that the volume be made available immediately if it's impaired, you can configure the volume to automatically enable I/O. Default: false
93782
94374
  :param enable_multi_attach: Indicates whether Amazon EBS Multi-Attach is enabled. See `Considerations and limitations <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html#considerations>`_ for the constraints of multi-attach. Default: false
93783
94375
  :param encrypted: Specifies whether the volume should be encrypted. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see `Encryption by Default <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default>`_ in the Amazon Elastic Compute Cloud User Guide. Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see `Supported Instance Types <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances>`_. Default: false
93784
- :param encryption_key: The customer-managed encryption key that is used to encrypt the Volume. The encrypted property must be true if this is provided. Note: If using an ``aws-kms.IKey`` created from a ``aws-kms.Key.fromKeyArn()`` here, then the KMS key **must** have the following in its Key policy; otherwise, the Volume will fail to create:: { "Effect": "Allow", "Principal": { "AWS": "<arn for your account-user> ex: arn:aws:iam::00000000000:root" }, "Resource": "*", "Action": [ "kms:DescribeKey", "kms:GenerateDataKeyWithoutPlainText", ], "Condition": { "StringEquals": { "kms:ViaService": "ec2.<Region>.amazonaws.com", (eg: ec2.us-east-1.amazonaws.com) "kms:CallerAccount": "0000000000" (your account ID) } } } Default: The default KMS key for the account, region, and EC2 service is used.
94376
+ :param encryption_key: The customer-managed encryption key that is used to encrypt the Volume. The encrypted property must be true if this is provided. Note: If using an ``aws-kms.IKey`` created from a ``aws-kms.Key.fromKeyArn()`` here, then the KMS key **must** have the following in its Key policy; otherwise, the Volume will fail to create:: { "Effect": "Allow", "Principal": { "AWS": "<arn for your account-user> ex: arn:aws:iam::00000000000:root" }, "Resource": "*", "Action": [ "kms:DescribeKey", "kms:GenerateDataKeyWithoutPlainText", ], "Condition": { "StringEquals": { "kms:ViaService": "ec2.<Region>.amazonaws.com", (eg: ec2.us-east-1.amazonaws.com) "kms:CallerAccount": "0000000000" (your account ID) } } } Default: - The default KMS key for the account, region, and EC2 service is used.
93785
94377
  :param iops: The number of I/O operations per second (IOPS) to provision for the volume. The maximum ratio is 50 IOPS/GiB for PROVISIONED_IOPS_SSD, and 500 IOPS/GiB for both PROVISIONED_IOPS_SSD_IO2 and GENERAL_PURPOSE_SSD_GP3. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html for more information. This parameter is valid only for PROVISIONED_IOPS_SSD, PROVISIONED_IOPS_SSD_IO2 and GENERAL_PURPOSE_SSD_GP3 volumes. Default: None -- Required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS if omitted.
93786
94378
  :param removal_policy: Policy to apply when the volume is removed from the stack. Default: RemovalPolicy.RETAIN
93787
- :param size: The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html for details on the allowable size for each type of volume. Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
93788
- :param snapshot_id: The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size. Default: The EBS volume is not created from a snapshot.
94379
+ :param size: The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html for details on the allowable size for each type of volume. Default: - If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
94380
+ :param snapshot_id: The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size. Default: - The EBS volume is not created from a snapshot.
93789
94381
  :param throughput: The throughput that the volume supports, in MiB/s Takes a minimum of 125 and maximum of 1000. Default: - 125 MiB/s. Only valid on gp3 volumes.
93790
- :param volume_name: The value of the physicalName property of this resource. Default: The physical name will be allocated by CloudFormation at deployment time
94382
+ :param volume_initialization_rate: Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), at which to download the snapshot blocks from Amazon S3 to the volume. Valid range is between 100 and 300 MiB/s. This parameter is supported only for volumes created from snapshots. Default: undefined - The volume initialization rate is not set.
94383
+ :param volume_name: The value of the physicalName property of this resource. Default: - The physical name will be allocated by CloudFormation at deployment time
93791
94384
  :param volume_type: The type of the volume; what type of storage to use to form the EBS Volume. Default: ``EbsDeviceVolumeType.GENERAL_PURPOSE_SSD``
93792
94385
 
93793
94386
  :exampleMetadata: infused
93794
94387
 
93795
94388
  Example::
93796
94389
 
93797
- # instance: ec2.Instance
93798
- # role: iam.Role
93799
-
93800
-
93801
- volume = ec2.Volume(self, "Volume",
93802
- availability_zone="us-west-2a",
93803
- size=Size.gibibytes(500),
93804
- encrypted=True
94390
+ ec2.Volume(self, "Volume",
94391
+ availability_zone="us-east-1a",
94392
+ size=Size.gibibytes(125),
94393
+ volume_type=ec2.EbsDeviceVolumeType.GP3,
94394
+ throughput=125
93805
94395
  )
93806
-
93807
- volume.grant_attach_volume(role, [instance])
93808
94396
  '''
93809
94397
  if __debug__:
93810
94398
  type_hints = typing.get_type_hints(_typecheckingstub__fd11037db838f64c74264a09154568b99584932152ae7679e47051119dcaf1ed)
@@ -93818,6 +94406,7 @@ class VolumeProps:
93818
94406
  check_type(argname="argument size", value=size, expected_type=type_hints["size"])
93819
94407
  check_type(argname="argument snapshot_id", value=snapshot_id, expected_type=type_hints["snapshot_id"])
93820
94408
  check_type(argname="argument throughput", value=throughput, expected_type=type_hints["throughput"])
94409
+ check_type(argname="argument volume_initialization_rate", value=volume_initialization_rate, expected_type=type_hints["volume_initialization_rate"])
93821
94410
  check_type(argname="argument volume_name", value=volume_name, expected_type=type_hints["volume_name"])
93822
94411
  check_type(argname="argument volume_type", value=volume_type, expected_type=type_hints["volume_type"])
93823
94412
  self._values: typing.Dict[builtins.str, typing.Any] = {
@@ -93841,6 +94430,8 @@ class VolumeProps:
93841
94430
  self._values["snapshot_id"] = snapshot_id
93842
94431
  if throughput is not None:
93843
94432
  self._values["throughput"] = throughput
94433
+ if volume_initialization_rate is not None:
94434
+ self._values["volume_initialization_rate"] = volume_initialization_rate
93844
94435
  if volume_name is not None:
93845
94436
  self._values["volume_name"] = volume_name
93846
94437
  if volume_type is not None:
@@ -93922,7 +94513,7 @@ class VolumeProps:
93922
94513
  }
93923
94514
  }
93924
94515
 
93925
- :default: The default KMS key for the account, region, and EC2 service is used.
94516
+ :default: - The default KMS key for the account, region, and EC2 service is used.
93926
94517
  '''
93927
94518
  result = self._values.get("encryption_key")
93928
94519
  return typing.cast(typing.Optional[_IKey_5f11635f], result)
@@ -93960,7 +94551,7 @@ class VolumeProps:
93960
94551
  See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html
93961
94552
  for details on the allowable size for each type of volume.
93962
94553
 
93963
- :default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
94554
+ :default: - If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
93964
94555
  '''
93965
94556
  result = self._values.get("size")
93966
94557
  return typing.cast(typing.Optional[_Size_7b441c34], result)
@@ -93971,7 +94562,7 @@ class VolumeProps:
93971
94562
 
93972
94563
  You must specify either a snapshot ID or a volume size.
93973
94564
 
93974
- :default: The EBS volume is not created from a snapshot.
94565
+ :default: - The EBS volume is not created from a snapshot.
93975
94566
  '''
93976
94567
  result = self._values.get("snapshot_id")
93977
94568
  return typing.cast(typing.Optional[builtins.str], result)
@@ -93987,11 +94578,26 @@ class VolumeProps:
93987
94578
  result = self._values.get("throughput")
93988
94579
  return typing.cast(typing.Optional[jsii.Number], result)
93989
94580
 
94581
+ @builtins.property
94582
+ def volume_initialization_rate(self) -> typing.Optional[_Size_7b441c34]:
94583
+ '''Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), at which to download the snapshot blocks from Amazon S3 to the volume.
94584
+
94585
+ Valid range is between 100 and 300 MiB/s.
94586
+
94587
+ This parameter is supported only for volumes created from snapshots.
94588
+
94589
+ :default: undefined - The volume initialization rate is not set.
94590
+
94591
+ :see: https://docs.aws.amazon.com/ebs/latest/userguide/initalize-volume.html#volume-initialization-rate
94592
+ '''
94593
+ result = self._values.get("volume_initialization_rate")
94594
+ return typing.cast(typing.Optional[_Size_7b441c34], result)
94595
+
93990
94596
  @builtins.property
93991
94597
  def volume_name(self) -> typing.Optional[builtins.str]:
93992
94598
  '''The value of the physicalName property of this resource.
93993
94599
 
93994
- :default: The physical name will be allocated by CloudFormation at deployment time
94600
+ :default: - The physical name will be allocated by CloudFormation at deployment time
93995
94601
  '''
93996
94602
  result = self._values.get("volume_name")
93997
94603
  return typing.cast(typing.Optional[builtins.str], result)
@@ -97750,6 +98356,7 @@ class WindowsVersion(enum.Enum):
97750
98356
  jsii_type="aws-cdk-lib.aws_ec2.AmazonLinux2022ImageSsmParameterProps",
97751
98357
  jsii_struct_bases=[AmazonLinuxImageSsmParameterCommonOptions],
97752
98358
  name_mapping={
98359
+ "additional_cache_key": "additionalCacheKey",
97753
98360
  "cached_in_context": "cachedInContext",
97754
98361
  "user_data": "userData",
97755
98362
  "cpu_type": "cpuType",
@@ -97761,6 +98368,7 @@ class AmazonLinux2022ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOp
97761
98368
  def __init__(
97762
98369
  self,
97763
98370
  *,
98371
+ additional_cache_key: typing.Optional[builtins.str] = None,
97764
98372
  cached_in_context: typing.Optional[builtins.bool] = None,
97765
98373
  user_data: typing.Optional[UserData] = None,
97766
98374
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
@@ -97769,6 +98377,7 @@ class AmazonLinux2022ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOp
97769
98377
  ) -> None:
97770
98378
  '''Properties specific to al2022 images.
97771
98379
 
98380
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
97772
98381
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
97773
98382
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
97774
98383
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
@@ -97787,6 +98396,7 @@ class AmazonLinux2022ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOp
97787
98396
  # user_data: ec2.UserData
97788
98397
 
97789
98398
  amazon_linux2022_image_ssm_parameter_props = ec2.AmazonLinux2022ImageSsmParameterProps(
98399
+ additional_cache_key="additionalCacheKey",
97790
98400
  cached_in_context=False,
97791
98401
  cpu_type=ec2.AmazonLinuxCpuType.ARM_64,
97792
98402
  edition=ec2.AmazonLinuxEdition.STANDARD,
@@ -97796,12 +98406,15 @@ class AmazonLinux2022ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOp
97796
98406
  '''
97797
98407
  if __debug__:
97798
98408
  type_hints = typing.get_type_hints(_typecheckingstub__968329b6e3d88dbd1836e6234bc305a96628c570666cc423d4eeccc95dc92ab6)
98409
+ check_type(argname="argument additional_cache_key", value=additional_cache_key, expected_type=type_hints["additional_cache_key"])
97799
98410
  check_type(argname="argument cached_in_context", value=cached_in_context, expected_type=type_hints["cached_in_context"])
97800
98411
  check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
97801
98412
  check_type(argname="argument cpu_type", value=cpu_type, expected_type=type_hints["cpu_type"])
97802
98413
  check_type(argname="argument edition", value=edition, expected_type=type_hints["edition"])
97803
98414
  check_type(argname="argument kernel", value=kernel, expected_type=type_hints["kernel"])
97804
98415
  self._values: typing.Dict[builtins.str, typing.Any] = {}
98416
+ if additional_cache_key is not None:
98417
+ self._values["additional_cache_key"] = additional_cache_key
97805
98418
  if cached_in_context is not None:
97806
98419
  self._values["cached_in_context"] = cached_in_context
97807
98420
  if user_data is not None:
@@ -97813,6 +98426,15 @@ class AmazonLinux2022ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOp
97813
98426
  if kernel is not None:
97814
98427
  self._values["kernel"] = kernel
97815
98428
 
98429
+ @builtins.property
98430
+ def additional_cache_key(self) -> typing.Optional[builtins.str]:
98431
+ '''Adds an additional discriminator to the ``cdk.context.json`` cache key.
98432
+
98433
+ :default: - no additional cache key
98434
+ '''
98435
+ result = self._values.get("additional_cache_key")
98436
+ return typing.cast(typing.Optional[builtins.str], result)
98437
+
97816
98438
  @builtins.property
97817
98439
  def cached_in_context(self) -> typing.Optional[builtins.bool]:
97818
98440
  '''Whether the AMI ID is cached to be stable between deployments.
@@ -97888,6 +98510,7 @@ class AmazonLinux2022ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOp
97888
98510
  jsii_type="aws-cdk-lib.aws_ec2.AmazonLinux2023ImageSsmParameterProps",
97889
98511
  jsii_struct_bases=[AmazonLinuxImageSsmParameterCommonOptions],
97890
98512
  name_mapping={
98513
+ "additional_cache_key": "additionalCacheKey",
97891
98514
  "cached_in_context": "cachedInContext",
97892
98515
  "user_data": "userData",
97893
98516
  "cpu_type": "cpuType",
@@ -97899,6 +98522,7 @@ class AmazonLinux2023ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOp
97899
98522
  def __init__(
97900
98523
  self,
97901
98524
  *,
98525
+ additional_cache_key: typing.Optional[builtins.str] = None,
97902
98526
  cached_in_context: typing.Optional[builtins.bool] = None,
97903
98527
  user_data: typing.Optional[UserData] = None,
97904
98528
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
@@ -97907,6 +98531,7 @@ class AmazonLinux2023ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOp
97907
98531
  ) -> None:
97908
98532
  '''Properties specific to al2023 images.
97909
98533
 
98534
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
97910
98535
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
97911
98536
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
97912
98537
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
@@ -97918,32 +98543,52 @@ class AmazonLinux2023ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOp
97918
98543
  Example::
97919
98544
 
97920
98545
  # vpc: ec2.Vpc
98546
+ # instance_type: ec2.InstanceType
97921
98547
 
97922
98548
 
97923
- ec2.Instance(self, "LatestAl2023",
98549
+ # Amazon Linux 2
98550
+ ec2.Instance(self, "Instance2",
97924
98551
  vpc=vpc,
97925
- instance_type=ec2.InstanceType.of(ec2.InstanceClass.C7G, ec2.InstanceSize.LARGE),
97926
- machine_image=ec2.MachineImage.latest_amazon_linux2023(
97927
- cached_in_context=True
98552
+ instance_type=instance_type,
98553
+ machine_image=ec2.MachineImage.latest_amazon_linux2()
98554
+ )
98555
+
98556
+ # Amazon Linux 2 with kernel 5.x
98557
+ ec2.Instance(self, "Instance3",
98558
+ vpc=vpc,
98559
+ instance_type=instance_type,
98560
+ machine_image=ec2.MachineImage.latest_amazon_linux2(
98561
+ kernel=ec2.AmazonLinux2Kernel.KERNEL_5_10
97928
98562
  )
97929
98563
  )
97930
98564
 
97931
- # or
97932
- ec2.Instance(self, "LatestAl2023",
98565
+ # Amazon Linux 2023
98566
+ ec2.Instance(self, "Instance4",
98567
+ vpc=vpc,
98568
+ instance_type=instance_type,
98569
+ machine_image=ec2.MachineImage.latest_amazon_linux2023()
98570
+ )
98571
+
98572
+ # Graviton 3 Processor
98573
+ ec2.Instance(self, "Instance5",
97933
98574
  vpc=vpc,
97934
98575
  instance_type=ec2.InstanceType.of(ec2.InstanceClass.C7G, ec2.InstanceSize.LARGE),
97935
- # context cache is turned on by default
97936
- machine_image=ec2.AmazonLinux2023ImageSsmParameter()
98576
+ machine_image=ec2.MachineImage.latest_amazon_linux2023(
98577
+ cpu_type=ec2.AmazonLinuxCpuType.ARM_64
98578
+ )
97937
98579
  )
97938
98580
  '''
97939
98581
  if __debug__:
97940
98582
  type_hints = typing.get_type_hints(_typecheckingstub__d2a291560388da3a1deca6cc63773b445813e32521bbcf4ece1d3a557e2eda6b)
98583
+ check_type(argname="argument additional_cache_key", value=additional_cache_key, expected_type=type_hints["additional_cache_key"])
97941
98584
  check_type(argname="argument cached_in_context", value=cached_in_context, expected_type=type_hints["cached_in_context"])
97942
98585
  check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
97943
98586
  check_type(argname="argument cpu_type", value=cpu_type, expected_type=type_hints["cpu_type"])
97944
98587
  check_type(argname="argument edition", value=edition, expected_type=type_hints["edition"])
97945
98588
  check_type(argname="argument kernel", value=kernel, expected_type=type_hints["kernel"])
97946
98589
  self._values: typing.Dict[builtins.str, typing.Any] = {}
98590
+ if additional_cache_key is not None:
98591
+ self._values["additional_cache_key"] = additional_cache_key
97947
98592
  if cached_in_context is not None:
97948
98593
  self._values["cached_in_context"] = cached_in_context
97949
98594
  if user_data is not None:
@@ -97955,6 +98600,15 @@ class AmazonLinux2023ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOp
97955
98600
  if kernel is not None:
97956
98601
  self._values["kernel"] = kernel
97957
98602
 
98603
+ @builtins.property
98604
+ def additional_cache_key(self) -> typing.Optional[builtins.str]:
98605
+ '''Adds an additional discriminator to the ``cdk.context.json`` cache key.
98606
+
98607
+ :default: - no additional cache key
98608
+ '''
98609
+ result = self._values.get("additional_cache_key")
98610
+ return typing.cast(typing.Optional[builtins.str], result)
98611
+
97958
98612
  @builtins.property
97959
98613
  def cached_in_context(self) -> typing.Optional[builtins.bool]:
97960
98614
  '''Whether the AMI ID is cached to be stable between deployments.
@@ -98030,6 +98684,7 @@ class AmazonLinux2023ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOp
98030
98684
  jsii_type="aws-cdk-lib.aws_ec2.AmazonLinux2ImageSsmParameterProps",
98031
98685
  jsii_struct_bases=[AmazonLinuxImageSsmParameterCommonOptions],
98032
98686
  name_mapping={
98687
+ "additional_cache_key": "additionalCacheKey",
98033
98688
  "cached_in_context": "cachedInContext",
98034
98689
  "user_data": "userData",
98035
98690
  "cpu_type": "cpuType",
@@ -98043,6 +98698,7 @@ class AmazonLinux2ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOptio
98043
98698
  def __init__(
98044
98699
  self,
98045
98700
  *,
98701
+ additional_cache_key: typing.Optional[builtins.str] = None,
98046
98702
  cached_in_context: typing.Optional[builtins.bool] = None,
98047
98703
  user_data: typing.Optional[UserData] = None,
98048
98704
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
@@ -98053,6 +98709,7 @@ class AmazonLinux2ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOptio
98053
98709
  ) -> None:
98054
98710
  '''Properties specific to amzn2 images.
98055
98711
 
98712
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
98056
98713
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
98057
98714
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
98058
98715
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
@@ -98103,6 +98760,7 @@ class AmazonLinux2ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOptio
98103
98760
  '''
98104
98761
  if __debug__:
98105
98762
  type_hints = typing.get_type_hints(_typecheckingstub__8aa3dd8e9489482da5f68eebe827af2a2367490c7299028616bae30c26efbd55)
98763
+ check_type(argname="argument additional_cache_key", value=additional_cache_key, expected_type=type_hints["additional_cache_key"])
98106
98764
  check_type(argname="argument cached_in_context", value=cached_in_context, expected_type=type_hints["cached_in_context"])
98107
98765
  check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
98108
98766
  check_type(argname="argument cpu_type", value=cpu_type, expected_type=type_hints["cpu_type"])
@@ -98111,6 +98769,8 @@ class AmazonLinux2ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOptio
98111
98769
  check_type(argname="argument storage", value=storage, expected_type=type_hints["storage"])
98112
98770
  check_type(argname="argument virtualization", value=virtualization, expected_type=type_hints["virtualization"])
98113
98771
  self._values: typing.Dict[builtins.str, typing.Any] = {}
98772
+ if additional_cache_key is not None:
98773
+ self._values["additional_cache_key"] = additional_cache_key
98114
98774
  if cached_in_context is not None:
98115
98775
  self._values["cached_in_context"] = cached_in_context
98116
98776
  if user_data is not None:
@@ -98126,6 +98786,15 @@ class AmazonLinux2ImageSsmParameterProps(AmazonLinuxImageSsmParameterCommonOptio
98126
98786
  if virtualization is not None:
98127
98787
  self._values["virtualization"] = virtualization
98128
98788
 
98789
+ @builtins.property
98790
+ def additional_cache_key(self) -> typing.Optional[builtins.str]:
98791
+ '''Adds an additional discriminator to the ``cdk.context.json`` cache key.
98792
+
98793
+ :default: - no additional cache key
98794
+ '''
98795
+ result = self._values.get("additional_cache_key")
98796
+ return typing.cast(typing.Optional[builtins.str], result)
98797
+
98129
98798
  @builtins.property
98130
98799
  def cached_in_context(self) -> typing.Optional[builtins.bool]:
98131
98800
  '''Whether the AMI ID is cached to be stable between deployments.
@@ -98224,16 +98893,19 @@ class AmazonLinuxImageSsmParameterBase(
98224
98893
  self,
98225
98894
  *,
98226
98895
  parameter_name: builtins.str,
98896
+ additional_cache_key: typing.Optional[builtins.str] = None,
98227
98897
  cached_in_context: typing.Optional[builtins.bool] = None,
98228
98898
  user_data: typing.Optional[UserData] = None,
98229
98899
  ) -> None:
98230
98900
  '''
98231
98901
  :param parameter_name: The name of the SSM parameter that contains the AMI value.
98902
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
98232
98903
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
98233
98904
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
98234
98905
  '''
98235
98906
  props = AmazonLinuxImageSsmParameterBaseProps(
98236
98907
  parameter_name=parameter_name,
98908
+ additional_cache_key=additional_cache_key,
98237
98909
  cached_in_context=cached_in_context,
98238
98910
  user_data=user_data,
98239
98911
  )
@@ -102336,6 +103008,7 @@ class AmazonLinux2022ImageSsmParameter(
102336
103008
  # user_data: ec2.UserData
102337
103009
 
102338
103010
  amazon_linux2022_image_ssm_parameter = ec2.AmazonLinux2022ImageSsmParameter(
103011
+ additional_cache_key="additionalCacheKey",
102339
103012
  cached_in_context=False,
102340
103013
  cpu_type=ec2.AmazonLinuxCpuType.ARM_64,
102341
103014
  edition=ec2.AmazonLinuxEdition.STANDARD,
@@ -102350,6 +103023,7 @@ class AmazonLinux2022ImageSsmParameter(
102350
103023
  kernel: typing.Optional[AmazonLinux2022Kernel] = None,
102351
103024
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
102352
103025
  edition: typing.Optional[AmazonLinuxEdition] = None,
103026
+ additional_cache_key: typing.Optional[builtins.str] = None,
102353
103027
  cached_in_context: typing.Optional[builtins.bool] = None,
102354
103028
  user_data: typing.Optional[UserData] = None,
102355
103029
  ) -> None:
@@ -102357,6 +103031,7 @@ class AmazonLinux2022ImageSsmParameter(
102357
103031
  :param kernel: What kernel version of Amazon Linux to use. Default: AmazonLinux2022Kernel.DEFAULT
102358
103032
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
102359
103033
  :param edition: What edition of Amazon Linux to use. Default: AmazonLinuxEdition.Standard
103034
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
102360
103035
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
102361
103036
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
102362
103037
  '''
@@ -102364,6 +103039,7 @@ class AmazonLinux2022ImageSsmParameter(
102364
103039
  kernel=kernel,
102365
103040
  cpu_type=cpu_type,
102366
103041
  edition=edition,
103042
+ additional_cache_key=additional_cache_key,
102367
103043
  cached_in_context=cached_in_context,
102368
103044
  user_data=user_data,
102369
103045
  )
@@ -102378,6 +103054,7 @@ class AmazonLinux2022ImageSsmParameter(
102378
103054
  kernel: typing.Optional[AmazonLinux2022Kernel] = None,
102379
103055
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
102380
103056
  edition: typing.Optional[AmazonLinuxEdition] = None,
103057
+ additional_cache_key: typing.Optional[builtins.str] = None,
102381
103058
  cached_in_context: typing.Optional[builtins.bool] = None,
102382
103059
  user_data: typing.Optional[UserData] = None,
102383
103060
  ) -> builtins.str:
@@ -102397,6 +103074,7 @@ class AmazonLinux2022ImageSsmParameter(
102397
103074
  :param kernel: What kernel version of Amazon Linux to use. Default: AmazonLinux2022Kernel.DEFAULT
102398
103075
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
102399
103076
  :param edition: What edition of Amazon Linux to use. Default: AmazonLinuxEdition.Standard
103077
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
102400
103078
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
102401
103079
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
102402
103080
  '''
@@ -102404,6 +103082,7 @@ class AmazonLinux2022ImageSsmParameter(
102404
103082
  kernel=kernel,
102405
103083
  cpu_type=cpu_type,
102406
103084
  edition=edition,
103085
+ additional_cache_key=additional_cache_key,
102407
103086
  cached_in_context=cached_in_context,
102408
103087
  user_data=user_data,
102409
103088
  )
@@ -102428,17 +103107,18 @@ class AmazonLinux2023ImageSsmParameter(
102428
103107
  ec2.Instance(self, "LatestAl2023",
102429
103108
  vpc=vpc,
102430
103109
  instance_type=ec2.InstanceType.of(ec2.InstanceClass.C7G, ec2.InstanceSize.LARGE),
102431
- machine_image=ec2.MachineImage.latest_amazon_linux2023(
102432
- cached_in_context=True
103110
+ # context cache is turned on by default
103111
+ machine_image=ec2.AmazonLinux2023ImageSsmParameter(
103112
+ kernel=ec2.AmazonLinux2023Kernel.CDK_LATEST
102433
103113
  )
102434
103114
  )
102435
103115
 
102436
103116
  # or
103117
+
102437
103118
  ec2.Instance(self, "LatestAl2023",
102438
103119
  vpc=vpc,
102439
103120
  instance_type=ec2.InstanceType.of(ec2.InstanceClass.C7G, ec2.InstanceSize.LARGE),
102440
- # context cache is turned on by default
102441
- machine_image=ec2.AmazonLinux2023ImageSsmParameter()
103121
+ machine_image=ec2.MachineImage.latest_amazon_linux2023()
102442
103122
  )
102443
103123
  '''
102444
103124
 
@@ -102448,6 +103128,7 @@ class AmazonLinux2023ImageSsmParameter(
102448
103128
  kernel: typing.Optional[AmazonLinux2023Kernel] = None,
102449
103129
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
102450
103130
  edition: typing.Optional[AmazonLinuxEdition] = None,
103131
+ additional_cache_key: typing.Optional[builtins.str] = None,
102451
103132
  cached_in_context: typing.Optional[builtins.bool] = None,
102452
103133
  user_data: typing.Optional[UserData] = None,
102453
103134
  ) -> None:
@@ -102455,6 +103136,7 @@ class AmazonLinux2023ImageSsmParameter(
102455
103136
  :param kernel: What kernel version of Amazon Linux to use. Default: AmazonLinux2023Kernel.DEFAULT
102456
103137
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
102457
103138
  :param edition: What edition of Amazon Linux to use. Default: AmazonLinuxEdition.Standard
103139
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
102458
103140
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
102459
103141
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
102460
103142
  '''
@@ -102462,6 +103144,7 @@ class AmazonLinux2023ImageSsmParameter(
102462
103144
  kernel=kernel,
102463
103145
  cpu_type=cpu_type,
102464
103146
  edition=edition,
103147
+ additional_cache_key=additional_cache_key,
102465
103148
  cached_in_context=cached_in_context,
102466
103149
  user_data=user_data,
102467
103150
  )
@@ -102476,6 +103159,7 @@ class AmazonLinux2023ImageSsmParameter(
102476
103159
  kernel: typing.Optional[AmazonLinux2023Kernel] = None,
102477
103160
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
102478
103161
  edition: typing.Optional[AmazonLinuxEdition] = None,
103162
+ additional_cache_key: typing.Optional[builtins.str] = None,
102479
103163
  cached_in_context: typing.Optional[builtins.bool] = None,
102480
103164
  user_data: typing.Optional[UserData] = None,
102481
103165
  ) -> builtins.str:
@@ -102495,6 +103179,7 @@ class AmazonLinux2023ImageSsmParameter(
102495
103179
  :param kernel: What kernel version of Amazon Linux to use. Default: AmazonLinux2023Kernel.DEFAULT
102496
103180
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
102497
103181
  :param edition: What edition of Amazon Linux to use. Default: AmazonLinuxEdition.Standard
103182
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
102498
103183
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
102499
103184
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
102500
103185
  '''
@@ -102502,6 +103187,7 @@ class AmazonLinux2023ImageSsmParameter(
102502
103187
  kernel=kernel,
102503
103188
  cpu_type=cpu_type,
102504
103189
  edition=edition,
103190
+ additional_cache_key=additional_cache_key,
102505
103191
  cached_in_context=cached_in_context,
102506
103192
  user_data=user_data,
102507
103193
  )
@@ -102528,6 +103214,7 @@ class AmazonLinux2ImageSsmParameter(
102528
103214
  # user_data: ec2.UserData
102529
103215
 
102530
103216
  amazon_linux2_image_ssm_parameter = ec2.AmazonLinux2ImageSsmParameter(
103217
+ additional_cache_key="additionalCacheKey",
102531
103218
  cached_in_context=False,
102532
103219
  cpu_type=ec2.AmazonLinuxCpuType.ARM_64,
102533
103220
  edition=ec2.AmazonLinuxEdition.STANDARD,
@@ -102546,6 +103233,7 @@ class AmazonLinux2ImageSsmParameter(
102546
103233
  virtualization: typing.Optional[AmazonLinuxVirt] = None,
102547
103234
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
102548
103235
  edition: typing.Optional[AmazonLinuxEdition] = None,
103236
+ additional_cache_key: typing.Optional[builtins.str] = None,
102549
103237
  cached_in_context: typing.Optional[builtins.bool] = None,
102550
103238
  user_data: typing.Optional[UserData] = None,
102551
103239
  ) -> None:
@@ -102555,6 +103243,7 @@ class AmazonLinux2ImageSsmParameter(
102555
103243
  :param virtualization: Virtualization type. Default: HVM
102556
103244
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
102557
103245
  :param edition: What edition of Amazon Linux to use. Default: AmazonLinuxEdition.Standard
103246
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
102558
103247
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
102559
103248
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
102560
103249
  '''
@@ -102564,6 +103253,7 @@ class AmazonLinux2ImageSsmParameter(
102564
103253
  virtualization=virtualization,
102565
103254
  cpu_type=cpu_type,
102566
103255
  edition=edition,
103256
+ additional_cache_key=additional_cache_key,
102567
103257
  cached_in_context=cached_in_context,
102568
103258
  user_data=user_data,
102569
103259
  )
@@ -102580,6 +103270,7 @@ class AmazonLinux2ImageSsmParameter(
102580
103270
  virtualization: typing.Optional[AmazonLinuxVirt] = None,
102581
103271
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
102582
103272
  edition: typing.Optional[AmazonLinuxEdition] = None,
103273
+ additional_cache_key: typing.Optional[builtins.str] = None,
102583
103274
  cached_in_context: typing.Optional[builtins.bool] = None,
102584
103275
  user_data: typing.Optional[UserData] = None,
102585
103276
  ) -> builtins.str:
@@ -102601,6 +103292,7 @@ class AmazonLinux2ImageSsmParameter(
102601
103292
  :param virtualization: Virtualization type. Default: HVM
102602
103293
  :param cpu_type: CPU Type. Default: AmazonLinuxCpuType.X86_64
102603
103294
  :param edition: What edition of Amazon Linux to use. Default: AmazonLinuxEdition.Standard
103295
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
102604
103296
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
102605
103297
  :param user_data: Initial user data. Default: - Empty UserData for Linux machines
102606
103298
  '''
@@ -102610,6 +103302,7 @@ class AmazonLinux2ImageSsmParameter(
102610
103302
  virtualization=virtualization,
102611
103303
  cpu_type=cpu_type,
102612
103304
  edition=edition,
103305
+ additional_cache_key=additional_cache_key,
102613
103306
  cached_in_context=cached_in_context,
102614
103307
  user_data=user_data,
102615
103308
  )
@@ -102654,6 +103347,7 @@ class AmazonLinuxImage(
102654
103347
  def __init__(
102655
103348
  self,
102656
103349
  *,
103350
+ additional_cache_key: typing.Optional[builtins.str] = None,
102657
103351
  cached_in_context: typing.Optional[builtins.bool] = None,
102658
103352
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
102659
103353
  edition: typing.Optional[AmazonLinuxEdition] = None,
@@ -102664,6 +103358,7 @@ class AmazonLinuxImage(
102664
103358
  virtualization: typing.Optional[AmazonLinuxVirt] = None,
102665
103359
  ) -> None:
102666
103360
  '''
103361
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
102667
103362
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
102668
103363
  :param cpu_type: CPU Type. Default: X86_64
102669
103364
  :param edition: What edition of Amazon Linux to use. Default: Standard
@@ -102674,6 +103369,7 @@ class AmazonLinuxImage(
102674
103369
  :param virtualization: Virtualization type. Default: HVM
102675
103370
  '''
102676
103371
  props = AmazonLinuxImageProps(
103372
+ additional_cache_key=additional_cache_key,
102677
103373
  cached_in_context=cached_in_context,
102678
103374
  cpu_type=cpu_type,
102679
103375
  edition=edition,
@@ -102691,6 +103387,7 @@ class AmazonLinuxImage(
102691
103387
  def ssm_parameter_name(
102692
103388
  cls,
102693
103389
  *,
103390
+ additional_cache_key: typing.Optional[builtins.str] = None,
102694
103391
  cached_in_context: typing.Optional[builtins.bool] = None,
102695
103392
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
102696
103393
  edition: typing.Optional[AmazonLinuxEdition] = None,
@@ -102702,6 +103399,7 @@ class AmazonLinuxImage(
102702
103399
  ) -> builtins.str:
102703
103400
  '''Return the SSM parameter name that will contain the Amazon Linux image with the given attributes.
102704
103401
 
103402
+ :param additional_cache_key: Adds an additional discriminator to the ``cdk.context.json`` cache key. Default: - no additional cache key
102705
103403
  :param cached_in_context: Whether the AMI ID is cached to be stable between deployments. By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on. If set to true, the AMI ID will be cached in ``cdk.context.json`` and the same value will be used on future runs. Your instances will not be replaced but your AMI version will grow old over time. To refresh the AMI lookup, you will have to evict the value from the cache using the ``cdk context`` command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information. Can not be set to ``true`` in environment-agnostic stacks. Default: false
102706
103404
  :param cpu_type: CPU Type. Default: X86_64
102707
103405
  :param edition: What edition of Amazon Linux to use. Default: Standard
@@ -102712,6 +103410,7 @@ class AmazonLinuxImage(
102712
103410
  :param virtualization: Virtualization type. Default: HVM
102713
103411
  '''
102714
103412
  props = AmazonLinuxImageProps(
103413
+ additional_cache_key=additional_cache_key,
102715
103414
  cached_in_context=cached_in_context,
102716
103415
  cpu_type=cpu_type,
102717
103416
  edition=edition,
@@ -103680,6 +104379,7 @@ def _typecheckingstub__3d9d80aebc17990a8f3419f9444ec1fdd3e5bc1c150c3db0d42eda409
103680
104379
 
103681
104380
  def _typecheckingstub__dd95a518c06563a07debc9bf1ca51713b747cf64bded6f7cc81a28680d7ea9fc(
103682
104381
  *,
104382
+ additional_cache_key: typing.Optional[builtins.str] = None,
103683
104383
  cached_in_context: typing.Optional[builtins.bool] = None,
103684
104384
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
103685
104385
  edition: typing.Optional[AmazonLinuxEdition] = None,
@@ -103694,6 +104394,7 @@ def _typecheckingstub__dd95a518c06563a07debc9bf1ca51713b747cf64bded6f7cc81a28680
103694
104394
 
103695
104395
  def _typecheckingstub__08eb71b09afb1d361b3f043a5c2d7d4be91f84b114302afefc8a69963ee6333f(
103696
104396
  *,
104397
+ additional_cache_key: typing.Optional[builtins.str] = None,
103697
104398
  cached_in_context: typing.Optional[builtins.bool] = None,
103698
104399
  user_data: typing.Optional[UserData] = None,
103699
104400
  ) -> None:
@@ -103702,6 +104403,7 @@ def _typecheckingstub__08eb71b09afb1d361b3f043a5c2d7d4be91f84b114302afefc8a69963
103702
104403
 
103703
104404
  def _typecheckingstub__78a32cfc14171e780d6e44d3e6a99faa6da50655ac09560f7b229b0c0c7383f1(
103704
104405
  *,
104406
+ additional_cache_key: typing.Optional[builtins.str] = None,
103705
104407
  cached_in_context: typing.Optional[builtins.bool] = None,
103706
104408
  user_data: typing.Optional[UserData] = None,
103707
104409
  parameter_name: builtins.str,
@@ -103711,6 +104413,7 @@ def _typecheckingstub__78a32cfc14171e780d6e44d3e6a99faa6da50655ac09560f7b229b0c0
103711
104413
 
103712
104414
  def _typecheckingstub__8fcdd01a6ab45c77447fba339b5a9358c3ab40c4833c1f86c68009a6a3bb1422(
103713
104415
  *,
104416
+ additional_cache_key: typing.Optional[builtins.str] = None,
103714
104417
  cached_in_context: typing.Optional[builtins.bool] = None,
103715
104418
  user_data: typing.Optional[UserData] = None,
103716
104419
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
@@ -104860,6 +105563,16 @@ def _typecheckingstub__af90912c9ac24abaec82396197e6a69e4a9b7287343456143c11dce76
104860
105563
  """Type checking stubs"""
104861
105564
  pass
104862
105565
 
105566
+ def _typecheckingstub__2ac1bca7bdb78c6a00383adcdf8e49157dfa7db32559bd0d8033ff9f9ea819c7(
105567
+ *,
105568
+ device_name: typing.Optional[builtins.str] = None,
105569
+ ebs: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnEC2Fleet.EbsBlockDeviceProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
105570
+ no_device: typing.Optional[builtins.str] = None,
105571
+ virtual_name: typing.Optional[builtins.str] = None,
105572
+ ) -> None:
105573
+ """Type checking stubs"""
105574
+ pass
105575
+
104863
105576
  def _typecheckingstub__1c9644ecfacce71230069287c64c15045d2faa220f98ae11e6e91993204231d1(
104864
105577
  *,
104865
105578
  replacement_strategy: typing.Optional[builtins.str] = None,
@@ -104882,6 +105595,19 @@ def _typecheckingstub__2e29954f7c2c9dfcf753ab53031041abbaad5b5371796092fa6a7e5ca
104882
105595
  """Type checking stubs"""
104883
105596
  pass
104884
105597
 
105598
+ def _typecheckingstub__98937edeb55103aa31b4f310bc1c5cdf31ffd54c5c2d451314118a9d43196bbd(
105599
+ *,
105600
+ delete_on_termination: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
105601
+ encrypted: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
105602
+ iops: typing.Optional[jsii.Number] = None,
105603
+ kms_key_id: typing.Optional[builtins.str] = None,
105604
+ snapshot_id: typing.Optional[builtins.str] = None,
105605
+ volume_size: typing.Optional[jsii.Number] = None,
105606
+ volume_type: typing.Optional[builtins.str] = None,
105607
+ ) -> None:
105608
+ """Type checking stubs"""
105609
+ pass
105610
+
104885
105611
  def _typecheckingstub__a16391ac858f174f4e714e8b72b94e7e61e1b50ead8e638dff708e3d739752d5(
104886
105612
  *,
104887
105613
  launch_template_specification: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
@@ -104893,6 +105619,7 @@ def _typecheckingstub__a16391ac858f174f4e714e8b72b94e7e61e1b50ead8e638dff708e3d7
104893
105619
  def _typecheckingstub__d758750d188cce1b749f19591d20310ad5bc697f0e6f94f495c9619297998763(
104894
105620
  *,
104895
105621
  availability_zone: typing.Optional[builtins.str] = None,
105622
+ block_device_mappings: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union[CfnEC2Fleet.BlockDeviceMappingProperty, typing.Dict[builtins.str, typing.Any]]]]]] = None,
104896
105623
  instance_requirements: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnEC2Fleet.InstanceRequirementsRequestProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
104897
105624
  instance_type: typing.Optional[builtins.str] = None,
104898
105625
  max_price: typing.Optional[builtins.str] = None,
@@ -114862,6 +115589,7 @@ def _typecheckingstub__866a74bec8e14dd27073a82d4ff7b25ab450e0eff08b7026d08431998
114862
115589
  def _typecheckingstub__9c44b2bd75c4714250889165d6fd2d06ab6a906b90c817320a7c5f526dcbfc2f(
114863
115590
  *,
114864
115591
  name: builtins.str,
115592
+ additional_cache_key: typing.Optional[builtins.str] = None,
114865
115593
  filters: typing.Optional[typing.Mapping[builtins.str, typing.Sequence[builtins.str]]] = None,
114866
115594
  owners: typing.Optional[typing.Sequence[builtins.str]] = None,
114867
115595
  user_data: typing.Optional[UserData] = None,
@@ -114873,6 +115601,7 @@ def _typecheckingstub__9c44b2bd75c4714250889165d6fd2d06ab6a906b90c817320a7c5f526
114873
115601
  def _typecheckingstub__677afd5ea9b4639913a489ab67346107c0d290e015be12483e980d3a19e33a6e(
114874
115602
  parameter_name: builtins.str,
114875
115603
  *,
115604
+ additional_cache_key: typing.Optional[builtins.str] = None,
114876
115605
  cached_in_context: typing.Optional[builtins.bool] = None,
114877
115606
  os: typing.Optional[OperatingSystemType] = None,
114878
115607
  parameter_version: typing.Optional[builtins.str] = None,
@@ -114908,6 +115637,7 @@ def _typecheckingstub__0340fbf48f206279d16bd5e5e0956522ca9a19ba8d39aa2efcc7d06b4
114908
115637
  def _typecheckingstub__5e832dd82a3ef447ebf9a639dc9d6983793ce7321287fb2370dbed898b67d02a(
114909
115638
  parameter_name: builtins.str,
114910
115639
  *,
115640
+ additional_cache_key: typing.Optional[builtins.str] = None,
114911
115641
  cached_in_context: typing.Optional[builtins.bool] = None,
114912
115642
  os: typing.Optional[OperatingSystemType] = None,
114913
115643
  parameter_version: typing.Optional[builtins.str] = None,
@@ -115239,6 +115969,7 @@ def _typecheckingstub__fb9c21f15b378acd78737933455e65f7bb8b078652a7ac4ee6c129501
115239
115969
  def _typecheckingstub__ae85933c688e38a0dd9faa69a685488b55c8c19f918eabcacbd33c964c7bb468(
115240
115970
  parameter_name: builtins.str,
115241
115971
  *,
115972
+ additional_cache_key: typing.Optional[builtins.str] = None,
115242
115973
  cached_in_context: typing.Optional[builtins.bool] = None,
115243
115974
  os: typing.Optional[OperatingSystemType] = None,
115244
115975
  parameter_version: typing.Optional[builtins.str] = None,
@@ -115391,6 +116122,7 @@ def _typecheckingstub__238a040275c82fe5911f2f1fd16a54d47e5937007b9647e86fefb63d0
115391
116122
 
115392
116123
  def _typecheckingstub__a03f16dc6f5eb3eb6f69587f84001af20bc314a1c46a530aa5fb21da814be237(
115393
116124
  *,
116125
+ additional_cache_key: typing.Optional[builtins.str] = None,
115394
116126
  cached_in_context: typing.Optional[builtins.bool] = None,
115395
116127
  os: typing.Optional[OperatingSystemType] = None,
115396
116128
  parameter_version: typing.Optional[builtins.str] = None,
@@ -115665,6 +116397,7 @@ def _typecheckingstub__7e030ab114373c1029fa90c55af2097b08d29de0c6045a2812c36b009
115665
116397
  size: typing.Optional[_Size_7b441c34] = None,
115666
116398
  snapshot_id: typing.Optional[builtins.str] = None,
115667
116399
  throughput: typing.Optional[jsii.Number] = None,
116400
+ volume_initialization_rate: typing.Optional[_Size_7b441c34] = None,
115668
116401
  volume_name: typing.Optional[builtins.str] = None,
115669
116402
  volume_type: typing.Optional[EbsDeviceVolumeType] = None,
115670
116403
  ) -> None:
@@ -115733,6 +116466,7 @@ def _typecheckingstub__fd11037db838f64c74264a09154568b99584932152ae7679e47051119
115733
116466
  size: typing.Optional[_Size_7b441c34] = None,
115734
116467
  snapshot_id: typing.Optional[builtins.str] = None,
115735
116468
  throughput: typing.Optional[jsii.Number] = None,
116469
+ volume_initialization_rate: typing.Optional[_Size_7b441c34] = None,
115736
116470
  volume_name: typing.Optional[builtins.str] = None,
115737
116471
  volume_type: typing.Optional[EbsDeviceVolumeType] = None,
115738
116472
  ) -> None:
@@ -116118,6 +116852,7 @@ def _typecheckingstub__a9243d0fea7f4d4e8b65c37925a1dbb71b6136866e6c28c37f9d5dc79
116118
116852
 
116119
116853
  def _typecheckingstub__968329b6e3d88dbd1836e6234bc305a96628c570666cc423d4eeccc95dc92ab6(
116120
116854
  *,
116855
+ additional_cache_key: typing.Optional[builtins.str] = None,
116121
116856
  cached_in_context: typing.Optional[builtins.bool] = None,
116122
116857
  user_data: typing.Optional[UserData] = None,
116123
116858
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
@@ -116129,6 +116864,7 @@ def _typecheckingstub__968329b6e3d88dbd1836e6234bc305a96628c570666cc423d4eeccc95
116129
116864
 
116130
116865
  def _typecheckingstub__d2a291560388da3a1deca6cc63773b445813e32521bbcf4ece1d3a557e2eda6b(
116131
116866
  *,
116867
+ additional_cache_key: typing.Optional[builtins.str] = None,
116132
116868
  cached_in_context: typing.Optional[builtins.bool] = None,
116133
116869
  user_data: typing.Optional[UserData] = None,
116134
116870
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,
@@ -116140,6 +116876,7 @@ def _typecheckingstub__d2a291560388da3a1deca6cc63773b445813e32521bbcf4ece1d3a557
116140
116876
 
116141
116877
  def _typecheckingstub__8aa3dd8e9489482da5f68eebe827af2a2367490c7299028616bae30c26efbd55(
116142
116878
  *,
116879
+ additional_cache_key: typing.Optional[builtins.str] = None,
116143
116880
  cached_in_context: typing.Optional[builtins.bool] = None,
116144
116881
  user_data: typing.Optional[UserData] = None,
116145
116882
  cpu_type: typing.Optional[AmazonLinuxCpuType] = None,