AWSMainframeModernization

2023/01/25 - AWSMainframeModernization - 2 updated api methods

Changes  Add returnCode, batchJobIdentifier in GetBatchJobExecution response, for user to view the batch job execution result & unique identifier from engine. Also removed unused headers from REST APIs

GetBatchJobExecution (updated) Link ¶
Changes (response)
{'batchJobIdentifier': {'fileBatchJobIdentifier': {'fileName': 'string',
                                                   'folderPath': 'string'},
                        'scriptBatchJobIdentifier': {'scriptName': 'string'}},
 'returnCode': 'string'}

Gets the details of a specific batch job execution for a specific application.

See also: AWS API Documentation

Request Syntax

client.get_batch_job_execution(
    applicationId='string',
    executionId='string'
)
type applicationId:

string

param applicationId:

[REQUIRED]

The identifier of the application.

type executionId:

string

param executionId:

[REQUIRED]

The unique identifier of the batch job execution.

rtype:

dict

returns:

Response Syntax

{
    'applicationId': 'string',
    'batchJobIdentifier': {
        'fileBatchJobIdentifier': {
            'fileName': 'string',
            'folderPath': 'string'
        },
        'scriptBatchJobIdentifier': {
            'scriptName': 'string'
        }
    },
    'endTime': datetime(2015, 1, 1),
    'executionId': 'string',
    'jobId': 'string',
    'jobName': 'string',
    'jobType': 'VSE'|'JES2'|'JES3',
    'jobUser': 'string',
    'returnCode': 'string',
    'startTime': datetime(2015, 1, 1),
    'status': 'Submitting'|'Holding'|'Dispatching'|'Running'|'Cancelling'|'Cancelled'|'Succeeded'|'Failed'|'Succeeded With Warning',
    'statusReason': 'string'
}

Response Structure

  • (dict) --

    • applicationId (string) --

      The identifier of the application.

    • batchJobIdentifier (dict) --

      Identifies a specific batch job.

      • fileBatchJobIdentifier (dict) --

        Specifies a file associated with a specific batch job.

        • fileName (string) --

          The file name for the batch job identifier.

        • folderPath (string) --

          The relative path to the file name for the batch job identifier.

      • scriptBatchJobIdentifier (dict) --

        A batch job identifier in which the batch job to run is identified by the script name.

        • scriptName (string) --

          The name of the script containing the batch job definition.

    • endTime (datetime) --

      The timestamp when the batch job execution ended.

    • executionId (string) --

      The unique identifier for this batch job execution.

    • jobId (string) --

      The unique identifier for this batch job.

    • jobName (string) --

      The name of this batch job.

    • jobType (string) --

      The type of job.

    • jobUser (string) --

      The user for the job.

    • returnCode (string) --

    • startTime (datetime) --

      The timestamp when the batch job execution started.

    • status (string) --

      The status of the batch job execution.

    • statusReason (string) --

      The reason for the reported status.

ListBatchJobExecutions (updated) Link ¶
Changes (response)
{'batchJobExecutions': {'batchJobIdentifier': {'fileBatchJobIdentifier': {'fileName': 'string',
                                                                          'folderPath': 'string'},
                                               'scriptBatchJobIdentifier': {'scriptName': 'string'}},
                        'returnCode': 'string'}}

Lists historical, current, and scheduled batch job executions for a specific application.

See also: AWS API Documentation

Request Syntax

client.list_batch_job_executions(
    applicationId='string',
    executionIds=[
        'string',
    ],
    jobName='string',
    maxResults=123,
    nextToken='string',
    startedAfter=datetime(2015, 1, 1),
    startedBefore=datetime(2015, 1, 1),
    status='Submitting'|'Holding'|'Dispatching'|'Running'|'Cancelling'|'Cancelled'|'Succeeded'|'Failed'|'Succeeded With Warning'
)
type applicationId:

string

param applicationId:

[REQUIRED]

The unique identifier of the application.

type executionIds:

list

param executionIds:

The unique identifier of each batch job execution.

  • (string) --

type jobName:

string

param jobName:

The name of each batch job execution.

type maxResults:

integer

param maxResults:

The maximum number of batch job executions to return.

type nextToken:

string

param nextToken:

A pagination token to control the number of batch job executions displayed in the list.

type startedAfter:

datetime

param startedAfter:

The time after which the batch job executions started.

type startedBefore:

datetime

param startedBefore:

The time before the batch job executions started.

type status:

string

param status:

The status of the batch job executions.

rtype:

dict

returns:

Response Syntax

{
    'batchJobExecutions': [
        {
            'applicationId': 'string',
            'batchJobIdentifier': {
                'fileBatchJobIdentifier': {
                    'fileName': 'string',
                    'folderPath': 'string'
                },
                'scriptBatchJobIdentifier': {
                    'scriptName': 'string'
                }
            },
            'endTime': datetime(2015, 1, 1),
            'executionId': 'string',
            'jobId': 'string',
            'jobName': 'string',
            'jobType': 'VSE'|'JES2'|'JES3',
            'returnCode': 'string',
            'startTime': datetime(2015, 1, 1),
            'status': 'Submitting'|'Holding'|'Dispatching'|'Running'|'Cancelling'|'Cancelled'|'Succeeded'|'Failed'|'Succeeded With Warning'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • batchJobExecutions (list) --

      Returns a list of batch job executions for an application.

      • (dict) --

        A subset of the possible batch job attributes. Used in the batch job list.

        • applicationId (string) --

          The unique identifier of the application that hosts this batch job.

        • batchJobIdentifier (dict) --

          Identifies a specific batch job.

          • fileBatchJobIdentifier (dict) --

            Specifies a file associated with a specific batch job.

            • fileName (string) --

              The file name for the batch job identifier.

            • folderPath (string) --

              The relative path to the file name for the batch job identifier.

          • scriptBatchJobIdentifier (dict) --

            A batch job identifier in which the batch job to run is identified by the script name.

            • scriptName (string) --

              The name of the script containing the batch job definition.

        • endTime (datetime) --

          The timestamp when this batch job execution ended.

        • executionId (string) --

          The unique identifier of this execution of the batch job.

        • jobId (string) --

          The unique identifier of a particular batch job.

        • jobName (string) --

          The name of a particular batch job.

        • jobType (string) --

          The type of a particular batch job execution.

        • returnCode (string) --

        • startTime (datetime) --

          The timestamp when a particular batch job execution started.

        • status (string) --

          The status of a particular batch job execution.

    • nextToken (string) --

      A pagination token that's returned when the response doesn't contain all batch job executions.