DeadlineCloud / Client / batch_get_job

batch_get_job

DeadlineCloud.Client.batch_get_job(**kwargs)

Retrieves multiple jobs in a single request. This is a batch version of the GetJob API.

The result of getting 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.

See also: AWS API Documentation

Request Syntax

response = client.batch_get_job(
    identifiers=[
        {
            'farmId': 'string',
            'queueId': 'string',
            'jobId': 'string'
        },
    ]
)
Parameters:

identifiers (list) –

[REQUIRED]

The list of job identifiers to retrieve. You can specify up to 100 identifiers per request.

  • (dict) –

    The identifiers for a job.

    • farmId (string) – [REQUIRED]

      The farm ID of the job.

    • queueId (string) – [REQUIRED]

      The queue ID of the job.

    • jobId (string) – [REQUIRED]

      The job ID.

Return type:

dict

Returns:

Response Syntax

{
    'jobs': [
        {
            'farmId': 'string',
            'queueId': 'string',
            'jobId': 'string',
            'name': 'string',
            'lifecycleStatus': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'UPLOAD_IN_PROGRESS'|'UPLOAD_FAILED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED'|'UPDATE_SUCCEEDED'|'ARCHIVED',
            'lifecycleStatusMessage': 'string',
            'priority': 123,
            'createdAt': datetime(2015, 1, 1),
            'createdBy': 'string',
            'updatedAt': datetime(2015, 1, 1),
            'updatedBy': 'string',
            'startedAt': datetime(2015, 1, 1),
            'endedAt': datetime(2015, 1, 1),
            'taskRunStatus': 'PENDING'|'READY'|'ASSIGNED'|'STARTING'|'SCHEDULED'|'INTERRUPTING'|'RUNNING'|'SUSPENDED'|'CANCELED'|'FAILED'|'SUCCEEDED'|'NOT_COMPATIBLE',
            'targetTaskRunStatus': 'READY'|'FAILED'|'SUCCEEDED'|'CANCELED'|'SUSPENDED'|'PENDING',
            'taskRunStatusCounts': {
                'string': 123
            },
            'taskFailureRetryCount': 123,
            'storageProfileId': 'string',
            'maxFailedTasksCount': 123,
            'maxRetriesPerTask': 123,
            'parameters': {
                'string': {
                    'int': 'string',
                    'float': 'string',
                    'string': 'string',
                    'path': 'string'
                }
            },
            'attachments': {
                'manifests': [
                    {
                        'fileSystemLocationName': 'string',
                        'rootPath': 'string',
                        'rootPathFormat': 'windows'|'posix',
                        'outputRelativeDirectories': [
                            'string',
                        ],
                        'inputManifestPath': 'string',
                        'inputManifestHash': 'string'
                    },
                ],
                'fileSystem': 'COPIED'|'VIRTUAL'
            },
            'description': 'string',
            'maxWorkerCount': 123,
            'sourceJobId': 'string'
        },
    ],
    'errors': [
        {
            'farmId': 'string',
            'queueId': 'string',
            'jobId': 'string',
            'code': 'InternalServerErrorException'|'ResourceNotFoundException'|'ValidationException'|'AccessDeniedException'|'ThrottlingException',
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • jobs (list) –

      A list of jobs that were successfully retrieved.

      • (dict) –

        The details of a job returned in a batch get operation.

        • farmId (string) –

          The farm ID of the job.

        • queueId (string) –

          The queue ID of the job.

        • jobId (string) –

          The job ID.

        • name (string) –

          The name of the job.

        • lifecycleStatus (string) –

          The life cycle status of the job.

        • lifecycleStatusMessage (string) –

          A message that communicates the status of the life cycle.

        • priority (integer) –

          The job priority.

        • createdAt (datetime) –

          The date and time the resource was created.

        • createdBy (string) –

          The user or system that created this resource.

        • updatedAt (datetime) –

          The date and time the resource was updated.

        • updatedBy (string) –

          The user or system that updated this resource.

        • startedAt (datetime) –

          The date and time the resource started running.

        • endedAt (datetime) –

          The date and time the resource ended running.

        • taskRunStatus (string) –

          The task run status for the job.

        • targetTaskRunStatus (string) –

          The task status to start with on the job.

        • taskRunStatusCounts (dict) –

          The number of tasks for each run status for the job.

          • (string) –

            • (integer) –

        • taskFailureRetryCount (integer) –

          The number of times that tasks failed and were retried.

        • storageProfileId (string) –

          The storage profile ID associated with the job.

        • 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.

        • parameters (dict) –

          The parameters for the job.

          • (string) –

            • (dict) –

              The details of job parameters.

              Note

              This is a Tagged Union structure. Only one of the following top level keys will be set: int, float, string, path. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

              'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
              
              • int (string) –

                A signed integer represented as a string.

              • float (string) –

                A double precision IEEE-754 floating point number represented as a string.

              • string (string) –

                A UTF-8 string.

              • path (string) –

                A file system path represented as a string.

        • attachments (dict) –

          The attachments for the job.

          • manifests (list) –

            The manifest properties for the attachments.

            • (dict) –

              The details of the manifest that links a job’s source information.

              • fileSystemLocationName (string) –

                The file system location name.

              • rootPath (string) –

                The file’s root path.

              • rootPathFormat (string) –

                The format of the root path.

              • outputRelativeDirectories (list) –

                The file path relative to the directory.

                • (string) –

              • inputManifestPath (string) –

                The file path.

              • inputManifestHash (string) –

                The hash value of the file.

          • fileSystem (string) –

            The file system location for the attachments.

        • description (string) –

          The description of the job.

        • maxWorkerCount (integer) –

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

        • sourceJobId (string) –

          The job ID for the source job.

    • errors (list) –

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

      • (dict) –

        The error details for a job that could not be retrieved in a batch get operation.

        • farmId (string) –

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

        • queueId (string) –

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

        • jobId (string) –

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

        • code (string) –

          The error code.

        • message (string) –

          The error message.

Exceptions

  • DeadlineCloud.Client.exceptions.AccessDeniedException

  • DeadlineCloud.Client.exceptions.InternalServerErrorException

  • DeadlineCloud.Client.exceptions.ThrottlingException

  • DeadlineCloud.Client.exceptions.ValidationException