aws-cdk-lib 2.117.0__py3-none-any.whl → 2.119.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.
- aws_cdk/__init__.py +138 -25
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.117.0.jsii.tgz → aws-cdk-lib@2.119.0.jsii.tgz} +0 -0
- aws_cdk/amzn_sdc/__init__.py +496 -0
- aws_cdk/aws_appsync/__init__.py +94 -22
- aws_cdk/aws_autoscaling/__init__.py +139 -74
- aws_cdk/aws_certificatemanager/__init__.py +164 -3
- aws_cdk/aws_cloud9/__init__.py +3 -3
- aws_cdk/aws_cloudfront/__init__.py +853 -38
- aws_cdk/aws_cloudtrail/__init__.py +54 -34
- aws_cdk/aws_cloudwatch_actions/__init__.py +105 -0
- aws_cdk/aws_codebuild/__init__.py +46 -5
- aws_cdk/aws_codecommit/__init__.py +9 -3
- aws_cdk/aws_codepipeline_actions/__init__.py +54 -0
- aws_cdk/aws_codetest/__init__.py +788 -0
- aws_cdk/aws_cognito/__init__.py +104 -0
- aws_cdk/aws_connect/__init__.py +626 -78
- aws_cdk/aws_docdb/__init__.py +442 -0
- aws_cdk/aws_dynamodb/__init__.py +14 -0
- aws_cdk/aws_ec2/__init__.py +372 -44
- aws_cdk/aws_ecs/__init__.py +192 -35
- aws_cdk/aws_emrserverless/__init__.py +20 -13
- aws_cdk/aws_events/__init__.py +90 -1
- aws_cdk/aws_fis/__init__.py +12 -32
- aws_cdk/aws_globalaccelerator/__init__.py +19 -0
- aws_cdk/aws_glue/__init__.py +329 -0
- aws_cdk/aws_iam/__init__.py +50 -24
- aws_cdk/aws_iot/__init__.py +112 -0
- aws_cdk/aws_iotsitewise/__init__.py +4 -4
- aws_cdk/aws_kendra/__init__.py +10 -5
- aws_cdk/aws_kinesisfirehose/__init__.py +111 -0
- aws_cdk/aws_lambda/__init__.py +180 -407
- aws_cdk/aws_location/__init__.py +1132 -17
- aws_cdk/aws_mediatailor/__init__.py +120 -17
- aws_cdk/aws_networkfirewall/__init__.py +2 -2
- aws_cdk/aws_networkmanager/__init__.py +1 -1
- aws_cdk/aws_omics/__init__.py +4 -4
- aws_cdk/aws_opensearchservice/__init__.py +58 -0
- aws_cdk/aws_pinpoint/__init__.py +14 -6
- aws_cdk/aws_pipes/__init__.py +7 -2
- aws_cdk/aws_rds/__init__.py +247 -16
- aws_cdk/aws_redshift/__init__.py +103 -0
- aws_cdk/aws_route53/__init__.py +68 -20
- aws_cdk/aws_s3/__init__.py +2 -4
- aws_cdk/aws_s3objectlambda/__init__.py +2 -2
- aws_cdk/aws_servicecatalogappregistry/__init__.py +3 -3
- aws_cdk/aws_signer/__init__.py +27 -4
- aws_cdk/aws_ssm/__init__.py +76 -13
- aws_cdk/aws_stepfunctions/__init__.py +110 -5
- aws_cdk/aws_stepfunctions_tasks/__init__.py +84 -29
- aws_cdk/pipelines/__init__.py +136 -37
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/LICENSE +1 -1
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/METADATA +98 -12
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/NOTICE +1 -1
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/RECORD +57 -55
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/top_level.txt +0 -0
aws_cdk/__init__.py
CHANGED
|
@@ -392,7 +392,7 @@ CloudFormation to re-read the secret.
|
|
|
392
392
|
## ARN manipulation
|
|
393
393
|
|
|
394
394
|
Sometimes you will need to put together or pick apart Amazon Resource Names
|
|
395
|
-
(ARNs). The functions `stack.formatArn()` and `stack.
|
|
395
|
+
(ARNs). The functions `stack.formatArn()` and `stack.splitArn()` exist for
|
|
396
396
|
this purpose.
|
|
397
397
|
|
|
398
398
|
`formatArn()` can be used to build an ARN from components. It will automatically
|
|
@@ -406,12 +406,12 @@ use the region and account of the stack you're calling it on:
|
|
|
406
406
|
stack.format_arn(
|
|
407
407
|
service="lambda",
|
|
408
408
|
resource="function",
|
|
409
|
-
|
|
409
|
+
arn_format=ArnFormat.COLON_RESOURCE_NAME,
|
|
410
410
|
resource_name="MyFunction"
|
|
411
411
|
)
|
|
412
412
|
```
|
|
413
413
|
|
|
414
|
-
`
|
|
414
|
+
`splitArn()` can be used to get a single component from an ARN. `splitArn()`
|
|
415
415
|
will correctly deal with both literal ARNs and deploy-time values (tokens),
|
|
416
416
|
but in case of a deploy-time value be aware that the result will be another
|
|
417
417
|
deploy-time value which cannot be inspected in the CDK application.
|
|
@@ -421,14 +421,13 @@ deploy-time value which cannot be inspected in the CDK application.
|
|
|
421
421
|
|
|
422
422
|
|
|
423
423
|
# Extracts the function name out of an AWS Lambda Function ARN
|
|
424
|
-
arn_components = stack.
|
|
424
|
+
arn_components = stack.split_arn(arn, ArnFormat.COLON_RESOURCE_NAME)
|
|
425
425
|
function_name = arn_components.resource_name
|
|
426
426
|
```
|
|
427
427
|
|
|
428
|
-
Note that
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
the format of the ARN you are dealing with.
|
|
428
|
+
Note that the format of the resource separator depends on the service and
|
|
429
|
+
may be any of the values supported by `ArnFormat`. When dealing with these
|
|
430
|
+
functions, it is important to know the format of the ARN you are dealing with.
|
|
432
431
|
|
|
433
432
|
For an exhaustive list of ARN formats used in AWS, see [AWS ARNs and
|
|
434
433
|
Namespaces](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
|
|
@@ -608,7 +607,7 @@ response to the CloudFormation service and handle various error cases.
|
|
|
608
607
|
Set `serviceToken` to `lambda.functionArn` to use this provider:
|
|
609
608
|
|
|
610
609
|
```python
|
|
611
|
-
fn = lambda_.
|
|
610
|
+
fn = lambda_.SingletonFunction(self, "MyProvider", function_props)
|
|
612
611
|
|
|
613
612
|
CustomResource(self, "MyResource",
|
|
614
613
|
service_token=fn.function_arn
|
|
@@ -622,7 +621,8 @@ framework designed to implement simple and slim custom resource providers. It
|
|
|
622
621
|
currently only supports Node.js-based user handlers, represents permissions as raw
|
|
623
622
|
JSON blobs instead of `iam.PolicyStatement` objects, and it does not have
|
|
624
623
|
support for asynchronous waiting (handler cannot exceed the 15min lambda
|
|
625
|
-
timeout).
|
|
624
|
+
timeout). The `CustomResourceProviderRuntime` supports runtime `nodejs12.x`,
|
|
625
|
+
`nodejs14.x`, `nodejs16.x`, `nodejs18.x`.
|
|
626
626
|
|
|
627
627
|
> **As an application builder, we do not recommend you use this provider type.** This provider exists purely for custom resources that are part of the AWS Construct Library.
|
|
628
628
|
>
|
|
@@ -1062,6 +1062,31 @@ since the top-level key is an unresolved token. The call to `findInMap` will ret
|
|
|
1062
1062
|
region_table.find_in_map(Aws.REGION, "regionName")
|
|
1063
1063
|
```
|
|
1064
1064
|
|
|
1065
|
+
An optional default value can also be passed to `findInMap`. If either key is not found in the map and the mapping is lazy, `findInMap` will return the default value and not render the mapping.
|
|
1066
|
+
If the mapping is not lazy or either key is an unresolved token, the call to `findInMap` will return a token that resolves to
|
|
1067
|
+
`{ "Fn::FindInMap": [ "MapName", "TopLevelKey", "SecondLevelKey", { "DefaultValue": "DefaultValue" } ] }`, and the mapping will be rendered.
|
|
1068
|
+
Note that the `AWS::LanguageExtentions` transform is added to enable the default value functionality.
|
|
1069
|
+
|
|
1070
|
+
For example, the following code will again not produce anything in the "Mappings" section. The
|
|
1071
|
+
call to `findInMap` will be able to resolve the value during synthesis and simply return
|
|
1072
|
+
`'Region not found'`.
|
|
1073
|
+
|
|
1074
|
+
```python
|
|
1075
|
+
region_table = CfnMapping(self, "RegionTable",
|
|
1076
|
+
mapping={
|
|
1077
|
+
"us-east-1": {
|
|
1078
|
+
"region_name": "US East (N. Virginia)"
|
|
1079
|
+
},
|
|
1080
|
+
"us-east-2": {
|
|
1081
|
+
"region_name": "US East (Ohio)"
|
|
1082
|
+
}
|
|
1083
|
+
},
|
|
1084
|
+
lazy=True
|
|
1085
|
+
)
|
|
1086
|
+
|
|
1087
|
+
region_table.find_in_map("us-west-1", "regionName", "Region not found")
|
|
1088
|
+
```
|
|
1089
|
+
|
|
1065
1090
|
### Dynamic References
|
|
1066
1091
|
|
|
1067
1092
|
CloudFormation supports [dynamically resolving](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html) values
|
|
@@ -1142,6 +1167,13 @@ stack = Stack(app, "StackName",
|
|
|
1142
1167
|
)
|
|
1143
1168
|
```
|
|
1144
1169
|
|
|
1170
|
+
You can also set termination protection with the setter after you've instantiated the stack.
|
|
1171
|
+
|
|
1172
|
+
```python
|
|
1173
|
+
stack = Stack(app, "StackName")
|
|
1174
|
+
stack.termination_protection = True
|
|
1175
|
+
```
|
|
1176
|
+
|
|
1145
1177
|
By default, termination protection is disabled.
|
|
1146
1178
|
|
|
1147
1179
|
### Description
|
|
@@ -1200,6 +1232,20 @@ It's possible to synthesize the project with more Resources than the allowed (or
|
|
|
1200
1232
|
|
|
1201
1233
|
Set the context key `@aws-cdk/core:stackResourceLimit` with the proper value, being 0 for disable the limit of resources.
|
|
1202
1234
|
|
|
1235
|
+
### Template Indentation
|
|
1236
|
+
|
|
1237
|
+
The AWS CloudFormation templates generated by CDK include indentation by default.
|
|
1238
|
+
Indentation makes the templates more readable, but also increases their size,
|
|
1239
|
+
and CloudFormation templates cannot exceed 1MB.
|
|
1240
|
+
|
|
1241
|
+
It's possible to reduce the size of your templates by suppressing indentation.
|
|
1242
|
+
|
|
1243
|
+
To do this for all templates, set the context key `@aws-cdk/core:suppressTemplateIndentation` to `true`.
|
|
1244
|
+
|
|
1245
|
+
To do this for a specific stack, add a `suppressTemplateIndentation: true` property to the
|
|
1246
|
+
stack's `StackProps` parameter. You can also set this property to `false` to override
|
|
1247
|
+
the context key setting.
|
|
1248
|
+
|
|
1203
1249
|
## App Context
|
|
1204
1250
|
|
|
1205
1251
|
[Context values](https://docs.aws.amazon.com/cdk/v2/guide/context.html) are key-value pairs that can be associated with an app, stack, or construct.
|
|
@@ -1393,6 +1439,10 @@ class MyPlugin:
|
|
|
1393
1439
|
)
|
|
1394
1440
|
```
|
|
1395
1441
|
|
|
1442
|
+
In addition to the name, plugins may optionally report their version (`version`
|
|
1443
|
+
property ) and a list of IDs of the rules they are going to evaluate (`ruleIds`
|
|
1444
|
+
property).
|
|
1445
|
+
|
|
1396
1446
|
Note that plugins are not allowed to modify anything in the cloud assembly. Any
|
|
1397
1447
|
attempt to do so will result in synthesis failure.
|
|
1398
1448
|
|
|
@@ -1405,6 +1455,42 @@ add it to the `postinstall`
|
|
|
1405
1455
|
[script](https://docs.npmjs.com/cli/v9/using-npm/scripts) in the `package.json`
|
|
1406
1456
|
file.
|
|
1407
1457
|
|
|
1458
|
+
## Annotations
|
|
1459
|
+
|
|
1460
|
+
Construct authors can add annotations to constructs to report at three different
|
|
1461
|
+
levels: `ERROR`, `WARN`, `INFO`.
|
|
1462
|
+
|
|
1463
|
+
Typically warnings are added for things that are important for the user to be
|
|
1464
|
+
aware of, but will not cause deployment errors in all cases. Some common
|
|
1465
|
+
scenarios are (non-exhaustive list):
|
|
1466
|
+
|
|
1467
|
+
* Warn when the user needs to take a manual action, e.g. IAM policy should be
|
|
1468
|
+
added to an referenced resource.
|
|
1469
|
+
* Warn if the user configuration might not follow best practices (but is still
|
|
1470
|
+
valid)
|
|
1471
|
+
* Warn if the user is using a deprecated API
|
|
1472
|
+
|
|
1473
|
+
### Acknowledging Warnings
|
|
1474
|
+
|
|
1475
|
+
If you would like to run with `--strict` mode enabled (warnings will throw
|
|
1476
|
+
errors) it is possible to `acknowledge` warnings to make the warning go away.
|
|
1477
|
+
|
|
1478
|
+
For example, if > 10 IAM managed policies are added to an IAM Group, a warning
|
|
1479
|
+
will be created:
|
|
1480
|
+
|
|
1481
|
+
```text
|
|
1482
|
+
IAM:Group:MaxPoliciesExceeded: You added 11 to IAM Group my-group. The maximum number of managed policies attached to an IAM group is 10.
|
|
1483
|
+
```
|
|
1484
|
+
|
|
1485
|
+
If you have requested a [quota increase](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entities)
|
|
1486
|
+
you may have the ability to add > 10 managed policies which means that this
|
|
1487
|
+
warning does not apply to you. You can acknowledge this by `acknowledging` the
|
|
1488
|
+
warning by the `id`.
|
|
1489
|
+
|
|
1490
|
+
```python
|
|
1491
|
+
Annotations.of(self).acknowledge_warning("IAM:Group:MaxPoliciesExceeded", "Account has quota increased to 20")
|
|
1492
|
+
```
|
|
1493
|
+
|
|
1408
1494
|
<!--END CORE DOCUMENTATION-->
|
|
1409
1495
|
'''
|
|
1410
1496
|
import abc
|
|
@@ -2087,7 +2173,23 @@ class ArnComponents:
|
|
|
2087
2173
|
|
|
2088
2174
|
@jsii.enum(jsii_type="aws-cdk-lib.ArnFormat")
|
|
2089
2175
|
class ArnFormat(enum.Enum):
|
|
2090
|
-
'''An enum representing the various ARN formats that different services use.
|
|
2176
|
+
'''An enum representing the various ARN formats that different services use.
|
|
2177
|
+
|
|
2178
|
+
:exampleMetadata: infused
|
|
2179
|
+
|
|
2180
|
+
Example::
|
|
2181
|
+
|
|
2182
|
+
# stack: Stack
|
|
2183
|
+
|
|
2184
|
+
|
|
2185
|
+
# Builds "arn:<PARTITION>:lambda:<REGION>:<ACCOUNT>:function:MyFunction"
|
|
2186
|
+
stack.format_arn(
|
|
2187
|
+
service="lambda",
|
|
2188
|
+
resource="function",
|
|
2189
|
+
arn_format=ArnFormat.COLON_RESOURCE_NAME,
|
|
2190
|
+
resource_name="MyFunction"
|
|
2191
|
+
)
|
|
2192
|
+
'''
|
|
2091
2193
|
|
|
2092
2194
|
NO_RESOURCE_NAME = "NO_RESOURCE_NAME"
|
|
2093
2195
|
'''This represents a format where there is no 'resourceName' part.
|
|
@@ -5562,10 +5664,11 @@ class CfnMappingProps:
|
|
|
5562
5664
|
"us-east-2": {
|
|
5563
5665
|
"region_name": "US East (Ohio)"
|
|
5564
5666
|
}
|
|
5565
|
-
}
|
|
5667
|
+
},
|
|
5668
|
+
lazy=True
|
|
5566
5669
|
)
|
|
5567
5670
|
|
|
5568
|
-
region_table.find_in_map(
|
|
5671
|
+
region_table.find_in_map("us-east-2", "regionName")
|
|
5569
5672
|
'''
|
|
5570
5673
|
if __debug__:
|
|
5571
5674
|
type_hints = typing.get_type_hints(_typecheckingstub__1661eec8c4dedc5a4b0f85332d5dfada759b3dcd7d56d62c059c454e7cbfc838)
|
|
@@ -12025,21 +12128,27 @@ class Duration(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.Duration"):
|
|
|
12025
12128
|
|
|
12026
12129
|
Example::
|
|
12027
12130
|
|
|
12028
|
-
|
|
12029
|
-
# bucket: s3.Bucket
|
|
12131
|
+
import aws_cdk.aws_ecs as ecs
|
|
12030
12132
|
|
|
12133
|
+
# cluster: ecs.ICluster
|
|
12134
|
+
# task_definition: ecs.TaskDefinition
|
|
12031
12135
|
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
deployment_strategy=appconfig.DeploymentStrategy(self, "MyDeploymentStrategy",
|
|
12036
|
-
rollout_strategy=appconfig.RolloutStrategy.linear(
|
|
12037
|
-
growth_factor=15,
|
|
12038
|
-
deployment_duration=Duration.minutes(30),
|
|
12039
|
-
final_bake_time=Duration.minutes(15)
|
|
12040
|
-
)
|
|
12041
|
-
)
|
|
12136
|
+
|
|
12137
|
+
rule = events.Rule(self, "Rule",
|
|
12138
|
+
schedule=events.Schedule.rate(cdk.Duration.hours(1))
|
|
12042
12139
|
)
|
|
12140
|
+
|
|
12141
|
+
rule.add_target(
|
|
12142
|
+
targets.EcsTask(
|
|
12143
|
+
cluster=cluster,
|
|
12144
|
+
task_definition=task_definition,
|
|
12145
|
+
propagate_tags=ecs.PropagatedTagSource.TASK_DEFINITION,
|
|
12146
|
+
tags=[targets.Tag(
|
|
12147
|
+
key="my-tag",
|
|
12148
|
+
value="my-tag-value"
|
|
12149
|
+
)
|
|
12150
|
+
]
|
|
12151
|
+
))
|
|
12043
12152
|
'''
|
|
12044
12153
|
|
|
12045
12154
|
@jsii.member(jsii_name="days")
|
|
@@ -33657,6 +33766,7 @@ __all__ = [
|
|
|
33657
33766
|
"ValidationResult",
|
|
33658
33767
|
"ValidationResults",
|
|
33659
33768
|
"alexa_ask",
|
|
33769
|
+
"amzn_sdc",
|
|
33660
33770
|
"assertions",
|
|
33661
33771
|
"aws_accessanalyzer",
|
|
33662
33772
|
"aws_acmpca",
|
|
@@ -33714,6 +33824,7 @@ __all__ = [
|
|
|
33714
33824
|
"aws_codestar",
|
|
33715
33825
|
"aws_codestarconnections",
|
|
33716
33826
|
"aws_codestarnotifications",
|
|
33827
|
+
"aws_codetest",
|
|
33717
33828
|
"aws_cognito",
|
|
33718
33829
|
"aws_comprehend",
|
|
33719
33830
|
"aws_config",
|
|
@@ -33931,6 +34042,7 @@ publication.publish()
|
|
|
33931
34042
|
|
|
33932
34043
|
# Loading modules to ensure their types are registered with the jsii runtime library
|
|
33933
34044
|
from . import alexa_ask
|
|
34045
|
+
from . import amzn_sdc
|
|
33934
34046
|
from . import assertions
|
|
33935
34047
|
from . import aws_accessanalyzer
|
|
33936
34048
|
from . import aws_acmpca
|
|
@@ -33988,6 +34100,7 @@ from . import aws_codepipeline_actions
|
|
|
33988
34100
|
from . import aws_codestar
|
|
33989
34101
|
from . import aws_codestarconnections
|
|
33990
34102
|
from . import aws_codestarnotifications
|
|
34103
|
+
from . import aws_codetest
|
|
33991
34104
|
from . import aws_cognito
|
|
33992
34105
|
from . import aws_comprehend
|
|
33993
34106
|
from . import aws_config
|
aws_cdk/_jsii/__init__.py
CHANGED
|
@@ -16,7 +16,7 @@ import aws_cdk.asset_node_proxy_agent_v6._jsii
|
|
|
16
16
|
import constructs._jsii
|
|
17
17
|
|
|
18
18
|
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
|
19
|
-
"aws-cdk-lib", "2.
|
|
19
|
+
"aws-cdk-lib", "2.119.0", __name__[0:-6], "aws-cdk-lib@2.119.0.jsii.tgz"
|
|
20
20
|
)
|
|
21
21
|
|
|
22
22
|
__all__ = [
|
|
Binary file
|