RunBatchJob

class aws_cdk.aws_stepfunctions_tasks.RunBatchJob(*, job_definition_arn, job_name, job_queue_arn, array_size=None, attempts=None, container_overrides=None, depends_on=None, integration_pattern=None, payload=None, timeout=None)

Bases: object

(deprecated) A Step Functions Task to run AWS Batch.

Deprecated

use BatchSubmitJob

Stability

deprecated

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ec2 as ec2
import aws_cdk.aws_stepfunctions as stepfunctions
import aws_cdk.aws_stepfunctions_tasks as stepfunctions_tasks
import aws_cdk.core as cdk

# instance_type: ec2.InstanceType
# payload: Any

run_batch_job = stepfunctions_tasks.RunBatchJob(
    job_definition_arn="jobDefinitionArn",
    job_name="jobName",
    job_queue_arn="jobQueueArn",

    # the properties below are optional
    array_size=123,
    attempts=123,
    container_overrides=stepfunctions_tasks.ContainerOverrides(
        command=["command"],
        environment={
            "environment_key": "environment"
        },
        gpu_count=123,
        instance_type=instance_type,
        memory=123,
        vcpus=123
    ),
    depends_on=[stepfunctions_tasks.JobDependency(
        job_id="jobId",
        type="type"
    )],
    integration_pattern=stepfunctions.ServiceIntegrationPattern.FIRE_AND_FORGET,
    payload={
        "payload_key": payload
    },
    timeout=cdk.Duration.minutes(30)
)
Parameters
  • job_definition_arn (str) – (deprecated) The arn of the job definition used by this job.

  • job_name (str) – (deprecated) The name of the job. The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.

  • job_queue_arn (str) – (deprecated) The arn of the job queue into which the job is submitted.

  • array_size (Union[int, float, None]) – (deprecated) The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see Array Jobs in the AWS Batch User Guide. Default: - No array size

  • attempts (Union[int, float, None]) – (deprecated) The number of times to move a job to the RUNNABLE status. You may specify between 1 and 10 attempts. If the value of attempts is greater than one, the job is retried on failure the same number of attempts as the value. Default: - 1

  • container_overrides (Optional[ContainerOverrides]) – (deprecated) A list of container overrides in JSON format that specify the name of a container in the specified job definition and the overrides it should receive. Default: - No container overrides

  • depends_on (Optional[Sequence[JobDependency]]) – (deprecated) A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. Default: - No dependencies

  • integration_pattern (Optional[ServiceIntegrationPattern]) – (deprecated) The service integration pattern indicates different ways to call TerminateCluster. The valid value is either FIRE_AND_FORGET or SYNC. Default: SYNC

  • payload (Optional[Mapping[str, Any]]) – (deprecated) The payload to be passed as parametrs to the batch job. Default: - No parameters are passed

  • timeout (Optional[Duration]) – (deprecated) The timeout configuration for this SubmitJob operation. The minimum value for the timeout is 60 seconds. Default: - No timeout

Stability

deprecated

Methods

bind(_task)

(deprecated) Called when the task object is used in a workflow.

Parameters

_task (Task) –

Stability

deprecated

Return type

StepFunctionsTaskConfig