aws-cdk-lib 2.73.0__py3-none-any.whl → 2.76.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 (111) hide show
  1. aws_cdk/__init__.py +245 -259
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.73.0.jsii.tgz → aws-cdk-lib@2.76.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_amplifyuibuilder/__init__.py +182 -214
  5. aws_cdk/aws_apigateway/__init__.py +95 -148
  6. aws_cdk/aws_appconfig/__init__.py +8 -4
  7. aws_cdk/aws_appflow/__init__.py +27 -52
  8. aws_cdk/aws_appmesh/__init__.py +91 -200
  9. aws_cdk/aws_apprunner/__init__.py +4 -16
  10. aws_cdk/aws_appstream/__init__.py +18 -82
  11. aws_cdk/aws_athena/__init__.py +18 -32
  12. aws_cdk/aws_backup/__init__.py +48 -86
  13. aws_cdk/aws_batch/__init__.py +9 -2
  14. aws_cdk/aws_billingconductor/__init__.py +12 -7
  15. aws_cdk/aws_budgets/__init__.py +8 -17
  16. aws_cdk/aws_certificatemanager/__init__.py +7 -4
  17. aws_cdk/aws_cloudfront/__init__.py +14 -11
  18. aws_cdk/aws_cloudfront_origins/__init__.py +18 -8
  19. aws_cdk/aws_cloudtrail/__init__.py +7 -14
  20. aws_cdk/aws_cloudwatch/__init__.py +63 -35
  21. aws_cdk/aws_codebuild/__init__.py +10 -13
  22. aws_cdk/aws_codecommit/__init__.py +0 -1
  23. aws_cdk/aws_codedeploy/__init__.py +165 -162
  24. aws_cdk/aws_codegurureviewer/__init__.py +4 -4
  25. aws_cdk/aws_codepipeline/__init__.py +0 -4
  26. aws_cdk/aws_codepipeline_actions/__init__.py +16 -164
  27. aws_cdk/aws_cognito/__init__.py +195 -100
  28. aws_cdk/aws_config/__init__.py +28 -51
  29. aws_cdk/aws_connectcampaigns/__init__.py +5 -6
  30. aws_cdk/aws_databrew/__init__.py +5 -6
  31. aws_cdk/aws_dlm/__init__.py +33 -71
  32. aws_cdk/aws_docdb/__init__.py +20 -76
  33. aws_cdk/aws_dynamodb/__init__.py +29 -22
  34. aws_cdk/aws_ec2/__init__.py +2414 -603
  35. aws_cdk/aws_ecr/__init__.py +1 -2
  36. aws_cdk/aws_ecr_assets/__init__.py +27 -14
  37. aws_cdk/aws_ecs/__init__.py +458 -163
  38. aws_cdk/aws_ecs_patterns/__init__.py +13 -11
  39. aws_cdk/aws_eks/__init__.py +13 -8
  40. aws_cdk/aws_elasticloadbalancing/__init__.py +16 -9
  41. aws_cdk/aws_elasticloadbalancingv2/__init__.py +142 -82
  42. aws_cdk/aws_elasticloadbalancingv2_actions/__init__.py +126 -61
  43. aws_cdk/aws_elasticsearch/__init__.py +0 -7
  44. aws_cdk/aws_emr/__init__.py +7 -16
  45. aws_cdk/aws_emrserverless/__init__.py +14 -18
  46. aws_cdk/aws_events/__init__.py +33 -29
  47. aws_cdk/aws_events_targets/__init__.py +248 -89
  48. aws_cdk/aws_frauddetector/__init__.py +3 -4
  49. aws_cdk/aws_fsx/__init__.py +13 -7
  50. aws_cdk/aws_gamelift/__init__.py +11 -20
  51. aws_cdk/aws_grafana/__init__.py +4 -4
  52. aws_cdk/aws_iam/__init__.py +21 -25
  53. aws_cdk/aws_imagebuilder/__init__.py +58 -80
  54. aws_cdk/aws_internetmonitor/__init__.py +18 -10
  55. aws_cdk/aws_iot/__init__.py +16 -10
  56. aws_cdk/aws_iotcoredeviceadvisor/__init__.py +16 -26
  57. aws_cdk/aws_iotevents/__init__.py +6 -4
  58. aws_cdk/aws_iotfleetwise/__init__.py +27 -40
  59. aws_cdk/aws_iotsitewise/__init__.py +8 -5
  60. aws_cdk/aws_iotwireless/__init__.py +14 -9
  61. aws_cdk/aws_kinesisfirehose/__init__.py +21 -38
  62. aws_cdk/aws_lambda/__init__.py +76 -53
  63. aws_cdk/aws_lambda_event_sources/__init__.py +6 -21
  64. aws_cdk/aws_logs/__init__.py +5 -7
  65. aws_cdk/aws_macie/__init__.py +28 -23
  66. aws_cdk/aws_mediaconnect/__init__.py +5 -8
  67. aws_cdk/aws_mediaconvert/__init__.py +2 -2
  68. aws_cdk/aws_medialive/__init__.py +2 -4
  69. aws_cdk/aws_mediapackage/__init__.py +9 -18
  70. aws_cdk/aws_memorydb/__init__.py +5 -10
  71. aws_cdk/aws_mwaa/__init__.py +8 -4
  72. aws_cdk/aws_neptune/__init__.py +4 -4
  73. aws_cdk/aws_networkfirewall/__init__.py +8 -4
  74. aws_cdk/aws_networkmanager/__init__.py +4 -4
  75. aws_cdk/aws_nimblestudio/__init__.py +25 -45
  76. aws_cdk/aws_opensearchservice/__init__.py +0 -1
  77. aws_cdk/aws_panorama/__init__.py +11 -12
  78. aws_cdk/aws_personalize/__init__.py +46 -72
  79. aws_cdk/aws_pinpoint/__init__.py +36 -65
  80. aws_cdk/aws_quicksight/__init__.py +9972 -13374
  81. aws_cdk/aws_rds/__init__.py +53 -22
  82. aws_cdk/aws_route53/__init__.py +8 -16
  83. aws_cdk/aws_route53_targets/__init__.py +2 -4
  84. aws_cdk/aws_s3/__init__.py +41 -90
  85. aws_cdk/aws_s3_notifications/__init__.py +0 -3
  86. aws_cdk/aws_sagemaker/__init__.py +16 -10
  87. aws_cdk/aws_secretsmanager/__init__.py +17 -14
  88. aws_cdk/aws_servicecatalog/__init__.py +60 -83
  89. aws_cdk/aws_servicediscovery/__init__.py +4 -6
  90. aws_cdk/aws_ses/__init__.py +734 -28
  91. aws_cdk/aws_sns/__init__.py +4 -8
  92. aws_cdk/aws_ssm/__init__.py +19 -23
  93. aws_cdk/aws_ssmcontacts/__init__.py +10 -6
  94. aws_cdk/aws_ssmincidents/__init__.py +2 -1
  95. aws_cdk/aws_sso/__init__.py +4 -4
  96. aws_cdk/aws_stepfunctions/__init__.py +6 -15
  97. aws_cdk/aws_stepfunctions_tasks/__init__.py +51 -24
  98. aws_cdk/aws_timestream/__init__.py +22 -28
  99. aws_cdk/aws_transfer/__init__.py +188 -86
  100. aws_cdk/aws_wafv2/__init__.py +54 -38
  101. aws_cdk/aws_xray/__init__.py +15 -22
  102. aws_cdk/cloud_assembly_schema/__init__.py +14 -6
  103. aws_cdk/custom_resources/__init__.py +2 -3
  104. aws_cdk/pipelines/__init__.py +104 -134
  105. aws_cdk/triggers/__init__.py +46 -61
  106. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/METADATA +47 -92
  107. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/RECORD +111 -111
  108. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/LICENSE +0 -0
  109. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/NOTICE +0 -0
  110. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/WHEEL +0 -0
  111. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/top_level.txt +0 -0
@@ -12,7 +12,12 @@ Cognito](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lis
12
12
  Here's an example:
13
13
 
14
14
  ```python
15
- # Example automatically generated from non-compiling source. May contain errors.
15
+ from aws_cdk import aws_certificatemanager as acm
16
+
17
+ # vpc: ec2.Vpc
18
+ # certificate: acm.Certificate
19
+
20
+
16
21
  lb = elbv2.ApplicationLoadBalancer(self, "LB",
17
22
  vpc=vpc,
18
23
  internet_facing=True
@@ -24,17 +29,17 @@ user_pool_client = cognito.UserPoolClient(self, "Client",
24
29
 
25
30
  # Required minimal configuration for use with an ELB
26
31
  generate_secret=True,
27
- auth_flows={
28
- "user_password": True
29
- },
30
- o_auth={
31
- "flows": {
32
- "authorization_code_grant": True
33
- },
34
- "scopes": [cognito.OAuthScope.EMAIL],
35
- "callback_urls": [f"https://{lb.loadBalancerDnsName}/oauth2/idpresponse"
32
+ auth_flows=cognito.AuthFlow(
33
+ user_password=True
34
+ ),
35
+ o_auth=cognito.OAuthSettings(
36
+ flows=cognito.OAuthFlows(
37
+ authorization_code_grant=True
38
+ ),
39
+ scopes=[cognito.OAuthScope.EMAIL],
40
+ callback_urls=[f"https://{lb.loadBalancerDnsName}/oauth2/idpresponse"
36
41
  ]
37
- }
42
+ )
38
43
  )
39
44
  cfn_client = user_pool_client.node.default_child
40
45
  cfn_client.add_property_override("RefreshTokenValidity", 1)
@@ -42,9 +47,9 @@ cfn_client.add_property_override("SupportedIdentityProviders", ["COGNITO"])
42
47
 
43
48
  user_pool_domain = cognito.UserPoolDomain(self, "Domain",
44
49
  user_pool=user_pool,
45
- cognito_domain={
46
- "domain_prefix": "test-cdk-prefix"
47
- }
50
+ cognito_domain=cognito.CognitoDomainOptions(
51
+ domain_prefix="test-cdk-prefix"
52
+ )
48
53
  )
49
54
 
50
55
  lb.add_listener("Listener",
@@ -99,36 +104,66 @@ class AuthenticateCognitoAction(
99
104
  ):
100
105
  '''A Listener Action to authenticate with Cognito.
101
106
 
102
- :exampleMetadata: fixture=_generated
107
+ :exampleMetadata: infused
103
108
 
104
109
  Example::
105
110
 
106
- # The code below shows an example of how to instantiate this type.
107
- # The values are placeholders you should change.
108
- import aws_cdk as cdk
109
- from aws_cdk import aws_elasticloadbalancingv2 as elbv2
110
- from aws_cdk import aws_elasticloadbalancingv2_actions as elasticloadbalancingv2_actions
111
+ from aws_cdk import aws_certificatemanager as acm
112
+
113
+ # vpc: ec2.Vpc
114
+ # certificate: acm.Certificate
115
+
116
+
117
+ lb = elbv2.ApplicationLoadBalancer(self, "LB",
118
+ vpc=vpc,
119
+ internet_facing=True
120
+ )
111
121
 
112
- # listener_action: elbv2.ListenerAction
113
- # secret_value: cdk.SecretValue
122
+ user_pool = cognito.UserPool(self, "UserPool")
123
+ user_pool_client = cognito.UserPoolClient(self, "Client",
124
+ user_pool=user_pool,
114
125
 
115
- authenticate_cognito_action = elasticloadbalancingv2_actions.AuthenticateCognitoAction.authenticate_oidc(
116
- authorization_endpoint="authorizationEndpoint",
117
- client_id="clientId",
118
- client_secret=secret_value,
119
- issuer="issuer",
120
- next=listener_action,
121
- token_endpoint="tokenEndpoint",
122
- user_info_endpoint="userInfoEndpoint",
126
+ # Required minimal configuration for use with an ELB
127
+ generate_secret=True,
128
+ auth_flows=cognito.AuthFlow(
129
+ user_password=True
130
+ ),
131
+ o_auth=cognito.OAuthSettings(
132
+ flows=cognito.OAuthFlows(
133
+ authorization_code_grant=True
134
+ ),
135
+ scopes=[cognito.OAuthScope.EMAIL],
136
+ callback_urls=[f"https://{lb.loadBalancerDnsName}/oauth2/idpresponse"
137
+ ]
138
+ )
139
+ )
140
+ cfn_client = user_pool_client.node.default_child
141
+ cfn_client.add_property_override("RefreshTokenValidity", 1)
142
+ cfn_client.add_property_override("SupportedIdentityProviders", ["COGNITO"])
123
143
 
124
- # the properties below are optional
125
- authentication_request_extra_params={
126
- "authentication_request_extra_params_key": "authenticationRequestExtraParams"
127
- },
128
- on_unauthenticated_request=elbv2.UnauthenticatedAction.DENY,
129
- scope="scope",
130
- session_cookie_name="sessionCookieName",
131
- session_timeout=cdk.Duration.minutes(30)
144
+ user_pool_domain = cognito.UserPoolDomain(self, "Domain",
145
+ user_pool=user_pool,
146
+ cognito_domain=cognito.CognitoDomainOptions(
147
+ domain_prefix="test-cdk-prefix"
148
+ )
149
+ )
150
+
151
+ lb.add_listener("Listener",
152
+ port=443,
153
+ certificates=[certificate],
154
+ default_action=actions.AuthenticateCognitoAction(
155
+ user_pool=user_pool,
156
+ user_pool_client=user_pool_client,
157
+ user_pool_domain=user_pool_domain,
158
+ next=elbv2.ListenerAction.fixed_response(200,
159
+ content_type="text/plain",
160
+ message_body="Authenticated"
161
+ )
162
+ )
163
+ )
164
+
165
+ CfnOutput(self, "DNS",
166
+ value=lb.load_balancer_dns_name
132
167
  )
133
168
  '''
134
169
 
@@ -213,36 +248,66 @@ class AuthenticateCognitoActionProps:
213
248
  :param session_cookie_name: The name of the cookie used to maintain session information. Default: "AWSELBAuthSessionCookie"
214
249
  :param session_timeout: The maximum duration of the authentication session. Default: Duration.days(7)
215
250
 
216
- :exampleMetadata: fixture=_generated
251
+ :exampleMetadata: infused
217
252
 
218
253
  Example::
219
254
 
220
- # The code below shows an example of how to instantiate this type.
221
- # The values are placeholders you should change.
222
- import aws_cdk as cdk
223
- from aws_cdk import aws_cognito as cognito
224
- from aws_cdk import aws_elasticloadbalancingv2 as elbv2
225
- from aws_cdk import aws_elasticloadbalancingv2_actions as elasticloadbalancingv2_actions
255
+ from aws_cdk import aws_certificatemanager as acm
226
256
 
227
- # listener_action: elbv2.ListenerAction
228
- # user_pool: cognito.UserPool
229
- # user_pool_client: cognito.UserPoolClient
230
- # user_pool_domain: cognito.UserPoolDomain
257
+ # vpc: ec2.Vpc
258
+ # certificate: acm.Certificate
231
259
 
232
- authenticate_cognito_action_props = elasticloadbalancingv2_actions.AuthenticateCognitoActionProps(
233
- next=listener_action,
260
+
261
+ lb = elbv2.ApplicationLoadBalancer(self, "LB",
262
+ vpc=vpc,
263
+ internet_facing=True
264
+ )
265
+
266
+ user_pool = cognito.UserPool(self, "UserPool")
267
+ user_pool_client = cognito.UserPoolClient(self, "Client",
234
268
  user_pool=user_pool,
235
- user_pool_client=user_pool_client,
236
- user_pool_domain=user_pool_domain,
237
269
 
238
- # the properties below are optional
239
- authentication_request_extra_params={
240
- "authentication_request_extra_params_key": "authenticationRequestExtraParams"
241
- },
242
- on_unauthenticated_request=elbv2.UnauthenticatedAction.DENY,
243
- scope="scope",
244
- session_cookie_name="sessionCookieName",
245
- session_timeout=cdk.Duration.minutes(30)
270
+ # Required minimal configuration for use with an ELB
271
+ generate_secret=True,
272
+ auth_flows=cognito.AuthFlow(
273
+ user_password=True
274
+ ),
275
+ o_auth=cognito.OAuthSettings(
276
+ flows=cognito.OAuthFlows(
277
+ authorization_code_grant=True
278
+ ),
279
+ scopes=[cognito.OAuthScope.EMAIL],
280
+ callback_urls=[f"https://{lb.loadBalancerDnsName}/oauth2/idpresponse"
281
+ ]
282
+ )
283
+ )
284
+ cfn_client = user_pool_client.node.default_child
285
+ cfn_client.add_property_override("RefreshTokenValidity", 1)
286
+ cfn_client.add_property_override("SupportedIdentityProviders", ["COGNITO"])
287
+
288
+ user_pool_domain = cognito.UserPoolDomain(self, "Domain",
289
+ user_pool=user_pool,
290
+ cognito_domain=cognito.CognitoDomainOptions(
291
+ domain_prefix="test-cdk-prefix"
292
+ )
293
+ )
294
+
295
+ lb.add_listener("Listener",
296
+ port=443,
297
+ certificates=[certificate],
298
+ default_action=actions.AuthenticateCognitoAction(
299
+ user_pool=user_pool,
300
+ user_pool_client=user_pool_client,
301
+ user_pool_domain=user_pool_domain,
302
+ next=elbv2.ListenerAction.fixed_response(200,
303
+ content_type="text/plain",
304
+ message_body="Authenticated"
305
+ )
306
+ )
307
+ )
308
+
309
+ CfnOutput(self, "DNS",
310
+ value=lb.load_balancer_dns_name
246
311
  )
247
312
  '''
248
313
  if __debug__:
@@ -357,21 +357,18 @@ Make the following modifications to your CDK application to migrate to the `@aws
357
357
  For example:
358
358
 
359
359
  ```python
360
- # Example automatically generated from non-compiling source. May contain errors.
361
360
  version = es.ElasticsearchVersion.V7_1
362
361
  ```
363
362
 
364
363
  ...becomes...
365
364
 
366
365
  ```python
367
- # Example automatically generated from non-compiling source. May contain errors.
368
366
  version = opensearch.EngineVersion.ELASTICSEARCH_7_1
369
367
  ```
370
368
  * Replace the `cognitoKibanaAuth` property of `DomainProps` with `cognitoDashboardsAuth`.
371
369
  For example:
372
370
 
373
371
  ```python
374
- # Example automatically generated from non-compiling source. May contain errors.
375
372
  es.Domain(self, "Domain",
376
373
  cognito_kibana_auth=es.CognitoOptions(
377
374
  identity_pool_id="test-identity-pool-id",
@@ -385,7 +382,6 @@ Make the following modifications to your CDK application to migrate to the `@aws
385
382
  ...becomes...
386
383
 
387
384
  ```python
388
- # Example automatically generated from non-compiling source. May contain errors.
389
385
  opensearch.Domain(self, "Domain",
390
386
  cognito_dashboards_auth=opensearch.CognitoOptions(
391
387
  identity_pool_id="test-identity-pool-id",
@@ -399,7 +395,6 @@ Make the following modifications to your CDK application to migrate to the `@aws
399
395
  For example:
400
396
 
401
397
  ```python
402
- # Example automatically generated from non-compiling source. May contain errors.
403
398
  es.Domain(self, "Domain",
404
399
  capacity=es.CapacityConfig(
405
400
  master_node_instance_type="r5.large.elasticsearch"
@@ -411,7 +406,6 @@ Make the following modifications to your CDK application to migrate to the `@aws
411
406
  ...becomes...
412
407
 
413
408
  ```python
414
- # Example automatically generated from non-compiling source. May contain errors.
415
409
  opensearch.Domain(self, "Domain",
416
410
  capacity=opensearch.CapacityConfig(
417
411
  master_node_instance_type="r5.large.search"
@@ -3060,7 +3054,6 @@ class CognitoOptions:
3060
3054
 
3061
3055
  Example::
3062
3056
 
3063
- # Example automatically generated from non-compiling source. May contain errors.
3064
3057
  es.Domain(self, "Domain",
3065
3058
  cognito_kibana_auth=es.CognitoOptions(
3066
3059
  identity_pool_id="test-identity-pool-id",
@@ -599,7 +599,7 @@ class CfnCluster(
599
599
  :param log_encryption_kms_key_id: The AWS KMS key used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
600
600
  :param log_uri: The path to the Amazon S3 location where logs for this cluster are stored.
601
601
  :param managed_scaling_policy: Creates or updates a managed scaling policy for an Amazon EMR cluster. The managed scaling policy defines the limits for resources, such as EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
602
- :param os_release_label: The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was specified, the default Amazon Linux release is shown in the response.
602
+ :param os_release_label: ``AWS::EMR::Cluster.OSReleaseLabel``.
603
603
  :param release_label: The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form ``emr-x.x.x`` , where x.x.x is an Amazon EMR release version such as ``emr-5.14.0`` . For more information about Amazon EMR release versions and included application versions and features, see ` <https://docs.aws.amazon.com/emr/latest/ReleaseGuide/>`_ . The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use ``AmiVersion`` .
604
604
  :param scale_down_behavior: The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. ``TERMINATE_AT_INSTANCE_HOUR`` indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. ``TERMINATE_AT_TASK_COMPLETION`` indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. ``TERMINATE_AT_TASK_COMPLETION`` is available only in Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.
605
605
  :param security_configuration: The name of the security configuration applied to the cluster.
@@ -1000,9 +1000,7 @@ class CfnCluster(
1000
1000
  @builtins.property
1001
1001
  @jsii.member(jsii_name="osReleaseLabel")
1002
1002
  def os_release_label(self) -> typing.Optional[builtins.str]:
1003
- '''The Amazon Linux release specified in a cluster launch RunJobFlow request.
1004
-
1005
- If no Amazon Linux release was specified, the default Amazon Linux release is shown in the response.
1003
+ '''``AWS::EMR::Cluster.OSReleaseLabel``.
1006
1004
 
1007
1005
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-osreleaselabel
1008
1006
  '''
@@ -1377,11 +1375,8 @@ class CfnCluster(
1377
1375
  *,
1378
1376
  idle_timeout: typing.Optional[jsii.Number] = None,
1379
1377
  ) -> None:
1380
- '''An auto-termination policy for an Amazon EMR cluster.
1381
-
1382
- An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see `Control cluster termination <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html>`_ .
1383
-
1384
- :param idle_timeout: Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).
1378
+ '''
1379
+ :param idle_timeout: ``CfnCluster.AutoTerminationPolicyProperty.IdleTimeout``.
1385
1380
 
1386
1381
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-autoterminationpolicy.html
1387
1382
  :exampleMetadata: fixture=_generated
@@ -1405,9 +1400,7 @@ class CfnCluster(
1405
1400
 
1406
1401
  @builtins.property
1407
1402
  def idle_timeout(self) -> typing.Optional[jsii.Number]:
1408
- '''Specifies the amount of idle time in seconds after which the cluster automatically terminates.
1409
-
1410
- You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).
1403
+ '''``CfnCluster.AutoTerminationPolicyProperty.IdleTimeout``.
1411
1404
 
1412
1405
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-autoterminationpolicy.html#cfn-elasticmapreduce-cluster-autoterminationpolicy-idletimeout
1413
1406
  '''
