aws-cdk-lib 2.164.1__py3-none-any.whl → 2.166.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 (52) hide show
  1. aws_cdk/__init__.py +20 -0
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.164.1.jsii.tgz → aws-cdk-lib@2.166.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_appsync/__init__.py +2163 -375
  5. aws_cdk/aws_autoscaling/__init__.py +145 -8
  6. aws_cdk/aws_backup/__init__.py +627 -3
  7. aws_cdk/aws_bedrock/__init__.py +982 -191
  8. aws_cdk/aws_codebuild/__init__.py +88 -33
  9. aws_cdk/aws_codepipeline/__init__.py +98 -5
  10. aws_cdk/aws_codestar/__init__.py +1 -1
  11. aws_cdk/aws_cognito/__init__.py +656 -102
  12. aws_cdk/aws_connect/__init__.py +1 -1
  13. aws_cdk/aws_datasync/__init__.py +9 -7
  14. aws_cdk/aws_devopsguru/__init__.py +2 -2
  15. aws_cdk/aws_dms/__init__.py +762 -0
  16. aws_cdk/aws_dynamodb/__init__.py +13 -8
  17. aws_cdk/aws_ec2/__init__.py +134 -35
  18. aws_cdk/aws_ecs/__init__.py +41 -31
  19. aws_cdk/aws_eks/__init__.py +10 -12
  20. aws_cdk/aws_elasticache/__init__.py +52 -6
  21. aws_cdk/aws_emrserverless/__init__.py +35 -33
  22. aws_cdk/aws_events/__init__.py +25 -30
  23. aws_cdk/aws_imagebuilder/__init__.py +183 -0
  24. aws_cdk/aws_iot/__init__.py +37 -43
  25. aws_cdk/aws_iotwireless/__init__.py +2 -2
  26. aws_cdk/aws_kinesis/__init__.py +297 -1
  27. aws_cdk/aws_lambda/__init__.py +3 -3
  28. aws_cdk/aws_m2/__init__.py +58 -58
  29. aws_cdk/aws_mediapackagev2/__init__.py +191 -0
  30. aws_cdk/aws_memorydb/__init__.py +41 -0
  31. aws_cdk/aws_networkfirewall/__init__.py +14 -5
  32. aws_cdk/aws_opensearchservice/__init__.py +969 -0
  33. aws_cdk/aws_pipes/__init__.py +1 -1
  34. aws_cdk/aws_qbusiness/__init__.py +23 -14
  35. aws_cdk/aws_rds/__init__.py +187 -48
  36. aws_cdk/aws_redshift/__init__.py +23 -23
  37. aws_cdk/aws_refactorspaces/__init__.py +56 -61
  38. aws_cdk/aws_resiliencehub/__init__.py +4 -4
  39. aws_cdk/aws_route53/__init__.py +37 -9
  40. aws_cdk/aws_s3_deployment/__init__.py +13 -7
  41. aws_cdk/aws_sagemaker/__init__.py +128 -23
  42. aws_cdk/aws_secretsmanager/__init__.py +2 -1
  43. aws_cdk/aws_ses/__init__.py +19 -0
  44. aws_cdk/aws_synthetics/__init__.py +121 -0
  45. aws_cdk/aws_timestream/__init__.py +41 -0
  46. aws_cdk/aws_wisdom/__init__.py +2035 -61
  47. {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.166.0.dist-info}/METADATA +6 -6
  48. {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.166.0.dist-info}/RECORD +52 -52
  49. {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.166.0.dist-info}/LICENSE +0 -0
  50. {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.166.0.dist-info}/NOTICE +0 -0
  51. {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.166.0.dist-info}/WHEEL +0 -0
  52. {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.166.0.dist-info}/top_level.txt +0 -0
