aws-cdk-lib 2.114.0__py3-none-any.whl → 2.115.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 (47) hide show
  1. aws_cdk/__init__.py +7 -1
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.114.0.jsii.tgz → aws-cdk-lib@2.115.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigateway/__init__.py +6 -0
  5. aws_cdk/aws_apigatewayv2/__init__.py +223 -574
  6. aws_cdk/aws_autoscaling/__init__.py +99 -86
  7. aws_cdk/aws_bedrock/__init__.py +355 -0
  8. aws_cdk/aws_billingconductor/__init__.py +41 -0
  9. aws_cdk/aws_cleanrooms/__init__.py +46 -20
  10. aws_cdk/aws_cloudformation/__init__.py +5 -1
  11. aws_cdk/aws_cloudtrail/__init__.py +89 -0
  12. aws_cdk/aws_codedeploy/__init__.py +233 -1
  13. aws_cdk/aws_connect/__init__.py +49 -2
  14. aws_cdk/aws_dlm/__init__.py +8 -11
  15. aws_cdk/aws_dms/__init__.py +3861 -1643
  16. aws_cdk/aws_ec2/__init__.py +91 -47
  17. aws_cdk/aws_ecs/__init__.py +18 -0
  18. aws_cdk/aws_efs/__init__.py +1 -1
  19. aws_cdk/aws_eks/__init__.py +26 -13
  20. aws_cdk/aws_elasticloadbalancingv2/__init__.py +110 -54
  21. aws_cdk/aws_emr/__init__.py +287 -18
  22. aws_cdk/aws_eventschemas/__init__.py +1 -1
  23. aws_cdk/aws_fis/__init__.py +466 -34
  24. aws_cdk/aws_iam/__init__.py +47 -35
  25. aws_cdk/aws_internetmonitor/__init__.py +10 -12
  26. aws_cdk/aws_lightsail/__init__.py +4 -2
  27. aws_cdk/aws_logs/__init__.py +5 -4
  28. aws_cdk/aws_opensearchservice/__init__.py +47 -0
  29. aws_cdk/aws_osis/__init__.py +272 -32
  30. aws_cdk/aws_rds/__init__.py +205 -87
  31. aws_cdk/aws_resiliencehub/__init__.py +9 -14
  32. aws_cdk/aws_rolesanywhere/__init__.py +41 -53
  33. aws_cdk/aws_route53/__init__.py +3 -3
  34. aws_cdk/aws_route53_targets/__init__.py +2 -2
  35. aws_cdk/aws_s3/__init__.py +2 -6
  36. aws_cdk/aws_s3express/__init__.py +3 -3
  37. aws_cdk/aws_sagemaker/__init__.py +82 -11
  38. aws_cdk/aws_sns/__init__.py +181 -0
  39. aws_cdk/aws_stepfunctions/__init__.py +16 -8
  40. aws_cdk/aws_stepfunctions_tasks/__init__.py +975 -139
  41. aws_cdk/aws_workspacesthinclient/__init__.py +44 -35
  42. {aws_cdk_lib-2.114.0.dist-info → aws_cdk_lib-2.115.0.dist-info}/METADATA +2 -2
  43. {aws_cdk_lib-2.114.0.dist-info → aws_cdk_lib-2.115.0.dist-info}/RECORD +47 -46
  44. {aws_cdk_lib-2.114.0.dist-info → aws_cdk_lib-2.115.0.dist-info}/LICENSE +0 -0
  45. {aws_cdk_lib-2.114.0.dist-info → aws_cdk_lib-2.115.0.dist-info}/NOTICE +0 -0
  46. {aws_cdk_lib-2.114.0.dist-info → aws_cdk_lib-2.115.0.dist-info}/WHEEL +0 -0
  47. {aws_cdk_lib-2.114.0.dist-info → aws_cdk_lib-2.115.0.dist-info}/top_level.txt +0 -0
