aws-cdk-lib 2.198.0__py3-none-any.whl → 2.199.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.

@@ -40,9 +40,11 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aw
40
40
  * [Bedrock](#bedrock)
41
41
 
42
42
  * [InvokeModel](#invokemodel)
43
+ * [createModelCustomizationJob](#createmodelcustomizationjob)
43
44
  * [CodeBuild](#codebuild)
44
45
 
45
46
  * [StartBuild](#startbuild)
47
+ * [StartBuildBatch](#startbuildbatch)
46
48
  * [DynamoDB](#dynamodb)
47
49
 
48
50
  * [GetItem](#getitem)
@@ -55,6 +57,7 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aw
55
57
 
56
58
  * [EC2](#ec2)
57
59
  * [Fargate](#fargate)
60
+ * [ECS enable Exec](#ecs-enable-exec)
58
61
  * [EMR](#emr)
59
62
 
60
63
  * [Create Cluster](#create-cluster)
@@ -77,8 +80,8 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aw
77
80
  * [Put Events](#put-events)
78
81
  * [Glue](#glue)
79
82
 
80
- * [Start Job Run](#start-job-run)
81
- * [Start Crawler Run](#startcrawlerrun)
83
+ * [StartJobRun](#startjobrun)
84
+ * [StartCrawlerRun](#startcrawlerrun)
82
85
  * [Glue DataBrew](#glue-databrew)
83
86
 
84
87
  * [Start Job Run](#start-job-run-1)
@@ -510,6 +513,56 @@ task = tasks.BedrockInvokeModel(self, "Prompt Model with guardrail",
510
513
  )
511
514
  ```
512
515
 
516
+ ### createModelCustomizationJob
517
+
518
+ The [CreateModelCustomizationJob](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelCustomizationJob.html) API creates a fine-tuning job to customize a base model.
519
+
520
+ ```python
521
+ import aws_cdk.aws_bedrock as bedrock
522
+ import aws_cdk.aws_kms as kms
523
+
524
+ # output_bucket: s3.IBucket
525
+ # training_bucket: s3.IBucket
526
+ # validation_bucket: s3.IBucket
527
+ # kms_key: kms.IKey
528
+ # vpc: ec2.IVpc
529
+
530
+
531
+ model = bedrock.FoundationModel.from_foundation_model_id(self, "Model", bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1)
532
+
533
+ task = tasks.BedrockCreateModelCustomizationJob(self, "CreateModelCustomizationJob",
534
+ base_model=model,
535
+ client_request_token="MyToken",
536
+ customization_type=tasks.CustomizationType.FINE_TUNING,
537
+ custom_model_kms_key=kms_key,
538
+ custom_model_name="MyCustomModel", # required
539
+ custom_model_tags=[tasks.CustomModelTag(key="key1", value="value1")],
540
+ hyper_parameters={
541
+ "batch_size": "10"
542
+ },
543
+ job_name="MyCustomizationJob", # required
544
+ job_tags=[tasks.CustomModelTag(key="key2", value="value2")],
545
+ output_data=tasks.OutputBucketConfiguration(
546
+ bucket=output_bucket, # required
547
+ path="output-data/"
548
+ ),
549
+ training_data=tasks.TrainingBucketConfiguration(
550
+ bucket=training_bucket,
551
+ path="training-data/data.json"
552
+ ), # required
553
+ # If you don't provide validation data, you have to specify `Evaluation percentage` hyperparameter.
554
+ validation_data=[tasks.ValidationBucketConfiguration(
555
+ bucket=validation_bucket,
556
+ path="validation-data/data.json"
557
+ )
558
+ ],
559
+ vpc_config={
560
+ "security_groups": [ec2.SecurityGroup(self, "SecurityGroup", vpc=vpc)],
561
+ "subnets": vpc.private_subnets
562
+ }
563
+ )
564
+ ```
565
+
513
566
  ## CodeBuild
514
567
 
515
568
  Step Functions supports [CodeBuild](https://docs.aws.amazon.com/step-functions/latest/dg/connect-codebuild.html) through the service integration pattern.
@@ -2018,6 +2071,7 @@ from ..aws_ec2 import (
2018
2071
  Connections as _Connections_0f31fce8,
2019
2072
  IConnectable as _IConnectable_10015a05,
2020
2073
  ISecurityGroup as _ISecurityGroup_acf8a799,
2074
+ ISubnet as _ISubnet_d57d1229,
2021
2075
  IVpc as _IVpc_f30d5663,
2022
2076
  InstanceSize as _InstanceSize_233b2620,
2023
2077
  InstanceType as _InstanceType_f64915b9,
@@ -9826,6 +9880,791 @@ class BatchSubmitJobProps(_TaskStateBaseProps_3a62b6d0):
9826
9880
  )
9827
9881
 
9828
9882
 
9883
+ class BedrockCreateModelCustomizationJob(
9884
+ _TaskStateBase_b5c0a816,
9885
+ metaclass=jsii.JSIIMeta,
9886
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.BedrockCreateModelCustomizationJob",
9887
+ ):
9888
+ '''A Step Functions Task to create model customization in Bedrock.
9889
+
9890
+ :exampleMetadata: infused
9891
+
9892
+ Example::
9893
+
9894
+ import aws_cdk.aws_bedrock as bedrock
9895
+ import aws_cdk.aws_kms as kms
9896
+
9897
+ # output_bucket: s3.IBucket
9898
+ # training_bucket: s3.IBucket
9899
+ # validation_bucket: s3.IBucket
9900
+ # kms_key: kms.IKey
9901
+ # vpc: ec2.IVpc
9902
+
9903
+
9904
+ model = bedrock.FoundationModel.from_foundation_model_id(self, "Model", bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1)
9905
+
9906
+ task = tasks.BedrockCreateModelCustomizationJob(self, "CreateModelCustomizationJob",
9907
+ base_model=model,
9908
+ client_request_token="MyToken",
9909
+ customization_type=tasks.CustomizationType.FINE_TUNING,
9910
+ custom_model_kms_key=kms_key,
9911
+ custom_model_name="MyCustomModel", # required
9912
+ custom_model_tags=[tasks.CustomModelTag(key="key1", value="value1")],
9913
+ hyper_parameters={
9914
+ "batch_size": "10"
9915
+ },
9916
+ job_name="MyCustomizationJob", # required
9917
+ job_tags=[tasks.CustomModelTag(key="key2", value="value2")],
9918
+ output_data=tasks.OutputBucketConfiguration(
9919
+ bucket=output_bucket, # required
9920
+ path="output-data/"
9921
+ ),
9922
+ training_data=tasks.TrainingBucketConfiguration(
9923
+ bucket=training_bucket,
9924
+ path="training-data/data.json"
9925
+ ), # required
9926
+ # If you don't provide validation data, you have to specify `Evaluation percentage` hyperparameter.
9927
+ validation_data=[tasks.ValidationBucketConfiguration(
9928
+ bucket=validation_bucket,
9929
+ path="validation-data/data.json"
9930
+ )
9931
+ ],
9932
+ vpc_config={
9933
+ "security_groups": [ec2.SecurityGroup(self, "SecurityGroup", vpc=vpc)],
9934
+ "subnets": vpc.private_subnets
9935
+ }
9936
+ )
9937
+ '''
9938
+
9939
+ def __init__(
9940
+ self,
9941
+ scope: _constructs_77d1e7e8.Construct,
9942
+ id: builtins.str,
9943
+ *,
9944
+ base_model: _IModel_b88b328a,
9945
+ custom_model_name: builtins.str,
9946
+ job_name: builtins.str,
9947
+ output_data: typing.Union["OutputBucketConfiguration", typing.Dict[builtins.str, typing.Any]],
9948
+ training_data: typing.Union["TrainingBucketConfiguration", typing.Dict[builtins.str, typing.Any]],
9949
+ client_request_token: typing.Optional[builtins.str] = None,
9950
+ customization_type: typing.Optional["CustomizationType"] = None,
9951
+ custom_model_kms_key: typing.Optional[_IKey_5f11635f] = None,
9952
+ custom_model_tags: typing.Optional[typing.Sequence[typing.Union["CustomModelTag", typing.Dict[builtins.str, typing.Any]]]] = None,
9953
+ hyper_parameters: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
9954
+ job_tags: typing.Optional[typing.Sequence[typing.Union["CustomModelTag", typing.Dict[builtins.str, typing.Any]]]] = None,
9955
+ role: typing.Optional[_IRole_235f5d8e] = None,
9956
+ validation_data: typing.Optional[typing.Sequence[typing.Union["ValidationBucketConfiguration", typing.Dict[builtins.str, typing.Any]]]] = None,
9957
+ vpc_config: typing.Optional["IBedrockCreateModelCustomizationJobVpcConfig"] = None,
9958
+ result_path: typing.Optional[builtins.str] = None,
9959
+ result_selector: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
9960
+ comment: typing.Optional[builtins.str] = None,
9961
+ query_language: typing.Optional[_QueryLanguage_be8414a8] = None,
9962
+ state_name: typing.Optional[builtins.str] = None,
9963
+ credentials: typing.Optional[typing.Union[_Credentials_2cd64c6b, typing.Dict[builtins.str, typing.Any]]] = None,
9964
+ heartbeat: typing.Optional[_Duration_4839e8c3] = None,
9965
+ heartbeat_timeout: typing.Optional[_Timeout_d7c10551] = None,
9966
+ integration_pattern: typing.Optional[_IntegrationPattern_949291bc] = None,
9967
+ task_timeout: typing.Optional[_Timeout_d7c10551] = None,
9968
+ timeout: typing.Optional[_Duration_4839e8c3] = None,
9969
+ assign: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
9970
+ input_path: typing.Optional[builtins.str] = None,
9971
+ output_path: typing.Optional[builtins.str] = None,
9972
+ outputs: typing.Any = None,
9973
+ ) -> None:
9974
+ '''
9975
+ :param scope: -
9976
+ :param id: Descriptive identifier for this chainable.
9977
+ :param base_model: The base model.
9978
+ :param custom_model_name: A name for the resulting custom model. The maximum length is 63 characters.
9979
+ :param job_name: A name for the fine-tuning job. The maximum length is 63 characters.
9980
+ :param output_data: The S3 bucket configuration where the output data is stored.
9981
+ :param training_data: The S3 bucket configuration where the training data is stored.
9982
+ :param client_request_token: A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. The maximum length is 256 characters. Default: - no client request token
9983
+ :param customization_type: The customization type. Default: FINE_TUNING
9984
+ :param custom_model_kms_key: The custom model is encrypted at rest using this key. Default: - encrypted with the AWS owned key
9985
+ :param custom_model_tags: Tags to attach to the resulting custom model. The maximum number of tags is 200. Default: - no tags
9986
+ :param hyper_parameters: Parameters related to tuning the model. Default: - use default hyperparameters
9987
+ :param job_tags: Tags to attach to the job. The maximum number of tags is 200. Default: - no tags
9988
+ :param role: The IAM role that Amazon Bedrock can assume to perform tasks on your behalf. For example, during model training, Amazon Bedrock needs your permission to read input data from an S3 bucket, write model artifacts to an S3 bucket. To pass this role to Amazon Bedrock, the caller of this API must have the iam:PassRole permission. Default: - use auto generated role
9989
+ :param validation_data: The S3 bucket configuration where the validation data is stored. If you don't provide a validation dataset, specify the evaluation percentage by the ``Evaluation percentage`` hyperparameter. The maximum number is 10. Default: undefined - validate using a subset of the training data
9990
+ :param vpc_config: The VPC configuration. Default: - no VPC configuration
9991
+ :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: $
9992
+ :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
9993
+ :param comment: A comment describing this state. Default: No comment
9994
+ :param query_language: The name of the query language used by the state. If the state does not contain a ``queryLanguage`` field, then it will use the query language specified in the top-level ``queryLanguage`` field. Default: - JSONPath
9995
+ :param state_name: Optional name for this state. Default: - The construct ID will be used as state name
9996
+ :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)
9997
+ :param heartbeat: (deprecated) Timeout for the heartbeat. Default: - None
9998
+ :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
9999
+ :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. Depending on the AWS Service, the Service Integration Pattern availability will vary. Default: - ``IntegrationPattern.REQUEST_RESPONSE`` for most tasks. ``IntegrationPattern.RUN_JOB`` for the following exceptions: ``BatchSubmitJob``, ``EmrAddStep``, ``EmrCreateCluster``, ``EmrTerminationCluster``, and ``EmrContainersStartJobRun``.
10000
+ :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
10001
+ :param timeout: (deprecated) Timeout for the task. Default: - None
10002
+ :param assign: Workflow variables to store in this step. Using workflow variables, you can store data in a step and retrieve that data in future steps. Default: - Not assign variables
10003
+ :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: $
10004
+ :param output_path: JSONPath expression to select part of the state to be the output to this state. May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}. Default: $
10005
+ :param outputs: Used to specify and transform output from the state. When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly. Default: - $states.result or $states.errorOutput
10006
+ '''
10007
+ if __debug__:
10008
+ type_hints = typing.get_type_hints(_typecheckingstub__05f50c48ead9c1041aeef184ab271f7236e2832bc9e7175e9c6909f2fc4097e0)
10009
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
10010
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
10011
+ props = BedrockCreateModelCustomizationJobProps(
10012
+ base_model=base_model,
10013
+ custom_model_name=custom_model_name,
10014
+ job_name=job_name,
10015
+ output_data=output_data,
10016
+ training_data=training_data,
10017
+ client_request_token=client_request_token,
10018
+ customization_type=customization_type,
10019
+ custom_model_kms_key=custom_model_kms_key,
10020
+ custom_model_tags=custom_model_tags,
10021
+ hyper_parameters=hyper_parameters,
10022
+ job_tags=job_tags,
10023
+ role=role,
10024
+ validation_data=validation_data,
10025
+ vpc_config=vpc_config,
10026
+ result_path=result_path,
10027
+ result_selector=result_selector,
10028
+ comment=comment,
10029
+ query_language=query_language,
10030
+ state_name=state_name,
10031
+ credentials=credentials,
10032
+ heartbeat=heartbeat,
10033
+ heartbeat_timeout=heartbeat_timeout,
10034
+ integration_pattern=integration_pattern,
10035
+ task_timeout=task_timeout,
10036
+ timeout=timeout,
10037
+ assign=assign,
10038
+ input_path=input_path,
10039
+ output_path=output_path,
10040
+ outputs=outputs,
10041
+ )
10042
+
10043
+ jsii.create(self.__class__, self, [scope, id, props])
10044
+
10045
+ @builtins.property
10046
+ @jsii.member(jsii_name="role")
10047
+ def role(self) -> _IRole_235f5d8e:
10048
+ '''The IAM role for the bedrock create model customization job.'''
10049
+ return typing.cast(_IRole_235f5d8e, jsii.get(self, "role"))
10050
+
10051
+ @builtins.property
10052
+ @jsii.member(jsii_name="taskMetrics")
10053
+ def _task_metrics(self) -> typing.Optional[_TaskMetricsConfig_32ea9403]:
10054
+ return typing.cast(typing.Optional[_TaskMetricsConfig_32ea9403], jsii.get(self, "taskMetrics"))
10055
+
10056
+ @builtins.property
10057
+ @jsii.member(jsii_name="taskPolicies")
10058
+ def _task_policies(self) -> typing.Optional[typing.List[_PolicyStatement_0fe33853]]:
10059
+ return typing.cast(typing.Optional[typing.List[_PolicyStatement_0fe33853]], jsii.get(self, "taskPolicies"))
10060
+
10061
+
10062
+ @jsii.data_type(
10063
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.BedrockCreateModelCustomizationJobProps",
10064
+ jsii_struct_bases=[_TaskStateBaseProps_3a62b6d0],
10065
+ name_mapping={
10066
+ "comment": "comment",
10067
+ "query_language": "queryLanguage",
10068
+ "state_name": "stateName",
10069
+ "credentials": "credentials",
10070
+ "heartbeat": "heartbeat",
10071
+ "heartbeat_timeout": "heartbeatTimeout",
10072
+ "integration_pattern": "integrationPattern",
10073
+ "task_timeout": "taskTimeout",
10074
+ "timeout": "timeout",
10075
+ "assign": "assign",
10076
+ "input_path": "inputPath",
10077
+ "output_path": "outputPath",
10078
+ "outputs": "outputs",
10079
+ "result_path": "resultPath",
10080
+ "result_selector": "resultSelector",
10081
+ "base_model": "baseModel",
10082
+ "custom_model_name": "customModelName",
10083
+ "job_name": "jobName",
10084
+ "output_data": "outputData",
10085
+ "training_data": "trainingData",
10086
+ "client_request_token": "clientRequestToken",
10087
+ "customization_type": "customizationType",
10088
+ "custom_model_kms_key": "customModelKmsKey",
10089
+ "custom_model_tags": "customModelTags",
10090
+ "hyper_parameters": "hyperParameters",
10091
+ "job_tags": "jobTags",
10092
+ "role": "role",
10093
+ "validation_data": "validationData",
10094
+ "vpc_config": "vpcConfig",
10095
+ },
10096
+ )
10097
+ class BedrockCreateModelCustomizationJobProps(_TaskStateBaseProps_3a62b6d0):
10098
+ def __init__(
10099
+ self,
10100
+ *,
10101
+ comment: typing.Optional[builtins.str] = None,
10102
+ query_language: typing.Optional[_QueryLanguage_be8414a8] = None,
10103
+ state_name: typing.Optional[builtins.str] = None,
10104
+ credentials: typing.Optional[typing.Union[_Credentials_2cd64c6b, typing.Dict[builtins.str, typing.Any]]] = None,
10105
+ heartbeat: typing.Optional[_Duration_4839e8c3] = None,
10106
+ heartbeat_timeout: typing.Optional[_Timeout_d7c10551] = None,
10107
+ integration_pattern: typing.Optional[_IntegrationPattern_949291bc] = None,
10108
+ task_timeout: typing.Optional[_Timeout_d7c10551] = None,
10109
+ timeout: typing.Optional[_Duration_4839e8c3] = None,
10110
+ assign: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
10111
+ input_path: typing.Optional[builtins.str] = None,
10112
+ output_path: typing.Optional[builtins.str] = None,
10113
+ outputs: typing.Any = None,
10114
+ result_path: typing.Optional[builtins.str] = None,
10115
+ result_selector: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
10116
+ base_model: _IModel_b88b328a,
10117
+ custom_model_name: builtins.str,
10118
+ job_name: builtins.str,
10119
+ output_data: typing.Union["OutputBucketConfiguration", typing.Dict[builtins.str, typing.Any]],
10120
+ training_data: typing.Union["TrainingBucketConfiguration", typing.Dict[builtins.str, typing.Any]],
10121
+ client_request_token: typing.Optional[builtins.str] = None,
10122
+ customization_type: typing.Optional["CustomizationType"] = None,
10123
+ custom_model_kms_key: typing.Optional[_IKey_5f11635f] = None,
10124
+ custom_model_tags: typing.Optional[typing.Sequence[typing.Union["CustomModelTag", typing.Dict[builtins.str, typing.Any]]]] = None,
10125
+ hyper_parameters: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
10126
+ job_tags: typing.Optional[typing.Sequence[typing.Union["CustomModelTag", typing.Dict[builtins.str, typing.Any]]]] = None,
10127
+ role: typing.Optional[_IRole_235f5d8e] = None,
10128
+ validation_data: typing.Optional[typing.Sequence[typing.Union["ValidationBucketConfiguration", typing.Dict[builtins.str, typing.Any]]]] = None,
10129
+ vpc_config: typing.Optional["IBedrockCreateModelCustomizationJobVpcConfig"] = None,
10130
+ ) -> None:
10131
+ '''Properties for invoking a Bedrock Model.
10132
+
10133
+ :param comment: A comment describing this state. Default: No comment
10134
+ :param query_language: The name of the query language used by the state. If the state does not contain a ``queryLanguage`` field, then it will use the query language specified in the top-level ``queryLanguage`` field. Default: - JSONPath
10135
+ :param state_name: Optional name for this state. Default: - The construct ID will be used as state name
10136
+ :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)
10137
+ :param heartbeat: (deprecated) Timeout for the heartbeat. Default: - None
10138
+ :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
10139
+ :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. Depending on the AWS Service, the Service Integration Pattern availability will vary. Default: - ``IntegrationPattern.REQUEST_RESPONSE`` for most tasks. ``IntegrationPattern.RUN_JOB`` for the following exceptions: ``BatchSubmitJob``, ``EmrAddStep``, ``EmrCreateCluster``, ``EmrTerminationCluster``, and ``EmrContainersStartJobRun``.
10140
+ :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
10141
+ :param timeout: (deprecated) Timeout for the task. Default: - None
10142
+ :param assign: Workflow variables to store in this step. Using workflow variables, you can store data in a step and retrieve that data in future steps. Default: - Not assign variables
10143
+ :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: $
10144
+ :param output_path: JSONPath expression to select part of the state to be the output to this state. May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}. Default: $
10145
+ :param outputs: Used to specify and transform output from the state. When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly. Default: - $states.result or $states.errorOutput
10146
+ :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: $
10147
+ :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
10148
+ :param base_model: The base model.
10149
+ :param custom_model_name: A name for the resulting custom model. The maximum length is 63 characters.
10150
+ :param job_name: A name for the fine-tuning job. The maximum length is 63 characters.
10151
+ :param output_data: The S3 bucket configuration where the output data is stored.
10152
+ :param training_data: The S3 bucket configuration where the training data is stored.
10153
+ :param client_request_token: A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. The maximum length is 256 characters. Default: - no client request token
10154
+ :param customization_type: The customization type. Default: FINE_TUNING
10155
+ :param custom_model_kms_key: The custom model is encrypted at rest using this key. Default: - encrypted with the AWS owned key
10156
+ :param custom_model_tags: Tags to attach to the resulting custom model. The maximum number of tags is 200. Default: - no tags
10157
+ :param hyper_parameters: Parameters related to tuning the model. Default: - use default hyperparameters
10158
+ :param job_tags: Tags to attach to the job. The maximum number of tags is 200. Default: - no tags
10159
+ :param role: The IAM role that Amazon Bedrock can assume to perform tasks on your behalf. For example, during model training, Amazon Bedrock needs your permission to read input data from an S3 bucket, write model artifacts to an S3 bucket. To pass this role to Amazon Bedrock, the caller of this API must have the iam:PassRole permission. Default: - use auto generated role
10160
+ :param validation_data: The S3 bucket configuration where the validation data is stored. If you don't provide a validation dataset, specify the evaluation percentage by the ``Evaluation percentage`` hyperparameter. The maximum number is 10. Default: undefined - validate using a subset of the training data
10161
+ :param vpc_config: The VPC configuration. Default: - no VPC configuration
10162
+
10163
+ :exampleMetadata: infused
10164
+
10165
+ Example::
10166
+
10167
+ import aws_cdk.aws_bedrock as bedrock
10168
+ import aws_cdk.aws_kms as kms
10169
+
10170
+ # output_bucket: s3.IBucket
10171
+ # training_bucket: s3.IBucket
10172
+ # validation_bucket: s3.IBucket
10173
+ # kms_key: kms.IKey
10174
+ # vpc: ec2.IVpc
10175
+
10176
+
10177
+ model = bedrock.FoundationModel.from_foundation_model_id(self, "Model", bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1)
10178
+
10179
+ task = tasks.BedrockCreateModelCustomizationJob(self, "CreateModelCustomizationJob",
10180
+ base_model=model,
10181
+ client_request_token="MyToken",
10182
+ customization_type=tasks.CustomizationType.FINE_TUNING,
10183
+ custom_model_kms_key=kms_key,
10184
+ custom_model_name="MyCustomModel", # required
10185
+ custom_model_tags=[tasks.CustomModelTag(key="key1", value="value1")],
10186
+ hyper_parameters={
10187
+ "batch_size": "10"
10188
+ },
10189
+ job_name="MyCustomizationJob", # required
10190
+ job_tags=[tasks.CustomModelTag(key="key2", value="value2")],
10191
+ output_data=tasks.OutputBucketConfiguration(
10192
+ bucket=output_bucket, # required
10193
+ path="output-data/"
10194
+ ),
10195
+ training_data=tasks.TrainingBucketConfiguration(
10196
+ bucket=training_bucket,
10197
+ path="training-data/data.json"
10198
+ ), # required
10199
+ # If you don't provide validation data, you have to specify `Evaluation percentage` hyperparameter.
10200
+ validation_data=[tasks.ValidationBucketConfiguration(
10201
+ bucket=validation_bucket,
10202
+ path="validation-data/data.json"
10203
+ )
10204
+ ],
10205
+ vpc_config={
10206
+ "security_groups": [ec2.SecurityGroup(self, "SecurityGroup", vpc=vpc)],
10207
+ "subnets": vpc.private_subnets
10208
+ }
10209
+ )
10210
+ '''
10211
+ if isinstance(credentials, dict):
10212
+ credentials = _Credentials_2cd64c6b(**credentials)
10213
+ if isinstance(output_data, dict):
10214
+ output_data = OutputBucketConfiguration(**output_data)
10215
+ if isinstance(training_data, dict):
10216
+ training_data = TrainingBucketConfiguration(**training_data)
10217
+ if __debug__:
10218
+ type_hints = typing.get_type_hints(_typecheckingstub__4a1348489dd866713bad4f53a20bf5de0eff5edebddfb3011e85cf03da5f68d2)
10219
+ check_type(argname="argument comment", value=comment, expected_type=type_hints["comment"])
10220
+ check_type(argname="argument query_language", value=query_language, expected_type=type_hints["query_language"])
10221
+ check_type(argname="argument state_name", value=state_name, expected_type=type_hints["state_name"])
10222
+ check_type(argname="argument credentials", value=credentials, expected_type=type_hints["credentials"])
10223
+ check_type(argname="argument heartbeat", value=heartbeat, expected_type=type_hints["heartbeat"])
10224
+ check_type(argname="argument heartbeat_timeout", value=heartbeat_timeout, expected_type=type_hints["heartbeat_timeout"])
10225
+ check_type(argname="argument integration_pattern", value=integration_pattern, expected_type=type_hints["integration_pattern"])
10226
+ check_type(argname="argument task_timeout", value=task_timeout, expected_type=type_hints["task_timeout"])
10227
+ check_type(argname="argument timeout", value=timeout, expected_type=type_hints["timeout"])
10228
+ check_type(argname="argument assign", value=assign, expected_type=type_hints["assign"])
10229
+ check_type(argname="argument input_path", value=input_path, expected_type=type_hints["input_path"])
10230
+ check_type(argname="argument output_path", value=output_path, expected_type=type_hints["output_path"])
10231
+ check_type(argname="argument outputs", value=outputs, expected_type=type_hints["outputs"])
10232
+ check_type(argname="argument result_path", value=result_path, expected_type=type_hints["result_path"])
10233
+ check_type(argname="argument result_selector", value=result_selector, expected_type=type_hints["result_selector"])
10234
+ check_type(argname="argument base_model", value=base_model, expected_type=type_hints["base_model"])
10235
+ check_type(argname="argument custom_model_name", value=custom_model_name, expected_type=type_hints["custom_model_name"])
10236
+ check_type(argname="argument job_name", value=job_name, expected_type=type_hints["job_name"])
10237
+ check_type(argname="argument output_data", value=output_data, expected_type=type_hints["output_data"])
10238
+ check_type(argname="argument training_data", value=training_data, expected_type=type_hints["training_data"])
10239
+ check_type(argname="argument client_request_token", value=client_request_token, expected_type=type_hints["client_request_token"])
10240
+ check_type(argname="argument customization_type", value=customization_type, expected_type=type_hints["customization_type"])
10241
+ check_type(argname="argument custom_model_kms_key", value=custom_model_kms_key, expected_type=type_hints["custom_model_kms_key"])
10242
+ check_type(argname="argument custom_model_tags", value=custom_model_tags, expected_type=type_hints["custom_model_tags"])
10243
+ check_type(argname="argument hyper_parameters", value=hyper_parameters, expected_type=type_hints["hyper_parameters"])
10244
+ check_type(argname="argument job_tags", value=job_tags, expected_type=type_hints["job_tags"])
10245
+ check_type(argname="argument role", value=role, expected_type=type_hints["role"])
10246
+ check_type(argname="argument validation_data", value=validation_data, expected_type=type_hints["validation_data"])
10247
+ check_type(argname="argument vpc_config", value=vpc_config, expected_type=type_hints["vpc_config"])
10248
+ self._values: typing.Dict[builtins.str, typing.Any] = {
10249
+ "base_model": base_model,
10250
+ "custom_model_name": custom_model_name,
10251
+ "job_name": job_name,
10252
+ "output_data": output_data,
10253
+ "training_data": training_data,
10254
+ }
10255
+ if comment is not None:
10256
+ self._values["comment"] = comment
10257
+ if query_language is not None:
10258
+ self._values["query_language"] = query_language
10259
+ if state_name is not None:
10260
+ self._values["state_name"] = state_name
10261
+ if credentials is not None:
10262
+ self._values["credentials"] = credentials
10263
+ if heartbeat is not None:
10264
+ self._values["heartbeat"] = heartbeat
10265
+ if heartbeat_timeout is not None:
10266
+ self._values["heartbeat_timeout"] = heartbeat_timeout
10267
+ if integration_pattern is not None:
10268
+ self._values["integration_pattern"] = integration_pattern
10269
+ if task_timeout is not None:
10270
+ self._values["task_timeout"] = task_timeout
10271
+ if timeout is not None:
10272
+ self._values["timeout"] = timeout
10273
+ if assign is not None:
10274
+ self._values["assign"] = assign
10275
+ if input_path is not None:
10276
+ self._values["input_path"] = input_path
10277
+ if output_path is not None:
10278
+ self._values["output_path"] = output_path
10279
+ if outputs is not None:
10280
+ self._values["outputs"] = outputs
10281
+ if result_path is not None:
10282
+ self._values["result_path"] = result_path
10283
+ if result_selector is not None:
10284
+ self._values["result_selector"] = result_selector
10285
+ if client_request_token is not None:
10286
+ self._values["client_request_token"] = client_request_token
10287
+ if customization_type is not None:
10288
+ self._values["customization_type"] = customization_type
10289
+ if custom_model_kms_key is not None:
10290
+ self._values["custom_model_kms_key"] = custom_model_kms_key
10291
+ if custom_model_tags is not None:
10292
+ self._values["custom_model_tags"] = custom_model_tags
10293
+ if hyper_parameters is not None:
10294
+ self._values["hyper_parameters"] = hyper_parameters
10295
+ if job_tags is not None:
10296
+ self._values["job_tags"] = job_tags
10297
+ if role is not None:
10298
+ self._values["role"] = role
10299
+ if validation_data is not None:
10300
+ self._values["validation_data"] = validation_data
10301
+ if vpc_config is not None:
10302
+ self._values["vpc_config"] = vpc_config
10303
+
10304
+ @builtins.property
10305
+ def comment(self) -> typing.Optional[builtins.str]:
10306
+ '''A comment describing this state.
10307
+
10308
+ :default: No comment
10309
+ '''
10310
+ result = self._values.get("comment")
10311
+ return typing.cast(typing.Optional[builtins.str], result)
10312
+
10313
+ @builtins.property
10314
+ def query_language(self) -> typing.Optional[_QueryLanguage_be8414a8]:
10315
+ '''The name of the query language used by the state.
10316
+
10317
+ If the state does not contain a ``queryLanguage`` field,
10318
+ then it will use the query language specified in the top-level ``queryLanguage`` field.
10319
+
10320
+ :default: - JSONPath
10321
+ '''
10322
+ result = self._values.get("query_language")
10323
+ return typing.cast(typing.Optional[_QueryLanguage_be8414a8], result)
10324
+
10325
+ @builtins.property
10326
+ def state_name(self) -> typing.Optional[builtins.str]:
10327
+ '''Optional name for this state.
10328
+
10329
+ :default: - The construct ID will be used as state name
10330
+ '''
10331
+ result = self._values.get("state_name")
10332
+ return typing.cast(typing.Optional[builtins.str], result)
10333
+
10334
+ @builtins.property
10335
+ def credentials(self) -> typing.Optional[_Credentials_2cd64c6b]:
10336
+ '''Credentials for an IAM Role that the State Machine assumes for executing the task.
10337
+
10338
+ This enables cross-account resource invocations.
10339
+
10340
+ :default: - None (Task is executed using the State Machine's execution role)
10341
+
10342
+ :see: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-access-cross-acct-resources.html
10343
+ '''
10344
+ result = self._values.get("credentials")
10345
+ return typing.cast(typing.Optional[_Credentials_2cd64c6b], result)
10346
+
10347
+ @builtins.property
10348
+ def heartbeat(self) -> typing.Optional[_Duration_4839e8c3]:
10349
+ '''(deprecated) Timeout for the heartbeat.
10350
+
10351
+ :default: - None
10352
+
10353
+ :deprecated: use ``heartbeatTimeout``
10354
+
10355
+ :stability: deprecated
10356
+ '''
10357
+ result = self._values.get("heartbeat")
10358
+ return typing.cast(typing.Optional[_Duration_4839e8c3], result)
10359
+
10360
+ @builtins.property
10361
+ def heartbeat_timeout(self) -> typing.Optional[_Timeout_d7c10551]:
10362
+ '''Timeout for the heartbeat.
10363
+
10364
+ [disable-awslint:duration-prop-type] is needed because all props interface in
10365
+ aws-stepfunctions-tasks extend this interface
10366
+
10367
+ :default: - None
10368
+ '''
10369
+ result = self._values.get("heartbeat_timeout")
10370
+ return typing.cast(typing.Optional[_Timeout_d7c10551], result)
10371
+
10372
+ @builtins.property
10373
+ def integration_pattern(self) -> typing.Optional[_IntegrationPattern_949291bc]:
10374
+ '''AWS Step Functions integrates with services directly in the Amazon States Language.
10375
+
10376
+ You can control these AWS services using service integration patterns.
10377
+
10378
+ Depending on the AWS Service, the Service Integration Pattern availability will vary.
10379
+
10380
+ :default:
10381
+
10382
+ - ``IntegrationPattern.REQUEST_RESPONSE`` for most tasks.
10383
+ ``IntegrationPattern.RUN_JOB`` for the following exceptions:
10384
+ ``BatchSubmitJob``, ``EmrAddStep``, ``EmrCreateCluster``, ``EmrTerminationCluster``, and ``EmrContainersStartJobRun``.
10385
+
10386
+ :see: https://docs.aws.amazon.com/step-functions/latest/dg/connect-supported-services.html
10387
+ '''
10388
+ result = self._values.get("integration_pattern")
10389
+ return typing.cast(typing.Optional[_IntegrationPattern_949291bc], result)
10390
+
10391
+ @builtins.property
10392
+ def task_timeout(self) -> typing.Optional[_Timeout_d7c10551]:
10393
+ '''Timeout for the task.
10394
+
10395
+ [disable-awslint:duration-prop-type] is needed because all props interface in
10396
+ aws-stepfunctions-tasks extend this interface
10397
+
10398
+ :default: - None
10399
+ '''
10400
+ result = self._values.get("task_timeout")
10401
+ return typing.cast(typing.Optional[_Timeout_d7c10551], result)
10402
+
10403
+ @builtins.property
10404
+ def timeout(self) -> typing.Optional[_Duration_4839e8c3]:
10405
+ '''(deprecated) Timeout for the task.
10406
+
10407
+ :default: - None
10408
+
10409
+ :deprecated: use ``taskTimeout``
10410
+
10411
+ :stability: deprecated
10412
+ '''
10413
+ result = self._values.get("timeout")
10414
+ return typing.cast(typing.Optional[_Duration_4839e8c3], result)
10415
+
10416
+ @builtins.property
10417
+ def assign(self) -> typing.Optional[typing.Mapping[builtins.str, typing.Any]]:
10418
+ '''Workflow variables to store in this step.
10419
+
10420
+ Using workflow variables, you can store data in a step and retrieve that data in future steps.
10421
+
10422
+ :default: - Not assign variables
10423
+
10424
+ :see: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html
10425
+ '''
10426
+ result = self._values.get("assign")
10427
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, typing.Any]], result)
10428
+
10429
+ @builtins.property
10430
+ def input_path(self) -> typing.Optional[builtins.str]:
10431
+ '''JSONPath expression to select part of the state to be the input to this state.
10432
+
10433
+ May also be the special value JsonPath.DISCARD, which will cause the effective
10434
+ input to be the empty object {}.
10435
+
10436
+ :default: $
10437
+ '''
10438
+ result = self._values.get("input_path")
10439
+ return typing.cast(typing.Optional[builtins.str], result)
10440
+
10441
+ @builtins.property
10442
+ def output_path(self) -> typing.Optional[builtins.str]:
10443
+ '''JSONPath expression to select part of the state to be the output to this state.
10444
+
10445
+ May also be the special value JsonPath.DISCARD, which will cause the effective
10446
+ output to be the empty object {}.
10447
+
10448
+ :default: $
10449
+ '''
10450
+ result = self._values.get("output_path")
10451
+ return typing.cast(typing.Optional[builtins.str], result)
10452
+
10453
+ @builtins.property
10454
+ def outputs(self) -> typing.Any:
10455
+ '''Used to specify and transform output from the state.
10456
+
10457
+ When specified, the value overrides the state output default.
10458
+ The output field accepts any JSON value (object, array, string, number, boolean, null).
10459
+ Any string value, including those inside objects or arrays,
10460
+ will be evaluated as JSONata if surrounded by {% %} characters.
10461
+ Output also accepts a JSONata expression directly.
10462
+
10463
+ :default: - $states.result or $states.errorOutput
10464
+
10465
+ :see: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html
10466
+ '''
10467
+ result = self._values.get("outputs")
10468
+ return typing.cast(typing.Any, result)
10469
+
10470
+ @builtins.property
10471
+ def result_path(self) -> typing.Optional[builtins.str]:
10472
+ '''JSONPath expression to indicate where to inject the state's output.
10473
+
10474
+ May also be the special value JsonPath.DISCARD, which will cause the state's
10475
+ input to become its output.
10476
+
10477
+ :default: $
10478
+ '''
10479
+ result = self._values.get("result_path")
10480
+ return typing.cast(typing.Optional[builtins.str], result)
10481
+
10482
+ @builtins.property
10483
+ def result_selector(
10484
+ self,
10485
+ ) -> typing.Optional[typing.Mapping[builtins.str, typing.Any]]:
10486
+ '''The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
10487
+
10488
+ You can use ResultSelector to create a payload with values that are static
10489
+ or selected from the state's raw result.
10490
+
10491
+ :default: - None
10492
+
10493
+ :see: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector
10494
+ '''
10495
+ result = self._values.get("result_selector")
10496
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, typing.Any]], result)
10497
+
10498
+ @builtins.property
10499
+ def base_model(self) -> _IModel_b88b328a:
10500
+ '''The base model.'''
10501
+ result = self._values.get("base_model")
10502
+ assert result is not None, "Required property 'base_model' is missing"
10503
+ return typing.cast(_IModel_b88b328a, result)
10504
+
10505
+ @builtins.property
10506
+ def custom_model_name(self) -> builtins.str:
10507
+ '''A name for the resulting custom model.
10508
+
10509
+ The maximum length is 63 characters.
10510
+ '''
10511
+ result = self._values.get("custom_model_name")
10512
+ assert result is not None, "Required property 'custom_model_name' is missing"
10513
+ return typing.cast(builtins.str, result)
10514
+
10515
+ @builtins.property
10516
+ def job_name(self) -> builtins.str:
10517
+ '''A name for the fine-tuning job.
10518
+
10519
+ The maximum length is 63 characters.
10520
+ '''
10521
+ result = self._values.get("job_name")
10522
+ assert result is not None, "Required property 'job_name' is missing"
10523
+ return typing.cast(builtins.str, result)
10524
+
10525
+ @builtins.property
10526
+ def output_data(self) -> "OutputBucketConfiguration":
10527
+ '''The S3 bucket configuration where the output data is stored.
10528
+
10529
+ :see: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_OutputDataConfig.html
10530
+ '''
10531
+ result = self._values.get("output_data")
10532
+ assert result is not None, "Required property 'output_data' is missing"
10533
+ return typing.cast("OutputBucketConfiguration", result)
10534
+
10535
+ @builtins.property
10536
+ def training_data(self) -> "TrainingBucketConfiguration":
10537
+ '''The S3 bucket configuration where the training data is stored.
10538
+
10539
+ :see: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_TrainingDataConfig.html
10540
+ '''
10541
+ result = self._values.get("training_data")
10542
+ assert result is not None, "Required property 'training_data' is missing"
10543
+ return typing.cast("TrainingBucketConfiguration", result)
10544
+
10545
+ @builtins.property
10546
+ def client_request_token(self) -> typing.Optional[builtins.str]:
10547
+ '''A unique, case-sensitive identifier to ensure that the API request completes no more than one time.
10548
+
10549
+ If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error.
10550
+
10551
+ The maximum length is 256 characters.
10552
+
10553
+ :default: - no client request token
10554
+
10555
+ :see: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
10556
+ '''
10557
+ result = self._values.get("client_request_token")
10558
+ return typing.cast(typing.Optional[builtins.str], result)
10559
+
10560
+ @builtins.property
10561
+ def customization_type(self) -> typing.Optional["CustomizationType"]:
10562
+ '''The customization type.
10563
+
10564
+ :default: FINE_TUNING
10565
+ '''
10566
+ result = self._values.get("customization_type")
10567
+ return typing.cast(typing.Optional["CustomizationType"], result)
10568
+
10569
+ @builtins.property
10570
+ def custom_model_kms_key(self) -> typing.Optional[_IKey_5f11635f]:
10571
+ '''The custom model is encrypted at rest using this key.
10572
+
10573
+ :default: - encrypted with the AWS owned key
10574
+
10575
+ :see: https://docs.aws.amazon.com/bedrock/latest/userguide/encryption-custom-job.html
10576
+ '''
10577
+ result = self._values.get("custom_model_kms_key")
10578
+ return typing.cast(typing.Optional[_IKey_5f11635f], result)
10579
+
10580
+ @builtins.property
10581
+ def custom_model_tags(self) -> typing.Optional[typing.List["CustomModelTag"]]:
10582
+ '''Tags to attach to the resulting custom model.
10583
+
10584
+ The maximum number of tags is 200.
10585
+
10586
+ :default: - no tags
10587
+ '''
10588
+ result = self._values.get("custom_model_tags")
10589
+ return typing.cast(typing.Optional[typing.List["CustomModelTag"]], result)
10590
+
10591
+ @builtins.property
10592
+ def hyper_parameters(
10593
+ self,
10594
+ ) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
10595
+ '''Parameters related to tuning the model.
10596
+
10597
+ :default: - use default hyperparameters
10598
+
10599
+ :see: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models-hp.html
10600
+ '''
10601
+ result = self._values.get("hyper_parameters")
10602
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
10603
+
10604
+ @builtins.property
10605
+ def job_tags(self) -> typing.Optional[typing.List["CustomModelTag"]]:
10606
+ '''Tags to attach to the job.
10607
+
10608
+ The maximum number of tags is 200.
10609
+
10610
+ :default: - no tags
10611
+ '''
10612
+ result = self._values.get("job_tags")
10613
+ return typing.cast(typing.Optional[typing.List["CustomModelTag"]], result)
10614
+
10615
+ @builtins.property
10616
+ def role(self) -> typing.Optional[_IRole_235f5d8e]:
10617
+ '''The IAM role that Amazon Bedrock can assume to perform tasks on your behalf.
10618
+
10619
+ For example, during model training, Amazon Bedrock needs your permission to read input data from an S3 bucket,
10620
+ write model artifacts to an S3 bucket.
10621
+ To pass this role to Amazon Bedrock, the caller of this API must have the iam:PassRole permission.
10622
+
10623
+ :default: - use auto generated role
10624
+ '''
10625
+ result = self._values.get("role")
10626
+ return typing.cast(typing.Optional[_IRole_235f5d8e], result)
10627
+
10628
+ @builtins.property
10629
+ def validation_data(
10630
+ self,
10631
+ ) -> typing.Optional[typing.List["ValidationBucketConfiguration"]]:
10632
+ '''The S3 bucket configuration where the validation data is stored.
10633
+
10634
+ If you don't provide a validation dataset, specify the evaluation percentage by the ``Evaluation percentage`` hyperparameter.
10635
+
10636
+ The maximum number is 10.
10637
+
10638
+ :default: undefined - validate using a subset of the training data
10639
+
10640
+ :see: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_Validator.html
10641
+ '''
10642
+ result = self._values.get("validation_data")
10643
+ return typing.cast(typing.Optional[typing.List["ValidationBucketConfiguration"]], result)
10644
+
10645
+ @builtins.property
10646
+ def vpc_config(
10647
+ self,
10648
+ ) -> typing.Optional["IBedrockCreateModelCustomizationJobVpcConfig"]:
10649
+ '''The VPC configuration.
10650
+
10651
+ :default: - no VPC configuration
10652
+ '''
10653
+ result = self._values.get("vpc_config")
10654
+ return typing.cast(typing.Optional["IBedrockCreateModelCustomizationJobVpcConfig"], result)
10655
+
10656
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
10657
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
10658
+
10659
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
10660
+ return not (rhs == self)
10661
+
10662
+ def __repr__(self) -> str:
10663
+ return "BedrockCreateModelCustomizationJobProps(%s)" % ", ".join(
10664
+ k + "=" + repr(v) for k, v in self._values.items()
10665
+ )
10666
+
10667
+
9829
10668
  class BedrockInvokeModel(
9830
10669
  _TaskStateBase_b5c0a816,
9831
10670
  metaclass=jsii.JSIIMeta,
@@ -21962,6 +22801,211 @@ class CronOptions:
21962
22801
  )
21963
22802
 
21964
22803
 
22804
+ @jsii.data_type(
22805
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.CustomModelTag",
22806
+ jsii_struct_bases=[],
22807
+ name_mapping={"key": "key", "value": "value"},
22808
+ )
22809
+ class CustomModelTag:
22810
+ def __init__(self, *, key: builtins.str, value: builtins.str) -> None:
22811
+ '''The key/value pair for a tag.
22812
+
22813
+ :param key: Key for the tag.
22814
+ :param value: Value for the tag.
22815
+
22816
+ :exampleMetadata: fixture=_generated
22817
+
22818
+ Example::
22819
+
22820
+ # The code below shows an example of how to instantiate this type.
22821
+ # The values are placeholders you should change.
22822
+ from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks
22823
+
22824
+ custom_model_tag = stepfunctions_tasks.CustomModelTag(
22825
+ key="key",
22826
+ value="value"
22827
+ )
22828
+ '''
22829
+ if __debug__:
22830
+ type_hints = typing.get_type_hints(_typecheckingstub__83c62fca1c3250b9c5ee6e19dd3dfc1c4accd6cbf494208ce8b177e8b37ab802)
22831
+ check_type(argname="argument key", value=key, expected_type=type_hints["key"])
22832
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
22833
+ self._values: typing.Dict[builtins.str, typing.Any] = {
22834
+ "key": key,
22835
+ "value": value,
22836
+ }
22837
+
22838
+ @builtins.property
22839
+ def key(self) -> builtins.str:
22840
+ '''Key for the tag.'''
22841
+ result = self._values.get("key")
22842
+ assert result is not None, "Required property 'key' is missing"
22843
+ return typing.cast(builtins.str, result)
22844
+
22845
+ @builtins.property
22846
+ def value(self) -> builtins.str:
22847
+ '''Value for the tag.'''
22848
+ result = self._values.get("value")
22849
+ assert result is not None, "Required property 'value' is missing"
22850
+ return typing.cast(builtins.str, result)
22851
+
22852
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
22853
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
22854
+
22855
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
22856
+ return not (rhs == self)
22857
+
22858
+ def __repr__(self) -> str:
22859
+ return "CustomModelTag(%s)" % ", ".join(
22860
+ k + "=" + repr(v) for k, v in self._values.items()
22861
+ )
22862
+
22863
+
22864
+ @jsii.enum(jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.CustomizationType")
22865
+ class CustomizationType(enum.Enum):
22866
+ '''The customization type.
22867
+
22868
+ :see: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
22869
+ :exampleMetadata: infused
22870
+
22871
+ Example::
22872
+
22873
+ import aws_cdk.aws_bedrock as bedrock
22874
+ import aws_cdk.aws_kms as kms
22875
+
22876
+ # output_bucket: s3.IBucket
22877
+ # training_bucket: s3.IBucket
22878
+ # validation_bucket: s3.IBucket
22879
+ # kms_key: kms.IKey
22880
+ # vpc: ec2.IVpc
22881
+
22882
+
22883
+ model = bedrock.FoundationModel.from_foundation_model_id(self, "Model", bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1)
22884
+
22885
+ task = tasks.BedrockCreateModelCustomizationJob(self, "CreateModelCustomizationJob",
22886
+ base_model=model,
22887
+ client_request_token="MyToken",
22888
+ customization_type=tasks.CustomizationType.FINE_TUNING,
22889
+ custom_model_kms_key=kms_key,
22890
+ custom_model_name="MyCustomModel", # required
22891
+ custom_model_tags=[tasks.CustomModelTag(key="key1", value="value1")],
22892
+ hyper_parameters={
22893
+ "batch_size": "10"
22894
+ },
22895
+ job_name="MyCustomizationJob", # required
22896
+ job_tags=[tasks.CustomModelTag(key="key2", value="value2")],
22897
+ output_data=tasks.OutputBucketConfiguration(
22898
+ bucket=output_bucket, # required
22899
+ path="output-data/"
22900
+ ),
22901
+ training_data=tasks.TrainingBucketConfiguration(
22902
+ bucket=training_bucket,
22903
+ path="training-data/data.json"
22904
+ ), # required
22905
+ # If you don't provide validation data, you have to specify `Evaluation percentage` hyperparameter.
22906
+ validation_data=[tasks.ValidationBucketConfiguration(
22907
+ bucket=validation_bucket,
22908
+ path="validation-data/data.json"
22909
+ )
22910
+ ],
22911
+ vpc_config={
22912
+ "security_groups": [ec2.SecurityGroup(self, "SecurityGroup", vpc=vpc)],
22913
+ "subnets": vpc.private_subnets
22914
+ }
22915
+ )
22916
+ '''
22917
+
22918
+ FINE_TUNING = "FINE_TUNING"
22919
+ '''Fine-tuning.
22920
+
22921
+ Provide labeled data in order to train a model to improve performance on specific tasks.
22922
+ '''
22923
+ CONTINUED_PRE_TRAINING = "CONTINUED_PRE_TRAINING"
22924
+ '''Continued pre-training.
22925
+
22926
+ Provide unlabeled data to pre-train a foundation model by familiarizing it with certain types of inputs.
22927
+ '''
22928
+ DISTILLATION = "DISTILLATION"
22929
+ '''Distillation.
22930
+
22931
+ With Model Distillation, you can generate synthetic responses from a large foundation model (teacher)
22932
+ and use that data to train a smaller model (student) for your specific use-case.
22933
+ '''
22934
+
22935
+
22936
+ @jsii.data_type(
22937
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.DataBucketConfiguration",
22938
+ jsii_struct_bases=[],
22939
+ name_mapping={"bucket": "bucket", "path": "path"},
22940
+ )
22941
+ class DataBucketConfiguration:
22942
+ def __init__(
22943
+ self,
22944
+ *,
22945
+ bucket: _IBucket_42e086fd,
22946
+ path: typing.Optional[builtins.str] = None,
22947
+ ) -> None:
22948
+ '''S3 bucket configuration for data storage destination.
22949
+
22950
+ :param bucket: The S3 bucket.
22951
+ :param path: Path to file or directory within the bucket. Default: - root of the bucket
22952
+
22953
+ :exampleMetadata: fixture=_generated
22954
+
22955
+ Example::
22956
+
22957
+ # The code below shows an example of how to instantiate this type.
22958
+ # The values are placeholders you should change.
22959
+ from aws_cdk import aws_s3 as s3
22960
+ from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks
22961
+
22962
+ # bucket: s3.Bucket
22963
+
22964
+ data_bucket_configuration = stepfunctions_tasks.DataBucketConfiguration(
22965
+ bucket=bucket,
22966
+
22967
+ # the properties below are optional
22968
+ path="path"
22969
+ )
22970
+ '''
22971
+ if __debug__:
22972
+ type_hints = typing.get_type_hints(_typecheckingstub__a310fa6911b62dab87f8ad67600f727aa7262c59f0ca09c7df5e3e7af25a63ee)
22973
+ check_type(argname="argument bucket", value=bucket, expected_type=type_hints["bucket"])
22974
+ check_type(argname="argument path", value=path, expected_type=type_hints["path"])
22975
+ self._values: typing.Dict[builtins.str, typing.Any] = {
22976
+ "bucket": bucket,
22977
+ }
22978
+ if path is not None:
22979
+ self._values["path"] = path
22980
+
22981
+ @builtins.property
22982
+ def bucket(self) -> _IBucket_42e086fd:
22983
+ '''The S3 bucket.'''
22984
+ result = self._values.get("bucket")
22985
+ assert result is not None, "Required property 'bucket' is missing"
22986
+ return typing.cast(_IBucket_42e086fd, result)
22987
+
22988
+ @builtins.property
22989
+ def path(self) -> typing.Optional[builtins.str]:
22990
+ '''Path to file or directory within the bucket.
22991
+
22992
+ :default: - root of the bucket
22993
+ '''
22994
+ result = self._values.get("path")
22995
+ return typing.cast(typing.Optional[builtins.str], result)
22996
+
22997
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
22998
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
22999
+
23000
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
23001
+ return not (rhs == self)
23002
+
23003
+ def __repr__(self) -> str:
23004
+ return "DataBucketConfiguration(%s)" % ", ".join(
23005
+ k + "=" + repr(v) for k, v in self._values.items()
23006
+ )
23007
+
23008
+
21965
23009
  @jsii.data_type(
21966
23010
  jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.DataSource",
21967
23011
  jsii_struct_bases=[],
@@ -61950,6 +62994,62 @@ class HttpMethods(enum.Enum):
61950
62994
  '''Retrieve data from a server at the specified resource without the response body.'''
61951
62995
 
61952
62996
 
62997
+ @jsii.interface(
62998
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.IBedrockCreateModelCustomizationJobVpcConfig"
62999
+ )
63000
+ class IBedrockCreateModelCustomizationJobVpcConfig(typing_extensions.Protocol):
63001
+ '''VPC configuration.'''
63002
+
63003
+ @builtins.property
63004
+ @jsii.member(jsii_name="securityGroups")
63005
+ def security_groups(self) -> typing.List[_ISecurityGroup_acf8a799]:
63006
+ '''VPC configuration security groups.
63007
+
63008
+ The minimum number of security groups is 1.
63009
+ The maximum number of security groups is 5.
63010
+ '''
63011
+ ...
63012
+
63013
+ @builtins.property
63014
+ @jsii.member(jsii_name="subnets")
63015
+ def subnets(self) -> typing.List[_ISubnet_d57d1229]:
63016
+ '''VPC configuration subnets.
63017
+
63018
+ The minimum number of subnets is 1.
63019
+ The maximum number of subnets is 16.
63020
+ '''
63021
+ ...
63022
+
63023
+
63024
+ class _IBedrockCreateModelCustomizationJobVpcConfigProxy:
63025
+ '''VPC configuration.'''
63026
+
63027
+ __jsii_type__: typing.ClassVar[str] = "aws-cdk-lib.aws_stepfunctions_tasks.IBedrockCreateModelCustomizationJobVpcConfig"
63028
+
63029
+ @builtins.property
63030
+ @jsii.member(jsii_name="securityGroups")
63031
+ def security_groups(self) -> typing.List[_ISecurityGroup_acf8a799]:
63032
+ '''VPC configuration security groups.
63033
+
63034
+ The minimum number of security groups is 1.
63035
+ The maximum number of security groups is 5.
63036
+ '''
63037
+ return typing.cast(typing.List[_ISecurityGroup_acf8a799], jsii.get(self, "securityGroups"))
63038
+
63039
+ @builtins.property
63040
+ @jsii.member(jsii_name="subnets")
63041
+ def subnets(self) -> typing.List[_ISubnet_d57d1229]:
63042
+ '''VPC configuration subnets.
63043
+
63044
+ The minimum number of subnets is 1.
63045
+ The maximum number of subnets is 16.
63046
+ '''
63047
+ return typing.cast(typing.List[_ISubnet_d57d1229], jsii.get(self, "subnets"))
63048
+
63049
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
63050
+ typing.cast(typing.Any, IBedrockCreateModelCustomizationJobVpcConfig).__jsii_proxy_class__ = lambda : _IBedrockCreateModelCustomizationJobVpcConfigProxy
63051
+
63052
+
61953
63053
  @jsii.interface(jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.IContainerDefinition")
61954
63054
  class IContainerDefinition(typing_extensions.Protocol):
61955
63055
  '''Configuration of the container used to host the model.
@@ -65713,6 +66813,109 @@ class Monitoring:
65713
66813
  )
65714
66814
 
65715
66815
 
66816
+ @jsii.data_type(
66817
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.OutputBucketConfiguration",
66818
+ jsii_struct_bases=[DataBucketConfiguration],
66819
+ name_mapping={"bucket": "bucket", "path": "path"},
66820
+ )
66821
+ class OutputBucketConfiguration(DataBucketConfiguration):
66822
+ def __init__(
66823
+ self,
66824
+ *,
66825
+ bucket: _IBucket_42e086fd,
66826
+ path: typing.Optional[builtins.str] = None,
66827
+ ) -> None:
66828
+ '''S3 bucket configuration for the output data.
66829
+
66830
+ :param bucket: The S3 bucket.
66831
+ :param path: Path to file or directory within the bucket. Default: - root of the bucket
66832
+
66833
+ :exampleMetadata: infused
66834
+
66835
+ Example::
66836
+
66837
+ import aws_cdk.aws_bedrock as bedrock
66838
+ import aws_cdk.aws_kms as kms
66839
+
66840
+ # output_bucket: s3.IBucket
66841
+ # training_bucket: s3.IBucket
66842
+ # validation_bucket: s3.IBucket
66843
+ # kms_key: kms.IKey
66844
+ # vpc: ec2.IVpc
66845
+
66846
+
66847
+ model = bedrock.FoundationModel.from_foundation_model_id(self, "Model", bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1)
66848
+
66849
+ task = tasks.BedrockCreateModelCustomizationJob(self, "CreateModelCustomizationJob",
66850
+ base_model=model,
66851
+ client_request_token="MyToken",
66852
+ customization_type=tasks.CustomizationType.FINE_TUNING,
66853
+ custom_model_kms_key=kms_key,
66854
+ custom_model_name="MyCustomModel", # required
66855
+ custom_model_tags=[tasks.CustomModelTag(key="key1", value="value1")],
66856
+ hyper_parameters={
66857
+ "batch_size": "10"
66858
+ },
66859
+ job_name="MyCustomizationJob", # required
66860
+ job_tags=[tasks.CustomModelTag(key="key2", value="value2")],
66861
+ output_data=tasks.OutputBucketConfiguration(
66862
+ bucket=output_bucket, # required
66863
+ path="output-data/"
66864
+ ),
66865
+ training_data=tasks.TrainingBucketConfiguration(
66866
+ bucket=training_bucket,
66867
+ path="training-data/data.json"
66868
+ ), # required
66869
+ # If you don't provide validation data, you have to specify `Evaluation percentage` hyperparameter.
66870
+ validation_data=[tasks.ValidationBucketConfiguration(
66871
+ bucket=validation_bucket,
66872
+ path="validation-data/data.json"
66873
+ )
66874
+ ],
66875
+ vpc_config={
66876
+ "security_groups": [ec2.SecurityGroup(self, "SecurityGroup", vpc=vpc)],
66877
+ "subnets": vpc.private_subnets
66878
+ }
66879
+ )
66880
+ '''
66881
+ if __debug__:
66882
+ type_hints = typing.get_type_hints(_typecheckingstub__05ead3f1760bde00adef48e083438b80e2b20f50fe9ae0d35189d6761a24370f)
66883
+ check_type(argname="argument bucket", value=bucket, expected_type=type_hints["bucket"])
66884
+ check_type(argname="argument path", value=path, expected_type=type_hints["path"])
66885
+ self._values: typing.Dict[builtins.str, typing.Any] = {
66886
+ "bucket": bucket,
66887
+ }
66888
+ if path is not None:
66889
+ self._values["path"] = path
66890
+
66891
+ @builtins.property
66892
+ def bucket(self) -> _IBucket_42e086fd:
66893
+ '''The S3 bucket.'''
66894
+ result = self._values.get("bucket")
66895
+ assert result is not None, "Required property 'bucket' is missing"
66896
+ return typing.cast(_IBucket_42e086fd, result)
66897
+
66898
+ @builtins.property
66899
+ def path(self) -> typing.Optional[builtins.str]:
66900
+ '''Path to file or directory within the bucket.
66901
+
66902
+ :default: - root of the bucket
66903
+ '''
66904
+ result = self._values.get("path")
66905
+ return typing.cast(typing.Optional[builtins.str], result)
66906
+
66907
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
66908
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
66909
+
66910
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
66911
+ return not (rhs == self)
66912
+
66913
+ def __repr__(self) -> str:
66914
+ return "OutputBucketConfiguration(%s)" % ", ".join(
66915
+ k + "=" + repr(v) for k, v in self._values.items()
66916
+ )
66917
+
66918
+
65716
66919
  @jsii.data_type(
65717
66920
  jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.OutputDataConfig",
65718
66921
  jsii_struct_bases=[],
@@ -82885,6 +84088,109 @@ class TaskEnvironmentVariable:
82885
84088
  )
82886
84089
 
82887
84090
 
84091
+ @jsii.data_type(
84092
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.TrainingBucketConfiguration",
84093
+ jsii_struct_bases=[DataBucketConfiguration],
84094
+ name_mapping={"bucket": "bucket", "path": "path"},
84095
+ )
84096
+ class TrainingBucketConfiguration(DataBucketConfiguration):
84097
+ def __init__(
84098
+ self,
84099
+ *,
84100
+ bucket: _IBucket_42e086fd,
84101
+ path: typing.Optional[builtins.str] = None,
84102
+ ) -> None:
84103
+ '''S3 bucket configuration for the training data.
84104
+
84105
+ :param bucket: The S3 bucket.
84106
+ :param path: Path to file or directory within the bucket. Default: - root of the bucket
84107
+
84108
+ :exampleMetadata: infused
84109
+
84110
+ Example::
84111
+
84112
+ import aws_cdk.aws_bedrock as bedrock
84113
+ import aws_cdk.aws_kms as kms
84114
+
84115
+ # output_bucket: s3.IBucket
84116
+ # training_bucket: s3.IBucket
84117
+ # validation_bucket: s3.IBucket
84118
+ # kms_key: kms.IKey
84119
+ # vpc: ec2.IVpc
84120
+
84121
+
84122
+ model = bedrock.FoundationModel.from_foundation_model_id(self, "Model", bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1)
84123
+
84124
+ task = tasks.BedrockCreateModelCustomizationJob(self, "CreateModelCustomizationJob",
84125
+ base_model=model,
84126
+ client_request_token="MyToken",
84127
+ customization_type=tasks.CustomizationType.FINE_TUNING,
84128
+ custom_model_kms_key=kms_key,
84129
+ custom_model_name="MyCustomModel", # required
84130
+ custom_model_tags=[tasks.CustomModelTag(key="key1", value="value1")],
84131
+ hyper_parameters={
84132
+ "batch_size": "10"
84133
+ },
84134
+ job_name="MyCustomizationJob", # required
84135
+ job_tags=[tasks.CustomModelTag(key="key2", value="value2")],
84136
+ output_data=tasks.OutputBucketConfiguration(
84137
+ bucket=output_bucket, # required
84138
+ path="output-data/"
84139
+ ),
84140
+ training_data=tasks.TrainingBucketConfiguration(
84141
+ bucket=training_bucket,
84142
+ path="training-data/data.json"
84143
+ ), # required
84144
+ # If you don't provide validation data, you have to specify `Evaluation percentage` hyperparameter.
84145
+ validation_data=[tasks.ValidationBucketConfiguration(
84146
+ bucket=validation_bucket,
84147
+ path="validation-data/data.json"
84148
+ )
84149
+ ],
84150
+ vpc_config={
84151
+ "security_groups": [ec2.SecurityGroup(self, "SecurityGroup", vpc=vpc)],
84152
+ "subnets": vpc.private_subnets
84153
+ }
84154
+ )
84155
+ '''
84156
+ if __debug__:
84157
+ type_hints = typing.get_type_hints(_typecheckingstub__682a3d293d520e48cda4b322d7a11a901469838caf114187b949c74301eba9a0)
84158
+ check_type(argname="argument bucket", value=bucket, expected_type=type_hints["bucket"])
84159
+ check_type(argname="argument path", value=path, expected_type=type_hints["path"])
84160
+ self._values: typing.Dict[builtins.str, typing.Any] = {
84161
+ "bucket": bucket,
84162
+ }
84163
+ if path is not None:
84164
+ self._values["path"] = path
84165
+
84166
+ @builtins.property
84167
+ def bucket(self) -> _IBucket_42e086fd:
84168
+ '''The S3 bucket.'''
84169
+ result = self._values.get("bucket")
84170
+ assert result is not None, "Required property 'bucket' is missing"
84171
+ return typing.cast(_IBucket_42e086fd, result)
84172
+
84173
+ @builtins.property
84174
+ def path(self) -> typing.Optional[builtins.str]:
84175
+ '''Path to file or directory within the bucket.
84176
+
84177
+ :default: - root of the bucket
84178
+ '''
84179
+ result = self._values.get("path")
84180
+ return typing.cast(typing.Optional[builtins.str], result)
84181
+
84182
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
84183
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
84184
+
84185
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
84186
+ return not (rhs == self)
84187
+
84188
+ def __repr__(self) -> str:
84189
+ return "TrainingBucketConfiguration(%s)" % ", ".join(
84190
+ k + "=" + repr(v) for k, v in self._values.items()
84191
+ )
84192
+
84193
+
82888
84194
  @jsii.data_type(
82889
84195
  jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.TransformDataSource",
82890
84196
  jsii_struct_bases=[],
@@ -83424,6 +84730,79 @@ class URLEncodingFormat(enum.Enum):
83424
84730
  '''
83425
84731
 
83426
84732
 
84733
+ @jsii.data_type(
84734
+ jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.ValidationBucketConfiguration",
84735
+ jsii_struct_bases=[DataBucketConfiguration],
84736
+ name_mapping={"bucket": "bucket", "path": "path"},
84737
+ )
84738
+ class ValidationBucketConfiguration(DataBucketConfiguration):
84739
+ def __init__(
84740
+ self,
84741
+ *,
84742
+ bucket: _IBucket_42e086fd,
84743
+ path: typing.Optional[builtins.str] = None,
84744
+ ) -> None:
84745
+ '''S3 bucket configuration for the validation data.
84746
+
84747
+ :param bucket: The S3 bucket.
84748
+ :param path: Path to file or directory within the bucket. Default: - root of the bucket
84749
+
84750
+ :exampleMetadata: fixture=_generated
84751
+
84752
+ Example::
84753
+
84754
+ # The code below shows an example of how to instantiate this type.
84755
+ # The values are placeholders you should change.
84756
+ from aws_cdk import aws_s3 as s3
84757
+ from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks
84758
+
84759
+ # bucket: s3.Bucket
84760
+
84761
+ validation_bucket_configuration = stepfunctions_tasks.ValidationBucketConfiguration(
84762
+ bucket=bucket,
84763
+
84764
+ # the properties below are optional
84765
+ path="path"
84766
+ )
84767
+ '''
84768
+ if __debug__:
84769
+ type_hints = typing.get_type_hints(_typecheckingstub__a6205038f5bd369810feab5dd42ebc706a68c088fceea69b083c4878117ca890)
84770
+ check_type(argname="argument bucket", value=bucket, expected_type=type_hints["bucket"])
84771
+ check_type(argname="argument path", value=path, expected_type=type_hints["path"])
84772
+ self._values: typing.Dict[builtins.str, typing.Any] = {
84773
+ "bucket": bucket,
84774
+ }
84775
+ if path is not None:
84776
+ self._values["path"] = path
84777
+
84778
+ @builtins.property
84779
+ def bucket(self) -> _IBucket_42e086fd:
84780
+ '''The S3 bucket.'''
84781
+ result = self._values.get("bucket")
84782
+ assert result is not None, "Required property 'bucket' is missing"
84783
+ return typing.cast(_IBucket_42e086fd, result)
84784
+
84785
+ @builtins.property
84786
+ def path(self) -> typing.Optional[builtins.str]:
84787
+ '''Path to file or directory within the bucket.
84788
+
84789
+ :default: - root of the bucket
84790
+ '''
84791
+ result = self._values.get("path")
84792
+ return typing.cast(typing.Optional[builtins.str], result)
84793
+
84794
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
84795
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
84796
+
84797
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
84798
+ return not (rhs == self)
84799
+
84800
+ def __repr__(self) -> str:
84801
+ return "ValidationBucketConfiguration(%s)" % ", ".join(
84802
+ k + "=" + repr(v) for k, v in self._values.items()
84803
+ )
84804
+
84805
+
83427
84806
  class VirtualClusterInput(
83428
84807
  metaclass=jsii.JSIIMeta,
83429
84808
  jsii_type="aws-cdk-lib.aws_stepfunctions_tasks.VirtualClusterInput",
@@ -85804,6 +87183,8 @@ __all__ = [
85804
87183
  "BatchSubmitJobJsonPathProps",
85805
87184
  "BatchSubmitJobJsonataProps",
85806
87185
  "BatchSubmitJobProps",
87186
+ "BedrockCreateModelCustomizationJob",
87187
+ "BedrockCreateModelCustomizationJobProps",
85807
87188
  "BedrockInvokeModel",
85808
87189
  "BedrockInvokeModelInputProps",
85809
87190
  "BedrockInvokeModelJsonPathProps",
@@ -85850,6 +87231,9 @@ __all__ = [
85850
87231
  "ContainerOverride",
85851
87232
  "ContainerOverrides",
85852
87233
  "CronOptions",
87234
+ "CustomModelTag",
87235
+ "CustomizationType",
87236
+ "DataBucketConfiguration",
85853
87237
  "DataSource",
85854
87238
  "DockerImage",
85855
87239
  "DockerImageConfig",
@@ -85963,6 +87347,7 @@ __all__ = [
85963
87347
  "HttpInvokeProps",
85964
87348
  "HttpMethod",
85965
87349
  "HttpMethods",
87350
+ "IBedrockCreateModelCustomizationJobVpcConfig",
85966
87351
  "IContainerDefinition",
85967
87352
  "IEcsLaunchTarget",
85968
87353
  "ISageMakerTask",
@@ -85985,6 +87370,7 @@ __all__ = [
85985
87370
  "Mode",
85986
87371
  "ModelClientOptions",
85987
87372
  "Monitoring",
87373
+ "OutputBucketConfiguration",
85988
87374
  "OutputDataConfig",
85989
87375
  "ProductionVariant",
85990
87376
  "QueryExecutionContext",
@@ -86045,12 +87431,14 @@ __all__ = [
86045
87431
  "StepFunctionsStartExecutionProps",
86046
87432
  "StoppingCondition",
86047
87433
  "TaskEnvironmentVariable",
87434
+ "TrainingBucketConfiguration",
86048
87435
  "TransformDataSource",
86049
87436
  "TransformInput",
86050
87437
  "TransformOutput",
86051
87438
  "TransformResources",
86052
87439
  "TransformS3DataSource",
86053
87440
  "URLEncodingFormat",
87441
+ "ValidationBucketConfiguration",
86054
87442
  "VirtualClusterInput",
86055
87443
  "VpcConfig",
86056
87444
  "WorkerConfigurationProperty",
@@ -86854,6 +88242,78 @@ def _typecheckingstub__c3197d21dad4ba55e29e09cf770b47b7859167ae6b1ae5ef674cca1be
86854
88242
  """Type checking stubs"""
86855
88243
  pass
86856
88244
 
88245
+ def _typecheckingstub__05f50c48ead9c1041aeef184ab271f7236e2832bc9e7175e9c6909f2fc4097e0(
88246
+ scope: _constructs_77d1e7e8.Construct,
88247
+ id: builtins.str,
88248
+ *,
88249
+ base_model: _IModel_b88b328a,
88250
+ custom_model_name: builtins.str,
88251
+ job_name: builtins.str,
88252
+ output_data: typing.Union[OutputBucketConfiguration, typing.Dict[builtins.str, typing.Any]],
88253
+ training_data: typing.Union[TrainingBucketConfiguration, typing.Dict[builtins.str, typing.Any]],
88254
+ client_request_token: typing.Optional[builtins.str] = None,
88255
+ customization_type: typing.Optional[CustomizationType] = None,
88256
+ custom_model_kms_key: typing.Optional[_IKey_5f11635f] = None,
88257
+ custom_model_tags: typing.Optional[typing.Sequence[typing.Union[CustomModelTag, typing.Dict[builtins.str, typing.Any]]]] = None,
88258
+ hyper_parameters: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
88259
+ job_tags: typing.Optional[typing.Sequence[typing.Union[CustomModelTag, typing.Dict[builtins.str, typing.Any]]]] = None,
88260
+ role: typing.Optional[_IRole_235f5d8e] = None,
88261
+ validation_data: typing.Optional[typing.Sequence[typing.Union[ValidationBucketConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
88262
+ vpc_config: typing.Optional[IBedrockCreateModelCustomizationJobVpcConfig] = None,
88263
+ result_path: typing.Optional[builtins.str] = None,
88264
+ result_selector: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
88265
+ comment: typing.Optional[builtins.str] = None,
88266
+ query_language: typing.Optional[_QueryLanguage_be8414a8] = None,
88267
+ state_name: typing.Optional[builtins.str] = None,
88268
+ credentials: typing.Optional[typing.Union[_Credentials_2cd64c6b, typing.Dict[builtins.str, typing.Any]]] = None,
88269
+ heartbeat: typing.Optional[_Duration_4839e8c3] = None,
88270
+ heartbeat_timeout: typing.Optional[_Timeout_d7c10551] = None,
88271
+ integration_pattern: typing.Optional[_IntegrationPattern_949291bc] = None,
88272
+ task_timeout: typing.Optional[_Timeout_d7c10551] = None,
88273
+ timeout: typing.Optional[_Duration_4839e8c3] = None,
88274
+ assign: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
88275
+ input_path: typing.Optional[builtins.str] = None,
88276
+ output_path: typing.Optional[builtins.str] = None,
88277
+ outputs: typing.Any = None,
88278
+ ) -> None:
88279
+ """Type checking stubs"""
88280
+ pass
88281
+
88282
+ def _typecheckingstub__4a1348489dd866713bad4f53a20bf5de0eff5edebddfb3011e85cf03da5f68d2(
88283
+ *,
88284
+ comment: typing.Optional[builtins.str] = None,
88285
+ query_language: typing.Optional[_QueryLanguage_be8414a8] = None,
88286
+ state_name: typing.Optional[builtins.str] = None,
88287
+ credentials: typing.Optional[typing.Union[_Credentials_2cd64c6b, typing.Dict[builtins.str, typing.Any]]] = None,
88288
+ heartbeat: typing.Optional[_Duration_4839e8c3] = None,
88289
+ heartbeat_timeout: typing.Optional[_Timeout_d7c10551] = None,
88290
+ integration_pattern: typing.Optional[_IntegrationPattern_949291bc] = None,
88291
+ task_timeout: typing.Optional[_Timeout_d7c10551] = None,
88292
+ timeout: typing.Optional[_Duration_4839e8c3] = None,
88293
+ assign: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
88294
+ input_path: typing.Optional[builtins.str] = None,
88295
+ output_path: typing.Optional[builtins.str] = None,
88296
+ outputs: typing.Any = None,
88297
+ result_path: typing.Optional[builtins.str] = None,
88298
+ result_selector: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
88299
+ base_model: _IModel_b88b328a,
88300
+ custom_model_name: builtins.str,
88301
+ job_name: builtins.str,
88302
+ output_data: typing.Union[OutputBucketConfiguration, typing.Dict[builtins.str, typing.Any]],
88303
+ training_data: typing.Union[TrainingBucketConfiguration, typing.Dict[builtins.str, typing.Any]],
88304
+ client_request_token: typing.Optional[builtins.str] = None,
88305
+ customization_type: typing.Optional[CustomizationType] = None,
88306
+ custom_model_kms_key: typing.Optional[_IKey_5f11635f] = None,
88307
+ custom_model_tags: typing.Optional[typing.Sequence[typing.Union[CustomModelTag, typing.Dict[builtins.str, typing.Any]]]] = None,
88308
+ hyper_parameters: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
88309
+ job_tags: typing.Optional[typing.Sequence[typing.Union[CustomModelTag, typing.Dict[builtins.str, typing.Any]]]] = None,
88310
+ role: typing.Optional[_IRole_235f5d8e] = None,
88311
+ validation_data: typing.Optional[typing.Sequence[typing.Union[ValidationBucketConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
88312
+ vpc_config: typing.Optional[IBedrockCreateModelCustomizationJobVpcConfig] = None,
88313
+ ) -> None:
88314
+ """Type checking stubs"""
88315
+ pass
88316
+
86857
88317
  def _typecheckingstub__3b20c515efa874adacf78d373dbda10fc59e519a3bd1b280ecbf56409aea2544(
86858
88318
  scope: _constructs_77d1e7e8.Construct,
86859
88319
  id: builtins.str,
@@ -88074,6 +89534,22 @@ def _typecheckingstub__3ded07e1f80001916cedf33047f0de79b459fade9caa718d154ce1255
88074
89534
  """Type checking stubs"""
88075
89535
  pass
88076
89536
 
89537
+ def _typecheckingstub__83c62fca1c3250b9c5ee6e19dd3dfc1c4accd6cbf494208ce8b177e8b37ab802(
89538
+ *,
89539
+ key: builtins.str,
89540
+ value: builtins.str,
89541
+ ) -> None:
89542
+ """Type checking stubs"""
89543
+ pass
89544
+
89545
+ def _typecheckingstub__a310fa6911b62dab87f8ad67600f727aa7262c59f0ca09c7df5e3e7af25a63ee(
89546
+ *,
89547
+ bucket: _IBucket_42e086fd,
89548
+ path: typing.Optional[builtins.str] = None,
89549
+ ) -> None:
89550
+ """Type checking stubs"""
89551
+ pass
89552
+
88077
89553
  def _typecheckingstub__ae608c3d9d2fb12a77379a82dd6b04cdafe048a3cd431a1c95d472c19c1cbcd4(
88078
89554
  *,
88079
89555
  s3_data_source: typing.Union[S3DataSource, typing.Dict[builtins.str, typing.Any]],
@@ -92516,6 +93992,14 @@ def _typecheckingstub__2c0e40b619f7707d6a2a3d70d10b988fa758ad2484283c28988ee8d61
92516
93992
  """Type checking stubs"""
92517
93993
  pass
92518
93994
 
93995
+ def _typecheckingstub__05ead3f1760bde00adef48e083438b80e2b20f50fe9ae0d35189d6761a24370f(
93996
+ *,
93997
+ bucket: _IBucket_42e086fd,
93998
+ path: typing.Optional[builtins.str] = None,
93999
+ ) -> None:
94000
+ """Type checking stubs"""
94001
+ pass
94002
+
92519
94003
  def _typecheckingstub__eb710544769244822847e500c7742fc5cdede3a3225e828a8b782f786596237b(
92520
94004
  *,
92521
94005
  s3_output_location: S3Location,
@@ -94254,6 +95738,14 @@ def _typecheckingstub__7f029a86ecd789f9746de04e831dd00fa385ff16eff9e460e283675c6
94254
95738
  """Type checking stubs"""
94255
95739
  pass
94256
95740
 
95741
+ def _typecheckingstub__682a3d293d520e48cda4b322d7a11a901469838caf114187b949c74301eba9a0(
95742
+ *,
95743
+ bucket: _IBucket_42e086fd,
95744
+ path: typing.Optional[builtins.str] = None,
95745
+ ) -> None:
95746
+ """Type checking stubs"""
95747
+ pass
95748
+
94257
95749
  def _typecheckingstub__3876aeec1b0e2570c479d15f510b9f85e418ae931e5d26b863e809248e9c1102(
94258
95750
  *,
94259
95751
  s3_data_source: typing.Union[TransformS3DataSource, typing.Dict[builtins.str, typing.Any]],
@@ -94298,6 +95790,14 @@ def _typecheckingstub__1bf67112cc77948d7e9195d0722cf1a2657ff1a785c74e905b6fd8f05
94298
95790
  """Type checking stubs"""
94299
95791
  pass
94300
95792
 
95793
+ def _typecheckingstub__a6205038f5bd369810feab5dd42ebc706a68c088fceea69b083c4878117ca890(
95794
+ *,
95795
+ bucket: _IBucket_42e086fd,
95796
+ path: typing.Optional[builtins.str] = None,
95797
+ ) -> None:
95798
+ """Type checking stubs"""
95799
+ pass
95800
+
94301
95801
  def _typecheckingstub__5613dfd7586032cb8014fb82727b538f19d6ad8e354293fb9634b6eb82082c5d(
94302
95802
  task_input: _TaskInput_91b91b91,
94303
95803
  ) -> None: