ImportExport

Table of Contents

Client

class ImportExport.Client

A low-level client representing AWS Import/Export AWS Import/Export accelerates transferring large amounts of data between the AWS cloud and portable storage devices that you mail to us. AWS Import/Export transfers data directly onto and off of your storage devices using Amazon's high-speed internal network and bypassing the Internet. For large data sets, AWS Import/Export is often faster than Internet transfer and more cost effective than upgrading your connectivity.:

import boto3

client = boto3.client('importexport')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
cancel_job(**kwargs)

This operation cancels a specified job. Only the job owner can cancel it. The operation fails if the job has already started or is complete.

See also: AWS API Documentation

Request Syntax

response = client.cancel_job(
    JobId='string',
    APIVersion='string'
)
Parameters
  • JobId (string) -- [REQUIRED] A unique identifier which refers to a particular job.
  • APIVersion (string) -- Specifies the version of the client tool.
Return type

dict

Returns

Response Syntax

{
    'Success': True|False
}

Response Structure

  • (dict) -- Output structure for the CancelJob operation.
    • Success (boolean) -- Specifies whether (true) or not (false) AWS Import/Export updated your job.

Exceptions

  • ImportExport.Client.exceptions.InvalidJobIdException
  • ImportExport.Client.exceptions.ExpiredJobIdException
  • ImportExport.Client.exceptions.CanceledJobIdException
  • ImportExport.Client.exceptions.UnableToCancelJobIdException
  • ImportExport.Client.exceptions.InvalidAccessKeyIdException
  • ImportExport.Client.exceptions.InvalidVersionException
close()

Closes underlying endpoint connections.

create_job(**kwargs)

This operation initiates the process of scheduling an upload or download of your data. You include in the request a manifest that describes the data transfer specifics. The response to the request includes a job ID, which you can use in other operations, a signature that you use to identify your storage device, and the address where you should ship your storage device.

See also: AWS API Documentation

Request Syntax

response = client.create_job(
    JobType='Import'|'Export',
    Manifest='string',
    ManifestAddendum='string',
    ValidateOnly=True|False,
    APIVersion='string'
)
Parameters
  • JobType (string) -- [REQUIRED] Specifies whether the job to initiate is an import or export job.
  • Manifest (string) -- [REQUIRED] The UTF-8 encoded text of the manifest file.
  • ManifestAddendum (string) -- For internal use only.
  • ValidateOnly (boolean) -- [REQUIRED] Validate the manifest and parameter values in the request but do not actually create a job.
  • APIVersion (string) -- Specifies the version of the client tool.
Return type

dict

Returns

Response Syntax

{
    'JobId': 'string',
    'JobType': 'Import'|'Export',
    'Signature': 'string',
    'SignatureFileContents': 'string',
    'WarningMessage': 'string',
    'ArtifactList': [
        {
            'Description': 'string',
            'URL': 'string'
        },
    ]
}

Response Structure

  • (dict) -- Output structure for the CreateJob operation.
    • JobId (string) -- A unique identifier which refers to a particular job.
    • JobType (string) -- Specifies whether the job to initiate is an import or export job.
    • Signature (string) -- An encrypted code used to authenticate the request and response, for example, "DV+TpDfx1/TdSE9ktyK9k/bDTVI=". Only use this value is you want to create the signature file yourself. Generally you should use the SignatureFileContents value.
    • SignatureFileContents (string) -- The actual text of the SIGNATURE file to be written to disk.
    • WarningMessage (string) -- An optional message notifying you of non-fatal issues with the job, such as use of an incompatible Amazon S3 bucket name.
    • ArtifactList (list) -- A collection of artifacts.
      • (dict) -- A discrete item that contains the description and URL of an artifact (such as a PDF).
        • Description (string) -- The associated description for this object.
        • URL (string) -- The URL for a given Artifact.

