aws-cdk-lib 2.130.0__py3-none-any.whl → 2.131.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 (72) hide show
  1. aws_cdk/__init__.py +41 -21
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.130.0.jsii.tgz → aws-cdk-lib@2.131.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigatewayv2/__init__.py +52 -11
  5. aws_cdk/aws_apigatewayv2_integrations/__init__.py +286 -0
  6. aws_cdk/aws_appconfig/__init__.py +36 -5
  7. aws_cdk/aws_applicationautoscaling/__init__.py +80 -123
  8. aws_cdk/aws_applicationinsights/__init__.py +48 -0
  9. aws_cdk/aws_apprunner/__init__.py +8 -1
  10. aws_cdk/aws_appstream/__init__.py +8 -1
  11. aws_cdk/aws_appsync/__init__.py +324 -103
  12. aws_cdk/aws_athena/__init__.py +8 -1
  13. aws_cdk/aws_b2bi/__init__.py +30 -4
  14. aws_cdk/aws_backup/__init__.py +77 -53
  15. aws_cdk/aws_cleanrooms/__init__.py +37 -5
  16. aws_cdk/aws_cloudtrail/__init__.py +23 -1
  17. aws_cdk/aws_codebuild/__init__.py +8 -1
  18. aws_cdk/aws_codestarconnections/__init__.py +8 -1
  19. aws_cdk/aws_cognito/__init__.py +21 -21
  20. aws_cdk/aws_comprehend/__init__.py +8 -1
  21. aws_cdk/aws_connect/__init__.py +57 -8
  22. aws_cdk/aws_controltower/__init__.py +27 -7
  23. aws_cdk/aws_customerprofiles/__init__.py +136 -123
  24. aws_cdk/aws_datapipeline/__init__.py +19 -11
  25. aws_cdk/aws_datasync/__init__.py +8 -1
  26. aws_cdk/aws_datazone/__init__.py +9 -1
  27. aws_cdk/aws_dms/__init__.py +29 -4
  28. aws_cdk/aws_docdb/__init__.py +131 -5
  29. aws_cdk/aws_ec2/__init__.py +178 -65
  30. aws_cdk/aws_ecs/__init__.py +43 -51
  31. aws_cdk/aws_ecs_patterns/__init__.py +214 -0
  32. aws_cdk/aws_eks/__init__.py +43 -2
  33. aws_cdk/aws_elasticache/__init__.py +8 -1
  34. aws_cdk/aws_elasticloadbalancingv2/__init__.py +8 -1
  35. aws_cdk/aws_emr/__init__.py +8 -1
  36. aws_cdk/aws_entityresolution/__init__.py +23 -3
  37. aws_cdk/aws_events/__init__.py +12 -1
  38. aws_cdk/aws_fms/__init__.py +8 -1
  39. aws_cdk/aws_glue/__init__.py +18 -4
  40. aws_cdk/aws_healthimaging/__init__.py +9 -1
  41. aws_cdk/aws_inspectorv2/__init__.py +9 -1
  42. aws_cdk/aws_iot/__init__.py +29 -4
  43. aws_cdk/aws_ivs/__init__.py +8 -1
  44. aws_cdk/aws_kms/__init__.py +1 -1
  45. aws_cdk/aws_lambda/__init__.py +3 -5
  46. aws_cdk/aws_location/__init__.py +44 -6
  47. aws_cdk/aws_logs/__init__.py +22 -3
  48. aws_cdk/aws_macie/__init__.py +15 -2
  49. aws_cdk/aws_medialive/__init__.py +8 -1
  50. aws_cdk/aws_mediapackagev2/__init__.py +23 -3
  51. aws_cdk/aws_mediatailor/__init__.py +29 -4
  52. aws_cdk/aws_msk/__init__.py +8 -1
  53. aws_cdk/aws_neptunegraph/__init__.py +9 -1
  54. aws_cdk/aws_networkfirewall/__init__.py +8 -1
  55. aws_cdk/aws_pcaconnectorad/__init__.py +23 -3
  56. aws_cdk/aws_pinpointemail/__init__.py +23 -3
  57. aws_cdk/aws_quicksight/__init__.py +37 -0
  58. aws_cdk/aws_rds/__init__.py +47 -4
  59. aws_cdk/aws_route53resolver/__init__.py +8 -1
  60. aws_cdk/aws_s3/__init__.py +29 -4
  61. aws_cdk/aws_sagemaker/__init__.py +19 -8
  62. aws_cdk/aws_securityhub/__init__.py +8 -1
  63. aws_cdk/aws_shield/__init__.py +16 -2
  64. aws_cdk/aws_workspacesthinclient/__init__.py +9 -1
  65. aws_cdk/aws_workspacesweb/__init__.py +51 -7
  66. aws_cdk/aws_xray/__init__.py +16 -2
  67. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/METADATA +1 -1
  68. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/RECORD +72 -72
  69. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/LICENSE +0 -0
  70. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/NOTICE +0 -0
  71. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/WHEEL +0 -0
  72. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/top_level.txt +0 -0
