aws-cdk-lib 2.117.0__py3-none-any.whl → 2.119.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 (57) hide show
  1. aws_cdk/__init__.py +138 -25
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.117.0.jsii.tgz → aws-cdk-lib@2.119.0.jsii.tgz} +0 -0
  4. aws_cdk/amzn_sdc/__init__.py +496 -0
  5. aws_cdk/aws_appsync/__init__.py +94 -22
  6. aws_cdk/aws_autoscaling/__init__.py +139 -74
  7. aws_cdk/aws_certificatemanager/__init__.py +164 -3
  8. aws_cdk/aws_cloud9/__init__.py +3 -3
  9. aws_cdk/aws_cloudfront/__init__.py +853 -38
  10. aws_cdk/aws_cloudtrail/__init__.py +54 -34
  11. aws_cdk/aws_cloudwatch_actions/__init__.py +105 -0
  12. aws_cdk/aws_codebuild/__init__.py +46 -5
  13. aws_cdk/aws_codecommit/__init__.py +9 -3
  14. aws_cdk/aws_codepipeline_actions/__init__.py +54 -0
  15. aws_cdk/aws_codetest/__init__.py +788 -0
  16. aws_cdk/aws_cognito/__init__.py +104 -0
  17. aws_cdk/aws_connect/__init__.py +626 -78
  18. aws_cdk/aws_docdb/__init__.py +442 -0
  19. aws_cdk/aws_dynamodb/__init__.py +14 -0
  20. aws_cdk/aws_ec2/__init__.py +372 -44
  21. aws_cdk/aws_ecs/__init__.py +192 -35
  22. aws_cdk/aws_emrserverless/__init__.py +20 -13
  23. aws_cdk/aws_events/__init__.py +90 -1
  24. aws_cdk/aws_fis/__init__.py +12 -32
  25. aws_cdk/aws_globalaccelerator/__init__.py +19 -0
  26. aws_cdk/aws_glue/__init__.py +329 -0
  27. aws_cdk/aws_iam/__init__.py +50 -24
  28. aws_cdk/aws_iot/__init__.py +112 -0
  29. aws_cdk/aws_iotsitewise/__init__.py +4 -4
  30. aws_cdk/aws_kendra/__init__.py +10 -5
  31. aws_cdk/aws_kinesisfirehose/__init__.py +111 -0
  32. aws_cdk/aws_lambda/__init__.py +180 -407
  33. aws_cdk/aws_location/__init__.py +1132 -17
  34. aws_cdk/aws_mediatailor/__init__.py +120 -17
  35. aws_cdk/aws_networkfirewall/__init__.py +2 -2
  36. aws_cdk/aws_networkmanager/__init__.py +1 -1
  37. aws_cdk/aws_omics/__init__.py +4 -4
  38. aws_cdk/aws_opensearchservice/__init__.py +58 -0
  39. aws_cdk/aws_pinpoint/__init__.py +14 -6
  40. aws_cdk/aws_pipes/__init__.py +7 -2
  41. aws_cdk/aws_rds/__init__.py +247 -16
  42. aws_cdk/aws_redshift/__init__.py +103 -0
  43. aws_cdk/aws_route53/__init__.py +68 -20
  44. aws_cdk/aws_s3/__init__.py +2 -4
  45. aws_cdk/aws_s3objectlambda/__init__.py +2 -2
  46. aws_cdk/aws_servicecatalogappregistry/__init__.py +3 -3
  47. aws_cdk/aws_signer/__init__.py +27 -4
  48. aws_cdk/aws_ssm/__init__.py +76 -13
  49. aws_cdk/aws_stepfunctions/__init__.py +110 -5
  50. aws_cdk/aws_stepfunctions_tasks/__init__.py +84 -29
  51. aws_cdk/pipelines/__init__.py +136 -37
  52. {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/LICENSE +1 -1
  53. {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/METADATA +98 -12
  54. {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/NOTICE +1 -1
  55. {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/RECORD +57 -55
  56. {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/WHEEL +0 -0
  57. {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/top_level.txt +0 -0
@@ -648,7 +648,7 @@ tasks.EmrCreateCluster(self, "SpotSpecification",
648
648
  spot_specification=tasks.EmrCreateCluster.SpotProvisioningSpecificationProperty(
649
649
  allocation_strategy=tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
650
650
  timeout_action=tasks.EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER,
651
- timeout_duration_minutes=60
651
+ timeout=Duration.minutes(5)
652
652
  )
653
653
  )
654
654
  )]
@@ -15697,8 +15697,8 @@ class EmrCreateCluster(
15697
15697
  :param instance_type_configs: The instance type configurations that define the EC2 instances in the instance fleet. Default: No instanceTpeConfigs
15698
15698
  :param launch_specifications: The launch specification for the instance fleet. Default: No launchSpecifications
15699
15699
  :param name: The friendly name of the instance fleet. Default: No name
15700
- :param target_on_demand_capacity: The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. Default: No targetOnDemandCapacity
15701
- :param target_spot_capacity: The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. Default: No targetSpotCapacity
15700
+ :param target_on_demand_capacity: The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using ``targetSpotCapacity``. At least one of ``targetSpotCapacity`` and ``targetOnDemandCapacity`` should be greater than 0. For a master instance fleet, only one of ``targetSpotCapacity`` and ``targetOnDemandCapacity`` can be specified, and its value must be 1. Default: No targetOnDemandCapacity
15701
+ :param target_spot_capacity: The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. If not specified or set to 0, only On-Demand Instances are provisioned for the instance fleet using ``targetOnDemandCapacity``. At least one of ``targetSpotCapacity`` and ``targetOnDemandCapacity`` should be greater than 0. For a master instance fleet, only one of ``targetSpotCapacity`` and ``targetOnDemandCapacity`` can be specified, and its value must be 1. Default: No targetSpotCapacity
15702
15702
 
15703
15703
  :see: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceFleetConfig.html
15704
15704
  :exampleMetadata: fixture=_generated
@@ -15753,11 +15753,12 @@ class EmrCreateCluster(
15753
15753
  ),
15754
15754
  spot_specification=stepfunctions_tasks.EmrCreateCluster.SpotProvisioningSpecificationProperty(
15755
15755
  timeout_action=stepfunctions_tasks.EmrCreateCluster.SpotTimeoutAction.SWITCH_TO_ON_DEMAND,
15756
- timeout_duration_minutes=123,
15757
15756
 
15758
15757
  # the properties below are optional
15759
15758
  allocation_strategy=stepfunctions_tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
15760
- block_duration_minutes=123
15759
+ block_duration_minutes=123,
15760
+ timeout=cdk.Duration.minutes(30),
15761
+ timeout_duration_minutes=123
15761
15762
  )
15762
15763
  ),
15763
15764
  name="name",
@@ -15834,6 +15835,12 @@ class EmrCreateCluster(
15834
15835
  def target_on_demand_capacity(self) -> typing.Optional[jsii.Number]:
15835
15836
  '''The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
15836
15837
 
15838
+ If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using ``targetSpotCapacity``.
15839
+
15840
+ At least one of ``targetSpotCapacity`` and ``targetOnDemandCapacity`` should be greater than 0.
15841
+ For a master instance fleet, only one of ``targetSpotCapacity`` and ``targetOnDemandCapacity`` can be specified, and its value
15842
+ must be 1.
15843
+
15837
15844
  :default: No targetOnDemandCapacity
15838
15845
  '''
15839
15846
  result = self._values.get("target_on_demand_capacity")
@@ -15843,6 +15850,12 @@ class EmrCreateCluster(
15843
15850
  def target_spot_capacity(self) -> typing.Optional[jsii.Number]:
15844
15851
  '''The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.
15845
15852
 
15853
+ If not specified or set to 0, only On-Demand Instances are provisioned for the instance fleet using ``targetOnDemandCapacity``.
15854
+
15855
+ At least one of ``targetSpotCapacity`` and ``targetOnDemandCapacity`` should be greater than 0.
15856
+ For a master instance fleet, only one of ``targetSpotCapacity`` and ``targetOnDemandCapacity`` can be specified, and its value
15857
+ must be 1.
15858
+
15846
15859
  :default: No targetSpotCapacity
15847
15860
  '''
15848
15861
  result = self._values.get("target_spot_capacity")
@@ -15910,7 +15923,7 @@ class EmrCreateCluster(
15910
15923
  spot_specification=tasks.EmrCreateCluster.SpotProvisioningSpecificationProperty(
15911
15924
  allocation_strategy=tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
15912
15925
  timeout_action=tasks.EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER,
15913
- timeout_duration_minutes=60
15926
+ timeout=Duration.minutes(5)
15914
15927
  )
15915
15928
  )
15916
15929
  )]
@@ -16269,7 +16282,7 @@ class EmrCreateCluster(
16269
16282
  spot_specification=tasks.EmrCreateCluster.SpotProvisioningSpecificationProperty(
16270
16283
  allocation_strategy=tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
16271
16284
  timeout_action=tasks.EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER,
16272
- timeout_duration_minutes=60
16285
+ timeout=Duration.minutes(5)
16273
16286
  )
16274
16287
  )
16275
16288
  )]
@@ -16312,8 +16325,8 @@ class EmrCreateCluster(
16312
16325
  '''An instance type configuration for each instance type in an instance fleet, which determines the EC2 instances Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
16313
16326
 
16314
16327
  :param instance_type: An EC2 instance type.
16315
- :param bid_price: The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD. Default: - None
16316
- :param bid_price_as_percentage_of_on_demand_price: The bid price, as a percentage of On-Demand price. Default: - None
16328
+ :param bid_price: The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD. Cannot specify both ``bidPrice`` and ``bidPriceAsPercentageOfOnDemandPrice``. Default: - None
16329
+ :param bid_price_as_percentage_of_on_demand_price: The bid price, as a percentage of On-Demand price. Cannot specify both ``bidPrice`` and ``bidPriceAsPercentageOfOnDemandPrice``. Default: - None
16317
16330
  :param configurations: A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. Default: - None
16318
16331
  :param ebs_configuration: The configuration of Amazon Elastic Block Storage (EBS) attached to each instance as defined by InstanceType. Default: - None
16319
16332
  :param weighted_capacity: The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in the InstanceFleetConfig. Default: - None
@@ -16395,9 +16408,9 @@ class EmrCreateCluster(
16395
16408
 
16396
16409
  @builtins.property
16397
16410
  def bid_price(self) -> typing.Optional[builtins.str]:
16398
- '''The bid price for each EC2 Spot instance type as defined by InstanceType.
16411
+ '''The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD.
16399
16412
 
16400
- Expressed in USD.
16413
+ Cannot specify both ``bidPrice`` and ``bidPriceAsPercentageOfOnDemandPrice``.
16401
16414
 
16402
16415
  :default: - None
16403
16416
  '''
@@ -16410,6 +16423,8 @@ class EmrCreateCluster(
16410
16423
  ) -> typing.Optional[jsii.Number]:
16411
16424
  '''The bid price, as a percentage of On-Demand price.
16412
16425
 
16426
+ Cannot specify both ``bidPrice`` and ``bidPriceAsPercentageOfOnDemandPrice``.
16427
+
16413
16428
  :default: - None
16414
16429
  '''
16415
16430
  result = self._values.get("bid_price_as_percentage_of_on_demand_price")
@@ -17015,7 +17030,7 @@ class EmrCreateCluster(
17015
17030
  spot_specification=tasks.EmrCreateCluster.SpotProvisioningSpecificationProperty(
17016
17031
  allocation_strategy=tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
17017
17032
  timeout_action=tasks.EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER,
17018
- timeout_duration_minutes=60
17033
+ timeout=Duration.minutes(5)
17019
17034
  )
17020
17035
  )
17021
17036
  )]
@@ -17071,7 +17086,7 @@ class EmrCreateCluster(
17071
17086
  spot_specification=tasks.EmrCreateCluster.SpotProvisioningSpecificationProperty(
17072
17087
  allocation_strategy=tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
17073
17088
  timeout_action=tasks.EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER,
17074
- timeout_duration_minutes=60
17089
+ timeout=Duration.minutes(5)
17075
17090
  )
17076
17091
  )
17077
17092
  )]