Exceptions

  • ImportExport.Client.exceptions.MissingParameterException
  • ImportExport.Client.exceptions.InvalidParameterException
  • ImportExport.Client.exceptions.InvalidAccessKeyIdException
  • ImportExport.Client.exceptions.InvalidAddressException
  • ImportExport.Client.exceptions.InvalidManifestFieldException
  • ImportExport.Client.exceptions.MissingManifestFieldException
  • ImportExport.Client.exceptions.NoSuchBucketException
  • ImportExport.Client.exceptions.MissingCustomsException
  • ImportExport.Client.exceptions.InvalidCustomsException
  • ImportExport.Client.exceptions.InvalidFileSystemException
  • ImportExport.Client.exceptions.MultipleRegionsException
  • ImportExport.Client.exceptions.BucketPermissionException
  • ImportExport.Client.exceptions.MalformedManifestException
  • ImportExport.Client.exceptions.CreateJobQuotaExceededException
  • ImportExport.Client.exceptions.InvalidJobIdException
  • ImportExport.Client.exceptions.InvalidVersionException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_shipping_label(**kwargs)

This operation generates a pre-paid UPS shipping label that you will use to ship your device to AWS for processing.

See also: AWS API Documentation

Request Syntax

response = client.get_shipping_label(
    jobIds=[
        'string',
    ],
    name='string',
    company='string',
    phoneNumber='string',
    country='string',
    stateOrProvince='string',
    city='string',
    postalCode='string',
    street1='string',
    street2='string',
    street3='string',
    APIVersion='string'
)
Parameters
  • jobIds (list) --

    [REQUIRED]

    • (string) --
  • name (string) -- Specifies the name of the person responsible for shipping this package.
  • company (string) -- Specifies the name of the company that will ship this package.
  • phoneNumber (string) -- Specifies the phone number of the person responsible for shipping this package.
  • country (string) -- Specifies the name of your country for the return address.
  • stateOrProvince (string) -- Specifies the name of your state or your province for the return address.
  • city (string) -- Specifies the name of your city for the return address.
  • postalCode (string) -- Specifies the postal code for the return address.
  • street1 (string) -- Specifies the first part of the street address for the return address, for example 1234 Main Street.
  • street2 (string) -- Specifies the optional second part of the street address for the return address, for example Suite 100.
  • street3 (string) -- Specifies the optional third part of the street address for the return address, for example c/o Jane Doe.
  • APIVersion (string) -- Specifies the version of the client tool.
Return type

dict

Returns

Response Syntax

{
    'ShippingLabelURL': 'string',
    'Warning': 'string'
}

Response Structure

  • (dict) --
    • ShippingLabelURL (string) --
    • Warning (string) --

Exceptions

  • ImportExport.Client.exceptions.InvalidJobIdException
  • ImportExport.Client.exceptions.ExpiredJobIdException
  • ImportExport.Client.exceptions.CanceledJobIdException
  • ImportExport.Client.exceptions.InvalidAccessKeyIdException
  • ImportExport.Client.exceptions.InvalidAddressException
  • ImportExport.Client.exceptions.InvalidVersionException
  • ImportExport.Client.exceptions.InvalidParameterException
get_status(**kwargs)

This operation returns information about a job, including where the job is in the processing pipeline, the status of the results, and the signature value associated with the job. You can only return information about jobs you own.

See also: AWS API Documentation

Request Syntax

response = client.get_status(
    JobId='string',
    APIVersion='string'
)
Parameters
  • JobId (string) -- [REQUIRED] A unique identifier which refers to a particular job.
  • APIVersion (string) -- Specifies the version of the client tool.
Return type

dict

Returns

Response Syntax

{
    'JobId': 'string',
    'JobType': 'Import'|'Export',
    'LocationCode': 'string',
    'LocationMessage': 'string',
    'ProgressCode': 'string',
    'ProgressMessage': 'string',
    'Carrier': 'string',
    'TrackingNumber': 'string',
    'LogBucket': 'string',
    'LogKey': 'string',
    'ErrorCount': 123,
    'Signature': 'string',
    'SignatureFileContents': 'string',
    'CurrentManifest': 'string',
    'CreationDate': datetime(2015, 1, 1),
    'ArtifactList': [
        {
            'Description': 'string',
            'URL': 'string'
        },
    ]
}

Response Structure

  • (dict) -- Output structure for the GetStatus operation.
    • JobId (string) -- A unique identifier which refers to a particular job.
    • JobType (string) -- Specifies whether the job to initiate is an import or export job.
    • LocationCode (string) -- A token representing the location of the storage device, such as "AtAWS".
    • LocationMessage (string) -- A more human readable form of the physical location of the storage device.
    • ProgressCode (string) -- A token representing the state of the job, such as "Started".
    • ProgressMessage (string) -- A more human readable form of the job status.
    • Carrier (string) -- Name of the shipping company. This value is included when the LocationCode is "Returned".
    • TrackingNumber (string) -- The shipping tracking number assigned by AWS Import/Export to the storage device when it's returned to you. We return this value when the LocationCode is "Returned".
    • LogBucket (string) -- Amazon S3 bucket for user logs.
    • LogKey (string) -- The key where the user logs were stored.
    • ErrorCount (integer) -- Number of errors. We return this value when the ProgressCode is Success or SuccessWithErrors.
    • Signature (string) -- An encrypted code used to authenticate the request and response, for example, "DV+TpDfx1/TdSE9ktyK9k/bDTVI=". Only use this value is you want to create the signature file yourself. Generally you should use the SignatureFileContents value.
    • SignatureFileContents (string) -- An encrypted code used to authenticate the request and response, for example, "DV+TpDfx1/TdSE9ktyK9k/bDTVI=". Only use this value is you want to create the signature file yourself. Generally you should use the SignatureFileContents value.
    • CurrentManifest (string) -- The last manifest submitted, which will be used to process the job.
    • CreationDate (datetime) -- Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".
    • ArtifactList (list) -- A collection of artifacts.
      • (dict) -- A discrete item that contains the description and URL of an artifact (such as a PDF).
        • Description (string) -- The associated description for this object.
        • URL (string) -- The URL for a given Artifact.

Exceptions

  • ImportExport.Client.exceptions.InvalidJobIdException
  • ImportExport.Client.exceptions.ExpiredJobIdException
  • ImportExport.Client.exceptions.CanceledJobIdException
  • ImportExport.Client.exceptions.InvalidAccessKeyIdException
  • ImportExport.Client.exceptions.InvalidVersionException
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_jobs(**kwargs)

This operation returns the jobs associated with the requester. AWS Import/Export lists the jobs in reverse chronological order based on the date of creation. For example if Job Test1 was created 2009Dec30 and Test2 was created 2010Feb05, the ListJobs operation would return Test2 followed by Test1.

See also: AWS API Documentation

Request Syntax

response = client.list_jobs(
    MaxJobs=123,
    Marker='string',
    APIVersion='string'
)
Parameters
  • MaxJobs (integer) -- Sets the maximum number of jobs returned in the response. If there are additional jobs that were not returned because MaxJobs was exceeded, the response contains <IsTruncated>true</IsTruncated>. To return the additional jobs, see Marker.
  • Marker (string) -- Specifies the JOBID to start after when listing the jobs created with your account. AWS Import/Export lists your jobs in reverse chronological order. See MaxJobs.
  • APIVersion (string) -- Specifies the version of the client tool.
Return type

dict

Returns

Response Syntax

{
    'Jobs': [
        {
            'JobId': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'IsCanceled': True|False,
            'JobType': 'Import'|'Export'
        },
    ],
    'IsTruncated': True|False
}

Response Structure

  • (dict) -- Output structure for the ListJobs operation.
    • Jobs (list) -- A list container for Jobs returned by the ListJobs operation.
      • (dict) -- Representation of a job returned by the ListJobs operation.
        • JobId (string) -- A unique identifier which refers to a particular job.
        • CreationDate (datetime) -- Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".
        • IsCanceled (boolean) -- Indicates whether the job was canceled.
        • JobType (string) -- Specifies whether the job to initiate is an import or export job.
    • IsTruncated (boolean) -- Indicates whether the list of jobs was truncated. If true, then call ListJobs again using the last JobId element as the marker.

Exceptions

  • ImportExport.Client.exceptions.InvalidParameterException
  • ImportExport.Client.exceptions.InvalidAccessKeyIdException
  • ImportExport.Client.exceptions.InvalidVersionException