@@ -5156,7 +5149,7 @@ class CfnClusterProps:
5156
5149
  :param log_encryption_kms_key_id: The AWS KMS key used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
5157
5150
  :param log_uri: The path to the Amazon S3 location where logs for this cluster are stored.
5158
5151
  :param managed_scaling_policy: Creates or updates a managed scaling policy for an Amazon EMR cluster. The managed scaling policy defines the limits for resources, such as EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
5159
- :param os_release_label: The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was specified, the default Amazon Linux release is shown in the response.
5152
+ :param os_release_label: ``AWS::EMR::Cluster.OSReleaseLabel``.
5160
5153
  :param release_label: The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form ``emr-x.x.x`` , where x.x.x is an Amazon EMR release version such as ``emr-5.14.0`` . For more information about Amazon EMR release versions and included application versions and features, see ` <https://docs.aws.amazon.com/emr/latest/ReleaseGuide/>`_ . The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use ``AmiVersion`` .
5161
5154
  :param scale_down_behavior: The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. ``TERMINATE_AT_INSTANCE_HOUR`` indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. ``TERMINATE_AT_TASK_COMPLETION`` indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. ``TERMINATE_AT_TASK_COMPLETION`` is available only in Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.
5162
5155
  :param security_configuration: The name of the security configuration applied to the cluster.
