import abc
import datetime
import enum
import typing

import jsii
import jsii.compat
import publication

from jsii.python import classproperty

import aws_cdk.assets
import aws_cdk.aws_cloudwatch
import aws_cdk.aws_ec2
import aws_cdk.aws_ecr
import aws_cdk.aws_ecr_assets
import aws_cdk.aws_ecs
import aws_cdk.aws_iam
import aws_cdk.aws_kms
import aws_cdk.aws_lambda
import aws_cdk.aws_s3
import aws_cdk.aws_sns
import aws_cdk.aws_sqs
import aws_cdk.aws_stepfunctions
import aws_cdk.core
__jsii_assembly__ = jsii.JSIIAssembly.load("@aws-cdk/aws-stepfunctions-tasks", "0.37.0", __name__, "aws-stepfunctions-tasks@0.37.0.jsii.tgz")
@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.AlgorithmSpecification", jsii_struct_bases=[])
class AlgorithmSpecification(jsii.compat.TypedDict, total=False):
    """
    Stability:
        experimental
    """
    algorithmName: str
    """Name of the algorithm resource to use for the training job.

    Stability:
        experimental
    """

    metricDefinitions: typing.List["MetricDefinition"]
    """List of metric definition objects.

    Each object specifies the metric name and regular expressions used to parse algorithm logs.

    Stability:
        experimental
    """

    trainingImage: "DockerImage"
    """Registry path of the Docker image that contains the training algorithm.

    Stability:
        experimental
    """

    trainingInputMode: "InputMode"
    """Input mode that the algorithm supports.

    Default:
        is 'File' mode

    Stability:
        experimental
    """

@jsii.enum(jsii_type="@aws-cdk/aws-stepfunctions-tasks.AssembleWith")
class AssembleWith(enum.Enum):
    """How to assemble the results of the transform job as a single S3 object.

    Stability:
        experimental
    """
    NONE = "NONE"
    """Concatenate the results in binary format.

    Stability:
        experimental
    """
    LINE = "LINE"
    """Add a newline character at the end of every transformed record.

    Stability:
        experimental
    """

@jsii.enum(jsii_type="@aws-cdk/aws-stepfunctions-tasks.BatchStrategy")
class BatchStrategy(enum.Enum):
    """Specifies the number of records to include in a mini-batch for an HTTP inference request.

    Stability:
        experimental
    """
    MULTI_RECORD = "MULTI_RECORD"
    """Fits multiple records in a mini-batch.

    Stability:
        experimental
    """
    SINGLE_RECORD = "SINGLE_RECORD"
    """Use a single record when making an invocation request.

    Stability:
        experimental
    """

@jsii.data_type_optionals(jsii_struct_bases=[])
class _Channel(jsii.compat.TypedDict, total=False):
    compressionType: "CompressionType"
    """Compression type if training data is compressed.

    Stability:
        experimental
    """
    contentType: str
    """Content type.

    Stability:
        experimental
    """
    inputMode: "InputMode"
    """Input mode to use for the data channel in a training job.

    Stability:
        experimental
    """
    recordWrapperType: "RecordWrapperType"
    """Record wrapper type.

    Stability:
        experimental
    """
    shuffleConfig: "ShuffleConfig"
    """Shuffle config option for input data in a channel.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.Channel", jsii_struct_bases=[_Channel])
class Channel(_Channel):
    """Describes the training, validation or test dataset and the Amazon S3 location where it is stored.

    Stability:
        experimental
    """
    channelName: str
    """Name of the channel.

    Stability:
        experimental
    """

    dataSource: "DataSource"
    """Location of the data channel.

    Stability:
        experimental
    """

@jsii.data_type_optionals(jsii_struct_bases=[])
class _CommonEcsRunTaskProps(jsii.compat.TypedDict, total=False):
    containerOverrides: typing.List["ContainerOverride"]
    """Container setting overrides.

    Key is the name of the container to override, value is the
    values you want to override.

    Stability:
        experimental
    """
    synchronous: bool
    """Whether to wait for the task to complete and return the response.

    Default:
        true

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.CommonEcsRunTaskProps", jsii_struct_bases=[_CommonEcsRunTaskProps])
class CommonEcsRunTaskProps(_CommonEcsRunTaskProps):
    """Basic properties for ECS Tasks.

    Stability:
        experimental
    """
    cluster: aws_cdk.aws_ecs.ICluster
    """The topic to run the task on.

    Stability:
        experimental
    """

    taskDefinition: aws_cdk.aws_ecs.TaskDefinition
    """Task Definition used for running tasks in the service.

    Stability:
        experimental
    """

@jsii.enum(jsii_type="@aws-cdk/aws-stepfunctions-tasks.CompressionType")
class CompressionType(enum.Enum):
    """Compression type of the data.

    Stability:
        experimental
    """
    NONE = "NONE"
    """None compression type.

    Stability:
        experimental
    """
    GZIP = "GZIP"
    """Gzip compression type.

    Stability:
        experimental
    """

@jsii.data_type_optionals(jsii_struct_bases=[])
class _ContainerOverride(jsii.compat.TypedDict, total=False):
    command: typing.List[str]
    """Command to run inside the container.

    Default:
        Default command

    Stability:
        experimental
    """
    cpu: jsii.Number
    """The number of cpu units reserved for the container.

    Stability:
        experimental
    Default:
        The default value from the task definition.
    """
    environment: typing.List["TaskEnvironmentVariable"]
    """Variables to set in the container's environment.

    Stability:
        experimental
    """
    memoryLimit: jsii.Number
    """Hard memory limit on the container.

    Stability:
        experimental
    Default:
        The default value from the task definition.
    """
    memoryReservation: jsii.Number
    """Soft memory limit on the container.

    Stability:
        experimental
    Default:
        The default value from the task definition.
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.ContainerOverride", jsii_struct_bases=[_ContainerOverride])
class ContainerOverride(_ContainerOverride):
    """
    Stability:
        experimental
    """
    containerName: str
    """Name of the container inside the task definition.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.DataSource", jsii_struct_bases=[])
class DataSource(jsii.compat.TypedDict):
    """Location of the channel data.

    Stability:
        experimental
    """
    s3DataSource: "S3DataSource"
    """S3 location of the data source that is associated with a channel.

    Stability:
        experimental
    """

class DockerImage(metaclass=jsii.JSIIAbstractClass, jsii_type="@aws-cdk/aws-stepfunctions-tasks.DockerImage"):
    """Creates ``IDockerImage`` instances.

    Stability:
        experimental
    """
    @staticmethod
    def __jsii_proxy_class__():
        return _DockerImageProxy

    def __init__(self) -> None:
        jsii.create(DockerImage, self, [])

    @jsii.member(jsii_name="fromAsset")
    @classmethod
    def from_asset(cls, scope: aws_cdk.core.Construct, id: str, *, directory: str, build_args: typing.Optional[typing.Mapping[str,str]]=None, repository_name: typing.Optional[str]=None, exclude: typing.Optional[typing.List[str]]=None, follow: typing.Optional[aws_cdk.assets.FollowMode]=None) -> "DockerImage":
        """Reference a Docker image that is provided as an Asset in the current app.

        Arguments:
            scope: the scope in which to create the Asset.
            id: the ID for the asset in the construct tree.
            props: the configuration props of the asset.
            directory: The directory where the Dockerfile is stored.
            build_args: Build args to pass to the ``docker build`` command. Default: no build args are passed
            repository_name: ECR repository name. Specify this property if you need to statically address the image, e.g. from a Kubernetes Pod. Note, this is only the repository name, without the registry and the tag parts. Default: automatically derived from the asset's ID.
            exclude: Glob patterns to exclude from the copy. Default: nothing is excluded
            follow: A strategy for how to handle symlinks. Default: Never

        Stability:
            experimental
        """
        props: aws_cdk.aws_ecr_assets.DockerImageAssetProps = {"directory": directory}

        if build_args is not None:
            props["buildArgs"] = build_args

        if repository_name is not None:
            props["repositoryName"] = repository_name

        if exclude is not None:
            props["exclude"] = exclude

        if follow is not None:
            props["follow"] = follow

        return jsii.sinvoke(cls, "fromAsset", [scope, id, props])

    @jsii.member(jsii_name="fromEcrRepository")
    @classmethod
    def from_ecr_repository(cls, repository: aws_cdk.aws_ecr.IRepository, tag: typing.Optional[str]=None) -> "DockerImage":
        """Reference a Docker image stored in an ECR repository.

        Arguments:
            repository: the ECR repository where the image is hosted.
            tag: an optional ``tag``.

        Stability:
            experimental
        """
        return jsii.sinvoke(cls, "fromEcrRepository", [repository, tag])

    @jsii.member(jsii_name="fromJsonExpression")
    @classmethod
    def from_json_expression(cls, expression: str, allow_any_ecr_image_pull: typing.Optional[bool]=None) -> "DockerImage":
        """Reference a Docker image which URI is obtained from the task's input.

        Arguments:
            expression: the JSON path expression with the task input.
            allow_any_ecr_image_pull: whether ECR access should be permitted (set to ``false`` if the image will never be in ECR).

        Stability:
            experimental
        """
        return jsii.sinvoke(cls, "fromJsonExpression", [expression, allow_any_ecr_image_pull])

    @jsii.member(jsii_name="fromRegistry")
    @classmethod
    def from_registry(cls, image_uri: str) -> "DockerImage":
        """Reference a Docker image by it's URI.

        When referencing ECR images, prefer using ``inEcr``.

        Arguments:
            image_uri: the URI to the docker image.

        Stability:
            experimental
        """
        return jsii.sinvoke(cls, "fromRegistry", [image_uri])

    @jsii.member(jsii_name="bind")
    @abc.abstractmethod
    def bind(self, task: "ISageMakerTask") -> "DockerImageConfig":
        """Called when the image is used by a SageMaker task.

        Arguments:
            task: -

        Stability:
            experimental
        """
        ...


class _DockerImageProxy(DockerImage):
    @jsii.member(jsii_name="bind")
    def bind(self, task: "ISageMakerTask") -> "DockerImageConfig":
        """Called when the image is used by a SageMaker task.

        Arguments:
            task: -

        Stability:
            experimental
        """
        return jsii.invoke(self, "bind", [task])


@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.DockerImageConfig", jsii_struct_bases=[])
class DockerImageConfig(jsii.compat.TypedDict):
    """Configuration for a using Docker image.

    Stability:
        experimental
    """
    imageUri: str
    """The fully qualified URI of the Docker image.

    Stability:
        experimental
    """

@jsii.implements(aws_cdk.aws_ec2.IConnectable, aws_cdk.aws_stepfunctions.IStepFunctionsTask)
class EcsRunTaskBase(metaclass=jsii.JSIIMeta, jsii_type="@aws-cdk/aws-stepfunctions-tasks.EcsRunTaskBase"):
    """A StepFunctions Task to run a Task on ECS or Fargate.

    Stability:
        experimental
    """
    def __init__(self, *, parameters: typing.Optional[typing.Mapping[str,typing.Any]]=None, cluster: aws_cdk.aws_ecs.ICluster, task_definition: aws_cdk.aws_ecs.TaskDefinition, container_overrides: typing.Optional[typing.List["ContainerOverride"]]=None, synchronous: typing.Optional[bool]=None) -> None:
        """
        Arguments:
            props: -
            parameters: Additional parameters to pass to the base task.
            cluster: The topic to run the task on.
            task_definition: Task Definition used for running tasks in the service.
            container_overrides: Container setting overrides. Key is the name of the container to override, value is the values you want to override.
            synchronous: Whether to wait for the task to complete and return the response. Default: true

        Stability:
            experimental
        """
        props: EcsRunTaskBaseProps = {"cluster": cluster, "taskDefinition": task_definition}

        if parameters is not None:
            props["parameters"] = parameters

        if container_overrides is not None:
            props["containerOverrides"] = container_overrides

        if synchronous is not None:
            props["synchronous"] = synchronous

        jsii.create(EcsRunTaskBase, self, [props])

    @jsii.member(jsii_name="bind")
    def bind(self, task: aws_cdk.aws_stepfunctions.Task) -> aws_cdk.aws_stepfunctions.StepFunctionsTaskConfig:
        """Called when the task object is used in a workflow.

        Arguments:
            task: -

        Stability:
            experimental
        """
        return jsii.invoke(self, "bind", [task])

    @jsii.member(jsii_name="configureAwsVpcNetworking")
    def _configure_aws_vpc_networking(self, vpc: aws_cdk.aws_ec2.IVpc, assign_public_ip: typing.Optional[bool]=None, subnet_selection: typing.Optional[aws_cdk.aws_ec2.SubnetSelection]=None, security_group: typing.Optional[aws_cdk.aws_ec2.ISecurityGroup]=None) -> None:
        """
        Arguments:
            vpc: -
            assign_public_ip: -
            subnet_selection: -
            security_group: -

        Stability:
            experimental
        """
        return jsii.invoke(self, "configureAwsVpcNetworking", [vpc, assign_public_ip, subnet_selection, security_group])

    @property
    @jsii.member(jsii_name="connections")
    def connections(self) -> aws_cdk.aws_ec2.Connections:
        """Manage allowed network traffic for this service.

        Stability:
            experimental
        """
        return jsii.get(self, "connections")


@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.EcsRunTaskBaseProps", jsii_struct_bases=[CommonEcsRunTaskProps])
class EcsRunTaskBaseProps(CommonEcsRunTaskProps, jsii.compat.TypedDict, total=False):
    """Construction properties for the BaseRunTaskProps.

    Stability:
        experimental
    """
    parameters: typing.Mapping[str,typing.Any]
    """Additional parameters to pass to the base task.

    Stability:
        experimental
    """

@jsii.interface(jsii_type="@aws-cdk/aws-stepfunctions-tasks.ISageMakerTask")
class ISageMakerTask(aws_cdk.aws_stepfunctions.IStepFunctionsTask, aws_cdk.aws_iam.IGrantable, jsii.compat.Protocol):
    """
    Stability:
        experimental
    """
    @staticmethod
    def __jsii_proxy_class__():
        return _ISageMakerTaskProxy

    pass

class _ISageMakerTaskProxy(jsii.proxy_for(aws_cdk.aws_stepfunctions.IStepFunctionsTask), jsii.proxy_for(aws_cdk.aws_iam.IGrantable)):
    """
    Stability:
        experimental
    """
    __jsii_type__ = "@aws-cdk/aws-stepfunctions-tasks.ISageMakerTask"
    pass

@jsii.enum(jsii_type="@aws-cdk/aws-stepfunctions-tasks.InputMode")
class InputMode(enum.Enum):
    """Input mode that the algorithm supports.

    Stability:
        experimental
    """
    PIPE = "PIPE"
    """Pipe mode.

    Stability:
        experimental
    """
    FILE = "FILE"
    """File mode.

    Stability:
        experimental
    """

