Cargo

Table of Contents

Client

class Cargo.Client

A client object representing ‘Cargo’ Service:

import almdrlib

client = almdrlib.client('cargo')

Available methods:

list_execution_records(**kwargs)

List execution records for given account_id

Request Syntax

response = client.list_execution_records(
    account_id='string'
    continuation='string'
    end_time='number'
    latest_only='False|True'
    limit='integer'
    order='asc'|'desc'
    schedule_id='string'
    start_time='number'
    status='scheduled'|'running'|'cancelled'|'failed'|'completed'
    type='tableau'|'search'|'search_v2'
)
Parameters
  • account_id (string) –

    [REQUIRED]

    AIMS Account Id

  • continuation (string) –

  • end_time (number) –

  • latest_only (boolean) – Default: False

  • limit (integer) – Default: 100

  • order (string) –

    Valid values: asc, desc

    Default: desc

  • schedule_id (string) –

  • start_time (number) –

  • status (string) – Valid values: scheduled, running, cancelled, failed, completed

  • type (string) – Valid values: tableau, search, search_v2

Return type

dict

Returns

Response Syntax

{
    'continuation': 'string',
    'execution_records': [
        {
            'account_id': 'string',
            'artifact_data': {},
            'created': {
                'at': 'integer',
                'by': 'string'
            },
            'definition': {},
            'delete_empty_result': 'False|True',
            'id': 'string',
            'modified': {
                'at': 'integer',
                'by': 'string'
            },
            'name': 'string',
            'notify_behavior': 'always'|'never'|'ifnotempty',
            'publish_result': {},
            'published': 'False|True',
            'retry': 'integer',
            'run_once': 'False|True',
            'schedule': 'dict|string',
            'schedule_id': 'string',
            'scheduled_time': 'integer',
            'status': 'scheduled'|'running'|'cancelled'|'failed'|'completed',
            'type': 'tableau'|'search'|'search_v2'
        }
    ]
}

Response Definitions

  • continuation (string) –

  • execution_records (list) –

    • (dict) –

      • account_id (string) –

      • artifact_data (dict) –

      • created (dict) –

        • at (integer) –

        • by (string) –

      • definition (dict) –

      • delete_empty_result (boolean) –

      • id (string) –

      • modified (dict) –

        • at (integer) –

        • by (string) –

      • name (string) –

      • notify_behavior (string) –

        Valid values: always, never, ifnotempty

      • publish_result (dict) –

      • published (boolean) –

      • retry (integer) –

      • run_once (boolean) –

      • schedule (dict) –

      • schedule_id (string) –

      • scheduled_time (integer) –

      • status (string) –

        Valid values: scheduled, running, cancelled, failed, completed

      • type (string) –

        Valid values: tableau, search, search_v2

list_schedules(**kwargs)

Get list of schedules for given account_id. If type parameter is not specfied, returns all schedules for account

Request Syntax

response = client.list_schedules(
    account_id='string'
    type='tableau'|'search'|'search_v2'
)
Parameters
  • account_id (string) –

    [REQUIRED]

    AIMS Account Id

  • type (string) – Valid values: tableau, search, search_v2

Return type

dict

Returns

Response Syntax

{
    'schedules': [
        {
            'account_id': 'string',
            'created': {
                'at': 'number',
                'by': 'string'
            },
            'definition': {},
            'delete_empty_result': 'False|True',
            'id': 'string',
            'is_active': 'False|True',
            'latest_schedule': 'number',
            'modified': {
                'at': 'number',
                'by': 'string'
            },
            'name': 'string',
            'notify_behavior': 'always'|'never'|'ifnotempty',
            'schedule': 'dict|string',
            'type': 'tableau'|'search'|'search_v2'
        }
    ]
}

Response Definitions

  • schedules (list) –

    • (dict) –

      • account_id (string) –

      • created (dict) –

        • at (number) –

        • by (string) –

      • definition (dict) –

      • delete_empty_result (boolean) –

      • id (string) –

      • is_active (boolean) –

      • latest_schedule (number) –

      • modified (dict) –

        • at (number) –

        • by (string) –

      • name (string) –

      • notify_behavior (string) –

        Valid values: always, never, ifnotempty

      • schedule (dict) –

      • type (string) –

        Valid values: tableau, search, search_v2

rerun_execution_record(**kwargs)

Re-run execution record for given account_id and exec_id

Request Syntax

response = client.rerun_execution_record(
    account_id='string'
    exec_id='string'
)
Parameters
  • account_id (string) –

    [REQUIRED]

    AIMS Account Id

  • exec_id (string) – [REQUIRED]

Returns

None

rerun_execution_records(**kwargs)

Re-run multiple execution records for given account_id and exec_ids

Request Syntax

response = client.rerun_execution_records(
    account_id='string'
    ids='string'
)
Parameters
  • account_id (string) –

    [REQUIRED]

    AIMS Account Id

  • ids (string) – [REQUIRED]

Returns

None