@@ -5899,9 +5892,7 @@ class CfnClusterProps:
5899
5892
 
5900
5893
  @builtins.property
5901
5894
  def os_release_label(self) -> typing.Optional[builtins.str]:
5902
- '''The Amazon Linux release specified in a cluster launch RunJobFlow request.
5903
-
5904
- If no Amazon Linux release was specified, the default Amazon Linux release is shown in the response.
5895
+ '''``AWS::EMR::Cluster.OSReleaseLabel``.
5905
5896
 
5906
5897
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-osreleaselabel
5907
5898
  '''
@@ -152,13 +152,13 @@ class CfnApplication(
152
152
  :param architecture: The CPU architecture type of the application. Allowed values: ``X86_64`` or ``ARM64``
153
153
  :param auto_start_configuration: The configuration for an application to automatically start on job submission.
154
154
  :param auto_stop_configuration: The configuration for an application to automatically stop after a certain amount of time being idle.
155
- :param image_configuration: The image configuration applied to all worker types.
155
+ :param image_configuration: ``AWS::EMRServerless::Application.ImageConfiguration``.
156
156
  :param initial_capacity: The initial capacity of the application.
157
157
  :param maximum_capacity: The maximum capacity of the application. This is cumulative across all workers at any given point in time during the lifespan of the application is created. No new resources will be created once any one of the defined limits is hit.
158
158
  :param name: The name of the application. *Minimum* : 1 *Maximum* : 64 *Pattern* : ``^[A-Za-z0-9._\\\\/#-]+$``
159
159
  :param network_configuration: The network configuration for customer VPC connectivity for the application.
160
160
  :param tags: The tags assigned to the application.
161
- :param worker_type_specifications: The specification applied to each worker type.
161
+ :param worker_type_specifications: ``AWS::EMRServerless::Application.WorkerTypeSpecifications``.
162
162
  '''
