aws-cdk-lib 2.175.1__py3-none-any.whl → 2.176.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 (40) hide show
  1. aws_cdk/__init__.py +15 -6
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.175.1.jsii.tgz → aws-cdk-lib@2.176.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigatewayv2_integrations/__init__.py +159 -7
  5. aws_cdk/aws_appconfig/__init__.py +106 -24
  6. aws_cdk/aws_appsync/__init__.py +3 -3
  7. aws_cdk/aws_backup/__init__.py +18 -84
  8. aws_cdk/aws_cleanrooms/__init__.py +77 -34
  9. aws_cdk/aws_cloudformation/__init__.py +4 -2
  10. aws_cdk/aws_cloudfront/experimental/__init__.py +1 -1
  11. aws_cdk/aws_cloudwatch/__init__.py +53 -49
  12. aws_cdk/aws_codebuild/__init__.py +36 -0
  13. aws_cdk/aws_cognito/__init__.py +228 -219
  14. aws_cdk/aws_customerprofiles/__init__.py +1060 -0
  15. aws_cdk/aws_docdb/__init__.py +29 -9
  16. aws_cdk/aws_dynamodb/__init__.py +77 -58
  17. aws_cdk/aws_ec2/__init__.py +11 -8
  18. aws_cdk/aws_ecs/__init__.py +100 -35
  19. aws_cdk/aws_elasticloadbalancingv2/__init__.py +41 -5
  20. aws_cdk/aws_healthlake/__init__.py +36 -40
  21. aws_cdk/aws_lambda/__init__.py +8 -8
  22. aws_cdk/aws_lambda_event_sources/__init__.py +9 -9
  23. aws_cdk/aws_lex/__init__.py +105 -0
  24. aws_cdk/aws_mediaconvert/__init__.py +7 -3
  25. aws_cdk/aws_organizations/__init__.py +5 -9
  26. aws_cdk/aws_rds/__init__.py +83 -8
  27. aws_cdk/aws_resiliencehub/__init__.py +41 -0
  28. aws_cdk/aws_s3/__init__.py +5 -5
  29. aws_cdk/aws_ses/__init__.py +25 -4
  30. aws_cdk/aws_ssm/__init__.py +9 -2
  31. aws_cdk/aws_ssmquicksetup/__init__.py +84 -84
  32. aws_cdk/aws_sso/__init__.py +9 -5
  33. aws_cdk/cx_api/__init__.py +25 -4
  34. {aws_cdk_lib-2.175.1.dist-info → aws_cdk_lib-2.176.0.dist-info}/METADATA +1 -1
  35. {aws_cdk_lib-2.175.1.dist-info → aws_cdk_lib-2.176.0.dist-info}/RECORD +39 -40
  36. aws_cdk/aws_iot1click/__init__.py +0 -1193
  37. {aws_cdk_lib-2.175.1.dist-info → aws_cdk_lib-2.176.0.dist-info}/LICENSE +0 -0
  38. {aws_cdk_lib-2.175.1.dist-info → aws_cdk_lib-2.176.0.dist-info}/NOTICE +0 -0
  39. {aws_cdk_lib-2.175.1.dist-info → aws_cdk_lib-2.176.0.dist-info}/WHEEL +0 -0
  40. {aws_cdk_lib-2.175.1.dist-info → aws_cdk_lib-2.176.0.dist-info}/top_level.txt +0 -0
aws_cdk/__init__.py CHANGED
@@ -6252,7 +6252,7 @@ class CfnMacroProps:
6252
6252
  :param function_name: The Amazon Resource Name (ARN) of the underlying Lambda function that you want CloudFormation to invoke when the macro is run.
6253
6253
  :param name: The name of the macro. The name of the macro must be unique across all macros in the account.
6254
6254
  :param description: A description of the macro.
6255
- :param log_group_name: The CloudWatch Logs group to which CloudFormation sends error logging information when invoking the macro's underlying Lambda function.
6255
+ :param log_group_name: The CloudWatch Logs group to which CloudFormation sends error logging information when invoking the macro's underlying Lambda function. This will be an existing CloudWatch Logs LogGroup. Neither CloudFormation or Lambda will create the group.
6256
6256
  :param log_role_arn: The ARN of the role CloudFormation should assume when sending log entries to CloudWatch Logs .
6257
6257
 
6258
6258
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html
@@ -6327,6 +6327,8 @@ class CfnMacroProps:
6327
6327
  def log_group_name(self) -> typing.Optional[builtins.str]:
6328
6328
  '''The CloudWatch Logs group to which CloudFormation sends error logging information when invoking the macro's underlying Lambda function.
6329
6329
 
6330
+ This will be an existing CloudWatch Logs LogGroup. Neither CloudFormation or Lambda will create the group.
6331
+
6330
6332
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html#cfn-cloudformation-macro-loggroupname
6331
6333
  '''
6332
6334
  result = self._values.get("log_group_name")
@@ -13282,6 +13284,7 @@ class Environment:
13282
13284
  Example::
13283
13285
 
13284
13286
  import aws_cdk as cdk
13287
+ import aws_cdk.aws_cloudwatch as cloudwatch
13285
13288
 
13286
13289
 
13287
13290
  app = cdk.App()
@@ -13289,10 +13292,18 @@ class Environment:
13289
13292
 
13290
13293
  global_table = dynamodb.TableV2(stack, "GlobalTable",
13291
13294
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
13292
- replicas=[dynamodb.ReplicaTableProps(region="us-east-1")]
13295
+ replicas=[dynamodb.ReplicaTableProps(region="us-east-1"), dynamodb.ReplicaTableProps(region="us-east-2")
13296
+ ]
13293
13297
  )
13294
13298
 
13295
- global_table.add_replica(region="us-east-2", deletion_protection=True)
13299
+ # metric is only for the table in us-west-2
13300
+ metric = global_table.metric_consumed_read_capacity_units()
13301
+
13302
+ cloudwatch.Alarm(self, "Alarm",
13303
+ metric=metric,
13304
+ evaluation_periods=1,
13305
+ threshold=1
13306
+ )
13296
13307
  '''
13297
13308
  if __debug__:
13298
13309
  type_hints = typing.get_type_hints(_typecheckingstub__779551ef0a4b144070fd2c3e88ff076e32ad12d30facdc65a940b7a8791f27c6)
@@ -30317,7 +30328,7 @@ class CfnMacro(CfnResource, metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.CfnM
30317
30328
  :param function_name: The Amazon Resource Name (ARN) of the underlying Lambda function that you want CloudFormation to invoke when the macro is run.
30318
30329
  :param name: The name of the macro. The name of the macro must be unique across all macros in the account.
30319
30330
  :param description: A description of the macro.
30320
- :param log_group_name: The CloudWatch Logs group to which CloudFormation sends error logging information when invoking the macro's underlying Lambda function.
30331
+ :param log_group_name: The CloudWatch Logs group to which CloudFormation sends error logging information when invoking the macro's underlying Lambda function. This will be an existing CloudWatch Logs LogGroup. Neither CloudFormation or Lambda will create the group.
30321
30332
  :param log_role_arn: The ARN of the role CloudFormation should assume when sending log entries to CloudWatch Logs .
30322
30333
  '''
30323
30334
  if __debug__:
@@ -36347,7 +36358,6 @@ __all__ = [
36347
36358
  "aws_internetmonitor",
36348
36359
  "aws_invoicing",
36349
36360
  "aws_iot",
36350
- "aws_iot1click",
36351
36361
  "aws_iotanalytics",
36352
36362
  "aws_iotcoredeviceadvisor",
36353
36363
  "aws_iotevents",
@@ -36640,7 +36650,6 @@ from . import aws_inspectorv2
36640
36650
  from . import aws_internetmonitor
36641
36651
  from . import aws_invoicing
36642
36652
  from . import aws_iot
36643
- from . import aws_iot1click
36644
36653
  from . import aws_iotanalytics
36645
36654
  from . import aws_iotcoredeviceadvisor
36646
36655
  from . import aws_iotevents
aws_cdk/_jsii/__init__.py CHANGED
@@ -35,7 +35,7 @@ import aws_cdk.cloud_assembly_schema._jsii
35
35
  import constructs._jsii
36
36
 
37
37
  __jsii_assembly__ = jsii.JSIIAssembly.load(
38
- "aws-cdk-lib", "2.175.1", __name__[0:-6], "aws-cdk-lib@2.175.1.jsii.tgz"
38
+ "aws-cdk-lib", "2.176.0", __name__[0:-6], "aws-cdk-lib@2.176.0.jsii.tgz"
39
39
  )
40
40
 
41
41
  __all__ = [
@@ -14,6 +14,7 @@ r'''
14
14
 
15
15
  * [Lambda WebSocket Integration](#lambda-websocket-integration)
16
16
  * [AWS WebSocket Integration](#aws-websocket-integration)
17
+ * [Mock WebSocket Integration](#mock-websocket-integration)
17
18
  * [Import Issues](#import-issues)
18
19
 
19
20
  * [DotNet Namespace](#dotnet-namespace)
@@ -322,6 +323,30 @@ web_socket_api.add_route("$connect",
322
323
  You can also set additional properties to change the behavior of your integration, such as `contentHandling`.
323
324
  See [Working with binary media types for WebSocket APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-develop-binary-media-types.html).
324
325
 
326
+ ### Mock WebSocket Integration
327
+
328
+ API Gateway also allows the creation of mock integrations, allowing you to generate API responses without the need for an integration backend. These responses can range in complexity from a static message to a templated response with parameters extracted from the input request or the integration's context. See [Set up data mapping for WebSocket APIs in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-mapping-template-reference.html) and [WebSocket API mapping template reference for API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-mapping-template-reference.html) for more information.
329
+
330
+ ```python
331
+ from aws_cdk.aws_apigatewayv2_integrations import WebSocketMockIntegration
332
+
333
+
334
+ web_socket_api = apigwv2.WebSocketApi(self, "mywsapi")
335
+ apigwv2.WebSocketStage(self, "mystage",
336
+ web_socket_api=web_socket_api,
337
+ stage_name="dev",
338
+ auto_deploy=True
339
+ )
340
+
341
+ web_socket_api.add_route("sendMessage",
342
+ integration=WebSocketMockIntegration("DefaultIntegration",
343
+ request_templates={"application/json": JSON.stringify({"status_code": 200})},
344
+ template_selection_expression="\\$default"
345
+ ),
346
+ return_response=True
347
+ )
348
+ ```
349
+
325
350
  ## Import Issues
326
351
 
327
352
  `jsiirc.json` file is missing during the stablization process of this module, which caused import issues for DotNet and Java users who attempt to use this module. Unfortunately, to guarantee backward compatibility, we cannot simply correct the namespace for DotNet or package for Java. The following outlines the workaround.
@@ -2103,25 +2128,50 @@ class WebSocketMockIntegration(
2103
2128
  ):
2104
2129
  '''Mock WebSocket Integration.
2105
2130
 
2106
- :exampleMetadata: fixture=_generated
2131
+ :exampleMetadata: infused
2107
2132
 
2108
2133
  Example::
2109
2134
 
2110
- # The code below shows an example of how to instantiate this type.
2111
- # The values are placeholders you should change.
2112
- from aws_cdk import aws_apigatewayv2_integrations as apigatewayv2_integrations
2135
+ from aws_cdk.aws_apigatewayv2_integrations import WebSocketMockIntegration
2136
+
2137
+
2138
+ web_socket_api = apigwv2.WebSocketApi(self, "mywsapi")
2139
+ apigwv2.WebSocketStage(self, "mystage",
2140
+ web_socket_api=web_socket_api,
2141
+ stage_name="dev",
2142
+ auto_deploy=True
2143
+ )
2113
2144
 
2114
- web_socket_mock_integration = apigatewayv2_integrations.WebSocketMockIntegration("id")
2145
+ web_socket_api.add_route("sendMessage",
2146
+ integration=WebSocketMockIntegration("DefaultIntegration",
2147
+ request_templates={"application/json": JSON.stringify({"status_code": 200})},
2148
+ template_selection_expression="\\$default"
2149
+ ),
2150
+ return_response=True
2151
+ )
2115
2152
  '''
2116
2153
 
2117
- def __init__(self, id: builtins.str) -> None:
2154
+ def __init__(
2155
+ self,
2156
+ id: builtins.str,
2157
+ *,
2158
+ request_templates: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
2159
+ template_selection_expression: typing.Optional[builtins.str] = None,
2160
+ ) -> None:
2118
2161
  '''
2119
2162
  :param id: id of the underlying integration construct.
2163
+ :param request_templates: A map of Apache Velocity templates that are applied on the request payload. Example:: { "application/json": "{ \\"statusCode\\": 200 }" } Default: - No request template provided to the integration.
2164
+ :param template_selection_expression: The template selection expression for the integration. Default: - No template selection expression provided.
2120
2165
  '''
2121
2166
  if __debug__:
2122
2167
  type_hints = typing.get_type_hints(_typecheckingstub__0919a4fac21867e16e13ed094546c03cf261043724396e00ccd357f077081bad)
2123
2168
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
2124
- jsii.create(self.__class__, self, [id])
2169
+ props = WebSocketMockIntegrationProps(
2170
+ request_templates=request_templates,
2171
+ template_selection_expression=template_selection_expression,
2172
+ )
2173
+
2174
+ jsii.create(self.__class__, self, [id, props])
2125
2175
 
2126
2176
  @jsii.member(jsii_name="bind")
2127
2177
  def bind(
@@ -2142,6 +2192,96 @@ class WebSocketMockIntegration(
2142
2192
  return typing.cast(_WebSocketRouteIntegrationConfig_7402c18a, jsii.invoke(self, "bind", [options]))
2143
2193
 
2144
2194
 
2195
+ @jsii.data_type(
2196
+ jsii_type="aws-cdk-lib.aws_apigatewayv2_integrations.WebSocketMockIntegrationProps",
2197
+ jsii_struct_bases=[],
2198
+ name_mapping={
2199
+ "request_templates": "requestTemplates",
2200
+ "template_selection_expression": "templateSelectionExpression",
2201
+ },
2202
+ )
2203
+ class WebSocketMockIntegrationProps:
2204
+ def __init__(
2205
+ self,
2206
+ *,
2207
+ request_templates: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
2208
+ template_selection_expression: typing.Optional[builtins.str] = None,
2209
+ ) -> None:
2210
+ '''Props for Mock type integration for a WebSocket Api.
2211
+
2212
+ :param request_templates: A map of Apache Velocity templates that are applied on the request payload. Example:: { "application/json": "{ \\"statusCode\\": 200 }" } Default: - No request template provided to the integration.
2213
+ :param template_selection_expression: The template selection expression for the integration. Default: - No template selection expression provided.
2214
+
2215
+ :exampleMetadata: infused
2216
+
2217
+ Example::
2218
+
2219
+ from aws_cdk.aws_apigatewayv2_integrations import WebSocketMockIntegration
2220
+
2221
+
2222
+ web_socket_api = apigwv2.WebSocketApi(self, "mywsapi")
2223
+ apigwv2.WebSocketStage(self, "mystage",
2224
+ web_socket_api=web_socket_api,
2225
+ stage_name="dev",
2226
+ auto_deploy=True
2227
+ )
2228
+
2229
+ web_socket_api.add_route("sendMessage",
2230
+ integration=WebSocketMockIntegration("DefaultIntegration",
2231
+ request_templates={"application/json": JSON.stringify({"status_code": 200})},
2232
+ template_selection_expression="\\$default"
2233
+ ),
2234
+ return_response=True
2235
+ )
2236
+ '''
2237
+ if __debug__:
2238
+ type_hints = typing.get_type_hints(_typecheckingstub__d6654c6762caad4ba2ce48d0dd2c9946c37d0961c47d7df1f0618055fb20fbf2)
2239
+ check_type(argname="argument request_templates", value=request_templates, expected_type=type_hints["request_templates"])
2240
+ check_type(argname="argument template_selection_expression", value=template_selection_expression, expected_type=type_hints["template_selection_expression"])
2241
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
2242
+ if request_templates is not None:
2243
+ self._values["request_templates"] = request_templates
2244
+ if template_selection_expression is not None:
2245
+ self._values["template_selection_expression"] = template_selection_expression
2246
+
2247
+ @builtins.property
2248
+ def request_templates(
2249
+ self,
2250
+ ) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
2251
+ '''A map of Apache Velocity templates that are applied on the request payload.
2252
+
2253
+ Example::
2254
+
2255
+ { "application/json": "{ \\"statusCode\\": 200 }" }
2256
+
2257
+ :default: - No request template provided to the integration.
2258
+
2259
+ :see: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-mapping-template-reference.html
2260
+ '''
2261
+ result = self._values.get("request_templates")
2262
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
2263
+
2264
+ @builtins.property
2265
+ def template_selection_expression(self) -> typing.Optional[builtins.str]:
2266
+ '''The template selection expression for the integration.
2267
+
2268
+ :default: - No template selection expression provided.
2269
+ '''
2270
+ result = self._values.get("template_selection_expression")
2271
+ return typing.cast(typing.Optional[builtins.str], result)
2272
+
2273
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
2274
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
2275
+
2276
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
2277
+ return not (rhs == self)
2278
+
2279
+ def __repr__(self) -> str:
2280
+ return "WebSocketMockIntegrationProps(%s)" % ", ".join(
2281
+ k + "=" + repr(v) for k, v in self._values.items()
2282
+ )
2283
+
2284
+
2145
2285
  @jsii.data_type(
2146
2286
  jsii_type="aws-cdk-lib.aws_apigatewayv2_integrations.HttpAlbIntegrationProps",
2147
2287
  jsii_struct_bases=[HttpPrivateIntegrationOptions],
@@ -2423,6 +2563,7 @@ __all__ = [
2423
2563
  "WebSocketLambdaIntegration",
2424
2564
  "WebSocketLambdaIntegrationProps",
2425
2565
  "WebSocketMockIntegration",
2566
+ "WebSocketMockIntegrationProps",
2426
2567
  ]
2427
2568
 
2428
2569
  publication.publish()
@@ -2670,6 +2811,17 @@ def _typecheckingstub__b3043b7d6bcd4be959d4924c0dbbe6ad490dc788f95ab7a014933e7e1
2670
2811
 
2671
2812
  def _typecheckingstub__0919a4fac21867e16e13ed094546c03cf261043724396e00ccd357f077081bad(
2672
2813
  id: builtins.str,
2814
+ *,
2815
+ request_templates: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
2816
+ template_selection_expression: typing.Optional[builtins.str] = None,
2817
+ ) -> None:
2818
+ """Type checking stubs"""
2819
+ pass
2820
+
2821
+ def _typecheckingstub__d6654c6762caad4ba2ce48d0dd2c9946c37d0961c47d7df1f0618055fb20fbf2(
2822
+ *,
2823
+ request_templates: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
2824
+ template_selection_expression: typing.Optional[builtins.str] = None,
2673
2825
  ) -> None:
2674
2826
  """Type checking stubs"""
2675
2827
  pass
@@ -98,6 +98,26 @@ user = iam.User(self, "MyUser")
98
98
  env.grant_read_config(user)
99
99
  ```
100
100
 
101
+ ### Deletion Protection Check
102
+
103
+ You can enable [deletion protection](https://docs.aws.amazon.com/appconfig/latest/userguide/deletion-protection.html) on the environment by setting the `deletionProtectionCheck` property.
104
+
105
+ * ACCOUNT_DEFAULT: The default setting, which uses account-level deletion protection. To configure account-level deletion protection, use the UpdateAccountSettings API.
106
+ * APPLY: Instructs the deletion protection check to run, even if deletion protection is disabled at the account level. APPLY also forces the deletion protection check to run against resources created in the past hour, which are normally excluded from deletion protection checks.
107
+ * BYPASS: Instructs AWS AppConfig to bypass the deletion protection check and delete an environment even if deletion protection would have otherwise prevented it.
108
+
109
+ ```python
110
+ # application: appconfig.Application
111
+ # alarm: cloudwatch.Alarm
112
+ # composite_alarm: cloudwatch.CompositeAlarm
113
+
114
+
115
+ appconfig.Environment(self, "MyEnvironment",
116
+ application=application,
117
+ deletion_protection_check=appconfig.DeletionProtectionCheck.APPLY
118
+ )
119
+ ```
120
+
101
121
  ## Deployment Strategy
102
122
 
103
123
  [AWS AppConfig Deployment Strategy Documentation](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-deployment-strategy.html)
@@ -2067,14 +2087,6 @@ class CfnDeployment(
2067
2087
  '''
2068
2088
  return typing.cast(builtins.str, jsii.get(self, "attrDeploymentNumber"))
2069
2089
 
2070
- @builtins.property
2071
- @jsii.member(jsii_name="attrId")
2072
- def attr_id(self) -> builtins.str:
2073
- '''
2074
- :cloudformationAttribute: Id
2075
- '''
2076
- return typing.cast(builtins.str, jsii.get(self, "attrId"))
2077
-
2078
2090
  @builtins.property
2079
2091
  @jsii.member(jsii_name="cdkTagManager")
2080
2092
  def cdk_tag_manager(self) -> _TagManager_0a598cb3:
@@ -5480,6 +5492,40 @@ class ConfigurationType(enum.Enum):
5480
5492
  '''
5481
5493
 
5482
5494
 
5495
+ @jsii.enum(jsii_type="aws-cdk-lib.aws_appconfig.DeletionProtectionCheck")
5496
+ class DeletionProtectionCheck(enum.Enum):
5497
+ '''The deletion protection check options.
5498
+
5499
+ :exampleMetadata: infused
5500
+
5501
+ Example::
5502
+
5503
+ # application: appconfig.Application
5504
+ # alarm: cloudwatch.Alarm
5505
+ # composite_alarm: cloudwatch.CompositeAlarm
5506
+
5507
+
5508
+ appconfig.Environment(self, "MyEnvironment",
5509
+ application=application,
5510
+ deletion_protection_check=appconfig.DeletionProtectionCheck.APPLY
5511
+ )
5512
+ '''
5513
+
5514
+ ACCOUNT_DEFAULT = "ACCOUNT_DEFAULT"
5515
+ '''The default setting, which uses account-level deletion protection.
5516
+
5517
+ To configure account-level deletion protection, use the UpdateAccountSettings API.
5518
+ '''
5519
+ APPLY = "APPLY"
5520
+ '''Instructs the deletion protection check to run, even if deletion protection is disabled at the account level.
5521
+
5522
+ APPLY also forces the deletion protection check to run against resources created in the past hour,
5523
+ which are normally excluded from deletion protection checks.
5524
+ '''
5525
+ BYPASS = "BYPASS"
5526
+ '''Instructs AWS AppConfig to bypass the deletion protection check and delete an environment or a configuration profile even if deletion protection would have otherwise prevented it.'''
5527
+
5528
+
5483
5529
  class DeploymentStrategyId(
5484
5530
  metaclass=jsii.JSIIAbstractClass,
5485
5531
  jsii_type="aws-cdk-lib.aws_appconfig.DeploymentStrategyId",
@@ -5788,6 +5834,7 @@ class EnvironmentAttributes:
5788
5834
  jsii_type="aws-cdk-lib.aws_appconfig.EnvironmentOptions",
5789
5835
  jsii_struct_bases=[],
5790
5836
  name_mapping={
5837
+ "deletion_protection_check": "deletionProtectionCheck",
5791
5838
  "description": "description",
5792
5839
  "environment_name": "environmentName",
5793
5840
  "monitors": "monitors",
@@ -5797,12 +5844,14 @@ class EnvironmentOptions:
5797
5844
  def __init__(
5798
5845
  self,
5799
5846
  *,
5847
+ deletion_protection_check: typing.Optional[DeletionProtectionCheck] = None,
5800
5848
  description: typing.Optional[builtins.str] = None,
5801
5849
  environment_name: typing.Optional[builtins.str] = None,
5802
5850
  monitors: typing.Optional[typing.Sequence["Monitor"]] = None,
5803
5851
  ) -> None:
5804
5852
  '''Options for the Environment construct.
5805
5853
 
5854
+ :param deletion_protection_check: A property to prevent accidental deletion of active environments. Default: undefined - AppConfig default is ACCOUNT_DEFAULT
5806
5855
  :param description: The description of the environment. Default: - No description.
5807
5856
  :param environment_name: The name of the environment. Default: - A name is generated.
5808
5857
  :param monitors: The monitors for the environment. Default: - No monitors.
@@ -5818,6 +5867,7 @@ class EnvironmentOptions:
5818
5867
  # monitor: appconfig.Monitor
5819
5868
 
5820
5869
  environment_options = appconfig.EnvironmentOptions(
5870
+ deletion_protection_check=appconfig.DeletionProtectionCheck.ACCOUNT_DEFAULT,
5821
5871
  description="description",
5822
5872
  environment_name="environmentName",
5823
5873
  monitors=[monitor]
@@ -5825,10 +5875,13 @@ class EnvironmentOptions:
5825
5875
  '''
5826
5876
  if __debug__:
5827
5877
  type_hints = typing.get_type_hints(_typecheckingstub__fbb7b0217b9bc7608bc896aa9827a29bb06de82b32c07cf8d98954734cdae547)
5878
+ check_type(argname="argument deletion_protection_check", value=deletion_protection_check, expected_type=type_hints["deletion_protection_check"])
5828
5879
  check_type(argname="argument description", value=description, expected_type=type_hints["description"])
5829
5880
  check_type(argname="argument environment_name", value=environment_name, expected_type=type_hints["environment_name"])
5830
5881
  check_type(argname="argument monitors", value=monitors, expected_type=type_hints["monitors"])
5831
5882
  self._values: typing.Dict[builtins.str, typing.Any] = {}
5883
+ if deletion_protection_check is not None:
5884
+ self._values["deletion_protection_check"] = deletion_protection_check
5832
5885
  if description is not None:
5833
5886
  self._values["description"] = description
5834
5887
  if environment_name is not None:
@@ -5836,6 +5889,15 @@ class EnvironmentOptions:
5836
5889
  if monitors is not None:
5837
5890
  self._values["monitors"] = monitors
5838
5891
 
5892
+ @builtins.property
5893
+ def deletion_protection_check(self) -> typing.Optional[DeletionProtectionCheck]:
5894
+ '''A property to prevent accidental deletion of active environments.
5895
+
5896
+ :default: undefined - AppConfig default is ACCOUNT_DEFAULT
5897
+ '''
5898
+ result = self._values.get("deletion_protection_check")
5899
+ return typing.cast(typing.Optional[DeletionProtectionCheck], result)
5900
+
5839
5901
  @builtins.property
5840
5902
  def description(self) -> typing.Optional[builtins.str]:
5841
5903
  '''The description of the environment.
@@ -5879,6 +5941,7 @@ class EnvironmentOptions:
5879
5941
  jsii_type="aws-cdk-lib.aws_appconfig.EnvironmentProps",
5880
5942
  jsii_struct_bases=[EnvironmentOptions],
5881
5943
  name_mapping={
5944
+ "deletion_protection_check": "deletionProtectionCheck",
5882
5945
  "description": "description",
5883
5946
  "environment_name": "environmentName",
5884
5947
  "monitors": "monitors",
@@ -5889,6 +5952,7 @@ class EnvironmentProps(EnvironmentOptions):
5889
5952
  def __init__(
5890
5953
  self,
5891
5954
  *,
5955
+ deletion_protection_check: typing.Optional[DeletionProtectionCheck] = None,
5892
5956
  description: typing.Optional[builtins.str] = None,
5893
5957
  environment_name: typing.Optional[builtins.str] = None,
5894
5958
  monitors: typing.Optional[typing.Sequence["Monitor"]] = None,
@@ -5896,6 +5960,7 @@ class EnvironmentProps(EnvironmentOptions):
5896
5960
  ) -> None:
5897
5961
  '''Properties for the Environment construct.
5898
5962
 
5963
+ :param deletion_protection_check: A property to prevent accidental deletion of active environments. Default: undefined - AppConfig default is ACCOUNT_DEFAULT
5899
5964
  :param description: The description of the environment. Default: - No description.
5900
5965
  :param environment_name: The name of the environment. Default: - A name is generated.
5901
5966
  :param monitors: The monitors for the environment. Default: - No monitors.
@@ -5910,20 +5975,15 @@ class EnvironmentProps(EnvironmentOptions):
5910
5975
  application=app
5911
5976
  )
5912
5977
 
5913
- appconfig.HostedConfiguration(self, "MyFirstHostedConfig",
5914
- application=app,
5915
- deploy_to=[env],
5916
- content=appconfig.ConfigurationContent.from_inline_text("This is my first configuration content.")
5917
- )
5918
-
5919
- appconfig.HostedConfiguration(self, "MySecondHostedConfig",
5978
+ appconfig.HostedConfiguration(self, "MyHostedConfig",
5920
5979
  application=app,
5921
5980
  deploy_to=[env],
5922
- content=appconfig.ConfigurationContent.from_inline_text("This is my second configuration content.")
5981
+ content=appconfig.ConfigurationContent.from_inline_text("This is my configuration content.")
5923
5982
  )
5924
5983
  '''
5925
5984
  if __debug__:
5926
5985
  type_hints = typing.get_type_hints(_typecheckingstub__70814b8db38d5e11a0b33e43663913fb290e190ace3191585fc4d0bd4c97bfff)
5986
+ check_type(argname="argument deletion_protection_check", value=deletion_protection_check, expected_type=type_hints["deletion_protection_check"])
5927
5987
  check_type(argname="argument description", value=description, expected_type=type_hints["description"])
5928
5988
  check_type(argname="argument environment_name", value=environment_name, expected_type=type_hints["environment_name"])
5929
5989
  check_type(argname="argument monitors", value=monitors, expected_type=type_hints["monitors"])
@@ -5931,6 +5991,8 @@ class EnvironmentProps(EnvironmentOptions):
5931
5991
  self._values: typing.Dict[builtins.str, typing.Any] = {
5932
5992
  "application": application,
5933
5993
  }
5994
+ if deletion_protection_check is not None:
5995
+ self._values["deletion_protection_check"] = deletion_protection_check
5934
5996
  if description is not None:
5935
5997
  self._values["description"] = description
5936
5998
  if environment_name is not None:
@@ -5938,6 +6000,15 @@ class EnvironmentProps(EnvironmentOptions):
5938
6000
  if monitors is not None:
5939
6001
  self._values["monitors"] = monitors
5940
6002
 
6003
+ @builtins.property
6004
+ def deletion_protection_check(self) -> typing.Optional[DeletionProtectionCheck]:
6005
+ '''A property to prevent accidental deletion of active environments.
6006
+
6007
+ :default: undefined - AppConfig default is ACCOUNT_DEFAULT
6008
+ '''
6009
+ result = self._values.get("deletion_protection_check")
6010
+ return typing.cast(typing.Optional[DeletionProtectionCheck], result)
6011
+
5941
6012
  @builtins.property
5942
6013
  def description(self) -> typing.Optional[builtins.str]:
5943
6014
  '''The description of the environment.
@@ -6836,6 +6907,7 @@ class IApplication(_IResource_c80c4260, typing_extensions.Protocol):
6836
6907
  self,
6837
6908
  id: builtins.str,
6838
6909
  *,
6910
+ deletion_protection_check: typing.Optional[DeletionProtectionCheck] = None,
6839
6911
  description: typing.Optional[builtins.str] = None,
6840
6912
  environment_name: typing.Optional[builtins.str] = None,
6841
6913
  monitors: typing.Optional[typing.Sequence["Monitor"]] = None,
@@ -6843,6 +6915,7 @@ class IApplication(_IResource_c80c4260, typing_extensions.Protocol):
6843
6915
  '''Adds an environment.
6844
6916
 
6845
6917
  :param id: The name of the environment construct.
6918
+ :param deletion_protection_check: A property to prevent accidental deletion of active environments. Default: undefined - AppConfig default is ACCOUNT_DEFAULT
6846
6919
  :param description: The description of the environment. Default: - No description.
6847
6920
  :param environment_name: The name of the environment. Default: - A name is generated.
6848
6921
  :param monitors: The monitors for the environment. Default: - No monitors.
@@ -7157,6 +7230,7 @@ class _IApplicationProxy(
7157
7230
  self,
7158
7231
  id: builtins.str,
7159
7232
  *,
7233
+ deletion_protection_check: typing.Optional[DeletionProtectionCheck] = None,
7160
7234
  description: typing.Optional[builtins.str] = None,
7161
7235
  environment_name: typing.Optional[builtins.str] = None,
7162
7236
  monitors: typing.Optional[typing.Sequence["Monitor"]] = None,
@@ -7164,6 +7238,7 @@ class _IApplicationProxy(
7164
7238
  '''Adds an environment.
7165
7239
 
7166
7240
  :param id: The name of the environment construct.
7241
+ :param deletion_protection_check: A property to prevent accidental deletion of active environments. Default: undefined - AppConfig default is ACCOUNT_DEFAULT
7167
7242
  :param description: The description of the environment. Default: - No description.
7168
7243
  :param environment_name: The name of the environment. Default: - A name is generated.
7169
7244
  :param monitors: The monitors for the environment. Default: - No monitors.
@@ -7172,6 +7247,7 @@ class _IApplicationProxy(
7172
7247
  type_hints = typing.get_type_hints(_typecheckingstub__eb165be70f31f79374053f908981a5e02c37cbdefd4d2123a7e32165fb887042)
7173
7248
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
7174
7249
  options = EnvironmentOptions(
7250
+ deletion_protection_check=deletion_protection_check,
7175
7251
  description=description,
7176
7252
  environment_name=environment_name,
7177
7253
  monitors=monitors,
@@ -11111,6 +11187,7 @@ class Application(
11111
11187
  self,
11112
11188
  id: builtins.str,
11113
11189
  *,
11190
+ deletion_protection_check: typing.Optional[DeletionProtectionCheck] = None,
11114
11191
  description: typing.Optional[builtins.str] = None,
11115
11192
  environment_name: typing.Optional[builtins.str] = None,
11116
11193
  monitors: typing.Optional[typing.Sequence[Monitor]] = None,
@@ -11118,6 +11195,7 @@ class Application(
11118
11195
  '''Adds an environment.
11119
11196
 
11120
11197
  :param id: -
11198
+ :param deletion_protection_check: A property to prevent accidental deletion of active environments. Default: undefined - AppConfig default is ACCOUNT_DEFAULT
11121
11199
  :param description: The description of the environment. Default: - No description.
11122
11200
  :param environment_name: The name of the environment. Default: - A name is generated.
11123
11201
  :param monitors: The monitors for the environment. Default: - No monitors.
@@ -11126,6 +11204,7 @@ class Application(
11126
11204
  type_hints = typing.get_type_hints(_typecheckingstub__fbd38f9aba7df4d45f96d0029239a2f96f2fcad218a295b86c260e75cde6f20a)
11127
11205
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
11128
11206
  options = EnvironmentOptions(
11207
+ deletion_protection_check=deletion_protection_check,
11129
11208
  description=description,
11130
11209
  environment_name=environment_name,
11131
11210
  monitors=monitors,
@@ -11736,16 +11815,10 @@ class Environment(
11736
11815
  application=app
11737
11816
  )
11738
11817
 
11739
- appconfig.HostedConfiguration(self, "MyFirstHostedConfig",
11740
- application=app,
11741
- deploy_to=[env],
11742
- content=appconfig.ConfigurationContent.from_inline_text("This is my first configuration content.")
11743
- )
11744
-
11745
- appconfig.HostedConfiguration(self, "MySecondHostedConfig",
11818
+ appconfig.HostedConfiguration(self, "MyHostedConfig",
11746
11819
  application=app,
11747
11820
  deploy_to=[env],
11748
- content=appconfig.ConfigurationContent.from_inline_text("This is my second configuration content.")
11821
+ content=appconfig.ConfigurationContent.from_inline_text("This is my configuration content.")
11749
11822
  )
11750
11823
  '''
11751
11824
 
@@ -11755,6 +11828,7 @@ class Environment(
11755
11828
  id: builtins.str,
11756
11829
  *,
11757
11830
  application: IApplication,
11831
+ deletion_protection_check: typing.Optional[DeletionProtectionCheck] = None,
11758
11832
  description: typing.Optional[builtins.str] = None,
11759
11833
  environment_name: typing.Optional[builtins.str] = None,
11760
11834
  monitors: typing.Optional[typing.Sequence[Monitor]] = None,
@@ -11763,6 +11837,7 @@ class Environment(
11763
11837
  :param scope: -
11764
11838
  :param id: -
11765
11839
  :param application: The application to be associated with the environment.
11840
+ :param deletion_protection_check: A property to prevent accidental deletion of active environments. Default: undefined - AppConfig default is ACCOUNT_DEFAULT
11766
11841
  :param description: The description of the environment. Default: - No description.
11767
11842
  :param environment_name: The name of the environment. Default: - A name is generated.
11768
11843
  :param monitors: The monitors for the environment. Default: - No monitors.
@@ -11773,6 +11848,7 @@ class Environment(
11773
11848
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
11774
11849
  props = EnvironmentProps(
11775
11850
  application=application,
11851
+ deletion_protection_check=deletion_protection_check,
11776
11852
  description=description,
11777
11853
  environment_name=environment_name,
11778
11854
  monitors=monitors,
@@ -13321,6 +13397,7 @@ __all__ = [
13321
13397
  "ConfigurationSource",
13322
13398
  "ConfigurationSourceType",
13323
13399
  "ConfigurationType",
13400
+ "DeletionProtectionCheck",
13324
13401
  "DeploymentStrategy",
13325
13402
  "DeploymentStrategyId",
13326
13403
  "DeploymentStrategyProps",
@@ -14199,6 +14276,7 @@ def _typecheckingstub__37c9050d36cf121416083b853e136100e069c334aadd707074579edb0
14199
14276
 
14200
14277
  def _typecheckingstub__fbb7b0217b9bc7608bc896aa9827a29bb06de82b32c07cf8d98954734cdae547(
14201
14278
  *,
14279
+ deletion_protection_check: typing.Optional[DeletionProtectionCheck] = None,
14202
14280
  description: typing.Optional[builtins.str] = None,
14203
14281
  environment_name: typing.Optional[builtins.str] = None,
14204
14282
  monitors: typing.Optional[typing.Sequence[Monitor]] = None,
@@ -14208,6 +14286,7 @@ def _typecheckingstub__fbb7b0217b9bc7608bc896aa9827a29bb06de82b32c07cf8d98954734
14208
14286
 
14209
14287
  def _typecheckingstub__70814b8db38d5e11a0b33e43663913fb290e190ace3191585fc4d0bd4c97bfff(
14210
14288
  *,
14289
+ deletion_protection_check: typing.Optional[DeletionProtectionCheck] = None,
14211
14290
  description: typing.Optional[builtins.str] = None,
14212
14291
  environment_name: typing.Optional[builtins.str] = None,
14213
14292
  monitors: typing.Optional[typing.Sequence[Monitor]] = None,
@@ -14285,6 +14364,7 @@ def _typecheckingstub__7cba9d5464f3f4cbc208d892995245e5078fc2cc794651c71942035a9
14285
14364
  def _typecheckingstub__eb165be70f31f79374053f908981a5e02c37cbdefd4d2123a7e32165fb887042(
14286
14365
  id: builtins.str,
14287
14366
  *,
14367
+ deletion_protection_check: typing.Optional[DeletionProtectionCheck] = None,
14288
14368
  description: typing.Optional[builtins.str] = None,
14289
14369
  environment_name: typing.Optional[builtins.str] = None,
14290
14370
  monitors: typing.Optional[typing.Sequence[Monitor]] = None,
@@ -14955,6 +15035,7 @@ def _typecheckingstub__f23af9ea4630280fc41549b208a41050e1d321a3300899bad1754e76f
14955
15035
  def _typecheckingstub__fbd38f9aba7df4d45f96d0029239a2f96f2fcad218a295b86c260e75cde6f20a(
14956
15036
  id: builtins.str,
14957
15037
  *,
15038
+ deletion_protection_check: typing.Optional[DeletionProtectionCheck] = None,
14958
15039
  description: typing.Optional[builtins.str] = None,
14959
15040
  environment_name: typing.Optional[builtins.str] = None,
14960
15041
  monitors: typing.Optional[typing.Sequence[Monitor]] = None,
@@ -15146,6 +15227,7 @@ def _typecheckingstub__09c6baa2088c107dc1834ea8f2a8c0f35612bf3782c77c3ef6879f993
15146
15227
  id: builtins.str,
15147
15228
  *,
15148
15229
  application: IApplication,
15230
+ deletion_protection_check: typing.Optional[DeletionProtectionCheck] = None,
15149
15231
  description: typing.Optional[builtins.str] = None,
15150
15232
  environment_name: typing.Optional[builtins.str] = None,
15151
15233
  monitors: typing.Optional[typing.Sequence[Monitor]] = None,