Class: AWS.ImportExport

Inherits:
AWS.Service show all
Identifier:
importexport
API Version:
2010-06-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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.

Sending a Request Using ImportExport

var importexport = new AWS.ImportExport();
importexport.cancelJob(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the ImportExport object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var importexport = new AWS.ImportExport({apiVersion: '2010-06-01'});

You can also set the API version globally in AWS.config.apiVersions using the importexport service identifier:

AWS.config.apiVersions = {
  importexport: '2010-06-01',
  // other service API versions
};

var importexport = new AWS.ImportExport();

Version:

  • 2010-06-01

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.ImportExport(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a ImportExport object

var importexport = new AWS.ImportExport({apiVersion: '2010-06-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.ImportExport.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.ImportExport.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.ImportExport.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

cancelJob(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the cancelJob operation

var params = {
  JobId: 'STRING_VALUE', /* required */
  APIVersion: 'STRING_VALUE'
};
importexport.cancelJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • JobId — (String) A unique identifier which refers to a particular job.
    • APIVersion — (String) Specifies the version of the client tool.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Success — (Boolean) Specifies whether (true) or not (false) AWS Import/Export updated your job.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createJob(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createJob operation

var params = {
  JobType: Import | Export, /* required */
  Manifest: 'STRING_VALUE', /* required */
  ValidateOnly: true || false, /* required */
  APIVersion: 'STRING_VALUE',
  ManifestAddendum: 'STRING_VALUE'
};
importexport.createJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • JobType — (String) Specifies whether the job to initiate is an import or export job. Possible values include:
      • "Import"
      • "Export"
    • Manifest — (String) The UTF-8 encoded text of the manifest file.
    • ManifestAddendum — (String) For internal use only.
    • ValidateOnly — (Boolean) 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • 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. Possible values include:
        • "Import"
        • "Export"
      • 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 — (Array<map>) A collection of artifacts.
        • Description — (String) The associated description for this object.
        • URL — (String) The URL for a given Artifact.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getShippingLabel(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the getShippingLabel operation

var params = {
  jobIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  APIVersion: 'STRING_VALUE',
  city: 'STRING_VALUE',
  company: 'STRING_VALUE',
  country: 'STRING_VALUE',
  name: 'STRING_VALUE',
  phoneNumber: 'STRING_VALUE',
  postalCode: 'STRING_VALUE',
  stateOrProvince: 'STRING_VALUE',
  street1: 'STRING_VALUE',
  street2: 'STRING_VALUE',
  street3: 'STRING_VALUE'
};
importexport.getShippingLabel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • jobIds — (Array<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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ShippingLabelURL — (String)
      • Warning — (String)

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getStatus(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getStatus operation

var params = {
  JobId: 'STRING_VALUE', /* required */
  APIVersion: 'STRING_VALUE'
};
importexport.getStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • JobId — (String) A unique identifier which refers to a particular job.
    • APIVersion — (String) Specifies the version of the client tool.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • 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. Possible values include:
        • "Import"
        • "Export"
      • 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 — (Date) Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".
      • ArtifactList — (Array<map>) A collection of artifacts.
        • Description — (String) The associated description for this object.
        • URL — (String) The URL for a given Artifact.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listJobs(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the listJobs operation

var params = {
  APIVersion: 'STRING_VALUE',
  Marker: 'STRING_VALUE',
  MaxJobs: 'NUMBER_VALUE'
};
importexport.listJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Jobs — (Array<map>) A list container for Jobs returned by the ListJobs operation.
        • JobId — (String) A unique identifier which refers to a particular job.
        • CreationDate — (Date) 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. Possible values include:
          • "Import"
          • "Export"
      • IsTruncated — (Boolean) Indicates whether the list of jobs was truncated. If true, then call ListJobs again using the last JobId element as the marker.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateJob(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateJob operation

var params = {
  JobId: 'STRING_VALUE', /* required */
  JobType: Import | Export, /* required */
  Manifest: 'STRING_VALUE', /* required */
  ValidateOnly: true || false, /* required */
  APIVersion: 'STRING_VALUE'
};
importexport.updateJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • JobId — (String) A unique identifier which refers to a particular job.
    • Manifest — (String) The UTF-8 encoded text of the manifest file.
    • JobType — (String) Specifies whether the job to initiate is an import or export job. Possible values include:
      • "Import"
      • "Export"
    • ValidateOnly — (Boolean) 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • 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 — (Array<map>) A collection of artifacts.
        • Description — (String) The associated description for this object.
        • URL — (String) The URL for a given Artifact.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.