@@ -17,6 +17,7 @@ intake and aggregation.
17
17
  * [Write Permissions](#write-permissions)
18
18
  * [Custom Permissions](#custom-permissions)
19
19
  * [Metrics](#metrics)
20
+ * [Resource Policy](#resource-policy)
20
21
 
21
22
  ## Streams
22
23
 
@@ -184,6 +185,52 @@ stream.metric_get_records_success()
184
185
  # using pre-defined and overriding the statistic
185
186
  stream.metric_get_records_success(statistic="Maximum")
186
187
  ```
188
+
189
+ ### Resource Policy
190
+
191
+ You can create a resource policy for a data stream.
192
+ For more information, see [Controlling access to Amazon Kinesis Data Streams resources using IAM](https://docs.aws.amazon.com/streams/latest/dev/controlling-access.html).
193
+
194
+ A resource policy is automatically created when `addToResourcePolicy` is called, if one doesn't already exist.
195
+
196
+ Using `addToResourcePolicy` is the simplest way to add a resource policy:
197
+
198
+ ```python
199
+ stream = kinesis.Stream(self, "MyStream")
200
+
201
+ # create a resource policy via addToResourcePolicy method
202
+ stream.add_to_resource_policy(iam.PolicyStatement(
203
+ resources=[stream.stream_arn],
204
+ actions=["kinesis:GetRecords"],
205
+ principals=[iam.AnyPrincipal()]
206
+ ))
207
+ ```
208
+
209
+ You can create a resource manually by using `ResourcePolicy`.
210
+ Also, you can set a custom policy document to `ResourcePolicy`.
211
+ If not, a blank policy document will be set.
212
+
213
+ ```python
214
+ stream = kinesis.Stream(self, "MyStream")
215
+
216
+ # create a custom policy document
217
+ policy_document = iam.PolicyDocument(
218
+ assign_sids=True,
219
+ statements=[
220
+ iam.PolicyStatement(
221
+ actions=["kinesis:GetRecords"],
222
+ resources=[stream.stream_arn],
223
+ principals=[iam.AnyPrincipal()]
224
+ )
225
+ ]
226
+ )
227
+
228
+ # create a resource policy manually
229
+ kinesis.ResourcePolicy(self, "ResourcePolicy",
230
+ stream=stream,
231
+ policy_document=policy_document
232
+ )
233
+ ```
187
234
  '''
188
235
  from pkgutil import extend_path
189
236
  __path__ = extend_path(__path__, __name__)
@@ -236,7 +283,13 @@ from ..aws_cloudwatch import (
236
283
  MetricOptions as _MetricOptions_1788b62f,
237
284
  Unit as _Unit_61bc6f70,
238
285
  )
239
- from ..aws_iam import Grant as _Grant_a7ae64f8, IGrantable as _IGrantable_71c4f5de
286
+ from ..aws_iam import (
287
+ AddToResourcePolicyResult as _AddToResourcePolicyResult_1d0a53ad,
288
+ Grant as _Grant_a7ae64f8,
289
+ IGrantable as _IGrantable_71c4f5de,
290
+ PolicyDocument as _PolicyDocument_3ac34393,
291
+ PolicyStatement as _PolicyStatement_0fe33853,
292
+ )
240
293
  from ..aws_kms import IKey as _IKey_5f11635f
241
294
 
242
295
 
@@ -1233,6 +1286,21 @@ class IStream(_IResource_c80c4260, typing_extensions.Protocol):
1233
1286
  '''Optional KMS encryption key associated with this stream.'''
1234
1287
  ...
1235
1288
 
1289
+ @jsii.member(jsii_name="addToResourcePolicy")
1290
+ def add_to_resource_policy(
1291
+ self,
1292
+ statement: _PolicyStatement_0fe33853,
1293
+ ) -> _AddToResourcePolicyResult_1d0a53ad:
1294
+ '''Adds a statement to the IAM resource policy associated with this stream.
1295
+
1296
+ If this stream was created in this stack (``new Stream``), a resource policy
1297
+ will be automatically created upon the first call to ``addToResourcePolicy``. If
1298
+ the stream is imported (``Stream.import``), then this is a no-op.
1299
+
1300
+ :param statement: -
1301
+ '''
1302
+ ...
1303
+
1236
1304
  @jsii.member(jsii_name="grant")
1237
1305
  def grant(
1238
1306
  self,
@@ -1914,6 +1982,24 @@ class _IStreamProxy(
1914
1982
  '''Optional KMS encryption key associated with this stream.'''
1915
1983
  return typing.cast(typing.Optional[_IKey_5f11635f], jsii.get(self, "encryptionKey"))
1916
1984
 
1985
+ @jsii.member(jsii_name="addToResourcePolicy")
1986
+ def add_to_resource_policy(
1987
+ self,
1988
+ statement: _PolicyStatement_0fe33853,
1989
+ ) -> _AddToResourcePolicyResult_1d0a53ad:
1990
+ '''Adds a statement to the IAM resource policy associated with this stream.
1991
+
1992
+ If this stream was created in this stack (``new Stream``), a resource policy
1993
+ will be automatically created upon the first call to ``addToResourcePolicy``. If
1994
+ the stream is imported (``Stream.import``), then this is a no-op.
1995
+
1996
+ :param statement: -
1997
+ '''
1998
+ if __debug__:
1999
+ type_hints = typing.get_type_hints(_typecheckingstub__8f2bc2272d75f698f14f87a303fdf13c87275a121d59d5fa5df4a16bb120598b)
2000
+ check_type(argname="argument statement", value=statement, expected_type=type_hints["statement"])
2001
+ return typing.cast(_AddToResourcePolicyResult_1d0a53ad, jsii.invoke(self, "addToResourcePolicy", [statement]))
2002
+
1917
2003
  @jsii.member(jsii_name="grant")
1918
2004
  def grant(
1919
2005
  self,
@@ -2803,6 +2889,157 @@ class _IStreamProxy(
2803
2889
  typing.cast(typing.Any, IStream).__jsii_proxy_class__ = lambda : _IStreamProxy
2804
2890
 
2805
2891
 
2892
+ class ResourcePolicy(
2893
+ _Resource_45bc6135,
2894
+ metaclass=jsii.JSIIMeta,
2895
+ jsii_type="aws-cdk-lib.aws_kinesis.ResourcePolicy",
2896
+ ):
2897
+ '''The policy for a data stream or registered consumer.
2898
+
2899
+ Policies define the operations that are allowed on this resource.
2900
+
2901
+ You almost never need to define this construct directly.
2902
+
2903
+ All AWS resources that support resource policies have a method called
2904
+ ``addToResourcePolicy()``, which will automatically create a new resource
2905
+ policy if one doesn't exist yet, otherwise it will add to the existing
2906
+ policy.
2907
+
2908
+ Prefer to use ``addToResourcePolicy()`` instead.
2909
+
2910
+ :exampleMetadata: infused
2911
+
2912
+ Example::
2913
+
2914
+ stream = kinesis.Stream(self, "MyStream")
2915
+
2916
+ # create a custom policy document
2917
+ policy_document = iam.PolicyDocument(
2918
+ assign_sids=True,
2919
+ statements=[
2920
+ iam.PolicyStatement(
2921
+ actions=["kinesis:GetRecords"],
2922
+ resources=[stream.stream_arn],
2923
+ principals=[iam.AnyPrincipal()]
2924
+ )
2925
+ ]
2926
+ )
2927
+
2928
+ # create a resource policy manually
2929
+ kinesis.ResourcePolicy(self, "ResourcePolicy",
2930
+ stream=stream,
2931
+ policy_document=policy_document
2932
+ )
2933
+ '''
2934
+
2935
+ def __init__(
2936
+ self,
2937
+ scope: _constructs_77d1e7e8.Construct,
2938
+ id: builtins.str,
2939
+ *,
2940
+ stream: IStream,
2941
+ policy_document: typing.Optional[_PolicyDocument_3ac34393] = None,
2942
+ ) -> None:
2943
+ '''
2944
+ :param scope: -
2945
+ :param id: -
2946
+ :param stream: The stream this policy applies to.
2947
+ :param policy_document: IAM policy document to apply to a data stream. Default: - empty policy document
2948
+ '''
2949
+ if __debug__:
2950
+ type_hints = typing.get_type_hints(_typecheckingstub__4488fc34b1387c696011cd138108f10e13139cd2d56365a8ba9602ad6ba244f0)
2951
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
2952
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
2953
+ props = ResourcePolicyProps(stream=stream, policy_document=policy_document)
2954
+
2955
+ jsii.create(self.__class__, self, [scope, id, props])
2956
+
2957
+ @builtins.property
2958
+ @jsii.member(jsii_name="document")
2959
+ def document(self) -> _PolicyDocument_3ac34393:
2960
+ '''The IAM policy document for this policy.'''
2961
+ return typing.cast(_PolicyDocument_3ac34393, jsii.get(self, "document"))
2962
+
2963
+
2964
+ @jsii.data_type(
2965
+ jsii_type="aws-cdk-lib.aws_kinesis.ResourcePolicyProps",
2966
+ jsii_struct_bases=[],
2967
+ name_mapping={"stream": "stream", "policy_document": "policyDocument"},
2968
+ )
2969
+ class ResourcePolicyProps:
2970
+ def __init__(
2971
+ self,
2972
+ *,
2973
+ stream: IStream,
2974
+ policy_document: typing.Optional[_PolicyDocument_3ac34393] = None,
2975
+ ) -> None:
2976
+ '''Properties to associate a data stream with a policy.
2977
+
2978
+ :param stream: The stream this policy applies to.
2979
+ :param policy_document: IAM policy document to apply to a data stream. Default: - empty policy document
2980
+
2981
+ :exampleMetadata: infused
2982
+
2983
+ Example::
2984
+
2985
+ stream = kinesis.Stream(self, "MyStream")
2986
+
2987
+ # create a custom policy document
2988
+ policy_document = iam.PolicyDocument(
2989
+ assign_sids=True,
2990
+ statements=[
2991
+ iam.PolicyStatement(
2992
+ actions=["kinesis:GetRecords"],
2993
+ resources=[stream.stream_arn],
2994
+ principals=[iam.AnyPrincipal()]
2995
+ )
2996
+ ]
2997
+ )
2998
+
2999
+ # create a resource policy manually
3000
+ kinesis.ResourcePolicy(self, "ResourcePolicy",
3001
+ stream=stream,
3002
+ policy_document=policy_document
3003
+ )
3004
+ '''
3005
+ if __debug__:
3006
+ type_hints = typing.get_type_hints(_typecheckingstub__b4f61add9bc5e3d367f841a39ff9a752c7eed270f05849d0b5f9dc5e5ad3382a)
3007
+ check_type(argname="argument stream", value=stream, expected_type=type_hints["stream"])
3008
+ check_type(argname="argument policy_document", value=policy_document, expected_type=type_hints["policy_document"])
3009
+ self._values: typing.Dict[builtins.str, typing.Any] = {
3010
+ "stream": stream,
3011
+ }
3012
+ if policy_document is not None:
3013
+ self._values["policy_document"] = policy_document
3014
+
3015
+ @builtins.property
3016
+ def stream(self) -> IStream:
3017
+ '''The stream this policy applies to.'''
3018
+ result = self._values.get("stream")
3019
+ assert result is not None, "Required property 'stream' is missing"
3020
+ return typing.cast(IStream, result)
3021
+
3022
+ @builtins.property
3023
+ def policy_document(self) -> typing.Optional[_PolicyDocument_3ac34393]:
3024
+ '''IAM policy document to apply to a data stream.
3025
+
3026
+ :default: - empty policy document
3027
+ '''
3028
+ result = self._values.get("policy_document")
3029
+ return typing.cast(typing.Optional[_PolicyDocument_3ac34393], result)
3030
+
3031
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
3032
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
3033
+
3034
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
3035
+ return not (rhs == self)
3036
+
3037
+ def __repr__(self) -> str:
3038
+ return "ResourcePolicyProps(%s)" % ", ".join(
3039
+ k + "=" + repr(v) for k, v in self._values.items()
3040
+ )
3041
+
3042
+
2806
3043
  @jsii.implements(IStream)
2807
3044
  class Stream(
2808
3045
  _Resource_45bc6135,
@@ -2911,6 +3148,24 @@ class Stream(
2911
3148
 
2912
3149
  return typing.cast(IStream, jsii.sinvoke(cls, "fromStreamAttributes", [scope, id, attrs]))
2913
3150
 
3151
+ @jsii.member(jsii_name="addToResourcePolicy")
3152
+ def add_to_resource_policy(
3153
+ self,
3154
+ statement: _PolicyStatement_0fe33853,
3155
+ ) -> _AddToResourcePolicyResult_1d0a53ad:
3156
+ '''Adds a statement to the IAM resource policy associated with this stream.
3157
+
3158
+ If this stream was created in this stack (``new Strem``), a resource policy
3159
+ will be automatically created upon the first call to ``addToResourcePolicy``. If
3160
+ the stream is imported (``Stream.import``), then this is a no-op.
3161
+
3162
+ :param statement: -
3163
+ '''
3164
+ if __debug__:
3165
+ type_hints = typing.get_type_hints(_typecheckingstub__a7e5618d0b21ec8f8ee6f75c9ce4726b0e2f49cca4d61efdf76bb36d81eedef9)
3166
+ check_type(argname="argument statement", value=statement, expected_type=type_hints["statement"])
3167
+ return typing.cast(_AddToResourcePolicyResult_1d0a53ad, jsii.invoke(self, "addToResourcePolicy", [statement]))
3168
+
2914
3169
  @jsii.member(jsii_name="grant")
2915
3170
  def grant(
2916
3171
  self,
@@ -3797,6 +4052,15 @@ class Stream(
3797
4052
 
3798
4053
  return typing.cast(_Metric_e396a4dc, jsii.invoke(self, "metricWriteProvisionedThroughputExceeded", [props]))
3799
4054
 
4055
+ @builtins.property
4056
+ @jsii.member(jsii_name="autoCreatePolicy")
4057
+ def _auto_create_policy(self) -> builtins.bool:
4058
+ '''Indicates if a stream resource policy should automatically be created upon the first call to ``addToResourcePolicy``.
4059
+
4060
+ Set by subclasses.
4061
+ '''
4062
+ return typing.cast(builtins.bool, jsii.get(self, "autoCreatePolicy"))
4063
+
3800
4064
  @builtins.property
3801
4065
  @jsii.member(jsii_name="streamArn")
3802
4066
  def stream_arn(self) -> builtins.str:
@@ -4098,6 +4362,8 @@ __all__ = [
4098
4362
  "CfnStreamConsumerProps",
4099
4363
  "CfnStreamProps",
4100
4364
  "IStream",
4365
+ "ResourcePolicy",
4366
+ "ResourcePolicyProps",
4101
4367
  "Stream",
4102
4368
  "StreamAttributes",
4103
4369
  "StreamEncryption",
@@ -4280,6 +4546,12 @@ def _typecheckingstub__d3bac625363d3769acb567c00e5b48d63afe09fd6d0305829f157ffcc
4280
4546
  """Type checking stubs"""
4281
4547
  pass
4282
4548
 
4549
+ def _typecheckingstub__8f2bc2272d75f698f14f87a303fdf13c87275a121d59d5fa5df4a16bb120598b(
4550
+ statement: _PolicyStatement_0fe33853,
4551
+ ) -> None:
4552
+ """Type checking stubs"""
4553
+ pass
4554
+
4283
4555
  def _typecheckingstub__144c672e53e3086b23a7fab80cf6f8440b56b13da782550703291ecf8e7ee03c(
4284
4556
  grantee: _IGrantable_71c4f5de,
4285
4557
  *actions: builtins.str,
@@ -4320,6 +4592,24 @@ def _typecheckingstub__bd578f4ca8facd0463f7e56d3d2cea7e56ba9ad274338af8f84fa661d
4320
4592
  """Type checking stubs"""
4321
4593
  pass
4322
4594
 
4595
+ def _typecheckingstub__4488fc34b1387c696011cd138108f10e13139cd2d56365a8ba9602ad6ba244f0(
4596
+ scope: _constructs_77d1e7e8.Construct,
4597
+ id: builtins.str,
4598
+ *,
4599
+ stream: IStream,
4600
+ policy_document: typing.Optional[_PolicyDocument_3ac34393] = None,
4601
+ ) -> None:
4602
+ """Type checking stubs"""
4603
+ pass
4604
+
4605
+ def _typecheckingstub__b4f61add9bc5e3d367f841a39ff9a752c7eed270f05849d0b5f9dc5e5ad3382a(
4606
+ *,
4607
+ stream: IStream,
4608
+ policy_document: typing.Optional[_PolicyDocument_3ac34393] = None,
4609
+ ) -> None:
4610
+ """Type checking stubs"""
4611
+ pass
4612
+
4323
4613
  def _typecheckingstub__d9e4f581406090d861e3fe8214f939eedc5d1ccaffe122a7542878ec423959f9(
4324
4614
  scope: _constructs_77d1e7e8.Construct,
4325
4615
  id: builtins.str,
@@ -4353,6 +4643,12 @@ def _typecheckingstub__b96a6f7eaad7642c3b76701b21a0f3785de9e62fe0775dc42bcd732de
4353
4643
  """Type checking stubs"""
4354
4644
  pass
4355
4645
 
4646
+ def _typecheckingstub__a7e5618d0b21ec8f8ee6f75c9ce4726b0e2f49cca4d61efdf76bb36d81eedef9(
4647
+ statement: _PolicyStatement_0fe33853,
4648
+ ) -> None:
4649
+ """Type checking stubs"""
4650
+ pass
4651
+
4356
4652
  def _typecheckingstub__697192e2b3dde0e9d7ea188584de9b7bc6b68afbd4b7ab621caa32eaeecfb0fe(
4357
4653
  grantee: _IGrantable_71c4f5de,
4358
4654
  *actions: builtins.str,
@@ -7244,7 +7244,7 @@ class CfnFunction(
7244
7244
 
7245
7245
  You can use environment variables to adjust your function's behavior without updating code. An environment variable is a pair of strings that are stored in a function's version-specific configuration.
7246
7246
 
7247
- :param variables: Environment variable key-value pairs. For more information, see `Using Lambda environment variables <https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html>`_ .
7247
+ :param variables: Environment variable key-value pairs. For more information, see `Using Lambda environment variables <https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html>`_ . If the value of the environment variable is a time or a duration, enclose the value in quotes.
7248
7248
 
7249
7249
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-environment.html
7250
7250
  :exampleMetadata: fixture=_generated
@@ -7272,9 +7272,9 @@ class CfnFunction(
7272
7272
  def variables(
7273
7273
  self,
7274
7274
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]]:
7275
- '''Environment variable key-value pairs.
7275
+ '''Environment variable key-value pairs. For more information, see `Using Lambda environment variables <https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html>`_ .
7276
7276
 
7277
- For more information, see `Using Lambda environment variables <https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html>`_ .
7277
+ If the value of the environment variable is a time or a duration, enclose the value in quotes.
7278
7278
 
7279
7279
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-environment.html#cfn-lambda-function-environment-variables
7280
7280
  '''
@@ -89,14 +89,14 @@ class CfnApplication(
89
89
  from aws_cdk import aws_m2 as m2
90
90
 
91
91
  cfn_application = m2.CfnApplication(self, "MyCfnApplication",
92
- definition=m2.CfnApplication.DefinitionProperty(
93
- content="content",
94
- s3_location="s3Location"
95
- ),
96
92
  engine_type="engineType",
97
93
  name="name",
98
94
 
99
95
  # the properties below are optional
96
+ definition=m2.CfnApplication.DefinitionProperty(
97
+ content="content",
98
+ s3_location="s3Location"
99
+ ),
100
100
  description="description",
101
101
  kms_key_id="kmsKeyId",
102
102
  role_arn="roleArn",
@@ -111,9 +111,9 @@ class CfnApplication(
111
111
  scope: _constructs_77d1e7e8.Construct,
112
112
  id: builtins.str,
113
113
  *,
114
- definition: typing.Union[_IResolvable_da3f097b, typing.Union["CfnApplication.DefinitionProperty", typing.Dict[builtins.str, typing.Any]]],
115
114
  engine_type: builtins.str,
116
115
  name: builtins.str,
116
+ definition: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnApplication.DefinitionProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
117
117
  description: typing.Optional[builtins.str] = None,
118
118
  kms_key_id: typing.Optional[builtins.str] = None,
119
119
  role_arn: typing.Optional[builtins.str] = None,
@@ -122,9 +122,9 @@ class CfnApplication(
122
122
  '''
123
123
  :param scope: Scope in which this resource is defined.
124
124
  :param id: Construct identifier for this resource (unique in its scope).
125
- :param definition: The application definition for a particular application. You can specify either inline JSON or an Amazon S3 bucket location. For information about application definitions, see the `AWS Mainframe Modernization User Guide <https://docs.aws.amazon.com/m2/latest/userguide/applications-m2-definition.html>`_ .
126
125
  :param engine_type: The type of the target platform for this application.
127
126
  :param name: The name of the application.
127
+ :param definition: The application definition for a particular application. You can specify either inline JSON or an Amazon S3 bucket location. For information about application definitions, see the `AWS Mainframe Modernization User Guide <https://docs.aws.amazon.com/m2/latest/userguide/applications-m2-definition.html>`_ .
128
128
  :param description: The description of the application.
129
129
  :param kms_key_id: The identifier of a customer managed key.
130
130
  :param role_arn: The Amazon Resource Name (ARN) of the role associated with the application.
@@ -135,9 +135,9 @@ class CfnApplication(
135
135
  check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
136
136
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
137
137
  props = CfnApplicationProps(
138
- definition=definition,
139
138
  engine_type=engine_type,
140
139
  name=name,
140
+ definition=definition,
141
141
  description=description,
142
142
  kms_key_id=kms_key_id,
143
143
  role_arn=role_arn,
@@ -205,27 +205,6 @@ class CfnApplication(
205
205
  '''Tag Manager which manages the tags for this resource.'''
206
206
  return typing.cast(_TagManager_0a598cb3, jsii.get(self, "tags"))
207
207
 
208
- @builtins.property
209
- @jsii.member(jsii_name="definition")
210
- def definition(
211
- self,
212
- ) -> typing.Union[_IResolvable_da3f097b, "CfnApplication.DefinitionProperty"]:
213
- '''The application definition for a particular application.
214
-
215
- You can specify either inline JSON or an Amazon S3 bucket location.
216
- '''
217
- return typing.cast(typing.Union[_IResolvable_da3f097b, "CfnApplication.DefinitionProperty"], jsii.get(self, "definition"))
218
-
219
- @definition.setter
220
- def definition(
221
- self,
222
- value: typing.Union[_IResolvable_da3f097b, "CfnApplication.DefinitionProperty"],
223
- ) -> None:
224
- if __debug__:
225
- type_hints = typing.get_type_hints(_typecheckingstub__5a8ea13658af5ef1a7d26f032b47b28d17ab527b4ede05c82ee7c653b2de040f)
226
- check_type(argname="argument value", value=value, expected_type=type_hints["value"])
227
- jsii.set(self, "definition", value) # pyright: ignore[reportArgumentType]
228
-
229
208
  @builtins.property
230
209
  @jsii.member(jsii_name="engineType")
231
210
  def engine_type(self) -> builtins.str:
@@ -252,6 +231,27 @@ class CfnApplication(
252
231
  check_type(argname="argument value", value=value, expected_type=type_hints["value"])
253
232
  jsii.set(self, "name", value) # pyright: ignore[reportArgumentType]
254
233
 
234
+ @builtins.property
235
+ @jsii.member(jsii_name="definition")
236
+ def definition(
237
+ self,
238
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnApplication.DefinitionProperty"]]:
239
+ '''The application definition for a particular application.
240
+
241
+ You can specify either inline JSON or an Amazon S3 bucket location.
242
+ '''
243
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnApplication.DefinitionProperty"]], jsii.get(self, "definition"))
244
+
245
+ @definition.setter
246
+ def definition(
247
+ self,
248
+ value: typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnApplication.DefinitionProperty"]],
249
+ ) -> None:
250
+ if __debug__:
251
+ type_hints = typing.get_type_hints(_typecheckingstub__5a8ea13658af5ef1a7d26f032b47b28d17ab527b4ede05c82ee7c653b2de040f)
252
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
253
+ jsii.set(self, "definition", value) # pyright: ignore[reportArgumentType]
254
+
255
255
  @builtins.property
256
256
  @jsii.member(jsii_name="description")
257
257
  def description(self) -> typing.Optional[builtins.str]:
@@ -386,9 +386,9 @@ class CfnApplication(
386
386
  jsii_type="aws-cdk-lib.aws_m2.CfnApplicationProps",
387
387
  jsii_struct_bases=[],
388
388
  name_mapping={
389
- "definition": "definition",
390
389
  "engine_type": "engineType",
391
390
  "name": "name",
391
+ "definition": "definition",
392
392
  "description": "description",
393
393
  "kms_key_id": "kmsKeyId",
394
394
  "role_arn": "roleArn",
@@ -399,9 +399,9 @@ class CfnApplicationProps:
399
399
  def __init__(
400
400
  self,
401
401
  *,
402
- definition: typing.Union[_IResolvable_da3f097b, typing.Union[CfnApplication.DefinitionProperty, typing.Dict[builtins.str, typing.Any]]],
403
402
  engine_type: builtins.str,
404
403
  name: builtins.str,
404
+ definition: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnApplication.DefinitionProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
405
405
  description: typing.Optional[builtins.str] = None,
406
406
  kms_key_id: typing.Optional[builtins.str] = None,
407
407
  role_arn: typing.Optional[builtins.str] = None,
@@ -409,9 +409,9 @@ class CfnApplicationProps:
409
409
  ) -> None:
410
410
  '''Properties for defining a ``CfnApplication``.
411
411
 
412
- :param definition: The application definition for a particular application. You can specify either inline JSON or an Amazon S3 bucket location. For information about application definitions, see the `AWS Mainframe Modernization User Guide <https://docs.aws.amazon.com/m2/latest/userguide/applications-m2-definition.html>`_ .
413
412
  :param engine_type: The type of the target platform for this application.
414
413
  :param name: The name of the application.
414
+ :param definition: The application definition for a particular application. You can specify either inline JSON or an Amazon S3 bucket location. For information about application definitions, see the `AWS Mainframe Modernization User Guide <https://docs.aws.amazon.com/m2/latest/userguide/applications-m2-definition.html>`_ .
415
415
  :param description: The description of the application.
416
416
  :param kms_key_id: The identifier of a customer managed key.
417
417
  :param role_arn: The Amazon Resource Name (ARN) of the role associated with the application.
@@ -427,14 +427,14 @@ class CfnApplicationProps:
427
427
  from aws_cdk import aws_m2 as m2
428
428
 
429
429
  cfn_application_props = m2.CfnApplicationProps(
430
- definition=m2.CfnApplication.DefinitionProperty(
431
- content="content",
432
- s3_location="s3Location"
433
- ),
434
430
  engine_type="engineType",
435
431
  name="name",
436
432
 
437
433
  # the properties below are optional
434
+ definition=m2.CfnApplication.DefinitionProperty(
435
+ content="content",
436
+ s3_location="s3Location"
437
+ ),
438
438
  description="description",
439
439
  kms_key_id="kmsKeyId",
440
440
  role_arn="roleArn",
@@ -445,18 +445,19 @@ class CfnApplicationProps:
445
445
  '''
446
446
  if __debug__:
447
447
  type_hints = typing.get_type_hints(_typecheckingstub__5ed1db61d31dff8aa8e94733976425175ee39f97b9a27b2b69f86017aa34d4b5)
448
- check_type(argname="argument definition", value=definition, expected_type=type_hints["definition"])
449
448
  check_type(argname="argument engine_type", value=engine_type, expected_type=type_hints["engine_type"])
450
449
  check_type(argname="argument name", value=name, expected_type=type_hints["name"])
450
+ check_type(argname="argument definition", value=definition, expected_type=type_hints["definition"])
451
451
  check_type(argname="argument description", value=description, expected_type=type_hints["description"])
452
452
  check_type(argname="argument kms_key_id", value=kms_key_id, expected_type=type_hints["kms_key_id"])
453
453
  check_type(argname="argument role_arn", value=role_arn, expected_type=type_hints["role_arn"])
454
454
  check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
455
455
  self._values: typing.Dict[builtins.str, typing.Any] = {
456
- "definition": definition,
457
456
  "engine_type": engine_type,
458
457
  "name": name,
459
458
  }
459
+ if definition is not None:
460
+ self._values["definition"] = definition
460
461
  if description is not None:
461
462
  self._values["description"] = description
462
463
  if kms_key_id is not None:
@@ -466,20 +467,6 @@ class CfnApplicationProps:
466
467
  if tags is not None:
467
468
  self._values["tags"] = tags
468
469
 
469
- @builtins.property
470
- def definition(
471
- self,
472
- ) -> typing.Union[_IResolvable_da3f097b, CfnApplication.DefinitionProperty]:
473
- '''The application definition for a particular application. You can specify either inline JSON or an Amazon S3 bucket location.
474
-
475
- For information about application definitions, see the `AWS Mainframe Modernization User Guide <https://docs.aws.amazon.com/m2/latest/userguide/applications-m2-definition.html>`_ .
476
-
477
- :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-m2-application.html#cfn-m2-application-definition
478
- '''
479
- result = self._values.get("definition")
480
- assert result is not None, "Required property 'definition' is missing"
481
- return typing.cast(typing.Union[_IResolvable_da3f097b, CfnApplication.DefinitionProperty], result)
482
-
483
470
  @builtins.property
484
471
  def engine_type(self) -> builtins.str:
485
472
  '''The type of the target platform for this application.
@@ -500,6 +487,19 @@ class CfnApplicationProps:
500
487
  assert result is not None, "Required property 'name' is missing"
501
488
  return typing.cast(builtins.str, result)
502
489
 
490
+ @builtins.property
491
+ def definition(
492
+ self,
493
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnApplication.DefinitionProperty]]:
494
+ '''The application definition for a particular application. You can specify either inline JSON or an Amazon S3 bucket location.
495
+
496
+ For information about application definitions, see the `AWS Mainframe Modernization User Guide <https://docs.aws.amazon.com/m2/latest/userguide/applications-m2-definition.html>`_ .
497
+
498
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-m2-application.html#cfn-m2-application-definition
499
+ '''
500
+ result = self._values.get("definition")
501
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, CfnApplication.DefinitionProperty]], result)
502
+
503
503
  @builtins.property
504
504
  def description(self) -> typing.Optional[builtins.str]:
505
505
  '''The description of the application.
@@ -1478,9 +1478,9 @@ def _typecheckingstub__4d9f18e4c35f8dd6932a89aab0c7c8325ca5f0e480e78df5838e1e64d
1478
1478
  scope: _constructs_77d1e7e8.Construct,
1479
1479
  id: builtins.str,
1480
1480
  *,
1481
- definition: typing.Union[_IResolvable_da3f097b, typing.Union[CfnApplication.DefinitionProperty, typing.Dict[builtins.str, typing.Any]]],
1482
1481
  engine_type: builtins.str,
1483
1482
  name: builtins.str,
1483
+ definition: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnApplication.DefinitionProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
1484
1484
  description: typing.Optional[builtins.str] = None,
1485
1485
  kms_key_id: typing.Optional[builtins.str] = None,
1486
1486
  role_arn: typing.Optional[builtins.str] = None,
@@ -1501,20 +1501,20 @@ def _typecheckingstub__c0533659aa42d859aee8bd4e01b62d0756e88da8f0e83be9c1f372431
1501
1501
  """Type checking stubs"""
1502
1502
  pass
1503
1503
 
1504
- def _typecheckingstub__5a8ea13658af5ef1a7d26f032b47b28d17ab527b4ede05c82ee7c653b2de040f(
1505
- value: typing.Union[_IResolvable_da3f097b, CfnApplication.DefinitionProperty],
1504
+ def _typecheckingstub__8ba4f8f93c55dbcb042b32b8823b3acaab4fde77a6bdcad9a5ee86fb35a2686c(
1505
+ value: builtins.str,
1506
1506
  ) -> None:
1507
1507
  """Type checking stubs"""
1508
1508
  pass
1509
1509
 
1510
- def _typecheckingstub__8ba4f8f93c55dbcb042b32b8823b3acaab4fde77a6bdcad9a5ee86fb35a2686c(
1510
+ def _typecheckingstub__2ffbf95da1d1e51725779fb8b533d4d030b427cf5adffd8b2fc9a4f81ffacff7(
1511
1511
  value: builtins.str,
1512
1512
  ) -> None:
1513
1513
  """Type checking stubs"""
1514
1514
  pass
1515
1515
 
1516
- def _typecheckingstub__2ffbf95da1d1e51725779fb8b533d4d030b427cf5adffd8b2fc9a4f81ffacff7(
1517
- value: builtins.str,
1516
+ def _typecheckingstub__5a8ea13658af5ef1a7d26f032b47b28d17ab527b4ede05c82ee7c653b2de040f(
1517
+ value: typing.Optional[typing.Union[_IResolvable_da3f097b, CfnApplication.DefinitionProperty]],
1518
1518
  ) -> None:
1519
1519
  """Type checking stubs"""
1520
1520
  pass
@@ -1553,9 +1553,9 @@ def _typecheckingstub__e6a2c5ede257cc8f9ff5fc917afe31b9bf6e82d475e3a8dedebfee5db
1553
1553
 
1554
1554
  def _typecheckingstub__5ed1db61d31dff8aa8e94733976425175ee39f97b9a27b2b69f86017aa34d4b5(
1555
1555
  *,
1556
- definition: typing.Union[_IResolvable_da3f097b, typing.Union[CfnApplication.DefinitionProperty, typing.Dict[builtins.str, typing.Any]]],
1557
1556
  engine_type: builtins.str,
1558
1557
  name: builtins.str,
1558
+ definition: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnApplication.DefinitionProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
1559
1559
  description: typing.Optional[builtins.str] = None,
1560
1560
  kms_key_id: typing.Optional[builtins.str] = None,
1561
1561
  role_arn: typing.Optional[builtins.str] = None,