aws-cdk-lib 2.162.1__py3-none-any.whl → 2.163.1__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 (59) hide show
  1. aws_cdk/__init__.py +5 -7
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.162.1.jsii.tgz → aws-cdk-lib@2.163.1.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigatewayv2/__init__.py +7 -7
  5. aws_cdk/aws_appflow/__init__.py +30 -16
  6. aws_cdk/aws_appsync/__init__.py +11 -21
  7. aws_cdk/aws_autoscaling/__init__.py +123 -0
  8. aws_cdk/aws_b2bi/__init__.py +83 -57
  9. aws_cdk/aws_cloudformation/__init__.py +5 -7
  10. aws_cdk/aws_codebuild/__init__.py +19 -40
  11. aws_cdk/aws_codepipeline/__init__.py +88 -7
  12. aws_cdk/aws_cognito/__init__.py +282 -168
  13. aws_cdk/aws_dms/__init__.py +1076 -117
  14. aws_cdk/aws_docdb/__init__.py +19 -13
  15. aws_cdk/aws_dynamodb/__init__.py +43 -22
  16. aws_cdk/aws_ec2/__init__.py +1213 -38
  17. aws_cdk/aws_ecs/__init__.py +187 -18
  18. aws_cdk/aws_ecs_patterns/__init__.py +189 -27
  19. aws_cdk/aws_efs/__init__.py +56 -37
  20. aws_cdk/aws_eks/__init__.py +6 -2
  21. aws_cdk/aws_elasticache/__init__.py +118 -118
  22. aws_cdk/aws_elasticloadbalancingv2/__init__.py +21 -1
  23. aws_cdk/aws_emr/__init__.py +124 -57
  24. aws_cdk/aws_events/__init__.py +40 -0
  25. aws_cdk/aws_fms/__init__.py +757 -8
  26. aws_cdk/aws_fsx/__init__.py +245 -10
  27. aws_cdk/aws_gamelift/__init__.py +121 -0
  28. aws_cdk/aws_glue/__init__.py +344 -61
  29. aws_cdk/aws_iam/__init__.py +44 -0
  30. aws_cdk/aws_identitystore/__init__.py +4 -2
  31. aws_cdk/aws_iot/__init__.py +40 -12
  32. aws_cdk/aws_kinesis/__init__.py +239 -0
  33. aws_cdk/aws_kms/__init__.py +92 -3
  34. aws_cdk/aws_lambda/__init__.py +2 -2
  35. aws_cdk/aws_mediapackagev2/__init__.py +26 -10
  36. aws_cdk/aws_memorydb/__init__.py +7 -7
  37. aws_cdk/aws_networkfirewall/__init__.py +89 -0
  38. aws_cdk/aws_qbusiness/__init__.py +51 -7
  39. aws_cdk/aws_quicksight/__init__.py +221 -87
  40. aws_cdk/aws_rds/__init__.py +376 -75
  41. aws_cdk/aws_redshift/__init__.py +493 -13
  42. aws_cdk/aws_route53profiles/__init__.py +4 -2
  43. aws_cdk/aws_route53resolver/__init__.py +26 -60
  44. aws_cdk/aws_s3/__init__.py +104 -4
  45. aws_cdk/aws_s3express/__init__.py +73 -13
  46. aws_cdk/aws_s3outposts/__init__.py +21 -12
  47. aws_cdk/aws_sagemaker/__init__.py +4 -44
  48. aws_cdk/aws_ssmquicksetup/__init__.py +2 -2
  49. aws_cdk/aws_stepfunctions/__init__.py +529 -156
  50. aws_cdk/aws_transfer/__init__.py +15 -4
  51. aws_cdk/aws_waf/__init__.py +11 -11
  52. aws_cdk/aws_wafregional/__init__.py +12 -12
  53. aws_cdk/aws_wisdom/__init__.py +710 -5
  54. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/METADATA +1 -1
  55. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/RECORD +59 -59
  56. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/LICENSE +0 -0
  57. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/NOTICE +0 -0
  58. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/WHEEL +0 -0
  59. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/top_level.txt +0 -0
@@ -430,6 +430,25 @@ role.assume_role_policy.add_statements(iam.PolicyStatement(
430
430
  ))
