DeadlineCloud / Client / batch_update_job

batch_update_job

DeadlineCloud.Client.batch_update_job(**kwargs)

Updates multiple jobs in a single request. This is a batch version of the UpdateJob API.

The result of updating each job is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

When you change the status of a job to ARCHIVED, the job can’t be scheduled or archived.

Warning

An archived job and its steps and tasks are deleted after 120 days. The job can’t be recovered.

See also: AWS API Documentation

Request Syntax

response = client.batch_update_job(
    clientToken='string',
    jobs=[
        {
            'farmId': 'string',
            'queueId': 'string',
            'jobId': 'string',
            'targetTaskRunStatus': 'READY'|'FAILED'|'SUCCEEDED'|'CANCELED'|'SUSPENDED'|'PENDING',
            'priority': 123,
            'maxFailedTasksCount': 123,
            'maxRetriesPerTask': 123,
            'lifecycleStatus': 'ARCHIVED',
            'maxWorkerCount': 123,
            'name': 'string',
            'description': 'string'
        },
    ]
)
Parameters:
  • clientToken (string) –

    The unique token which the server uses to recognize retries of the same request.

    This field is autopopulated if not provided.

  • jobs (list) –

    [REQUIRED]

    The list of jobs to update. You can specify up to 100 jobs per request.

    • (dict) –

      The details of a job to update in a batch update operation.

      • farmId (string) – [REQUIRED]

        The farm ID of the job to update.

      • queueId (string) – [REQUIRED]

        The queue ID of the job to update.

      • jobId (string) – [REQUIRED]

        The job ID of the job to update.

      • targetTaskRunStatus (string) –

        The task status to update the job’s tasks to.

      • priority (integer) –

        The job priority to update.

      • maxFailedTasksCount (integer) –

        The number of task failures before the job stops running and is marked as FAILED.

      • maxRetriesPerTask (integer) –

        The maximum number of retries per failed tasks.

      • lifecycleStatus (string) –

        The status of a job in its lifecycle. When you change the status of the job to ARCHIVED, the job can’t be scheduled or archived.

        Warning

        An archived job and its steps and tasks are deleted after 120 days. The job can’t be recovered.

      • maxWorkerCount (integer) –

        The maximum number of worker hosts that can concurrently process a job.

      • name (string) –

        The name of the job to update.

      • description (string) –

        The description of the job to update.

Return type:

dict

Returns:

Response Syntax

{
    'errors': [
        {
            'farmId': 'string',
            'queueId': 'string',
            'jobId': 'string',
            'code': 'ConflictException'|'InternalServerErrorException'|'ResourceNotFoundException'|'ValidationException'|'AccessDeniedException'|'ThrottlingException',
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • errors (list) –

      A list of errors for jobs that could not be updated.

      • (dict) –

        The error details for a job that could not be updated in a batch update operation.

        • farmId (string) –

          The farm ID of the job that could not be updated.

        • queueId (string) –

          The queue ID of the job that could not be updated.

        • jobId (string) –

          The job ID of the job that could not be updated.

        • code (string) –

          The error code.

        • message (string) –

          The error message.

Exceptions