Table of Contents
ImportExport.
Client
¶A low-level client representing AWS Import/Export:
import boto3
client = boto3.client('importexport')
These are the available methods:
can_paginate()
cancel_job()
create_job()
generate_presigned_url()
get_paginator()
get_shipping_label()
get_status()
get_waiter()
list_jobs()
update_job()
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.
Request Syntax
response = client.cancel_job(
JobId='string',
APIVersion='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'Success': True|False
}
Response Structure
|
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.
Request Syntax
response = client.create_job(
JobType='Import'|'Export',
Manifest='string',
ManifestAddendum='string',
ValidateOnly=True|False,
APIVersion='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'JobId': 'string',
'JobType': 'Import'|'Export',
'Signature': 'string',
'SignatureFileContents': 'string',
'WarningMessage': 'string',
'ArtifactList': [
{
'Description': 'string',
'URL': 'string'
},
]
}
Response Structure
|
generate_presigned_url
(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
Parameters: |
|
---|---|
Returns: | The presigned url |
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.
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: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'ShippingLabelURL': 'string',
'Warning': 'string'
}
Response Structure
|
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.
Request Syntax
response = client.get_status(
JobId='string',
APIVersion='string'
)
Parameters: |
|
---|---|
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
|
get_waiter
(waiter_name)¶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.
Request Syntax
response = client.list_jobs(
MaxJobs=123,
Marker='string',
APIVersion='string'
)
Parameters: |
|
---|---|
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
|
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.
Request Syntax
response = client.update_job(
JobId='string',
Manifest='string',
JobType='Import'|'Export',
ValidateOnly=True|False,
APIVersion='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'Success': True|False,
'WarningMessage': 'string',
'ArtifactList': [
{
'Description': 'string',
'URL': 'string'
},
]
}
Response Structure
|
The available paginators are:
ImportExport.Paginator.
list_jobs
¶paginator = client.get_paginator('list_jobs')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from ImportExport.Client.list_jobs()
.
Request Syntax
response_iterator = paginator.paginate(
APIVersion='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Parameters: |
|
---|---|
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
|