431
431
  ```
432
432
 
433
+ ### Fixing the synthesized service principle for services that do not follow the IAM Pattern
434
+
435
+ In some cases, certain AWS services may not use the standard `<service>.amazonaws.com` pattern for their service principals. For these services, you can define the ServicePrincipal as following where the provided service principle name will be used as is without any changing.
436
+
437
+ ```python
438
+ sp = iam.ServicePrincipal.from_static_service_principle_name("elasticmapreduce.amazonaws.com.cn")
439
+ ```
440
+
441
+ This principle can use as normal in defining any role, for example:
442
+
443
+ ```python
444
+ emr_service_role = iam.Role(self, "EMRServiceRole",
445
+ assumed_by=iam.ServicePrincipal.from_static_service_principle_name("elasticmapreduce.amazonaws.com.cn"),
446
+ managed_policies=[
447
+ iam.ManagedPolicy.from_aws_managed_policy_name("service-role/AmazonElasticMapReduceRole")
448
+ ]
449
+ )
450
+ ```
451
+
433
452
  ## Parsing JSON Policy Documents
434
453
 
435
454
  The `PolicyDocument.fromJson` and `PolicyStatement.fromJson` static methods can be used to parse JSON objects. For example:
@@ -13302,6 +13321,25 @@ class ServicePrincipal(
13302
13321
 
13303
13322
  jsii.create(self.__class__, self, [service, opts])
13304
13323
 
13324
+ @jsii.member(jsii_name="fromStaticServicePrincipleName")
13325
+ @builtins.classmethod
13326
+ def from_static_service_principle_name(
13327
+ cls,
13328
+ service_principal_name: builtins.str,
13329
+ ) -> "ServicePrincipal":
13330
+ '''Return the service principal using the service principal name as it is passed to the function without any change regardless of the region used in the stack if it is Opted in or not.
13331
+
13332
+ :param service_principal_name: -
13333
+
13334
+ Example::
13335
+
13336
+ principal_name = iam.ServicePrincipal.from_static_service_principle_name("elasticmapreduce.amazonaws.com.cn")
13337
+ '''
13338
+ if __debug__:
13339
+ type_hints = typing.get_type_hints(_typecheckingstub__a27520e91f619510327a111d049cade088e838ff4693c5aa6f483dd49985c577)
13340
+ check_type(argname="argument service_principal_name", value=service_principal_name, expected_type=type_hints["service_principal_name"])
13341
+ return typing.cast("ServicePrincipal", jsii.sinvoke(cls, "fromStaticServicePrincipleName", [service_principal_name]))
13342
+
13305
13343
  @jsii.member(jsii_name="servicePrincipalName")
13306
13344
  @builtins.classmethod
13307
13345
  def service_principal_name(cls, service: builtins.str) -> builtins.str:
@@ -16788,6 +16826,12 @@ def _typecheckingstub__2745f75caaf5bf82ce9582f03d25e19c93145745996ad93d343457dd9
16788
16826
  """Type checking stubs"""
16789
16827
  pass
16790
16828
 
16829
+ def _typecheckingstub__a27520e91f619510327a111d049cade088e838ff4693c5aa6f483dd49985c577(
16830
+ service_principal_name: builtins.str,
16831
+ ) -> None:
16832
+ """Type checking stubs"""
16833
+ pass
16834
+
16791
16835
  def _typecheckingstub__fb337dcddbd70acf0d25c8d6f2b9ec2e9bae9105c6aa6db67b9a3c2354bf684b(
16792
16836
  service: builtins.str,
16793
16837
  ) -> None:
@@ -105,7 +105,7 @@ class CfnGroup(
105
105
  '''
106
106
  :param scope: Scope in which this resource is defined.
107
107
  :param id: Construct identifier for this resource (unique in its scope).
108
- :param display_name: The display name value for the group. The length limit is 1,024 characters. This value can consist of letters, accented characters, symbols, numbers, punctuation, tab, new line, carriage return, space, and nonbreaking space in this attribute. This value is specified at the time the group is created and stored as an attribute of the group object in the identity store.
108
+ :param display_name: The display name value for the group. The length limit is 1,024 characters. This value can consist of letters, accented characters, symbols, numbers, punctuation, tab, new line, carriage return, space, and nonbreaking space in this attribute. This value is specified at the time the group is created and stored as an attribute of the group object in the identity store. Prefix search supports a maximum of 1,000 characters for the string.
109
109
  :param identity_store_id: The globally unique identifier for the identity store.
110
110
  :param description: A string containing the description of the group.
111
111
  '''
@@ -517,7 +517,7 @@ class CfnGroupProps:
517
517
  ) -> None:
518
518
  '''Properties for defining a ``CfnGroup``.
519
519
 
520
- :param display_name: The display name value for the group. The length limit is 1,024 characters. This value can consist of letters, accented characters, symbols, numbers, punctuation, tab, new line, carriage return, space, and nonbreaking space in this attribute. This value is specified at the time the group is created and stored as an attribute of the group object in the identity store.
520
+ :param display_name: The display name value for the group. The length limit is 1,024 characters. This value can consist of letters, accented characters, symbols, numbers, punctuation, tab, new line, carriage return, space, and nonbreaking space in this attribute. This value is specified at the time the group is created and stored as an attribute of the group object in the identity store. Prefix search supports a maximum of 1,000 characters for the string.
521
521
  :param identity_store_id: The globally unique identifier for the identity store.
522
522
  :param description: A string containing the description of the group.
523
523
 
@@ -556,6 +556,8 @@ class CfnGroupProps:
556
556
 
557
557
  The length limit is 1,024 characters. This value can consist of letters, accented characters, symbols, numbers, punctuation, tab, new line, carriage return, space, and nonbreaking space in this attribute. This value is specified at the time the group is created and stored as an attribute of the group object in the identity store.
558
558
 
559
+ Prefix search supports a maximum of 1,000 characters for the string.
560
+
559
561
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-identitystore-group.html#cfn-identitystore-group-displayname
560
562
  '''
561
563
  result = self._values.get("display_name")
@@ -3612,10 +3612,10 @@ class CfnDomainConfiguration(
3612
3612
  '''
3613
3613
  :param scope: Scope in which this resource is defined.
3614
3614
  :param id: Construct identifier for this resource (unique in its scope).
3615
- :param application_protocol:
3616
- :param authentication_type:
3615
+ :param application_protocol: An enumerated string that specifies the application-layer protocol. .. epigraph:: This property isn't available in China.
3616
+ :param authentication_type: An enumerated string that specifies the authentication type. .. epigraph:: This property isn't available in China.
3617
3617
  :param authorizer_config: An object that specifies the authorization service for a domain.
3618
- :param client_certificate_config:
3618
+ :param client_certificate_config: An object that specifies the client certificate configuration for a domain. .. epigraph:: This property isn't available in China.
3619
3619
  :param domain_configuration_name: The name of the domain configuration. This value must be unique to a region.
3620
3620
  :param domain_configuration_status: The status to which the domain configuration should be updated. Valid values: ``ENABLED`` | ``DISABLED``
3621
3621
  :param domain_name: The name of the domain.
@@ -3721,6 +3721,7 @@ class CfnDomainConfiguration(
3721
3721
  @builtins.property
3722
3722
  @jsii.member(jsii_name="applicationProtocol")
3723
3723
  def application_protocol(self) -> typing.Optional[builtins.str]:
3724
+ '''An enumerated string that specifies the application-layer protocol.'''
3724
3725
  return typing.cast(typing.Optional[builtins.str], jsii.get(self, "applicationProtocol"))
3725
3726
 
3726
3727
  @application_protocol.setter
@@ -3733,6 +3734,7 @@ class CfnDomainConfiguration(
3733
3734
  @builtins.property
3734
3735
  @jsii.member(jsii_name="authenticationType")
3735
3736
  def authentication_type(self) -> typing.Optional[builtins.str]:
3737
+ '''An enumerated string that specifies the authentication type.'''
3736
3738
  return typing.cast(typing.Optional[builtins.str], jsii.get(self, "authenticationType"))
3737
3739
 
3738
3740
  @authentication_type.setter
@@ -3765,6 +3767,7 @@ class CfnDomainConfiguration(
3765
3767
  def client_certificate_config(
3766
3768
  self,
3767
3769
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnDomainConfiguration.ClientCertificateConfigProperty"]]:
3770
+ '''An object that specifies the client certificate configuration for a domain.'''
3768
3771
  return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnDomainConfiguration.ClientCertificateConfigProperty"]], jsii.get(self, "clientCertificateConfig"))
3769
3772
 
3770
3773
  @client_certificate_config.setter
@@ -3995,8 +3998,13 @@ class CfnDomainConfiguration(
3995
3998
  *,
3996
3999
  client_certificate_callback_arn: typing.Optional[builtins.str] = None,
3997
4000
  ) -> None:
3998
- '''
3999
- :param client_certificate_callback_arn:
4001
+ '''An object that specifies the client certificate configuration for a domain.
4002
+
4003
+ .. epigraph::
4004
+
4005
+ This property isn't available in China.
4006
+
4007
+ :param client_certificate_callback_arn: The ARN of the Lambda function that IoT invokes after mutual TLS authentication during the connection. .. epigraph:: This property isn't available in China.
4000
4008
 
4001
4009
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-clientcertificateconfig.html
4002
4010
  :exampleMetadata: fixture=_generated
@@ -4020,7 +4028,12 @@ class CfnDomainConfiguration(
4020
4028
 
4021
4029
  @builtins.property
4022
4030
  def client_certificate_callback_arn(self) -> typing.Optional[builtins.str]:
4023
- '''
4031
+ '''The ARN of the Lambda function that IoT invokes after mutual TLS authentication during the connection.
4032
+
4033
+ .. epigraph::
4034
+
4035
+ This property isn't available in China.
4036
+
4024
4037
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-domainconfiguration-clientcertificateconfig.html#cfn-iot-domainconfiguration-clientcertificateconfig-clientcertificatecallbackarn
4025
4038
  '''
4026
4039
  result = self._values.get("client_certificate_callback_arn")
@@ -4284,10 +4297,10 @@ class CfnDomainConfigurationProps:
4284
4297
  ) -> None:
4285
4298
  '''Properties for defining a ``CfnDomainConfiguration``.
4286
4299
 
4287
- :param application_protocol:
4288
- :param authentication_type:
4300
+ :param application_protocol: An enumerated string that specifies the application-layer protocol. .. epigraph:: This property isn't available in China.
4301
+ :param authentication_type: An enumerated string that specifies the authentication type. .. epigraph:: This property isn't available in China.
4289
4302
  :param authorizer_config: An object that specifies the authorization service for a domain.
4290
- :param client_certificate_config:
4303
+ :param client_certificate_config: An object that specifies the client certificate configuration for a domain. .. epigraph:: This property isn't available in China.
4291
4304
  :param domain_configuration_name: The name of the domain configuration. This value must be unique to a region.
4292
4305
  :param domain_configuration_status: The status to which the domain configuration should be updated. Valid values: ``ENABLED`` | ``DISABLED``
4293
4306
  :param domain_name: The name of the domain.
@@ -4380,7 +4393,12 @@ class CfnDomainConfigurationProps:
4380
4393
 
4381
4394
  @builtins.property
4382
4395
  def application_protocol(self) -> typing.Optional[builtins.str]:
4383
- '''
4396
+ '''An enumerated string that specifies the application-layer protocol.
4397
+
4398
+ .. epigraph::
4399
+
4400
+ This property isn't available in China.
4401
+
4384
4402
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-applicationprotocol
4385
4403
  '''
4386
4404
  result = self._values.get("application_protocol")
@@ -4388,7 +4406,12 @@ class CfnDomainConfigurationProps:
4388
4406
 
4389
4407
  @builtins.property
4390
4408
  def authentication_type(self) -> typing.Optional[builtins.str]:
4391
- '''
4409
+ '''An enumerated string that specifies the authentication type.
4410
+
4411
+ .. epigraph::
4412
+
4413
+ This property isn't available in China.
4414
+
4392
4415
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-authenticationtype
4393
4416
  '''
4394
4417
  result = self._values.get("authentication_type")
@@ -4409,7 +4432,12 @@ class CfnDomainConfigurationProps:
4409
4432
  def client_certificate_config(
4410
4433
  self,
4411
4434
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnDomainConfiguration.ClientCertificateConfigProperty]]:
4412
- '''
4435
+ '''An object that specifies the client certificate configuration for a domain.
4436
+
4437
+ .. epigraph::
4438
+
4439
+ This property isn't available in China.
4440
+
4413
4441
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-domainconfiguration.html#cfn-iot-domainconfiguration-clientcertificateconfig
4414
4442
  '''
4415
4443
  result = self._values.get("client_certificate_config")
@@ -240,6 +240,201 @@ from ..aws_iam import Grant as _Grant_a7ae64f8, IGrantable as _IGrantable_71c4f5
240
240
  from ..aws_kms import IKey as _IKey_5f11635f
241
241
 
242
242
 
243
+ @jsii.implements(_IInspectable_c2943556)
244
+ class CfnResourcePolicy(
245
+ _CfnResource_9df397a6,
246
+ metaclass=jsii.JSIIMeta,
247
+ jsii_type="aws-cdk-lib.aws_kinesis.CfnResourcePolicy",
248
+ ):
249
+ '''Attaches a resource-based policy to a data stream or registered consumer.
250
+
251
+ If you are using an identity other than the root user of the AWS account that owns the resource, the calling identity must have the ``PutResourcePolicy`` permissions on the specified Kinesis Data Streams resource and belong to the owner's account in order to use this operation. If you don't have ``PutResourcePolicy`` permissions, Amazon Kinesis Data Streams returns a ``403 Access Denied error`` . If you receive a ``ResourceNotFoundException`` , check to see if you passed a valid stream or consumer resource.
252
+
253
+ Request patterns can be one of the following:
254
+
255
+ - Data stream pattern: ``arn:aws.*:kinesis:.*:\\d{12}:.*stream/\\S+``
256
+ - Consumer pattern: ``^(arn):aws.*:kinesis:.*:\\d{12}:.*stream\\/[a-zA-Z0-9_.-]+\\/consumer\\/[a-zA-Z0-9_.-]+:[0-9]+``
257
+
258
+ 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>`_ .
259
+
260
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-resourcepolicy.html
261
+ :cloudformationResource: AWS::Kinesis::ResourcePolicy
262
+ :exampleMetadata: fixture=_generated
263
+
264
+ Example::
265
+
266
+ # The code below shows an example of how to instantiate this type.
267
+ # The values are placeholders you should change.
268
+ from aws_cdk import aws_kinesis as kinesis
269
+
270
+ # resource_policy: Any
271
+
272
+ cfn_resource_policy = kinesis.CfnResourcePolicy(self, "MyCfnResourcePolicy",
273
+ resource_arn="resourceArn",
274
+ resource_policy=resource_policy
275
+ )
276
+ '''
277
+
278
+ def __init__(
279
+ self,
280
+ scope: _constructs_77d1e7e8.Construct,
281
+ id: builtins.str,
282
+ *,
283
+ resource_arn: builtins.str,
284
+ resource_policy: typing.Any,
285
+ ) -> None:
286
+ '''
287
+ :param scope: Scope in which this resource is defined.
288
+ :param id: Construct identifier for this resource (unique in its scope).
289
+ :param resource_arn: This is the name for the resource policy.
290
+ :param resource_policy: This is the description for the resource policy.
291
+ '''
292
+ if __debug__:
293
+ type_hints = typing.get_type_hints(_typecheckingstub__d637108cee3cd0781f4431aaf5dbbdcd6254ef22d3f2922cee25b64d42fbf957)
294
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
295
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
296
+ props = CfnResourcePolicyProps(
297
+ resource_arn=resource_arn, resource_policy=resource_policy
298
+ )
299
+
300
+ jsii.create(self.__class__, self, [scope, id, props])
301
+
302
+ @jsii.member(jsii_name="inspect")
303
+ def inspect(self, inspector: _TreeInspector_488e0dd5) -> None:
304
+ '''Examines the CloudFormation resource and discloses attributes.
305
+
306
+ :param inspector: tree inspector to collect and process attributes.
307
+ '''
308
+ if __debug__:
309
+ type_hints = typing.get_type_hints(_typecheckingstub__045925af979db6aed97959dc574fc91b8ebab52940589dd4ac5cea22d9e1c37f)
310
+ check_type(argname="argument inspector", value=inspector, expected_type=type_hints["inspector"])
311
+ return typing.cast(None, jsii.invoke(self, "inspect", [inspector]))
312
+
313
+ @jsii.member(jsii_name="renderProperties")
314
+ def _render_properties(
315
+ self,
316
+ props: typing.Mapping[builtins.str, typing.Any],
317
+ ) -> typing.Mapping[builtins.str, typing.Any]:
318
+ '''
319
+ :param props: -
320
+ '''
321
+ if __debug__:
322
+ type_hints = typing.get_type_hints(_typecheckingstub__2fbcd9f422a87f866ccf52168beedf905788cffe10833fbaef759cb99a877efa)
323
+ check_type(argname="argument props", value=props, expected_type=type_hints["props"])
324
+ return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.invoke(self, "renderProperties", [props]))
325
+
326
+ @jsii.python.classproperty
327
+ @jsii.member(jsii_name="CFN_RESOURCE_TYPE_NAME")
328
+ def CFN_RESOURCE_TYPE_NAME(cls) -> builtins.str:
329
+ '''The CloudFormation resource type name for this resource class.'''
330
+ return typing.cast(builtins.str, jsii.sget(cls, "CFN_RESOURCE_TYPE_NAME"))
331
+
332
+ @builtins.property
333
+ @jsii.member(jsii_name="cfnProperties")
334
+ def _cfn_properties(self) -> typing.Mapping[builtins.str, typing.Any]:
335
+ return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "cfnProperties"))
336
+
337
+ @builtins.property
338
+ @jsii.member(jsii_name="resourceArn")
339
+ def resource_arn(self) -> builtins.str:
340
+ '''This is the name for the resource policy.'''
341
+ return typing.cast(builtins.str, jsii.get(self, "resourceArn"))
342
+
343
+ @resource_arn.setter
344
+ def resource_arn(self, value: builtins.str) -> None:
345
+ if __debug__:
346
+ type_hints = typing.get_type_hints(_typecheckingstub__afec0f5206f450a53f1d8f83fabea1a74a415b8e1561742c86dcb34c8df7ef18)
347
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
348
+ jsii.set(self, "resourceArn", value) # pyright: ignore[reportArgumentType]
349
+
350
+ @builtins.property
351
+ @jsii.member(jsii_name="resourcePolicy")
352
+ def resource_policy(self) -> typing.Any:
353
+ '''This is the description for the resource policy.'''
354
+ return typing.cast(typing.Any, jsii.get(self, "resourcePolicy"))
355
+
356
+ @resource_policy.setter
357
+ def resource_policy(self, value: typing.Any) -> None:
358
+ if __debug__:
359
+ type_hints = typing.get_type_hints(_typecheckingstub__9ce115deea862b93afa1f5f701216876983abcfa93ac3ace697573677451b118)
360
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
361
+ jsii.set(self, "resourcePolicy", value) # pyright: ignore[reportArgumentType]
362
+
363
+
364
+ @jsii.data_type(
365
+ jsii_type="aws-cdk-lib.aws_kinesis.CfnResourcePolicyProps",
366
+ jsii_struct_bases=[],
367
+ name_mapping={"resource_arn": "resourceArn", "resource_policy": "resourcePolicy"},
368
+ )
369
+ class CfnResourcePolicyProps:
370
+ def __init__(
371
+ self,
372
+ *,
373
+ resource_arn: builtins.str,
374
+ resource_policy: typing.Any,
375
+ ) -> None:
376
+ '''Properties for defining a ``CfnResourcePolicy``.
377
+
378
+ :param resource_arn: This is the name for the resource policy.
379
+ :param resource_policy: This is the description for the resource policy.
380
+
381
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-resourcepolicy.html
382
+ :exampleMetadata: fixture=_generated
383
+
384
+ Example::
385
+
386
+ # The code below shows an example of how to instantiate this type.
387
+ # The values are placeholders you should change.
388
+ from aws_cdk import aws_kinesis as kinesis
389
+
390
+ # resource_policy: Any
391
+
392
+ cfn_resource_policy_props = kinesis.CfnResourcePolicyProps(
393
+ resource_arn="resourceArn",
394
+ resource_policy=resource_policy
395
+ )
396
+ '''
397
+ if __debug__:
398
+ type_hints = typing.get_type_hints(_typecheckingstub__dc9d3035df5ffd3d2e91ef2e5c2b108309a10ae013584b2ef5c2d3bdde4567bc)
399
+ check_type(argname="argument resource_arn", value=resource_arn, expected_type=type_hints["resource_arn"])
400
+ check_type(argname="argument resource_policy", value=resource_policy, expected_type=type_hints["resource_policy"])
401
+ self._values: typing.Dict[builtins.str, typing.Any] = {
402
+ "resource_arn": resource_arn,
403
+ "resource_policy": resource_policy,
404
+ }
405
+
406
+ @builtins.property
407
+ def resource_arn(self) -> builtins.str:
408
+ '''This is the name for the resource policy.
409
+
410
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-resourcepolicy.html#cfn-kinesis-resourcepolicy-resourcearn
411
+ '''
412
+ result = self._values.get("resource_arn")
413
+ assert result is not None, "Required property 'resource_arn' is missing"
414
+ return typing.cast(builtins.str, result)
415
+
416
+ @builtins.property
417
+ def resource_policy(self) -> typing.Any:
418
+ '''This is the description for the resource policy.
419
+
420
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-resourcepolicy.html#cfn-kinesis-resourcepolicy-resourcepolicy
421
+ '''
422
+ result = self._values.get("resource_policy")
423
+ assert result is not None, "Required property 'resource_policy' is missing"
424
+ return typing.cast(typing.Any, result)
425
+
426
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
427
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
428
+
429
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
430
+ return not (rhs == self)
431
+
432
+ def __repr__(self) -> str:
433
+ return "CfnResourcePolicyProps(%s)" % ", ".join(
434
+ k + "=" + repr(v) for k, v in self._values.items()
435
+ )
436
+
437
+
243
438
  @jsii.implements(_IInspectable_c2943556, _ITaggable_36806126)
244
439
  class CfnStream(
245
440
  _CfnResource_9df397a6,
@@ -3896,6 +4091,8 @@ class StreamProps:
3896
4091
 
3897
4092
 
3898
4093
  __all__ = [
4094
+ "CfnResourcePolicy",
4095
+ "CfnResourcePolicyProps",
3899
4096
  "CfnStream",
3900
4097
  "CfnStreamConsumer",
3901
4098
  "CfnStreamConsumerProps",
@@ -3910,6 +4107,48 @@ __all__ = [
3910
4107
 
3911
4108
  publication.publish()
3912
4109
 
4110
+ def _typecheckingstub__d637108cee3cd0781f4431aaf5dbbdcd6254ef22d3f2922cee25b64d42fbf957(
4111
+ scope: _constructs_77d1e7e8.Construct,
4112
+ id: builtins.str,
4113
+ *,
4114
+ resource_arn: builtins.str,
4115
+ resource_policy: typing.Any,
4116
+ ) -> None:
4117
+ """Type checking stubs"""
4118
+ pass
4119
+
4120
+ def _typecheckingstub__045925af979db6aed97959dc574fc91b8ebab52940589dd4ac5cea22d9e1c37f(
4121
+ inspector: _TreeInspector_488e0dd5,
4122
+ ) -> None:
4123
+ """Type checking stubs"""
4124
+ pass
4125
+
4126
+ def _typecheckingstub__2fbcd9f422a87f866ccf52168beedf905788cffe10833fbaef759cb99a877efa(
4127
+ props: typing.Mapping[builtins.str, typing.Any],
4128
+ ) -> None:
4129
+ """Type checking stubs"""
4130
+ pass
4131
+
4132
+ def _typecheckingstub__afec0f5206f450a53f1d8f83fabea1a74a415b8e1561742c86dcb34c8df7ef18(
4133
+ value: builtins.str,
4134
+ ) -> None:
4135
+ """Type checking stubs"""
4136
+ pass
4137
+
4138
+ def _typecheckingstub__9ce115deea862b93afa1f5f701216876983abcfa93ac3ace697573677451b118(
4139
+ value: typing.Any,
4140
+ ) -> None:
4141
+ """Type checking stubs"""
4142
+ pass
4143
+
4144
+ def _typecheckingstub__dc9d3035df5ffd3d2e91ef2e5c2b108309a10ae013584b2ef5c2d3bdde4567bc(
4145
+ *,
4146
+ resource_arn: builtins.str,
4147
+ resource_policy: typing.Any,
4148
+ ) -> None:
4149
+ """Type checking stubs"""
4150
+ pass
4151
+
3913
4152
  def _typecheckingstub__b956aa40f3e4f7ebba018fbc1caa3788147e52190c5c7131c5c035b042428a53(
3914
4153
  scope: _constructs_77d1e7e8.Construct,
3915
4154
  id: builtins.str,
@@ -145,6 +145,23 @@ Note that a call to `.addToResourcePolicy(statement)` on `myKeyLookup` will not
145
145
  an affect on the key's policy because it is not owned by your stack. The call
146
146
  will be a no-op.
147
147
 
148
+ If the target key is not found in your account, an error will be thrown.
149
+ To prevent the error in the case, you can receive a dummy key without the error
150
+ by setting `returnDummyKeyOnMissing` to `true`. The dummy key has a `keyId` of
151
+ `1234abcd-12ab-34cd-56ef-1234567890ab`. The value of the dummy key id can also be
152
+ referenced using the `Key.DEFAULT_DUMMY_KEY_ID` variable, and you can check if the
153
+ key is a dummy key by using the `Key.isLookupDummy()` method.
154
+
155
+ ```python
156
+ dummy = kms.Key.from_lookup(self, "MyKeyLookup",
157
+ alias_name="alias/NonExistentAlias",
158
+ return_dummy_key_on_missing=True
159
+ )
160
+
161
+ if kms.Key.is_lookup_dummy(dummy):
162
+ pass
163
+ ```
164
+
148
165
  ## Key Policies
149
166
 
150
167
  Controlling access and usage of KMS Keys requires the use of key policies (resource-based policies attached to the key);
@@ -2261,6 +2278,7 @@ class Key(
2261
2278
  id: builtins.str,
2262
2279
  *,
2263
2280
  alias_name: builtins.str,
2281
+ return_dummy_key_on_missing: typing.Optional[builtins.bool] = None,
2264
2282
  ) -> IKey:
2265
2283
  '''Import an existing Key by querying the AWS environment this stack is deployed to.
