list_cluster_jobs

Snowball.Client.list_cluster_jobs(**kwargs)

Returns an array of JobListEntry objects of the specified length. Each JobListEntry object is for a job in the specified cluster and contains a job's state, a job's ID, and other information.

See also: AWS API Documentation

Request Syntax

response = client.list_cluster_jobs(
    ClusterId='string',
    MaxResults=123,
    NextToken='string'
)
Parameters
  • ClusterId (string) --

    [REQUIRED]

    The 39-character ID for the cluster that you want to list, for example CID123e4567-e89b-12d3-a456-426655440000 .

  • MaxResults (integer) -- The number of JobListEntry objects to return.
  • NextToken (string) -- HTTP requests are stateless. To identify what object comes "next" in the list of JobListEntry objects, you have the option of specifying NextToken as the starting point for your returned list.
Return type

dict

Returns

Response Syntax

{
    'JobListEntries': [
        {
            'JobId': 'string',
            'JobState': 'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWSSortingFacility'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
            'IsMaster': True|False,
            'JobType': 'IMPORT'|'EXPORT'|'LOCAL_USE',
            'SnowballType': 'STANDARD'|'EDGE'|'EDGE_C'|'EDGE_CG'|'EDGE_S'|'SNC1_HDD'|'SNC1_SSD'|'V3_5C',
            'CreationDate': datetime(2015, 1, 1),
            'Description': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • JobListEntries (list) --

      Each JobListEntry object contains a job's state, a job's ID, and a value that indicates whether the job is a job part, in the case of export jobs.

      • (dict) --

        Each JobListEntry object contains a job's state, a job's ID, and a value that indicates whether the job is a job part, in the case of an export job.

        • JobId (string) --

          The automatically generated ID for a job, for example JID123e4567-e89b-12d3-a456-426655440000 .

        • JobState (string) --

          The current state of this job.

        • IsMaster (boolean) --

          A value that indicates that this job is a main job. A main job represents a successful request to create an export job. Main jobs aren't associated with any Snowballs. Instead, each main job will have at least one job part, and each job part is associated with a Snowball. It might take some time before the job parts associated with a particular main job are listed, because they are created after the main job is created.

        • JobType (string) --

          The type of job.

        • SnowballType (string) --

          The type of device used with this job.

        • CreationDate (datetime) --

          The creation date for this job.

        • Description (string) --

          The optional description of this specific job, for example Important Photos 2016-08-11 .

    • NextToken (string) --

      HTTP requests are stateless. If you use the automatically generated NextToken value in your next ListClusterJobsResult call, your list of returned jobs will start from this point in the array.

Exceptions

  • Snowball.Client.exceptions.InvalidResourceException
  • Snowball.Client.exceptions.InvalidNextTokenException

Examples

Returns an array of JobListEntry objects of the specified length. Each JobListEntry object is for a job in the specified cluster and contains a job's state, a job's ID, and other information.

response = client.list_cluster_jobs(
    ClusterId='CID123e4567-e89b-12d3-a456-426655440000',
)

print(response)

Expected Output:

{
    'JobListEntries': [
        {
            'CreationDate': datetime(2016, 11, 30, 3, 12, 4, 2, 335, 0),
            'Description': 'MyClustrer-node-001',
            'IsMaster': False,
            'JobId': 'JID123e4567-e89b-12d3-a456-426655440000',
            'JobState': 'New',
            'JobType': 'LOCAL_USE',
            'SnowballType': 'EDGE',
        },
        {
            'CreationDate': datetime(2016, 11, 30, 3, 12, 5, 2, 335, 0),
            'Description': 'MyClustrer-node-002',
            'IsMaster': False,
            'JobId': 'JID123e4567-e89b-12d3-a456-426655440001',
            'JobState': 'New',
            'JobType': 'LOCAL_USE',
            'SnowballType': 'EDGE',
        },
        {
            'CreationDate': datetime(2016, 11, 30, 3, 12, 5, 2, 335, 0),
            'Description': 'MyClustrer-node-003',
            'IsMaster': False,
            'JobId': 'JID123e4567-e89b-12d3-a456-426655440002',
            'JobState': 'New',
            'JobType': 'LOCAL_USE',
            'SnowballType': 'EDGE',
        },
        {
            'CreationDate': datetime(2016, 11, 30, 3, 12, 5, 2, 335, 0),
            'Description': 'MyClustrer-node-004',
            'IsMaster': False,
            'JobId': 'JID123e4567-e89b-12d3-a456-426655440003',
            'JobState': 'New',
            'JobType': 'LOCAL_USE',
            'SnowballType': 'EDGE',
        },
        {
            'CreationDate': datetime(2016, 11, 30, 3, 12, 5, 2, 335, 0),
            'Description': 'MyClustrer-node-005',
            'IsMaster': False,
            'JobId': 'JID123e4567-e89b-12d3-a456-426655440004',
            'JobState': 'New',
            'JobType': 'LOCAL_USE',
            'SnowballType': 'EDGE',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}