163
163
  if __debug__:
164
164
  type_hints = typing.get_type_hints(_typecheckingstub__73910249d55cbd2983a3ea1bb4666acedb0e3e84df9686bbdeecd191b5ae6373)
@@ -346,7 +346,7 @@ class CfnApplication(
346
346
  def image_configuration(
347
347
  self,
348
348
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnApplication.ImageConfigurationInputProperty"]]:
349
- '''The image configuration applied to all worker types.
349
+ '''``AWS::EMRServerless::Application.ImageConfiguration``.
350
350
 
351
351
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-imageconfiguration
352
352
  '''
@@ -454,7 +454,7 @@ class CfnApplication(
454
454
  def worker_type_specifications(
455
455
  self,
456
456
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, typing.Union[_IResolvable_da3f097b, "CfnApplication.WorkerTypeSpecificationInputProperty"]]]]:
457
- '''The specification applied to each worker type.
457
+ '''``AWS::EMRServerless::Application.WorkerTypeSpecifications``.
458
458
 
459
459
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-workertypespecifications
460
460
  '''
@@ -617,9 +617,8 @@ class CfnApplication(
617
617
  )
618
618
  class ImageConfigurationInputProperty:
619
619
  def __init__(self, *, image_uri: typing.Optional[builtins.str] = None) -> None:
620
- '''The image configuration.
621
-
622
- :param image_uri: The URI of an image in the Amazon ECR registry. This field is required when you create a new application. If you leave this field blank in an update, Amazon EMR will remove the image configuration.
620
+ '''
621
+ :param image_uri: ``CfnApplication.ImageConfigurationInputProperty.ImageUri``.
623
622
 
624
623
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-imageconfigurationinput.html
625
624
  :exampleMetadata: fixture=_generated
@@ -643,9 +642,7 @@ class CfnApplication(
643
642
 
644
643
  @builtins.property
645
644
  def image_uri(self) -> typing.Optional[builtins.str]:
646
- '''The URI of an image in the Amazon ECR registry.
647
-
648
- This field is required when you create a new application. If you leave this field blank in an update, Amazon EMR will remove the image configuration.
645
+ '''``CfnApplication.ImageConfigurationInputProperty.ImageUri``.
649
646
 
650
647
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-imageconfigurationinput.html#cfn-emrserverless-application-imageconfigurationinput-imageuri
651
648
  '''
@@ -1143,9 +1140,8 @@ class CfnApplication(
1143
1140
  *,
1144
1141
  image_configuration: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnApplication.ImageConfigurationInputProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
1145
1142
  ) -> None:
1146
- '''The specifications for a worker type.
1147
-
1148
- :param image_configuration: The image configuration for a worker type.
1143
+ '''
1144
+ :param image_configuration: ``CfnApplication.WorkerTypeSpecificationInputProperty.ImageConfiguration``.
1149
1145
 
1150
1146
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-workertypespecificationinput.html
1151
1147
  :exampleMetadata: fixture=_generated
@@ -1173,7 +1169,7 @@ class CfnApplication(
1173
1169
  def image_configuration(
1174
1170
  self,
1175
1171
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnApplication.ImageConfigurationInputProperty"]]:
1176
- '''The image configuration for a worker type.
1172
+ '''``CfnApplication.WorkerTypeSpecificationInputProperty.ImageConfiguration``.
1177
1173
 
1178
1174
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-workertypespecificationinput.html#cfn-emrserverless-application-workertypespecificationinput-imageconfiguration
1179
1175
  '''
@@ -1234,13 +1230,13 @@ class CfnApplicationProps:
1234
1230
  :param architecture: The CPU architecture type of the application. Allowed values: ``X86_64`` or ``ARM64``
1235
1231
  :param auto_start_configuration: The configuration for an application to automatically start on job submission.
1236
1232
  :param auto_stop_configuration: The configuration for an application to automatically stop after a certain amount of time being idle.
1237
- :param image_configuration: The image configuration applied to all worker types.
1233
+ :param image_configuration: ``AWS::EMRServerless::Application.ImageConfiguration``.
1238
1234
  :param initial_capacity: The initial capacity of the application.
1239
1235
  :param maximum_capacity: The maximum capacity of the application. This is cumulative across all workers at any given point in time during the lifespan of the application is created. No new resources will be created once any one of the defined limits is hit.
1240
1236
  :param name: The name of the application. *Minimum* : 1 *Maximum* : 64 *Pattern* : ``^[A-Za-z0-9._\\\\/#-]+$``
1241
1237
  :param network_configuration: The network configuration for customer VPC connectivity for the application.
1242
1238
  :param tags: The tags assigned to the application.
1243
- :param worker_type_specifications: The specification applied to each worker type.
1239
+ :param worker_type_specifications: ``AWS::EMRServerless::Application.WorkerTypeSpecifications``.
1244
1240
 
1245
1241
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html
1246
1242
  :exampleMetadata: fixture=_generated
@@ -1407,7 +1403,7 @@ class CfnApplicationProps:
1407
1403
  def image_configuration(
1408
1404
  self,
1409
1405
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnApplication.ImageConfigurationInputProperty]]:
1410
- '''The image configuration applied to all worker types.
1406
+ '''``AWS::EMRServerless::Application.ImageConfiguration``.
1411
1407
 
1412
1408
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-imageconfiguration
1413
1409
  '''
@@ -1477,7 +1473,7 @@ class CfnApplicationProps:
1477
1473
  def worker_type_specifications(
1478
1474
  self,
1479
1475
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, typing.Union[_IResolvable_da3f097b, CfnApplication.WorkerTypeSpecificationInputProperty]]]]:
1480
- '''The specification applied to each worker type.
1476
+ '''``AWS::EMRServerless::Application.WorkerTypeSpecifications``.
1481
1477
 
1482
1478
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-workertypespecifications
1483
1479
  '''
@@ -92,7 +92,6 @@ on_commit_rule.add_target(targets.SnsTopic(topic,
92
92
  To define a pattern, use the matcher API, which provides a number of factory methods to declare different logical predicates. For example, to match all S3 events for objects larger than 1024 bytes, stored using one of the storage classes Glacier, Glacier IR or Deep Archive and coming from any region other than the AWS GovCloud ones:
93
93
 
94
94
  ```python
95
- # Example automatically generated from non-compiling source. May contain errors.
96
95
  rule = events.Rule(self, "rule",
97
96
  event_pattern=events.EventPattern(
98
97
  detail={
@@ -106,7 +105,7 @@ rule = events.Rule(self, "rule",
106
105
  events.Match.prefix("GLACIER"),
107
106
  events.Match.exact_string("DEEP_ARCHIVE"))
108
107
  },
109
- detail-type=events.Match.equals_ignore_case("object created"),
108
+ detail_type=events.Match.equals_ignore_case("object created"),
110
109
 
111
110
  # If you prefer, you can use a low level array of strings, as directly consumed by EventBridge
112
111
  source=["aws.s3"],
@@ -333,7 +332,7 @@ class ApiDestinationProps:
333
332
  )
334
333
 
335
334
  rule = events.Rule(self, "Rule",
336
- schedule=events.Schedule.rate(cdk.Duration.minutes(1)),
335
+ schedule=events.Schedule.rate(Duration.minutes(1)),
337
336
  targets=[targets.ApiDestination(destination)]
338
337
  )
339
338
  '''
@@ -538,7 +537,7 @@ class Authorization(
538
537
  )
539
538
 
540
539
  rule = events.Rule(self, "Rule",
541
- schedule=events.Schedule.rate(cdk.Duration.minutes(1)),
540
+ schedule=events.Schedule.rate(Duration.minutes(1)),
542
541
  targets=[targets.ApiDestination(destination)]
543
542
  )
544
543
  '''
@@ -7535,7 +7534,7 @@ class ConnectionProps:
7535
7534
  )
7536
7535
 
7537
7536
  rule = events.Rule(self, "Rule",
7538
- schedule=events.Schedule.rate(cdk.Duration.minutes(1)),
7537
+ schedule=events.Schedule.rate(Duration.minutes(1)),
7539
7538
  targets=[targets.ApiDestination(destination)]
7540
7539
  )
7541
7540
  '''
@@ -8251,16 +8250,15 @@ class EventField(
8251
8250
 
8252
8251
  Example::
8253
8252
 
8254
- # Example automatically generated from non-compiling source. May contain errors.
8255
8253
  import aws_cdk.aws_logs as logs
8256
8254
  # log_group: logs.LogGroup
8257
8255
  # rule: events.Rule
8258
8256
 
8259
8257
 
8260
8258
  rule.add_target(targets.CloudWatchLogGroup(log_group,
8261
- log_event=targets.LogGroupTargetInput(
8262
- timestamp=events.EventField.from("$.time"),
8263
- message=events.EventField.from("$.detail-type")
8259
+ log_event=targets.LogGroupTargetInput.from_object(
8260
+ timestamp=events.EventField.from_path("$.time"),
8261
+ message=events.EventField.from_path("$.detail-type")
8264
8262
  )
8265
8263
  ))
8266
8264
  '''
@@ -8448,7 +8446,7 @@ class EventPattern:
8448
8446
 
8449
8447
  rule.add_target(targets.LambdaFunction(fn,
8450
8448
  dead_letter_queue=queue, # Optional: add a dead letter queue
8451
- max_event_age=cdk.Duration.hours(2), # Optional: set the maxEventAge retry policy
8449
+ max_event_age=Duration.hours(2), # Optional: set the maxEventAge retry policy
8452
8450
  retry_attempts=2
8453
8451
  ))
8454
8452
  '''
@@ -9080,7 +9078,6 @@ class Match(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_events.Match"):
9080
9078
 
9081
9079
  Example::
9082
9080
 
9083
- # Example automatically generated from non-compiling source. May contain errors.
9084
9081
  rule = events.Rule(self, "rule",
9085
9082
  event_pattern=events.EventPattern(
9086
9083
  detail={
@@ -9094,7 +9091,7 @@ class Match(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_events.Match"):
9094
9091
  events.Match.prefix("GLACIER"),
9095
9092
  events.Match.exact_string("DEEP_ARCHIVE"))
9096
9093
  },
9097
- detail-type=events.Match.equals_ignore_case("object created"),
9094
+ detail_type=events.Match.equals_ignore_case("object created"),
9098
9095
 
9099
9096
  # If you prefer, you can use a low level array of strings, as directly consumed by EventBridge
9100
9097
  source=["aws.s3"],
@@ -9703,7 +9700,7 @@ class Rule(
9703
9700
 
9704
9701
  rule.add_target(targets.LambdaFunction(fn,
9705
9702
  dead_letter_queue=queue, # Optional: add a dead letter queue
9706
- max_event_age=cdk.Duration.hours(2), # Optional: set the maxEventAge retry policy
9703
+ max_event_age=Duration.hours(2), # Optional: set the maxEventAge retry policy
9707
9704
  retry_attempts=2
9708
9705
  ))
9709
9706
  '''
@@ -9915,21 +9912,28 @@ class RuleProps(EventCommonOptions):
9915
9912
 
9916
9913
  Example::
9917
9914
 
9918
- connection = events.Connection(self, "Connection",
9919
- authorization=events.Authorization.api_key("x-api-key", SecretValue.secrets_manager("ApiSecretName")),
9920
- description="Connection with API Key x-api-key"
9921
- )
9915
+ import aws_cdk.aws_lambda as lambda_
9922
9916
 
9923
- destination = events.ApiDestination(self, "Destination",
9924
- connection=connection,
9925
- endpoint="https://example.com",
9926
- description="Calling example.com with API key x-api-key"
9917
+
9918
+ fn = lambda_.Function(self, "MyFunc",
9919
+ runtime=lambda_.Runtime.NODEJS_14_X,
9920
+ handler="index.handler",
9921
+ code=lambda_.Code.from_inline("exports.handler = handler.toString()")
9927
9922
  )
9928
9923
 
9929
- rule = events.Rule(self, "Rule",
9930
- schedule=events.Schedule.rate(cdk.Duration.minutes(1)),
9931
- targets=[targets.ApiDestination(destination)]
9924
+ rule = events.Rule(self, "rule",
9925
+ event_pattern=events.EventPattern(
9926
+ source=["aws.ec2"]
9927
+ )
9932
9928
  )
9929
+
9930
+ queue = sqs.Queue(self, "Queue")
9931
+
9932
+ rule.add_target(targets.LambdaFunction(fn,
9933
+ dead_letter_queue=queue, # Optional: add a dead letter queue
9934
+ max_event_age=Duration.hours(2), # Optional: set the maxEventAge retry policy
9935
+ retry_attempts=2
9936
+ ))
9933
9937
  '''
9934
9938
  if isinstance(event_pattern, dict):
9935
9939
  event_pattern = EventPattern(**event_pattern)
@@ -10405,7 +10409,7 @@ class RuleTargetInput(
10405
10409
 
10406
10410
 
10407
10411
  rule = events.Rule(self, "Rule",
10408
- schedule=events.Schedule.rate(cdk.Duration.minutes(1))
10412
+ schedule=events.Schedule.rate(Duration.minutes(1))
10409
10413
  )
10410
10414
 
10411
10415
  dlq = sqs.Queue(self, "DeadLetterQueue")
@@ -10414,7 +10418,7 @@ class RuleTargetInput(
10414
10418
  assumed_by=iam.ServicePrincipal("events.amazonaws.com")
10415
10419
  )
10416
10420
  state_machine = sfn.StateMachine(self, "SM",
10417
- definition=sfn.Wait(self, "Hello", time=sfn.WaitTime.duration(cdk.Duration.seconds(10)))
10421
+ definition=sfn.Wait(self, "Hello", time=sfn.WaitTime.duration(Duration.seconds(10)))
10418
10422
  )
10419
10423
 
10420
10424
  rule.add_target(targets.SfnStateMachine(state_machine,
@@ -10654,7 +10658,7 @@ class Schedule(
10654
10658
  )
10655
10659
 
10656
10660
  rule = events.Rule(self, "Rule",
10657
- schedule=events.Schedule.rate(cdk.Duration.minutes(1)),
10661
+ schedule=events.Schedule.rate(Duration.minutes(1)),
10658
10662
  targets=[targets.ApiDestination(destination)]
10659
10663
  )
10660
10664
  '''
@@ -10764,7 +10768,7 @@ class ApiDestination(
10764
10768
  )
10765
10769
 
10766
10770
  rule = events.Rule(self, "Rule",
10767
- schedule=events.Schedule.rate(cdk.Duration.minutes(1)),
10771
+ schedule=events.Schedule.rate(Duration.minutes(1)),
10768
10772
  targets=[targets.ApiDestination(destination)]
10769
10773
  )
10770
10774
  '''
@@ -10994,7 +10998,7 @@ class Connection(
10994
10998
  )
10995
10999
 
10996
11000
  rule = events.Rule(self, "Rule",
10997
- schedule=events.Schedule.rate(cdk.Duration.minutes(1)),
11001
+ schedule=events.Schedule.rate(Duration.minutes(1)),
10998
11002
  targets=[targets.ApiDestination(destination)]
10999
11003
  )
11000
11004
  '''