@@ -35,6 +35,9 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aw
35
35
  * [Batch](#batch)
36
36
 
37
37
  * [SubmitJob](#submitjob)
38
+ * [Bedrock](#bedrock)
39
+
40
+ * [InvokeModel](#invokemodel)
38
41
  * [CodeBuild](#codebuild)
39
42
 
40
43
  * [StartBuild](#startbuild)
@@ -181,7 +184,7 @@ tasks.CallApiGatewayRestApiEndpoint(self, "Endpoint",
181
184
  The `CallApiGatewayHttpApiEndpoint` calls the HTTP API endpoint.
182
185
 
183
186
  ```python
184
- import aws_cdk.aws_apigatewayv2_alpha as apigatewayv2
187
+ import aws_cdk.aws_apigatewayv2 as apigatewayv2
185
188
 
186
189
  http_api = apigatewayv2.HttpApi(self, "MyHttpApi")
187
190
 
@@ -327,6 +330,37 @@ task = tasks.BatchSubmitJob(self, "Submit Job",
327
330
  )
328
331
  ```
329
332
 
333
+ ## Bedrock
334
+
335
+ Step Functions supports [Bedrock](https://docs.aws.amazon.com/step-functions/latest/dg/connect-bedrock.html) through the service integration pattern.
336
+
337
+ ### InvokeModel
338
+
339
+ The [InvokeModel](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html) API
340
+ invokes the specified Bedrock model to run inference using the input provided.
341
+ The format of the input body and the response body depend on the model selected.
342
+
343
+ ```python
344
+ import aws_cdk.aws_bedrock as bedrock
345
+
346
+
347
+ model = bedrock.FoundationModel.from_foundation_model_id(self, "Model", bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1)
348
+
349
+ task = tasks.BedrockInvokeModel(self, "Prompt Model",
350
+ model=model,
351
+ body=sfn.TaskInput.from_object({
352
+ "input_text": "Generate a list of five first names.",
353
+ "text_generation_config": {
354
+ "max_token_count": 100,
355
+ "temperature": 1
356
+ }
357
+ }),
358
+ result_selector={
359
+ "names": sfn.JsonPath.string_at("$.Body.results[0].outputText")
360
+ }
361
+ )
362
+ ```
363
+
330
364
  ## CodeBuild
331
365
 
332
366
  Step Functions supports [CodeBuild](https://docs.aws.amazon.com/step-functions/latest/dg/connect-codebuild.html) through the service integration pattern.
@@ -640,6 +674,74 @@ tasks.EmrAddStep(self, "Task",
640
674
  )
641
675
  ```
642
676
 
677
+ To specify a custom runtime role use the `executionRoleArn` property.
678
+
679
+ **Note:** The EMR cluster must be created with a security configuration and the runtime role must have a specific trust policy.
680
+ See this [blog post](https://aws.amazon.com/blogs/big-data/introducing-runtime-roles-for-amazon-emr-steps-use-iam-roles-and-aws-lake-formation-for-access-control-with-amazon-emr/) for more details.
681
+
682
+ ```python
683
+ import aws_cdk.aws_emr as emr
684
+
685
+
686
+ cfn_security_configuration = emr.CfnSecurityConfiguration(self, "EmrSecurityConfiguration",
687
+ name="AddStepRuntimeRoleSecConfig",
688
+ security_configuration=JSON.parse("""
689
+ {
690
+ "AuthorizationConfiguration": {
691
+ "IAMConfiguration": {
692
+ "EnableApplicationScopedIAMRole": true,
693
+ "ApplicationScopedIAMRoleConfiguration":
694
+ {
695
+ "PropagateSourceIdentity": true
696
+ }
697
+ },
698
+ "LakeFormationConfiguration": {
699
+ "AuthorizedSessionTagValue": "Amazon EMR"
700
+ }
701
+ }
702
+ }""")
703
+ )
704
+
705
+ task = tasks.EmrCreateCluster(self, "Create Cluster",
706
+ instances=tasks.EmrCreateCluster.InstancesConfigProperty(),
707
+ name=sfn.TaskInput.from_json_path_at("$.ClusterName").value,
708
+ security_configuration=cfn_security_configuration.name
709
+ )
710
+
711
+ execution_role = iam.Role(self, "Role",
712
+ assumed_by=iam.ArnPrincipal(task.cluster_role.role_arn)
713
+ )
714
+
715
+ execution_role.assume_role_policy.add_statements(
716
+ iam.PolicyStatement(
717
+ effect=iam.Effect.ALLOW,
718
+ principals=[task.cluster_role
719
+ ],
720
+ actions=["sts:SetSourceIdentity"
721
+ ]
722
+ ),
723
+ iam.PolicyStatement(
724
+ effect=iam.Effect.ALLOW,
725
+ principals=[task.cluster_role
726
+ ],
727
+ actions=["sts:TagSession"
728
+ ],
729
+ conditions={
730
+ "StringEquals": {
731
+ "aws:RequestTag/LakeFormationAuthorizedCaller": "Amazon EMR"
732
+ }
733
+ }
734
+ ))
735
+
736
+ tasks.EmrAddStep(self, "Task",
737
+ cluster_id="ClusterId",
738
+ execution_role_arn=execution_role.role_arn,
739
+ name="StepName",
740
+ jar="Jar",
741
+ action_on_failure=tasks.ActionOnFailure.CONTINUE
742
+ )
743
+ ```
744
+
643
745
  ### Cancel Step
644
746
 
645
747
  Cancels a pending step in a running cluster.
@@ -1365,6 +1467,7 @@ from .. import (
1365
1467
  SymlinkFollowMode as _SymlinkFollowMode_047ec1f6,
1366
1468
  )
1367
1469
  from ..aws_apigateway import IRestApi as _IRestApi_1f02523d
1470
+ from ..aws_bedrock import IModel as _IModel_b88b328a
1368
1471
  from ..aws_codebuild import (
1369
1472
  BuildEnvironmentVariable as _BuildEnvironmentVariable_7df4fa0c,
1370
1473
  IProject as _IProject_aafae30a,
@@ -3778,21 +3881,687 @@ class BatchSubmitJob(
3778
3881
  timeout=timeout,
3779
3882
  )
3780
3883
 
3781
- jsii.create(self.__class__, self, [scope, id, props])
3884
+ jsii.create(self.__class__, self, [scope, id, props])
3885
+
3886
+ @builtins.property
3887
+ @jsii.member(jsii_name="taskMetrics")
3888
+ def _task_metrics(self) -> typing.Optional[_TaskMetricsConfig_32ea9403]:
3889
+ return typing.cast(typing.Optional[_TaskMetricsConfig_32ea9403], jsii.get(self, "taskMetrics"))
3890
+
3891
+ @builtins.property
3892
+ @jsii.member(jsii_name="taskPolicies")
3893
+ def _task_policies(self) -> typing.Optional[typing.List[_PolicyStatement_0fe33853]]:
3894
+ return typing.cast(typing.Optional[typing.List[_PolicyStatement_0fe33853]], jsii.get(self, "taskPolicies"))
3895
+
3896
+
3897
+ @jsii.data_type(
3898
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.BatchSubmitJobProps",
3899
+ jsii_struct_bases=[_TaskStateBaseProps_3a62b6d0],
3900
+ name_mapping={
3901
+ "comment": "comment",
3902
+ "credentials": "credentials",
3903
+ "heartbeat": "heartbeat",
3904
+ "heartbeat_timeout": "heartbeatTimeout",
3905
+ "input_path": "inputPath",
3906
+ "integration_pattern": "integrationPattern",
3907
+ "output_path": "outputPath",
3908
+ "result_path": "resultPath",
3909
+ "result_selector": "resultSelector",
3910
+ "state_name": "stateName",
3911
+ "task_timeout": "taskTimeout",
3912
+ "timeout": "timeout",
3913
+ "job_definition_arn": "jobDefinitionArn",
3914
+ "job_name": "jobName",
3915
+ "job_queue_arn": "jobQueueArn",
3916
+ "array_size": "arraySize",
3917
+ "attempts": "attempts",
3918
+ "container_overrides": "containerOverrides",
3919
+ "depends_on": "dependsOn",
3920
+ "payload": "payload",
3921
+ "tags": "tags",
3922
+ },
3923
+ )
3924
+ class BatchSubmitJobProps(_TaskStateBaseProps_3a62b6d0):
3925
+ def __init__(
3926
+ self,
3927
+ *,
3928
+ comment: typing.Optional[builtins.str] = None,
3929
+ credentials: typing.Optional[typing.Union[_Credentials_2cd64c6b, typing.Dict[builtins.str, typing.Any]]] = None,
3930
+ heartbeat: typing.Optional[_Duration_4839e8c3] = None,
3931
+ heartbeat_timeout: typing.Optional[_Timeout_d7c10551] = None,
3932
+ input_path: typing.Optional[builtins.str] = None,
3933
+ integration_pattern: typing.Optional[_IntegrationPattern_949291bc] = None,
3934
+ output_path: typing.Optional[builtins.str] = None,
3935
+ result_path: typing.Optional[builtins.str] = None,
3936
+ result_selector: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
3937
+ state_name: typing.Optional[builtins.str] = None,
3938
+ task_timeout: typing.Optional[_Timeout_d7c10551] = None,
3939
+ timeout: typing.Optional[_Duration_4839e8c3] = None,
3940
+ job_definition_arn: builtins.str,
3941
+ job_name: builtins.str,
3942
+ job_queue_arn: builtins.str,
3943
+ array_size: typing.Optional[jsii.Number] = None,
3944
+ attempts: typing.Optional[jsii.Number] = None,
3945
+ container_overrides: typing.Optional[typing.Union[BatchContainerOverrides, typing.Dict[builtins.str, typing.Any]]] = None,
3946
+ depends_on: typing.Optional[typing.Sequence[typing.Union[BatchJobDependency, typing.Dict[builtins.str, typing.Any]]]] = None,
3947
+ payload: typing.Optional[_TaskInput_91b91b91] = None,
3948
+ tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
3949
+ ) -> None:
3950
+ '''Properties for RunBatchJob.
3951
+
3952
+ :param comment: An optional description for this state. Default: - No comment
3953
+ :param credentials: Credentials for an IAM Role that the State Machine assumes for executing the task. This enables cross-account resource invocations. Default: - None (Task is executed using the State Machine's execution role)
3954
+ :param heartbeat: (deprecated) Timeout for the heartbeat. Default: - None
3955
+ :param heartbeat_timeout: Timeout for the heartbeat. [disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface Default: - None
3956
+ :param input_path: JSONPath expression to select part of the state to be the input to this state. May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}. Default: - The entire task input (JSON path '$')
3957
+ :param integration_pattern: AWS Step Functions integrates with services directly in the Amazon States Language. You can control these AWS services using service integration patterns Default: - ``IntegrationPattern.REQUEST_RESPONSE`` for most tasks. ``IntegrationPattern.RUN_JOB`` for the following exceptions: ``BatchSubmitJob``, ``EmrAddStep``, ``EmrCreateCluster``, ``EmrTerminationCluster``, and ``EmrContainersStartJobRun``.
3958
+ :param output_path: JSONPath expression to select select a portion of the state output to pass to the next state. May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}. Default: - The entire JSON node determined by the state input, the task result, and resultPath is passed to the next state (JSON path '$')
3959
+ :param result_path: JSONPath expression to indicate where to inject the state's output. May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output. Default: - Replaces the entire input with the result (JSON path '$')
3960
+ :param result_selector: The JSON that will replace the state's raw result and become the effective result before ResultPath is applied. You can use ResultSelector to create a payload with values that are static or selected from the state's raw result. Default: - None
3961
+ :param state_name: Optional name for this state. Default: - The construct ID will be used as state name
3962
+ :param task_timeout: Timeout for the task. [disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface Default: - None
3963
+ :param timeout: (deprecated) Timeout for the task. Default: - None
3964
+ :param job_definition_arn: The arn of the job definition used by this job.
3965
+ :param job_name: The name of the job. The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
3966
+ :param job_queue_arn: The arn of the job queue into which the job is submitted.
3967
+ :param array_size: The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see Array Jobs in the AWS Batch User Guide. Default: - No array size
3968
+ :param attempts: The number of times to move a job to the RUNNABLE status. You may specify between 1 and 10 attempts. If the value of attempts is greater than one, the job is retried on failure the same number of attempts as the value. Default: 1
3969
+ :param container_overrides: A list of container overrides in JSON format that specify the name of a container in the specified job definition and the overrides it should receive. Default: - No container overrides
3970
+ :param depends_on: A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. Default: - No dependencies
3971
+ :param payload: The payload to be passed as parameters to the batch job. Default: - No parameters are passed
3972
+ :param tags: The tags applied to the job request. Default: {} - no tags
3973
+
3974
+ :exampleMetadata: infused
3975
+
3976
+ Example::
3977
+
3978
+ import aws_cdk.aws_batch as batch
3979
+ # batch_job_definition: batch.EcsJobDefinition
3980
+ # batch_queue: batch.JobQueue
3981
+
3982
+
3983
+ task = tasks.BatchSubmitJob(self, "Submit Job",
3984
+ job_definition_arn=batch_job_definition.job_definition_arn,
3985
+ job_name="MyJob",
3986
+ job_queue_arn=batch_queue.job_queue_arn
3987
+ )
3988
+ '''
3989
+ if isinstance(credentials, dict):
3990
+ credentials = _Credentials_2cd64c6b(**credentials)
3991
+ if isinstance(container_overrides, dict):
3992
+ container_overrides = BatchContainerOverrides(**container_overrides)
3993
+ if __debug__:
3994
+ type_hints = typing.get_type_hints(_typecheckingstub__c3197d21dad4ba55e29e09cf770b47b7859167ae6b1ae5ef674cca1bedf86a92)
3995
+ check_type(argname="argument comment", value=comment, expected_type=type_hints["comment"])
3996
+ check_type(argname="argument credentials", value=credentials, expected_type=type_hints["credentials"])
3997
+ check_type(argname="argument heartbeat", value=heartbeat, expected_type=type_hints["heartbeat"])
3998
+ check_type(argname="argument heartbeat_timeout", value=heartbeat_timeout, expected_type=type_hints["heartbeat_timeout"])
3999
+ check_type(argname="argument input_path", value=input_path, expected_type=type_hints["input_path"])
4000
+ check_type(argname="argument integration_pattern", value=integration_pattern, expected_type=type_hints["integration_pattern"])
4001
+ check_type(argname="argument output_path", value=output_path, expected_type=type_hints["output_path"])
4002
+ check_type(argname="argument result_path", value=result_path, expected_type=type_hints["result_path"])
4003
+ check_type(argname="argument result_selector", value=result_selector, expected_type=type_hints["result_selector"])
4004
+ check_type(argname="argument state_name", value=state_name, expected_type=type_hints["state_name"])
4005
+ check_type(argname="argument task_timeout", value=task_timeout, expected_type=type_hints["task_timeout"])
4006
+ check_type(argname="argument timeout", value=timeout, expected_type=type_hints["timeout"])
4007
+ check_type(argname="argument job_definition_arn", value=job_definition_arn, expected_type=type_hints["job_definition_arn"])
4008
+ check_type(argname="argument job_name", value=job_name, expected_type=type_hints["job_name"])
4009
+ check_type(argname="argument job_queue_arn", value=job_queue_arn, expected_type=type_hints["job_queue_arn"])
4010
+ check_type(argname="argument array_size", value=array_size, expected_type=type_hints["array_size"])
4011
+ check_type(argname="argument attempts", value=attempts, expected_type=type_hints["attempts"])
4012
+ check_type(argname="argument container_overrides", value=container_overrides, expected_type=type_hints["container_overrides"])
4013
+ check_type(argname="argument depends_on", value=depends_on, expected_type=type_hints["depends_on"])
4014
+ check_type(argname="argument payload", value=payload, expected_type=type_hints["payload"])
4015
+ check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
4016
+ self._values: typing.Dict[builtins.str, typing.Any] = {
4017
+ "job_definition_arn": job_definition_arn,
4018
+ "job_name": job_name,
4019
+ "job_queue_arn": job_queue_arn,
4020
+ }
4021
+ if comment is not None:
4022
+ self._values["comment"] = comment
4023
+ if credentials is not None:
4024
+ self._values["credentials"] = credentials
4025
+ if heartbeat is not None:
4026
+ self._values["heartbeat"] = heartbeat
4027
+ if heartbeat_timeout is not None:
4028
+ self._values["heartbeat_timeout"] = heartbeat_timeout
4029
+ if input_path is not None:
4030
+ self._values["input_path"] = input_path
4031
+ if integration_pattern is not None:
4032
+ self._values["integration_pattern"] = integration_pattern
4033
+ if output_path is not None:
4034
+ self._values["output_path"] = output_path
4035
+ if result_path is not None:
4036
+ self._values["result_path"] = result_path
4037
+ if result_selector is not None:
4038
+ self._values["result_selector"] = result_selector
4039
+ if state_name is not None:
4040
+ self._values["state_name"] = state_name
4041
+ if task_timeout is not None:
4042
+ self._values["task_timeout"] = task_timeout
4043
+ if timeout is not None:
4044
+ self._values["timeout"] = timeout
4045
+ if array_size is not None:
4046
+ self._values["array_size"] = array_size
4047
+ if attempts is not None:
4048
+ self._values["attempts"] = attempts
4049
+ if container_overrides is not None:
4050
+ self._values["container_overrides"] = container_overrides
4051
+ if depends_on is not None:
4052
+ self._values["depends_on"] = depends_on
4053
+ if payload is not None:
4054
+ self._values["payload"] = payload
4055
+ if tags is not None:
4056
+ self._values["tags"] = tags
4057
+
4058
+ @builtins.property
4059
+ def comment(self) -> typing.Optional[builtins.str]:
4060
+ '''An optional description for this state.
4061
+
4062
+ :default: - No comment
4063
+ '''
4064
+ result = self._values.get("comment")
4065
+ return typing.cast(typing.Optional[builtins.str], result)
4066
+
4067
+ @builtins.property
4068
+ def credentials(self) -> typing.Optional[_Credentials_2cd64c6b]:
4069
+ '''Credentials for an IAM Role that the State Machine assumes for executing the task.
4070
+
4071
+ This enables cross-account resource invocations.
4072
+
4073
+ :default: - None (Task is executed using the State Machine's execution role)
4074
+
4075
+ :see: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-access-cross-acct-resources.html
4076
+ '''
4077
+ result = self._values.get("credentials")
4078
+ return typing.cast(typing.Optional[_Credentials_2cd64c6b], result)
4079
+
4080
+ @builtins.property
4081
+ def heartbeat(self) -> typing.Optional[_Duration_4839e8c3]:
4082
+ '''(deprecated) Timeout for the heartbeat.
4083
+
4084
+ :default: - None
4085
+
4086
+ :deprecated: use ``heartbeatTimeout``
4087
+
4088
+ :stability: deprecated
4089
+ '''
4090
+ result = self._values.get("heartbeat")
4091
+ return typing.cast(typing.Optional[_Duration_4839e8c3], result)
4092
+
4093
+ @builtins.property
4094
+ def heartbeat_timeout(self) -> typing.Optional[_Timeout_d7c10551]:
4095
+ '''Timeout for the heartbeat.
4096
+
4097
+ [disable-awslint:duration-prop-type] is needed because all props interface in
4098
+ aws-stepfunctions-tasks extend this interface
4099
+
4100
+ :default: - None
4101
+ '''
4102
+ result = self._values.get("heartbeat_timeout")
4103
+ return typing.cast(typing.Optional[_Timeout_d7c10551], result)
4104
+
4105
+ @builtins.property
4106
+ def input_path(self) -> typing.Optional[builtins.str]:
4107
+ '''JSONPath expression to select part of the state to be the input to this state.
4108
+
4109
+ May also be the special value JsonPath.DISCARD, which will cause the effective
4110
+ input to be the empty object {}.
4111
+
4112
+ :default: - The entire task input (JSON path '$')
4113
+ '''
4114
+ result = self._values.get("input_path")
4115
+ return typing.cast(typing.Optional[builtins.str], result)
4116
+
4117
+ @builtins.property
4118
+ def integration_pattern(self) -> typing.Optional[_IntegrationPattern_949291bc]:
4119
+ '''AWS Step Functions integrates with services directly in the Amazon States Language.
4120
+
4121
+ You can control these AWS services using service integration patterns
4122
+
4123
+ :default:
4124
+
4125
+ - ``IntegrationPattern.REQUEST_RESPONSE`` for most tasks.
4126
+ ``IntegrationPattern.RUN_JOB`` for the following exceptions:
4127
+ ``BatchSubmitJob``, ``EmrAddStep``, ``EmrCreateCluster``, ``EmrTerminationCluster``, and ``EmrContainersStartJobRun``.
4128
+
4129
+ :see: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token
4130
+ '''
4131
+ result = self._values.get("integration_pattern")
4132
+ return typing.cast(typing.Optional[_IntegrationPattern_949291bc], result)
4133
+
4134
+ @builtins.property
4135
+ def output_path(self) -> typing.Optional[builtins.str]:
4136
+ '''JSONPath expression to select select a portion of the state output to pass to the next state.
4137
+
4138
+ May also be the special value JsonPath.DISCARD, which will cause the effective
4139
+ output to be the empty object {}.
4140
+
4141
+ :default:
4142
+
4143
+ - The entire JSON node determined by the state input, the task result,
4144
+ and resultPath is passed to the next state (JSON path '$')
4145
+ '''
4146
+ result = self._values.get("output_path")
4147
+ return typing.cast(typing.Optional[builtins.str], result)
4148
+
4149
+ @builtins.property
4150
+ def result_path(self) -> typing.Optional[builtins.str]:
4151
+ '''JSONPath expression to indicate where to inject the state's output.
4152
+
4153
+ May also be the special value JsonPath.DISCARD, which will cause the state's
4154
+ input to become its output.
4155
+
4156
+ :default: - Replaces the entire input with the result (JSON path '$')
4157
+ '''
4158
+ result = self._values.get("result_path")
4159
+ return typing.cast(typing.Optional[builtins.str], result)
4160
+
4161
+ @builtins.property
4162
+ def result_selector(
4163
+ self,
4164
+ ) -> typing.Optional[typing.Mapping[builtins.str, typing.Any]]:
4165
+ '''The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
4166
+
4167
+ You can use ResultSelector to create a payload with values that are static
4168
+ or selected from the state's raw result.
4169
+
4170
+ :default: - None
4171
+
4172
+ :see: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector
4173
+ '''
4174
+ result = self._values.get("result_selector")
4175
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, typing.Any]], result)
4176
+
4177
+ @builtins.property
4178
+ def state_name(self) -> typing.Optional[builtins.str]:
4179
+ '''Optional name for this state.
4180
+
4181
+ :default: - The construct ID will be used as state name
4182
+ '''
4183
+ result = self._values.get("state_name")
4184
+ return typing.cast(typing.Optional[builtins.str], result)
4185
+
4186
+ @builtins.property
4187
+ def task_timeout(self) -> typing.Optional[_Timeout_d7c10551]:
4188
+ '''Timeout for the task.
4189
+
4190
+ [disable-awslint:duration-prop-type] is needed because all props interface in
4191
+ aws-stepfunctions-tasks extend this interface
4192
+
4193
+ :default: - None
4194
+ '''
4195
+ result = self._values.get("task_timeout")
4196
+ return typing.cast(typing.Optional[_Timeout_d7c10551], result)
4197
+
4198
+ @builtins.property
4199
+ def timeout(self) -> typing.Optional[_Duration_4839e8c3]:
4200
+ '''(deprecated) Timeout for the task.
4201
+
4202
+ :default: - None
4203
+
4204
+ :deprecated: use ``taskTimeout``
4205
+
4206
+ :stability: deprecated
4207
+ '''
4208
+ result = self._values.get("timeout")
4209
+ return typing.cast(typing.Optional[_Duration_4839e8c3], result)
4210
+
4211
+ @builtins.property
4212
+ def job_definition_arn(self) -> builtins.str:
4213
+ '''The arn of the job definition used by this job.'''
4214
+ result = self._values.get("job_definition_arn")
4215
+ assert result is not None, "Required property 'job_definition_arn' is missing"
4216
+ return typing.cast(builtins.str, result)
4217
+
4218
+ @builtins.property
4219
+ def job_name(self) -> builtins.str:
4220
+ '''The name of the job.
4221
+
4222
+ The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase),
4223
+ numbers, hyphens, and underscores are allowed.
4224
+ '''
4225
+ result = self._values.get("job_name")
4226
+ assert result is not None, "Required property 'job_name' is missing"
4227
+ return typing.cast(builtins.str, result)
4228
+
4229
+ @builtins.property
4230
+ def job_queue_arn(self) -> builtins.str:
4231
+ '''The arn of the job queue into which the job is submitted.'''
4232
+ result = self._values.get("job_queue_arn")
4233
+ assert result is not None, "Required property 'job_queue_arn' is missing"
4234
+ return typing.cast(builtins.str, result)
4235
+
4236
+ @builtins.property
4237
+ def array_size(self) -> typing.Optional[jsii.Number]:
4238
+ '''The array size can be between 2 and 10,000.
4239
+
4240
+ If you specify array properties for a job, it becomes an array job.
4241
+ For more information, see Array Jobs in the AWS Batch User Guide.
4242
+
4243
+ :default: - No array size
4244
+ '''
4245
+ result = self._values.get("array_size")
4246
+ return typing.cast(typing.Optional[jsii.Number], result)
4247
+
4248
+ @builtins.property
4249
+ def attempts(self) -> typing.Optional[jsii.Number]:
4250
+ '''The number of times to move a job to the RUNNABLE status.
4251
+
4252
+ You may specify between 1 and 10 attempts.
4253
+ If the value of attempts is greater than one,
4254
+ the job is retried on failure the same number of attempts as the value.
4255
+
4256
+ :default: 1
4257
+ '''
4258
+ result = self._values.get("attempts")
4259
+ return typing.cast(typing.Optional[jsii.Number], result)
4260
+
4261
+ @builtins.property
4262
+ def container_overrides(self) -> typing.Optional[BatchContainerOverrides]:
4263
+ '''A list of container overrides in JSON format that specify the name of a container in the specified job definition and the overrides it should receive.
4264
+
4265
+ :default: - No container overrides
4266
+
4267
+ :see: https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-containerOverrides
4268
+ '''
4269
+ result = self._values.get("container_overrides")
4270
+ return typing.cast(typing.Optional[BatchContainerOverrides], result)
4271
+
4272
+ @builtins.property
4273
+ def depends_on(self) -> typing.Optional[typing.List[BatchJobDependency]]:
4274
+ '''A list of dependencies for the job.
4275
+
4276
+ A job can depend upon a maximum of 20 jobs.
4277
+
4278
+ :default: - No dependencies
4279
+
4280
+ :see: https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-dependsOn
4281
+ '''
4282
+ result = self._values.get("depends_on")
4283
+ return typing.cast(typing.Optional[typing.List[BatchJobDependency]], result)
4284
+
4285
+ @builtins.property
4286
+ def payload(self) -> typing.Optional[_TaskInput_91b91b91]:
4287
+ '''The payload to be passed as parameters to the batch job.
4288
+
4289
+ :default: - No parameters are passed
4290
+ '''
4291
+ result = self._values.get("payload")
4292
+ return typing.cast(typing.Optional[_TaskInput_91b91b91], result)
4293
+
4294
+ @builtins.property
4295
+ def tags(self) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
4296
+ '''The tags applied to the job request.
4297
+
4298
+ :default: {} - no tags
4299
+ '''
4300
+ result = self._values.get("tags")
4301
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
4302
+
4303
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
4304
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
4305
+
4306
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
4307
+ return not (rhs == self)
4308
+
4309
+ def __repr__(self) -> str:
4310
+ return "BatchSubmitJobProps(%s)" % ", ".join(
4311
+ k + "=" + repr(v) for k, v in self._values.items()
4312
+ )
4313
+
4314
+
4315
+ class BedrockInvokeModel(
4316
+ _TaskStateBase_b5c0a816,
4317
+ metaclass=jsii.JSIIMeta,
4318
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.BedrockInvokeModel",
4319
+ ):
4320
+ '''A Step Functions Task to invoke a model in Bedrock.
4321
+
4322
+ :exampleMetadata: infused
4323
+
4324
+ Example::
4325
+
4326
+ import aws_cdk.aws_bedrock as bedrock
4327
+
4328
+
4329
+ model = bedrock.FoundationModel.from_foundation_model_id(self, "Model", bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1)
4330
+
4331
+ task = tasks.BedrockInvokeModel(self, "Prompt Model",
4332
+ model=model,
4333
+ body=sfn.TaskInput.from_object({
4334
+ "input_text": "Generate a list of five first names.",
4335
+ "text_generation_config": {
4336
+ "max_token_count": 100,
4337
+ "temperature": 1
4338
+ }
4339
+ }),
4340
+ result_selector={
4341
+ "names": sfn.JsonPath.string_at("$.Body.results[0].outputText")
4342
+ }
4343
+ )
4344
+ '''
4345
+
4346
+ def __init__(
4347
+ self,
4348
+ scope: _constructs_77d1e7e8.Construct,
4349
+ id: builtins.str,
4350
+ *,
4351
+ model: _IModel_b88b328a,
4352
+ accept: typing.Optional[builtins.str] = None,
4353
+ body: typing.Optional[_TaskInput_91b91b91] = None,
4354
+ content_type: typing.Optional[builtins.str] = None,
4355
+ input: typing.Optional[typing.Union["BedrockInvokeModelInputProps", typing.Dict[builtins.str, typing.Any]]] = None,
4356
+ output: typing.Optional[typing.Union["BedrockInvokeModelOutputProps", typing.Dict[builtins.str, typing.Any]]] = None,
4357
+ comment: typing.Optional[builtins.str] = None,
4358
+ credentials: typing.Optional[typing.Union[_Credentials_2cd64c6b, typing.Dict[builtins.str, typing.Any]]] = None,
4359
+ heartbeat: typing.Optional[_Duration_4839e8c3] = None,
4360
+ heartbeat_timeout: typing.Optional[_Timeout_d7c10551] = None,
4361
+ input_path: typing.Optional[builtins.str] = None,
4362
+ integration_pattern: typing.Optional[_IntegrationPattern_949291bc] = None,
4363
+ output_path: typing.Optional[builtins.str] = None,
4364
+ result_path: typing.Optional[builtins.str] = None,
4365
+ result_selector: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
4366
+ state_name: typing.Optional[builtins.str] = None,
4367
+ task_timeout: typing.Optional[_Timeout_d7c10551] = None,
4368
+ timeout: typing.Optional[_Duration_4839e8c3] = None,
4369
+ ) -> None:
4370
+ '''
4371
+ :param scope: -
4372
+ :param id: Descriptive identifier for this chainable.
4373
+ :param model: The Bedrock model that the task will invoke.
4374
+ :param accept: The desired MIME type of the inference body in the response. Default: 'application/json'
4375
+ :param body: The input data for the Bedrock model invocation. The inference parameters contained in the body depend on the Bedrock model being used. The body must be in the format specified in the ``contentType`` field. For example, if the content type is ``application/json``, the body must be JSON formatted. The body must be up to 256 KB in size. For input data that exceeds 256 KB, use ``input`` instead to retrieve the input data from S3. You must specify either the ``body`` or the ``input`` field, but not both. Default: Input data is retrieved from the location specified in the ``input`` field
4376
+ :param content_type: The MIME type of the input data in the request. Default: 'application/json'
4377
+ :param input: The source location to retrieve the input data from. Default: Input data is retrieved from the ``body`` field
4378
+ :param output: The destination location where the API response is written. If you specify this field, the API response body is replaced with a reference to the output location. Default: The API response body is returned in the result.
4379
+ :param comment: An optional description for this state. Default: - No comment
4380
+ :param credentials: Credentials for an IAM Role that the State Machine assumes for executing the task. This enables cross-account resource invocations. Default: - None (Task is executed using the State Machine's execution role)
4381
+ :param heartbeat: (deprecated) Timeout for the heartbeat. Default: - None
4382
+ :param heartbeat_timeout: Timeout for the heartbeat. [disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface Default: - None
4383
+ :param input_path: JSONPath expression to select part of the state to be the input to this state. May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}. Default: - The entire task input (JSON path '$')
4384
+ :param integration_pattern: AWS Step Functions integrates with services directly in the Amazon States Language. You can control these AWS services using service integration patterns Default: - ``IntegrationPattern.REQUEST_RESPONSE`` for most tasks. ``IntegrationPattern.RUN_JOB`` for the following exceptions: ``BatchSubmitJob``, ``EmrAddStep``, ``EmrCreateCluster``, ``EmrTerminationCluster``, and ``EmrContainersStartJobRun``.
4385
+ :param output_path: JSONPath expression to select select a portion of the state output to pass to the next state. May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}. Default: - The entire JSON node determined by the state input, the task result, and resultPath is passed to the next state (JSON path '$')
4386
+ :param result_path: JSONPath expression to indicate where to inject the state's output. May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output. Default: - Replaces the entire input with the result (JSON path '$')
4387
+ :param result_selector: The JSON that will replace the state's raw result and become the effective result before ResultPath is applied. You can use ResultSelector to create a payload with values that are static or selected from the state's raw result. Default: - None
4388
+ :param state_name: Optional name for this state. Default: - The construct ID will be used as state name
4389
+ :param task_timeout: Timeout for the task. [disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface Default: - None
4390
+ :param timeout: (deprecated) Timeout for the task. Default: - None
4391
+ '''
4392
+ if __debug__:
4393
+ type_hints = typing.get_type_hints(_typecheckingstub__3b20c515efa874adacf78d373dbda10fc59e519a3bd1b280ecbf56409aea2544)
4394
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
4395
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
4396
+ props = BedrockInvokeModelProps(
4397
+ model=model,
4398
+ accept=accept,
4399
+ body=body,
4400
+ content_type=content_type,
4401
+ input=input,
4402
+ output=output,
4403
+ comment=comment,
4404
+ credentials=credentials,
4405
+ heartbeat=heartbeat,
4406
+ heartbeat_timeout=heartbeat_timeout,
4407
+ input_path=input_path,
4408
+ integration_pattern=integration_pattern,
4409
+ output_path=output_path,
4410
+ result_path=result_path,
4411
+ result_selector=result_selector,
4412
+ state_name=state_name,
4413
+ task_timeout=task_timeout,
4414
+ timeout=timeout,
4415
+ )
4416
+
4417
+ jsii.create(self.__class__, self, [scope, id, props])
4418
+
4419
+ @builtins.property
4420
+ @jsii.member(jsii_name="taskMetrics")
4421
+ def _task_metrics(self) -> typing.Optional[_TaskMetricsConfig_32ea9403]:
4422
+ return typing.cast(typing.Optional[_TaskMetricsConfig_32ea9403], jsii.get(self, "taskMetrics"))
4423
+
4424
+ @builtins.property
4425
+ @jsii.member(jsii_name="taskPolicies")
4426
+ def _task_policies(self) -> typing.Optional[typing.List[_PolicyStatement_0fe33853]]:
4427
+ return typing.cast(typing.Optional[typing.List[_PolicyStatement_0fe33853]], jsii.get(self, "taskPolicies"))
4428
+
4429
+
4430
+ @jsii.data_type(
4431
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.BedrockInvokeModelInputProps",
4432
+ jsii_struct_bases=[],
4433
+ name_mapping={"s3_location": "s3Location"},
4434
+ )
4435
+ class BedrockInvokeModelInputProps:
4436
+ def __init__(
4437
+ self,
4438
+ *,
4439
+ s3_location: typing.Optional[typing.Union[_Location_0948fa7f, typing.Dict[builtins.str, typing.Any]]] = None,
4440
+ ) -> None:
4441
+ '''Location to retrieve the input data, prior to calling Bedrock InvokeModel.
4442
+
4443
+ :param s3_location: S3 object to retrieve the input data from. If the S3 location is not set, then the Body must be set. Default: Input data is retrieved from the ``body`` field
4444
+
4445
+ :see: https://docs.aws.amazon.com/step-functions/latest/dg/connect-bedrock.html
4446
+ :exampleMetadata: fixture=_generated
4447
+
4448
+ Example::
4449
+
4450
+ # The code below shows an example of how to instantiate this type.
4451
+ # The values are placeholders you should change.
4452
+ from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks
4453
+
4454
+ bedrock_invoke_model_input_props = stepfunctions_tasks.BedrockInvokeModelInputProps(
4455
+ s3_location=Location(
4456
+ bucket_name="bucketName",
4457
+ object_key="objectKey",
4458
+
4459
+ # the properties below are optional
4460
+ object_version="objectVersion"
4461
+ )
4462
+ )
4463
+ '''
4464
+ if isinstance(s3_location, dict):
4465
+ s3_location = _Location_0948fa7f(**s3_location)
4466
+ if __debug__:
4467
+ type_hints = typing.get_type_hints(_typecheckingstub__5832c6287635fafcd3211864b6568285ae981df509ea5c6b8dd8458d0254c232)
4468
+ check_type(argname="argument s3_location", value=s3_location, expected_type=type_hints["s3_location"])
4469
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
4470
+ if s3_location is not None:
4471
+ self._values["s3_location"] = s3_location
4472
+
4473
+ @builtins.property
4474
+ def s3_location(self) -> typing.Optional[_Location_0948fa7f]:
4475
+ '''S3 object to retrieve the input data from.
4476
+
4477
+ If the S3 location is not set, then the Body must be set.
4478
+
4479
+ :default: Input data is retrieved from the ``body`` field
4480
+ '''
4481
+ result = self._values.get("s3_location")
4482
+ return typing.cast(typing.Optional[_Location_0948fa7f], result)
4483
+
4484
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
4485
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
4486
+
4487
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
4488
+ return not (rhs == self)
4489
+
4490
+ def __repr__(self) -> str:
4491
+ return "BedrockInvokeModelInputProps(%s)" % ", ".join(
4492
+ k + "=" + repr(v) for k, v in self._values.items()
4493
+ )
4494
+
4495
+
4496
+ @jsii.data_type(
4497
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.BedrockInvokeModelOutputProps",
4498
+ jsii_struct_bases=[],
4499
+ name_mapping={"s3_location": "s3Location"},
4500
+ )
4501
+ class BedrockInvokeModelOutputProps:
4502
+ def __init__(
4503
+ self,
4504
+ *,
4505
+ s3_location: typing.Optional[typing.Union[_Location_0948fa7f, typing.Dict[builtins.str, typing.Any]]] = None,
4506
+ ) -> None:
4507
+ '''Location where the Bedrock InvokeModel API response is written.
4508
+
4509
+ :param s3_location: S3 object where the Bedrock InvokeModel API response is written. If you specify this field, the API response body is replaced with a reference to the Amazon S3 location of the original output. Default: Response body is returned in the task result
3782
4510
 
3783
- @builtins.property
3784
- @jsii.member(jsii_name="taskMetrics")
3785
- def _task_metrics(self) -> typing.Optional[_TaskMetricsConfig_32ea9403]:
3786
- return typing.cast(typing.Optional[_TaskMetricsConfig_32ea9403], jsii.get(self, "taskMetrics"))
4511
+ :see: https://docs.aws.amazon.com/step-functions/latest/dg/connect-bedrock.html
4512
+ :exampleMetadata: fixture=_generated
4513
+
4514
+ Example::
4515
+
4516
+ # The code below shows an example of how to instantiate this type.
4517
+ # The values are placeholders you should change.
4518
+ from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks
4519
+
4520
+ bedrock_invoke_model_output_props = stepfunctions_tasks.BedrockInvokeModelOutputProps(
4521
+ s3_location=Location(
4522
+ bucket_name="bucketName",
4523
+ object_key="objectKey",
4524
+
4525
+ # the properties below are optional
4526
+ object_version="objectVersion"
4527
+ )
4528
+ )
4529
+ '''
4530
+ if isinstance(s3_location, dict):
4531
+ s3_location = _Location_0948fa7f(**s3_location)
4532
+ if __debug__:
4533
+ type_hints = typing.get_type_hints(_typecheckingstub__1ae5c9f4810ca6d7749a0e5f6df435956d3660251fb9427f7b8aea21bc5a7fb1)
4534
+ check_type(argname="argument s3_location", value=s3_location, expected_type=type_hints["s3_location"])
4535
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
4536
+ if s3_location is not None:
4537
+ self._values["s3_location"] = s3_location
3787
4538
 
3788
4539
  @builtins.property
3789
- @jsii.member(jsii_name="taskPolicies")
3790
- def _task_policies(self) -> typing.Optional[typing.List[_PolicyStatement_0fe33853]]:
3791
- return typing.cast(typing.Optional[typing.List[_PolicyStatement_0fe33853]], jsii.get(self, "taskPolicies"))
4540
+ def s3_location(self) -> typing.Optional[_Location_0948fa7f]:
4541
+ '''S3 object where the Bedrock InvokeModel API response is written.
4542
+
4543
+ If you specify this field, the API response body is replaced with
4544
+ a reference to the Amazon S3 location of the original output.
4545
+
4546
+ :default: Response body is returned in the task result
4547
+ '''
4548
+ result = self._values.get("s3_location")
4549
+ return typing.cast(typing.Optional[_Location_0948fa7f], result)
4550
+
4551
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
4552
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
4553
+
4554
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
4555
+ return not (rhs == self)
4556
+
4557
+ def __repr__(self) -> str:
4558
+ return "BedrockInvokeModelOutputProps(%s)" % ", ".join(
4559
+ k + "=" + repr(v) for k, v in self._values.items()
4560
+ )
3792
4561
 
3793
4562
 
3794
4563
  @jsii.data_type(
3795
- jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.BatchSubmitJobProps",
4564
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.BedrockInvokeModelProps",
3796
4565
  jsii_struct_bases=[_TaskStateBaseProps_3a62b6d0],
3797
4566
  name_mapping={
3798
4567
  "comment": "comment",
@@ -3807,18 +4576,15 @@ class BatchSubmitJob(
3807
4576
  "state_name": "stateName",
3808
4577
  "task_timeout": "taskTimeout",
3809
4578
  "timeout": "timeout",
3810
- "job_definition_arn": "jobDefinitionArn",
3811
- "job_name": "jobName",
3812
- "job_queue_arn": "jobQueueArn",
3813
- "array_size": "arraySize",
3814
- "attempts": "attempts",
3815
- "container_overrides": "containerOverrides",
3816
- "depends_on": "dependsOn",
3817
- "payload": "payload",
3818
- "tags": "tags",
4579
+ "model": "model",
4580
+ "accept": "accept",
4581
+ "body": "body",
4582
+ "content_type": "contentType",
4583
+ "input": "input",
4584
+ "output": "output",
3819
4585
  },
3820
4586
  )
3821
- class BatchSubmitJobProps(_TaskStateBaseProps_3a62b6d0):
4587
+ class BedrockInvokeModelProps(_TaskStateBaseProps_3a62b6d0):
3822
4588
  def __init__(
3823
4589
  self,
3824
4590
  *,
@@ -3834,17 +4600,14 @@ class BatchSubmitJobProps(_TaskStateBaseProps_3a62b6d0):
3834
4600
  state_name: typing.Optional[builtins.str] = None,
3835
4601
  task_timeout: typing.Optional[_Timeout_d7c10551] = None,
3836
4602
  timeout: typing.Optional[_Duration_4839e8c3] = None,
3837
- job_definition_arn: builtins.str,
3838
- job_name: builtins.str,
3839
- job_queue_arn: builtins.str,
3840
- array_size: typing.Optional[jsii.Number] = None,
3841
- attempts: typing.Optional[jsii.Number] = None,
3842
- container_overrides: typing.Optional[typing.Union[BatchContainerOverrides, typing.Dict[builtins.str, typing.Any]]] = None,
3843
- depends_on: typing.Optional[typing.Sequence[typing.Union[BatchJobDependency, typing.Dict[builtins.str, typing.Any]]]] = None,
3844
- payload: typing.Optional[_TaskInput_91b91b91] = None,
3845
- tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
4603
+ model: _IModel_b88b328a,
4604
+ accept: typing.Optional[builtins.str] = None,
4605
+ body: typing.Optional[_TaskInput_91b91b91] = None,
4606
+ content_type: typing.Optional[builtins.str] = None,
4607
+ input: typing.Optional[typing.Union[BedrockInvokeModelInputProps, typing.Dict[builtins.str, typing.Any]]] = None,
4608
+ output: typing.Optional[typing.Union[BedrockInvokeModelOutputProps, typing.Dict[builtins.str, typing.Any]]] = None,
3846
4609
  ) -> None:
3847
- '''Properties for RunBatchJob.
4610
+ '''Properties for invoking a Bedrock Model.
3848
4611
 
3849
4612
  :param comment: An optional description for this state. Default: - No comment
3850
4613
  :param credentials: Credentials for an IAM Role that the State Machine assumes for executing the task. This enables cross-account resource invocations. Default: - None (Task is executed using the State Machine's execution role)
@@ -3858,37 +4621,44 @@ class BatchSubmitJobProps(_TaskStateBaseProps_3a62b6d0):
3858
4621
  :param state_name: Optional name for this state. Default: - The construct ID will be used as state name
3859
4622
  :param task_timeout: Timeout for the task. [disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface Default: - None
3860
4623
  :param timeout: (deprecated) Timeout for the task. Default: - None
3861
- :param job_definition_arn: The arn of the job definition used by this job.
3862
- :param job_name: The name of the job. The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
3863
- :param job_queue_arn: The arn of the job queue into which the job is submitted.
3864
- :param array_size: The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see Array Jobs in the AWS Batch User Guide. Default: - No array size
3865
- :param attempts: The number of times to move a job to the RUNNABLE status. You may specify between 1 and 10 attempts. If the value of attempts is greater than one, the job is retried on failure the same number of attempts as the value. Default: 1
3866
- :param container_overrides: A list of container overrides in JSON format that specify the name of a container in the specified job definition and the overrides it should receive. Default: - No container overrides
3867
- :param depends_on: A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. Default: - No dependencies
3868
- :param payload: The payload to be passed as parameters to the batch job. Default: - No parameters are passed
3869
- :param tags: The tags applied to the job request. Default: {} - no tags
4624
+ :param model: The Bedrock model that the task will invoke.
4625
+ :param accept: The desired MIME type of the inference body in the response. Default: 'application/json'
4626
+ :param body: The input data for the Bedrock model invocation. The inference parameters contained in the body depend on the Bedrock model being used. The body must be in the format specified in the ``contentType`` field. For example, if the content type is ``application/json``, the body must be JSON formatted. The body must be up to 256 KB in size. For input data that exceeds 256 KB, use ``input`` instead to retrieve the input data from S3. You must specify either the ``body`` or the ``input`` field, but not both. Default: Input data is retrieved from the location specified in the ``input`` field
4627
+ :param content_type: The MIME type of the input data in the request. Default: 'application/json'
4628
+ :param input: The source location to retrieve the input data from. Default: Input data is retrieved from the ``body`` field
4629
+ :param output: The destination location where the API response is written. If you specify this field, the API response body is replaced with a reference to the output location. Default: The API response body is returned in the result.
3870
4630
 
3871
4631
  :exampleMetadata: infused
3872
4632
 
3873
4633
  Example::
3874
4634
 
3875
- import aws_cdk.aws_batch as batch
3876
- # batch_job_definition: batch.EcsJobDefinition
3877
- # batch_queue: batch.JobQueue
4635
+ import aws_cdk.aws_bedrock as bedrock
3878
4636
 
3879
4637
 
3880
- task = tasks.BatchSubmitJob(self, "Submit Job",
3881
- job_definition_arn=batch_job_definition.job_definition_arn,
3882
- job_name="MyJob",
3883
- job_queue_arn=batch_queue.job_queue_arn
4638
+ model = bedrock.FoundationModel.from_foundation_model_id(self, "Model", bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1)
4639
+
4640
+ task = tasks.BedrockInvokeModel(self, "Prompt Model",
4641
+ model=model,
4642
+ body=sfn.TaskInput.from_object({
4643
+ "input_text": "Generate a list of five first names.",
4644
+ "text_generation_config": {
4645
+ "max_token_count": 100,
4646
+ "temperature": 1
4647
+ }
4648
+ }),
4649
+ result_selector={
4650
+ "names": sfn.JsonPath.string_at("$.Body.results[0].outputText")
4651
+ }
3884
4652
  )
3885
4653
  '''
3886
4654
  if isinstance(credentials, dict):
3887
4655
  credentials = _Credentials_2cd64c6b(**credentials)
3888
- if isinstance(container_overrides, dict):
3889
- container_overrides = BatchContainerOverrides(**container_overrides)
4656
+ if isinstance(input, dict):
4657
+ input = BedrockInvokeModelInputProps(**input)
4658
+ if isinstance(output, dict):
4659
+ output = BedrockInvokeModelOutputProps(**output)
3890
4660
  if __debug__:
3891
- type_hints = typing.get_type_hints(_typecheckingstub__c3197d21dad4ba55e29e09cf770b47b7859167ae6b1ae5ef674cca1bedf86a92)
4661
+ type_hints = typing.get_type_hints(_typecheckingstub__a9bf54cbc3850dd1a65ada3b96e97b5e68b7027badd90592dbcc79a35d9b216e)
3892
4662
  check_type(argname="argument comment", value=comment, expected_type=type_hints["comment"])
3893
4663
  check_type(argname="argument credentials", value=credentials, expected_type=type_hints["credentials"])
3894
4664
  check_type(argname="argument heartbeat", value=heartbeat, expected_type=type_hints["heartbeat"])
@@ -3901,19 +4671,14 @@ class BatchSubmitJobProps(_TaskStateBaseProps_3a62b6d0):
3901
4671
  check_type(argname="argument state_name", value=state_name, expected_type=type_hints["state_name"])
3902
4672
  check_type(argname="argument task_timeout", value=task_timeout, expected_type=type_hints["task_timeout"])
3903
4673
  check_type(argname="argument timeout", value=timeout, expected_type=type_hints["timeout"])
3904
- check_type(argname="argument job_definition_arn", value=job_definition_arn, expected_type=type_hints["job_definition_arn"])
3905
- check_type(argname="argument job_name", value=job_name, expected_type=type_hints["job_name"])
3906
- check_type(argname="argument job_queue_arn", value=job_queue_arn, expected_type=type_hints["job_queue_arn"])
3907
- check_type(argname="argument array_size", value=array_size, expected_type=type_hints["array_size"])
3908
- check_type(argname="argument attempts", value=attempts, expected_type=type_hints["attempts"])
3909
- check_type(argname="argument container_overrides", value=container_overrides, expected_type=type_hints["container_overrides"])
3910
- check_type(argname="argument depends_on", value=depends_on, expected_type=type_hints["depends_on"])
3911
- check_type(argname="argument payload", value=payload, expected_type=type_hints["payload"])
3912
- check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
4674
+ check_type(argname="argument model", value=model, expected_type=type_hints["model"])
4675
+ check_type(argname="argument accept", value=accept, expected_type=type_hints["accept"])
4676
+ check_type(argname="argument body", value=body, expected_type=type_hints["body"])
4677
+ check_type(argname="argument content_type", value=content_type, expected_type=type_hints["content_type"])
4678
+ check_type(argname="argument input", value=input, expected_type=type_hints["input"])
4679
+ check_type(argname="argument output", value=output, expected_type=type_hints["output"])
3913
4680
  self._values: typing.Dict[builtins.str, typing.Any] = {
3914
- "job_definition_arn": job_definition_arn,
3915
- "job_name": job_name,
3916
- "job_queue_arn": job_queue_arn,
4681
+ "model": model,
3917
4682
  }
3918
4683
  if comment is not None:
3919
4684
  self._values["comment"] = comment
@@ -3939,18 +4704,16 @@ class BatchSubmitJobProps(_TaskStateBaseProps_3a62b6d0):
3939
4704
  self._values["task_timeout"] = task_timeout
3940
4705
  if timeout is not None:
3941
4706
  self._values["timeout"] = timeout
3942
- if array_size is not None:
3943
- self._values["array_size"] = array_size
3944
- if attempts is not None:
3945
- self._values["attempts"] = attempts
3946
- if container_overrides is not None:
3947
- self._values["container_overrides"] = container_overrides
3948
- if depends_on is not None:
3949
- self._values["depends_on"] = depends_on
3950
- if payload is not None:
3951
- self._values["payload"] = payload
3952
- if tags is not None:
3953
- self._values["tags"] = tags
4707
+ if accept is not None:
4708
+ self._values["accept"] = accept
4709
+ if body is not None:
4710
+ self._values["body"] = body
4711
+ if content_type is not None:
4712
+ self._values["content_type"] = content_type
4713
+ if input is not None:
4714
+ self._values["input"] = input
4715
+ if output is not None:
4716
+ self._values["output"] = output
3954
4717
 
3955
4718
  @builtins.property
3956
4719
  def comment(self) -> typing.Optional[builtins.str]:
@@ -4106,96 +4869,79 @@ class BatchSubmitJobProps(_TaskStateBaseProps_3a62b6d0):
4106
4869
  return typing.cast(typing.Optional[_Duration_4839e8c3], result)
4107
4870
 
4108
4871
  @builtins.property
4109
- def job_definition_arn(self) -> builtins.str:
4110
- '''The arn of the job definition used by this job.'''
4111
- result = self._values.get("job_definition_arn")
4112
- assert result is not None, "Required property 'job_definition_arn' is missing"
4113
- return typing.cast(builtins.str, result)
4114
-
4115
- @builtins.property
4116
- def job_name(self) -> builtins.str:
4117
- '''The name of the job.
4872
+ def model(self) -> _IModel_b88b328a:
4873
+ '''The Bedrock model that the task will invoke.
4118
4874
 
4119
- The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase),
4120
- numbers, hyphens, and underscores are allowed.
4875
+ :see: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
4121
4876
  '''
4122
- result = self._values.get("job_name")
4123
- assert result is not None, "Required property 'job_name' is missing"
4124
- return typing.cast(builtins.str, result)
4125
-
4126
- @builtins.property
4127
- def job_queue_arn(self) -> builtins.str:
4128
- '''The arn of the job queue into which the job is submitted.'''
4129
- result = self._values.get("job_queue_arn")
4130
- assert result is not None, "Required property 'job_queue_arn' is missing"
4131
- return typing.cast(builtins.str, result)
4877
+ result = self._values.get("model")
4878
+ assert result is not None, "Required property 'model' is missing"
4879
+ return typing.cast(_IModel_b88b328a, result)
4132
4880
 
4133
4881
  @builtins.property
4134
- def array_size(self) -> typing.Optional[jsii.Number]:
4135
- '''The array size can be between 2 and 10,000.
4882
+ def accept(self) -> typing.Optional[builtins.str]:
4883
+ '''The desired MIME type of the inference body in the response.
4136
4884
 
4137
- If you specify array properties for a job, it becomes an array job.
4138
- For more information, see Array Jobs in the AWS Batch User Guide.
4885
+ :default: 'application/json'
4139
4886
 
4140
- :default: - No array size
4887
+ :see: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
4141
4888
  '''
4142
- result = self._values.get("array_size")
4143
- return typing.cast(typing.Optional[jsii.Number], result)
4889
+ result = self._values.get("accept")
4890
+ return typing.cast(typing.Optional[builtins.str], result)
4144
4891
 
4145
4892
  @builtins.property
4146
- def attempts(self) -> typing.Optional[jsii.Number]:
4147
- '''The number of times to move a job to the RUNNABLE status.
4893
+ def body(self) -> typing.Optional[_TaskInput_91b91b91]:
4894
+ '''The input data for the Bedrock model invocation.
4148
4895
 
4149
- You may specify between 1 and 10 attempts.
4150
- If the value of attempts is greater than one,
4151
- the job is retried on failure the same number of attempts as the value.
4896
+ The inference parameters contained in the body depend on the Bedrock model being used.
4152
4897
 
4153
- :default: 1
4154
- '''
4155
- result = self._values.get("attempts")
4156
- return typing.cast(typing.Optional[jsii.Number], result)
4898
+ The body must be in the format specified in the ``contentType`` field.
4899
+ For example, if the content type is ``application/json``, the body must be
4900
+ JSON formatted.
4157
4901
 
4158
- @builtins.property
4159
- def container_overrides(self) -> typing.Optional[BatchContainerOverrides]:
4160
- '''A list of container overrides in JSON format that specify the name of a container in the specified job definition and the overrides it should receive.
4902
+ The body must be up to 256 KB in size. For input data that exceeds 256 KB,
4903
+ use ``input`` instead to retrieve the input data from S3.
4161
4904
 
4162
- :default: - No container overrides
4905
+ You must specify either the ``body`` or the ``input`` field, but not both.
4163
4906
 
4164
- :see: https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-containerOverrides
4907
+ :default: Input data is retrieved from the location specified in the ``input`` field
4908
+
4909
+ :see: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
4165
4910
  '''
4166
- result = self._values.get("container_overrides")
4167
- return typing.cast(typing.Optional[BatchContainerOverrides], result)
4911
+ result = self._values.get("body")
4912
+ return typing.cast(typing.Optional[_TaskInput_91b91b91], result)
4168
4913
 
4169
4914
  @builtins.property
4170
- def depends_on(self) -> typing.Optional[typing.List[BatchJobDependency]]:
4171
- '''A list of dependencies for the job.
4172
-
4173
- A job can depend upon a maximum of 20 jobs.
4915
+ def content_type(self) -> typing.Optional[builtins.str]:
4916
+ '''The MIME type of the input data in the request.
4174
4917
 
4175
- :default: - No dependencies
4918
+ :default: 'application/json'
4176
4919
 
4177
- :see: https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-dependsOn
4920
+ :see: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
4178
4921
  '''
4179
- result = self._values.get("depends_on")
4180
- return typing.cast(typing.Optional[typing.List[BatchJobDependency]], result)
4922
+ result = self._values.get("content_type")
4923
+ return typing.cast(typing.Optional[builtins.str], result)
4181
4924
 
4182
4925
  @builtins.property
4183
- def payload(self) -> typing.Optional[_TaskInput_91b91b91]:
4184
- '''The payload to be passed as parameters to the batch job.
4926
+ def input(self) -> typing.Optional[BedrockInvokeModelInputProps]:
4927
+ '''The source location to retrieve the input data from.
4185
4928
 
4186
- :default: - No parameters are passed
4929
+ :default: Input data is retrieved from the ``body`` field
4187
4930
  '''
4188
- result = self._values.get("payload")
4189
- return typing.cast(typing.Optional[_TaskInput_91b91b91], result)
4931
+ result = self._values.get("input")
4932
+ return typing.cast(typing.Optional[BedrockInvokeModelInputProps], result)
4190
4933
 
4191
4934
  @builtins.property
4192
- def tags(self) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
4193
- '''The tags applied to the job request.
4935
+ def output(self) -> typing.Optional[BedrockInvokeModelOutputProps]:
4936
+ '''The destination location where the API response is written.
4194
4937
 
4195
- :default: {} - no tags
4938
+ If you specify this field, the API response body is replaced with a reference to the
4939
+ output location.
4940
+
4941
+ :default: The API response body is returned in the result.
4196
4942
  '''
4197
- result = self._values.get("tags")
4198
- return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
4943
+ result = self._values.get("output")
4944
+ return typing.cast(typing.Optional[BedrockInvokeModelOutputProps], result)
4199
4945
 
4200
4946
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
4201
4947
  return isinstance(rhs, self.__class__) and rhs._values == self._values
@@ -4204,7 +4950,7 @@ class BatchSubmitJobProps(_TaskStateBaseProps_3a62b6d0):
4204
4950
  return not (rhs == self)
4205
4951
 
4206
4952
  def __repr__(self) -> str:
4207
- return "BatchSubmitJobProps(%s)" % ", ".join(
4953
+ return "BedrockInvokeModelProps(%s)" % ", ".join(
4208
4954
  k + "=" + repr(v) for k, v in self._values.items()
4209
4955
  )
4210
4956
 
@@ -4608,7 +5354,7 @@ class CallApiGatewayHttpApiEndpoint(
4608
5354
 
4609
5355
  Example::
4610
5356
 
4611
- import aws_cdk.aws_apigatewayv2_alpha as apigatewayv2
5357
+ import aws_cdk.aws_apigatewayv2 as apigatewayv2
4612
5358
 
4613
5359
  http_api = apigatewayv2.HttpApi(self, "MyHttpApi")
4614
5360
 
@@ -4812,7 +5558,7 @@ class CallApiGatewayHttpApiEndpointProps(CallApiGatewayEndpointBaseProps):
4812
5558
 
4813
5559
  Example::
4814
5560
 
4815
- import aws_cdk.aws_apigatewayv2_alpha as apigatewayv2
5561
+ import aws_cdk.aws_apigatewayv2 as apigatewayv2
4816
5562
 
4817
5563
  http_api = apigatewayv2.HttpApi(self, "MyHttpApi")
4818
5564
 
@@ -11599,6 +12345,7 @@ class EmrAddStep(
11599
12345
  name: builtins.str,
11600
12346
  action_on_failure: typing.Optional[ActionOnFailure] = None,
11601
12347
  args: typing.Optional[typing.Sequence[builtins.str]] = None,
12348
+ execution_role_arn: typing.Optional[builtins.str] = None,
11602
12349
  main_class: typing.Optional[builtins.str] = None,
11603
12350
  properties: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
11604
12351
  comment: typing.Optional[builtins.str] = None,
@@ -11622,6 +12369,7 @@ class EmrAddStep(
11622
12369
  :param name: The name of the Step.
11623
12370
  :param action_on_failure: The action to take when the cluster step fails. Default: ActionOnFailure.CONTINUE
11624
12371
  :param args: A list of command line arguments passed to the JAR file's main function when executed. Default: - No args
12372
+ :param execution_role_arn: The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. Default: - Uses EC2 instance profile role
11625
12373
  :param main_class: The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file. Default: - No mainClass
11626
12374
  :param properties: A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function. Default: - No properties
11627
12375
  :param comment: An optional description for this state. Default: - No comment
@@ -11647,6 +12395,7 @@ class EmrAddStep(
11647
12395
  name=name,
11648
12396
  action_on_failure=action_on_failure,
11649
12397
  args=args,
12398
+ execution_role_arn=execution_role_arn,
11650
12399
  main_class=main_class,
11651
12400
  properties=properties,
11652
12401
  comment=comment,
@@ -11697,6 +12446,7 @@ class EmrAddStep(
11697
12446
  "name": "name",
11698
12447
  "action_on_failure": "actionOnFailure",
11699
12448
  "args": "args",
12449
+ "execution_role_arn": "executionRoleArn",
11700
12450
  "main_class": "mainClass",
11701
12451
  "properties": "properties",
11702
12452
  },
@@ -11722,6 +12472,7 @@ class EmrAddStepProps(_TaskStateBaseProps_3a62b6d0):
11722
12472
  name: builtins.str,
11723
12473
  action_on_failure: typing.Optional[ActionOnFailure] = None,
11724
12474
  args: typing.Optional[typing.Sequence[builtins.str]] = None,
12475
+ execution_role_arn: typing.Optional[builtins.str] = None,
11725
12476
  main_class: typing.Optional[builtins.str] = None,
11726
12477
  properties: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
11727
12478
  ) -> None:
@@ -11744,6 +12495,7 @@ class EmrAddStepProps(_TaskStateBaseProps_3a62b6d0):
11744
12495
  :param name: The name of the Step.
11745
12496
  :param action_on_failure: The action to take when the cluster step fails. Default: ActionOnFailure.CONTINUE
11746
12497
  :param args: A list of command line arguments passed to the JAR file's main function when executed. Default: - No args
12498
+ :param execution_role_arn: The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. Default: - Uses EC2 instance profile role
11747
12499
  :param main_class: The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file. Default: - No mainClass
11748
12500
  :param properties: A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function. Default: - No properties
11749
12501
 
@@ -11779,6 +12531,7 @@ class EmrAddStepProps(_TaskStateBaseProps_3a62b6d0):
11779
12531
  check_type(argname="argument name", value=name, expected_type=type_hints["name"])
11780
12532
  check_type(argname="argument action_on_failure", value=action_on_failure, expected_type=type_hints["action_on_failure"])
11781
12533
  check_type(argname="argument args", value=args, expected_type=type_hints["args"])
12534
+ check_type(argname="argument execution_role_arn", value=execution_role_arn, expected_type=type_hints["execution_role_arn"])
11782
12535
  check_type(argname="argument main_class", value=main_class, expected_type=type_hints["main_class"])
11783
12536
  check_type(argname="argument properties", value=properties, expected_type=type_hints["properties"])
11784
12537
  self._values: typing.Dict[builtins.str, typing.Any] = {
@@ -11814,6 +12567,8 @@ class EmrAddStepProps(_TaskStateBaseProps_3a62b6d0):
11814
12567
  self._values["action_on_failure"] = action_on_failure
11815
12568
  if args is not None:
11816
12569
  self._values["args"] = args
12570
+ if execution_role_arn is not None:
12571
+ self._values["execution_role_arn"] = execution_role_arn
11817
12572
  if main_class is not None:
11818
12573
  self._values["main_class"] = main_class
11819
12574
  if properties is not None:
@@ -12021,6 +12776,17 @@ class EmrAddStepProps(_TaskStateBaseProps_3a62b6d0):
12021
12776
  result = self._values.get("args")
12022
12777
  return typing.cast(typing.Optional[typing.List[builtins.str]], result)
12023
12778
 
12779
+ @builtins.property
12780
+ def execution_role_arn(self) -> typing.Optional[builtins.str]:
12781
+ '''The Amazon Resource Name (ARN) of the runtime role for a step on the cluster.
12782
+
12783
+ :default: - Uses EC2 instance profile role
12784
+
12785
+ :see: https://docs.aws.amazon.com/emr/latest/APIReference/API_AddJobFlowSteps.html#API_AddJobFlowSteps_RequestSyntax
12786
+ '''
12787
+ result = self._values.get("execution_role_arn")
12788
+ return typing.cast(typing.Optional[builtins.str], result)
12789
+
12024
12790
  @builtins.property
12025
12791
  def main_class(self) -> typing.Optional[builtins.str]:
12026
12792
  '''The name of the main class in the specified Java file.
@@ -21312,7 +22078,7 @@ class HttpMethod(enum.Enum):
21312
22078
 
21313
22079
  Example::
21314
22080
 
21315
- import aws_cdk.aws_apigatewayv2_alpha as apigatewayv2
22081
+ import aws_cdk.aws_apigatewayv2 as apigatewayv2
21316
22082
 
21317
22083
  http_api = apigatewayv2.HttpApi(self, "MyHttpApi")
21318
22084
 
@@ -29860,6 +30626,10 @@ __all__ = [
29860
30626
  "BatchStrategy",
29861
30627
  "BatchSubmitJob",
29862
30628
  "BatchSubmitJobProps",
30629
+ "BedrockInvokeModel",
30630
+ "BedrockInvokeModelInputProps",
30631
+ "BedrockInvokeModelOutputProps",
30632
+ "BedrockInvokeModelProps",
29863
30633
  "CallApiGatewayEndpointBaseProps",
29864
30634
  "CallApiGatewayHttpApiEndpoint",
29865
30635
  "CallApiGatewayHttpApiEndpointProps",
@@ -30290,6 +31060,70 @@ def _typecheckingstub__c3197d21dad4ba55e29e09cf770b47b7859167ae6b1ae5ef674cca1be
30290
31060
  """Type checking stubs"""
30291
31061
  pass
30292
31062
 
31063
+ def _typecheckingstub__3b20c515efa874adacf78d373dbda10fc59e519a3bd1b280ecbf56409aea2544(
31064
+ scope: _constructs_77d1e7e8.Construct,
31065
+ id: builtins.str,
31066
+ *,
31067
+ model: _IModel_b88b328a,
31068
+ accept: typing.Optional[builtins.str] = None,
31069
+ body: typing.Optional[_TaskInput_91b91b91] = None,
31070
+ content_type: typing.Optional[builtins.str] = None,
31071
+ input: typing.Optional[typing.Union[BedrockInvokeModelInputProps, typing.Dict[builtins.str, typing.Any]]] = None,
31072
+ output: typing.Optional[typing.Union[BedrockInvokeModelOutputProps, typing.Dict[builtins.str, typing.Any]]] = None,
31073
+ comment: typing.Optional[builtins.str] = None,
31074
+ credentials: typing.Optional[typing.Union[_Credentials_2cd64c6b, typing.Dict[builtins.str, typing.Any]]] = None,
31075
+ heartbeat: typing.Optional[_Duration_4839e8c3] = None,
31076
+ heartbeat_timeout: typing.Optional[_Timeout_d7c10551] = None,
31077
+ input_path: typing.Optional[builtins.str] = None,
31078
+ integration_pattern: typing.Optional[_IntegrationPattern_949291bc] = None,
31079
+ output_path: typing.Optional[builtins.str] = None,
31080
+ result_path: typing.Optional[builtins.str] = None,
31081
+ result_selector: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
31082
+ state_name: typing.Optional[builtins.str] = None,
31083
+ task_timeout: typing.Optional[_Timeout_d7c10551] = None,
31084
+ timeout: typing.Optional[_Duration_4839e8c3] = None,
31085
+ ) -> None:
31086
+ """Type checking stubs"""
31087
+ pass
31088
+
31089
+ def _typecheckingstub__5832c6287635fafcd3211864b6568285ae981df509ea5c6b8dd8458d0254c232(
31090
+ *,
31091
+ s3_location: typing.Optional[typing.Union[_Location_0948fa7f, typing.Dict[builtins.str, typing.Any]]] = None,
31092
+ ) -> None:
31093
+ """Type checking stubs"""
31094
+ pass
31095
+
31096
+ def _typecheckingstub__1ae5c9f4810ca6d7749a0e5f6df435956d3660251fb9427f7b8aea21bc5a7fb1(
31097
+ *,
31098
+ s3_location: typing.Optional[typing.Union[_Location_0948fa7f, typing.Dict[builtins.str, typing.Any]]] = None,
31099
+ ) -> None:
31100
+ """Type checking stubs"""
31101
+ pass
31102
+
31103
+ def _typecheckingstub__a9bf54cbc3850dd1a65ada3b96e97b5e68b7027badd90592dbcc79a35d9b216e(
31104
+ *,
31105
+ comment: typing.Optional[builtins.str] = None,
31106
+ credentials: typing.Optional[typing.Union[_Credentials_2cd64c6b, typing.Dict[builtins.str, typing.Any]]] = None,
31107
+ heartbeat: typing.Optional[_Duration_4839e8c3] = None,
31108
+ heartbeat_timeout: typing.Optional[_Timeout_d7c10551] = None,
31109
+ input_path: typing.Optional[builtins.str] = None,
31110
+ integration_pattern: typing.Optional[_IntegrationPattern_949291bc] = None,
31111
+ output_path: typing.Optional[builtins.str] = None,
31112
+ result_path: typing.Optional[builtins.str] = None,
31113
+ result_selector: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
31114
+ state_name: typing.Optional[builtins.str] = None,
31115
+ task_timeout: typing.Optional[_Timeout_d7c10551] = None,
31116
+ timeout: typing.Optional[_Duration_4839e8c3] = None,
31117
+ model: _IModel_b88b328a,
31118
+ accept: typing.Optional[builtins.str] = None,
31119
+ body: typing.Optional[_TaskInput_91b91b91] = None,
31120
+ content_type: typing.Optional[builtins.str] = None,
31121
+ input: typing.Optional[typing.Union[BedrockInvokeModelInputProps, typing.Dict[builtins.str, typing.Any]]] = None,
31122
+ output: typing.Optional[typing.Union[BedrockInvokeModelOutputProps, typing.Dict[builtins.str, typing.Any]]] = None,
31123
+ ) -> None:
31124
+ """Type checking stubs"""
31125
+ pass
31126
+
30293
31127
  def _typecheckingstub__e9dbc58cb4f9a28fbab12032a3c39bc929dcf76e35816fe9ba25aab36499c005(
30294
31128
  *,
30295
31129
  comment: typing.Optional[builtins.str] = None,
@@ -31116,6 +31950,7 @@ def _typecheckingstub__3889d4459b3d727348b867bd8b4b4db43cb1a83f081697d2504a78836
31116
31950
  name: builtins.str,
31117
31951
  action_on_failure: typing.Optional[ActionOnFailure] = None,
31118
31952
  args: typing.Optional[typing.Sequence[builtins.str]] = None,
31953
+ execution_role_arn: typing.Optional[builtins.str] = None,
31119
31954
  main_class: typing.Optional[builtins.str] = None,
31120
31955
  properties: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
31121
31956
  comment: typing.Optional[builtins.str] = None,
@@ -31153,6 +31988,7 @@ def _typecheckingstub__16e8ce40cbe4d2af2daa80fd98236e2d21a2b602039be22115fc95da9
31153
31988
  name: builtins.str,
31154
31989
  action_on_failure: typing.Optional[ActionOnFailure] = None,
31155
31990
  args: typing.Optional[typing.Sequence[builtins.str]] = None,
31991
+ execution_role_arn: typing.Optional[builtins.str] = None,
31156
31992
  main_class: typing.Optional[builtins.str] = None,
31157
31993
  properties: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
31158
31994
  ) -> None: