| Did this page help you? Yes No Tell us about it... |
If your application requires programmatic access to AWS Import/Export and the AWS SDK does not meet your requirements you can program directly using the REST API.
To create a job using the API
Use a text editor to create a manifest file.
Following is an example manifest file.
manifestVersion: 2.0 bucket: myBucket accessKeyId: AKIAIOSFODNN7EXAMPLE deviceId: myDeviceSerialNumber ABCD eraseDevice: no returnAddress: name: Amazon.com ATTN Joe Random street1: 1111 Nosuch Ave S. city: Seattle stateOrProvince: WA postalCode: 91111 phoneNumber: 206-266-0000 country: USA
For more information, see Manifest File Options.
URL encode the manifest file.
Sign the request.
For more information, go to Making HTTP Requests in the AWS Import/Export API Reference.
Send a CreateJob request.
Following is a sample create job request.
The request includes the URL encoded manifest file in the body of the
request as the Manifest option value. The request
also shows the other required string parameters.
POST / HTTP/1.1 content-type:application/x-www-form-urlencoded;charset=utf-8 host: https://importexport.amazonaws.com content-length:579 Action=CreateJob&Manifest=manifestVersion%3A%202.0%0Abucket%3A%20myBucket%0AaccessKeyId%3A%AKIAIOSFODNN7EXAMPLE%0AreturnAddress%3A%0A%20%20%20%20name%3A%20Amazon.com%20ATTN%20Joe%20Random%20%0A%20%20%20%20street1%3A%201200%2012th%20Ave%20S.%0A%20%20%20%20city%3A%20Seattle%0A%20%20%20%20stateOrProvince%3A%20WA%0A%20%20%20%20postalCode%3A%2098114%0A%20%20%20%20phoneNumber%3A%20206-266-0000%0A%20%20%20%20country%3A%20USAJobType=Import&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLESignatureVersion=2&SignatureMethod=HmacSHA256&Version=2010-06-01&Signature=%2FVfkltRBOoSUi1sWxRzN8rw%3D
AWS Import/Export returns a job ID, the contents of your signature file, and the address to ship your storage device to.
Save the signature value in a file named SIGNATURE in the
root directory of your storage device.
Save the JobId value so that you can use it in other
requests regarding this job, and the AwsShippingAddress
value so you know where to ship your device.
For more information about creating a job using the REST API, go to CreateJob in the AWS
Import/Export API Reference. You can validate the manifest and
parameter values without creating a job by setting the ValidateOnly parameter to
true.