aws_cdk/__init__.py CHANGED
@@ -12613,12 +12613,18 @@ class Expiration(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.Expiration"):
12613
12613
  @jsii.data_type(
12614
12614
  jsii_type="aws-cdk-lib.ExportValueOptions",
12615
12615
  jsii_struct_bases=[],
12616
- name_mapping={"name": "name"},
12616
+ name_mapping={"description": "description", "name": "name"},
12617
12617
  )
12618
12618
  class ExportValueOptions:
12619
- def __init__(self, *, name: typing.Optional[builtins.str] = None) -> None:
12619
+ def __init__(
12620
+ self,
12621
+ *,
12622
+ description: typing.Optional[builtins.str] = None,
12623
+ name: typing.Optional[builtins.str] = None,
12624
+ ) -> None:
12620
12625
  '''Options for the ``stack.exportValue()`` method.
12621
12626
 
12627
+ :param description: The description of the outputs. Default: - No description
12622
12628
  :param name: The name of the export to create. Default: - A name is automatically chosen
12623
12629
 
12624
12630
  :exampleMetadata: fixture=_generated
@@ -12630,16 +12636,29 @@ class ExportValueOptions:
12630
12636
  import aws_cdk as cdk
12631
12637
 
12632
12638
  export_value_options = cdk.ExportValueOptions(
12639
+ description="description",
12633
12640
  name="name"
12634
12641
  )
12635
12642
  '''
12636
12643
  if __debug__:
12637
12644
  type_hints = typing.get_type_hints(_typecheckingstub__03cd5df1b4b793501aa18abc1ba0ae9423e6661d00a8437be18434d086a1ba09)
12645
+ check_type(argname="argument description", value=description, expected_type=type_hints["description"])
12638
12646
  check_type(argname="argument name", value=name, expected_type=type_hints["name"])
12639
12647
  self._values: typing.Dict[builtins.str, typing.Any] = {}
12648
+ if description is not None:
12649
+ self._values["description"] = description
12640
12650
  if name is not None:
12641
12651
  self._values["name"] = name
12642
12652
 
12653
+ @builtins.property
12654
+ def description(self) -> typing.Optional[builtins.str]:
12655
+ '''The description of the outputs.
12656
+
12657
+ :default: - No description
12658
+ '''
12659
+ result = self._values.get("description")
12660
+ return typing.cast(typing.Optional[builtins.str], result)
12661
+
12643
12662
  @builtins.property
12644
12663
  def name(self) -> typing.Optional[builtins.str]:
12645
12664
  '''The name of the export to create.
@@ -18032,25 +18051,19 @@ class RemovalPolicy(enum.Enum):
18032
18051
 
18033
18052
  Example::
18034
18053
 
18035
- import aws_cdk as cdk
18036
-
18037
-
18038
- app = cdk.App()
18039
- stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
18054
+ # my_role: iam.Role
18040
18055
 
18041
- global_table = dynamodb.TableV2(stack, "GlobalTable",
18042
- partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
18043
- removal_policy=cdk.RemovalPolicy.DESTROY,
18044
- deletion_protection=True,
18045
- # only the replica in us-east-1 will be deleted during stack deletion
18046
- replicas=[dynamodb.ReplicaTableProps(
18047
- region="us-east-1",
18048
- deletion_protection=False
18049
- ), dynamodb.ReplicaTableProps(
18050
- region="us-east-2",
18051
- deletion_protection=True
18056
+ cr.AwsCustomResource(self, "Customized",
18057
+ role=my_role, # must be assumable by the `lambda.amazonaws.com` service principal
18058
+ timeout=Duration.minutes(10), # defaults to 2 minutes
18059
+ log_group=logs.LogGroup(self, "AwsCustomResourceLogs",
18060
+ retention=logs.RetentionDays.ONE_DAY
18061
+ ),
18062
+ function_name="my-custom-name", # defaults to a CloudFormation generated name
18063
+ removal_policy=RemovalPolicy.RETAIN, # defaults to `RemovalPolicy.DESTROY`
18064
+ policy=cr.AwsCustomResourcePolicy.from_sdk_calls(
18065
+ resources=cr.AwsCustomResourcePolicy.ANY_RESOURCE
18052
18066
  )
18053
- ]
18054
18067
  )
18055
18068
  '''
18056
18069
 
@@ -19920,6 +19933,7 @@ class Stack(
19920
19933
  self,
19921
19934
  exported_value: typing.Any,
19922
19935
  *,
19936
+ description: typing.Optional[builtins.str] = None,
19923
19937
  name: typing.Optional[builtins.str] = None,
19924
19938
  ) -> typing.List[builtins.str]:
19925
19939
  '''Create a CloudFormation Export for a string list value.
@@ -19943,12 +19957,13 @@ class Stack(
19943
19957
  See ``exportValue`` for an example of this process.
19944
19958
 
19945
19959
  :param exported_value: -
19960
+ :param description: The description of the outputs. Default: - No description
19946
19961
  :param name: The name of the export to create. Default: - A name is automatically chosen
19947
19962
  '''
19948
19963
  if __debug__:
19949
19964
  type_hints = typing.get_type_hints(_typecheckingstub__faa2c6c50018e9e3d11357c477c01bc5738821f06996cbccc7f4742576fd0bc6)
19950
19965
  check_type(argname="argument exported_value", value=exported_value, expected_type=type_hints["exported_value"])
19951
- options = ExportValueOptions(name=name)
19966
+ options = ExportValueOptions(description=description, name=name)
19952
19967
 
19953
19968
  return typing.cast(typing.List[builtins.str], jsii.invoke(self, "exportStringListValue", [exported_value, options]))
19954
19969
 
@@ -19957,6 +19972,7 @@ class Stack(
19957
19972
  self,
19958
19973
  exported_value: typing.Any,
19959
19974
  *,
19975
+ description: typing.Optional[builtins.str] = None,
19960
19976
  name: typing.Optional[builtins.str] = None,
19961
19977
  ) -> builtins.str:
19962
19978
  '''Create a CloudFormation Export for a string value.
@@ -20009,12 +20025,13 @@ class Stack(
20009
20025
  - Deploy again (this time only the ``producerStack`` will be changed -- the bucket will be deleted).
20010
20026
 
20011
20027
  :param exported_value: -
20028
+ :param description: The description of the outputs. Default: - No description
20012
20029
  :param name: The name of the export to create. Default: - A name is automatically chosen
20013
20030
  '''
20014
20031
  if __debug__:
20015
20032
  type_hints = typing.get_type_hints(_typecheckingstub__bdfd896d61326907c01ae729a53da036fa27f4187a875c48919eebc0badd0cd0)
20016
20033
  check_type(argname="argument exported_value", value=exported_value, expected_type=type_hints["exported_value"])
20017
- options = ExportValueOptions(name=name)
20034
+ options = ExportValueOptions(description=description, name=name)
20018
20035
 
20019
20036
  return typing.cast(builtins.str, jsii.invoke(self, "exportValue", [exported_value, options]))
20020
20037
 
@@ -35618,6 +35635,7 @@ def _typecheckingstub__dc6818df505088eacca22c0f0266f3c1617959e13b5241f901c71411d
35618
35635
 
35619
35636
  def _typecheckingstub__03cd5df1b4b793501aa18abc1ba0ae9423e6661d00a8437be18434d086a1ba09(
35620
35637
  *,
35638
+ description: typing.Optional[builtins.str] = None,
35621
35639
  name: typing.Optional[builtins.str] = None,
35622
35640
  ) -> None:
35623
35641
  """Type checking stubs"""
@@ -36747,6 +36765,7 @@ def _typecheckingstub__235fe1ed5ac633557e7613d012412725b6f4766ba2e38556a0731a6f0
36747
36765
  def _typecheckingstub__faa2c6c50018e9e3d11357c477c01bc5738821f06996cbccc7f4742576fd0bc6(
36748
36766
  exported_value: typing.Any,
36749
36767
  *,
36768
+ description: typing.Optional[builtins.str] = None,
36750
36769
  name: typing.Optional[builtins.str] = None,
36751
36770
  ) -> None:
36752
36771
  """Type checking stubs"""
@@ -36755,6 +36774,7 @@ def _typecheckingstub__faa2c6c50018e9e3d11357c477c01bc5738821f06996cbccc7f474257
36755
36774
  def _typecheckingstub__bdfd896d61326907c01ae729a53da036fa27f4187a875c48919eebc0badd0cd0(
36756
36775
  exported_value: typing.Any,
36757
36776
  *,
36777
+ description: typing.Optional[builtins.str] = None,
36758
36778
  name: typing.Optional[builtins.str] = None,
36759
36779
  ) -> None:
36760
36780
  """Type checking stubs"""
aws_cdk/_jsii/__init__.py CHANGED
@@ -16,7 +16,7 @@ import aws_cdk.asset_node_proxy_agent_v6._jsii
16
16
  import constructs._jsii
17
17
 
18
18
  __jsii_assembly__ = jsii.JSIIAssembly.load(
19
- "aws-cdk-lib", "2.130.0", __name__[0:-6], "aws-cdk-lib@2.130.0.jsii.tgz"
19
+ "aws-cdk-lib", "2.131.0", __name__[0:-6], "aws-cdk-lib@2.131.0.jsii.tgz"
20
20
  )
21
21
 
22
22
  __all__ = [
@@ -9558,6 +9558,45 @@ class HttpIntegrationSubtype(enum.Enum):
9558
9558
  '''Supported integration subtypes.
9559
9559
 
9560
9560
  :see: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html
9561
+ :exampleMetadata: infused
9562
+
9563
+ Example::
9564
+
9565
+ from aws_cdk.aws_apigatewayv2_integrations import HttpStepFunctionsIntegration
9566
+ import aws_cdk.aws_stepfunctions as sfn
9567
+
9568
+ # state_machine: sfn.StateMachine
9569
+ # http_api: apigwv2.HttpApi
9570
+
9571
+
9572
+ http_api.add_routes(
9573
+ path="/start",
9574
+ methods=[apigwv2.HttpMethod.POST],
9575
+ integration=HttpStepFunctionsIntegration("StartExecutionIntegration",
9576
+ state_machine=state_machine,
9577
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION
9578
+ )
9579
+ )
9580
+
9581
+ http_api.add_routes(
9582
+ path="/start-sync",
9583
+ methods=[apigwv2.HttpMethod.POST],
9584
+ integration=HttpStepFunctionsIntegration("StartSyncExecutionIntegration",
9585
+ state_machine=state_machine,
9586
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_SYNC_EXECUTION
9587
+ )
9588
+ )
9589
+
9590
+ http_api.add_routes(
9591
+ path="/stop",
9592
+ methods=[apigwv2.HttpMethod.POST],
9593
+ integration=HttpStepFunctionsIntegration("StopExecutionIntegration",
9594
+ state_machine=state_machine,
9595
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_STOP_EXECUTION,
9596
+ # For the `STOP_EXECUTION` subtype, it is necessary to specify the `executionArn`.
9597
+ parameter_mapping=apigwv2.ParameterMapping().custom("ExecutionArn", "$request.querystring.executionArn")
9598
+ )
9599
+ )
9561
9600
  '''
9562
9601
 
9563
9602
  EVENTBRIDGE_PUT_EVENTS = "EVENTBRIDGE_PUT_EVENTS"
@@ -15176,23 +15215,25 @@ class AddRoutesOptions(BatchHttpRouteOptions):
15176
15215
 
15177
15216
  Example::
15178
15217
 
15179
- from aws_cdk.aws_apigatewayv2_authorizers import HttpLambdaAuthorizer, HttpLambdaResponseType
15180
- from aws_cdk.aws_apigatewayv2_integrations import HttpUrlIntegration
15218
+ from aws_cdk.aws_apigatewayv2_integrations import HttpUrlIntegration, HttpLambdaIntegration
15181
15219
 
15182
- # This function handles your auth logic
15183
- # auth_handler: lambda.Function
15220
+ # book_store_default_fn: lambda.Function
15184
15221
 
15185
15222
 
15186
- authorizer = HttpLambdaAuthorizer("BooksAuthorizer", auth_handler,
15187
- response_types=[HttpLambdaResponseType.SIMPLE]
15188
- )
15223
+ get_books_integration = HttpUrlIntegration("GetBooksIntegration", "https://get-books-proxy.example.com")
15224
+ book_store_default_integration = HttpLambdaIntegration("BooksIntegration", book_store_default_fn)
15189
15225
 
15190
- api = apigwv2.HttpApi(self, "HttpApi")
15226
+ http_api = apigwv2.HttpApi(self, "HttpApi")
15191
15227
 
15192
- api.add_routes(
15193
- integration=HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.example.com"),
15228
+ http_api.add_routes(
15229
+ path="/books",
15230
+ methods=[apigwv2.HttpMethod.GET],
15231
+ integration=get_books_integration
15232
+ )
15233
+ http_api.add_routes(
15194
15234
  path="/books",
15195
- authorizer=authorizer
15235
+ methods=[apigwv2.HttpMethod.ANY],
15236
+ integration=book_store_default_integration
15196
15237
  )
15197
15238
  '''
15198
15239
  if __debug__:
@@ -70,6 +70,58 @@ http_api.add_routes(
70
70
  )
71
71
  ```
72
72
 
73
+ ### StepFunctions Integration
74
+
75
+ Step Functions integrations enable integrating an HTTP API route with AWS Step Functions.
76
+ This allows the HTTP API to start state machine executions synchronously or asynchronously, or to stop executions.
77
+
78
+ When a client invokes the route configured with a Step Functions integration, the API Gateway service interacts with the specified state machine according to the integration subtype (e.g., starts a new execution, synchronously starts an execution, or stops an execution) and returns the response to the client.
79
+
80
+ The following code configures a Step Functions integrations:
81
+
82
+ ```python
83
+ from aws_cdk.aws_apigatewayv2_integrations import HttpStepFunctionsIntegration
84
+ import aws_cdk.aws_stepfunctions as sfn
85
+
86
+ # state_machine: sfn.StateMachine
87
+ # http_api: apigwv2.HttpApi
88
+
89
+
90
+ http_api.add_routes(
91
+ path="/start",
92
+ methods=[apigwv2.HttpMethod.POST],
93
+ integration=HttpStepFunctionsIntegration("StartExecutionIntegration",
94
+ state_machine=state_machine,
95
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION
96
+ )
97
+ )
98
+
99
+ http_api.add_routes(
100
+ path="/start-sync",
101
+ methods=[apigwv2.HttpMethod.POST],
102
+ integration=HttpStepFunctionsIntegration("StartSyncExecutionIntegration",
103
+ state_machine=state_machine,
104
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_SYNC_EXECUTION
105
+ )
106
+ )
107
+
108
+ http_api.add_routes(
109
+ path="/stop",
110
+ methods=[apigwv2.HttpMethod.POST],
111
+ integration=HttpStepFunctionsIntegration("StopExecutionIntegration",
112
+ state_machine=state_machine,
113
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_STOP_EXECUTION,
114
+ # For the `STOP_EXECUTION` subtype, it is necessary to specify the `executionArn`.
115
+ parameter_mapping=apigwv2.ParameterMapping().custom("ExecutionArn", "$request.querystring.executionArn")
116
+ )
117
+ )
118
+ ```
119
+
120
+ **Note**:
121
+
122
+ * The `executionArn` parameter is required for the `STOP_EXECUTION` subtype. It is necessary to specify the `executionArn` in the `parameterMapping` property of the `HttpStepFunctionsIntegration` object.
123
+ * `START_SYNC_EXECUTION` subtype is only supported for EXPRESS type state machine.
124
+
73
125
  ### Private Integration
74
126
 
75
127
  Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or
@@ -279,6 +331,7 @@ from .._jsii import *
279
331
  import constructs as _constructs_77d1e7e8
280
332
  from ..aws_apigatewayv2 import (
281
333
  HttpConnectionType as _HttpConnectionType_02a8b6fb,
334
+ HttpIntegrationSubtype as _HttpIntegrationSubtype_beb63b59,
282
335
  HttpIntegrationType as _HttpIntegrationType_aee0d440,
283
336
  HttpMethod as _HttpMethod_4c4f3090,
284
337
  HttpRouteIntegration as _HttpRouteIntegration_d3ee7c34,
@@ -301,6 +354,7 @@ from ..aws_elasticloadbalancingv2 import (
301
354
  from ..aws_iam import IRole as _IRole_235f5d8e
302
355
  from ..aws_lambda import IFunction as _IFunction_6adb0ab8
303
356
  from ..aws_servicediscovery import IService as _IService_46860ae1
357
+ from ..aws_stepfunctions import StateMachine as _StateMachine_a256d24f
304
358
 
305
359
 
306
360
  class HttpAlbIntegration(
@@ -1074,6 +1128,217 @@ class HttpServiceDiscoveryIntegrationProps(HttpPrivateIntegrationOptions):
1074
1128
  )
1075
1129
 
1076
1130
 
1131
+ class HttpStepFunctionsIntegration(
1132
+ _HttpRouteIntegration_d3ee7c34,
1133
+ metaclass=jsii.JSIIMeta,
1134
+ jsii_type="aws-cdk-lib.aws_apigatewayv2_integrations.HttpStepFunctionsIntegration",
1135
+ ):
1136
+ '''The StepFunctions integration resource for HTTP API.
1137
+
1138
+ :exampleMetadata: infused
1139
+
1140
+ Example::
1141
+
1142
+ from aws_cdk.aws_apigatewayv2_integrations import HttpStepFunctionsIntegration
1143
+ import aws_cdk.aws_stepfunctions as sfn
1144
+
1145
+ # state_machine: sfn.StateMachine
1146
+ # http_api: apigwv2.HttpApi
1147
+
1148
+
1149
+ http_api.add_routes(
1150
+ path="/start",
1151
+ methods=[apigwv2.HttpMethod.POST],
1152
+ integration=HttpStepFunctionsIntegration("StartExecutionIntegration",
1153
+ state_machine=state_machine,
1154
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION
1155
+ )
1156
+ )
1157
+
1158
+ http_api.add_routes(
1159
+ path="/start-sync",
1160
+ methods=[apigwv2.HttpMethod.POST],
1161
+ integration=HttpStepFunctionsIntegration("StartSyncExecutionIntegration",
1162
+ state_machine=state_machine,
1163
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_SYNC_EXECUTION
1164
+ )
1165
+ )
1166
+
1167
+ http_api.add_routes(
1168
+ path="/stop",
1169
+ methods=[apigwv2.HttpMethod.POST],
1170
+ integration=HttpStepFunctionsIntegration("StopExecutionIntegration",
1171
+ state_machine=state_machine,
1172
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_STOP_EXECUTION,
1173
+ # For the `STOP_EXECUTION` subtype, it is necessary to specify the `executionArn`.
1174
+ parameter_mapping=apigwv2.ParameterMapping().custom("ExecutionArn", "$request.querystring.executionArn")
1175
+ )
1176
+ )
1177
+ '''
1178
+
1179
+ def __init__(
1180
+ self,
1181
+ id: builtins.str,
1182
+ *,
1183
+ state_machine: _StateMachine_a256d24f,
1184
+ parameter_mapping: typing.Optional[_ParameterMapping_c11a48e0] = None,
1185
+ subtype: typing.Optional[_HttpIntegrationSubtype_beb63b59] = None,
1186
+ ) -> None:
1187
+ '''
1188
+ :param id: id of the underlying integration construct.
1189
+ :param state_machine: Statemachine that Integrates with API Gateway.
1190
+ :param parameter_mapping: Specifies how to transform HTTP requests before sending them to the backend. When the subtype is either ``START_EXECUTION`` or ``START_SYNC_EXECUTION``, it is necessary to specify the ``StateMachineArn``. Conversely, when the subtype is ``STOP_EXECUTION``, the ``ExecutionArn`` must be specified. Default: - specify only ``StateMachineArn``
1191
+ :param subtype: The subtype of the HTTP integration. Only subtypes starting with STEPFUNCTIONS_ can be specified. Default: HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION
1192
+ '''
1193
+ if __debug__:
1194
+ type_hints = typing.get_type_hints(_typecheckingstub__76518171338936bd0fbff4054b2b72b876355e21b6eef931d4dd4f111fc7889f)
1195
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
1196
+ props = HttpStepFunctionsIntegrationProps(
1197
+ state_machine=state_machine,
1198
+ parameter_mapping=parameter_mapping,
1199
+ subtype=subtype,
1200
+ )
1201
+
1202
+ jsii.create(self.__class__, self, [id, props])
1203
+
1204
+ @jsii.member(jsii_name="bind")
1205
+ def bind(
1206
+ self,
1207
+ *,
1208
+ route: _IHttpRoute_2fbc6171,
1209
+ scope: _constructs_77d1e7e8.Construct,
1210
+ ) -> _HttpRouteIntegrationConfig_aafc4b76:
1211
+ '''Bind this integration to the route.
1212
+
1213
+ :param route: The route to which this is being bound.
1214
+ :param scope: The current scope in which the bind is occurring. If the ``HttpRouteIntegration`` being bound creates additional constructs, this will be used as their parent scope.
1215
+ '''
1216
+ options = _HttpRouteIntegrationBindOptions_f870a39e(route=route, scope=scope)
1217
+
1218
+ return typing.cast(_HttpRouteIntegrationConfig_aafc4b76, jsii.invoke(self, "bind", [options]))
1219
+
1220
+
1221
+ @jsii.data_type(
1222
+ jsii_type="aws-cdk-lib.aws_apigatewayv2_integrations.HttpStepFunctionsIntegrationProps",
1223
+ jsii_struct_bases=[],
1224
+ name_mapping={
1225
+ "state_machine": "stateMachine",
1226
+ "parameter_mapping": "parameterMapping",
1227
+ "subtype": "subtype",
1228
+ },
1229
+ )
1230
+ class HttpStepFunctionsIntegrationProps:
1231
+ def __init__(
1232
+ self,
1233
+ *,
1234
+ state_machine: _StateMachine_a256d24f,
1235
+ parameter_mapping: typing.Optional[_ParameterMapping_c11a48e0] = None,
1236
+ subtype: typing.Optional[_HttpIntegrationSubtype_beb63b59] = None,
1237
+ ) -> None:
1238
+ '''Properties to initialize ``HttpStepFunctionsIntegration``.
1239
+
1240
+ :param state_machine: Statemachine that Integrates with API Gateway.
1241
+ :param parameter_mapping: Specifies how to transform HTTP requests before sending them to the backend. When the subtype is either ``START_EXECUTION`` or ``START_SYNC_EXECUTION``, it is necessary to specify the ``StateMachineArn``. Conversely, when the subtype is ``STOP_EXECUTION``, the ``ExecutionArn`` must be specified. Default: - specify only ``StateMachineArn``
1242
+ :param subtype: The subtype of the HTTP integration. Only subtypes starting with STEPFUNCTIONS_ can be specified. Default: HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION
1243
+
1244
+ :exampleMetadata: infused
1245
+
1246
+ Example::
1247
+
1248
+ from aws_cdk.aws_apigatewayv2_integrations import HttpStepFunctionsIntegration
1249
+ import aws_cdk.aws_stepfunctions as sfn
1250
+
1251
+ # state_machine: sfn.StateMachine
1252
+ # http_api: apigwv2.HttpApi
1253
+
1254
+
1255
+ http_api.add_routes(
1256
+ path="/start",
1257
+ methods=[apigwv2.HttpMethod.POST],
1258
+ integration=HttpStepFunctionsIntegration("StartExecutionIntegration",
1259
+ state_machine=state_machine,
1260
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION
1261
+ )
1262
+ )
1263
+
1264
+ http_api.add_routes(
1265
+ path="/start-sync",
1266
+ methods=[apigwv2.HttpMethod.POST],
1267
+ integration=HttpStepFunctionsIntegration("StartSyncExecutionIntegration",
1268
+ state_machine=state_machine,
1269
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_SYNC_EXECUTION
1270
+ )
1271
+ )
1272
+
1273
+ http_api.add_routes(
1274
+ path="/stop",
1275
+ methods=[apigwv2.HttpMethod.POST],
1276
+ integration=HttpStepFunctionsIntegration("StopExecutionIntegration",
1277
+ state_machine=state_machine,
1278
+ subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_STOP_EXECUTION,
1279
+ # For the `STOP_EXECUTION` subtype, it is necessary to specify the `executionArn`.
1280
+ parameter_mapping=apigwv2.ParameterMapping().custom("ExecutionArn", "$request.querystring.executionArn")
1281
+ )
1282
+ )
1283
+ '''
1284
+ if __debug__:
1285
+ type_hints = typing.get_type_hints(_typecheckingstub__a7072515a6bcc56ecf05d39b9b84f7dde9de04e9c2caf9ada206b863db8625ed)
1286
+ check_type(argname="argument state_machine", value=state_machine, expected_type=type_hints["state_machine"])
1287
+ check_type(argname="argument parameter_mapping", value=parameter_mapping, expected_type=type_hints["parameter_mapping"])
1288
+ check_type(argname="argument subtype", value=subtype, expected_type=type_hints["subtype"])
1289
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1290
+ "state_machine": state_machine,
1291
+ }
1292
+ if parameter_mapping is not None:
1293
+ self._values["parameter_mapping"] = parameter_mapping
1294
+ if subtype is not None:
1295
+ self._values["subtype"] = subtype
1296
+
1297
+ @builtins.property
1298
+ def state_machine(self) -> _StateMachine_a256d24f:
1299
+ '''Statemachine that Integrates with API Gateway.'''
1300
+ result = self._values.get("state_machine")
1301
+ assert result is not None, "Required property 'state_machine' is missing"
1302
+ return typing.cast(_StateMachine_a256d24f, result)
1303
+
1304
+ @builtins.property
1305
+ def parameter_mapping(self) -> typing.Optional[_ParameterMapping_c11a48e0]:
1306
+ '''Specifies how to transform HTTP requests before sending them to the backend.
1307
+
1308
+ When the subtype is either ``START_EXECUTION`` or ``START_SYNC_EXECUTION``,
1309
+ it is necessary to specify the ``StateMachineArn``.
1310
+ Conversely, when the subtype is ``STOP_EXECUTION``, the ``ExecutionArn`` must be specified.
1311
+
1312
+ :default: - specify only ``StateMachineArn``
1313
+
1314
+ :see: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
1315
+ '''
1316
+ result = self._values.get("parameter_mapping")
1317
+ return typing.cast(typing.Optional[_ParameterMapping_c11a48e0], result)
1318
+
1319
+ @builtins.property
1320
+ def subtype(self) -> typing.Optional[_HttpIntegrationSubtype_beb63b59]:
1321
+ '''The subtype of the HTTP integration.
1322
+
1323
+ Only subtypes starting with STEPFUNCTIONS_ can be specified.
1324
+
1325
+ :default: HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION
1326
+ '''
1327
+ result = self._values.get("subtype")
1328
+ return typing.cast(typing.Optional[_HttpIntegrationSubtype_beb63b59], result)
1329
+
1330
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1331
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1332
+
1333
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1334
+ return not (rhs == self)
1335
+
1336
+ def __repr__(self) -> str:
1337
+ return "HttpStepFunctionsIntegrationProps(%s)" % ", ".join(
1338
+ k + "=" + repr(v) for k, v in self._values.items()
1339
+ )
1340
+
1341
+
1077
1342
  class HttpUrlIntegration(
1078
1343
  _HttpRouteIntegration_d3ee7c34,
1079
1344
  metaclass=jsii.JSIIMeta,
@@ -1840,6 +2105,8 @@ __all__ = [
1840
2105
  "HttpPrivateIntegrationOptions",
1841
2106
  "HttpServiceDiscoveryIntegration",
1842
2107
  "HttpServiceDiscoveryIntegrationProps",
2108
+ "HttpStepFunctionsIntegration",
2109
+ "HttpStepFunctionsIntegrationProps",
1843
2110
  "HttpUrlIntegration",
1844
2111
  "HttpUrlIntegrationProps",
1845
2112
  "WebSocketAwsIntegration",
@@ -1996,6 +2263,25 @@ def _typecheckingstub__8bbb857ee24522818d504a3830c65b95bbc66b9ef70c67fa5b85fbdca
1996
2263
  """Type checking stubs"""
1997
2264
  pass
1998
2265
 
2266
+ def _typecheckingstub__76518171338936bd0fbff4054b2b72b876355e21b6eef931d4dd4f111fc7889f(
2267
+ id: builtins.str,
2268
+ *,
2269
+ state_machine: _StateMachine_a256d24f,
2270
+ parameter_mapping: typing.Optional[_ParameterMapping_c11a48e0] = None,
2271
+ subtype: typing.Optional[_HttpIntegrationSubtype_beb63b59] = None,
2272
+ ) -> None:
2273
+ """Type checking stubs"""
2274
+ pass
2275
+
2276
+ def _typecheckingstub__a7072515a6bcc56ecf05d39b9b84f7dde9de04e9c2caf9ada206b863db8625ed(
2277
+ *,
2278
+ state_machine: _StateMachine_a256d24f,
2279
+ parameter_mapping: typing.Optional[_ParameterMapping_c11a48e0] = None,
2280
+ subtype: typing.Optional[_HttpIntegrationSubtype_beb63b59] = None,
2281
+ ) -> None:
2282
+ """Type checking stubs"""
2283
+ pass
2284
+
1999
2285
  def _typecheckingstub__39ce64d79e6c4249c8c60321022b7721149966e379b0f947f602cb248aee9bce(
2000
2286
  id: builtins.str,
2001
2287
  url: builtins.str,