drs / Paginator / DescribeJobs

DescribeJobs#

class drs.Paginator.DescribeJobs#
paginator = client.get_paginator('describe_jobs')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from drs.Client.describe_jobs().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    filters={
        'fromDate': 'string',
        'jobIDs': [
            'string',
        ],
        'toDate': 'string'
    },
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • filters (dict) –

    A set of filters by which to return Jobs.

    • fromDate (string) –

      The start date in a date range query.

    • jobIDs (list) –

      An array of Job IDs that should be returned. An empty array means all jobs.

      • (string) –

    • toDate (string) –

      The end date in a date range query.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'items': [
        {
            'arn': 'string',
            'creationDateTime': 'string',
            'endDateTime': 'string',
            'initiatedBy': 'START_RECOVERY'|'START_DRILL'|'FAILBACK'|'DIAGNOSTIC'|'TERMINATE_RECOVERY_INSTANCES'|'TARGET_ACCOUNT'|'CREATE_NETWORK_RECOVERY'|'UPDATE_NETWORK_RECOVERY'|'ASSOCIATE_NETWORK_RECOVERY',
            'jobID': 'string',
            'participatingResources': [
                {
                    'launchStatus': 'PENDING'|'IN_PROGRESS'|'LAUNCHED'|'FAILED'|'TERMINATED',
                    'participatingResourceID': {
                        'sourceNetworkID': 'string'
                    }
                },
            ],
            'participatingServers': [
                {
                    'launchActionsStatus': {
                        'runs': [
                            {
                                'action': {
                                    'actionCode': 'string',
                                    'actionId': 'string',
                                    'actionVersion': 'string',
                                    'active': True|False,
                                    'category': 'MONITORING'|'VALIDATION'|'CONFIGURATION'|'SECURITY'|'OTHER',
                                    'description': 'string',
                                    'name': 'string',
                                    'optional': True|False,
                                    'order': 123,
                                    'parameters': {
                                        'string': {
                                            'type': 'SSM_STORE'|'DYNAMIC',
                                            'value': 'string'
                                        }
                                    },
                                    'type': 'SSM_AUTOMATION'|'SSM_COMMAND'
                                },
                                'failureReason': 'string',
                                'runId': 'string',
                                'status': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED'
                            },
                        ],
                        'ssmAgentDiscoveryDatetime': 'string'
                    },
                    'launchStatus': 'PENDING'|'IN_PROGRESS'|'LAUNCHED'|'FAILED'|'TERMINATED',
                    'recoveryInstanceID': 'string',
                    'sourceServerID': 'string'
                },
            ],
            'status': 'PENDING'|'STARTED'|'COMPLETED',
            'tags': {
                'string': 'string'
            },
            'type': 'LAUNCH'|'TERMINATE'|'CREATE_CONVERTED_SNAPSHOT'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • items (list) –

      An array of Jobs.

      • (dict) –

        A job is an asynchronous workflow.

        • arn (string) –

          The ARN of a Job.

        • creationDateTime (string) –

          The date and time of when the Job was created.

        • endDateTime (string) –

          The date and time of when the Job ended.

        • initiatedBy (string) –

          A string representing who initiated the Job.

        • jobID (string) –

          The ID of the Job.

        • participatingResources (list) –

          A list of resources that the Job is acting upon.

          • (dict) –

            Represents a resource participating in an asynchronous Job.

            • launchStatus (string) –

              The launch status of a participating resource.

            • participatingResourceID (dict) –

              The ID of a participating resource.

              Note

              This is a Tagged Union structure. Only one of the following top level keys will be set: sourceNetworkID. 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'}
              
              • sourceNetworkID (string) –

                Source Network ID.

        • participatingServers (list) –

          A list of servers that the Job is acting upon.

          • (dict) –

            Represents a server participating in an asynchronous Job.

            • launchActionsStatus (dict) –

              The post-launch action runs of a participating server.

              • runs (list) –

                List of post launch action status.

                • (dict) –

                  Launch action run.

                  • action (dict) –

                    Action.

                    • actionCode (string) –

                      Launch action code.

                    • actionId (string) –

                      Launch action Id.

                    • actionVersion (string) –

                      Launch action version.

                    • active (boolean) –

                      Whether the launch action is active.

                    • category (string) –

                      Launch action category.

                    • description (string) –

                      Launch action description.

                    • name (string) –

                      Launch action name.

                    • optional (boolean) –

                      Whether the launch will not be marked as failed if this action fails.

                    • order (integer) –

                      Launch action order.

                    • parameters (dict) –

                      Launch action parameters.

                      • (string) –

                        • (dict) –

                          Launch action parameter.

                          • type (string) –

                            Type.

                          • value (string) –

                            Value.

                    • type (string) –

                      Launch action type.

                  • failureReason (string) –

                    Failure reason.

                  • runId (string) –

                    Run Id.

                  • status (string) –

                    Run status.

              • ssmAgentDiscoveryDatetime (string) –

                Time where the AWS Systems Manager was detected as running on the launched instance.

            • launchStatus (string) –

              The launch status of a participating server.

            • recoveryInstanceID (string) –

              The Recovery Instance ID of a participating server.

            • sourceServerID (string) –

              The Source Server ID of a participating server.

        • status (string) –

          The status of the Job.

        • tags (dict) –

          A list of tags associated with the Job.

          • (string) –

            • (string) –

        • type (string) –

          The type of the Job.

    • NextToken (string) –

      A token to resume pagination.