Table of Contents
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()
cancel_job()
close()
create_job()
get_paginator()
get_shipping_label()
get_status()
get_waiter()
list_jobs()
update_job()
can_paginate
(operation_name)¶Check if an operation can be paginated.
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")
.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'
)
dict
Response Syntax
{
'Success': True|False
}
Response Structure
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'
)
dict
Response Syntax
{
'JobId': 'string',
'JobType': 'Import'|'Export',
'Signature': 'string',
'SignatureFileContents': 'string',
'WarningMessage': 'string',
'ArtifactList': [
{
'Description': 'string',
'URL': 'string'
},
]
}
Response Structure
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.
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")
.client.can_paginate
method to
check if an operation is pageable.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'
)
[REQUIRED]
dict
Response Syntax
{
'ShippingLabelURL': 'string',
'Warning': 'string'
}
Response Structure
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'
)
dict
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
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.
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'
)
dict
Response Syntax
{
'Jobs': [
{
'JobId': 'string',
'CreationDate': datetime(2015, 1, 1),
'IsCanceled': True|False,
'JobType': 'Import'|'Export'
},
],
'IsTruncated': True|False
}
Response Structure
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'
)
dict
Response Syntax
{
'Success': True|False,
'WarningMessage': 'string',
'ArtifactList': [
{
'Description': 'string',
'URL': 'string'
},
]
}
Response Structure
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
The available paginators are:
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'
}
)
A dictionary that provides parameters to control pagination.
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.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
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.
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.