update_job(**kwargs)

You use this operation to change the parameters specified in the original manifest file by supplying a new manifest file. The manifest file attached to this request replaces the original manifest file. You can only use the operation after a CreateJob request but before the data transfer starts and you can only use it on jobs you own.

See also: AWS API Documentation

Request Syntax

response = client.update_job(
    JobId='string',
    Manifest='string',
    JobType='Import'|'Export',
    ValidateOnly=True|False,
    APIVersion='string'
)
Parameters
  • JobId (string) -- [REQUIRED] A unique identifier which refers to a particular job.
  • Manifest (string) -- [REQUIRED] The UTF-8 encoded text of the manifest file.
  • JobType (string) -- [REQUIRED] Specifies whether the job to initiate is an import or export job.
  • ValidateOnly (boolean) -- [REQUIRED] Validate the manifest and parameter values in the request but do not actually create a job.
  • APIVersion (string) -- Specifies the version of the client tool.
Return type

dict

Returns

Response Syntax

{
    'Success': True|False,
    'WarningMessage': 'string',
    'ArtifactList': [
        {
            'Description': 'string',
            'URL': 'string'
        },
    ]
}

Response Structure

  • (dict) -- Output structure for the UpateJob operation.
    • Success (boolean) -- Specifies whether (true) or not (false) AWS Import/Export updated your job.
    • WarningMessage (string) -- An optional message notifying you of non-fatal issues with the job, such as use of an incompatible Amazon S3 bucket name.
    • ArtifactList (list) -- A collection of artifacts.
      • (dict) -- A discrete item that contains the description and URL of an artifact (such as a PDF).
        • Description (string) -- The associated description for this object.
        • URL (string) -- The URL for a given Artifact.

Exceptions

  • ImportExport.Client.exceptions.MissingParameterException
  • ImportExport.Client.exceptions.InvalidParameterException
  • ImportExport.Client.exceptions.InvalidAccessKeyIdException
  • ImportExport.Client.exceptions.InvalidAddressException
  • ImportExport.Client.exceptions.InvalidManifestFieldException
  • ImportExport.Client.exceptions.InvalidJobIdException
  • ImportExport.Client.exceptions.MissingManifestFieldException
  • ImportExport.Client.exceptions.NoSuchBucketException
  • ImportExport.Client.exceptions.ExpiredJobIdException
  • ImportExport.Client.exceptions.CanceledJobIdException
  • ImportExport.Client.exceptions.MissingCustomsException
  • ImportExport.Client.exceptions.InvalidCustomsException
  • ImportExport.Client.exceptions.InvalidFileSystemException
  • ImportExport.Client.exceptions.MultipleRegionsException
  • ImportExport.Client.exceptions.BucketPermissionException
  • ImportExport.Client.exceptions.MalformedManifestException
  • ImportExport.Client.exceptions.UnableToUpdateJobIdException
  • ImportExport.Client.exceptions.InvalidVersionException

Paginators

The available paginators are:

class ImportExport.Paginator.ListJobs
paginator = client.get_paginator('list_jobs')
paginate(**kwargs)

Creates an iterator that will paginate through responses from ImportExport.Client.list_jobs().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    APIVersion='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • APIVersion (string) -- Specifies the version of the client tool.
  • 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

{
    'Jobs': [
        {
            'JobId': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'IsCanceled': True|False,
            'JobType': 'Import'|'Export'
        },
    ],
    'IsTruncated': True|False,
    'NextToken': 'string'
}

Response Structure

  • (dict) -- Output structure for the ListJobs operation.

    • Jobs (list) -- A list container for Jobs returned by the ListJobs operation.

      • (dict) -- Representation of a job returned by the ListJobs operation.
        • JobId (string) -- A unique identifier which refers to a particular job.
        • CreationDate (datetime) -- Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".
        • IsCanceled (boolean) -- Indicates whether the job was canceled.
        • JobType (string) -- Specifies whether the job to initiate is an import or export job.
    • IsTruncated (boolean) -- Indicates whether the list of jobs was truncated. If true, then call ListJobs again using the last JobId element as the marker.

    • NextToken (string) --

      A token to resume pagination.