You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

Class: AWS.SnowDeviceManagement

Inherits:
AWS.Service show all
Identifier:
snowdevicemanagement
API Version:
2021-08-04
Defined in:
(unknown)

Overview

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

Service Description

Amazon Web Services Snow Device Management documentation.

Sending a Request Using SnowDeviceManagement

var snowdevicemanagement = new AWS.SnowDeviceManagement();
snowdevicemanagement.cancelTask(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 SnowDeviceManagement object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var snowdevicemanagement = new AWS.SnowDeviceManagement({apiVersion: '2021-08-04'});

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

AWS.config.apiVersions = {
  snowdevicemanagement: '2021-08-04',
  // other service API versions
};

var snowdevicemanagement = new AWS.SnowDeviceManagement();

Version:

  • 2021-08-04

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

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

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

Examples:

Constructing a SnowDeviceManagement object

var snowdevicemanagement = new AWS.SnowDeviceManagement({apiVersion: '2021-08-04'});

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|AWS.Endpoint)

    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' or an Endpoint object.

  • 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.SnowDeviceManagement.region for more information.

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.SnowDeviceManagement.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.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets 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 error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • 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|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • 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.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

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

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

Sends a cancel request for a specified task. You can cancel a task only if it's still in a QUEUED state. Tasks that are already running can't be cancelled.

Note: A task might still run if it's processed from the queue before the CancelTask operation changes the task's state.

Service Reference:

Examples:

Calling the cancelTask operation

var params = {
  taskId: 'STRING_VALUE' /* required */
};
snowdevicemanagement.cancelTask(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: {})
    • taskId — (String)

      The ID of the task that you are attempting to cancel. You can retrieve a task ID by using the ListTasks operation.

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:

      • taskId — (String)

        The ID of the task that you are attempting to cancel.

Returns:

  • (AWS.Request)

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

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

Instructs one or more devices to start a task, such as unlocking or rebooting.

Service Reference:

Examples:

Calling the createTask operation