@jsii.enum(jsii_type="@aws-cdk/aws-stepfunctions-tasks.InvocationType")
class InvocationType(enum.Enum):
    """Invocation type of a Lambda.

    Stability:
        experimental
    """
    REQUEST_RESPONSE = "REQUEST_RESPONSE"
    """Invoke synchronously.

    The API response includes the function response and additional data.

    Stability:
        experimental
    """
    EVENT = "EVENT"
    """Invoke asynchronously.

    Send events that fail multiple times to the function's dead-letter queue (if it's configured).
    The API response only includes a status code.

    Stability:
        experimental
    """

@jsii.implements(aws_cdk.aws_stepfunctions.IStepFunctionsTask)
class InvokeActivity(metaclass=jsii.JSIIMeta, jsii_type="@aws-cdk/aws-stepfunctions-tasks.InvokeActivity"):
    """A StepFunctions Task to invoke a Lambda function.

    A Function can be used directly as a Resource, but this class mirrors
    integration with other AWS services via a specific class instance.

    Stability:
        experimental
    """
    def __init__(self, activity: aws_cdk.aws_stepfunctions.IActivity, *, heartbeat: typing.Optional[aws_cdk.core.Duration]=None) -> None:
        """
        Arguments:
            activity: -
            props: -
            heartbeat: Maximum time between heart beats. If the time between heart beats takes longer than this, a 'Timeout' error is raised. Default: No heart beat timeout

        Stability:
            experimental
        """
        props: InvokeActivityProps = {}

        if heartbeat is not None:
            props["heartbeat"] = heartbeat

        jsii.create(InvokeActivity, self, [activity, props])

    @jsii.member(jsii_name="bind")
    def bind(self, _task: aws_cdk.aws_stepfunctions.Task) -> aws_cdk.aws_stepfunctions.StepFunctionsTaskConfig:
        """Called when the task object is used in a workflow.

        Arguments:
            _task: -

        Stability:
            experimental
        """
        return jsii.invoke(self, "bind", [_task])


@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.InvokeActivityProps", jsii_struct_bases=[])
class InvokeActivityProps(jsii.compat.TypedDict, total=False):
    """Properties for FunctionTask.

    Stability:
        experimental
    """
    heartbeat: aws_cdk.core.Duration
    """Maximum time between heart beats.

    If the time between heart beats takes longer than this, a 'Timeout' error is raised.

    Default:
        No heart beat timeout

    Stability:
        experimental
    """

@jsii.implements(aws_cdk.aws_stepfunctions.IStepFunctionsTask)
class InvokeFunction(metaclass=jsii.JSIIMeta, jsii_type="@aws-cdk/aws-stepfunctions-tasks.InvokeFunction"):
    """A StepFunctions Task to invoke a Lambda function.

    OUTPUT: the output of this task is the return value of the Lambda Function.

    Stability:
        experimental
    """
    def __init__(self, lambda_function: aws_cdk.aws_lambda.IFunction, *, payload: typing.Optional[typing.Mapping[str,typing.Any]]=None) -> None:
        """
        Arguments:
            lambda_function: -
            props: -
            payload: The JSON that you want to provide to your Lambda function as input. Default: - The JSON data indicated by the task's InputPath is used as payload

        Stability:
            experimental
        """
        props: InvokeFunctionProps = {}

        if payload is not None:
            props["payload"] = payload

        jsii.create(InvokeFunction, self, [lambda_function, props])

    @jsii.member(jsii_name="bind")
    def bind(self, _task: aws_cdk.aws_stepfunctions.Task) -> aws_cdk.aws_stepfunctions.StepFunctionsTaskConfig:
        """Called when the task object is used in a workflow.

        Arguments:
            _task: -

        Stability:
            experimental
        """
        return jsii.invoke(self, "bind", [_task])


@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.InvokeFunctionProps", jsii_struct_bases=[])
class InvokeFunctionProps(jsii.compat.TypedDict, total=False):
    """Properties for InvokeFunction.

    Stability:
        experimental
    """
    payload: typing.Mapping[str,typing.Any]
    """The JSON that you want to provide to your Lambda function as input.

    Default:
        - The JSON data indicated by the task's InputPath is used as payload

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.MetricDefinition", jsii_struct_bases=[])
class MetricDefinition(jsii.compat.TypedDict):
    """Specifies the metric name and regular expressions used to parse algorithm logs.

    Stability:
        experimental
    """
    name: str
    """Name of the metric.

    Stability:
        experimental
    """

    regex: str
    """Regular expression that searches the output of a training job and gets the value of the metric.

    Stability:
        experimental
    """

@jsii.data_type_optionals(jsii_struct_bases=[])
class _OutputDataConfig(jsii.compat.TypedDict, total=False):
    encryptionKey: aws_cdk.aws_kms.IKey
    """Optional KMS encryption key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.OutputDataConfig", jsii_struct_bases=[_OutputDataConfig])
class OutputDataConfig(_OutputDataConfig):
    """
    Stability:
        experimental
    """
    s3OutputLocation: "S3Location"
    """Identifies the S3 path where you want Amazon SageMaker to store the model artifacts.

    Stability:
        experimental
    """

@jsii.implements(aws_cdk.aws_stepfunctions.IStepFunctionsTask)
class PublishToTopic(metaclass=jsii.JSIIMeta, jsii_type="@aws-cdk/aws-stepfunctions-tasks.PublishToTopic"):
    """A StepFunctions Task to invoke a Lambda function.

    A Function can be used directly as a Resource, but this class mirrors
    integration with other AWS services via a specific class instance.

    Stability:
        experimental
    """
    def __init__(self, topic: aws_cdk.aws_sns.ITopic, *, message: aws_cdk.aws_stepfunctions.TaskInput, message_per_subscription_type: typing.Optional[bool]=None, subject: typing.Optional[str]=None, wait_for_task_token: typing.Optional[bool]=None) -> None:
        """
        Arguments:
            topic: -
            props: -
            message: The text message to send to the topic.
            message_per_subscription_type: If true, send a different message to every subscription type. If this is set to true, message must be a JSON object with a "default" key and a key for every subscription type (such as "sqs", "email", etc.) The values are strings representing the messages being sent to every subscription type.
            subject: Message subject.
            wait_for_task_token: Whether to pause the workflow until a task token is returned. Default: false

        Stability:
            experimental
        """
        props: PublishToTopicProps = {"message": message}

        if message_per_subscription_type is not None:
            props["messagePerSubscriptionType"] = message_per_subscription_type

        if subject is not None:
            props["subject"] = subject

        if wait_for_task_token is not None:
            props["waitForTaskToken"] = wait_for_task_token

        jsii.create(PublishToTopic, self, [topic, props])

    @jsii.member(jsii_name="bind")
    def bind(self, _task: aws_cdk.aws_stepfunctions.Task) -> aws_cdk.aws_stepfunctions.StepFunctionsTaskConfig:
        """Called when the task object is used in a workflow.

        Arguments:
            _task: -

        Stability:
            experimental
        """
        return jsii.invoke(self, "bind", [_task])


@jsii.data_type_optionals(jsii_struct_bases=[])
class _PublishToTopicProps(jsii.compat.TypedDict, total=False):
    messagePerSubscriptionType: bool
    """If true, send a different message to every subscription type.

    If this is set to true, message must be a JSON object with a
    "default" key and a key for every subscription type (such as "sqs",
    "email", etc.) The values are strings representing the messages
    being sent to every subscription type.

    See:
        https://docs.aws.amazon.com/sns/latest/api/API_Publish.html#API_Publish_RequestParameters
    Stability:
        experimental
    """
    subject: str
    """Message subject.

    Stability:
        experimental
    """
    waitForTaskToken: bool
    """Whether to pause the workflow until a task token is returned.

    Default:
        false

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.PublishToTopicProps", jsii_struct_bases=[_PublishToTopicProps])
class PublishToTopicProps(_PublishToTopicProps):
    """Properties for PublishTask.

    Stability:
        experimental
    """
    message: aws_cdk.aws_stepfunctions.TaskInput
    """The text message to send to the topic.

    Stability:
        experimental
    """

@jsii.enum(jsii_type="@aws-cdk/aws-stepfunctions-tasks.RecordWrapperType")
class RecordWrapperType(enum.Enum):
    """Define the format of the input data.

    Stability:
        experimental
    """
    NONE = "NONE"
    """None record wrapper type.

    Stability:
        experimental
    """
    RECORD_IO = "RECORD_IO"
    """RecordIO record wrapper type.

    Stability:
        experimental
    """

@jsii.data_type_optionals(jsii_struct_bases=[])
class _ResourceConfig(jsii.compat.TypedDict, total=False):
    volumeEncryptionKey: aws_cdk.aws_kms.IKey
    """KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.ResourceConfig", jsii_struct_bases=[_ResourceConfig])
class ResourceConfig(_ResourceConfig):
    """
    Stability:
        experimental
    """
    instanceCount: jsii.Number
    """The number of ML compute instances to use.

    Default:
        1 instance.

    Stability:
        experimental
    """

    instanceType: aws_cdk.aws_ec2.InstanceType
    """ML compute instance type.

    Default:
        is the 'm4.xlarge' instance type.

    Stability:
        experimental
    """

    volumeSizeInGB: jsii.Number
    """Size of the ML storage volume that you want to provision.

    Default:
        10 GB EBS volume.

    Stability:
        experimental
    """

class RunEcsEc2Task(EcsRunTaskBase, metaclass=jsii.JSIIMeta, jsii_type="@aws-cdk/aws-stepfunctions-tasks.RunEcsEc2Task"):
    """Run an ECS/EC2 Task in a StepFunctions workflow.

    Stability:
        experimental
    """
    def __init__(self, *, placement_constraints: typing.Optional[typing.List[aws_cdk.aws_ecs.PlacementConstraint]]=None, placement_strategies: typing.Optional[typing.List[aws_cdk.aws_ecs.PlacementStrategy]]=None, security_group: typing.Optional[aws_cdk.aws_ec2.ISecurityGroup]=None, subnets: typing.Optional[aws_cdk.aws_ec2.SubnetSelection]=None, cluster: aws_cdk.aws_ecs.ICluster, task_definition: aws_cdk.aws_ecs.TaskDefinition, container_overrides: typing.Optional[typing.List["ContainerOverride"]]=None, synchronous: typing.Optional[bool]=None) -> None:
        """
        Arguments:
            props: -
            placement_constraints: Placement constraints. Default: No constraints
            placement_strategies: Placement strategies. Default: No strategies
            security_group: Existing security group to use for the task's ENIs. (Only applicable in case the TaskDefinition is configured for AwsVpc networking) Default: A new security group is created
            subnets: In what subnets to place the task's ENIs. (Only applicable in case the TaskDefinition is configured for AwsVpc networking) Default: Private subnets
            cluster: The topic to run the task on.
            task_definition: Task Definition used for running tasks in the service.
            container_overrides: Container setting overrides. Key is the name of the container to override, value is the values you want to override.
            synchronous: Whether to wait for the task to complete and return the response. Default: true

        Stability:
            experimental
        """
        props: RunEcsEc2TaskProps = {"cluster": cluster, "taskDefinition": task_definition}

        if placement_constraints is not None:
            props["placementConstraints"] = placement_constraints

        if placement_strategies is not None:
            props["placementStrategies"] = placement_strategies

        if security_group is not None:
            props["securityGroup"] = security_group

        if subnets is not None:
            props["subnets"] = subnets

        if container_overrides is not None:
            props["containerOverrides"] = container_overrides

        if synchronous is not None:
            props["synchronous"] = synchronous

        jsii.create(RunEcsEc2Task, self, [props])


@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.RunEcsEc2TaskProps", jsii_struct_bases=[CommonEcsRunTaskProps])
class RunEcsEc2TaskProps(CommonEcsRunTaskProps, jsii.compat.TypedDict, total=False):
    """Properties to run an ECS task on EC2 in StepFunctionsan ECS.

    Stability:
        experimental
    """
    placementConstraints: typing.List[aws_cdk.aws_ecs.PlacementConstraint]
    """Placement constraints.

    Default:
        No constraints

    Stability:
        experimental
    """

    placementStrategies: typing.List[aws_cdk.aws_ecs.PlacementStrategy]
    """Placement strategies.

    Default:
        No strategies

    Stability:
        experimental
    """

    securityGroup: aws_cdk.aws_ec2.ISecurityGroup
    """Existing security group to use for the task's ENIs.

    (Only applicable in case the TaskDefinition is configured for AwsVpc networking)

    Default:
        A new security group is created

    Stability:
        experimental
    """

    subnets: aws_cdk.aws_ec2.SubnetSelection
    """In what subnets to place the task's ENIs.

    (Only applicable in case the TaskDefinition is configured for AwsVpc networking)

    Default:
        Private subnets

    Stability:
        experimental
    """

class RunEcsFargateTask(EcsRunTaskBase, metaclass=jsii.JSIIMeta, jsii_type="@aws-cdk/aws-stepfunctions-tasks.RunEcsFargateTask"):
    """Start a service on an ECS cluster.

    Stability:
        experimental
    """
    def __init__(self, *, assign_public_ip: typing.Optional[bool]=None, platform_version: typing.Optional[aws_cdk.aws_ecs.FargatePlatformVersion]=None, security_group: typing.Optional[aws_cdk.aws_ec2.ISecurityGroup]=None, subnets: typing.Optional[aws_cdk.aws_ec2.SubnetSelection]=None, cluster: aws_cdk.aws_ecs.ICluster, task_definition: aws_cdk.aws_ecs.TaskDefinition, container_overrides: typing.Optional[typing.List["ContainerOverride"]]=None, synchronous: typing.Optional[bool]=None) -> None:
        """
        Arguments:
            props: -
            assign_public_ip: Assign public IP addresses to each task. Default: false
            platform_version: Fargate platform version to run this service on. Unless you have specific compatibility requirements, you don't need to specify this. Default: Latest
            security_group: Existing security group to use for the tasks. Default: A new security group is created
            subnets: In what subnets to place the task's ENIs. Default: Private subnet if assignPublicIp, public subnets otherwise
            cluster: The topic to run the task on.
            task_definition: Task Definition used for running tasks in the service.
            container_overrides: Container setting overrides. Key is the name of the container to override, value is the values you want to override.
            synchronous: Whether to wait for the task to complete and return the response. Default: true

        Stability:
            experimental
        """
        props: RunEcsFargateTaskProps = {"cluster": cluster, "taskDefinition": task_definition}

        if assign_public_ip is not None:
            props["assignPublicIp"] = assign_public_ip

        if platform_version is not None:
            props["platformVersion"] = platform_version

        if security_group is not None:
            props["securityGroup"] = security_group

        if subnets is not None:
            props["subnets"] = subnets

        if container_overrides is not None:
            props["containerOverrides"] = container_overrides

        if synchronous is not None:
            props["synchronous"] = synchronous

        jsii.create(RunEcsFargateTask, self, [props])


@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.RunEcsFargateTaskProps", jsii_struct_bases=[CommonEcsRunTaskProps])
class RunEcsFargateTaskProps(CommonEcsRunTaskProps, jsii.compat.TypedDict, total=False):
    """Properties to define an ECS service.

    Stability:
        experimental
    """
    assignPublicIp: bool
    """Assign public IP addresses to each task.

    Default:
        false

    Stability:
        experimental
    """

    platformVersion: aws_cdk.aws_ecs.FargatePlatformVersion
    """Fargate platform version to run this service on.

    Unless you have specific compatibility requirements, you don't need to
    specify this.

    Default:
        Latest

    Stability:
        experimental
    """

    securityGroup: aws_cdk.aws_ec2.ISecurityGroup
    """Existing security group to use for the tasks.

    Default:
        A new security group is created

    Stability:
        experimental
    """

    subnets: aws_cdk.aws_ec2.SubnetSelection
    """In what subnets to place the task's ENIs.

    Default:
        Private subnet if assignPublicIp, public subnets otherwise

    Stability:
        experimental
    """

@jsii.implements(aws_cdk.aws_stepfunctions.IStepFunctionsTask)
class RunLambdaTask(metaclass=jsii.JSIIMeta, jsii_type="@aws-cdk/aws-stepfunctions-tasks.RunLambdaTask"):
    """Invoke a Lambda function as a Task.

    OUTPUT: the output of this task is either the return value of Lambda's
    Invoke call, or whatever the Lambda Function posted back using
    ``SendTaskSuccess/SendTaskFailure`` in ``waitForTaskToken`` mode.

    See:
        https://docs.aws.amazon.com/step-functions/latest/dg/connect-lambda.html
    Stability:
        experimental
    """
    def __init__(self, lambda_function: aws_cdk.aws_lambda.IFunction, *, client_context: typing.Optional[str]=None, invocation_type: typing.Optional["InvocationType"]=None, payload: typing.Optional[typing.Mapping[str,typing.Any]]=None, qualifier: typing.Optional[str]=None, wait_for_task_token: typing.Optional[bool]=None) -> None:
        """
        Arguments:
            lambda_function: -
            props: -
            client_context: Client context to pass to the function. Default: - No context
            invocation_type: Invocation type of the Lambda function. Default: RequestResponse
            payload: The JSON that you want to provide to your Lambda function as input.
            qualifier: Version or alias of the function to be invoked. Default: - No qualifier
            wait_for_task_token: Whether to pause the workflow until a task token is returned. If this is set to true, the Context.taskToken value must be included somewhere in the payload and the Lambda must call ``SendTaskSuccess/SendTaskFailure`` using that token. Default: false

        Stability:
            experimental
        """
        props: RunLambdaTaskProps = {}

        if client_context is not None:
            props["clientContext"] = client_context

        if invocation_type is not None:
            props["invocationType"] = invocation_type

        if payload is not None:
            props["payload"] = payload

        if qualifier is not None:
            props["qualifier"] = qualifier

        if wait_for_task_token is not None:
            props["waitForTaskToken"] = wait_for_task_token

        jsii.create(RunLambdaTask, self, [lambda_function, props])

    @jsii.member(jsii_name="bind")
    def bind(self, _task: aws_cdk.aws_stepfunctions.Task) -> aws_cdk.aws_stepfunctions.StepFunctionsTaskConfig:
        """Called when the task object is used in a workflow.

        Arguments:
            _task: -

        Stability:
            experimental
        """
        return jsii.invoke(self, "bind", [_task])


@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.RunLambdaTaskProps", jsii_struct_bases=[])
class RunLambdaTaskProps(jsii.compat.TypedDict, total=False):
    """Properties for RunLambdaTask.

    Stability:
        experimental
    """
    clientContext: str
    """Client context to pass to the function.

    Default:
        - No context

    Stability:
        experimental
    """

    invocationType: "InvocationType"
    """Invocation type of the Lambda function.

    Default:
        RequestResponse

    Stability:
        experimental
    """

    payload: typing.Mapping[str,typing.Any]
    """The JSON that you want to provide to your Lambda function as input.

    Stability:
        experimental
    """

    qualifier: str
    """Version or alias of the function to be invoked.

    Default:
        - No qualifier

    Stability:
        experimental
    """

    waitForTaskToken: bool
    """Whether to pause the workflow until a task token is returned.

    If this is set to true, the Context.taskToken value must be included
    somewhere in the payload and the Lambda must call
    ``SendTaskSuccess/SendTaskFailure`` using that token.

    Default:
        false

    Stability:
        experimental
    """

@jsii.enum(jsii_type="@aws-cdk/aws-stepfunctions-tasks.S3DataDistributionType")
class S3DataDistributionType(enum.Enum):
    """S3 Data Distribution Type.

    Stability:
        experimental
    """
    FULLY_REPLICATED = "FULLY_REPLICATED"
    """Fully replicated S3 Data Distribution Type.

    Stability:
        experimental
    """
    SHARDED_BY_S3_KEY = "SHARDED_BY_S3_KEY"
    """Sharded By S3 Key Data Distribution Type.

    Stability:
        experimental
    """

@jsii.data_type_optionals(jsii_struct_bases=[])
class _S3DataSource(jsii.compat.TypedDict, total=False):
    attributeNames: typing.List[str]
    """List of one or more attribute names to use that are found in a specified augmented manifest file.

    Stability:
        experimental
    """
    s3DataDistributionType: "S3DataDistributionType"
    """S3 Data Distribution Type.

    Stability:
        experimental
    """
    s3DataType: "S3DataType"
    """S3 Data Type.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.S3DataSource", jsii_struct_bases=[_S3DataSource])
class S3DataSource(_S3DataSource):
    """S3 location of the channel data.

    Stability:
        experimental
    """
    s3Location: "S3Location"
    """S3 Uri.

    Stability:
        experimental
    """

@jsii.enum(jsii_type="@aws-cdk/aws-stepfunctions-tasks.S3DataType")
class S3DataType(enum.Enum):
    """S3 Data Type.

    Stability:
        experimental
    """
    MANIFEST_FILE = "MANIFEST_FILE"
    """Manifest File Data Type.

    Stability:
        experimental
    """
    S3_PREFIX = "S3_PREFIX"
    """S3 Prefix Data Type.

    Stability:
        experimental
    """
    AUGMENTED_MANIFEST_FILE = "AUGMENTED_MANIFEST_FILE"
    """Augmented Manifest File Data Type.

    Stability:
        experimental
    """

class S3Location(metaclass=jsii.JSIIAbstractClass, jsii_type="@aws-cdk/aws-stepfunctions-tasks.S3Location"):
    """Constructs ``IS3Location`` objects.

    Stability:
        experimental
    """
    @staticmethod
    def __jsii_proxy_class__():
        return _S3LocationProxy

    def __init__(self) -> None:
        jsii.create(S3Location, self, [])

    @jsii.member(jsii_name="fromBucket")
    @classmethod
    def from_bucket(cls, bucket: aws_cdk.aws_s3.IBucket, key_prefix: str) -> "S3Location":
        """An ``IS3Location`` built with a determined bucket and key prefix.

        Arguments:
            bucket: is the bucket where the objects are to be stored.
            key_prefix: is the key prefix used by the location.

        Stability:
            experimental
        """
        return jsii.sinvoke(cls, "fromBucket", [bucket, key_prefix])

    @jsii.member(jsii_name="fromJsonExpression")
    @classmethod
    def from_json_expression(cls, expression: str) -> "S3Location":
        """An ``IS3Location`` determined fully by a JSON Path from the task input.

        Due to the dynamic nature of those locations, the IAM grants that will be set by ``grantRead`` and ``grantWrite``
        apply to the ``*`` resource.

        Arguments:
            expression: the JSON expression resolving to an S3 location URI.

        Stability:
            experimental
        """
        return jsii.sinvoke(cls, "fromJsonExpression", [expression])

    @jsii.member(jsii_name="bind")
    @abc.abstractmethod
    def bind(self, task: "ISageMakerTask", *, for_reading: typing.Optional[bool]=None, for_writing: typing.Optional[bool]=None) -> "S3LocationConfig":
        """Called when the S3Location is bound to a StepFunctions task.

        Arguments:
            task: -
            opts: -
            for_reading: Allow reading from the S3 Location. Default: false
            for_writing: Allow writing to the S3 Location. Default: false

        Stability:
            experimental
        """
        ...


class _S3LocationProxy(S3Location):
    @jsii.member(jsii_name="bind")
    def bind(self, task: "ISageMakerTask", *, for_reading: typing.Optional[bool]=None, for_writing: typing.Optional[bool]=None) -> "S3LocationConfig":
        """Called when the S3Location is bound to a StepFunctions task.

        Arguments:
            task: -
            opts: -
            for_reading: Allow reading from the S3 Location. Default: false
            for_writing: Allow writing to the S3 Location. Default: false

        Stability:
            experimental
        """
        opts: S3LocationBindOptions = {}

        if for_reading is not None:
            opts["forReading"] = for_reading

        if for_writing is not None:
            opts["forWriting"] = for_writing

        return jsii.invoke(self, "bind", [task, opts])


@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.S3LocationBindOptions", jsii_struct_bases=[])
class S3LocationBindOptions(jsii.compat.TypedDict, total=False):
    """Options for binding an S3 Location.

    Stability:
        experimental
    """
    forReading: bool
    """Allow reading from the S3 Location.

    Default:
        false

    Stability:
        experimental
    """

    forWriting: bool
    """Allow writing to the S3 Location.

    Default:
        false

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.S3LocationConfig", jsii_struct_bases=[])
class S3LocationConfig(jsii.compat.TypedDict):
    """
    Stability:
        experimental
    """
    uri: str
    """
    Stability:
        experimental
    """

@jsii.implements(aws_cdk.aws_iam.IGrantable, aws_cdk.aws_ec2.IConnectable, aws_cdk.aws_stepfunctions.IStepFunctionsTask)
class SagemakerTrainTask(metaclass=jsii.JSIIMeta, jsii_type="@aws-cdk/aws-stepfunctions-tasks.SagemakerTrainTask"):
    """Class representing the SageMaker Create Training Job task.

    Stability:
        experimental
    """
    def __init__(self, scope: aws_cdk.core.Construct, *, algorithm_specification: "AlgorithmSpecification", input_data_config: typing.List["Channel"], output_data_config: "OutputDataConfig", training_job_name: str, hyperparameters: typing.Optional[typing.Mapping[str,typing.Any]]=None, resource_config: typing.Optional["ResourceConfig"]=None, role: typing.Optional[aws_cdk.aws_iam.IRole]=None, stopping_condition: typing.Optional["StoppingCondition"]=None, synchronous: typing.Optional[bool]=None, tags: typing.Optional[typing.Mapping[str,typing.Any]]=None, vpc_config: typing.Optional["VpcConfig"]=None) -> None:
        """
        Arguments:
            scope: -
            props: -
            algorithm_specification: Identifies the training algorithm to use.
            input_data_config: Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored.
            output_data_config: Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training.
            training_job_name: Training Job Name.
            hyperparameters: Hyperparameters to be used for the train job.
            resource_config: Identifies the resources, ML compute instances, and ML storage volumes to deploy for model training.
            role: Role for the Training Job. The role must be granted all necessary permissions for the SageMaker training job to be able to operate. See https://docs.aws.amazon.com/fr_fr/sagemaker/latest/dg/sagemaker-roles.html#sagemaker-roles-createtrainingjob-perms Default: - a role with appropriate permissions will be created.
            stopping_condition: Sets a time limit for training.
            synchronous: Specify if the task is synchronous or asychronous. Default: false
            tags: Tags to be applied to the train job.
            vpc_config: Specifies the VPC that you want your training job to connect to.

        Stability:
            experimental
        """
        props: SagemakerTrainTaskProps = {"algorithmSpecification": algorithm_specification, "inputDataConfig": input_data_config, "outputDataConfig": output_data_config, "trainingJobName": training_job_name}

        if hyperparameters is not None:
            props["hyperparameters"] = hyperparameters

        if resource_config is not None:
            props["resourceConfig"] = resource_config

        if role is not None:
            props["role"] = role

        if stopping_condition is not None:
            props["stoppingCondition"] = stopping_condition

        if synchronous is not None:
            props["synchronous"] = synchronous

        if tags is not None:
            props["tags"] = tags

        if vpc_config is not None:
            props["vpcConfig"] = vpc_config

        jsii.create(SagemakerTrainTask, self, [scope, props])

    @jsii.member(jsii_name="bind")
    def bind(self, task: aws_cdk.aws_stepfunctions.Task) -> aws_cdk.aws_stepfunctions.StepFunctionsTaskConfig:
        """Called when the task object is used in a workflow.

        Arguments:
            task: -

        Stability:
            experimental
        """
        return jsii.invoke(self, "bind", [task])

    @property
    @jsii.member(jsii_name="connections")
    def connections(self) -> aws_cdk.aws_ec2.Connections:
        """Allows specify security group connections for instances of this fleet.

        Stability:
            experimental
        """
        return jsii.get(self, "connections")

    @property
    @jsii.member(jsii_name="grantPrincipal")
    def grant_principal(self) -> aws_cdk.aws_iam.IPrincipal:
        """The principal to grant permissions to.

        Stability:
            experimental
        """
        return jsii.get(self, "grantPrincipal")

    @property
    @jsii.member(jsii_name="role")
    def role(self) -> aws_cdk.aws_iam.IRole:
        """The execution role for the Sagemaker training job.

        Default:
            new role for Amazon SageMaker to assume is automatically created.

        Stability:
            experimental
        """
        return jsii.get(self, "role")


@jsii.data_type_optionals(jsii_struct_bases=[])
class _SagemakerTrainTaskProps(jsii.compat.TypedDict, total=False):
    hyperparameters: typing.Mapping[str,typing.Any]
    """Hyperparameters to be used for the train job.

    Stability:
        experimental
    """
    resourceConfig: "ResourceConfig"
    """Identifies the resources, ML compute instances, and ML storage volumes to deploy for model training.

    Stability:
        experimental
    """
    role: aws_cdk.aws_iam.IRole
    """Role for the Training Job.

    The role must be granted all necessary permissions for the SageMaker training job to
    be able to operate.

    See https://docs.aws.amazon.com/fr_fr/sagemaker/latest/dg/sagemaker-roles.html#sagemaker-roles-createtrainingjob-perms

    Default:
        - a role with appropriate permissions will be created.

    Stability:
        experimental
    """
    stoppingCondition: "StoppingCondition"
    """Sets a time limit for training.

    Stability:
        experimental
    """
    synchronous: bool
    """Specify if the task is synchronous or asychronous.

    Default:
        false

    Stability:
        experimental
    """
    tags: typing.Mapping[str,typing.Any]
    """Tags to be applied to the train job.

    Stability:
        experimental
    """
    vpcConfig: "VpcConfig"
    """Specifies the VPC that you want your training job to connect to.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.SagemakerTrainTaskProps", jsii_struct_bases=[_SagemakerTrainTaskProps])
class SagemakerTrainTaskProps(_SagemakerTrainTaskProps):
    """
    Stability:
        experimental
    """
    algorithmSpecification: "AlgorithmSpecification"
    """Identifies the training algorithm to use.

    Stability:
        experimental
    """

    inputDataConfig: typing.List["Channel"]
    """Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored.

    Stability:
        experimental
    """

    outputDataConfig: "OutputDataConfig"
    """Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training.

    Stability:
        experimental
    """

    trainingJobName: str
    """Training Job Name.

    Stability:
        experimental
    """

@jsii.data_type_optionals(jsii_struct_bases=[])
class _SagemakerTransformProps(jsii.compat.TypedDict, total=False):
    batchStrategy: "BatchStrategy"
    """Number of records to include in a mini-batch for an HTTP inference request.

    Stability:
        experimental
    """
    environment: typing.Mapping[str,typing.Any]
    """Environment variables to set in the Docker container.

    Stability:
        experimental
    """
    maxConcurrentTransforms: jsii.Number
    """Maximum number of parallel requests that can be sent to each instance in a transform job.

    Stability:
        experimental
    """
    maxPayloadInMB: jsii.Number
    """Maximum allowed size of the payload, in MB.

    Stability:
        experimental
    """
    role: aws_cdk.aws_iam.IRole
    """Role for thte Training Job.

    Stability:
        experimental
    """
    synchronous: bool
    """Specify if the task is synchronous or asychronous.

    Stability:
        experimental
    """
    tags: typing.Mapping[str,typing.Any]
    """Tags to be applied to the train job.

    Stability:
        experimental
    """
    transformResources: "TransformResources"
    """ML compute instances for the transform job.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.SagemakerTransformProps", jsii_struct_bases=[_SagemakerTransformProps])
class SagemakerTransformProps(_SagemakerTransformProps):
    """
    Stability:
        experimental
    """
    modelName: str
    """Name of the model that you want to use for the transform job.

    Stability:
        experimental
    """

    transformInput: "TransformInput"
    """Dataset to be transformed and the Amazon S3 location where it is stored.

    Stability:
        experimental
    """

    transformJobName: str
    """Training Job Name.

    Stability:
        experimental
    """

    transformOutput: "TransformOutput"
    """S3 location where you want Amazon SageMaker to save the results from the transform job.

    Stability:
        experimental
    """

@jsii.implements(aws_cdk.aws_stepfunctions.IStepFunctionsTask)
class SagemakerTransformTask(metaclass=jsii.JSIIMeta, jsii_type="@aws-cdk/aws-stepfunctions-tasks.SagemakerTransformTask"):
    """Class representing the SageMaker Create Training Job task.

    Stability:
        experimental
    """
    def __init__(self, scope: aws_cdk.core.Construct, *, model_name: str, transform_input: "TransformInput", transform_job_name: str, transform_output: "TransformOutput", batch_strategy: typing.Optional["BatchStrategy"]=None, environment: typing.Optional[typing.Mapping[str,typing.Any]]=None, max_concurrent_transforms: typing.Optional[jsii.Number]=None, max_payload_in_mb: typing.Optional[jsii.Number]=None, role: typing.Optional[aws_cdk.aws_iam.IRole]=None, synchronous: typing.Optional[bool]=None, tags: typing.Optional[typing.Mapping[str,typing.Any]]=None, transform_resources: typing.Optional["TransformResources"]=None) -> None:
        """
        Arguments:
            scope: -
            props: -
            model_name: Name of the model that you want to use for the transform job.
            transform_input: Dataset to be transformed and the Amazon S3 location where it is stored.
            transform_job_name: Training Job Name.
            transform_output: S3 location where you want Amazon SageMaker to save the results from the transform job.
            batch_strategy: Number of records to include in a mini-batch for an HTTP inference request.
            environment: Environment variables to set in the Docker container.
            max_concurrent_transforms: Maximum number of parallel requests that can be sent to each instance in a transform job.
            max_payload_in_mb: Maximum allowed size of the payload, in MB.
            role: Role for thte Training Job.
            synchronous: Specify if the task is synchronous or asychronous.
            tags: Tags to be applied to the train job.
            transform_resources: ML compute instances for the transform job.

        Stability:
            experimental
        """
        props: SagemakerTransformProps = {"modelName": model_name, "transformInput": transform_input, "transformJobName": transform_job_name, "transformOutput": transform_output}

        if batch_strategy is not None:
            props["batchStrategy"] = batch_strategy

        if environment is not None:
            props["environment"] = environment

        if max_concurrent_transforms is not None:
            props["maxConcurrentTransforms"] = max_concurrent_transforms

        if max_payload_in_mb is not None:
            props["maxPayloadInMB"] = max_payload_in_mb

        if role is not None:
            props["role"] = role

        if synchronous is not None:
            props["synchronous"] = synchronous

        if tags is not None:
            props["tags"] = tags

        if transform_resources is not None:
            props["transformResources"] = transform_resources

        jsii.create(SagemakerTransformTask, self, [scope, props])

    @jsii.member(jsii_name="bind")
    def bind(self, task: aws_cdk.aws_stepfunctions.Task) -> aws_cdk.aws_stepfunctions.StepFunctionsTaskConfig:
        """Called when the task object is used in a workflow.

        Arguments:
            task: -

        Stability:
            experimental
        """
        return jsii.invoke(self, "bind", [task])

    @property
    @jsii.member(jsii_name="role")
    def role(self) -> aws_cdk.aws_iam.IRole:
        """The execution role for the Sagemaker training job.

        Default:
            new role for Amazon SageMaker to assume is automatically created.

        Stability:
            experimental
        """
        return jsii.get(self, "role")


@jsii.implements(aws_cdk.aws_stepfunctions.IStepFunctionsTask)
class SendToQueue(metaclass=jsii.JSIIMeta, jsii_type="@aws-cdk/aws-stepfunctions-tasks.SendToQueue"):
    """A StepFunctions Task to invoke a Lambda function.

    A Function can be used directly as a Resource, but this class mirrors
    integration with other AWS services via a specific class instance.

    Stability:
        experimental
    """
    def __init__(self, queue: aws_cdk.aws_sqs.IQueue, *, message_body: aws_cdk.aws_stepfunctions.TaskInput, delay: typing.Optional[aws_cdk.core.Duration]=None, message_deduplication_id: typing.Optional[str]=None, message_group_id: typing.Optional[str]=None, wait_for_task_token: typing.Optional[bool]=None) -> None:
        """
        Arguments:
            queue: -
            props: -
            message_body: The text message to send to the queue.
            delay: The length of time, in seconds, for which to delay a specific message. Valid values are 0-900 seconds. Default: Default value of the queue is used
            message_deduplication_id: The token used for deduplication of sent messages. Default: Use content-based deduplication
            message_group_id: The tag that specifies that a message belongs to a specific message group. Required for FIFO queues. FIFO ordering applies to messages in the same message group. Default: No group ID
            wait_for_task_token: Whether to pause the workflow until a task token is returned. Default: false

        Stability:
            experimental
        """
        props: SendToQueueProps = {"messageBody": message_body}

        if delay is not None:
            props["delay"] = delay

        if message_deduplication_id is not None:
            props["messageDeduplicationId"] = message_deduplication_id

        if message_group_id is not None:
            props["messageGroupId"] = message_group_id

        if wait_for_task_token is not None:
            props["waitForTaskToken"] = wait_for_task_token

        jsii.create(SendToQueue, self, [queue, props])

    @jsii.member(jsii_name="bind")
    def bind(self, _task: aws_cdk.aws_stepfunctions.Task) -> aws_cdk.aws_stepfunctions.StepFunctionsTaskConfig:
        """Called when the task object is used in a workflow.

        Arguments:
            _task: -

        Stability:
            experimental
        """
        return jsii.invoke(self, "bind", [_task])