@@ -17782,7 +17797,7 @@ class EmrCreateCluster(
17782
17797
  spot_specification=tasks.EmrCreateCluster.SpotProvisioningSpecificationProperty(
17783
17798
  allocation_strategy=tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
17784
17799
  timeout_action=tasks.EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER,
17785
- timeout_duration_minutes=60
17800
+ timeout=Duration.minutes(5)
17786
17801
  )
17787
17802
  )
17788
17803
  )]
@@ -17794,15 +17809,25 @@ class EmrCreateCluster(
17794
17809
 
17795
17810
  CAPACITY_OPTIMIZED = "CAPACITY_OPTIMIZED"
17796
17811
  '''Capacity-optimized, which launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.'''
17812
+ PRICE_CAPACITY_OPTIMIZED = "PRICE_CAPACITY_OPTIMIZED"
17813
+ '''Price-capacity-optimized, which launches instances from Spot Instance pools with the highest capacity availability for the number of instances that are launching.
17814
+
17815
+ Recommended.
17816
+ '''
17817
+ LOWEST_PRICE = "LOWEST_PRICE"
17818
+ '''Lowest-price, which launches instances from the lowest priced pool that has available capacity.'''
17819
+ DIVERSIFIED = "DIVERSIFIED"
17820
+ '''Diversified, which launches instances across all Spot capacity pools.'''
17797
17821
 
17798
17822
  @jsii.data_type(
17799
17823
  jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.SpotProvisioningSpecificationProperty",
17800
17824
  jsii_struct_bases=[],
17801
17825
  name_mapping={
17802
17826
  "timeout_action": "timeoutAction",
17803
- "timeout_duration_minutes": "timeoutDurationMinutes",
17804
17827
  "allocation_strategy": "allocationStrategy",
17805
17828
  "block_duration_minutes": "blockDurationMinutes",
17829
+ "timeout": "timeout",
17830
+ "timeout_duration_minutes": "timeoutDurationMinutes",
17806
17831
  },
17807
17832
  )
17808
17833
  class SpotProvisioningSpecificationProperty:
@@ -17810,16 +17835,18 @@ class EmrCreateCluster(
17810
17835
  self,
17811
17836
  *,
17812
17837
  timeout_action: "EmrCreateCluster.SpotTimeoutAction",
17813
- timeout_duration_minutes: jsii.Number,
17814
17838
  allocation_strategy: typing.Optional["EmrCreateCluster.SpotAllocationStrategy"] = None,
17815
17839
  block_duration_minutes: typing.Optional[jsii.Number] = None,
17840
+ timeout: typing.Optional[_Duration_4839e8c3] = None,
17841
+ timeout_duration_minutes: typing.Optional[jsii.Number] = None,
17816
17842
  ) -> None:
17817
17843
  '''The launch specification for Spot instances in the instance fleet, which determines the defined duration and provisioning timeout behavior.
17818
17844
 
17819
17845
  :param timeout_action: The action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired.
17820
- :param timeout_duration_minutes: The spot provisioning timeout period in minutes.
17821
17846
  :param allocation_strategy: Specifies the strategy to use in launching Spot Instance fleets. Default: - No allocation strategy, i.e. spot instance type will be chosen based on current price only
17822
17847
  :param block_duration_minutes: (deprecated) The defined duration for Spot instances (also known as Spot blocks) in minutes. Default: - No blockDurationMinutes
17848
+ :param timeout: The spot provisioning timeout period in minutes. The value must be between 5 and 1440 minutes. You must specify one of ``timeout`` and ``timeoutDurationMinutes``. Default: - The value in ``timeoutDurationMinutes`` is used
17849
+ :param timeout_duration_minutes: (deprecated) The spot provisioning timeout period in minutes. The value must be between 5 and 1440 minutes. You must specify one of ``timeout`` and ``timeoutDurationMinutes``. Default: - The value in ``timeout`` is used
17823
17850
 
17824
17851
  :see: https://docs.aws.amazon.com/emr/latest/APIReference/API_SpotProvisioningSpecification.html
17825
17852
  :exampleMetadata: infused
@@ -17849,7 +17876,7 @@ class EmrCreateCluster(
17849
17876
  spot_specification=tasks.EmrCreateCluster.SpotProvisioningSpecificationProperty(
17850
17877
  allocation_strategy=tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
17851
17878
  timeout_action=tasks.EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER,
17852
- timeout_duration_minutes=60
17879
+ timeout=Duration.minutes(5)
17853
17880
  )
17854
17881
  )
17855
17882
  )]
@@ -17861,17 +17888,21 @@ class EmrCreateCluster(
17861
17888
  if __debug__:
17862
17889
  type_hints = typing.get_type_hints(_typecheckingstub__dafa3d17787fdab36cd1f4f58ea87a372f8918f012ead69328993cd9b112eef0)
17863
17890
  check_type(argname="argument timeout_action", value=timeout_action, expected_type=type_hints["timeout_action"])
17864
- check_type(argname="argument timeout_duration_minutes", value=timeout_duration_minutes, expected_type=type_hints["timeout_duration_minutes"])
17865
17891
  check_type(argname="argument allocation_strategy", value=allocation_strategy, expected_type=type_hints["allocation_strategy"])
17866
17892
  check_type(argname="argument block_duration_minutes", value=block_duration_minutes, expected_type=type_hints["block_duration_minutes"])
17893
+ check_type(argname="argument timeout", value=timeout, expected_type=type_hints["timeout"])
17894
+ check_type(argname="argument timeout_duration_minutes", value=timeout_duration_minutes, expected_type=type_hints["timeout_duration_minutes"])
17867
17895
  self._values: typing.Dict[builtins.str, typing.Any] = {
17868
17896
  "timeout_action": timeout_action,
17869
- "timeout_duration_minutes": timeout_duration_minutes,
17870
17897
  }
17871
17898
  if allocation_strategy is not None:
17872
17899
  self._values["allocation_strategy"] = allocation_strategy
17873
17900
  if block_duration_minutes is not None:
17874
17901
  self._values["block_duration_minutes"] = block_duration_minutes
17902
+ if timeout is not None:
17903
+ self._values["timeout"] = timeout
17904
+ if timeout_duration_minutes is not None:
17905
+ self._values["timeout_duration_minutes"] = timeout_duration_minutes
17875
17906
 
17876
17907
  @builtins.property
17877
17908
  def timeout_action(self) -> "EmrCreateCluster.SpotTimeoutAction":
@@ -17880,13 +17911,6 @@ class EmrCreateCluster(
17880
17911
  assert result is not None, "Required property 'timeout_action' is missing"
17881
17912
  return typing.cast("EmrCreateCluster.SpotTimeoutAction", result)
17882
17913
 
17883
- @builtins.property
17884
- def timeout_duration_minutes(self) -> jsii.Number:
17885
- '''The spot provisioning timeout period in minutes.'''
17886
- result = self._values.get("timeout_duration_minutes")
17887
- assert result is not None, "Required property 'timeout_duration_minutes' is missing"
17888
- return typing.cast(jsii.Number, result)
17889
-
17890
17914
  @builtins.property
17891
17915
  def allocation_strategy(
17892
17916
  self,
@@ -17914,6 +17938,36 @@ class EmrCreateCluster(
17914
17938
  result = self._values.get("block_duration_minutes")
17915
17939
  return typing.cast(typing.Optional[jsii.Number], result)
17916
17940
 
17941
+ @builtins.property
17942
+ def timeout(self) -> typing.Optional[_Duration_4839e8c3]:
17943
+ '''The spot provisioning timeout period in minutes.
17944
+
17945
+ The value must be between 5 and 1440 minutes.
17946
+
17947
+ You must specify one of ``timeout`` and ``timeoutDurationMinutes``.
17948
+
17949
+ :default: - The value in ``timeoutDurationMinutes`` is used
17950
+ '''
17951
+ result = self._values.get("timeout")
17952
+ return typing.cast(typing.Optional[_Duration_4839e8c3], result)
17953
+
17954
+ @builtins.property
17955
+ def timeout_duration_minutes(self) -> typing.Optional[jsii.Number]:
17956
+ '''(deprecated) The spot provisioning timeout period in minutes.
17957
+
17958
+ The value must be between 5 and 1440 minutes.
17959
+
17960
+ You must specify one of ``timeout`` and ``timeoutDurationMinutes``.
17961
+
17962
+ :default: - The value in ``timeout`` is used
17963
+
17964
+ :deprecated: - Use ``timeout``.
17965
+
17966
+ :stability: deprecated
17967
+ '''
17968
+ result = self._values.get("timeout_duration_minutes")
17969
+ return typing.cast(typing.Optional[jsii.Number], result)
17970
+
17917
17971
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
17918
17972
  return isinstance(rhs, self.__class__) and rhs._values == self._values
17919
17973
 
@@ -17958,7 +18012,7 @@ class EmrCreateCluster(
17958
18012
  spot_specification=tasks.EmrCreateCluster.SpotProvisioningSpecificationProperty(
17959
18013
  allocation_strategy=tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
17960
18014
  timeout_action=tasks.EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER,
17961
- timeout_duration_minutes=60
18015
+ timeout=Duration.minutes(5)
17962
18016
  )
17963
18017
  )
17964
18018
  )]
@@ -32784,9 +32838,10 @@ def _typecheckingstub__cdaa7a075b4efdc50702fd6877f9b79e13b0eb9f1d360c4243fbf89fd
32784
32838
  def _typecheckingstub__dafa3d17787fdab36cd1f4f58ea87a372f8918f012ead69328993cd9b112eef0(
32785
32839
  *,
32786
32840
  timeout_action: EmrCreateCluster.SpotTimeoutAction,
32787
- timeout_duration_minutes: jsii.Number,
32788
32841
  allocation_strategy: typing.Optional[EmrCreateCluster.SpotAllocationStrategy] = None,
32789
32842
  block_duration_minutes: typing.Optional[jsii.Number] = None,
32843
+ timeout: typing.Optional[_Duration_4839e8c3] = None,
32844
+ timeout_duration_minutes: typing.Optional[jsii.Number] = None,
32790
32845
  ) -> None:
32791
32846
  """Type checking stubs"""
32792
32847
  pass
@@ -26,7 +26,8 @@ down to using the `aws-codepipeline` construct library directly.
26
26
  > allows more control of CodeBuild project generation; supports deployment
27
27
  > engines other than CodePipeline.
28
28
  >
29
- > The README for the original API, as well as a migration guide, can be found in [our GitHub repository](https://github.com/aws/aws-cdk/blob/main/packages/@aws-cdk/pipelines/ORIGINAL_API.md).
29
+ > The README for the original API, as well as a migration guide, can be found in
30
+ > [our GitHub repository](https://github.com/aws/aws-cdk/blob/main/packages/@aws-cdk/pipelines/ORIGINAL_API.md).
30
31
 
31
32
  ## At a glance
32
33
 
@@ -1176,6 +1177,53 @@ and orphan the old bucket. You should manually delete the orphaned bucket
1176
1177
  after you are sure you have redeployed all CDK applications and there are no
1177
1178
  more references to the old asset bucket.
1178
1179
 
1180
+ ## Considerations around Running at Scale
1181
+
1182
+ If you are planning to run pipelines for more than a hundred repos
1183
+ deploying across multiple regions, then you will want to consider reusing
1184
+ both artifacts buckets and cross-region replication buckets.
1185
+
1186
+ In a situation like this, you will want to have a separate CDK app / dedicated repo which creates
1187
+ and managed the buckets which will be shared by the pipelines of all your other apps.
1188
+ Note that this app must NOT be using the shared buckets because of chicken & egg issues.
1189
+
1190
+ The following code assumes you have created and are managing your buckets in the aforementioned
1191
+ separate cdk repo and are just importing them for use in one of your (many) pipelines.
1192
+
1193
+ ```python
1194
+ # shared_xRegion_us_west1_bucket_arn: str
1195
+ # shared_xRegion_us_west1_key_arn: str
1196
+
1197
+ # shared_xRegion_us_west2_bucket_arn: str
1198
+ # shared_xRegion_us_west2_key_arn: str
1199
+
1200
+
1201
+ us_west1_bucket = s3.Bucket.from_bucket_attributes(scope, "UsEast1Bucket",
1202
+ bucket_arn=shared_xRegion_us_west1_bucket_arn,
1203
+ encryption_key=kms.Key.from_key_arn(scope, "UsEast1BucketKeyArn", shared_xRegion_us_west1_bucket_arn)
1204
+ )
1205
+
1206
+ us_west2_bucket = s3.Bucket.from_bucket_attributes(scope, "UsWest2Bucket",
1207
+ bucket_arn=shared_xRegion_us_west2_bucket_arn,
1208
+ encryption_key=kms.Key.from_key_arn(scope, "UsWest2BucketKeyArn", shared_xRegion_us_west2_key_arn)
1209
+ )
1210
+
1211
+ cross_region_replication_buckets = {
1212
+ "us-west-1": us_west1_bucket,
1213
+ "us-west-2": us_west2_bucket
1214
+ }
1215
+
1216
+ pipeline = pipelines.CodePipeline(self, "Pipeline",
1217
+ synth=pipelines.ShellStep("Synth",
1218
+ input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
1219
+ connection_arn="arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41"
1220
+ ),
1221
+ commands=["npm ci", "npm run build", "npx cdk synth"]
1222
+ ), # Use shared buckets.
1223
+ cross_region_replication_buckets=cross_region_replication_buckets
1224
+ )
1225
+ ```
1226
+
1179
1227
  ## Context Lookups
1180
1228
 
1181
1229
  You might be using CDK constructs that need to look up [runtime
@@ -2351,6 +2399,7 @@ class CodePipelineActionFactoryResult:
2351
2399
  "code_build_defaults": "codeBuildDefaults",
2352
2400
  "code_pipeline": "codePipeline",
2353
2401
  "cross_account_keys": "crossAccountKeys",
2402
+ "cross_region_replication_buckets": "crossRegionReplicationBuckets",
2354
2403
  "docker_credentials": "dockerCredentials",
2355
2404
  "docker_enabled_for_self_mutation": "dockerEnabledForSelfMutation",
2356
2405
  "docker_enabled_for_synth": "dockerEnabledForSynth",
@@ -2376,6 +2425,7 @@ class CodePipelineProps:
2376
2425
  code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2377
2426
  code_pipeline: typing.Optional[_Pipeline_ea38de84] = None,
2378
2427
  cross_account_keys: typing.Optional[builtins.bool] = None,
2428
+ cross_region_replication_buckets: typing.Optional[typing.Mapping[builtins.str, _IBucket_42e086fd]] = None,
2379
2429
  docker_credentials: typing.Optional[typing.Sequence["DockerCredential"]] = None,
2380
2430
  docker_enabled_for_self_mutation: typing.Optional[builtins.bool] = None,
2381
2431
  docker_enabled_for_synth: typing.Optional[builtins.bool] = None,
@@ -2398,6 +2448,7 @@ class CodePipelineProps:
2398
2448
  :param code_build_defaults: Customize the CodeBuild projects created for this pipeline. Default: - All projects run non-privileged build, SMALL instance, LinuxBuildImage.STANDARD_7_0
2399
2449
  :param code_pipeline: An existing Pipeline to be reused and built upon. [disable-awslint:ref-via-interface] Default: - a new underlying pipeline is created.
2400
2450
  :param cross_account_keys: Create KMS keys for the artifact buckets, allowing cross-account deployments. The artifact buckets have to be encrypted to support deploying CDK apps to another account, so if you want to do that or want to have your artifact buckets encrypted, be sure to set this value to ``true``. Be aware there is a cost associated with maintaining the KMS keys. Default: false
2451
+ :param cross_region_replication_buckets: A map of region to S3 bucket name used for cross-region CodePipeline. For every Action that you specify targeting a different region than the Pipeline itself, if you don't provide an explicit Bucket for that region using this property, the construct will automatically create a Stack containing an S3 Bucket in that region. Passed directly through to the {@link cp.Pipeline}. Default: - no cross region replication buckets.
2401
2452
  :param docker_credentials: A list of credentials used to authenticate to Docker registries. Specify any credentials necessary within the pipeline to build, synth, update, or publish assets. Default: []
2402
2453
  :param docker_enabled_for_self_mutation: Enable Docker for the self-mutate step. Set this to true if the pipeline itself uses Docker container assets (for example, if you use ``LinuxBuildImage.fromAsset()`` as the build image of a CodeBuild step in the pipeline). You do not need to set it if you build Docker image assets in the application Stages and Stacks that are *deployed* by this pipeline. Configures privileged mode for the self-mutation CodeBuild action. If you are about to turn this on in an already-deployed Pipeline, set the value to ``true`` first, commit and allow the pipeline to self-update, and only then use the Docker asset in the pipeline. Default: false
2403
2454
  :param docker_enabled_for_synth: Enable Docker for the 'synth' step. Set this to true if you are using file assets that require "bundling" anywhere in your application (meaning an asset compilation step will be run with the tools provided by a Docker image), both for the Pipeline stack as well as the application stacks. A common way to use bundling assets in your application is by using the ``aws-cdk-lib/aws-lambda-nodejs`` library. Configures privileged mode for the synth CodeBuild action. If you are about to turn this on in an already-deployed Pipeline, set the value to ``true`` first, commit and allow the pipeline to self-update, and only then use the bundled asset. Default: false
@@ -2415,18 +2466,24 @@ class CodePipelineProps:
2415
2466
 
2416
2467
  Example::
2417
2468
 
2418
- # code_pipeline: codepipeline.Pipeline
2419
-
2420
-
2421
- source_artifact = codepipeline.Artifact("MySourceArtifact")
2422
-
2423
- pipeline = pipelines.CodePipeline(self, "Pipeline",
2424
- code_pipeline=code_pipeline,
2469
+ # Modern API
2470
+ modern_pipeline = pipelines.CodePipeline(self, "Pipeline",
2471
+ self_mutation=False,
2425
2472
  synth=pipelines.ShellStep("Synth",
2426
- input=pipelines.CodePipelineFileSet.from_artifact(source_artifact),
2427
- commands=["npm ci", "npm run build", "npx cdk synth"]
2473
+ input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
2474
+ connection_arn="arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41"
2475
+ ),
2476
+ commands=["npm ci", "npm run build", "npx cdk synth"
2477
+ ]
2428
2478
  )
2429
2479
  )
2480
+
2481
+ # Original API
2482
+ cloud_assembly_artifact = codepipeline.Artifact()
2483
+ original_pipeline = pipelines.CdkPipeline(self, "Pipeline",
2484
+ self_mutating=False,
2485
+ cloud_assembly_artifact=cloud_assembly_artifact
2486
+ )
2430
2487
  '''
2431
2488
  if isinstance(asset_publishing_code_build_defaults, dict):
2432
2489
  asset_publishing_code_build_defaults = CodeBuildOptions(**asset_publishing_code_build_defaults)
@@ -2445,6 +2502,7 @@ class CodePipelineProps:
2445
2502
  check_type(argname="argument code_build_defaults", value=code_build_defaults, expected_type=type_hints["code_build_defaults"])
2446
2503
  check_type(argname="argument code_pipeline", value=code_pipeline, expected_type=type_hints["code_pipeline"])
2447
2504
  check_type(argname="argument cross_account_keys", value=cross_account_keys, expected_type=type_hints["cross_account_keys"])
2505
+ check_type(argname="argument cross_region_replication_buckets", value=cross_region_replication_buckets, expected_type=type_hints["cross_region_replication_buckets"])
2448
2506
  check_type(argname="argument docker_credentials", value=docker_credentials, expected_type=type_hints["docker_credentials"])
2449
2507
  check_type(argname="argument docker_enabled_for_self_mutation", value=docker_enabled_for_self_mutation, expected_type=type_hints["docker_enabled_for_self_mutation"])
2450
2508
  check_type(argname="argument docker_enabled_for_synth", value=docker_enabled_for_synth, expected_type=type_hints["docker_enabled_for_synth"])
@@ -2472,6 +2530,8 @@ class CodePipelineProps:
2472
2530
  self._values["code_pipeline"] = code_pipeline
2473
2531
  if cross_account_keys is not None:
2474
2532
  self._values["cross_account_keys"] = cross_account_keys
2533
+ if cross_region_replication_buckets is not None:
2534
+ self._values["cross_region_replication_buckets"] = cross_region_replication_buckets
2475
2535
  if docker_credentials is not None:
2476
2536
  self._values["docker_credentials"] = docker_credentials
2477
2537
  if docker_enabled_for_self_mutation is not None:
@@ -2589,6 +2649,22 @@ class CodePipelineProps:
2589
2649
  result = self._values.get("cross_account_keys")
2590
2650
  return typing.cast(typing.Optional[builtins.bool], result)
2591
2651
 
2652
+ @builtins.property
2653
+ def cross_region_replication_buckets(
2654
+ self,
2655
+ ) -> typing.Optional[typing.Mapping[builtins.str, _IBucket_42e086fd]]:
2656
+ '''A map of region to S3 bucket name used for cross-region CodePipeline.
2657
+
2658
+ For every Action that you specify targeting a different region than the Pipeline itself,
2659
+ if you don't provide an explicit Bucket for that region using this property,
2660
+ the construct will automatically create a Stack containing an S3 Bucket in that region.
2661
+ Passed directly through to the {@link cp.Pipeline}.
2662
+
2663
+ :default: - no cross region replication buckets.
2664
+ '''
2665
+ result = self._values.get("cross_region_replication_buckets")
2666
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, _IBucket_42e086fd]], result)
2667
+
2592
2668
  @builtins.property