2266
2284
 
@@ -2275,6 +2293,12 @@ class Key(
2275
2293
  You can therefore not use any values that will only be available at
2276
2294
  CloudFormation execution time (i.e., Tokens).
2277
2295
 
2296
+ If you set ``returnDummyKeyOnMissing`` to ``true`` in ``options`` and the key was not found,
2297
+ this method will return a dummy key with a key id '1234abcd-12ab-34cd-56ef-1234567890ab'.
2298
+ The value of the dummy key id can also be referenced using the ``Key.DEFAULT_DUMMY_KEY_ID``
2299
+ variable, and you can check if the key is a dummy key by using the ``Key.isLookupDummy()``
2300
+ method.
2301
+
2278
2302
  The Key information will be cached in ``cdk.context.json`` and the same Key
2279
2303
  will be used on future runs. To refresh the lookup, you will have to
2280
2304
  evict the value from the cache using the ``cdk context`` command. See
@@ -2283,15 +2307,34 @@ class Key(
2283
2307
  :param scope: -
2284
2308
  :param id: -
2285
2309
  :param alias_name: The alias name of the Key. Must be in the format ``alias/<AliasName>``.
2310
+ :param return_dummy_key_on_missing: Whether to return a dummy key if the key was not found. If it is set to ``true`` and the key was not found, a dummy key with a key id '1234abcd-12ab-34cd-56ef-1234567890ab' will be returned. The value of the dummy key id can also be referenced using the ``Key.DEFAULT_DUMMY_KEY_ID`` variable, and you can check if the key is a dummy key by using the ``Key.isLookupDummy()`` method. Default: false
2286
2311
  '''
2287
2312
  if __debug__:
2288
2313
  type_hints = typing.get_type_hints(_typecheckingstub__54c731fe78f9388d4b31695080a02f67600ec386d3b55f25a7274b86edbd4673)
2289
2314
  check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
2290
2315
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
2291
- options = KeyLookupOptions(alias_name=alias_name)
2316
+ options = KeyLookupOptions(
2317
+ alias_name=alias_name,
2318
+ return_dummy_key_on_missing=return_dummy_key_on_missing,
2319
+ )
2292
2320
 
2293
2321
  return typing.cast(IKey, jsii.sinvoke(cls, "fromLookup", [scope, id, options]))
2294
2322
 
2323
+ @jsii.member(jsii_name="isLookupDummy")
2324
+ @builtins.classmethod
2325
+ def is_lookup_dummy(cls, key: IKey) -> builtins.bool:
2326
+ '''Checks if the key returned by the ``Key.fromLookup()`` method is a dummy key, i.e., a key that was not found.
2327
+
2328
+ This method can only be used if the ``returnDummyKeyOnMissing`` option
2329
+ is set to ``true`` in the ``options`` for the ``Key.fromLookup()`` method.
2330
+
2331
+ :param key: -
2332
+ '''
2333
+ if __debug__:
2334
+ type_hints = typing.get_type_hints(_typecheckingstub__8a60ddf97e7bd93ce51bb72de0630a0a66c03edf9f9e5f71c93ad6e4563a7cb0)
2335
+ check_type(argname="argument key", value=key, expected_type=type_hints["key"])
2336
+ return typing.cast(builtins.bool, jsii.sinvoke(cls, "isLookupDummy", [key]))
2337
+
2295
2338
  @jsii.member(jsii_name="addAlias")
2296
2339
  def add_alias(self, alias_name: builtins.str) -> "Alias":
2297
2340
  '''Defines a new alias for the key.
@@ -2410,6 +2453,16 @@ class Key(
2410
2453
  check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
2411
2454
  return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantVerifyMac", [grantee]))
2412
2455
 
2456
+ @jsii.python.classproperty
2457
+ @jsii.member(jsii_name="DEFAULT_DUMMY_KEY_ID")
2458
+ def DEFAULT_DUMMY_KEY_ID(cls) -> builtins.str:
2459
+ '''The default key id of the dummy key.
2460
+
2461
+ This value is used as a dummy key id if the key was not found
2462
+ by the ``Key.fromLookup()`` method.
2463
+ '''
2464
+ return typing.cast(builtins.str, jsii.sget(cls, "DEFAULT_DUMMY_KEY_ID"))
2465
+
2413
2466
  @builtins.property
2414
2467
  @jsii.member(jsii_name="keyArn")
2415
2468
  def key_arn(self) -> builtins.str:
@@ -2447,13 +2500,22 @@ class Key(
2447
2500
  @jsii.data_type(
2448
2501
  jsii_type="aws-cdk-lib.aws_kms.KeyLookupOptions",
2449
2502
  jsii_struct_bases=[],
2450
- name_mapping={"alias_name": "aliasName"},
2503
+ name_mapping={
2504
+ "alias_name": "aliasName",
2505
+ "return_dummy_key_on_missing": "returnDummyKeyOnMissing",
2506
+ },
2451
2507
  )
2452
2508
  class KeyLookupOptions:
2453
- def __init__(self, *, alias_name: builtins.str) -> None:
2509
+ def __init__(
2510
+ self,
2511
+ *,
2512
+ alias_name: builtins.str,
2513
+ return_dummy_key_on_missing: typing.Optional[builtins.bool] = None,
2514
+ ) -> None:
2454
2515
  '''Properties for looking up an existing Key.
2455
2516
 
2456
2517
  :param alias_name: The alias name of the Key. Must be in the format ``alias/<AliasName>``.
2518
+ :param return_dummy_key_on_missing: Whether to return a dummy key if the key was not found. If it is set to ``true`` and the key was not found, a dummy key with a key id '1234abcd-12ab-34cd-56ef-1234567890ab' will be returned. The value of the dummy key id can also be referenced using the ``Key.DEFAULT_DUMMY_KEY_ID`` variable, and you can check if the key is a dummy key by using the ``Key.isLookupDummy()`` method. Default: false
2457
2519
 
2458
2520
  :exampleMetadata: infused
2459
2521
 
@@ -2471,9 +2533,12 @@ class KeyLookupOptions:
2471
2533
  if __debug__:
2472
2534
  type_hints = typing.get_type_hints(_typecheckingstub__2f5a93b8499d8ef4842a85d33ca3d3de5edce426bd92f9899e4dcda2ebfcf7e0)
2473
2535
  check_type(argname="argument alias_name", value=alias_name, expected_type=type_hints["alias_name"])
2536
+ check_type(argname="argument return_dummy_key_on_missing", value=return_dummy_key_on_missing, expected_type=type_hints["return_dummy_key_on_missing"])
2474
2537
  self._values: typing.Dict[builtins.str, typing.Any] = {
2475
2538
  "alias_name": alias_name,
2476
2539
  }
2540
+ if return_dummy_key_on_missing is not None:
2541
+ self._values["return_dummy_key_on_missing"] = return_dummy_key_on_missing
2477
2542
 
2478
2543
  @builtins.property
2479
2544
  def alias_name(self) -> builtins.str:
@@ -2485,6 +2550,22 @@ class KeyLookupOptions:
2485
2550
  assert result is not None, "Required property 'alias_name' is missing"
2486
2551
  return typing.cast(builtins.str, result)
2487
2552
 
2553
+ @builtins.property
2554
+ def return_dummy_key_on_missing(self) -> typing.Optional[builtins.bool]:
2555
+ '''Whether to return a dummy key if the key was not found.
2556
+
2557
+ If it is set to ``true`` and the key was not found, a dummy
2558
+ key with a key id '1234abcd-12ab-34cd-56ef-1234567890ab'
2559
+ will be returned. The value of the dummy key id can also
2560
+ be referenced using the ``Key.DEFAULT_DUMMY_KEY_ID`` variable,
2561
+ and you can check if the key is a dummy key by using the
2562
+ ``Key.isLookupDummy()`` method.
2563
+
2564
+ :default: false
2565
+ '''
2566
+ result = self._values.get("return_dummy_key_on_missing")
2567
+ return typing.cast(typing.Optional[builtins.bool], result)
2568
+
2488
2569
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
2489
2570
  return isinstance(rhs, self.__class__) and rhs._values == self._values
2490
2571
 
@@ -3611,6 +3692,13 @@ def _typecheckingstub__54c731fe78f9388d4b31695080a02f67600ec386d3b55f25a7274b86e
3611
3692
  id: builtins.str,
3612
3693
  *,
3613
3694
  alias_name: builtins.str,
3695
+ return_dummy_key_on_missing: typing.Optional[builtins.bool] = None,
3696
+ ) -> None:
3697
+ """Type checking stubs"""
3698
+ pass
3699
+
3700
+ def _typecheckingstub__8a60ddf97e7bd93ce51bb72de0630a0a66c03edf9f9e5f71c93ad6e4563a7cb0(
3701
+ key: IKey,
3614
3702
  ) -> None:
3615
3703
  """Type checking stubs"""
3616
3704
  pass
@@ -3674,6 +3762,7 @@ def _typecheckingstub__de56bfcabbb83e3ba315f07ba084787bd71e82306a46ddc61555bc4f0
3674
3762
  def _typecheckingstub__2f5a93b8499d8ef4842a85d33ca3d3de5edce426bd92f9899e4dcda2ebfcf7e0(
3675
3763
  *,
3676
3764
  alias_name: builtins.str,
3765
+ return_dummy_key_on_missing: typing.Optional[builtins.bool] = None,
3677
3766
  ) -> None:
3678
3767
  """Type checking stubs"""
3679
3768
  pass
@@ -14209,9 +14209,9 @@ class FilterRule(
14209
14209
 
14210
14210
  @jsii.member(jsii_name="null")
14211
14211
  @builtins.classmethod
14212
- def null(cls) -> typing.List[builtins.str]:
14212
+ def null(cls) -> typing.Any:
14213
14213
  '''Null comparison operator.'''
14214
- return typing.cast(typing.List[builtins.str], jsii.sinvoke(cls, "null", []))
14214
+ return typing.cast(typing.Any, jsii.sinvoke(cls, "null", []))
14215
14215
 
14216
14216
  @jsii.member(jsii_name="or")
14217
14217
  @builtins.classmethod