@jsii.data_type_optionals(jsii_struct_bases=[])
class _SendToQueueProps(jsii.compat.TypedDict, total=False):
    delay: aws_cdk.core.Duration
    """The length of time, in seconds, for which to delay a specific message.

    Valid values are 0-900 seconds.

    Default:
        Default value of the queue is used

    Stability:
        experimental
    """
    messageDeduplicationId: str
    """The token used for deduplication of sent messages.

    Default:
        Use content-based deduplication

    Stability:
        experimental
    """
    messageGroupId: str
    """The tag that specifies that a message belongs to a specific message group.

    Required for FIFO queues. FIFO ordering applies to messages in the same message
    group.

    Default:
        No group ID

    Stability:
        experimental
    """
    waitForTaskToken: bool
    """Whether to pause the workflow until a task token is returned.

    Default:
        false

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.SendToQueueProps", jsii_struct_bases=[_SendToQueueProps])
class SendToQueueProps(_SendToQueueProps):
    """Properties for SendMessageTask.

    Stability:
        experimental
    """
    messageBody: aws_cdk.aws_stepfunctions.TaskInput
    """The text message to send to the queue.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.ShuffleConfig", jsii_struct_bases=[])
class ShuffleConfig(jsii.compat.TypedDict):
    """Configuration for a shuffle option for input data in a channel.

    Stability:
        experimental
    """
    seed: jsii.Number
    """Determines the shuffling order.

    Stability:
        experimental
    """

@jsii.enum(jsii_type="@aws-cdk/aws-stepfunctions-tasks.SplitType")
class SplitType(enum.Enum):
    """Method to use to split the transform job's data files into smaller batches.

    Stability:
        experimental
    """
    NONE = "NONE"
    """Input data files are not split,.

    Stability:
        experimental
    """
    LINE = "LINE"
    """Split records on a newline character boundary.

    Stability:
        experimental
    """
    RECORD_IO = "RECORD_IO"
    """Split using MXNet RecordIO format.

    Stability:
        experimental
    """
    TF_RECORD = "TF_RECORD"
    """Split using TensorFlow TFRecord format.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.StoppingCondition", jsii_struct_bases=[])
class StoppingCondition(jsii.compat.TypedDict, total=False):
    """
    Stability:
        experimental
    """
    maxRuntime: aws_cdk.core.Duration
    """The maximum length of time, in seconds, that the training or compilation job can run.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.TaskEnvironmentVariable", jsii_struct_bases=[])
class TaskEnvironmentVariable(jsii.compat.TypedDict):
    """An environment variable to be set in the container run as a task.

    Stability:
        experimental
    """
    name: str
    """Name for the environment variable.

    Exactly one of ``name`` and ``namePath`` must be specified.

    Stability:
        experimental
    """

    value: str
    """Value of the environment variable.

    Exactly one of ``value`` and ``valuePath`` must be specified.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.TransformDataSource", jsii_struct_bases=[])
class TransformDataSource(jsii.compat.TypedDict):
    """S3 location of the input data that the model can consume.

    Stability:
        experimental
    """
    s3DataSource: "TransformS3DataSource"
    """S3 location of the input data.

    Stability:
        experimental
    """

@jsii.data_type_optionals(jsii_struct_bases=[])
class _TransformInput(jsii.compat.TypedDict, total=False):
    compressionType: "CompressionType"
    """The compression type of the transform data.

    Stability:
        experimental
    """
    contentType: str
    """Multipurpose internet mail extension (MIME) type of the data.

    Stability:
        experimental
    """
    splitType: "SplitType"
    """Method to use to split the transform job's data files into smaller batches.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.TransformInput", jsii_struct_bases=[_TransformInput])
class TransformInput(_TransformInput):
    """Dataset to be transformed and the Amazon S3 location where it is stored.

    Stability:
        experimental
    """
    transformDataSource: "TransformDataSource"
    """S3 location of the channel data.

    Stability:
        experimental
    """

@jsii.data_type_optionals(jsii_struct_bases=[])
class _TransformOutput(jsii.compat.TypedDict, total=False):
    accept: str
    """MIME type used to specify the output data.

    Stability:
        experimental
    """
    assembleWith: "AssembleWith"
    """Defines how to assemble the results of the transform job as a single S3 object.

    Stability:
        experimental
    """
    encryptionKey: aws_cdk.aws_kms.Key
    """AWS KMS key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.TransformOutput", jsii_struct_bases=[_TransformOutput])
class TransformOutput(_TransformOutput):
    """S3 location where you want Amazon SageMaker to save the results from the transform job.

    Stability:
        experimental
    """
    s3OutputPath: str
    """S3 path where you want Amazon SageMaker to store the results of the transform job.

    Stability:
        experimental
    """

@jsii.data_type_optionals(jsii_struct_bases=[])
class _TransformResources(jsii.compat.TypedDict, total=False):
    volumeKmsKeyId: aws_cdk.aws_kms.Key
    """AWS KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s).

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.TransformResources", jsii_struct_bases=[_TransformResources])
class TransformResources(_TransformResources):
    """ML compute instances for the transform job.

    Stability:
        experimental
    """
    instanceCount: jsii.Number
    """Nmber of ML compute instances to use in the transform job.

    Stability:
        experimental
    """

    instanceType: aws_cdk.aws_ec2.InstanceType
    """ML compute instance type for the transform job.

    Stability:
        experimental
    """

@jsii.data_type_optionals(jsii_struct_bases=[])
class _TransformS3DataSource(jsii.compat.TypedDict, total=False):
    s3DataType: "S3DataType"
    """S3 Data Type.

    Default:
        'S3Prefix'

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.TransformS3DataSource", jsii_struct_bases=[_TransformS3DataSource])
class TransformS3DataSource(_TransformS3DataSource):
    """Location of the channel data.

    Stability:
        experimental
    """
    s3Uri: str
    """Identifies either a key name prefix or a manifest.

    Stability:
        experimental
    """

@jsii.data_type(jsii_type="@aws-cdk/aws-stepfunctions-tasks.VpcConfig", jsii_struct_bases=[])
class VpcConfig(jsii.compat.TypedDict):
    """
    Stability:
        experimental
    """
    securityGroups: typing.List[aws_cdk.aws_ec2.ISecurityGroup]
    """VPC security groups.

    Stability:
        experimental
    """

    subnets: typing.List[aws_cdk.aws_ec2.ISubnet]
    """VPC subnets.

    Stability:
        experimental
    """

    vpc: aws_cdk.aws_ec2.Vpc
    """VPC id.

    Stability:
        experimental
    """

__all__ = ["AlgorithmSpecification", "AssembleWith", "BatchStrategy", "Channel", "CommonEcsRunTaskProps", "CompressionType", "ContainerOverride", "DataSource", "DockerImage", "DockerImageConfig", "EcsRunTaskBase", "EcsRunTaskBaseProps", "ISageMakerTask", "InputMode", "InvocationType", "InvokeActivity", "InvokeActivityProps", "InvokeFunction", "InvokeFunctionProps", "MetricDefinition", "OutputDataConfig", "PublishToTopic", "PublishToTopicProps", "RecordWrapperType", "ResourceConfig", "RunEcsEc2Task", "RunEcsEc2TaskProps", "RunEcsFargateTask", "RunEcsFargateTaskProps", "RunLambdaTask", "RunLambdaTaskProps", "S3DataDistributionType", "S3DataSource", "S3DataType", "S3Location", "S3LocationBindOptions", "S3LocationConfig", "SagemakerTrainTask", "SagemakerTrainTaskProps", "SagemakerTransformProps", "SagemakerTransformTask", "SendToQueue", "SendToQueueProps", "ShuffleConfig", "SplitType", "StoppingCondition", "TaskEnvironmentVariable", "TransformDataSource", "TransformInput", "TransformOutput", "TransformResources", "TransformS3DataSource", "VpcConfig", "__jsii_assembly__"]

publication.publish()
