aws-cdk-lib 2.115.0__py3-none-any.whl → 2.116.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aws-cdk-lib might be problematic. Click here for more details.

Files changed (66) hide show
  1. aws_cdk/__init__.py +801 -356
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.115.0.jsii.tgz → aws-cdk-lib@2.116.1.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigateway/__init__.py +3 -1
  5. aws_cdk/aws_apigatewayv2/__init__.py +595 -222
  6. aws_cdk/aws_apigatewayv2_integrations/__init__.py +4 -5
  7. aws_cdk/aws_applicationautoscaling/__init__.py +51 -15
  8. aws_cdk/aws_appsync/__init__.py +14 -3
  9. aws_cdk/aws_autoscaling/__init__.py +6 -0
  10. aws_cdk/aws_b2bi/__init__.py +2445 -0
  11. aws_cdk/aws_cloud9/__init__.py +63 -63
  12. aws_cdk/aws_cloudfront/__init__.py +394 -0
  13. aws_cdk/aws_cloudfront/experimental/__init__.py +5 -2
  14. aws_cdk/aws_cloudtrail/__init__.py +90 -11
  15. aws_cdk/aws_cloudwatch/__init__.py +6 -6
  16. aws_cdk/aws_codedeploy/__init__.py +88 -15
  17. aws_cdk/aws_codepipeline/__init__.py +645 -0
  18. aws_cdk/aws_cognito/__init__.py +13 -26
  19. aws_cdk/aws_config/__init__.py +315 -1
  20. aws_cdk/aws_connect/__init__.py +532 -37
  21. aws_cdk/aws_controltower/__init__.py +4 -4
  22. aws_cdk/aws_datasync/__init__.py +6 -4
  23. aws_cdk/aws_dms/__init__.py +241 -131
  24. aws_cdk/aws_dynamodb/__init__.py +8 -0
  25. aws_cdk/aws_ec2/__init__.py +1030 -45
  26. aws_cdk/aws_ecr/__init__.py +78 -10
  27. aws_cdk/aws_ecs/__init__.py +210 -2
  28. aws_cdk/aws_ecs_patterns/__init__.py +77 -62
  29. aws_cdk/aws_eks/__init__.py +8 -1
  30. aws_cdk/aws_elasticache/__init__.py +136 -10
  31. aws_cdk/aws_elasticloadbalancingv2/__init__.py +10 -13
  32. aws_cdk/aws_emr/__init__.py +234 -17
  33. aws_cdk/aws_eventschemas/__init__.py +15 -13
  34. aws_cdk/aws_fis/__init__.py +33 -13
  35. aws_cdk/aws_gamelift/__init__.py +47 -0
  36. aws_cdk/aws_imagebuilder/__init__.py +922 -84
  37. aws_cdk/aws_internetmonitor/__init__.py +12 -10
  38. aws_cdk/aws_iot/__init__.py +26 -46
  39. aws_cdk/aws_iottwinmaker/__init__.py +36 -34
  40. aws_cdk/aws_lambda/__init__.py +19 -15
  41. aws_cdk/aws_lambda_nodejs/__init__.py +5 -2
  42. aws_cdk/aws_logs/__init__.py +6 -6
  43. aws_cdk/aws_opensearchservice/__init__.py +5 -3
  44. aws_cdk/aws_organizations/__init__.py +3 -3
  45. aws_cdk/aws_osis/__init__.py +17 -13
  46. aws_cdk/aws_rds/__init__.py +6 -0
  47. aws_cdk/aws_s3/__init__.py +4 -2
  48. aws_cdk/aws_s3outposts/__init__.py +8 -8
  49. aws_cdk/aws_sagemaker/__init__.py +17 -94
  50. aws_cdk/aws_secretsmanager/__init__.py +9 -7
  51. aws_cdk/aws_securityhub/__init__.py +18 -0
  52. aws_cdk/aws_servicecatalogappregistry/__init__.py +31 -0
  53. aws_cdk/aws_ses/__init__.py +58 -11
  54. aws_cdk/aws_sns/__init__.py +309 -10
  55. aws_cdk/aws_ssm/__init__.py +3 -5
  56. aws_cdk/aws_stepfunctions/__init__.py +335 -19
  57. aws_cdk/aws_stepfunctions_tasks/__init__.py +388 -38
  58. aws_cdk/aws_transfer/__init__.py +37 -10
  59. aws_cdk/custom_resources/__init__.py +443 -1
  60. aws_cdk/triggers/__init__.py +5 -2
  61. {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/METADATA +1 -1
  62. {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/RECORD +66 -65
  63. {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/LICENSE +0 -0
  64. {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/NOTICE +0 -0
  65. {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/WHEEL +0 -0
  66. {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/top_level.txt +0 -0
@@ -737,6 +737,7 @@ from ..aws_ec2 import (
737
737
  SubnetSelection as _SubnetSelection_e57d76df,
738
738
  )
739
739
  from ..aws_iam import (
740
+ Grant as _Grant_a7ae64f8,
740
741
  IGrantable as _IGrantable_71c4f5de,
741
742
  IPrincipal as _IPrincipal_539bb2fd,
742
743
  IRole as _IRole_235f5d8e,
@@ -744,7 +745,10 @@ from ..aws_iam import (
744
745
  )
745
746
  from ..aws_kms import IKey as _IKey_5f11635f
746
747
  from ..aws_lambda import IFunction as _IFunction_6adb0ab8
747
- from ..aws_logs import RetentionDays as _RetentionDays_070f99f0
748
+ from ..aws_logs import (
749
+ ILogGroup as _ILogGroup_3c4fa718, RetentionDays as _RetentionDays_070f99f0
750
+ )
751
+ from ..aws_stepfunctions import LogLevel as _LogLevel_be1990fe
748
752
 
749
753
 
750
754
  @jsii.implements(_IGrantable_71c4f5de)
@@ -1497,6 +1501,99 @@ class AwsSdkCall:
1497
1501
  )
1498
1502
 
1499
1503
 
1504
+ @jsii.data_type(
1505
+ jsii_type="aws-cdk-lib.custom_resources.LogOptions",
1506
+ jsii_struct_bases=[],
1507
+ name_mapping={
1508
+ "destination": "destination",
1509
+ "include_execution_data": "includeExecutionData",
1510
+ "level": "level",
1511
+ },
1512
+ )
1513
+ class LogOptions:
1514
+ def __init__(
1515
+ self,
1516
+ *,
1517
+ destination: typing.Optional[_ILogGroup_3c4fa718] = None,
1518
+ include_execution_data: typing.Optional[builtins.bool] = None,
1519
+ level: typing.Optional[_LogLevel_be1990fe] = None,
1520
+ ) -> None:
1521
+ '''Log Options for the state machine.
1522
+
1523
+ :param destination: The log group where the execution history events will be logged. Default: - a new log group will be created
1524
+ :param include_execution_data: Determines whether execution data is included in your log. Default: - false
1525
+ :param level: Defines which category of execution history events are logged. Default: - ERROR
1526
+
1527
+ :exampleMetadata: fixture=_generated
1528
+
1529
+ Example::
1530
+
1531
+ # The code below shows an example of how to instantiate this type.
1532
+ # The values are placeholders you should change.
1533
+ from aws_cdk import aws_logs as logs
1534
+ from aws_cdk import aws_stepfunctions as stepfunctions
1535
+ from aws_cdk import custom_resources
1536
+
1537
+ # log_group: logs.LogGroup
1538
+
1539
+ log_options = custom_resources.LogOptions(
1540
+ destination=log_group,
1541
+ include_execution_data=False,
1542
+ level=stepfunctions.LogLevel.OFF
1543
+ )
1544
+ '''
1545
+ if __debug__:
1546
+ type_hints = typing.get_type_hints(_typecheckingstub__2622296f61199d2b10825c21d976c0578e9488ad1b2b7635565f604c598734b7)
1547
+ check_type(argname="argument destination", value=destination, expected_type=type_hints["destination"])
1548
+ check_type(argname="argument include_execution_data", value=include_execution_data, expected_type=type_hints["include_execution_data"])
1549
+ check_type(argname="argument level", value=level, expected_type=type_hints["level"])
1550
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
1551
+ if destination is not None:
1552
+ self._values["destination"] = destination
1553
+ if include_execution_data is not None:
1554
+ self._values["include_execution_data"] = include_execution_data
1555
+ if level is not None:
1556
+ self._values["level"] = level
1557
+
1558
+ @builtins.property
1559
+ def destination(self) -> typing.Optional[_ILogGroup_3c4fa718]:
1560
+ '''The log group where the execution history events will be logged.
1561
+
1562
+ :default: - a new log group will be created
1563
+ '''
1564
+ result = self._values.get("destination")
1565
+ return typing.cast(typing.Optional[_ILogGroup_3c4fa718], result)
1566
+
1567
+ @builtins.property
1568
+ def include_execution_data(self) -> typing.Optional[builtins.bool]:
1569
+ '''Determines whether execution data is included in your log.
1570
+
1571
+ :default: - false
1572
+ '''
1573
+ result = self._values.get("include_execution_data")
1574
+ return typing.cast(typing.Optional[builtins.bool], result)
1575
+
1576
+ @builtins.property
1577
+ def level(self) -> typing.Optional[_LogLevel_be1990fe]:
1578
+ '''Defines which category of execution history events are logged.
1579
+
1580
+ :default: - ERROR
1581
+ '''
1582
+ result = self._values.get("level")
1583
+ return typing.cast(typing.Optional[_LogLevel_be1990fe], result)
1584
+
1585
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1586
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1587
+
1588
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1589
+ return not (rhs == self)
1590
+
1591
+ def __repr__(self) -> str:
1592
+ return "LogOptions(%s)" % ", ".join(
1593
+ k + "=" + repr(v) for k, v in self._values.items()
1594
+ )
1595
+
1596
+
1500
1597
  class PhysicalResourceId(
1501
1598
  metaclass=jsii.JSIIMeta,
1502
1599
  jsii_type="aws-cdk-lib.custom_resources.PhysicalResourceId",
@@ -1667,6 +1764,7 @@ class Provider(
1667
1764
  id: builtins.str,
1668
1765
  *,
1669
1766
  on_event_handler: _IFunction_6adb0ab8,
1767
+ disable_waiter_state_machine_logging: typing.Optional[builtins.bool] = None,
1670
1768
  is_complete_handler: typing.Optional[_IFunction_6adb0ab8] = None,
1671
1769
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
1672
1770
  provider_function_env_encryption: typing.Optional[_IKey_5f11635f] = None,
@@ -1677,11 +1775,13 @@ class Provider(
1677
1775
  total_timeout: typing.Optional[_Duration_4839e8c3] = None,
1678
1776
  vpc: typing.Optional[_IVpc_f30d5663] = None,
1679
1777
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
1778
+ waiter_state_machine_log_options: typing.Optional[typing.Union[LogOptions, typing.Dict[builtins.str, typing.Any]]] = None,
1680
1779
  ) -> None:
1681
1780
  '''
1682
1781
  :param scope: -
1683
1782
  :param id: -
1684
1783
  :param on_event_handler: The AWS Lambda function to invoke for all resource lifecycle operations (CREATE/UPDATE/DELETE). This function is responsible to begin the requested resource operation (CREATE/UPDATE/DELETE) and return any additional properties to add to the event, which will later be passed to ``isComplete``. The ``PhysicalResourceId`` property must be included in the response.
1784
+ :param disable_waiter_state_machine_logging: Whether logging for the waiter state machine is disabled. Default: - false
1685
1785
  :param is_complete_handler: The AWS Lambda function to invoke in order to determine if the operation is complete. This function will be called immediately after ``onEvent`` and then periodically based on the configured query interval as long as it returns ``false``. If the function still returns ``false`` and the alloted timeout has passed, the operation will fail. Default: - provider is synchronous. This means that the ``onEvent`` handler is expected to finish all lifecycle operations within the initial invocation.
1686
1786
  :param log_retention: The number of days framework log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.INFINITE
1687
1787
  :param provider_function_env_encryption: AWS KMS key used to encrypt provider lambda's environment variables. Default: - AWS Lambda creates and uses an AWS managed customer master key (CMK)
@@ -1692,6 +1792,7 @@ class Provider(
1692
1792
  :param total_timeout: Total timeout for the entire operation. The maximum timeout is 1 hour (yes, it can exceed the AWS Lambda 15 minutes) Default: Duration.minutes(30)
1693
1793
  :param vpc: The vpc to provision the lambda functions in. Default: - functions are not provisioned inside a vpc.
1694
1794
  :param vpc_subnets: Which subnets from the VPC to place the lambda functions in. Only used if 'vpc' is supplied. Note: internet access for Lambdas requires a NAT gateway, so picking Public subnets is not allowed. Default: - the Vpc default strategy if not specified
1795
+ :param waiter_state_machine_log_options: Defines what execution history events of the waiter state machine are logged and where they are logged. Default: - A default log group will be created if logging for the waiter state machine is enabled.
1695
1796
  '''
1696
1797
  if __debug__:
1697
1798
  type_hints = typing.get_type_hints(_typecheckingstub__29415d7bf7977fcf110b77ce69cec309dcf0404601944735020770ddfe2b01a8)
@@ -1699,6 +1800,7 @@ class Provider(
1699
1800
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
1700
1801
  props = ProviderProps(
1701
1802
  on_event_handler=on_event_handler,
1803
+ disable_waiter_state_machine_logging=disable_waiter_state_machine_logging,
1702
1804
  is_complete_handler=is_complete_handler,
1703
1805
  log_retention=log_retention,
1704
1806
  provider_function_env_encryption=provider_function_env_encryption,
@@ -1709,6 +1811,7 @@ class Provider(
1709
1811
  total_timeout=total_timeout,
1710
1812
  vpc=vpc,
1711
1813
  vpc_subnets=vpc_subnets,
1814
+ waiter_state_machine_log_options=waiter_state_machine_log_options,
1712
1815
  )
1713
1816
 
1714
1817
  jsii.create(self.__class__, self, [scope, id, props])
@@ -1737,6 +1840,7 @@ class Provider(
1737
1840
  jsii_struct_bases=[],
1738
1841
  name_mapping={
1739
1842
  "on_event_handler": "onEventHandler",
1843
+ "disable_waiter_state_machine_logging": "disableWaiterStateMachineLogging",
1740
1844
  "is_complete_handler": "isCompleteHandler",
1741
1845
  "log_retention": "logRetention",
1742
1846
  "provider_function_env_encryption": "providerFunctionEnvEncryption",
@@ -1747,6 +1851,7 @@ class Provider(
1747
1851
  "total_timeout": "totalTimeout",
1748
1852
  "vpc": "vpc",
1749
1853
  "vpc_subnets": "vpcSubnets",
1854
+ "waiter_state_machine_log_options": "waiterStateMachineLogOptions",
1750
1855
  },
1751
1856
  )
1752
1857
  class ProviderProps:
@@ -1754,6 +1859,7 @@ class ProviderProps:
1754
1859
  self,
1755
1860
  *,
1756
1861
  on_event_handler: _IFunction_6adb0ab8,
1862
+ disable_waiter_state_machine_logging: typing.Optional[builtins.bool] = None,
1757
1863
  is_complete_handler: typing.Optional[_IFunction_6adb0ab8] = None,
1758
1864
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
1759
1865
  provider_function_env_encryption: typing.Optional[_IKey_5f11635f] = None,
@@ -1764,10 +1870,12 @@ class ProviderProps:
1764
1870
  total_timeout: typing.Optional[_Duration_4839e8c3] = None,
1765
1871
  vpc: typing.Optional[_IVpc_f30d5663] = None,
1766
1872
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
1873
+ waiter_state_machine_log_options: typing.Optional[typing.Union[LogOptions, typing.Dict[builtins.str, typing.Any]]] = None,
1767
1874
  ) -> None:
1768
1875
  '''Initialization properties for the ``Provider`` construct.
1769
1876
 
1770
1877
  :param on_event_handler: The AWS Lambda function to invoke for all resource lifecycle operations (CREATE/UPDATE/DELETE). This function is responsible to begin the requested resource operation (CREATE/UPDATE/DELETE) and return any additional properties to add to the event, which will later be passed to ``isComplete``. The ``PhysicalResourceId`` property must be included in the response.
1878
+ :param disable_waiter_state_machine_logging: Whether logging for the waiter state machine is disabled. Default: - false
1771
1879
  :param is_complete_handler: The AWS Lambda function to invoke in order to determine if the operation is complete. This function will be called immediately after ``onEvent`` and then periodically based on the configured query interval as long as it returns ``false``. If the function still returns ``false`` and the alloted timeout has passed, the operation will fail. Default: - provider is synchronous. This means that the ``onEvent`` handler is expected to finish all lifecycle operations within the initial invocation.
1772
1880
  :param log_retention: The number of days framework log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.INFINITE
1773
1881
  :param provider_function_env_encryption: AWS KMS key used to encrypt provider lambda's environment variables. Default: - AWS Lambda creates and uses an AWS managed customer master key (CMK)
@@ -1778,6 +1886,7 @@ class ProviderProps:
1778
1886
  :param total_timeout: Total timeout for the entire operation. The maximum timeout is 1 hour (yes, it can exceed the AWS Lambda 15 minutes) Default: Duration.minutes(30)
1779
1887
  :param vpc: The vpc to provision the lambda functions in. Default: - functions are not provisioned inside a vpc.
1780
1888
  :param vpc_subnets: Which subnets from the VPC to place the lambda functions in. Only used if 'vpc' is supplied. Note: internet access for Lambdas requires a NAT gateway, so picking Public subnets is not allowed. Default: - the Vpc default strategy if not specified
1889
+ :param waiter_state_machine_log_options: Defines what execution history events of the waiter state machine are logged and where they are logged. Default: - A default log group will be created if logging for the waiter state machine is enabled.
1781
1890
 
1782
1891
  :exampleMetadata: infused
1783
1892
 
@@ -1797,9 +1906,12 @@ class ProviderProps:
1797
1906
  '''
1798
1907
  if isinstance(vpc_subnets, dict):
1799
1908
  vpc_subnets = _SubnetSelection_e57d76df(**vpc_subnets)
1909
+ if isinstance(waiter_state_machine_log_options, dict):
1910
+ waiter_state_machine_log_options = LogOptions(**waiter_state_machine_log_options)
1800
1911
  if __debug__:
1801
1912
  type_hints = typing.get_type_hints(_typecheckingstub__32b03803ee02437d8d83814282c700ede5633030e4d9f7ebdaf3b9d075b0cbdb)
1802
1913
  check_type(argname="argument on_event_handler", value=on_event_handler, expected_type=type_hints["on_event_handler"])
1914
+ check_type(argname="argument disable_waiter_state_machine_logging", value=disable_waiter_state_machine_logging, expected_type=type_hints["disable_waiter_state_machine_logging"])
1803
1915
  check_type(argname="argument is_complete_handler", value=is_complete_handler, expected_type=type_hints["is_complete_handler"])
1804
1916
  check_type(argname="argument log_retention", value=log_retention, expected_type=type_hints["log_retention"])
1805
1917
  check_type(argname="argument provider_function_env_encryption", value=provider_function_env_encryption, expected_type=type_hints["provider_function_env_encryption"])
@@ -1810,9 +1922,12 @@ class ProviderProps:
1810
1922
  check_type(argname="argument total_timeout", value=total_timeout, expected_type=type_hints["total_timeout"])
1811
1923
  check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
1812
1924
  check_type(argname="argument vpc_subnets", value=vpc_subnets, expected_type=type_hints["vpc_subnets"])
1925
+ check_type(argname="argument waiter_state_machine_log_options", value=waiter_state_machine_log_options, expected_type=type_hints["waiter_state_machine_log_options"])
1813
1926
  self._values: typing.Dict[builtins.str, typing.Any] = {
1814
1927
  "on_event_handler": on_event_handler,
1815
1928
  }
1929
+ if disable_waiter_state_machine_logging is not None:
1930
+ self._values["disable_waiter_state_machine_logging"] = disable_waiter_state_machine_logging
1816
1931
  if is_complete_handler is not None:
1817
1932
  self._values["is_complete_handler"] = is_complete_handler
1818
1933
  if log_retention is not None:
@@ -1833,6 +1948,8 @@ class ProviderProps:
1833
1948
  self._values["vpc"] = vpc
1834
1949
  if vpc_subnets is not None:
1835
1950
  self._values["vpc_subnets"] = vpc_subnets
1951
+ if waiter_state_machine_log_options is not None:
1952
+ self._values["waiter_state_machine_log_options"] = waiter_state_machine_log_options
1836
1953
 
1837
1954
  @builtins.property
1838
1955
  def on_event_handler(self) -> _IFunction_6adb0ab8:
@@ -1847,6 +1964,15 @@ class ProviderProps:
1847
1964
  assert result is not None, "Required property 'on_event_handler' is missing"
1848
1965
  return typing.cast(_IFunction_6adb0ab8, result)
1849
1966
 
1967
+ @builtins.property
1968
+ def disable_waiter_state_machine_logging(self) -> typing.Optional[builtins.bool]:
1969
+ '''Whether logging for the waiter state machine is disabled.
1970
+
1971
+ :default: - false
1972
+ '''
1973
+ result = self._values.get("disable_waiter_state_machine_logging")
1974
+ return typing.cast(typing.Optional[builtins.bool], result)
1975
+
1850
1976
  @builtins.property
1851
1977
  def is_complete_handler(self) -> typing.Optional[_IFunction_6adb0ab8]:
1852
1978
  '''The AWS Lambda function to invoke in order to determine if the operation is complete.
@@ -1968,6 +2094,15 @@ class ProviderProps:
1968
2094
  result = self._values.get("vpc_subnets")
1969
2095
  return typing.cast(typing.Optional[_SubnetSelection_e57d76df], result)
1970
2096
 
2097
+ @builtins.property
2098
+ def waiter_state_machine_log_options(self) -> typing.Optional[LogOptions]:
2099
+ '''Defines what execution history events of the waiter state machine are logged and where they are logged.
2100
+
2101
+ :default: - A default log group will be created if logging for the waiter state machine is enabled.
2102
+ '''
2103
+ result = self._values.get("waiter_state_machine_log_options")
2104
+ return typing.cast(typing.Optional[LogOptions], result)
2105
+
1971
2106
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
1972
2107
  return isinstance(rhs, self.__class__) and rhs._values == self._values
1973
2108
 
@@ -2045,16 +2180,276 @@ class SdkCallsPolicyOptions:
2045
2180
  )
2046
2181
 
2047
2182
 
2183
+ class WaiterStateMachine(
2184
+ _constructs_77d1e7e8.Construct,
2185
+ metaclass=jsii.JSIIMeta,
2186
+ jsii_type="aws-cdk-lib.custom_resources.WaiterStateMachine",
2187
+ ):
2188
+ '''A very simple StateMachine construct highly customized to the provider framework.
2189
+
2190
+ We previously used ``CfnResource`` instead of ``CfnStateMachine`` to avoid depending
2191
+ on ``aws-stepfunctions`` module, but now it is okay.
2192
+
2193
+ The state machine continuously calls the isCompleteHandler, until it succeeds or times out.
2194
+ The handler is called ``maxAttempts`` times with an ``interval`` duration and a ``backoffRate`` rate.
2195
+
2196
+ :exampleMetadata: fixture=_generated
2197
+
2198
+ Example::
2199
+
2200
+ # The code below shows an example of how to instantiate this type.
2201
+ # The values are placeholders you should change.
2202
+ import aws_cdk as cdk
2203
+ from aws_cdk import aws_lambda as lambda_
2204
+ from aws_cdk import aws_logs as logs
2205
+ from aws_cdk import aws_stepfunctions as stepfunctions
2206
+ from aws_cdk import custom_resources
2207
+
2208
+ # function_: lambda.Function
2209
+ # log_group: logs.LogGroup
2210
+
2211
+ waiter_state_machine = custom_resources.WaiterStateMachine(self, "MyWaiterStateMachine",
2212
+ backoff_rate=123,
2213
+ interval=cdk.Duration.minutes(30),
2214
+ is_complete_handler=function_,
2215
+ max_attempts=123,
2216
+ timeout_handler=function_,
2217
+
2218
+ # the properties below are optional
2219
+ disable_logging=False,
2220
+ log_options=custom_resources.LogOptions(
2221
+ destination=log_group,
2222
+ include_execution_data=False,
2223
+ level=stepfunctions.LogLevel.OFF
2224
+ )
2225
+ )
2226
+ '''
2227
+
2228
+ def __init__(
2229
+ self,
2230
+ scope: _constructs_77d1e7e8.Construct,
2231
+ id: builtins.str,
2232
+ *,
2233
+ backoff_rate: jsii.Number,
2234
+ interval: _Duration_4839e8c3,
2235
+ is_complete_handler: _IFunction_6adb0ab8,
2236
+ max_attempts: jsii.Number,
2237
+ timeout_handler: _IFunction_6adb0ab8,
2238
+ disable_logging: typing.Optional[builtins.bool] = None,
2239
+ log_options: typing.Optional[typing.Union[LogOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2240
+ ) -> None:
2241
+ '''
2242
+ :param scope: -
2243
+ :param id: -
2244
+ :param backoff_rate: Backoff between attempts.
2245
+ :param interval: The interval to wait between attempts.
2246
+ :param is_complete_handler: The main handler that notifies if the waiter to decide 'complete' or 'incomplete'.
2247
+ :param max_attempts: Number of attempts.
2248
+ :param timeout_handler: The handler to call if the waiter times out and is incomplete.
2249
+ :param disable_logging: Whether logging for the state machine is disabled. Default: - false
2250
+ :param log_options: Defines what execution history events are logged and where they are logged. Default: - A default log group will be created if logging is enabled.
2251
+ '''
2252
+ if __debug__:
2253
+ type_hints = typing.get_type_hints(_typecheckingstub__12427b739f326cdb535d2aaf4a70f10977eec5711902d4e5e395f0b8c9bb184e)
2254
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
2255
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
2256
+ props = WaiterStateMachineProps(
2257
+ backoff_rate=backoff_rate,
2258
+ interval=interval,
2259
+ is_complete_handler=is_complete_handler,
2260
+ max_attempts=max_attempts,
2261
+ timeout_handler=timeout_handler,
2262
+ disable_logging=disable_logging,
2263
+ log_options=log_options,
2264
+ )
2265
+
2266
+ jsii.create(self.__class__, self, [scope, id, props])
2267
+
2268
+ @jsii.member(jsii_name="grantStartExecution")
2269
+ def grant_start_execution(self, identity: _IGrantable_71c4f5de) -> _Grant_a7ae64f8:
2270
+ '''Grant the given identity permissions on StartExecution of the state machine.
2271
+
2272
+ :param identity: -
2273
+ '''
2274
+ if __debug__:
2275
+ type_hints = typing.get_type_hints(_typecheckingstub__2c3d1c306ca04ebd1194ce4f97bed6aa9510a02067654b39f43a1ecef601e3db)
2276
+ check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
2277
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantStartExecution", [identity]))
2278
+
2279
+ @builtins.property
2280
+ @jsii.member(jsii_name="stateMachineArn")
2281
+ def state_machine_arn(self) -> builtins.str:
2282
+ '''The ARN of the state machine.'''
2283
+ return typing.cast(builtins.str, jsii.get(self, "stateMachineArn"))
2284
+
2285
+
2286
+ @jsii.data_type(
2287
+ jsii_type="aws-cdk-lib.custom_resources.WaiterStateMachineProps",
2288
+ jsii_struct_bases=[],
2289
+ name_mapping={
2290
+ "backoff_rate": "backoffRate",
2291
+ "interval": "interval",
2292
+ "is_complete_handler": "isCompleteHandler",
2293
+ "max_attempts": "maxAttempts",
2294
+ "timeout_handler": "timeoutHandler",
2295
+ "disable_logging": "disableLogging",
2296
+ "log_options": "logOptions",
2297
+ },
2298
+ )
2299
+ class WaiterStateMachineProps:
2300
+ def __init__(
2301
+ self,
2302
+ *,
2303
+ backoff_rate: jsii.Number,
2304
+ interval: _Duration_4839e8c3,
2305
+ is_complete_handler: _IFunction_6adb0ab8,
2306
+ max_attempts: jsii.Number,
2307
+ timeout_handler: _IFunction_6adb0ab8,
2308
+ disable_logging: typing.Optional[builtins.bool] = None,
2309
+ log_options: typing.Optional[typing.Union[LogOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2310
+ ) -> None:
2311
+ '''Initialization properties for the ``WaiterStateMachine`` construct.
2312
+
2313
+ :param backoff_rate: Backoff between attempts.
2314
+ :param interval: The interval to wait between attempts.
2315
+ :param is_complete_handler: The main handler that notifies if the waiter to decide 'complete' or 'incomplete'.
2316
+ :param max_attempts: Number of attempts.
2317
+ :param timeout_handler: The handler to call if the waiter times out and is incomplete.
2318
+ :param disable_logging: Whether logging for the state machine is disabled. Default: - false
2319
+ :param log_options: Defines what execution history events are logged and where they are logged. Default: - A default log group will be created if logging is enabled.
2320
+
2321
+ :exampleMetadata: fixture=_generated
2322
+
2323
+ Example::
2324
+
2325
+ # The code below shows an example of how to instantiate this type.
2326
+ # The values are placeholders you should change.
2327
+ import aws_cdk as cdk
2328
+ from aws_cdk import aws_lambda as lambda_
2329
+ from aws_cdk import aws_logs as logs
2330
+ from aws_cdk import aws_stepfunctions as stepfunctions
2331
+ from aws_cdk import custom_resources
2332
+
2333
+ # function_: lambda.Function
2334
+ # log_group: logs.LogGroup
2335
+
2336
+ waiter_state_machine_props = custom_resources.WaiterStateMachineProps(
2337
+ backoff_rate=123,
2338
+ interval=cdk.Duration.minutes(30),
2339
+ is_complete_handler=function_,
2340
+ max_attempts=123,
2341
+ timeout_handler=function_,
2342
+
2343
+ # the properties below are optional
2344
+ disable_logging=False,
2345
+ log_options=custom_resources.LogOptions(
2346
+ destination=log_group,
2347
+ include_execution_data=False,
2348
+ level=stepfunctions.LogLevel.OFF
2349
+ )
2350
+ )
2351
+ '''
2352
+ if isinstance(log_options, dict):
2353
+ log_options = LogOptions(**log_options)
2354
+ if __debug__:
2355
+ type_hints = typing.get_type_hints(_typecheckingstub__569ff1333551048ad82f7261bcf43cbefe118e974cba179165c355fc9347fc13)
2356
+ check_type(argname="argument backoff_rate", value=backoff_rate, expected_type=type_hints["backoff_rate"])
2357
+ check_type(argname="argument interval", value=interval, expected_type=type_hints["interval"])
2358
+ check_type(argname="argument is_complete_handler", value=is_complete_handler, expected_type=type_hints["is_complete_handler"])
2359
+ check_type(argname="argument max_attempts", value=max_attempts, expected_type=type_hints["max_attempts"])
2360
+ check_type(argname="argument timeout_handler", value=timeout_handler, expected_type=type_hints["timeout_handler"])
2361
+ check_type(argname="argument disable_logging", value=disable_logging, expected_type=type_hints["disable_logging"])
2362
+ check_type(argname="argument log_options", value=log_options, expected_type=type_hints["log_options"])
2363
+ self._values: typing.Dict[builtins.str, typing.Any] = {
2364
+ "backoff_rate": backoff_rate,
2365
+ "interval": interval,
2366
+ "is_complete_handler": is_complete_handler,
2367
+ "max_attempts": max_attempts,
2368
+ "timeout_handler": timeout_handler,
2369
+ }
2370
+ if disable_logging is not None:
2371
+ self._values["disable_logging"] = disable_logging
2372
+ if log_options is not None:
2373
+ self._values["log_options"] = log_options
2374
+
2375
+ @builtins.property
2376
+ def backoff_rate(self) -> jsii.Number:
2377
+ '''Backoff between attempts.'''
2378
+ result = self._values.get("backoff_rate")
2379
+ assert result is not None, "Required property 'backoff_rate' is missing"
2380
+ return typing.cast(jsii.Number, result)
2381
+
2382
+ @builtins.property
2383
+ def interval(self) -> _Duration_4839e8c3:
2384
+ '''The interval to wait between attempts.'''
2385
+ result = self._values.get("interval")
2386
+ assert result is not None, "Required property 'interval' is missing"
2387
+ return typing.cast(_Duration_4839e8c3, result)
2388
+
2389
+ @builtins.property
2390
+ def is_complete_handler(self) -> _IFunction_6adb0ab8:
2391
+ '''The main handler that notifies if the waiter to decide 'complete' or 'incomplete'.'''
2392
+ result = self._values.get("is_complete_handler")
2393
+ assert result is not None, "Required property 'is_complete_handler' is missing"
2394
+ return typing.cast(_IFunction_6adb0ab8, result)
2395
+
2396
+ @builtins.property
2397
+ def max_attempts(self) -> jsii.Number:
2398
+ '''Number of attempts.'''
2399
+ result = self._values.get("max_attempts")
2400
+ assert result is not None, "Required property 'max_attempts' is missing"
2401
+ return typing.cast(jsii.Number, result)
2402
+
2403
+ @builtins.property
2404
+ def timeout_handler(self) -> _IFunction_6adb0ab8:
2405
+ '''The handler to call if the waiter times out and is incomplete.'''
2406
+ result = self._values.get("timeout_handler")
2407
+ assert result is not None, "Required property 'timeout_handler' is missing"
2408
+ return typing.cast(_IFunction_6adb0ab8, result)
2409
+
2410
+ @builtins.property
2411
+ def disable_logging(self) -> typing.Optional[builtins.bool]:
2412
+ '''Whether logging for the state machine is disabled.
2413
+
2414
+ :default: - false
2415
+ '''
2416
+ result = self._values.get("disable_logging")
2417
+ return typing.cast(typing.Optional[builtins.bool], result)
2418
+
2419
+ @builtins.property
2420
+ def log_options(self) -> typing.Optional[LogOptions]:
2421
+ '''Defines what execution history events are logged and where they are logged.
2422
+
2423
+ :default: - A default log group will be created if logging is enabled.
2424
+ '''
2425
+ result = self._values.get("log_options")
2426
+ return typing.cast(typing.Optional[LogOptions], result)
2427
+
2428
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
2429
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
2430
+
2431
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
2432
+ return not (rhs == self)
2433
+
2434
+ def __repr__(self) -> str:
2435
+ return "WaiterStateMachineProps(%s)" % ", ".join(
2436
+ k + "=" + repr(v) for k, v in self._values.items()
2437
+ )
2438
+
2439
+
2048
2440
  __all__ = [
2049
2441
  "AwsCustomResource",
2050
2442
  "AwsCustomResourcePolicy",
2051
2443
  "AwsCustomResourceProps",
2052
2444
  "AwsSdkCall",
2445
+ "LogOptions",
2053
2446
  "PhysicalResourceId",
2054
2447
  "PhysicalResourceIdReference",
2055
2448
  "Provider",
2056
2449
  "ProviderProps",
2057
2450
  "SdkCallsPolicyOptions",
2451
+ "WaiterStateMachine",
2452
+ "WaiterStateMachineProps",
2058
2453
  ]
2059
2454
 
2060
2455
  publication.publish()
@@ -2132,6 +2527,15 @@ def _typecheckingstub__af7bb124668b93c6ce7d641df2daeabfe424e271742385a76e7e56ec9
2132
2527
  """Type checking stubs"""
2133
2528
  pass
2134
2529
 
2530
+ def _typecheckingstub__2622296f61199d2b10825c21d976c0578e9488ad1b2b7635565f604c598734b7(
2531
+ *,
2532
+ destination: typing.Optional[_ILogGroup_3c4fa718] = None,
2533
+ include_execution_data: typing.Optional[builtins.bool] = None,
2534
+ level: typing.Optional[_LogLevel_be1990fe] = None,
2535
+ ) -> None:
2536
+ """Type checking stubs"""
2537
+ pass
2538
+
2135
2539
  def _typecheckingstub__6baa8764ccdf77f11bd8f80af9fafec69f56b719c1a237caae55c7f988e174b6(
2136
2540
  response_path: builtins.str,
2137
2541
  ) -> None:
@@ -2155,6 +2559,7 @@ def _typecheckingstub__29415d7bf7977fcf110b77ce69cec309dcf0404601944735020770ddf
2155
2559
  id: builtins.str,
2156
2560
  *,
2157
2561
  on_event_handler: _IFunction_6adb0ab8,
2562
+ disable_waiter_state_machine_logging: typing.Optional[builtins.bool] = None,
2158
2563
  is_complete_handler: typing.Optional[_IFunction_6adb0ab8] = None,
2159
2564
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
2160
2565
  provider_function_env_encryption: typing.Optional[_IKey_5f11635f] = None,
@@ -2165,6 +2570,7 @@ def _typecheckingstub__29415d7bf7977fcf110b77ce69cec309dcf0404601944735020770ddf
2165
2570
  total_timeout: typing.Optional[_Duration_4839e8c3] = None,
2166
2571
  vpc: typing.Optional[_IVpc_f30d5663] = None,
2167
2572
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
2573
+ waiter_state_machine_log_options: typing.Optional[typing.Union[LogOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2168
2574
  ) -> None:
2169
2575
  """Type checking stubs"""
2170
2576
  pass
@@ -2172,6 +2578,7 @@ def _typecheckingstub__29415d7bf7977fcf110b77ce69cec309dcf0404601944735020770ddf
2172
2578
  def _typecheckingstub__32b03803ee02437d8d83814282c700ede5633030e4d9f7ebdaf3b9d075b0cbdb(
2173
2579
  *,
2174
2580
  on_event_handler: _IFunction_6adb0ab8,
2581
+ disable_waiter_state_machine_logging: typing.Optional[builtins.bool] = None,
2175
2582
  is_complete_handler: typing.Optional[_IFunction_6adb0ab8] = None,
2176
2583
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
2177
2584
  provider_function_env_encryption: typing.Optional[_IKey_5f11635f] = None,
@@ -2182,6 +2589,7 @@ def _typecheckingstub__32b03803ee02437d8d83814282c700ede5633030e4d9f7ebdaf3b9d07
2182
2589
  total_timeout: typing.Optional[_Duration_4839e8c3] = None,
2183
2590
  vpc: typing.Optional[_IVpc_f30d5663] = None,
2184
2591
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
2592
+ waiter_state_machine_log_options: typing.Optional[typing.Union[LogOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2185
2593
  ) -> None:
2186
2594
  """Type checking stubs"""
2187
2595
  pass
@@ -2192,3 +2600,37 @@ def _typecheckingstub__0cd00e8add38e42b6c4d7db0390a899ccaf5bbe0367bfb387986125da
2192
2600
  ) -> None:
2193
2601
  """Type checking stubs"""
2194
2602
  pass
2603
+
2604
+ def _typecheckingstub__12427b739f326cdb535d2aaf4a70f10977eec5711902d4e5e395f0b8c9bb184e(
2605
+ scope: _constructs_77d1e7e8.Construct,
2606
+ id: builtins.str,
2607
+ *,
2608
+ backoff_rate: jsii.Number,
2609
+ interval: _Duration_4839e8c3,
2610
+ is_complete_handler: _IFunction_6adb0ab8,
2611
+ max_attempts: jsii.Number,
2612
+ timeout_handler: _IFunction_6adb0ab8,
2613
+ disable_logging: typing.Optional[builtins.bool] = None,
2614
+ log_options: typing.Optional[typing.Union[LogOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2615
+ ) -> None:
2616
+ """Type checking stubs"""
2617
+ pass
2618
+
2619
+ def _typecheckingstub__2c3d1c306ca04ebd1194ce4f97bed6aa9510a02067654b39f43a1ecef601e3db(
2620
+ identity: _IGrantable_71c4f5de,
2621
+ ) -> None:
2622
+ """Type checking stubs"""
2623
+ pass
2624
+
2625
+ def _typecheckingstub__569ff1333551048ad82f7261bcf43cbefe118e974cba179165c355fc9347fc13(
2626
+ *,
2627
+ backoff_rate: jsii.Number,
2628
+ interval: _Duration_4839e8c3,
2629
+ is_complete_handler: _IFunction_6adb0ab8,
2630
+ max_attempts: jsii.Number,
2631
+ timeout_handler: _IFunction_6adb0ab8,
2632
+ disable_logging: typing.Optional[builtins.bool] = None,
2633
+ log_options: typing.Optional[typing.Union[LogOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2634
+ ) -> None:
2635
+ """Type checking stubs"""
2636
+ pass
@@ -451,7 +451,7 @@ class TriggerFunction(
451
451
  :param execute_before: Adds this trigger as a dependency on other constructs. This means that this trigger will get executed *before* the given construct(s). You can also use ``trigger.executeBefore()`` to add additional dependants. Default: []
452
452
  :param execute_on_handler_change: Re-executes the trigger every time the handler changes. This implies that the trigger is associated with the ``currentVersion`` of the handler, which gets recreated every time the handler or its configuration is updated. Default: true
453
453
  :param adot_instrumentation: Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation. Default: - No ADOT instrumentation
454
- :param allow_all_outbound: Whether to allow the Lambda to send all network traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets. Default: true
454
+ :param allow_all_outbound: Whether to allow the Lambda to send all network traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets. Do not specify this property if the ``securityGroups`` or ``securityGroup`` property is set. Instead, configure ``allowAllOutbound`` directly on the security group. Default: true
455
455
  :param allow_public_subnet: Lambda Functions in a public subnet can NOT access the internet. Use this property to acknowledge this limitation and still place the function in a public subnet. Default: false
456
456
  :param application_log_level: Sets the application log level for the function. Default: INFO
457
457
  :param architecture: The system architectures compatible with this lambda function. Default: Architecture.X86_64
@@ -974,7 +974,7 @@ class TriggerFunctionProps(_FunctionProps_a308e854, TriggerOptions):
974
974
  :param on_success: The destination for successful invocations. Default: - no destination
975
975
  :param retry_attempts: The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2 Default: 2
976
976
  :param adot_instrumentation: Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation. Default: - No ADOT instrumentation
977
- :param allow_all_outbound: Whether to allow the Lambda to send all network traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets. Default: true
977
+ :param allow_all_outbound: Whether to allow the Lambda to send all network traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets. Do not specify this property if the ``securityGroups`` or ``securityGroup`` property is set. Instead, configure ``allowAllOutbound`` directly on the security group. Default: true
978
978
  :param allow_public_subnet: Lambda Functions in a public subnet can NOT access the internet. Use this property to acknowledge this limitation and still place the function in a public subnet. Default: false
979
979
  :param application_log_level: Sets the application log level for the function. Default: INFO
980
980
  :param architecture: The system architectures compatible with this lambda function. Default: Architecture.X86_64
@@ -1251,6 +1251,9 @@ class TriggerFunctionProps(_FunctionProps_a308e854, TriggerOptions):
1251
1251
  If set to false, you must individually add traffic rules to allow the
1252
1252
  Lambda to connect to network targets.
1253
1253
 
1254
+ Do not specify this property if the ``securityGroups`` or ``securityGroup`` property is set.
1255
+ Instead, configure ``allowAllOutbound`` directly on the security group.
1256
+
1254
1257
  :default: true
1255
1258
  '''
1256
1259
  result = self._values.get("allow_all_outbound")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aws-cdk-lib
3
- Version: 2.115.0
3
+ Version: 2.116.1
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