2593
2669
  def docker_credentials(self) -> typing.Optional[typing.List["DockerCredential"]]:
2594
2670
  '''A list of credentials used to authenticate to Docker registries.
@@ -4403,18 +4479,24 @@ class ShellStepProps:
4403
4479
 
4404
4480
  Example::
4405
4481
 
4406
- # code_pipeline: codepipeline.Pipeline
4407
-
4408
-
4409
- source_artifact = codepipeline.Artifact("MySourceArtifact")
4410
-
4411
- pipeline = pipelines.CodePipeline(self, "Pipeline",
4412
- code_pipeline=code_pipeline,
4482
+ # Modern API
4483
+ modern_pipeline = pipelines.CodePipeline(self, "Pipeline",
4484
+ self_mutation=False,
4413
4485
  synth=pipelines.ShellStep("Synth",
4414
- input=pipelines.CodePipelineFileSet.from_artifact(source_artifact),
4415
- commands=["npm ci", "npm run build", "npx cdk synth"]
4486
+ input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
4487
+ connection_arn="arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41"
4488
+ ),
4489
+ commands=["npm ci", "npm run build", "npx cdk synth"
4490
+ ]
4416
4491
  )
4417
4492
  )
4493
+
4494
+ # Original API
4495
+ cloud_assembly_artifact = codepipeline.Artifact()
4496
+ original_pipeline = pipelines.CdkPipeline(self, "Pipeline",
4497
+ self_mutating=False,
4498
+ cloud_assembly_artifact=cloud_assembly_artifact
4499
+ )
4418
4500
  '''
4419
4501
  if __debug__:
4420
4502
  type_hints = typing.get_type_hints(_typecheckingstub__672600085b4c1f54d7e497f605a0be2945f1a2759aaf8632197707da6d73a55c)
@@ -6448,18 +6530,24 @@ class CodePipeline(
6448
6530
 
6449
6531
  Example::
6450
6532
 
6451
- # code_pipeline: codepipeline.Pipeline
6452
-
6453
-
6454
- source_artifact = codepipeline.Artifact("MySourceArtifact")
6455
-
6456
- pipeline = pipelines.CodePipeline(self, "Pipeline",
6457
- code_pipeline=code_pipeline,
6533
+ # Modern API
6534
+ modern_pipeline = pipelines.CodePipeline(self, "Pipeline",
6535
+ self_mutation=False,
6458
6536
  synth=pipelines.ShellStep("Synth",
6459
- input=pipelines.CodePipelineFileSet.from_artifact(source_artifact),
6460
- commands=["npm ci", "npm run build", "npx cdk synth"]
6537
+ input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
6538
+ connection_arn="arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41"
6539
+ ),
6540
+ commands=["npm ci", "npm run build", "npx cdk synth"
6541
+ ]
6461
6542
  )
6462
6543
  )
6544
+
6545
+ # Original API
6546
+ cloud_assembly_artifact = codepipeline.Artifact()
6547
+ original_pipeline = pipelines.CdkPipeline(self, "Pipeline",
6548
+ self_mutating=False,
6549
+ cloud_assembly_artifact=cloud_assembly_artifact
6550
+ )
6463
6551
  '''
6464
6552
 
6465
6553
  def __init__(
@@ -6474,6 +6562,7 @@ class CodePipeline(
6474
6562
  code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,
6475
6563
  code_pipeline: typing.Optional[_Pipeline_ea38de84] = None,
6476
6564
  cross_account_keys: typing.Optional[builtins.bool] = None,
6565
+ cross_region_replication_buckets: typing.Optional[typing.Mapping[builtins.str, _IBucket_42e086fd]] = None,
6477
6566
  docker_credentials: typing.Optional[typing.Sequence[DockerCredential]] = None,
6478
6567
  docker_enabled_for_self_mutation: typing.Optional[builtins.bool] = None,
6479
6568
  docker_enabled_for_synth: typing.Optional[builtins.bool] = None,
@@ -6497,6 +6586,7 @@ class CodePipeline(
6497
6586
  :param code_build_defaults: Customize the CodeBuild projects created for this pipeline. Default: - All projects run non-privileged build, SMALL instance, LinuxBuildImage.STANDARD_7_0
6498
6587
  :param code_pipeline: An existing Pipeline to be reused and built upon. [disable-awslint:ref-via-interface] Default: - a new underlying pipeline is created.
6499
6588
  :param cross_account_keys: Create KMS keys for the artifact buckets, allowing cross-account deployments. The artifact buckets have to be encrypted to support deploying CDK apps to another account, so if you want to do that or want to have your artifact buckets encrypted, be sure to set this value to ``true``. Be aware there is a cost associated with maintaining the KMS keys. Default: false
6589
+ :param cross_region_replication_buckets: A map of region to S3 bucket name used for cross-region CodePipeline. For every Action that you specify targeting a different region than the Pipeline itself, if you don't provide an explicit Bucket for that region using this property, the construct will automatically create a Stack containing an S3 Bucket in that region. Passed directly through to the {@link cp.Pipeline}. Default: - no cross region replication buckets.
6500
6590
  :param docker_credentials: A list of credentials used to authenticate to Docker registries. Specify any credentials necessary within the pipeline to build, synth, update, or publish assets. Default: []
6501
6591
  :param docker_enabled_for_self_mutation: Enable Docker for the self-mutate step. Set this to true if the pipeline itself uses Docker container assets (for example, if you use ``LinuxBuildImage.fromAsset()`` as the build image of a CodeBuild step in the pipeline). You do not need to set it if you build Docker image assets in the application Stages and Stacks that are *deployed* by this pipeline. Configures privileged mode for the self-mutation CodeBuild action. If you are about to turn this on in an already-deployed Pipeline, set the value to ``true`` first, commit and allow the pipeline to self-update, and only then use the Docker asset in the pipeline. Default: false
6502
6592
  :param docker_enabled_for_synth: Enable Docker for the 'synth' step. Set this to true if you are using file assets that require "bundling" anywhere in your application (meaning an asset compilation step will be run with the tools provided by a Docker image), both for the Pipeline stack as well as the application stacks. A common way to use bundling assets in your application is by using the ``aws-cdk-lib/aws-lambda-nodejs`` library. Configures privileged mode for the synth CodeBuild action. If you are about to turn this on in an already-deployed Pipeline, set the value to ``true`` first, commit and allow the pipeline to self-update, and only then use the bundled asset. Default: false
@@ -6522,6 +6612,7 @@ class CodePipeline(
6522
6612
  code_build_defaults=code_build_defaults,
6523
6613
  code_pipeline=code_pipeline,
6524
6614
  cross_account_keys=cross_account_keys,
6615
+ cross_region_replication_buckets=cross_region_replication_buckets,
6525
6616
  docker_credentials=docker_credentials,
6526
6617
  docker_enabled_for_self_mutation=docker_enabled_for_self_mutation,
6527
6618
  docker_enabled_for_synth=docker_enabled_for_synth,
@@ -7236,18 +7327,24 @@ class ShellStep(
7236
7327
 
7237
7328
  Example::
7238
7329
 
7239
- # code_pipeline: codepipeline.Pipeline
7240
-
7241
-
7242
- source_artifact = codepipeline.Artifact("MySourceArtifact")
7243
-
7244
- pipeline = pipelines.CodePipeline(self, "Pipeline",
7245
- code_pipeline=code_pipeline,
7330
+ # Modern API
7331
+ modern_pipeline = pipelines.CodePipeline(self, "Pipeline",
7332
+ self_mutation=False,
7246
7333
  synth=pipelines.ShellStep("Synth",
7247
- input=pipelines.CodePipelineFileSet.from_artifact(source_artifact),
7248
- commands=["npm ci", "npm run build", "npx cdk synth"]
7334
+ input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
7335
+ connection_arn="arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41"
7336
+ ),
7337
+ commands=["npm ci", "npm run build", "npx cdk synth"
7338
+ ]
7249
7339
  )
7250
7340
  )
7341
+
7342
+ # Original API
7343
+ cloud_assembly_artifact = codepipeline.Artifact()
7344
+ original_pipeline = pipelines.CdkPipeline(self, "Pipeline",
7345
+ self_mutating=False,
7346
+ cloud_assembly_artifact=cloud_assembly_artifact
7347
+ )
7251
7348
  '''
7252
7349
 
7253
7350
  def __init__(
@@ -7837,6 +7934,7 @@ def _typecheckingstub__c46bc21ca63efb27c935c31017ebbc8c85b3b93ae1798e54892dd3eae
7837
7934
  code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,
7838
7935
  code_pipeline: typing.Optional[_Pipeline_ea38de84] = None,
7839
7936
  cross_account_keys: typing.Optional[builtins.bool] = None,
7937
+ cross_region_replication_buckets: typing.Optional[typing.Mapping[builtins.str, _IBucket_42e086fd]] = None,
7840
7938
  docker_credentials: typing.Optional[typing.Sequence[DockerCredential]] = None,
7841
7939
  docker_enabled_for_self_mutation: typing.Optional[builtins.bool] = None,
7842
7940
  docker_enabled_for_synth: typing.Optional[builtins.bool] = None,
@@ -8298,6 +8396,7 @@ def _typecheckingstub__7b4b4a0bcbd5fab3e4b78aa07ff9504469ae96c16799604ca3345bcb9
8298
8396
  code_build_defaults: typing.Optional[typing.Union[CodeBuildOptions, typing.Dict[builtins.str, typing.Any]]] = None,
8299
8397
  code_pipeline: typing.Optional[_Pipeline_ea38de84] = None,
8300
8398
  cross_account_keys: typing.Optional[builtins.bool] = None,
8399
+ cross_region_replication_buckets: typing.Optional[typing.Mapping[builtins.str, _IBucket_42e086fd]] = None,
8301
8400
  docker_credentials: typing.Optional[typing.Sequence[DockerCredential]] = None,
8302
8401
  docker_enabled_for_self_mutation: typing.Optional[builtins.bool] = None,
8303
8402
  docker_enabled_for_synth: typing.Optional[builtins.bool] = None,
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
189
+ Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.