var params = {
  command: { /* required */
    reboot: {
    },
    unlock: {
    }
  },
  targets: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  clientToken: 'STRING_VALUE',
  description: 'STRING_VALUE',
  tags: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
snowdevicemanagement.createTask(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: {})
    • clientToken — (String)

      A token ensuring that the action is called only once with the specified details.

      If a token is not provided, the SDK will use a version 4 UUID.
    • command — (map)

      The task to be performed. Only one task is executed on a device at a time.

      • reboot — (map)

        Reboots the device.

      • unlock — (map)

        Unlocks the device.

    • description — (String)

      A description of the task and its targets.

    • tags — (map<String>)

      Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment.

    • targets — (Array<String>)

      A list of managed device IDs.

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:

      • taskArn — (String)

        The Amazon Resource Name (ARN) of the task that you created.

      • taskId — (String)

        The ID of the task that you created.

Returns:

  • (AWS.Request)

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

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

Checks device-specific information, such as the device type, software version, IP addresses, and lock status.

Service Reference:

Examples:

Calling the describeDevice operation

var params = {
  managedDeviceId: 'STRING_VALUE' /* required */
};
snowdevicemanagement.describeDevice(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: {})
    • managedDeviceId — (String)

      The ID of the device that you are checking the information of.

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:

      • associatedWithJob — (String)

        The ID of the job used when ordering the device.

      • deviceCapacities — (Array<map>)

        The hardware specifications of the device.

        • available — (Integer)

          The amount of capacity available for use on the device.

        • name — (String)

          The name of the type of capacity, such as memory.

        • total — (Integer)

          The total capacity on the device.

        • unit — (String)

          The unit of measure for the type of capacity.

        • used — (Integer)

          The amount of capacity used on the device.

      • deviceState — (String)

        The current state of the device.

        Possible values include:
        • "UNLOCKED"
        • "LOCKED"
        • "UNLOCKING"
      • deviceType — (String)

        The type of Amazon Web Services Snow Family device.

      • lastReachedOutAt — (Date)

        When the device last contacted the Amazon Web Services Cloud. Indicates that the device is online.

      • lastUpdatedAt — (Date)

        When the device last pushed an update to the Amazon Web Services Cloud. Indicates when the device cache was refreshed.

      • managedDeviceArn — (String)

        The Amazon Resource Name (ARN) of the device.

      • managedDeviceId — (String)

        The ID of the device that you checked the information for.

      • physicalNetworkInterfaces — (Array<map>)

        The network interfaces available on the device.

        • defaultGateway — (String)

          The default gateway of the device.

        • ipAddress — (String)

          The IP address of the device.

        • ipAddressAssignment — (String)

          A value that describes whether the IP address is dynamic or persistent.

          Possible values include:
          • "DHCP"
          • "STATIC"
        • macAddress — (String)

          The MAC address of the device.

        • netmask — (String)

          The netmask used to divide the IP address into subnets.

        • physicalConnectorType — (String)

          The physical connector type.

          Possible values include:
          • "RJ45"
          • "SFP_PLUS"
          • "QSFP"
          • "RJ45_2"
          • "WIFI"
        • physicalNetworkInterfaceId — (String)

          The physical network interface ID.

      • software — (map)

        The software installed on the device.

        • installState — (String)

          The state of the software that is installed or that is being installed on the device.

        • installedVersion — (String)

          The version of the software currently installed on the device.

        • installingVersion — (String)

          The version of the software being installed on the device.

      • tags — (map<String>)

        Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment.

Returns:

  • (AWS.Request)

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

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

Checks the current state of the Amazon EC2 instances. The output is similar to describeDevice, but the results are sourced from the device cache in the Amazon Web Services Cloud and include a subset of the available fields.

Service Reference:

Examples:

Calling the describeDeviceEc2Instances operation

var params = {
  instanceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  managedDeviceId: 'STRING_VALUE' /* required */
};
snowdevicemanagement.describeDeviceEc2Instances(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: {})
    • instanceIds — (Array<String>)

      A list of instance IDs associated with the managed device.

    • managedDeviceId — (String)

      The ID of the managed device.

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:

      • instances — (Array<map>)

        A list of structures containing information about each instance.

        • instance — (map)

          A structure containing details about the instance.

          • amiLaunchIndex — (Integer)

            The Amazon Machine Image (AMI) launch index, which you can use to find this instance in the launch group.

          • blockDeviceMappings — (Array<map>)

            Any block device mapping entries for the instance.

            • deviceName — (String)

              The block device name.

            • ebs — (map)

              The parameters used to automatically set up Amazon Elastic Block Store (Amazon EBS) volumes when the instance is launched.

              • attachTime — (Date)

                When the attachment was initiated.

              • deleteOnTermination — (Boolean)

                A value that indicates whether the volume is deleted on instance termination.

              • status — (String)

                The attachment state.

                Possible values include:
                • "ATTACHING"
                • "ATTACHED"
                • "DETACHING"
                • "DETACHED"
              • volumeId — (String)

                The ID of the Amazon EBS volume.

          • cpuOptions — (map)

            The CPU options for the instance.

            • coreCount — (Integer)

              The number of cores that the CPU can use.

            • threadsPerCore — (Integer)

              The number of threads per core in the CPU.

          • createdAt — (Date)

            When the instance was created.

          • imageId — (String)

            The ID of the AMI used to launch the instance.

          • instanceId — (String)

            The ID of the instance.

          • instanceType — (String)

            The instance type.

          • privateIpAddress — (String)

            The private IPv4 address assigned to the instance.

          • publicIpAddress — (String)

            The public IPv4 address assigned to the instance.

          • rootDeviceName — (String)

            The device name of the root device volume (for example, /dev/sda1).

          • securityGroups — (Array<map>)

            The security groups for the instance.

            • groupId — (String)

              The security group ID.

            • groupName — (String)

              The security group name.

          • state — (map)

            The description of the current state of an instance.

            • code — (Integer)

              The state of the instance as a 16-bit unsigned integer.

              The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

              The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

              The valid values for the instance state code are all in the range of the low byte. These values are:

              • 0 : pending

              • 16 : running

              • 32 : shutting-down

              • 48 : terminated

              • 64 : stopping

              • 80 : stopped

              You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

            • name — (String)

              The current state of the instance.

              Possible values include:
              • "PENDING"
              • "RUNNING"
              • "SHUTTING_DOWN"
              • "TERMINATED"
              • "STOPPING"
              • "STOPPED"
          • updatedAt — (Date)

            When the instance was last updated.

        • lastUpdatedAt — (Date)

          When the instance summary was last updated.

Returns:

  • (AWS.Request)

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

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

Checks the status of a remote task running on one or more target devices.

Service Reference:

Examples:

Calling the describeExecution operation

var params = {
  managedDeviceId: 'STRING_VALUE', /* required */
  taskId: 'STRING_VALUE' /* required */
};
snowdevicemanagement.describeExecution(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: {})
    • managedDeviceId — (String)

      The ID of the managed device.

    • taskId — (String)

      The ID of the task that the action is describing.

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:

      • executionId — (String)

        The ID of the execution.

      • lastUpdatedAt — (Date)

        When the status of the execution was last updated.

      • managedDeviceId — (String)

        The ID of the managed device that the task is being executed on.

      • startedAt — (Date)

        When the execution began.

      • state — (String)

        The current state of the execution.

        Possible values include:
        • "QUEUED"
        • "IN_PROGRESS"
        • "CANCELED"
        • "FAILED"
        • "SUCCEEDED"
        • "REJECTED"
        • "TIMED_OUT"
      • taskId — (String)

        The ID of the task being executed on the device.

Returns:

  • (AWS.Request)

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

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

Checks the metadata for a given task on a device.

Service Reference:

Examples:

Calling the describeTask operation

var params = {
  taskId: 'STRING_VALUE' /* required */
};
snowdevicemanagement.describeTask(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: {})
    • taskId — (String)

      The ID of the task to be described.

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:

      • completedAt — (Date)

        When the task was completed.

      • createdAt — (Date)

        When the CreateTask operation was called.

      • description — (String)

        The description provided of the task and managed devices.

      • lastUpdatedAt — (Date)

        When the state of the task was last updated.

      • state — (String)

        The current state of the task.

        Possible values include:
        • "IN_PROGRESS"
        • "CANCELED"
        • "COMPLETED"
      • tags — (map<String>)

        Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment.

      • targets — (Array<String>)

        The managed devices that the task was sent to.

      • taskArn — (String)

        The Amazon Resource Name (ARN) of the task.

      • taskId — (String)

        The ID of the task.

Returns:

  • (AWS.Request)

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

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

Returns a list of the Amazon Web Services resources available for a device. Currently, Amazon EC2 instances are the only supported resource type.

Service Reference:

Examples:

Calling the listDeviceResources operation

var params = {
  managedDeviceId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  type: 'STRING_VALUE'
};
snowdevicemanagement.listDeviceResources(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: {})
    • managedDeviceId — (String)

      The ID of the managed device that you are listing the resources of.

    • maxResults — (Integer)

      The maximum number of resources per page.

    • nextToken — (String)

      A pagination token to continue to the next page of results.

    • type — (String)

      A structure used to filter the results by type of resource.

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:

      • nextToken — (String)

        A pagination token to continue to the next page of results.

      • resources — (Array<map>)

        A structure defining the resource's type, Amazon Resource Name (ARN), and ID.

        • arn — (String)

          The Amazon Resource Name (ARN) of the resource.

        • id — (String)

          The ID of the resource.

        • resourceTyperequired — (String)

          The resource type.

Returns:

  • (AWS.Request)

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

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

Returns a list of all devices on your Amazon Web Services account that have Amazon Web Services Snow Device Management enabled in the Amazon Web Services Region where the command is run.

Service Reference:

Examples:

Calling the listDevices operation

var params = {
  jobId: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
snowdevicemanagement.listDevices(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)

      The ID of the job used to order the device.

    • maxResults — (Integer)

      The maximum number of devices to list per page.

    • nextToken — (String)

      A pagination token to continue to the next page of results.

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:

      • devices — (Array<map>)

        A list of device structures that contain information about the device.

        • associatedWithJob — (String)

          The ID of the job used to order the device.

        • managedDeviceArn — (String)

          The Amazon Resource Name (ARN) of the device.

        • managedDeviceId — (String)

          The ID of the device.

        • tags — (map<String>)

          Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment.

      • nextToken — (String)

        A pagination token to continue to the next page of devices.

Returns:

  • (AWS.Request)

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

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

Returns the status of tasks for one or more target devices.

Service Reference:

Examples:

Calling the listExecutions operation

var params = {
  taskId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  state: QUEUED | IN_PROGRESS | CANCELED | FAILED | SUCCEEDED | REJECTED | TIMED_OUT
};
snowdevicemanagement.listExecutions(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: {})
    • maxResults — (Integer)

      The maximum number of tasks to list per page.

    • nextToken — (String)

      A pagination token to continue to the next page of tasks.

    • state — (String)

      A structure used to filter the tasks by their current state.

      Possible values include:
      • "QUEUED"
      • "IN_PROGRESS"
      • "CANCELED"
      • "FAILED"
      • "SUCCEEDED"
      • "REJECTED"
      • "TIMED_OUT"
    • taskId — (String)

      The ID of the task.

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:

      • executions — (Array<map>)

        A list of executions. Each execution contains the task ID, the device that the task is executing on, the execution ID, and the status of the execution.

        • executionId — (String)

          The ID of the execution.

        • managedDeviceId — (String)

          The ID of the managed device that the task is being executed on.

        • state — (String)

          The state of the execution.

          Possible values include:
          • "QUEUED"
          • "IN_PROGRESS"
          • "CANCELED"
          • "FAILED"
          • "SUCCEEDED"
          • "REJECTED"
          • "TIMED_OUT"
        • taskId — (String)

          The ID of the task.

      • nextToken — (String)

        A pagination token to continue to the next page of executions.

Returns:

  • (AWS.Request)

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

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

Returns a list of tags for a managed device or task.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE' /* required */
};
snowdevicemanagement.listTagsForResource(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: {})
    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the device or task.

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:

      • tags — (map<String>)

        The list of tags for the device or task.

Returns:

  • (AWS.Request)

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

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

Returns a list of tasks that can be filtered by state.

Service Reference:

Examples:

Calling the listTasks operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  state: IN_PROGRESS | CANCELED | COMPLETED
};
snowdevicemanagement.listTasks(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: {})
    • maxResults — (Integer)

      The maximum number of tasks per page.

    • nextToken — (String)

      A pagination token to continue to the next page of tasks.

    • state — (String)

      A structure used to filter the list of tasks.

      Possible values include:
      • "IN_PROGRESS"
      • "CANCELED"
      • "COMPLETED"

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:

      • nextToken — (String)

        A pagination token to continue to the next page of tasks.

      • tasks — (Array<map>)

        A list of task structures containing details about each task.

        • state — (String)

          The state of the task assigned to one or many devices.

          Possible values include:
          • "IN_PROGRESS"
          • "CANCELED"
          • "COMPLETED"
        • tags — (map<String>)

          Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment.

        • taskArn — (String)

          The Amazon Resource Name (ARN) of the task.

        • taskIdrequired — (String)

          The task ID.

Returns:

  • (AWS.Request)

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

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

Adds or replaces tags on a device or task.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: { /* required */
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
snowdevicemanagement.tagResource(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: {})
    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the device or task.

    • tags — (map<String>)

      Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment.

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.

Returns:

  • (AWS.Request)

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

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

Removes a tag from a device or task.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
snowdevicemanagement.untagResource(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: {})
    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the device or task.

    • tagKeys — (Array<String>)

      Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment.

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.

Returns:

  • (AWS.Request)

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