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

@@ -145,6 +145,14 @@ role = iam.Role.from_role_arn(self, "Role", "arn:aws:iam::123456789012:role/MyEx
145
145
  )
146
146
  ```
147
147
 
148
+ If you want to lookup roles that actually exist in your account, you can use `Role.fromLookup()`.
149
+
150
+ ```python
151
+ role = iam.Role.from_lookup(self, "Role",
152
+ role_name="MyExistingRole"
153
+ )
154
+ ```
155
+
148
156
  ### Customizing role creation
149
157
 
150
158
  It is best practice to allow CDK to manage IAM roles and permissions. You can prevent CDK from
@@ -11101,6 +11109,119 @@ class PrincipalPolicyFragment(
11101
11109
  return typing.cast(typing.Mapping[builtins.str, typing.List[builtins.str]], jsii.get(self, "principalJson"))
11102
11110
 
11103
11111
 
11112
+ @jsii.data_type(
11113
+ jsii_type="aws-cdk-lib.aws_iam.RoleLookupOptions",
11114
+ jsii_struct_bases=[FromRoleArnOptions],
11115
+ name_mapping={
11116
+ "add_grants_to_resources": "addGrantsToResources",
11117
+ "default_policy_name": "defaultPolicyName",
11118
+ "mutable": "mutable",
11119
+ "role_name": "roleName",
11120
+ },
11121
+ )
11122
+ class RoleLookupOptions(FromRoleArnOptions):
11123
+ def __init__(
11124
+ self,
11125
+ *,
11126
+ add_grants_to_resources: typing.Optional[builtins.bool] = None,
11127
+ default_policy_name: typing.Optional[builtins.str] = None,
11128
+ mutable: typing.Optional[builtins.bool] = None,
11129
+ role_name: builtins.str,
11130
+ ) -> None:
11131
+ '''Properties for looking up an existing Role.
11132
+
11133
+ :param add_grants_to_resources: For immutable roles: add grants to resources instead of dropping them. If this is ``false`` or not specified, grant permissions added to this role are ignored. It is your own responsibility to make sure the role has the required permissions. If this is ``true``, any grant permissions will be added to the resource instead. Default: false
11134
+ :param default_policy_name: Any policies created by this role will use this value as their ID, if specified. Specify this if importing the same role in multiple stacks, and granting it different permissions in at least two stacks. If this is not specified (or if the same name is specified in more than one stack), a CloudFormation issue will result in the policy created in whichever stack is deployed last overwriting the policies created by the others. Default: 'Policy'
11135
+ :param mutable: Whether the imported role can be modified by attaching policy resources to it. Default: true
11136
+ :param role_name: The name of the role to lookup. If the role you want to lookup is a service role, you need to specify the role name without the 'service-role' prefix. For example, if the role arn is 'arn:aws:iam::123456789012:role/service-role/ExampleServiceExecutionRole', you need to specify the role name as 'ExampleServiceExecutionRole'.
11137
+
11138
+ :exampleMetadata: infused
11139
+
11140
+ Example::
11141
+
11142
+ role = iam.Role.from_lookup(self, "Role",
11143
+ role_name="MyExistingRole"
11144
+ )
11145
+ '''
11146
+ if __debug__:
11147
+ type_hints = typing.get_type_hints(_typecheckingstub__06f459857ae55dc3473fba5b10ef4188eca762038ac741736a6d4b8cac006356)
11148
+ check_type(argname="argument add_grants_to_resources", value=add_grants_to_resources, expected_type=type_hints["add_grants_to_resources"])
11149
+ check_type(argname="argument default_policy_name", value=default_policy_name, expected_type=type_hints["default_policy_name"])
11150
+ check_type(argname="argument mutable", value=mutable, expected_type=type_hints["mutable"])
11151
+ check_type(argname="argument role_name", value=role_name, expected_type=type_hints["role_name"])
11152
+ self._values: typing.Dict[builtins.str, typing.Any] = {
11153
+ "role_name": role_name,
11154
+ }
11155
+ if add_grants_to_resources is not None:
11156
+ self._values["add_grants_to_resources"] = add_grants_to_resources
11157
+ if default_policy_name is not None:
11158
+ self._values["default_policy_name"] = default_policy_name
11159
+ if mutable is not None:
11160
+ self._values["mutable"] = mutable
11161
+
11162
+ @builtins.property
11163
+ def add_grants_to_resources(self) -> typing.Optional[builtins.bool]:
11164
+ '''For immutable roles: add grants to resources instead of dropping them.
11165
+
11166
+ If this is ``false`` or not specified, grant permissions added to this role are ignored.
11167
+ It is your own responsibility to make sure the role has the required permissions.
11168
+
11169
+ If this is ``true``, any grant permissions will be added to the resource instead.
11170
+
11171
+ :default: false
11172
+ '''
11173
+ result = self._values.get("add_grants_to_resources")
11174
+ return typing.cast(typing.Optional[builtins.bool], result)
11175
+
11176
+ @builtins.property
11177
+ def default_policy_name(self) -> typing.Optional[builtins.str]:
11178
+ '''Any policies created by this role will use this value as their ID, if specified.
11179
+
11180
+ Specify this if importing the same role in multiple stacks, and granting it
11181
+ different permissions in at least two stacks. If this is not specified
11182
+ (or if the same name is specified in more than one stack),
11183
+ a CloudFormation issue will result in the policy created in whichever stack
11184
+ is deployed last overwriting the policies created by the others.
11185
+
11186
+ :default: 'Policy'
11187
+ '''
11188
+ result = self._values.get("default_policy_name")
11189
+ return typing.cast(typing.Optional[builtins.str], result)
11190
+
11191
+ @builtins.property
11192
+ def mutable(self) -> typing.Optional[builtins.bool]:
11193
+ '''Whether the imported role can be modified by attaching policy resources to it.
11194
+
11195
+ :default: true
11196
+ '''
11197
+ result = self._values.get("mutable")
11198
+ return typing.cast(typing.Optional[builtins.bool], result)
11199
+
11200
+ @builtins.property
11201
+ def role_name(self) -> builtins.str:
11202
+ '''The name of the role to lookup.
11203
+
11204
+ If the role you want to lookup is a service role, you need to specify
11205
+ the role name without the 'service-role' prefix. For example, if the role arn is
11206
+ 'arn:aws:iam::123456789012:role/service-role/ExampleServiceExecutionRole',
11207
+ you need to specify the role name as 'ExampleServiceExecutionRole'.
11208
+ '''
11209
+ result = self._values.get("role_name")
11210
+ assert result is not None, "Required property 'role_name' is missing"
11211
+ return typing.cast(builtins.str, result)
11212
+
11213
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
11214
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
11215
+
11216
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
11217
+ return not (rhs == self)
11218
+
11219
+ def __repr__(self) -> str:
11220
+ return "RoleLookupOptions(%s)" % ", ".join(
11221
+ k + "=" + repr(v) for k, v in self._values.items()
11222
+ )
11223
+
11224
+
11104
11225
  @jsii.data_type(
11105
11226
  jsii_type="aws-cdk-lib.aws_iam.RoleProps",
11106
11227
  jsii_struct_bases=[],
@@ -13568,6 +13689,40 @@ class Role(
13568
13689
 
13569
13690
  return typing.cast(None, jsii.sinvoke(cls, "customizeRoles", [scope, options]))
13570
13691
 
13692
+ @jsii.member(jsii_name="fromLookup")
13693
+ @builtins.classmethod
13694
+ def from_lookup(
13695
+ cls,
13696
+ scope: _constructs_77d1e7e8.Construct,
13697
+ id: builtins.str,
13698
+ *,
13699
+ role_name: builtins.str,
13700
+ add_grants_to_resources: typing.Optional[builtins.bool] = None,
13701
+ default_policy_name: typing.Optional[builtins.str] = None,
13702
+ mutable: typing.Optional[builtins.bool] = None,
13703
+ ) -> IRole:
13704
+ '''Lookup an existing Role.
13705
+
13706
+ :param scope: -
13707
+ :param id: -
13708
+ :param role_name: The name of the role to lookup. If the role you want to lookup is a service role, you need to specify the role name without the 'service-role' prefix. For example, if the role arn is 'arn:aws:iam::123456789012:role/service-role/ExampleServiceExecutionRole', you need to specify the role name as 'ExampleServiceExecutionRole'.
13709
+ :param add_grants_to_resources: For immutable roles: add grants to resources instead of dropping them. If this is ``false`` or not specified, grant permissions added to this role are ignored. It is your own responsibility to make sure the role has the required permissions. If this is ``true``, any grant permissions will be added to the resource instead. Default: false
13710
+ :param default_policy_name: Any policies created by this role will use this value as their ID, if specified. Specify this if importing the same role in multiple stacks, and granting it different permissions in at least two stacks. If this is not specified (or if the same name is specified in more than one stack), a CloudFormation issue will result in the policy created in whichever stack is deployed last overwriting the policies created by the others. Default: 'Policy'
13711
+ :param mutable: Whether the imported role can be modified by attaching policy resources to it. Default: true
13712
+ '''
13713
+ if __debug__:
13714
+ type_hints = typing.get_type_hints(_typecheckingstub__bb04fc568ec6668a9d1d9742e44b19ae3793417172af39b9989724471935e6d7)
13715
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
13716
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
13717
+ options = RoleLookupOptions(
13718
+ role_name=role_name,
13719
+ add_grants_to_resources=add_grants_to_resources,
13720
+ default_policy_name=default_policy_name,
13721
+ mutable=mutable,
13722
+ )
13723
+
13724
+ return typing.cast(IRole, jsii.sinvoke(cls, "fromLookup", [scope, id, options]))
13725
+
13571
13726
  @jsii.member(jsii_name="fromRoleArn")
13572
13727
  @builtins.classmethod
13573
13728
  def from_role_arn(
@@ -15399,6 +15554,7 @@ __all__ = [
15399
15554
  "PrincipalPolicyFragment",
15400
15555
  "PrincipalWithConditions",
15401
15556
  "Role",
15557
+ "RoleLookupOptions",
15402
15558
  "RoleProps",
15403
15559
  "SamlConsolePrincipal",
15404
15560
  "SamlMetadataDocument",
@@ -17021,6 +17177,16 @@ def _typecheckingstub__278426b331a0d887bf9449f77f6f9c562033abef58a3d7279c5604a1e
17021
17177
  """Type checking stubs"""
17022
17178
  pass
17023
17179
 
17180
+ def _typecheckingstub__06f459857ae55dc3473fba5b10ef4188eca762038ac741736a6d4b8cac006356(
17181
+ *,
17182
+ add_grants_to_resources: typing.Optional[builtins.bool] = None,
17183
+ default_policy_name: typing.Optional[builtins.str] = None,
17184
+ mutable: typing.Optional[builtins.bool] = None,
17185
+ role_name: builtins.str,
17186
+ ) -> None:
17187
+ """Type checking stubs"""
17188
+ pass
17189
+
17024
17190
  def _typecheckingstub__9c9223cb9fa6dff45ee4fd7013629ab18542c2499a83f542c5405968fad2287c(
17025
17191
  *,
17026
17192
  assumed_by: IPrincipal,
@@ -17364,6 +17530,18 @@ def _typecheckingstub__3abda5df0b9e172ab6b6506372119fbc1518a3e56245c4130fbbbd573
17364
17530
  """Type checking stubs"""
17365
17531
  pass
17366
17532
 
17533
+ def _typecheckingstub__bb04fc568ec6668a9d1d9742e44b19ae3793417172af39b9989724471935e6d7(
17534
+ scope: _constructs_77d1e7e8.Construct,
17535
+ id: builtins.str,
17536
+ *,
17537
+ role_name: builtins.str,
17538
+ add_grants_to_resources: typing.Optional[builtins.bool] = None,
17539
+ default_policy_name: typing.Optional[builtins.str] = None,
17540
+ mutable: typing.Optional[builtins.bool] = None,
17541
+ ) -> None:
17542
+ """Type checking stubs"""
17543
+ pass
17544
+
17367
17545
  def _typecheckingstub__5c43d6c30d91c1507a4d83080c4d03e80839da9ab22909456251bc529eb41a48(
17368
17546
  scope: _constructs_77d1e7e8.Construct,
17369
17547
  id: builtins.str,
@@ -806,14 +806,22 @@ class CapacityConfig:
806
806
 
807
807
  Example::
808
808
 
809
+ import aws_cdk.aws_opensearchservice as opensearch
810
+
811
+
809
812
  domain = Domain(self, "Domain",
810
- version=EngineVersion.OPENSEARCH_1_0,
811
- capacity=CapacityConfig(
812
- master_nodes=2,
813
- warm_nodes=2,
814
- warm_instance_type="ultrawarm1.medium.search"
815
- ),
816
- cold_storage_enabled=True
813
+ version=EngineVersion.OPENSEARCH_1_3,
814
+ capacity=opensearch.CapacityConfig(
815
+ node_options=[opensearch.NodeOptions(
816
+ node_type=opensearch.NodeType.COORDINATOR,
817
+ node_config=opensearch.NodeConfig(
818
+ enabled=True,
819
+ count=2,
820
+ type="m5.large.search"
821
+ )
822
+ )
823
+ ]
824
+ )
817
825
  )
818
826
  '''
819
827
  if __debug__:
@@ -6269,14 +6277,19 @@ class EbsOptions:
6269
6277
  Example::
6270
6278
 
6271
6279
  domain = Domain(self, "Domain",
6272
- version=EngineVersion.OPENSEARCH_1_0,
6280
+ version=EngineVersion.OPENSEARCH_1_3,
6273
6281
  ebs=EbsOptions(
6274
- volume_size=100,
6275
- volume_type=ec2.EbsDeviceVolumeType.GENERAL_PURPOSE_SSD
6282
+ volume_size=10,
6283
+ volume_type=ec2.EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3
6276
6284
  ),
6277
- node_to_node_encryption=True,
6278
- encryption_at_rest=EncryptionAtRestOptions(
6279
- enabled=True
6285
+ zone_awareness=ZoneAwarenessConfig(
6286
+ enabled=True,
6287
+ availability_zone_count=3
6288
+ ),
6289
+ capacity=CapacityConfig(
6290
+ multi_az_with_standby_enabled=True,
6291
+ master_nodes=3,
6292
+ data_nodes=3
6280
6293
  )
6281
6294
  )
6282
6295
  '''
@@ -6391,22 +6404,29 @@ class EncryptionAtRestOptions:
6391
6404
 
6392
6405
  Example::
6393
6406
 
6394
- domain = Domain(self, "Domain",
6395
- version=EngineVersion.OPENSEARCH_1_0,
6396
- enforce_https=True,
6397
- node_to_node_encryption=True,
6398
- encryption_at_rest=EncryptionAtRestOptions(
6407
+ import aws_cdk.aws_opensearchservice as opensearch
6408
+
6409
+
6410
+ domain = opensearch.Domain(self, "Domain",
6411
+ version=opensearch.EngineVersion.OPENSEARCH_2_17,
6412
+ encryption_at_rest=opensearch.EncryptionAtRestOptions(
6399
6413
  enabled=True
6400
6414
  ),
6401
- fine_grained_access_control=AdvancedSecurityOptions(
6402
- master_user_name="master-user",
6403
- saml_authentication_enabled=True,
6404
- saml_authentication_options=SAMLOptionsProperty(
6405
- idp_entity_id="entity-id",
6406
- idp_metadata_content="metadata-content-with-quotes-escaped"
6407
- )
6415
+ node_to_node_encryption=True,
6416
+ enforce_https=True,
6417
+ capacity=opensearch.CapacityConfig(
6418
+ multi_az_with_standby_enabled=False
6419
+ ),
6420
+ ebs=opensearch.EbsOptions(
6421
+ enabled=True,
6422
+ volume_size=10
6408
6423
  )
6409
6424
  )
6425
+ api = appsync.EventApi(self, "EventApiOpenSearch",
6426
+ api_name="OpenSearchEventApi"
6427
+ )
6428
+
6429
+ data_source = api.add_open_search_data_source("opensearchds", domain)
6410
6430
  '''
6411
6431
  if __debug__:
6412
6432
  type_hints = typing.get_type_hints(_typecheckingstub__b5973f04ac98b9a2d9bddce35a01a16416d58b7f8a10bd553cfabe3909eb2523)
@@ -40462,6 +40462,12 @@ class SqlServerEngineVersion(
40462
40462
  '''Version "15.00.4420.2.v1".'''
40463
40463
  return typing.cast("SqlServerEngineVersion", jsii.sget(cls, "VER_15_00_4420_2_V1"))
40464
40464
 
40465
+ @jsii.python.classproperty
40466
+ @jsii.member(jsii_name="VER_15_00_4430_1_V1")
40467
+ def VER_15_00_4430_1_V1(cls) -> "SqlServerEngineVersion":
40468
+ '''Version "15.00.4430.1.v1".'''
40469
+ return typing.cast("SqlServerEngineVersion", jsii.sget(cls, "VER_15_00_4430_1_V1"))
40470
+
40465
40471
  @jsii.python.classproperty
40466
40472
  @jsii.member(jsii_name="VER_16")
40467
40473
  def VER_16(cls) -> "SqlServerEngineVersion":
@@ -40540,6 +40546,12 @@ class SqlServerEngineVersion(
40540
40546
  '''Version "16.00.4175.1.v1".'''
40541
40547
  return typing.cast("SqlServerEngineVersion", jsii.sget(cls, "VER_16_00_4175_1_V1"))
40542
40548
 
40549
+ @jsii.python.classproperty
40550
+ @jsii.member(jsii_name="VER_16_00_4185_3_V1")
40551
+ def VER_16_00_4185_3_V1(cls) -> "SqlServerEngineVersion":
40552
+ '''Version "16.00.4185.3.v1".'''
40553
+ return typing.cast("SqlServerEngineVersion", jsii.sget(cls, "VER_16_00_4185_3_V1"))
40554
+
40543
40555
  @builtins.property
40544
40556
  @jsii.member(jsii_name="sqlServerFullVersion")
40545
40557
  def sql_server_full_version(self) -> builtins.str:
@@ -4982,29 +4982,44 @@ class PrivateDnsNamespace(
4982
4982
  ):
4983
4983
  '''Define a Service Discovery HTTP Namespace.
4984
4984
 
4985
- :exampleMetadata: infused
4985
+ :exampleMetadata: lit=aws-servicediscovery/test/integ.service-with-private-dns-namespace.lit.ts infused
4986
4986
 
4987
4987
  Example::
4988
4988
 
4989
- # mesh: appmesh.Mesh
4990
- # Cloud Map service discovery is currently required for host ejection by outlier detection
4991
- vpc = ec2.Vpc(self, "vpc")
4992
- namespace = cloudmap.PrivateDnsNamespace(self, "test-namespace",
4993
- vpc=vpc,
4994
- name="domain.local"
4989
+ import aws_cdk.aws_ec2 as ec2
4990
+ import aws_cdk.aws_elasticloadbalancingv2 as elbv2
4991
+ import aws_cdk as cdk
4992
+ import aws_cdk as servicediscovery
4993
+
4994
+ app = cdk.App()
4995
+ stack = cdk.Stack(app, "aws-servicediscovery-integ")
4996
+
4997
+ vpc = ec2.Vpc(stack, "Vpc", max_azs=2)
4998
+
4999
+ namespace = servicediscovery.PrivateDnsNamespace(stack, "Namespace",
5000
+ name="boobar.com",
5001
+ vpc=vpc
4995
5002
  )
4996
- service = namespace.create_service("Svc")
4997
- node = mesh.add_virtual_node("virtual-node",
4998
- service_discovery=appmesh.ServiceDiscovery.cloud_map(service),
4999
- listeners=[appmesh.VirtualNodeListener.http(
5000
- outlier_detection=appmesh.OutlierDetection(
5001
- base_ejection_duration=Duration.seconds(10),
5002
- interval=Duration.seconds(30),
5003
- max_ejection_percent=50,
5004
- max_server_errors=5
5005
- )
5006
- )]
5003
+
5004
+ service = namespace.create_service("Service",
5005
+ dns_record_type=servicediscovery.DnsRecordType.A_AAAA,
5006
+ dns_ttl=cdk.Duration.seconds(30),
5007
+ load_balancer=True
5007
5008
  )
5009
+
5010
+ loadbalancer = elbv2.ApplicationLoadBalancer(stack, "LB", vpc=vpc, internet_facing=True)
5011
+
5012
+ service.register_load_balancer("Loadbalancer", loadbalancer)
5013
+
5014
+ arn_service = namespace.create_service("ArnService",
5015
+ discovery_type=servicediscovery.DiscoveryType.API
5016
+ )
5017
+
5018
+ arn_service.register_non_ip_instance("NonIpInstance",
5019
+ custom_attributes={"arn": "arn://"}
5020
+ )
5021
+
5022
+ app.synth()
5008
5023
  '''
5009
5024
 
5010
5025
  def __init__(
@@ -5259,29 +5274,44 @@ class PrivateDnsNamespaceProps(BaseNamespaceProps):
5259
5274
  :param description: A description of the Namespace. Default: none
5260
5275
  :param vpc: The Amazon VPC that you want to associate the namespace with.
5261
5276
 
5262
- :exampleMetadata: infused
5277
+ :exampleMetadata: lit=aws-servicediscovery/test/integ.service-with-private-dns-namespace.lit.ts infused
5263
5278
 
5264
5279
  Example::
5265
5280
 
5266
- # mesh: appmesh.Mesh
5267
- # Cloud Map service discovery is currently required for host ejection by outlier detection
5268
- vpc = ec2.Vpc(self, "vpc")
5269
- namespace = cloudmap.PrivateDnsNamespace(self, "test-namespace",
5270
- vpc=vpc,
5271
- name="domain.local"
5281
+ import aws_cdk.aws_ec2 as ec2
5282
+ import aws_cdk.aws_elasticloadbalancingv2 as elbv2
5283
+ import aws_cdk as cdk
5284
+ import aws_cdk as servicediscovery
5285
+
5286
+ app = cdk.App()
5287
+ stack = cdk.Stack(app, "aws-servicediscovery-integ")
5288
+
5289
+ vpc = ec2.Vpc(stack, "Vpc", max_azs=2)
5290
+
5291
+ namespace = servicediscovery.PrivateDnsNamespace(stack, "Namespace",
5292
+ name="boobar.com",
5293
+ vpc=vpc
5272
5294
  )
5273
- service = namespace.create_service("Svc")
5274
- node = mesh.add_virtual_node("virtual-node",
5275
- service_discovery=appmesh.ServiceDiscovery.cloud_map(service),
5276
- listeners=[appmesh.VirtualNodeListener.http(
5277
- outlier_detection=appmesh.OutlierDetection(
5278
- base_ejection_duration=Duration.seconds(10),
5279
- interval=Duration.seconds(30),
5280
- max_ejection_percent=50,
5281
- max_server_errors=5
5282
- )
5283
- )]
5295
+
5296
+ service = namespace.create_service("Service",
5297
+ dns_record_type=servicediscovery.DnsRecordType.A_AAAA,
5298
+ dns_ttl=cdk.Duration.seconds(30),
5299
+ load_balancer=True
5300
+ )
5301
+
5302
+ loadbalancer = elbv2.ApplicationLoadBalancer(stack, "LB", vpc=vpc, internet_facing=True)
5303
+
5304
+ service.register_load_balancer("Loadbalancer", loadbalancer)
5305
+
5306
+ arn_service = namespace.create_service("ArnService",
5307
+ discovery_type=servicediscovery.DiscoveryType.API
5284
5308
  )
5309
+
5310
+ arn_service.register_non_ip_instance("NonIpInstance",
5311
+ custom_attributes={"arn": "arn://"}
5312
+ )
5313
+
5314
+ app.synth()
5285
5315
  '''
5286
5316
  if __debug__:
5287
5317
  type_hints = typing.get_type_hints(_typecheckingstub__f5a438cb76c40139835b65e440e9010402611db76baf5e4c500427a16a0b00e7)
@@ -310,6 +310,21 @@ identity = ses.EmailIdentity(self, "Identity",
310
310
  identity.grant_send_email(user)
311
311
  ```
312
312
 
313
+ You can also reference an existing email identity using its ARN and grant permissions to it:
314
+
315
+ ```python
316
+ import aws_cdk.aws_iam as iam
317
+ # user: iam.User
318
+
319
+
320
+ # Imports an existing email identity using its ARN.
321
+ # This is one way to reference an existing identity; another option is using its name via fromEmailIdentityName.
322
+ imported_identity = ses.EmailIdentity.from_email_identity_arn(self, "ImportedIdentity", "arn:aws:ses:us-east-1:123456789012:identity/example.com")
323
+
324
+ # Grant send email permission to the imported identity
325
+ imported_identity.grant_send_email(user)
326
+ ```
327
+
313
328
  ### Virtual Deliverability Manager (VDM)
314
329
 
315
330
  Virtual Deliverability Manager is an Amazon SES feature that helps you enhance email deliverability,
@@ -17359,6 +17374,27 @@ class EmailIdentity(
17359
17374
 
17360
17375
  jsii.create(self.__class__, self, [scope, id, props])
17361
17376
 
17377
+ @jsii.member(jsii_name="fromEmailIdentityArn")
17378
+ @builtins.classmethod
17379
+ def from_email_identity_arn(
17380
+ cls,
17381
+ scope: _constructs_77d1e7e8.Construct,
17382
+ id: builtins.str,
17383
+ email_identity_arn: builtins.str,
17384
+ ) -> IEmailIdentity:
17385
+ '''Import an email identity by ARN.
17386
+
17387
+ :param scope: -
17388
+ :param id: -
17389
+ :param email_identity_arn: -
17390
+ '''
17391
+ if __debug__:
17392
+ type_hints = typing.get_type_hints(_typecheckingstub__2de9549a4fca6f40216fb37a5702ca1bed885d852e1611aee32de9a296311f79)
17393
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
17394
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
17395
+ check_type(argname="argument email_identity_arn", value=email_identity_arn, expected_type=type_hints["email_identity_arn"])
17396
+ return typing.cast(IEmailIdentity, jsii.sinvoke(cls, "fromEmailIdentityArn", [scope, id, email_identity_arn]))
17397
+
17362
17398
  @jsii.member(jsii_name="fromEmailIdentityName")
17363
17399
  @builtins.classmethod
17364
17400
  def from_email_identity_name(
@@ -19686,6 +19722,14 @@ def _typecheckingstub__a0d44bf733be67b29d51a6c681c3faafee6103884474147b68d4b466a
19686
19722
  """Type checking stubs"""
19687
19723
  pass
19688
19724
 
19725
+ def _typecheckingstub__2de9549a4fca6f40216fb37a5702ca1bed885d852e1611aee32de9a296311f79(
19726
+ scope: _constructs_77d1e7e8.Construct,
19727
+ id: builtins.str,
19728
+ email_identity_arn: builtins.str,
19729
+ ) -> None:
19730
+ """Type checking stubs"""
19731
+ pass
19732
+
19689
19733
  def _typecheckingstub__eb1cb50e69249e3f61387a80db0e14cc9a9790c024548390466a511484409a85(
19690
19734
  scope: _constructs_77d1e7e8.Construct,
19691
19735
  id: builtins.str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aws-cdk-lib
3
- Version: 2.191.0
3
+ Version: 2.193.0
4
4
  Summary: Version 2 of the AWS Cloud Development Kit library
5
5
  Home-page: https://github.com/aws/aws-cdk
6
6
  Author: Amazon Web Services