aws-cdk-lib 2.90.0__py3-none-any.whl → 2.92.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 (55) hide show
  1. aws_cdk/__init__.py +22 -4
  2. aws_cdk/_jsii/__init__.py +2 -2
  3. aws_cdk/_jsii/{aws-cdk-lib@2.90.0.jsii.tgz → aws-cdk-lib@2.92.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_appstream/__init__.py +3 -3
  5. aws_cdk/aws_batch/__init__.py +39 -18
  6. aws_cdk/aws_billingconductor/__init__.py +44 -13
  7. aws_cdk/aws_cleanrooms/__init__.py +2 -4
  8. aws_cdk/aws_cloudtrail/__init__.py +35 -10
  9. aws_cdk/aws_cloudwatch/__init__.py +3 -3
  10. aws_cdk/aws_codebuild/__init__.py +7 -7
  11. aws_cdk/aws_cognito/__init__.py +8 -8
  12. aws_cdk/aws_config/__init__.py +220 -0
  13. aws_cdk/aws_datasync/__init__.py +22 -35
  14. aws_cdk/aws_dms/__init__.py +909 -4
  15. aws_cdk/aws_dynamodb/__init__.py +0 -1
  16. aws_cdk/aws_ec2/__init__.py +59 -21
  17. aws_cdk/aws_ecs/__init__.py +45 -21
  18. aws_cdk/aws_evidently/__init__.py +3 -3
  19. aws_cdk/aws_fsx/__init__.py +6 -5
  20. aws_cdk/aws_glue/__init__.py +438 -10
  21. aws_cdk/aws_guardduty/__init__.py +60 -17
  22. aws_cdk/aws_iam/__init__.py +8 -9
  23. aws_cdk/aws_iot/__init__.py +5 -1
  24. aws_cdk/aws_kms/__init__.py +95 -47
  25. aws_cdk/aws_lambda/__init__.py +4 -2
  26. aws_cdk/aws_lambda_nodejs/__init__.py +3 -3
  27. aws_cdk/aws_mediatailor/__init__.py +2902 -892
  28. aws_cdk/aws_mwaa/__init__.py +13 -8
  29. aws_cdk/aws_neptune/__init__.py +50 -2
  30. aws_cdk/aws_omics/__init__.py +80 -0
  31. aws_cdk/aws_opensearchserverless/__init__.py +3 -3
  32. aws_cdk/aws_opensearchservice/__init__.py +247 -14
  33. aws_cdk/aws_organizations/__init__.py +17 -17
  34. aws_cdk/aws_personalize/__init__.py +41 -25
  35. aws_cdk/aws_rds/__init__.py +24 -10
  36. aws_cdk/aws_resiliencehub/__init__.py +22 -22
  37. aws_cdk/aws_rolesanywhere/__init__.py +58 -74
  38. aws_cdk/aws_route53/__init__.py +3 -1
  39. aws_cdk/aws_s3/__init__.py +17 -7
  40. aws_cdk/aws_sagemaker/__init__.py +396 -5
  41. aws_cdk/aws_sns/__init__.py +8 -8
  42. aws_cdk/aws_sqs/__init__.py +231 -4
  43. aws_cdk/aws_ssm/__init__.py +6 -28
  44. aws_cdk/aws_stepfunctions/__init__.py +7 -7
  45. aws_cdk/aws_timestream/__init__.py +243 -0
  46. aws_cdk/aws_transfer/__init__.py +250 -52
  47. aws_cdk/aws_vpclattice/__init__.py +10 -6
  48. aws_cdk/aws_wafv2/__init__.py +7517 -5036
  49. aws_cdk/custom_resources/__init__.py +18 -30
  50. {aws_cdk_lib-2.90.0.dist-info → aws_cdk_lib-2.92.0.dist-info}/METADATA +8 -8
  51. {aws_cdk_lib-2.90.0.dist-info → aws_cdk_lib-2.92.0.dist-info}/RECORD +55 -55
  52. {aws_cdk_lib-2.90.0.dist-info → aws_cdk_lib-2.92.0.dist-info}/WHEEL +1 -1
  53. {aws_cdk_lib-2.90.0.dist-info → aws_cdk_lib-2.92.0.dist-info}/LICENSE +0 -0
  54. {aws_cdk_lib-2.90.0.dist-info → aws_cdk_lib-2.92.0.dist-info}/NOTICE +0 -0
  55. {aws_cdk_lib-2.90.0.dist-info → aws_cdk_lib-2.92.0.dist-info}/top_level.txt +0 -0
@@ -1477,7 +1477,7 @@ class CfnFilter(
1477
1477
  ) -> None:
1478
1478
  '''Represents a map of finding properties that match specified conditions and values when querying findings.
1479
1479
 
1480
- :param criterion: Represents a map of finding properties that match specified conditions and values when querying findings. For a mapping of JSON criterion to their console equivalent see `Finding criteria <https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_filter-findings.html#filter_criteria>`_ . The following are the available criterion: - accountId - region - confidence - id - resource.accessKeyDetails.accessKeyId - resource.accessKeyDetails.principalId - resource.accessKeyDetails.userName - resource.accessKeyDetails.userType - resource.instanceDetails.iamInstanceProfile.id - resource.instanceDetails.imageId - resource.instanceDetails.instanceId - resource.instanceDetails.outpostArn - resource.instanceDetails.networkInterfaces.ipv6Addresses - resource.instanceDetails.networkInterfaces.privateIpAddresses.privateIpAddress - resource.instanceDetails.networkInterfaces.publicDnsName - resource.instanceDetails.networkInterfaces.publicIp - resource.instanceDetails.networkInterfaces.securityGroups.groupId - resource.instanceDetails.networkInterfaces.securityGroups.groupName - resource.instanceDetails.networkInterfaces.subnetId - resource.instanceDetails.networkInterfaces.vpcId - resource.instanceDetails.tags.key - resource.instanceDetails.tags.value - resource.resourceType - service.action.actionType - service.action.awsApiCallAction.api - service.action.awsApiCallAction.callerType - service.action.awsApiCallAction.errorCode - service.action.awsApiCallAction.remoteIpDetails.city.cityName - service.action.awsApiCallAction.remoteIpDetails.country.countryName - service.action.awsApiCallAction.remoteIpDetails.ipAddressV4 - service.action.awsApiCallAction.remoteIpDetails.organization.asn - service.action.awsApiCallAction.remoteIpDetails.organization.asnOrg - service.action.awsApiCallAction.serviceName - service.action.dnsRequestAction.domain - service.action.networkConnectionAction.blocked - service.action.networkConnectionAction.connectionDirection - service.action.networkConnectionAction.localPortDetails.port - service.action.networkConnectionAction.protocol - service.action.networkConnectionAction.localIpDetails.ipAddressV4 - service.action.networkConnectionAction.remoteIpDetails.city.cityName - service.action.networkConnectionAction.remoteIpDetails.country.countryName - service.action.networkConnectionAction.remoteIpDetails.ipAddressV4 - service.action.networkConnectionAction.remoteIpDetails.organization.asn - service.action.networkConnectionAction.remoteIpDetails.organization.asnOrg - service.action.networkConnectionAction.remotePortDetails.port - service.additionalInfo.threatListName - service.archived When this attribute is set to TRUE, only archived findings are listed. When it's set to FALSE, only unarchived findings are listed. When this attribute is not set, all existing findings are listed. - service.resourceRole - severity - type - updatedAt Type: ISO 8601 string format: YYYY-MM-DDTHH:MM:SS.SSSZ or YYYY-MM-DDTHH:MM:SSZ depending on whether the value contains milliseconds.
1480
+ :param criterion: Represents a map of finding properties that match specified conditions and values when querying findings. For information about JSON criterion mapping to their console equivalent, see `Finding criteria <https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_filter-findings.html#filter_criteria>`_ . The following are the available criterion: - accountId - id - region - severity To filter on the basis of severity, API and CFN use the following input list for the condition: - *Low* : ``["1", "2", "3"]`` - *Medium* : ``["4", "5", "6"]`` - *High* : ``["7", "8", "9"]`` For more information, see `Severity levels for GuardDuty findings <https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_findings.html#guardduty_findings-severity>`_ . - type - updatedAt Type: ISO 8601 string format: YYYY-MM-DDTHH:MM:SS.SSSZ or YYYY-MM-DDTHH:MM:SSZ depending on whether the value contains milliseconds. - resource.accessKeyDetails.accessKeyId - resource.accessKeyDetails.principalId - resource.accessKeyDetails.userName - resource.accessKeyDetails.userType - resource.instanceDetails.iamInstanceProfile.id - resource.instanceDetails.imageId - resource.instanceDetails.instanceId - resource.instanceDetails.tags.key - resource.instanceDetails.tags.value - resource.instanceDetails.networkInterfaces.ipv6Addresses - resource.instanceDetails.networkInterfaces.privateIpAddresses.privateIpAddress - resource.instanceDetails.networkInterfaces.publicDnsName - resource.instanceDetails.networkInterfaces.publicIp - resource.instanceDetails.networkInterfaces.securityGroups.groupId - resource.instanceDetails.networkInterfaces.securityGroups.groupName - resource.instanceDetails.networkInterfaces.subnetId - resource.instanceDetails.networkInterfaces.vpcId - resource.instanceDetails.outpostArn - resource.resourceType - resource.s3BucketDetails.publicAccess.effectivePermissions - resource.s3BucketDetails.name - resource.s3BucketDetails.tags.key - resource.s3BucketDetails.tags.value - resource.s3BucketDetails.type - service.action.actionType - service.action.awsApiCallAction.api - service.action.awsApiCallAction.callerType - service.action.awsApiCallAction.errorCode - service.action.awsApiCallAction.remoteIpDetails.city.cityName - service.action.awsApiCallAction.remoteIpDetails.country.countryName - service.action.awsApiCallAction.remoteIpDetails.ipAddressV4 - service.action.awsApiCallAction.remoteIpDetails.organization.asn - service.action.awsApiCallAction.remoteIpDetails.organization.asnOrg - service.action.awsApiCallAction.serviceName - service.action.dnsRequestAction.domain - service.action.networkConnectionAction.blocked - service.action.networkConnectionAction.connectionDirection - service.action.networkConnectionAction.localPortDetails.port - service.action.networkConnectionAction.protocol - service.action.networkConnectionAction.remoteIpDetails.city.cityName - service.action.networkConnectionAction.remoteIpDetails.country.countryName - service.action.networkConnectionAction.remoteIpDetails.ipAddressV4 - service.action.networkConnectionAction.remoteIpDetails.organization.asn - service.action.networkConnectionAction.remoteIpDetails.organization.asnOrg - service.action.networkConnectionAction.remotePortDetails.port - service.action.awsApiCallAction.remoteAccountDetails.affiliated - service.action.kubernetesApiCallAction.remoteIpDetails.ipAddressV4 - service.action.kubernetesApiCallAction.requestUri - service.action.networkConnectionAction.localIpDetails.ipAddressV4 - service.action.networkConnectionAction.protocol - service.action.awsApiCallAction.serviceName - service.action.awsApiCallAction.remoteAccountDetails.accountId - service.additionalInfo.threatListName - service.resourceRole - resource.eksClusterDetails.name - resource.kubernetesDetails.kubernetesWorkloadDetails.name - resource.kubernetesDetails.kubernetesWorkloadDetails.namespace - resource.kubernetesDetails.kubernetesUserDetails.username - resource.kubernetesDetails.kubernetesWorkloadDetails.containers.image - resource.kubernetesDetails.kubernetesWorkloadDetails.containers.imagePrefix - service.ebsVolumeScanDetails.scanId - service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames.name - service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames.severity - service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames.filePaths.hash - resource.ecsClusterDetails.name - resource.ecsClusterDetails.taskDetails.containers.image - resource.ecsClusterDetails.taskDetails.definitionArn - resource.containerDetails.image - resource.rdsDbInstanceDetails.dbInstanceIdentifier - resource.rdsDbInstanceDetails.dbClusterIdentifier - resource.rdsDbInstanceDetails.engine - resource.rdsDbUserDetails.user - resource.rdsDbInstanceDetails.tags.key - resource.rdsDbInstanceDetails.tags.value - service.runtimeDetails.process.executableSha256 - service.runtimeDetails.process.name - service.runtimeDetails.process.name - resource.lambdaDetails.functionName - resource.lambdaDetails.functionArn - resource.lambdaDetails.tags.key - resource.lambdaDetails.tags.value
1481
1481
  :param item_type: Specifies the condition to be applied to a single field when filtering through findings.
1482
1482
 
1483
1483
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-filter-findingcriteria.html
@@ -1523,12 +1523,26 @@ class CfnFilter(
1523
1523
  def criterion(self) -> typing.Any:
1524
1524
  '''Represents a map of finding properties that match specified conditions and values when querying findings.
1525
1525
 
1526
- For a mapping of JSON criterion to their console equivalent see `Finding criteria <https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_filter-findings.html#filter_criteria>`_ . The following are the available criterion:
1526
+ For information about JSON criterion mapping to their console equivalent, see `Finding criteria <https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_filter-findings.html#filter_criteria>`_ . The following are the available criterion:
1527
1527
 
1528
1528
  - accountId
1529
- - region
1530
- - confidence
1531
1529
  - id
1530
+ - region
1531
+ - severity
1532
+
1533
+ To filter on the basis of severity, API and CFN use the following input list for the condition:
1534
+
1535
+ - *Low* : ``["1", "2", "3"]``
1536
+ - *Medium* : ``["4", "5", "6"]``
1537
+ - *High* : ``["7", "8", "9"]``
1538
+
1539
+ For more information, see `Severity levels for GuardDuty findings <https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_findings.html#guardduty_findings-severity>`_ .
1540
+
1541
+ - type
1542
+ - updatedAt
1543
+
1544
+ Type: ISO 8601 string format: YYYY-MM-DDTHH:MM:SS.SSSZ or YYYY-MM-DDTHH:MM:SSZ depending on whether the value contains milliseconds.
1545
+
1532
1546
  - resource.accessKeyDetails.accessKeyId
1533
1547
  - resource.accessKeyDetails.principalId
1534
1548
  - resource.accessKeyDetails.userName
@@ -1536,7 +1550,8 @@ class CfnFilter(
1536
1550
  - resource.instanceDetails.iamInstanceProfile.id
1537
1551
  - resource.instanceDetails.imageId
1538
1552
  - resource.instanceDetails.instanceId
1539
- - resource.instanceDetails.outpostArn
1553
+ - resource.instanceDetails.tags.key
1554
+ - resource.instanceDetails.tags.value
1540
1555
  - resource.instanceDetails.networkInterfaces.ipv6Addresses
1541
1556
  - resource.instanceDetails.networkInterfaces.privateIpAddresses.privateIpAddress
1542
1557
  - resource.instanceDetails.networkInterfaces.publicDnsName
@@ -1545,9 +1560,13 @@ class CfnFilter(
1545
1560
  - resource.instanceDetails.networkInterfaces.securityGroups.groupName
1546
1561
  - resource.instanceDetails.networkInterfaces.subnetId
1547
1562
  - resource.instanceDetails.networkInterfaces.vpcId
1548
- - resource.instanceDetails.tags.key
1549
- - resource.instanceDetails.tags.value
1563
+ - resource.instanceDetails.outpostArn
1550
1564
  - resource.resourceType
1565
+ - resource.s3BucketDetails.publicAccess.effectivePermissions
1566
+ - resource.s3BucketDetails.name
1567
+ - resource.s3BucketDetails.tags.key
1568
+ - resource.s3BucketDetails.tags.value
1569
+ - resource.s3BucketDetails.type
1551
1570
  - service.action.actionType
1552
1571
  - service.action.awsApiCallAction.api
1553
1572
  - service.action.awsApiCallAction.callerType
@@ -1563,24 +1582,48 @@ class CfnFilter(
1563
1582
  - service.action.networkConnectionAction.connectionDirection
1564
1583
  - service.action.networkConnectionAction.localPortDetails.port
1565
1584
  - service.action.networkConnectionAction.protocol
1566
- - service.action.networkConnectionAction.localIpDetails.ipAddressV4
1567
1585
  - service.action.networkConnectionAction.remoteIpDetails.city.cityName
1568
1586
  - service.action.networkConnectionAction.remoteIpDetails.country.countryName
1569
1587
  - service.action.networkConnectionAction.remoteIpDetails.ipAddressV4
1570
1588
  - service.action.networkConnectionAction.remoteIpDetails.organization.asn
1571
1589
  - service.action.networkConnectionAction.remoteIpDetails.organization.asnOrg
1572
1590
  - service.action.networkConnectionAction.remotePortDetails.port
1591
+ - service.action.awsApiCallAction.remoteAccountDetails.affiliated
1592
+ - service.action.kubernetesApiCallAction.remoteIpDetails.ipAddressV4
1593
+ - service.action.kubernetesApiCallAction.requestUri
1594
+ - service.action.networkConnectionAction.localIpDetails.ipAddressV4
1595
+ - service.action.networkConnectionAction.protocol
1596
+ - service.action.awsApiCallAction.serviceName
1597
+ - service.action.awsApiCallAction.remoteAccountDetails.accountId
1573
1598
  - service.additionalInfo.threatListName
1574
- - service.archived
1575
-
1576
- When this attribute is set to TRUE, only archived findings are listed. When it's set to FALSE, only unarchived findings are listed. When this attribute is not set, all existing findings are listed.
1577
-
1578
1599
  - service.resourceRole
1579
- - severity
1580
- - type
1581
- - updatedAt
1582
-
1583
- Type: ISO 8601 string format: YYYY-MM-DDTHH:MM:SS.SSSZ or YYYY-MM-DDTHH:MM:SSZ depending on whether the value contains milliseconds.
1600
+ - resource.eksClusterDetails.name
1601
+ - resource.kubernetesDetails.kubernetesWorkloadDetails.name
1602
+ - resource.kubernetesDetails.kubernetesWorkloadDetails.namespace
1603
+ - resource.kubernetesDetails.kubernetesUserDetails.username
1604
+ - resource.kubernetesDetails.kubernetesWorkloadDetails.containers.image
1605
+ - resource.kubernetesDetails.kubernetesWorkloadDetails.containers.imagePrefix
1606
+ - service.ebsVolumeScanDetails.scanId
1607
+ - service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames.name
1608
+ - service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames.severity
1609
+ - service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames.filePaths.hash
1610
+ - resource.ecsClusterDetails.name
1611
+ - resource.ecsClusterDetails.taskDetails.containers.image
1612
+ - resource.ecsClusterDetails.taskDetails.definitionArn
1613
+ - resource.containerDetails.image
1614
+ - resource.rdsDbInstanceDetails.dbInstanceIdentifier
1615
+ - resource.rdsDbInstanceDetails.dbClusterIdentifier
1616
+ - resource.rdsDbInstanceDetails.engine
1617
+ - resource.rdsDbUserDetails.user
1618
+ - resource.rdsDbInstanceDetails.tags.key
1619
+ - resource.rdsDbInstanceDetails.tags.value
1620
+ - service.runtimeDetails.process.executableSha256
1621
+ - service.runtimeDetails.process.name
1622
+ - service.runtimeDetails.process.name
1623
+ - resource.lambdaDetails.functionName
1624
+ - resource.lambdaDetails.functionArn
1625
+ - resource.lambdaDetails.tags.key
1626
+ - resource.lambdaDetails.tags.value
1584
1627
 
1585
1628
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-filter-findingcriteria.html#cfn-guardduty-filter-findingcriteria-criterion
1586
1629
  '''
@@ -3072,7 +3072,8 @@ class CfnPolicy(
3072
3072
  @builtins.property
3073
3073
  @jsii.member(jsii_name="attrId")
3074
3074
  def attr_id(self) -> builtins.str:
3075
- '''
3075
+ '''The provider-assigned unique ID for this resource.
3076
+
3076
3077
  :cloudformationAttribute: Id
3077
3078
  '''
3078
3079
  return typing.cast(builtins.str, jsii.get(self, "attrId"))
@@ -13384,18 +13385,16 @@ class User(
13384
13385
  ):
13385
13386
  '''Define a new IAM user.
13386
13387
 
13387
- :exampleMetadata: infused
13388
+ :exampleMetadata: lit=aws-iam/test/example.attaching.lit.ts infused
13388
13389
 
13389
13390
  Example::
13390
13391
 
13391
- # definition: sfn.IChainable
13392
- user = iam.User(self, "MyUser")
13393
- state_machine = sfn.StateMachine(self, "StateMachine",
13394
- definition=definition
13395
- )
13392
+ user = User(self, "MyUser", password=SecretValue.plain_text("1234"))
13393
+ group = Group(self, "MyGroup")
13396
13394
 
13397
- # give user permission to send task success to the state machine
13398
- state_machine.grant(user, "states:SendTaskSuccess")
13395
+ policy = Policy(self, "MyPolicy")
13396
+ policy.attach_to_user(user)
13397
+ group.attach_inline_policy(policy)
13399
13398
  '''
13400
13399
 
13401
13400
  def __init__(
@@ -9339,7 +9339,7 @@ class CfnSecurityProfile(
9339
9339
  '''A Device Defender security profile behavior.
9340
9340
 
9341
9341
  :param name: The name you've given to the behavior.
9342
- :param criteria: The criteria that determine if a device is behaving normally in regard to the ``metric`` .
9342
+ :param criteria: The criteria that determine if a device is behaving normally in regard to the ``metric`` . .. epigraph:: In the AWS IoT console, you can choose to be sent an alert through Amazon SNS when AWS IoT Device Defender detects that a device is behaving anomalously.
9343
9343
  :param metric: What is measured by the behavior.
9344
9344
  :param metric_dimension: The dimension of the metric.
9345
9345
  :param suppress_alerts: The alert status. If you set the value to ``true`` , alerts will be suppressed.
@@ -9422,6 +9422,10 @@ class CfnSecurityProfile(
9422
9422
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnSecurityProfile.BehaviorCriteriaProperty"]]:
9423
9423
  '''The criteria that determine if a device is behaving normally in regard to the ``metric`` .
9424
9424
 
9425
+ .. epigraph::
9426
+
9427
+ In the AWS IoT console, you can choose to be sent an alert through Amazon SNS when AWS IoT Device Defender detects that a device is behaving anomalously.
9428
+
9425
9429
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-securityprofile-behavior.html#cfn-iot-securityprofile-behavior-criteria
9426
9430
  '''
9427
9431
  result = self._values.get("criteria")
@@ -711,10 +711,11 @@ class CfnKey(
711
711
  scope: _constructs_77d1e7e8.Construct,
712
712
  id: builtins.str,
713
713
  *,
714
- key_policy: typing.Any,
714
+ bypass_policy_lockout_safety_check: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
715
715
  description: typing.Optional[builtins.str] = None,
716
716
  enabled: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
717
717
  enable_key_rotation: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
718
+ key_policy: typing.Any = None,
718
719
  key_spec: typing.Optional[builtins.str] = None,
719
720
  key_usage: typing.Optional[builtins.str] = None,
720
721
  multi_region: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
@@ -725,10 +726,11 @@ class CfnKey(
725
726
  '''
726
727
  :param scope: Scope in which this resource is defined.
727
728
  :param id: Construct identifier for this resource (unique in its scope).
728
- :param key_policy: The key policy that authorizes use of the KMS key. The key policy must conform to the following rules. - The key policy must allow the caller to make a subsequent `PutKeyPolicy <https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html>`_ request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam>`_ section of the **AWS Key Management Service Developer Guide** . - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to AWS KMS . When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to AWS KMS . For more information, see `Changes that I make are not always immediately visible <https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency>`_ in the *AWS Identity and Access Management User Guide* . If you are unsure of which policy to use, consider the *default key policy* . This is the key policy that AWS KMS applies to KMS keys that are created by using the CreateKey API with no specified key policy. It gives the AWS account that owns the key permission to perform all operations on the key. It also allows you write IAM policies to authorize access to the key. For details, see `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default>`_ in the *AWS Key Management Service Developer Guide* . A key policy document can include only the following characters: - Printable ASCII characters - Printable characters in the Basic Latin and Latin-1 Supplement character set - The tab ( ``\\u0009`` ), line feed ( ``\\u000A`` ), and carriage return ( ``\\u000D`` ) special characters *Minimum* : ``1`` *Maximum* : ``32768``
729
+ :param bypass_policy_lockout_safety_check: Skips ("bypasses") the key policy lockout safety check. The default value is false. Default: - false
729
730
  :param description: A description of the KMS key. Use a description that helps you to distinguish this KMS key from others in the account, such as its intended use.
730
731
  :param enabled: Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations. When ``Enabled`` is ``true`` , the *key state* of the KMS key is ``Enabled`` . When ``Enabled`` is ``false`` , the key state of the KMS key is ``Disabled`` . The default value is ``true`` . The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the `EnableKey <https://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html>`_ , `DisableKey <https://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html>`_ , or `ScheduleKeyDeletion <https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html>`_ operations. For information about the key states of a KMS key, see `Key state: Effect on your KMS key <https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html>`_ in the *AWS Key Management Service Developer Guide* .
731
732
  :param enable_key_rotation: Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled. AWS KMS supports automatic rotation only for symmetric encryption KMS keys ( ``KeySpec`` = ``SYMMETRIC_DEFAULT`` ). For asymmetric KMS keys and HMAC KMS keys, omit the ``EnableKeyRotation`` property or set it to ``false`` . To enable automatic key rotation of the key material for a multi-Region KMS key, set ``EnableKeyRotation`` to ``true`` on the primary key (created by using ``AWS::KMS::Key`` ). AWS KMS copies the rotation status to all replica keys. For details, see `Rotating multi-Region keys <https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate>`_ in the *AWS Key Management Service Developer Guide* . When you enable automatic rotation, AWS KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. AWS KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see `Rotating KMS keys <https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html>`_ in the *AWS Key Management Service Developer Guide* .
733
+ :param key_policy: The key policy that authorizes use of the KMS key. The key policy must conform to the following rules. - The key policy must allow the caller to make a subsequent `PutKeyPolicy <https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html>`_ request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam>`_ section of the **AWS Key Management Service Developer Guide** . - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to AWS KMS . When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to AWS KMS . For more information, see `Changes that I make are not always immediately visible <https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency>`_ in the *AWS Identity and Access Management User Guide* . If you are unsure of which policy to use, consider the *default key policy* . This is the key policy that AWS KMS applies to KMS keys that are created by using the CreateKey API with no specified key policy. It gives the AWS account that owns the key permission to perform all operations on the key. It also allows you write IAM policies to authorize access to the key. For details, see `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default>`_ in the *AWS Key Management Service Developer Guide* . A key policy document can include only the following characters: - Printable ASCII characters - Printable characters in the Basic Latin and Latin-1 Supplement character set - The tab ( ``\\u0009`` ), line feed ( ``\\u000A`` ), and carriage return ( ``\\u000D`` ) special characters *Minimum* : ``1`` *Maximum* : ``32768``
732
734
  :param key_spec: Specifies the type of KMS key to create. The default value, ``SYMMETRIC_DEFAULT`` , creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions, ``SYMMETRIC_DEFAULT`` creates a 128-bit symmetric key that uses SM4 encryption. You can't change the ``KeySpec`` value after the KMS key is created. For help choosing a key spec for your KMS key, see `Choosing a KMS key type <https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html>`_ in the *AWS Key Management Service Developer Guide* . The ``KeySpec`` property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see `AWS KMS condition keys <https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms>`_ in the *AWS Key Management Service Developer Guide* . .. epigraph:: If you change the value of the ``KeySpec`` property on an existing KMS key, the update request fails, regardless of the value of the ```UpdateReplacePolicy`` attribute <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html>`_ . This prevents you from accidentally deleting a KMS key by changing an immutable property value. > `AWS services that are integrated with AWS KMS <https://docs.aws.amazon.com/kms/features/#AWS_Service_Integration>`_ use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see `Identifying asymmetric KMS keys <https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html>`_ in the *AWS Key Management Service Developer Guide* . AWS KMS supports the following key specs for KMS keys: - Symmetric encryption key (default) - ``SYMMETRIC_DEFAULT`` (AES-256-GCM) - HMAC keys (symmetric) - ``HMAC_224`` - ``HMAC_256`` - ``HMAC_384`` - ``HMAC_512`` - Asymmetric RSA key pairs - ``RSA_2048`` - ``RSA_3072`` - ``RSA_4096`` - Asymmetric NIST-recommended elliptic curve key pairs - ``ECC_NIST_P256`` (secp256r1) - ``ECC_NIST_P384`` (secp384r1) - ``ECC_NIST_P521`` (secp521r1) - Other asymmetric elliptic curve key pairs - ``ECC_SECG_P256K1`` (secp256k1), commonly used for cryptocurrencies. - SM2 key pairs (China Regions only) - ``SM2`` Default: - "SYMMETRIC_DEFAULT"
733
735
  :param key_usage: Determines the `cryptographic operations <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations>`_ for which you can use the KMS key. The default value is ``ENCRYPT_DECRYPT`` . This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change the ``KeyUsage`` value after the KMS key is created. .. epigraph:: If you change the value of the ``KeyUsage`` property on an existing KMS key, the update request fails, regardless of the value of the ```UpdateReplacePolicy`` attribute <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html>`_ . This prevents you from accidentally deleting a KMS key by changing an immutable property value. Select only one valid value. - For symmetric encryption KMS keys, omit the property or specify ``ENCRYPT_DECRYPT`` . - For asymmetric KMS keys with RSA key material, specify ``ENCRYPT_DECRYPT`` or ``SIGN_VERIFY`` . - For asymmetric KMS keys with ECC key material, specify ``SIGN_VERIFY`` . - For asymmetric KMS keys with SM2 (China Regions only) key material, specify ``ENCRYPT_DECRYPT`` or ``SIGN_VERIFY`` . - For HMAC KMS keys, specify ``GENERATE_VERIFY_MAC`` . Default: - "ENCRYPT_DECRYPT"
734
736
  :param multi_region: Creates a multi-Region primary key that you can replicate in other AWS Regions . You can't change the ``MultiRegion`` value after the KMS key is created. For a list of AWS Regions in which multi-Region keys are supported, see `Multi-Region keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html>`_ in the ** . .. epigraph:: If you change the value of the ``MultiRegion`` property on an existing KMS key, the update request fails, regardless of the value of the ```UpdateReplacePolicy`` attribute <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html>`_ . This prevents you from accidentally deleting a KMS key by changing an immutable property value. For a multi-Region key, set to this property to ``true`` . For a single-Region key, omit this property or set it to ``false`` . The default value is ``false`` . *Multi-Region keys* are an AWS KMS feature that lets you create multiple interoperable KMS keys in different AWS Regions . Because these KMS keys have the same key ID, key material, and other metadata, you can use them to encrypt data in one AWS Region and decrypt it in a different AWS Region without making a cross-Region call or exposing the plaintext data. For more information, see `Multi-Region keys <https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html>`_ in the *AWS Key Management Service Developer Guide* . You can create a symmetric encryption, HMAC, or asymmetric multi-Region KMS key, and you can create a multi-Region key with imported key material. However, you cannot create a multi-Region key in a custom key store. To create a replica of this primary key in a different AWS Region , create an `AWS::KMS::ReplicaKey <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-replicakey.html>`_ resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key. Default: - false
@@ -741,10 +743,11 @@ class CfnKey(
741
743
  check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
742
744
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
743
745
  props = CfnKeyProps(
744
- key_policy=key_policy,
746
+ bypass_policy_lockout_safety_check=bypass_policy_lockout_safety_check,
745
747
  description=description,
746
748
  enabled=enabled,
747
749
  enable_key_rotation=enable_key_rotation,
750
+ key_policy=key_policy,
748
751
  key_spec=key_spec,
749
752
  key_usage=key_usage,
750
753
  multi_region=multi_region,
@@ -819,20 +822,22 @@ class CfnKey(
819
822
  return typing.cast(_TagManager_0a598cb3, jsii.get(self, "tags"))
820
823
 
821
824
  @builtins.property
822
- @jsii.member(jsii_name="keyPolicy")
823
- def key_policy(self) -> typing.Any:
824
- '''The key policy that authorizes use of the KMS key.
825
-
826
- The key policy must conform to the following rules.
827
- '''
828
- return typing.cast(typing.Any, jsii.get(self, "keyPolicy"))
825
+ @jsii.member(jsii_name="bypassPolicyLockoutSafetyCheck")
826
+ def bypass_policy_lockout_safety_check(
827
+ self,
828
+ ) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
829
+ '''Skips ("bypasses") the key policy lockout safety check.'''
830
+ return typing.cast(typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]], jsii.get(self, "bypassPolicyLockoutSafetyCheck"))
829
831
 
830
- @key_policy.setter
831
- def key_policy(self, value: typing.Any) -> None:
832
+ @bypass_policy_lockout_safety_check.setter
833
+ def bypass_policy_lockout_safety_check(
834
+ self,
835
+ value: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]],
836
+ ) -> None:
832
837
  if __debug__:
833
- type_hints = typing.get_type_hints(_typecheckingstub__cd3f4724ca140c9b1dca16904dd53ab0905d0688de411b0f60d4f538cb2ac4a2)
838
+ type_hints = typing.get_type_hints(_typecheckingstub__ba782ca88c8b210d0c18f73ecee5e7266ed06b7428c903676aca9b26b6490443)
834
839
  check_type(argname="argument value", value=value, expected_type=type_hints["value"])
835
- jsii.set(self, "keyPolicy", value)
840
+ jsii.set(self, "bypassPolicyLockoutSafetyCheck", value)
836
841
 
837
842
  @builtins.property
838
843
  @jsii.member(jsii_name="description")
@@ -886,6 +891,22 @@ class CfnKey(
886
891
  check_type(argname="argument value", value=value, expected_type=type_hints["value"])
887
892
  jsii.set(self, "enableKeyRotation", value)
888
893
 
894
+ @builtins.property
895
+ @jsii.member(jsii_name="keyPolicy")
896
+ def key_policy(self) -> typing.Any:
897
+ '''The key policy that authorizes use of the KMS key.
898
+
899
+ The key policy must conform to the following rules.
900
+ '''
901
+ return typing.cast(typing.Any, jsii.get(self, "keyPolicy"))
902
+
903
+ @key_policy.setter
904
+ def key_policy(self, value: typing.Any) -> None:
905
+ if __debug__:
906
+ type_hints = typing.get_type_hints(_typecheckingstub__cd3f4724ca140c9b1dca16904dd53ab0905d0688de411b0f60d4f538cb2ac4a2)
907
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
908
+ jsii.set(self, "keyPolicy", value)
909
+
889
910
  @builtins.property
890
911
  @jsii.member(jsii_name="keySpec")
891
912
  def key_spec(self) -> typing.Optional[builtins.str]:
@@ -974,10 +995,11 @@ class CfnKey(
974
995
  jsii_type="aws-cdk-lib.aws_kms.CfnKeyProps",
975
996
  jsii_struct_bases=[],
976
997
  name_mapping={
977
- "key_policy": "keyPolicy",
998
+ "bypass_policy_lockout_safety_check": "bypassPolicyLockoutSafetyCheck",
978
999
  "description": "description",
979
1000
  "enabled": "enabled",
980
1001
  "enable_key_rotation": "enableKeyRotation",
1002
+ "key_policy": "keyPolicy",
981
1003
  "key_spec": "keySpec",
982
1004
  "key_usage": "keyUsage",
983
1005
  "multi_region": "multiRegion",
@@ -990,10 +1012,11 @@ class CfnKeyProps:
990
1012
  def __init__(
991
1013
  self,
992
1014
  *,
993
- key_policy: typing.Any,
1015
+ bypass_policy_lockout_safety_check: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
994
1016
  description: typing.Optional[builtins.str] = None,
995
1017
  enabled: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
996
1018
  enable_key_rotation: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
1019
+ key_policy: typing.Any = None,
997
1020
  key_spec: typing.Optional[builtins.str] = None,
998
1021
  key_usage: typing.Optional[builtins.str] = None,
999
1022
  multi_region: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
@@ -1003,10 +1026,11 @@ class CfnKeyProps:
1003
1026
  ) -> None:
1004
1027
  '''Properties for defining a ``CfnKey``.
1005
1028
 
1006
- :param key_policy: The key policy that authorizes use of the KMS key. The key policy must conform to the following rules. - The key policy must allow the caller to make a subsequent `PutKeyPolicy <https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html>`_ request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam>`_ section of the **AWS Key Management Service Developer Guide** . - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to AWS KMS . When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to AWS KMS . For more information, see `Changes that I make are not always immediately visible <https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency>`_ in the *AWS Identity and Access Management User Guide* . If you are unsure of which policy to use, consider the *default key policy* . This is the key policy that AWS KMS applies to KMS keys that are created by using the CreateKey API with no specified key policy. It gives the AWS account that owns the key permission to perform all operations on the key. It also allows you write IAM policies to authorize access to the key. For details, see `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default>`_ in the *AWS Key Management Service Developer Guide* . A key policy document can include only the following characters: - Printable ASCII characters - Printable characters in the Basic Latin and Latin-1 Supplement character set - The tab ( ``\\u0009`` ), line feed ( ``\\u000A`` ), and carriage return ( ``\\u000D`` ) special characters *Minimum* : ``1`` *Maximum* : ``32768``
1029
+ :param bypass_policy_lockout_safety_check: Skips ("bypasses") the key policy lockout safety check. The default value is false. Default: - false
1007
1030
  :param description: A description of the KMS key. Use a description that helps you to distinguish this KMS key from others in the account, such as its intended use.
1008
1031
  :param enabled: Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations. When ``Enabled`` is ``true`` , the *key state* of the KMS key is ``Enabled`` . When ``Enabled`` is ``false`` , the key state of the KMS key is ``Disabled`` . The default value is ``true`` . The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the `EnableKey <https://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html>`_ , `DisableKey <https://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html>`_ , or `ScheduleKeyDeletion <https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html>`_ operations. For information about the key states of a KMS key, see `Key state: Effect on your KMS key <https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html>`_ in the *AWS Key Management Service Developer Guide* .
1009
1032
  :param enable_key_rotation: Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled. AWS KMS supports automatic rotation only for symmetric encryption KMS keys ( ``KeySpec`` = ``SYMMETRIC_DEFAULT`` ). For asymmetric KMS keys and HMAC KMS keys, omit the ``EnableKeyRotation`` property or set it to ``false`` . To enable automatic key rotation of the key material for a multi-Region KMS key, set ``EnableKeyRotation`` to ``true`` on the primary key (created by using ``AWS::KMS::Key`` ). AWS KMS copies the rotation status to all replica keys. For details, see `Rotating multi-Region keys <https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate>`_ in the *AWS Key Management Service Developer Guide* . When you enable automatic rotation, AWS KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. AWS KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see `Rotating KMS keys <https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html>`_ in the *AWS Key Management Service Developer Guide* .
1033
+ :param key_policy: The key policy that authorizes use of the KMS key. The key policy must conform to the following rules. - The key policy must allow the caller to make a subsequent `PutKeyPolicy <https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html>`_ request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam>`_ section of the **AWS Key Management Service Developer Guide** . - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to AWS KMS . When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to AWS KMS . For more information, see `Changes that I make are not always immediately visible <https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency>`_ in the *AWS Identity and Access Management User Guide* . If you are unsure of which policy to use, consider the *default key policy* . This is the key policy that AWS KMS applies to KMS keys that are created by using the CreateKey API with no specified key policy. It gives the AWS account that owns the key permission to perform all operations on the key. It also allows you write IAM policies to authorize access to the key. For details, see `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default>`_ in the *AWS Key Management Service Developer Guide* . A key policy document can include only the following characters: - Printable ASCII characters - Printable characters in the Basic Latin and Latin-1 Supplement character set - The tab ( ``\\u0009`` ), line feed ( ``\\u000A`` ), and carriage return ( ``\\u000D`` ) special characters *Minimum* : ``1`` *Maximum* : ``32768``
1010
1034
  :param key_spec: Specifies the type of KMS key to create. The default value, ``SYMMETRIC_DEFAULT`` , creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions, ``SYMMETRIC_DEFAULT`` creates a 128-bit symmetric key that uses SM4 encryption. You can't change the ``KeySpec`` value after the KMS key is created. For help choosing a key spec for your KMS key, see `Choosing a KMS key type <https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html>`_ in the *AWS Key Management Service Developer Guide* . The ``KeySpec`` property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see `AWS KMS condition keys <https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms>`_ in the *AWS Key Management Service Developer Guide* . .. epigraph:: If you change the value of the ``KeySpec`` property on an existing KMS key, the update request fails, regardless of the value of the ```UpdateReplacePolicy`` attribute <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html>`_ . This prevents you from accidentally deleting a KMS key by changing an immutable property value. > `AWS services that are integrated with AWS KMS <https://docs.aws.amazon.com/kms/features/#AWS_Service_Integration>`_ use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see `Identifying asymmetric KMS keys <https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html>`_ in the *AWS Key Management Service Developer Guide* . AWS KMS supports the following key specs for KMS keys: - Symmetric encryption key (default) - ``SYMMETRIC_DEFAULT`` (AES-256-GCM) - HMAC keys (symmetric) - ``HMAC_224`` - ``HMAC_256`` - ``HMAC_384`` - ``HMAC_512`` - Asymmetric RSA key pairs - ``RSA_2048`` - ``RSA_3072`` - ``RSA_4096`` - Asymmetric NIST-recommended elliptic curve key pairs - ``ECC_NIST_P256`` (secp256r1) - ``ECC_NIST_P384`` (secp384r1) - ``ECC_NIST_P521`` (secp521r1) - Other asymmetric elliptic curve key pairs - ``ECC_SECG_P256K1`` (secp256k1), commonly used for cryptocurrencies. - SM2 key pairs (China Regions only) - ``SM2`` Default: - "SYMMETRIC_DEFAULT"
1011
1035
  :param key_usage: Determines the `cryptographic operations <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations>`_ for which you can use the KMS key. The default value is ``ENCRYPT_DECRYPT`` . This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change the ``KeyUsage`` value after the KMS key is created. .. epigraph:: If you change the value of the ``KeyUsage`` property on an existing KMS key, the update request fails, regardless of the value of the ```UpdateReplacePolicy`` attribute <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html>`_ . This prevents you from accidentally deleting a KMS key by changing an immutable property value. Select only one valid value. - For symmetric encryption KMS keys, omit the property or specify ``ENCRYPT_DECRYPT`` . - For asymmetric KMS keys with RSA key material, specify ``ENCRYPT_DECRYPT`` or ``SIGN_VERIFY`` . - For asymmetric KMS keys with ECC key material, specify ``SIGN_VERIFY`` . - For asymmetric KMS keys with SM2 (China Regions only) key material, specify ``ENCRYPT_DECRYPT`` or ``SIGN_VERIFY`` . - For HMAC KMS keys, specify ``GENERATE_VERIFY_MAC`` . Default: - "ENCRYPT_DECRYPT"
1012
1036
  :param multi_region: Creates a multi-Region primary key that you can replicate in other AWS Regions . You can't change the ``MultiRegion`` value after the KMS key is created. For a list of AWS Regions in which multi-Region keys are supported, see `Multi-Region keys in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html>`_ in the ** . .. epigraph:: If you change the value of the ``MultiRegion`` property on an existing KMS key, the update request fails, regardless of the value of the ```UpdateReplacePolicy`` attribute <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html>`_ . This prevents you from accidentally deleting a KMS key by changing an immutable property value. For a multi-Region key, set to this property to ``true`` . For a single-Region key, omit this property or set it to ``false`` . The default value is ``false`` . *Multi-Region keys* are an AWS KMS feature that lets you create multiple interoperable KMS keys in different AWS Regions . Because these KMS keys have the same key ID, key material, and other metadata, you can use them to encrypt data in one AWS Region and decrypt it in a different AWS Region without making a cross-Region call or exposing the plaintext data. For more information, see `Multi-Region keys <https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html>`_ in the *AWS Key Management Service Developer Guide* . You can create a symmetric encryption, HMAC, or asymmetric multi-Region KMS key, and you can create a multi-Region key with imported key material. However, you cannot create a multi-Region key in a custom key store. To create a replica of this primary key in a different AWS Region , create an `AWS::KMS::ReplicaKey <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-replicakey.html>`_ resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key. Default: - false
@@ -1026,12 +1050,11 @@ class CfnKeyProps:
1026
1050
  # key_policy: Any
1027
1051
 
1028
1052
  cfn_key_props = kms.CfnKeyProps(
1029
- key_policy=key_policy,
1030
-
1031
- # the properties below are optional
1053
+ bypass_policy_lockout_safety_check=False,
1032
1054
  description="description",
1033
1055
  enabled=False,
1034
1056
  enable_key_rotation=False,
1057
+ key_policy=key_policy,
1035
1058
  key_spec="keySpec",
1036
1059
  key_usage="keyUsage",
1037
1060
  multi_region=False,
@@ -1045,25 +1068,28 @@ class CfnKeyProps:
1045
1068
  '''
1046
1069
  if __debug__:
1047
1070
  type_hints = typing.get_type_hints(_typecheckingstub__52751771c8b3e52917eaf0c78bad67c065fa3f95795e92f5eab3e92ce5051178)
1048
- check_type(argname="argument key_policy", value=key_policy, expected_type=type_hints["key_policy"])
1071
+ check_type(argname="argument bypass_policy_lockout_safety_check", value=bypass_policy_lockout_safety_check, expected_type=type_hints["bypass_policy_lockout_safety_check"])
1049
1072
  check_type(argname="argument description", value=description, expected_type=type_hints["description"])
1050
1073
  check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
1051
1074
  check_type(argname="argument enable_key_rotation", value=enable_key_rotation, expected_type=type_hints["enable_key_rotation"])
1075
+ check_type(argname="argument key_policy", value=key_policy, expected_type=type_hints["key_policy"])
1052
1076
  check_type(argname="argument key_spec", value=key_spec, expected_type=type_hints["key_spec"])
1053
1077
  check_type(argname="argument key_usage", value=key_usage, expected_type=type_hints["key_usage"])
1054
1078
  check_type(argname="argument multi_region", value=multi_region, expected_type=type_hints["multi_region"])
1055
1079
  check_type(argname="argument origin", value=origin, expected_type=type_hints["origin"])
1056
1080
  check_type(argname="argument pending_window_in_days", value=pending_window_in_days, expected_type=type_hints["pending_window_in_days"])
1057
1081
  check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
1058
- self._values: typing.Dict[builtins.str, typing.Any] = {
1059
- "key_policy": key_policy,
1060
- }
1082
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
1083
+ if bypass_policy_lockout_safety_check is not None:
1084
+ self._values["bypass_policy_lockout_safety_check"] = bypass_policy_lockout_safety_check
1061
1085
  if description is not None:
1062
1086
  self._values["description"] = description
1063
1087
  if enabled is not None:
1064
1088
  self._values["enabled"] = enabled
1065
1089
  if enable_key_rotation is not None:
1066
1090
  self._values["enable_key_rotation"] = enable_key_rotation
1091
+ if key_policy is not None:
1092
+ self._values["key_policy"] = key_policy
1067
1093
  if key_spec is not None:
1068
1094
  self._values["key_spec"] = key_spec
1069
1095
  if key_usage is not None:
@@ -1078,29 +1104,19 @@ class CfnKeyProps:
1078
1104
  self._values["tags"] = tags
1079
1105
 
1080
1106
  @builtins.property
1081
- def key_policy(self) -> typing.Any:
1082
- '''The key policy that authorizes use of the KMS key. The key policy must conform to the following rules.
1083
-
1084
- - The key policy must allow the caller to make a subsequent `PutKeyPolicy <https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html>`_ request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam>`_ section of the **AWS Key Management Service Developer Guide** .
1085
- - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to AWS KMS . When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to AWS KMS . For more information, see `Changes that I make are not always immediately visible <https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency>`_ in the *AWS Identity and Access Management User Guide* .
1086
-
1087
- If you are unsure of which policy to use, consider the *default key policy* . This is the key policy that AWS KMS applies to KMS keys that are created by using the CreateKey API with no specified key policy. It gives the AWS account that owns the key permission to perform all operations on the key. It also allows you write IAM policies to authorize access to the key. For details, see `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default>`_ in the *AWS Key Management Service Developer Guide* .
1088
-
1089
- A key policy document can include only the following characters:
1090
-
1091
- - Printable ASCII characters
1092
- - Printable characters in the Basic Latin and Latin-1 Supplement character set
1093
- - The tab ( ``\\u0009`` ), line feed ( ``\\u000A`` ), and carriage return ( ``\\u000D`` ) special characters
1107
+ def bypass_policy_lockout_safety_check(
1108
+ self,
1109
+ ) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
1110
+ '''Skips ("bypasses") the key policy lockout safety check.
1094
1111
 
1095
- *Minimum* : ``1``
1112
+ The default value is false.
1096
1113
 
1097
- *Maximum* : ``32768``
1114
+ :default: - false
1098
1115
 
1099
- :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keypolicy
1116
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-bypasspolicylockoutsafetycheck
1100
1117
  '''
1101
- result = self._values.get("key_policy")
1102
- assert result is not None, "Required property 'key_policy' is missing"
1103
- return typing.cast(typing.Any, result)
1118
+ result = self._values.get("bypass_policy_lockout_safety_check")
1119
+ return typing.cast(typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]], result)
1104
1120
 
1105
1121
  @builtins.property
1106
1122
  def description(self) -> typing.Optional[builtins.str]:
@@ -1149,6 +1165,30 @@ class CfnKeyProps:
1149
1165
  result = self._values.get("enable_key_rotation")
1150
1166
  return typing.cast(typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]], result)
1151
1167
 
1168
+ @builtins.property
1169
+ def key_policy(self) -> typing.Any:
1170
+ '''The key policy that authorizes use of the KMS key. The key policy must conform to the following rules.
1171
+
1172
+ - The key policy must allow the caller to make a subsequent `PutKeyPolicy <https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html>`_ request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam>`_ section of the **AWS Key Management Service Developer Guide** .
1173
+ - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to AWS KMS . When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to AWS KMS . For more information, see `Changes that I make are not always immediately visible <https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency>`_ in the *AWS Identity and Access Management User Guide* .
1174
+
1175
+ If you are unsure of which policy to use, consider the *default key policy* . This is the key policy that AWS KMS applies to KMS keys that are created by using the CreateKey API with no specified key policy. It gives the AWS account that owns the key permission to perform all operations on the key. It also allows you write IAM policies to authorize access to the key. For details, see `Default key policy <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default>`_ in the *AWS Key Management Service Developer Guide* .
1176
+
1177
+ A key policy document can include only the following characters:
1178
+
1179
+ - Printable ASCII characters
1180
+ - Printable characters in the Basic Latin and Latin-1 Supplement character set
1181
+ - The tab ( ``\\u0009`` ), line feed ( ``\\u000A`` ), and carriage return ( ``\\u000D`` ) special characters
1182
+
1183
+ *Minimum* : ``1``
1184
+
1185
+ *Maximum* : ``32768``
1186
+
1187
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keypolicy
1188
+ '''
1189
+ result = self._values.get("key_policy")
1190
+ return typing.cast(typing.Any, result)
1191
+
1152
1192
  @builtins.property
1153
1193
  def key_spec(self) -> typing.Optional[builtins.str]:
1154
1194
  '''Specifies the type of KMS key to create.
@@ -3115,10 +3155,11 @@ def _typecheckingstub__5ea678e9e5a947601d16e5bb11fec3683fbb15bba768bee0b88be7e19
3115
3155
  scope: _constructs_77d1e7e8.Construct,
3116
3156
  id: builtins.str,
3117
3157
  *,
3118
- key_policy: typing.Any,
3158
+ bypass_policy_lockout_safety_check: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
3119
3159
  description: typing.Optional[builtins.str] = None,
3120
3160
  enabled: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
3121
3161
  enable_key_rotation: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
3162
+ key_policy: typing.Any = None,
3122
3163
  key_spec: typing.Optional[builtins.str] = None,
3123
3164
  key_usage: typing.Optional[builtins.str] = None,
3124
3165
  multi_region: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
@@ -3141,8 +3182,8 @@ def _typecheckingstub__7468635e1eaf46c92748f2c14a3230215aa887e54ed03c370eee59b7e
3141
3182
  """Type checking stubs"""
3142
3183
  pass
3143
3184
 
3144
- def _typecheckingstub__cd3f4724ca140c9b1dca16904dd53ab0905d0688de411b0f60d4f538cb2ac4a2(
3145
- value: typing.Any,
3185
+ def _typecheckingstub__ba782ca88c8b210d0c18f73ecee5e7266ed06b7428c903676aca9b26b6490443(
3186
+ value: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]],
3146
3187
  ) -> None:
3147
3188
  """Type checking stubs"""
3148
3189
  pass
@@ -3165,6 +3206,12 @@ def _typecheckingstub__1949abfe35e26dd5174b35137bea94a550270331496fd2f865d63e223
3165
3206
  """Type checking stubs"""
3166
3207
  pass
3167
3208
 
3209
+ def _typecheckingstub__cd3f4724ca140c9b1dca16904dd53ab0905d0688de411b0f60d4f538cb2ac4a2(
3210
+ value: typing.Any,
3211
+ ) -> None:
3212
+ """Type checking stubs"""
3213
+ pass
3214
+
3168
3215
  def _typecheckingstub__00b8e7e0c6c26ba4d81ad2ec83a06ba02111a601de28c48a34e711a20bdb960d(
3169
3216
  value: typing.Optional[builtins.str],
3170
3217
  ) -> None:
@@ -3203,10 +3250,11 @@ def _typecheckingstub__b85648b8166c62900697e128ab3a35c1360fdab37323145ed7b7c76dd
3203
3250
 
3204
3251
  def _typecheckingstub__52751771c8b3e52917eaf0c78bad67c065fa3f95795e92f5eab3e92ce5051178(
3205
3252
  *,
3206
- key_policy: typing.Any,
3253
+ bypass_policy_lockout_safety_check: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
3207
3254
  description: typing.Optional[builtins.str] = None,
3208
3255
  enabled: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
3209
3256
  enable_key_rotation: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
3257
+ key_policy: typing.Any = None,
3210
3258
  key_spec: typing.Optional[builtins.str] = None,
3211
3259
  key_usage: typing.Optional[builtins.str] = None,
3212
3260
  multi_region: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
@@ -8094,7 +8094,8 @@ class CfnLayerVersionPermission(
8094
8094
  @builtins.property
8095
8095
  @jsii.member(jsii_name="attrId")
8096
8096
  def attr_id(self) -> builtins.str:
8097
- '''
8097
+ '''ID generated by service.
8098
+
8098
8099
  :cloudformationAttribute: Id
8099
8100
  '''
8100
8101
  return typing.cast(builtins.str, jsii.get(self, "attrId"))
@@ -8618,7 +8619,8 @@ class CfnPermission(
8618
8619
  @builtins.property
8619
8620
  @jsii.member(jsii_name="attrId")
8620
8621
  def attr_id(self) -> builtins.str:
8621
- '''
8622
+ '''A statement identifier that differentiates the statement from others in the same policy.
8623
+
8622
8624
  :cloudformationAttribute: Id
8623
8625
  '''
8624
8626
  return typing.cast(builtins.str, jsii.get(self, "attrId"))
@@ -1460,7 +1460,7 @@ class NodejsFunction(
1460
1460
  :param entry: Path to the entry file (JavaScript or TypeScript). Default: - Derived from the name of the defining file and the construct's id. If the ``NodejsFunction`` is defined in ``stack.ts`` with ``my-handler`` as id (``new NodejsFunction(this, 'my-handler')``), the construct will look at ``stack.my-handler.ts`` and ``stack.my-handler.js``.
1461
1461
  :param handler: The name of the exported handler in the entry file. The handler is prefixed with ``index.`` unless the specified handler value contains a ``.``, in which case it is used as-is. Default: handler
1462
1462
  :param project_root: The path to the directory containing project config files (``package.json`` or ``tsconfig.json``). Default: - the directory containing the ``depsLockFilePath``
1463
- :param runtime: The runtime environment. Only runtimes of the Node.js family are supported. Default: Runtime.NODEJS_14_X
1463
+ :param runtime: The runtime environment. Only runtimes of the Node.js family are supported. Default: Runtime.NODEJS_18_X
1464
1464
  :param adot_instrumentation: Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation. Default: - No ADOT instrumentation
1465
1465
  :param allow_all_outbound: Whether to allow the Lambda to send all network traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets. Default: true
1466
1466
  :param allow_public_subnet: Lambda Functions in a public subnet can NOT access the internet. Use this property to acknowledge this limitation and still place the function in a public subnet. Default: false
@@ -1702,7 +1702,7 @@ class NodejsFunctionProps(_FunctionOptions_328f4d39):
1702
1702
  :param entry: Path to the entry file (JavaScript or TypeScript). Default: - Derived from the name of the defining file and the construct's id. If the ``NodejsFunction`` is defined in ``stack.ts`` with ``my-handler`` as id (``new NodejsFunction(this, 'my-handler')``), the construct will look at ``stack.my-handler.ts`` and ``stack.my-handler.js``.
1703
1703
  :param handler: The name of the exported handler in the entry file. The handler is prefixed with ``index.`` unless the specified handler value contains a ``.``, in which case it is used as-is. Default: handler
1704
1704
  :param project_root: The path to the directory containing project config files (``package.json`` or ``tsconfig.json``). Default: - the directory containing the ``depsLockFilePath``
1705
- :param runtime: The runtime environment. Only runtimes of the Node.js family are supported. Default: Runtime.NODEJS_14_X
1705
+ :param runtime: The runtime environment. Only runtimes of the Node.js family are supported. Default: Runtime.NODEJS_18_X
1706
1706
 
1707
1707
  :exampleMetadata: infused
1708
1708
 
@@ -2394,7 +2394,7 @@ class NodejsFunctionProps(_FunctionOptions_328f4d39):
2394
2394
  Only runtimes of the Node.js family are
2395
2395
  supported.
2396
2396
 
2397
- :default: Runtime.NODEJS_14_X
2397
+ :default: Runtime.NODEJS_18_X
2398
2398
  '''
2399
2399
  result = self._values.get("runtime")
2400
2400
  return typing.cast(typing.Optional[_Runtime_b4eaa844], result)