aws-cdk-lib 2.186.0__py3-none-any.whl → 2.188.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 (85) hide show
  1. aws_cdk/__init__.py +303 -119
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.186.0.jsii.tgz → aws-cdk-lib@2.188.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_amplify/__init__.py +136 -0
  5. aws_cdk/aws_apigateway/__init__.py +69 -17
  6. aws_cdk/aws_apigatewayv2/__init__.py +88 -0
  7. aws_cdk/aws_appconfig/__init__.py +30 -14
  8. aws_cdk/aws_appsync/__init__.py +14 -5
  9. aws_cdk/aws_arczonalshift/__init__.py +4 -4
  10. aws_cdk/aws_bedrock/__init__.py +637 -32
  11. aws_cdk/aws_budgets/__init__.py +8 -8
  12. aws_cdk/aws_cassandra/__init__.py +4 -2
  13. aws_cdk/aws_ce/__init__.py +2 -2
  14. aws_cdk/aws_cloudformation/__init__.py +3 -3
  15. aws_cdk/aws_cloudfront/__init__.py +11 -0
  16. aws_cdk/aws_cloudtrail/__init__.py +4 -18
  17. aws_cdk/aws_cloudwatch/__init__.py +50 -50
  18. aws_cdk/aws_codebuild/__init__.py +32 -1
  19. aws_cdk/aws_codepipeline/__init__.py +47 -32
  20. aws_cdk/aws_codepipeline_actions/__init__.py +2786 -1042
  21. aws_cdk/aws_codestarnotifications/__init__.py +16 -16
  22. aws_cdk/aws_cognito/__init__.py +8 -2
  23. aws_cdk/aws_config/__init__.py +2 -5
  24. aws_cdk/aws_datazone/__init__.py +287 -226
  25. aws_cdk/aws_detective/__init__.py +3 -3
  26. aws_cdk/aws_dynamodb/__init__.py +37 -0
  27. aws_cdk/aws_ec2/__init__.py +2448 -442
  28. aws_cdk/aws_ecr/__init__.py +143 -0
  29. aws_cdk/aws_ecr_assets/__init__.py +115 -4
  30. aws_cdk/aws_ecs/__init__.py +51 -0
  31. aws_cdk/aws_eks/__init__.py +222 -6
  32. aws_cdk/aws_events/__init__.py +8 -11
  33. aws_cdk/aws_events_targets/__init__.py +136 -0
  34. aws_cdk/aws_forecast/__init__.py +1 -1
  35. aws_cdk/aws_fsx/__init__.py +2 -2
  36. aws_cdk/aws_gamelift/__init__.py +11 -11
  37. aws_cdk/aws_iam/__init__.py +6 -4
  38. aws_cdk/aws_identitystore/__init__.py +6 -4
  39. aws_cdk/aws_iotsitewise/__init__.py +623 -0
  40. aws_cdk/aws_kinesisfirehose/__init__.py +38 -0
  41. aws_cdk/aws_kms/__init__.py +10 -11
  42. aws_cdk/aws_lakeformation/__init__.py +3 -3
  43. aws_cdk/aws_lambda/__init__.py +105 -4
  44. aws_cdk/aws_lambda_event_sources/__init__.py +87 -25
  45. aws_cdk/aws_lambda_nodejs/__init__.py +5 -24
  46. aws_cdk/aws_lex/__init__.py +985 -5
  47. aws_cdk/aws_logs/__init__.py +18 -0
  48. aws_cdk/aws_logs_destinations/__init__.py +146 -0
  49. aws_cdk/aws_mediaconnect/__init__.py +714 -290
  50. aws_cdk/aws_mwaa/__init__.py +9 -9
  51. aws_cdk/aws_networkfirewall/__init__.py +44 -0
  52. aws_cdk/aws_notifications/__init__.py +4 -4
  53. aws_cdk/aws_omics/__init__.py +225 -1
  54. aws_cdk/aws_opensearchserverless/__init__.py +31 -23
  55. aws_cdk/aws_organizations/__init__.py +1 -1
  56. aws_cdk/aws_pcaconnectorad/__init__.py +3 -2
  57. aws_cdk/aws_quicksight/__init__.py +268 -50
  58. aws_cdk/aws_rds/__init__.py +186 -10
  59. aws_cdk/aws_route53/__init__.py +5 -5
  60. aws_cdk/aws_route53recoverycontrol/__init__.py +41 -2
  61. aws_cdk/aws_rum/__init__.py +13 -10
  62. aws_cdk/aws_s3/__init__.py +3 -6
  63. aws_cdk/aws_s3_assets/__init__.py +70 -1
  64. aws_cdk/aws_s3_deployment/__init__.py +4 -0
  65. aws_cdk/aws_sagemaker/__init__.py +47 -4
  66. aws_cdk/aws_scheduler_targets/__init__.py +4 -16
  67. aws_cdk/aws_securitylake/__init__.py +2 -2
  68. aws_cdk/aws_servicecatalog/__init__.py +4 -0
  69. aws_cdk/aws_sns/__init__.py +1 -1
  70. aws_cdk/aws_ssmincidents/__init__.py +10 -10
  71. aws_cdk/aws_stepfunctions/__init__.py +23 -17
  72. aws_cdk/aws_stepfunctions_tasks/__init__.py +4 -0
  73. aws_cdk/aws_synthetics/__init__.py +9 -0
  74. aws_cdk/aws_systemsmanagersap/__init__.py +160 -0
  75. aws_cdk/aws_transfer/__init__.py +19 -10
  76. aws_cdk/aws_wafv2/__init__.py +512 -1141
  77. aws_cdk/cloud_assembly_schema/__init__.py +60 -10
  78. aws_cdk/cx_api/__init__.py +38 -2
  79. aws_cdk/pipelines/__init__.py +52 -2
  80. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.188.0.dist-info}/METADATA +4 -4
  81. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.188.0.dist-info}/RECORD +85 -85
  82. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.188.0.dist-info}/WHEEL +1 -1
  83. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.188.0.dist-info}/LICENSE +0 -0
  84. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.188.0.dist-info}/NOTICE +0 -0
  85. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.188.0.dist-info}/top_level.txt +0 -0
@@ -220,6 +220,26 @@ repository.add_to_resource_policy(iam.PolicyStatement(
220
220
  ))
221
221
  ```
222
222
 
223
+ ## import existing repository
224
+
225
+ You can import an existing repository into your CDK app using the `Repository.fromRepositoryArn`, `Repository.fromRepositoryName` or `Repository.fromLookup` method.
226
+ These methods take the ARN or the name of the repository and returns an `IRepository` object.
227
+
228
+ ```python
229
+ # import using repository name
230
+ repository_from_name = ecr.Repository.from_repository_name(self, "ImportedRepoByName", "my-repo-name")
231
+
232
+ # import using repository ARN
233
+ repository_from_arn = ecr.Repository.from_repository_arn(self, "ImportedRepoByArn", "arn:aws:ecr:us-east-1:123456789012:repository/my-repo-name")
234
+
235
+ # import using repository lookup
236
+ # You have to provide either `repositoryArn` or `repositoryName` to lookup the repository
237
+ repository_from_lookup = ecr.Repository.from_lookup(self, "ImportedRepoByLookup",
238
+ repository_arn="arn:aws:ecr:us-east-1:123456789012:repository/my-repo-name",
239
+ repository_name="my-repo-name"
240
+ )
241
+ ```
242
+
223
243
  ## CloudWatch event rules
224
244
 
225
245
  You can publish repository events to a CloudWatch event rule with `onEvent`:
@@ -4592,6 +4612,83 @@ class RepositoryEncryption(
4592
4612
  return typing.cast(builtins.str, jsii.get(self, "value"))
4593
4613
 
4594
4614
 
4615
+ @jsii.data_type(
4616
+ jsii_type="aws-cdk-lib.aws_ecr.RepositoryLookupOptions",
4617
+ jsii_struct_bases=[],
4618
+ name_mapping={
4619
+ "repository_arn": "repositoryArn",
4620
+ "repository_name": "repositoryName",
4621
+ },
4622
+ )
4623
+ class RepositoryLookupOptions:
4624
+ def __init__(
4625
+ self,
4626
+ *,
4627
+ repository_arn: typing.Optional[builtins.str] = None,
4628
+ repository_name: typing.Optional[builtins.str] = None,
4629
+ ) -> None:
4630
+ '''Properties for looking up an existing Repository.
4631
+
4632
+ :param repository_arn: The ARN of the repository. Default: - Do not filter on repository ARN
4633
+ :param repository_name: The name of the repository. Default: - Do not filter on repository name
4634
+
4635
+ :exampleMetadata: infused
4636
+
4637
+ Example::
4638
+
4639
+ # import using repository name
4640
+ repository_from_name = ecr.Repository.from_repository_name(self, "ImportedRepoByName", "my-repo-name")
4641
+
4642
+ # import using repository ARN
4643
+ repository_from_arn = ecr.Repository.from_repository_arn(self, "ImportedRepoByArn", "arn:aws:ecr:us-east-1:123456789012:repository/my-repo-name")
4644
+
4645
+ # import using repository lookup
4646
+ # You have to provide either `repositoryArn` or `repositoryName` to lookup the repository
4647
+ repository_from_lookup = ecr.Repository.from_lookup(self, "ImportedRepoByLookup",
4648
+ repository_arn="arn:aws:ecr:us-east-1:123456789012:repository/my-repo-name",
4649
+ repository_name="my-repo-name"
4650
+ )
4651
+ '''
4652
+ if __debug__:
4653
+ type_hints = typing.get_type_hints(_typecheckingstub__a658f6a6920e4ade279233d8cf708713d19d0c9d50f843184a34d0f926b41442)
4654
+ check_type(argname="argument repository_arn", value=repository_arn, expected_type=type_hints["repository_arn"])
4655
+ check_type(argname="argument repository_name", value=repository_name, expected_type=type_hints["repository_name"])
4656
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
4657
+ if repository_arn is not None:
4658
+ self._values["repository_arn"] = repository_arn
4659
+ if repository_name is not None:
4660
+ self._values["repository_name"] = repository_name
4661
+
4662
+ @builtins.property
4663
+ def repository_arn(self) -> typing.Optional[builtins.str]:
4664
+ '''The ARN of the repository.
4665
+
4666
+ :default: - Do not filter on repository ARN
4667
+ '''
4668
+ result = self._values.get("repository_arn")
4669
+ return typing.cast(typing.Optional[builtins.str], result)
4670
+
4671
+ @builtins.property
4672
+ def repository_name(self) -> typing.Optional[builtins.str]:
4673
+ '''The name of the repository.
4674
+
4675
+ :default: - Do not filter on repository name
4676
+ '''
4677
+ result = self._values.get("repository_name")
4678
+ return typing.cast(typing.Optional[builtins.str], result)
4679
+
4680
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
4681
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
4682
+
4683
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
4684
+ return not (rhs == self)
4685
+
4686
+ def __repr__(self) -> str:
4687
+ return "RepositoryLookupOptions(%s)" % ", ".join(
4688
+ k + "=" + repr(v) for k, v in self._values.items()
4689
+ )
4690
+
4691
+
4595
4692
  @jsii.data_type(
4596
4693
  jsii_type="aws-cdk-lib.aws_ecr.RepositoryProps",
4597
4694
  jsii_struct_bases=[],
@@ -4929,6 +5026,33 @@ class Repository(
4929
5026
  check_type(argname="argument account", value=account, expected_type=type_hints["account"])
4930
5027
  return typing.cast(builtins.str, jsii.sinvoke(cls, "arnForLocalRepository", [repository_name, scope, account]))
4931
5028
 
5029
+ @jsii.member(jsii_name="fromLookup")
5030
+ @builtins.classmethod
5031
+ def from_lookup(
5032
+ cls,
5033
+ scope: _constructs_77d1e7e8.Construct,
5034
+ id: builtins.str,
5035
+ *,
5036
+ repository_arn: typing.Optional[builtins.str] = None,
5037
+ repository_name: typing.Optional[builtins.str] = None,
5038
+ ) -> IRepository:
5039
+ '''Lookup an existing repository.
5040
+
5041
+ :param scope: -
5042
+ :param id: -
5043
+ :param repository_arn: The ARN of the repository. Default: - Do not filter on repository ARN
5044
+ :param repository_name: The name of the repository. Default: - Do not filter on repository name
5045
+ '''
5046
+ if __debug__:
5047
+ type_hints = typing.get_type_hints(_typecheckingstub__d54cc6352f8c9a17166980b2836dc621d78b7af64b87c2ed63ad8a9c274f3591)
5048
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
5049
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
5050
+ options = RepositoryLookupOptions(
5051
+ repository_arn=repository_arn, repository_name=repository_name
5052
+ )
5053
+
5054
+ return typing.cast(IRepository, jsii.sinvoke(cls, "fromLookup", [scope, id, options]))
5055
+
4932
5056
  @jsii.member(jsii_name="fromRepositoryArn")
4933
5057
  @builtins.classmethod
4934
5058
  def from_repository_arn(
@@ -5087,6 +5211,7 @@ __all__ = [
5087
5211
  "RepositoryAttributes",
5088
5212
  "RepositoryBase",
5089
5213
  "RepositoryEncryption",
5214
+ "RepositoryLookupOptions",
5090
5215
  "RepositoryProps",
5091
5216
  "TagMutability",
5092
5217
  "TagStatus",
@@ -5840,6 +5965,14 @@ def _typecheckingstub__144b557444508fc0a954f4a654cd03105778da2972bab34f799be4e54
5840
5965
  """Type checking stubs"""
5841
5966
  pass
5842
5967
 
5968
+ def _typecheckingstub__a658f6a6920e4ade279233d8cf708713d19d0c9d50f843184a34d0f926b41442(
5969
+ *,
5970
+ repository_arn: typing.Optional[builtins.str] = None,
5971
+ repository_name: typing.Optional[builtins.str] = None,
5972
+ ) -> None:
5973
+ """Type checking stubs"""
5974
+ pass
5975
+
5843
5976
  def _typecheckingstub__638b63dd5eb589e01019ee47c63d6335810d02b0d769f767f2bf2fddc285af28(
5844
5977
  *,
5845
5978
  auto_delete_images: typing.Optional[builtins.bool] = None,
@@ -5882,6 +6015,16 @@ def _typecheckingstub__50aa60495dfd0ac59e7bbbb1d22e4d7dd496bad018fa9790d09cb317d
5882
6015
  """Type checking stubs"""
5883
6016
  pass
5884
6017
 
6018
+ def _typecheckingstub__d54cc6352f8c9a17166980b2836dc621d78b7af64b87c2ed63ad8a9c274f3591(
6019
+ scope: _constructs_77d1e7e8.Construct,
6020
+ id: builtins.str,
6021
+ *,
6022
+ repository_arn: typing.Optional[builtins.str] = None,
6023
+ repository_name: typing.Optional[builtins.str] = None,
6024
+ ) -> None:
6025
+ """Type checking stubs"""
6026
+ pass
6027
+
5885
6028
  def _typecheckingstub__eb580f927f8776b0abfc35ebe773b5e9b7f5332fd46fd5a456e0b23e497c660e(
5886
6029
  scope: _constructs_77d1e7e8.Construct,
5887
6030
  id: builtins.str,
@@ -14,7 +14,10 @@ from aws_cdk.aws_ecr_assets import DockerImageAsset
14
14
 
15
15
 
16
16
  asset = DockerImageAsset(self, "MyBuildImage",
17
- directory=path.join(__dirname, "my-image")
17
+ directory=path.join(__dirname, "my-image"),
18
+
19
+ # Optional: describe the purpose of the asset with a human-readable string
20
+ display_name="Source for my function"
18
21
  )
19
22
  ```
20
23
 
@@ -395,6 +398,7 @@ class DockerImageAsset(
395
398
  cache_disabled: typing.Optional[builtins.bool] = None,
396
399
  cache_from: typing.Optional[typing.Sequence[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]]] = None,
397
400
  cache_to: typing.Optional[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]] = None,
401
+ display_name: typing.Optional[builtins.str] = None,
398
402
  file: typing.Optional[builtins.str] = None,
399
403
  invalidation: typing.Optional[typing.Union["DockerImageAssetInvalidationOptions", typing.Dict[builtins.str, typing.Any]]] = None,
400
404
  network_mode: typing.Optional["NetworkMode"] = None,
@@ -417,6 +421,7 @@ class DockerImageAsset(
417
421
  :param cache_disabled: Disable the cache and pass ``--no-cache`` to the ``docker build`` command. Default: - cache is used
418
422
  :param cache_from: Cache from options to pass to the ``docker build`` command. Default: - no cache from options are passed to the build command
419
423
  :param cache_to: Cache to options to pass to the ``docker build`` command. Default: - no cache to options are passed to the build command
424
+ :param display_name: A display name for this asset. If supplied, the display name will be used in locations where the asset identifier is printed, like in the CLI progress information. If the same asset is added multiple times, the display name of the first occurrence is used. If ``assetName`` is given, it will also be used as the default ``displayName``. Otherwise, the default is the construct path of the ImageAsset construct, with respect to the enclosing stack. If the asset is produced by a construct helper function (such as ``lambda.Code.fromAssetImage()``), this will look like ``MyFunction/AssetImage``. We use the stack-relative construct path so that in the common case where you have multiple stacks with the same asset, we won't show something like ``/MyBetaStack/MyFunction/Code`` when you are actually deploying to production. Default: - Stack-relative construct path
420
425
  :param file: Path to the Dockerfile (relative to the directory). Default: 'Dockerfile'
421
426
  :param invalidation: Options to control which parameters are used to invalidate the asset hash. Default: - hash all parameters
422
427
  :param network_mode: Networking mode for the RUN commands during build. Support docker API 1.25+. Default: - no networking mode specified (the default networking mode ``NetworkMode.DEFAULT`` will be used)
@@ -441,6 +446,7 @@ class DockerImageAsset(
441
446
  cache_disabled=cache_disabled,
442
447
  cache_from=cache_from,
443
448
  cache_to=cache_to,
449
+ display_name=display_name,
444
450
  file=file,
445
451
  invalidation=invalidation,
446
452
  network_mode=network_mode,
@@ -744,6 +750,7 @@ class DockerImageAssetInvalidationOptions:
744
750
  "cache_disabled": "cacheDisabled",
745
751
  "cache_from": "cacheFrom",
746
752
  "cache_to": "cacheTo",
753
+ "display_name": "displayName",
747
754
  "file": "file",
748
755
  "invalidation": "invalidation",
749
756
  "network_mode": "networkMode",
@@ -767,6 +774,7 @@ class DockerImageAssetOptions(_FileFingerprintOptions_115b8b51):
767
774
  cache_disabled: typing.Optional[builtins.bool] = None,
768
775
  cache_from: typing.Optional[typing.Sequence[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]]] = None,
769
776
  cache_to: typing.Optional[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]] = None,
777
+ display_name: typing.Optional[builtins.str] = None,
770
778
  file: typing.Optional[builtins.str] = None,
771
779
  invalidation: typing.Optional[typing.Union[DockerImageAssetInvalidationOptions, typing.Dict[builtins.str, typing.Any]]] = None,
772
780
  network_mode: typing.Optional["NetworkMode"] = None,
@@ -787,6 +795,7 @@ class DockerImageAssetOptions(_FileFingerprintOptions_115b8b51):
787
795
  :param cache_disabled: Disable the cache and pass ``--no-cache`` to the ``docker build`` command. Default: - cache is used
788
796
  :param cache_from: Cache from options to pass to the ``docker build`` command. Default: - no cache from options are passed to the build command
789
797
  :param cache_to: Cache to options to pass to the ``docker build`` command. Default: - no cache to options are passed to the build command
798
+ :param display_name: A display name for this asset. If supplied, the display name will be used in locations where the asset identifier is printed, like in the CLI progress information. If the same asset is added multiple times, the display name of the first occurrence is used. If ``assetName`` is given, it will also be used as the default ``displayName``. Otherwise, the default is the construct path of the ImageAsset construct, with respect to the enclosing stack. If the asset is produced by a construct helper function (such as ``lambda.Code.fromAssetImage()``), this will look like ``MyFunction/AssetImage``. We use the stack-relative construct path so that in the common case where you have multiple stacks with the same asset, we won't show something like ``/MyBetaStack/MyFunction/Code`` when you are actually deploying to production. Default: - Stack-relative construct path
790
799
  :param file: Path to the Dockerfile (relative to the directory). Default: 'Dockerfile'
791
800
  :param invalidation: Options to control which parameters are used to invalidate the asset hash. Default: - hash all parameters
792
801
  :param network_mode: Networking mode for the RUN commands during build. Support docker API 1.25+. Default: - no networking mode specified (the default networking mode ``NetworkMode.DEFAULT`` will be used)
@@ -832,6 +841,7 @@ class DockerImageAssetOptions(_FileFingerprintOptions_115b8b51):
832
841
  "params_key": "params"
833
842
  }
834
843
  ),
844
+ display_name="displayName",
835
845
  exclude=["exclude"],
836
846
  extra_hash="extraHash",
837
847
  file="file",
@@ -872,6 +882,7 @@ class DockerImageAssetOptions(_FileFingerprintOptions_115b8b51):
872
882
  check_type(argname="argument cache_disabled", value=cache_disabled, expected_type=type_hints["cache_disabled"])
873
883
  check_type(argname="argument cache_from", value=cache_from, expected_type=type_hints["cache_from"])
874
884
  check_type(argname="argument cache_to", value=cache_to, expected_type=type_hints["cache_to"])
885
+ check_type(argname="argument display_name", value=display_name, expected_type=type_hints["display_name"])
875
886
  check_type(argname="argument file", value=file, expected_type=type_hints["file"])
876
887
  check_type(argname="argument invalidation", value=invalidation, expected_type=type_hints["invalidation"])
877
888
  check_type(argname="argument network_mode", value=network_mode, expected_type=type_hints["network_mode"])
@@ -901,6 +912,8 @@ class DockerImageAssetOptions(_FileFingerprintOptions_115b8b51):
901
912
  self._values["cache_from"] = cache_from
902
913
  if cache_to is not None:
903
914
  self._values["cache_to"] = cache_to
915
+ if display_name is not None:
916
+ self._values["display_name"] = display_name
904
917
  if file is not None:
905
918
  self._values["file"] = file
906
919
  if invalidation is not None:
@@ -1045,6 +1058,31 @@ class DockerImageAssetOptions(_FileFingerprintOptions_115b8b51):
1045
1058
  result = self._values.get("cache_to")
1046
1059
  return typing.cast(typing.Optional[DockerCacheOption], result)
1047
1060
 
1061
+ @builtins.property
1062
+ def display_name(self) -> typing.Optional[builtins.str]:
1063
+ '''A display name for this asset.
1064
+
1065
+ If supplied, the display name will be used in locations where the asset
1066
+ identifier is printed, like in the CLI progress information. If the same
1067
+ asset is added multiple times, the display name of the first occurrence is
1068
+ used.
1069
+
1070
+ If ``assetName`` is given, it will also be used as the default ``displayName``.
1071
+ Otherwise, the default is the construct path of the ImageAsset construct,
1072
+ with respect to the enclosing stack. If the asset is produced by a
1073
+ construct helper function (such as ``lambda.Code.fromAssetImage()``), this
1074
+ will look like ``MyFunction/AssetImage``.
1075
+
1076
+ We use the stack-relative construct path so that in the common case where
1077
+ you have multiple stacks with the same asset, we won't show something like
1078
+ ``/MyBetaStack/MyFunction/Code`` when you are actually deploying to
1079
+ production.
1080
+
1081
+ :default: - Stack-relative construct path
1082
+ '''
1083
+ result = self._values.get("display_name")
1084
+ return typing.cast(typing.Optional[builtins.str], result)
1085
+
1048
1086
  @builtins.property
1049
1087
  def file(self) -> typing.Optional[builtins.str]:
1050
1088
  '''Path to the Dockerfile (relative to the directory).
@@ -1132,6 +1170,7 @@ class DockerImageAssetOptions(_FileFingerprintOptions_115b8b51):
1132
1170
  "cache_disabled": "cacheDisabled",
1133
1171
  "cache_from": "cacheFrom",
1134
1172
  "cache_to": "cacheTo",
1173
+ "display_name": "displayName",
1135
1174
  "file": "file",
1136
1175
  "invalidation": "invalidation",
1137
1176
  "network_mode": "networkMode",
@@ -1156,6 +1195,7 @@ class DockerImageAssetProps(DockerImageAssetOptions):
1156
1195
  cache_disabled: typing.Optional[builtins.bool] = None,
1157
1196
  cache_from: typing.Optional[typing.Sequence[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]]] = None,
1158
1197
  cache_to: typing.Optional[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]] = None,
1198
+ display_name: typing.Optional[builtins.str] = None,
1159
1199
  file: typing.Optional[builtins.str] = None,
1160
1200
  invalidation: typing.Optional[typing.Union[DockerImageAssetInvalidationOptions, typing.Dict[builtins.str, typing.Any]]] = None,
1161
1201
  network_mode: typing.Optional["NetworkMode"] = None,
@@ -1177,6 +1217,7 @@ class DockerImageAssetProps(DockerImageAssetOptions):
1177
1217
  :param cache_disabled: Disable the cache and pass ``--no-cache`` to the ``docker build`` command. Default: - cache is used
1178
1218
  :param cache_from: Cache from options to pass to the ``docker build`` command. Default: - no cache from options are passed to the build command
1179
1219
  :param cache_to: Cache to options to pass to the ``docker build`` command. Default: - no cache to options are passed to the build command
1220
+ :param display_name: A display name for this asset. If supplied, the display name will be used in locations where the asset identifier is printed, like in the CLI progress information. If the same asset is added multiple times, the display name of the first occurrence is used. If ``assetName`` is given, it will also be used as the default ``displayName``. Otherwise, the default is the construct path of the ImageAsset construct, with respect to the enclosing stack. If the asset is produced by a construct helper function (such as ``lambda.Code.fromAssetImage()``), this will look like ``MyFunction/AssetImage``. We use the stack-relative construct path so that in the common case where you have multiple stacks with the same asset, we won't show something like ``/MyBetaStack/MyFunction/Code`` when you are actually deploying to production. Default: - Stack-relative construct path
1180
1221
  :param file: Path to the Dockerfile (relative to the directory). Default: 'Dockerfile'
1181
1222
  :param invalidation: Options to control which parameters are used to invalidate the asset hash. Default: - hash all parameters
1182
1223
  :param network_mode: Networking mode for the RUN commands during build. Support docker API 1.25+. Default: - no networking mode specified (the default networking mode ``NetworkMode.DEFAULT`` will be used)
@@ -1219,6 +1260,7 @@ class DockerImageAssetProps(DockerImageAssetOptions):
1219
1260
  check_type(argname="argument cache_disabled", value=cache_disabled, expected_type=type_hints["cache_disabled"])
1220
1261
  check_type(argname="argument cache_from", value=cache_from, expected_type=type_hints["cache_from"])
1221
1262
  check_type(argname="argument cache_to", value=cache_to, expected_type=type_hints["cache_to"])
1263
+ check_type(argname="argument display_name", value=display_name, expected_type=type_hints["display_name"])
1222
1264
  check_type(argname="argument file", value=file, expected_type=type_hints["file"])
1223
1265
  check_type(argname="argument invalidation", value=invalidation, expected_type=type_hints["invalidation"])
1224
1266
  check_type(argname="argument network_mode", value=network_mode, expected_type=type_hints["network_mode"])
@@ -1251,6 +1293,8 @@ class DockerImageAssetProps(DockerImageAssetOptions):
1251
1293
  self._values["cache_from"] = cache_from
1252
1294
  if cache_to is not None:
1253
1295
  self._values["cache_to"] = cache_to
1296
+ if display_name is not None:
1297
+ self._values["display_name"] = display_name
1254
1298
  if file is not None:
1255
1299
  self._values["file"] = file
1256
1300
  if invalidation is not None:
@@ -1395,6 +1439,31 @@ class DockerImageAssetProps(DockerImageAssetOptions):
1395
1439
  result = self._values.get("cache_to")
1396
1440
  return typing.cast(typing.Optional[DockerCacheOption], result)
1397
1441
 
1442
+ @builtins.property
1443
+ def display_name(self) -> typing.Optional[builtins.str]:
1444
+ '''A display name for this asset.
1445
+
1446
+ If supplied, the display name will be used in locations where the asset
1447
+ identifier is printed, like in the CLI progress information. If the same
1448
+ asset is added multiple times, the display name of the first occurrence is
1449
+ used.
1450
+
1451
+ If ``assetName`` is given, it will also be used as the default ``displayName``.
1452
+ Otherwise, the default is the construct path of the ImageAsset construct,
1453
+ with respect to the enclosing stack. If the asset is produced by a
1454
+ construct helper function (such as ``lambda.Code.fromAssetImage()``), this
1455
+ will look like ``MyFunction/AssetImage``.
1456
+
1457
+ We use the stack-relative construct path so that in the common case where
1458
+ you have multiple stacks with the same asset, we won't show something like
1459
+ ``/MyBetaStack/MyFunction/Code`` when you are actually deploying to
1460
+ production.
1461
+
1462
+ :default: - Stack-relative construct path
1463
+ '''
1464
+ result = self._values.get("display_name")
1465
+ return typing.cast(typing.Optional[builtins.str], result)
1466
+
1398
1467
  @builtins.property
1399
1468
  def file(self) -> typing.Optional[builtins.str]:
1400
1469
  '''Path to the Dockerfile (relative to the directory).
