aws-cdk-lib 2.201.0__py3-none-any.whl → 2.202.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.

@@ -10946,24 +10946,41 @@ class CfnRegistry(
10946
10946
 
10947
10947
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-registry.html
10948
10948
  :cloudformationResource: AWS::Glue::Registry
10949
- :exampleMetadata: fixture=_generated
10949
+ :exampleMetadata: infused
10950
10950
 
10951
10951
  Example::
10952
10952
 
10953
- # The code below shows an example of how to instantiate this type.
10954
- # The values are placeholders you should change.
10955
- from aws_cdk import aws_glue as glue
10953
+ from aws_cdk.aws_glue import CfnRegistry
10954
+ from aws_cdk.aws_lambda_event_sources import ManagedKafkaEventSource, GlueSchemaRegistry
10956
10955
 
10957
- cfn_registry = glue.CfnRegistry(self, "MyCfnRegistry",
10958
- name="name",
10956
+ # Your MSK cluster arn
10957
+ # cluster_arn: str
10959
10958
 
10960
- # the properties below are optional
10961
- description="description",
10962
- tags=[CfnTag(
10963
- key="key",
10964
- value="value"
10965
- )]
10959
+ # my_function: lambda.Function
10960
+
10961
+
10962
+ # The Kafka topic you want to subscribe to
10963
+ topic = "some-cool-topic"
10964
+
10965
+ # Your Glue Schema Registry
10966
+ glue_registry = CfnRegistry(self, "Registry",
10967
+ name="schema-registry",
10968
+ description="Schema registry for event source"
10966
10969
  )
10970
+ my_function.add_event_source(ManagedKafkaEventSource(
10971
+ cluster_arn=cluster_arn,
10972
+ topic=topic,
10973
+ starting_position=lambda_.StartingPosition.TRIM_HORIZON,
10974
+ provisioned_poller_config=ProvisionedPollerConfig(
10975
+ minimum_pollers=1,
10976
+ maximum_pollers=3
10977
+ ),
10978
+ schema_registry_config=GlueSchemaRegistry(
10979
+ schema_registry=glue_registry,
10980
+ event_record_format=lambda_.EventRecordFormat.JSON,
10981
+ schema_validation_configs=[lambda.KafkaSchemaValidationConfig(attribute=lambda_.KafkaSchemaValidationAttribute.KEY)]
10982
+ )
10983
+ ))
10967
10984
  '''
10968
10985
 
10969
10986
  def __init__(
@@ -11100,24 +11117,41 @@ class CfnRegistryProps:
11100
11117
  :param tags: AWS tags that contain a key value pair and may be searched by console, command line, or API.
11101
11118
 
11102
11119
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-registry.html
11103
- :exampleMetadata: fixture=_generated
11120
+ :exampleMetadata: infused
11104
11121
 
11105
11122
  Example::
11106
11123
 
11107
- # The code below shows an example of how to instantiate this type.
11108
- # The values are placeholders you should change.
11109
- from aws_cdk import aws_glue as glue
11124
+ from aws_cdk.aws_glue import CfnRegistry
11125
+ from aws_cdk.aws_lambda_event_sources import ManagedKafkaEventSource, GlueSchemaRegistry
11110
11126
 
11111
- cfn_registry_props = glue.CfnRegistryProps(
11112
- name="name",
11127
+ # Your MSK cluster arn
11128
+ # cluster_arn: str
11113
11129
 
11114
- # the properties below are optional
11115
- description="description",
11116
- tags=[CfnTag(
11117
- key="key",
11118
- value="value"
11119
- )]
11130
+ # my_function: lambda.Function
11131
+
11132
+
11133
+ # The Kafka topic you want to subscribe to
11134
+ topic = "some-cool-topic"
11135
+
11136
+ # Your Glue Schema Registry
11137
+ glue_registry = CfnRegistry(self, "Registry",
11138
+ name="schema-registry",
11139
+ description="Schema registry for event source"
11120
11140
  )
11141
+ my_function.add_event_source(ManagedKafkaEventSource(
11142
+ cluster_arn=cluster_arn,
11143
+ topic=topic,
11144
+ starting_position=lambda_.StartingPosition.TRIM_HORIZON,
11145
+ provisioned_poller_config=ProvisionedPollerConfig(
11146
+ minimum_pollers=1,
11147
+ maximum_pollers=3
11148
+ ),
11149
+ schema_registry_config=GlueSchemaRegistry(
11150
+ schema_registry=glue_registry,
11151
+ event_record_format=lambda_.EventRecordFormat.JSON,
11152
+ schema_validation_configs=[lambda.KafkaSchemaValidationConfig(attribute=lambda_.KafkaSchemaValidationAttribute.KEY)]
11153
+ )
11154
+ ))
11121
11155
  '''
11122
11156
  if __debug__:
11123
11157
  type_hints = typing.get_type_hints(_typecheckingstub__a9d85e07a2dcc4ae5cd073c48fc5eb424c7446e4be042407f1f89c111ef9bba1)
@@ -14942,7 +14942,7 @@ class ArnPrincipal(
14942
14942
  Example::
14943
14943
 
14944
14944
  # Option 2: create your custom mastersRole with scoped assumeBy arn as the Cluster prop. Switch to this role from the AWS console.
14945
- from aws_cdk.lambda_layer_kubectl_v32 import KubectlV32Layer
14945
+ from aws_cdk.lambda_layer_kubectl_v33 import KubectlV33Layer
14946
14946
  # vpc: ec2.Vpc
14947
14947
 
14948
14948
 
@@ -14952,8 +14952,8 @@ class ArnPrincipal(
14952
14952
 
14953
14953
  cluster = eks.Cluster(self, "EksCluster",
14954
14954
  vpc=vpc,
14955
- version=eks.KubernetesVersion.V1_32,
14956
- kubectl_layer=KubectlV32Layer(self, "KubectlLayer"),
14955
+ version=eks.KubernetesVersion.V1_33,
14956
+ kubectl_layer=KubectlV33Layer(self, "KubectlLayer"),
14957
14957
  masters_role=masters_role
14958
14958
  )
14959
14959
 
@@ -113,9 +113,10 @@ trail = cloudtrail.Trail(self, "myCloudTrail",
113
113
  )
114
114
  ```
115
115
 
116
- Note that calls to `addToResourcePolicy` and `grant*` methods on `myKeyAlias` will be
117
- no-ops, and `addAlias` and `aliasTargetKey` will fail, as the imported alias does not
118
- have a reference to the underlying KMS Key.
116
+ Note that calls to `addToResourcePolicy` method on `myKeyAlias` will be a no-op, `addAlias` and `aliasTargetKey` will fail.
117
+ The `grant*` methods will not modify the key policy, as the imported alias does not have a reference to the underlying KMS Key.
118
+ For the `grant*` methods to modify the principal's IAM policy, the feature flag `@aws-cdk/aws-kms:applyImportedAliasPermissionsToPrincipal`
119
+ must be set to `true`. By default, this flag is `false` and `grant*` calls on an imported alias are a no-op.
119
120
 
120
121
  ### Lookup key by alias
121
122
 
@@ -3287,7 +3288,12 @@ class Alias(
3287
3288
 
3288
3289
  This method should be used
3289
3290
  instead of 'fromAliasAttributes' when the underlying KMS Key ARN is not available.
3290
- This Alias will not have a direct reference to the KMS Key, so addAlias and grant* methods are not supported.
3291
+ This Alias will not have a direct reference to the KMS Key, so addAlias method is not supported.
3292
+
3293
+ If the ``@aws-cdk/aws-kms:applyImportedAliasPermissionsToPrincipal`` feature flag is set to ``true``,
3294
+ the grant* methods will use the kms:ResourceAliases condition to grant permissions to the specific alias name.
3295
+ They will only modify the principal policy, not the key resource policy.
3296
+ Without the feature flag ``grant*`` methods will be a no-op.
3291
3297
 
3292
3298
  :param scope: The parent creating construct (usually ``this``).
3293
3299
  :param id: The construct's name.