Skip to content

Batch Model

Data models for AWS Batch operations.


AWS Batch job models.

Defines the request and response models for creating and managing AWS Batch job definitions and submissions.

CreateDefinitionAndPrepareArgsRequest dataclass

CreateDefinitionAndPrepareArgsRequest(
    image=custom_field(),
    job_definition_name=custom_field(),
    job_queue_name=custom_field(),
    job_role_arn=custom_field(default=None),
    job_name=custom_field(default=None),
    command=custom_field(default_factory=list),
    environment=custom_field(default_factory=dict),
    job_definition_tags=custom_field(default_factory=dict),
    resource_requirements=custom_field(
        default_factory=list,
        mm_field=(
            UnionField(
                [
                    (list, ListField(DictField)),
                    (
                        ResourceRequirements,
                        ResourceRequirements.as_mm_field(),
                    ),
                ]
            )
        ),
    ),
    mount_points=custom_field(default_factory=list),
    volumes=custom_field(default_factory=list),
    retry_strategy=custom_field(default=None),
    privileged=custom_field(default=False),
)

Bases: SchemaModel

Request for creating a batch job definition and preparing submission args.

Attributes:

Name Type Description
image str

Docker image URI for the job.

job_definition_name str

Name for the job definition.

job_queue_name str

Name of the job queue to submit to.

job_role_arn Optional[str]

Optional IAM role ARN for the job.

job_name Optional[str]

Optional name for the submitted job.

command List[str]

Command to run in the container.

environment Dict[str, str]

Environment variables for the container.

job_definition_tags Dict[str, str]

Tags to apply to the job definition.

resource_requirements Union[List[ResourceRequirementTypeDef], ResourceRequirements]

CPU, memory, and GPU requirements.

mount_points List[MountPointTypeDef]

EFS/volume mount points.

volumes List[VolumeTypeDef]

Volume definitions.

retry_strategy Optional[RetryStrategyTypeDef]

Job retry configuration.

privileged bool

Whether to run in privileged mode.

CreateDefinitionAndPrepareArgsResponse dataclass

CreateDefinitionAndPrepareArgsResponse(
    job_name=custom_field(),
    job_definition_arn=custom_field(),
    job_queue_arn=custom_field(),
    parameters=custom_field(),
    container_overrides=custom_field(),
)

Bases: SchemaModel

Response from creating a batch job definition.

Contains the prepared arguments for submitting the batch job.

Attributes:

Name Type Description
job_name str

Name for the submitted job.

job_definition_arn Optional[str]

ARN of the created job definition.

job_queue_arn str

ARN of the job queue.

parameters Dict[str, Any]

Job parameters for submission.

container_overrides Dict[str, Any]

Container override settings.