@@ -1622,17 +1691,21 @@ class TarballImageAsset(
1622
1691
  id: builtins.str,
1623
1692
  *,
1624
1693
  tarball_file: builtins.str,
1694
+ display_name: typing.Optional[builtins.str] = None,
1625
1695
  ) -> None:
1626
1696
  '''
1627
1697
  :param scope: -
1628
1698
  :param id: -
1629
1699
  :param tarball_file: Absolute path to the tarball. It is recommended to to use the script running directory (e.g. ``__dirname`` in Node.js projects or dirname of ``__file__`` in Python) if your tarball is located as a resource inside your project.
1700
+ :param display_name: A display name for this asset. If supplied, the display name will be used in locations where the asset identifier is printed, like in the CLI progress information. If the same asset is added multiple times, the display name of the first occurrence is used. The default is the construct path of the ``TarballImageAsset`` construct, with respect to the enclosing stack. If the asset is produced by a construct helper function (such as ``lambda.Code.fromAssetImage()``), this will look like ``MyFunction/AssetImage``. We use the stack-relative construct path so that in the common case where you have multiple stacks with the same asset, we won't show something like ``/MyBetaStack/MyFunction/Code`` when you are actually deploying to production. Default: - Stack-relative construct path
1630
1701
  '''
1631
1702
  if __debug__:
1632
1703
  type_hints = typing.get_type_hints(_typecheckingstub__3e0eaaf11f2e3e296d6157cf12d477a55316a9aefb390c2f9de1711f911d5450)
1633
1704
  check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
1634
1705
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
1635
- props = TarballImageAssetProps(tarball_file=tarball_file)
1706
+ props = TarballImageAssetProps(
1707
+ tarball_file=tarball_file, display_name=display_name
1708
+ )
1636
1709
 
1637
1710
  jsii.create(self.__class__, self, [scope, id, props])
1638
1711
 
@@ -1690,13 +1763,19 @@ class TarballImageAsset(
1690
1763
  @jsii.data_type(
1691
1764
  jsii_type="aws-cdk-lib.aws_ecr_assets.TarballImageAssetProps",
1692
1765
  jsii_struct_bases=[],
1693
- name_mapping={"tarball_file": "tarballFile"},
1766
+ name_mapping={"tarball_file": "tarballFile", "display_name": "displayName"},
1694
1767
  )
1695
1768
  class TarballImageAssetProps:
1696
- def __init__(self, *, tarball_file: builtins.str) -> None:
1769
+ def __init__(
1770
+ self,
1771
+ *,
1772
+ tarball_file: builtins.str,
1773
+ display_name: typing.Optional[builtins.str] = None,
1774
+ ) -> None:
1697
1775
  '''Options for TarballImageAsset.
1698
1776
 
1699
1777
  :param tarball_file: Absolute path to the tarball. It is recommended to to use the script running directory (e.g. ``__dirname`` in Node.js projects or dirname of ``__file__`` in Python) if your tarball is located as a resource inside your project.
1778
+ :param display_name: A display name for this asset. If supplied, the display name will be used in locations where the asset identifier is printed, like in the CLI progress information. If the same asset is added multiple times, the display name of the first occurrence is used. The default is the construct path of the ``TarballImageAsset`` construct, with respect to the enclosing stack. If the asset is produced by a construct helper function (such as ``lambda.Code.fromAssetImage()``), this will look like ``MyFunction/AssetImage``. We use the stack-relative construct path so that in the common case where you have multiple stacks with the same asset, we won't show something like ``/MyBetaStack/MyFunction/Code`` when you are actually deploying to production. Default: - Stack-relative construct path
1700
1779
 
1701
1780
  :exampleMetadata: infused
1702
1781
 
@@ -1712,9 +1791,12 @@ class TarballImageAssetProps:
1712
1791
  if __debug__:
1713
1792
  type_hints = typing.get_type_hints(_typecheckingstub__1555ea2241a0a5236409111ebbad425ecc370ebc8987c4a7871719d32389658b)
1714
1793
  check_type(argname="argument tarball_file", value=tarball_file, expected_type=type_hints["tarball_file"])
1794
+ check_type(argname="argument display_name", value=display_name, expected_type=type_hints["display_name"])
1715
1795
  self._values: typing.Dict[builtins.str, typing.Any] = {
1716
1796
  "tarball_file": tarball_file,
1717
1797
  }
1798
+ if display_name is not None:
1799
+ self._values["display_name"] = display_name
1718
1800
 
1719
1801
  @builtins.property
1720
1802
  def tarball_file(self) -> builtins.str:
@@ -1728,6 +1810,30 @@ class TarballImageAssetProps:
1728
1810
  assert result is not None, "Required property 'tarball_file' is missing"
1729
1811
  return typing.cast(builtins.str, result)
1730
1812
 
1813
+ @builtins.property
1814
+ def display_name(self) -> typing.Optional[builtins.str]:
1815
+ '''A display name for this asset.
1816
+
1817
+ If supplied, the display name will be used in locations where the asset
1818
+ identifier is printed, like in the CLI progress information. If the same
1819
+ asset is added multiple times, the display name of the first occurrence is
1820
+ used.
1821
+
1822
+ The default is the construct path of the ``TarballImageAsset`` construct,
1823
+ with respect to the enclosing stack. If the asset is produced by a
1824
+ construct helper function (such as ``lambda.Code.fromAssetImage()``), this
1825
+ will look like ``MyFunction/AssetImage``.
1826
+
1827
+ We use the stack-relative construct path so that in the common case where
1828
+ you have multiple stacks with the same asset, we won't show something like
1829
+ ``/MyBetaStack/MyFunction/Code`` when you are actually deploying to
1830
+ production.
1831
+
1832
+ :default: - Stack-relative construct path
1833
+ '''
1834
+ result = self._values.get("display_name")
1835
+ return typing.cast(typing.Optional[builtins.str], result)
1836
+
1731
1837
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
1732
1838
  return isinstance(rhs, self.__class__) and rhs._values == self._values
1733
1839
 
@@ -1774,6 +1880,7 @@ def _typecheckingstub__797fbc31925afd247c6567a5b5c30dcdc13a3d9b17aba80ece42c86bd
1774
1880
  cache_disabled: typing.Optional[builtins.bool] = None,
1775
1881
  cache_from: typing.Optional[typing.Sequence[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]]] = None,
1776
1882
  cache_to: typing.Optional[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]] = None,
1883
+ display_name: typing.Optional[builtins.str] = None,
1777
1884
  file: typing.Optional[builtins.str] = None,
1778
1885
  invalidation: typing.Optional[typing.Union[DockerImageAssetInvalidationOptions, typing.Dict[builtins.str, typing.Any]]] = None,
1779
1886
  network_mode: typing.Optional[NetworkMode] = None,
@@ -1836,6 +1943,7 @@ def _typecheckingstub__be58b9ab6157641d31b553709d8decad6c9801460bec8e3ff07aadc33
1836
1943
  cache_disabled: typing.Optional[builtins.bool] = None,
1837
1944
  cache_from: typing.Optional[typing.Sequence[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]]] = None,
1838
1945
  cache_to: typing.Optional[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]] = None,
1946
+ display_name: typing.Optional[builtins.str] = None,
1839
1947
  file: typing.Optional[builtins.str] = None,
1840
1948
  invalidation: typing.Optional[typing.Union[DockerImageAssetInvalidationOptions, typing.Dict[builtins.str, typing.Any]]] = None,
1841
1949
  network_mode: typing.Optional[NetworkMode] = None,
@@ -1859,6 +1967,7 @@ def _typecheckingstub__1abde6bc94231492c7b40171b32143e7c5533e907120fe3e3c2ebeca2
1859
1967
  cache_disabled: typing.Optional[builtins.bool] = None,
1860
1968
  cache_from: typing.Optional[typing.Sequence[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]]] = None,
1861
1969
  cache_to: typing.Optional[typing.Union[DockerCacheOption, typing.Dict[builtins.str, typing.Any]]] = None,
1970
+ display_name: typing.Optional[builtins.str] = None,
1862
1971
  file: typing.Optional[builtins.str] = None,
1863
1972
  invalidation: typing.Optional[typing.Union[DockerImageAssetInvalidationOptions, typing.Dict[builtins.str, typing.Any]]] = None,
1864
1973
  network_mode: typing.Optional[NetworkMode] = None,
@@ -1893,6 +2002,7 @@ def _typecheckingstub__3e0eaaf11f2e3e296d6157cf12d477a55316a9aefb390c2f9de1711f9
1893
2002
  id: builtins.str,
1894
2003
  *,
1895
2004
  tarball_file: builtins.str,
2005
+ display_name: typing.Optional[builtins.str] = None,
1896
2006
  ) -> None:
1897
2007
  """Type checking stubs"""
1898
2008
  pass
@@ -1912,6 +2022,7 @@ def _typecheckingstub__ccb91ed092745a33fafd3df8d94f545ae143be6b4949103c115bc7135
1912
2022
  def _typecheckingstub__1555ea2241a0a5236409111ebbad425ecc370ebc8987c4a7871719d32389658b(
1913
2023
  *,
1914
2024
  tarball_file: builtins.str,
2025
+ display_name: typing.Optional[builtins.str] = None,
1915
2026
  ) -> None:
1916
2027
  """Type checking stubs"""
1917
2028
  pass