Class: AWS.Lightsail

Inherits:
AWS.Service show all
Identifier:
lightsail
API Version:
2016-11-28
Defined in:
(unknown)

Overview

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

Sending a Request Using Lightsail

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

var lightsail = new AWS.Lightsail({apiVersion: '2016-11-28'});

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

AWS.config.apiVersions = {
  lightsail: '2016-11-28',
  // other service API versions
};

var lightsail = new AWS.Lightsail();

Version:

  • 2016-11-28

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.Lightsail(options = {}) ⇒ Object

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

Examples:

Constructing a Lightsail object

var lightsail = new AWS.Lightsail({apiVersion: '2016-11-28'});

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

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

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

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

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

Allocates a static IP address.

Service Reference:

Examples:

Calling the allocateStaticIp operation

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

      The name of the static IP address.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the static IP address you allocated.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Attaches a static IP address to a specific Amazon Lightsail instance.

Service Reference:

Examples:

Calling the attachStaticIp operation

var params = {
  instanceName: 'STRING_VALUE', /* required */
  staticIpName: 'STRING_VALUE' /* required */
};
lightsail.attachStaticIp(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: {})
    • staticIpName — (String)

      The name of the static IP.

    • instanceName — (String)

      The instance name to which you want to attach the static IP address.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about your API operations.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Closes the public ports on a specific Amazon Lightsail instance.

Service Reference:

Examples:

Calling the closeInstancePublicPorts operation

var params = {
  instanceName: 'STRING_VALUE', /* required */
  portInfo: { /* required */
    fromPort: 0,
    protocol: tcp | all | udp,
    toPort: 0
  }
};
lightsail.closeInstancePublicPorts(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: {})
    • portInfo — (map)

      Information about the public port you are trying to close.

      • fromPort — (Integer)

        The first port in the range.

      • toPort — (Integer)

        The last port in the range.

      • protocol — (String)

        The protocol.

        Possible values include:
        • "tcp"
        • "all"
        • "udp"
    • instanceName — (String)

      The name of the instance on which you're attempting to close the public ports.

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:

      • operation — (map)

        An array of key-value pairs that contains information about the operation.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Creates a domain resource for the specified domain (e.g., example.com).

Service Reference:

Examples:

Calling the createDomain operation

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

      The domain name to manage (e.g., example.com).

      Note: You cannot register a new domain name using Lightsail. You must register a domain name using Amazon Route 53 or another domain name registrar. If you have already registered your domain, you can enter its name in this parameter to manage the DNS records for that domain.

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:

      • operation — (map)

        An array of key-value pairs containing information about the domain resource you created.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Creates one of the following entry records associated with the domain: A record, CNAME record, TXT record, or MX record.

Service Reference:

Examples:

Calling the createDomainEntry operation

var params = {
  domainEntry: { /* required */
    id: 'STRING_VALUE',
    name: 'STRING_VALUE',
    options: {
      '<DomainEntryOptionsKeys>': 'STRING_VALUE',
      /* '<DomainEntryOptionsKeys>': ... */
    },
    target: 'STRING_VALUE',
    type: 'STRING_VALUE'
  },
  domainName: 'STRING_VALUE' /* required */
};
lightsail.createDomainEntry(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: {})
    • domainName — (String)

      The domain name (e.g., example.com) for which you want to create the domain entry.

    • domainEntry — (map)

      An array of key-value pairs containing information about the domain entry request.

      • id — (String)

        The ID of the domain recordset entry.

      • name — (String)

        The name of the domain.

      • target — (String)

        The target AWS name server (e.g., ns-111.awsdns-22.com.).

      • type — (String)

        The type of domain entry (e.g., SOA or NS).

      • options — (map<String>)

        The options for the domain entry.

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:

      • operation — (map)

        An array of key-value pairs containing information about the operation.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Creates one or more Amazon Lightsail virtual private servers, or instances.

Service Reference:

Examples:

Calling the createInstances operation

var params = {
  availabilityZone: 'STRING_VALUE', /* required */
  blueprintId: 'STRING_VALUE', /* required */
  bundleId: 'STRING_VALUE', /* required */
  instanceNames: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  customImageName: 'STRING_VALUE',
  keyPairName: 'STRING_VALUE',
  userData: 'STRING_VALUE'
};
lightsail.createInstances(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: {})
    • instanceNames — (Array<String>)

      The names to use for your new Lightsail instances. Separate multiple values using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"]

    • availabilityZone — (String)

      The Availability Zone in which to create your instance. Use the following format: us-east-1a (case sensitive). You can get a list of availability zones by using the get regions operation. Be sure to add the include availability zones parameter to your request.

    • customImageName — (String)

      The name for your custom image.

    • blueprintId — (String)

      The ID for a virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). Use the get blueprints operation to return a list of available images (or blueprints).

    • bundleId — (String)

      The bundle of specification information for your virtual private server (or instance), including the pricing plan (e.g., micro_1_0).

    • userData — (String)

      A launch script you can create that configures a server with additional user data. For example, you might want to run apt-get –y update.

      Note: Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide.
    • keyPairName — (String)

      The name of your key pair.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the results of your create instances request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Uses a specific snapshot as a blueprint for creating one or more new instances that are based on that identical configuration.

Service Reference:

Examples:

Calling the createInstancesFromSnapshot operation

var params = {
  availabilityZone: 'STRING_VALUE', /* required */
  bundleId: 'STRING_VALUE', /* required */
  instanceNames: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  instanceSnapshotName: 'STRING_VALUE', /* required */
  keyPairName: 'STRING_VALUE',
  userData: 'STRING_VALUE'
};
lightsail.createInstancesFromSnapshot(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: {})
    • instanceNames — (Array<String>)

      The names for your new instances.

    • availabilityZone — (String)

      The Availability Zone where you want to create your instances. Use the following formatting: us-east-1a (case sensitive). You can get a list of availability zones by using the get regions operation. Be sure to add the include availability zones parameter to your request.

    • instanceSnapshotName — (String)

      The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots operation to return information about your existing snapshots.

    • bundleId — (String)

      The bundle of specification information for your virtual private server (or instance), including the pricing plan (e.g., micro_1_0).

    • userData — (String)

      You can create a launch script that configures a server with additional user data. For example, apt-get –y update.

      Note: Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide.
    • keyPairName — (String)

      The name for your key pair.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the results of your create instances from snapshot request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Creates a snapshot of a specific virtual private server, or instance. You can use a snapshot to create a new instance that is based on that snapshot.

Service Reference:

Examples:

Calling the createInstanceSnapshot operation

var params = {
  instanceName: 'STRING_VALUE', /* required */
  instanceSnapshotName: 'STRING_VALUE' /* required */
};
lightsail.createInstanceSnapshot(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: {})
    • instanceSnapshotName — (String)

      The name for your new snapshot.

    • instanceName — (String)

      The Lightsail instance on which to base your snapshot.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the results of your create instances snapshot request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Creates sn SSH key pair.

Service Reference:

Examples:

Calling the createKeyPair operation

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

      The name for your new key pair.

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:

      • keyPair — (map)

        An array of key-value pairs containing information about the new key pair you just created.

        • name — (String)

          The friendly name of the SSH key pair.

        • arn — (String)

          The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-1:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE).

        • supportCode — (String)

          The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

        • createdAt — (Date)

          The timestamp when the key pair was created (e.g., 1479816991.349).

        • location — (map)

          The region name and Availability Zone where the key pair was created.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • resourceType — (String)

          The resource type (usually KeyPair).

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • fingerprint — (String)

          The RSA fingerprint of the key pair.

      • publicKeyBase64 — (String)

        A base64-encoded public key of the ssh-rsa type.

      • privateKeyBase64 — (String)

        A base64-encoded RSA private key.

      • operation — (map)

        An array of key-value pairs containing information about the results of your create key pair request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Deletes the specified domain recordset and all of its domain records.

Service Reference:

Examples:

Calling the deleteDomain operation

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

      The specific domain name to delete.

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:

      • operation — (map)

        An array of key-value pairs containing information about the results of your delete domain request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Deletes a specific domain entry.

Service Reference:

Examples:

Calling the deleteDomainEntry operation

var params = {
  domainEntry: { /* required */
    id: 'STRING_VALUE',
    name: 'STRING_VALUE',
    options: {
      '<DomainEntryOptionsKeys>': 'STRING_VALUE',
      /* '<DomainEntryOptionsKeys>': ... */
    },
    target: 'STRING_VALUE',
    type: 'STRING_VALUE'
  },
  domainName: 'STRING_VALUE' /* required */
};
lightsail.deleteDomainEntry(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: {})
    • domainName — (String)

      The name of the domain entry to delete.

    • domainEntry — (map)

      An array of key-value pairs containing information about your domain entries.

      • id — (String)

        The ID of the domain recordset entry.

      • name — (String)

        The name of the domain.

      • target — (String)

        The target AWS name server (e.g., ns-111.awsdns-22.com.).

      • type — (String)

        The type of domain entry (e.g., SOA or NS).

      • options — (map<String>)

        The options for the domain entry.

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:

      • operation — (map)

        An array of key-value pairs containing information about the results of your delete domain entry request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Deletes a specific Amazon Lightsail virtual private server, or instance.

Service Reference:

Examples:

Calling the deleteInstance operation

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

      The name of the instance to delete.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the results of your delete instance request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Deletes a specific snapshot of a virtual private server (or instance).

Service Reference:

Examples:

Calling the deleteInstanceSnapshot operation

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

      The name of the snapshot to delete.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the results of your delete instance snapshot request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Deletes a specific SSH key pair.

Service Reference:

Examples:

Calling the deleteKeyPair operation

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

      The name of the key pair to delete.

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:

      • operation — (map)

        An array of key-value pairs containing information about the results of your delete key pair request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Detaches a static IP from the Amazon Lightsail instance to which it is attached.

Service Reference:

Examples:

Calling the detachStaticIp operation

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

      The name of the static IP to detach from the instance.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the results of your detach static IP request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Downloads the default SSH key pair from the user's account.

Service Reference:

Examples:

Calling the downloadDefaultKeyPair operation

var params = {
};
lightsail.downloadDefaultKeyPair(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: {})

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:

      • publicKeyBase64 — (String)

        A base64-encoded public key of the ssh-rsa type.

      • privateKeyBase64 — (String)

        A base64-encoded RSA private key.

Returns:

  • (AWS.Request)

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

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

Returns the names of all active (not deleted) resources.

Service Reference:

Examples:

Calling the getActiveNames operation

var params = {
  pageToken: 'STRING_VALUE'
};
lightsail.getActiveNames(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: {})
    • pageToken — (String)

      A token used for paginating results from your get active names request.

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:

      • activeNames — (Array<String>)

        The list of active names returned by the get active names request.

      • nextPageToken — (String)

        A token used for advancing to the next page of results from your get active names request.

Returns:

  • (AWS.Request)

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

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

Returns the list of available instance images, or blueprints. You can use a blueprint to create a new virtual private server already running a specific operating system, as well as a preinstalled app or development stack. The software each instance is running depends on the blueprint image you choose.

Service Reference:

Examples:

Calling the getBlueprints operation

var params = {
  includeInactive: true || false,
  pageToken: 'STRING_VALUE'
};
lightsail.getBlueprints(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: {})
    • includeInactive — (Boolean)

      A Boolean value indicating whether to include inactive results in your request.

    • pageToken — (String)

      A token used for advancing to the next page of results from your get blueprints request.

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:

      • blueprints — (Array<map>)

        An array of key-value pairs that contains information about the available blueprints.

        • blueprintId — (String)

          The ID for the virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0).

        • name — (String)

          The friendly name of the blueprint (e.g., Amazon Linux).

        • group — (String)

          The group name of the blueprint (e.g., amazon-linux).

        • type — (String)

          The type of the blueprint (e.g., os or app).

          Possible values include:
          • "os"
          • "app"
        • description — (String)

          The description of the blueprint.

        • isActive — (Boolean)

          A Boolean value indicating whether the blueprint is active. When you update your blueprints, you will inactivate old blueprints and keep the most recent versions active.

        • minPower — (Integer)

          The minimum machine size required to run this blueprint. 0 indicates that the blueprint runs on all instances.

        • version — (String)

          The version number of the operating system, application, or stack (e.g., 2016.03.0).

        • versionCode — (String)

          The version code.

        • productUrl — (String)

          The product URL to learn more about the image or blueprint.

        • licenseUrl — (String)

          The end-user license agreement URL for the image or blueprint.

      • nextPageToken — (String)

        A token used for advancing to the next page of results from your get blueprints request.

Returns:

  • (AWS.Request)

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

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

Returns the list of bundles that are available for purchase. A bundle describes the specs for your virtual private server (or instance).

Service Reference:

Examples:

Calling the getBundles operation

var params = {
  includeInactive: true || false,
  pageToken: 'STRING_VALUE'
};
lightsail.getBundles(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: {})
    • includeInactive — (Boolean)

      A Boolean value that indicates whether to include inactive bundle results in your request.

    • pageToken — (String)

      A token used for advancing to the next page of results from your get bundles request.

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:

      • bundles — (Array<map>)

        An array of key-value pairs that contains information about the available bundles.

        • price — (Float)

          The price in US dollars (e.g., 5.0).

        • cpuCount — (Integer)

          The number of vCPUs included in the bundle (e.g., 2).

        • diskSizeInGb — (Integer)

          The size of the SSD (e.g., 30).

        • bundleId — (String)

          The bundle ID (e.g., micro_1_0).

        • instanceType — (String)

          The Amazon EC2 instance type (e.g., t2.micro).

        • isActive — (Boolean)

          A Boolean value indicating whether the bundle is active.

        • name — (String)

          A friendly name for the bundle (e.g., Micro).

        • power — (Integer)

          The power of the bundle (e.g., 500).

        • ramSizeInGb — (Float)

          The amount of RAM in GB (e.g., 2.0).

        • transferPerMonthInGb — (Integer)

          The data transfer rate per month in GB (e.g., 2000).

      • nextPageToken — (String)

        A token used for advancing to the next page of results from your get active names request.

Returns:

  • (AWS.Request)

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

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

Returns information about a specific domain recordset.

Service Reference:

Examples:

Calling the getDomain operation

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

      The domain name for which your want to return information about.

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:

      • domain — (map)

        An array of key-value pairs containing information about your get domain request.

        • name — (String)

          The name of the domain.

        • arn — (String)

          The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE).

        • supportCode — (String)

          The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

        • createdAt — (Date)

          The date when the domain recordset was created.

        • location — (map)

          The AWS Region and Availability Zones where the domain recordset was created.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • domainEntries — (Array<map>)

          An array of key-value pairs containing information about the domain entries.

          • id — (String)

            The ID of the domain recordset entry.

          • name — (String)

            The name of the domain.

          • target — (String)

            The target AWS name server (e.g., ns-111.awsdns-22.com.).

          • type — (String)

            The type of domain entry (e.g., SOA or NS).

          • options — (map<String>)

            The options for the domain entry.

Returns:

  • (AWS.Request)

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

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

Returns a list of all domains in the user's account.

Service Reference:

Examples:

Calling the getDomains operation

var params = {
  pageToken: 'STRING_VALUE'
};
lightsail.getDomains(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: {})
    • pageToken — (String)

      A token used for advancing to the next page of results from your get domains request.

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:

      • domains — (Array<map>)

        An array of key-value pairs containing information about each of the domain entries in the user's account.

        • name — (String)

          The name of the domain.

        • arn — (String)

          The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE).

        • supportCode — (String)

          The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

        • createdAt — (Date)

          The date when the domain recordset was created.

        • location — (map)

          The AWS Region and Availability Zones where the domain recordset was created.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • domainEntries — (Array<map>)

          An array of key-value pairs containing information about the domain entries.

          • id — (String)

            The ID of the domain recordset entry.

          • name — (String)

            The name of the domain.

          • target — (String)

            The target AWS name server (e.g., ns-111.awsdns-22.com.).

          • type — (String)

            The type of domain entry (e.g., SOA or NS).

          • options — (map<String>)

            The options for the domain entry.

      • nextPageToken — (String)

        A token used for advancing to the next page of results from your get active names request.

Returns:

  • (AWS.Request)

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

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

Returns information about a specific Amazon Lightsail instance, which is a virtual private server.

Service Reference:

Examples:

Calling the getInstance operation

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

      The name of the instance.

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:

      • instance — (map)

        An array of key-value pairs containing information about the specified instance.

        • name — (String)

          The name the user gave the instance (e.g., Amazon_Linux-1GB-Virginia-1).

        • arn — (String)

          The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-1:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE).

        • supportCode — (String)

          The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

        • createdAt — (Date)

          The timestamp when the instance was created (e.g., 1479734909.17).

        • location — (map)

          The region name and availability zone where the instance is located.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • resourceType — (String)

          The type of resource (usually Instance).

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • blueprintId — (String)

          The blueprint ID (e.g., os_amlinux_2016_03).

        • blueprintName — (String)

          The friendly name of the blueprint (e.g., Amazon Linux).

        • bundleId — (String)

          The bundle for the instance (e.g., micro_1_0).

        • isStaticIp — (Boolean)

          A Boolean value indicating whether this instance has a static IP assigned to it.

        • privateIpAddress — (String)

          The private IP address of the instance.

        • publicIpAddress — (String)

          The public IP address of the instance.

        • ipv6Address — (String)

          The IPv6 address of the instance.

        • hardware — (map)

          The size of the vCPU and the amount of RAM for the instance.

          • cpuCount — (Integer)

            The number of vCPUs the instance has.

          • disks — (Array<map>)

            The disks attached to the instance.

            • name — (String)

              The name of the disk.

            • arn — (String)

              The Amazon Resource Name (ARN) of the disk.

            • supportCode — (String)

              The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

            • createdAt — (Date)

              The date when the disk was created.

            • location — (map)

              The region and Availability Zone where the disk is located.

              • availabilityZone — (String)

                The Availability Zone. Follows the format us-east-1a (case-sensitive).

              • regionName — (String)

                The AWS Region name.

                Possible values include:
                • "us-east-1"
                • "us-west-1"
                • "us-west-2"
                • "eu-west-1"
                • "eu-central-1"
                • "ap-south-1"
                • "ap-southeast-1"
                • "ap-southeast-2"
                • "ap-northeast-1"
                • "ap-northeast-2"
            • resourceType — (String)

              The resource type of the disk.

              Possible values include:
              • "Instance"
              • "StaticIp"
              • "KeyPair"
              • "InstanceSnapshot"
              • "Domain"
              • "PeeredVpc"
            • sizeInGb — (Integer)

              The size of the disk in GB.

            • gbInUse — (Integer)

              The number of GB in use by the disk.

            • isSystemDisk — (Boolean)

              A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).

            • iops — (Integer)

              The input/output operations per second (IOPS) of the disk.

            • path — (String)

              The disk path.

            • attachedTo — (String)

              The resources to which the disk is attached.

            • isAttached — (Boolean)

              A Boolean value indicating whether the disk is attached.

            • attachmentState — (String)

              The attachment state of the disk.

          • ramSizeInGb — (Float)

            The amount of RAM in GB on the instance (e.g., 1.0).

        • networking — (map)

          Information about the public ports and monthly data transfer rates for the instance.

          • monthlyTransfer — (map)

            The amount of data in GB allocated for monthly data transfers.

            • gbPerMonthAllocated — (Integer)

              The amount allocated per month (in GB).

          • ports — (Array<map>)

            An array of key-value pairs containing information about the ports on the instance.

            • fromPort — (Integer)

              The first port in the range.

            • toPort — (Integer)

              The last port in the range.

            • protocol — (String)

              The protocol being used. Can be one of the following.

              • tcp - Transmission Control Protocol (TCP) provides reliable, ordered, and error-checked delivery of streamed data between applications running on hosts communicating by an IP network. If you have an application that doesn't require reliable data stream service, use UDP instead.

              • all - All transport layer protocol types. For more general information, see Transport layer on Wikipedia.

              • udp - With User Datagram Protocol (UDP), computer applications can send messages (or datagrams) to other hosts on an Internet Protocol (IP) network. Prior communications are not required to set up transmission channels or data paths. Applications that don't require reliable data stream service can use UDP, which provides a connectionless datagram service that emphasizes reduced latency over reliability. If you do require reliable data stream service, use TCP instead.

              Possible values include:
              • "tcp"
              • "all"
              • "udp"
            • accessFrom — (String)

              The location from which access is allowed (e.g., Anywhere (0.0.0.0/0)).

            • accessType — (String)

              The type of access (Public or Private).

              Possible values include:
              • "Public"
              • "Private"
            • commonName — (String)

              The common name.

            • accessDirection — (String)

              The access direction (inbound or outbound).

              Possible values include:
              • "inbound"
              • "outbound"
        • state — (map)

          The status code and the state (e.g., running) for the instance.

          • code — (Integer)

            The status code for the instance.

          • name — (String)

            The state of the instance (e.g., running or pending).

        • username — (String)

          The user name for connecting to the instance (e.g., ec2-user).

        • sshKeyName — (String)

          The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair).

Returns:

  • (AWS.Request)

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

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

Returns temporary SSH keys you can use to connect to a specific virtual private server, or instance.

Service Reference:

Examples:

Calling the getInstanceAccessDetails operation

var params = {
  instanceName: 'STRING_VALUE', /* required */
  protocol: ssh | rdp
};
lightsail.getInstanceAccessDetails(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: {})
    • instanceName — (String)

      The name of the instance to access.

    • protocol — (String)

      The protocol to use to connect to your instance. Defaults to ssh.

      Possible values include:
      • "ssh"
      • "rdp"

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:

      • accessDetails — (map)

        An array of key-value pairs containing information about a get instance access request.

        • certKey — (String)

          For SSH access, the public key to use when accessing your instance For OpenSSH clients (e.g., command line SSH), you should save this value to tempkey-cert.pub.

        • expiresAt — (Date)

          For SSH access, the date on which the temporary keys expire.

        • ipAddress — (String)

          The public IP address of the Amazon Lightsail instance.

        • password — (String)

          For RDP access, the temporary password of the Amazon EC2 instance.

        • privateKey — (String)

          For SSH access, the temporary private key. For OpenSSH clients (e.g., command line SSH), you should save this value to tempkey).

        • protocol — (String)

          The protocol for these Amazon Lightsail instance access details.

          Possible values include:
          • "ssh"
          • "rdp"
        • instanceName — (String)

          The name of this Amazon Lightsail instance.

        • username — (String)

          The user name to use when logging in to the Amazon Lightsail instance.

Returns:

  • (AWS.Request)

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

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

Returns the data points for the specified Amazon Lightsail instance metric, given an instance name.

Service Reference:

Examples:

Calling the getInstanceMetricData operation

var params = {
  endTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  instanceName: 'STRING_VALUE', /* required */
  metricName: CPUUtilization | NetworkIn | NetworkOut | StatusCheckFailed | StatusCheckFailed_Instance | StatusCheckFailed_System, /* required */
  period: 0, /* required */
  startTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  statistics: [ /* required */
    Minimum | Maximum | Sum | Average | SampleCount,
    /* more items */
  ],
  unit: Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | None /* required */
};
lightsail.getInstanceMetricData(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: {})
    • instanceName — (String)

      The name of the instance for which you want to get metrics data.

    • metricName — (String)

      The metric name to get data about.

      Possible values include:
      • "CPUUtilization"
      • "NetworkIn"
      • "NetworkOut"
      • "StatusCheckFailed"
      • "StatusCheckFailed_Instance"
      • "StatusCheckFailed_System"
    • period — (Integer)

      The time period for which you are requesting data.

    • startTime — (Date)

      The start time of the time period.

    • endTime — (Date)

      The end time of the time period.

    • unit — (String)

      The unit. The list of valid values is below.

      Possible values include:
      • "Seconds"
      • "Microseconds"
      • "Milliseconds"
      • "Bytes"
      • "Kilobytes"
      • "Megabytes"
      • "Gigabytes"
      • "Terabytes"
      • "Bits"
      • "Kilobits"
      • "Megabits"
      • "Gigabits"
      • "Terabits"
      • "Percent"
      • "Count"
      • "Bytes/Second"
      • "Kilobytes/Second"
      • "Megabytes/Second"
      • "Gigabytes/Second"
      • "Terabytes/Second"
      • "Bits/Second"
      • "Kilobits/Second"
      • "Megabits/Second"
      • "Gigabits/Second"
      • "Terabits/Second"
      • "Count/Second"
      • "None"
    • statistics — (Array<String>)

      The instance statistics.

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:

      • metricName — (String)

        The metric name to return data for.

        Possible values include:
        • "CPUUtilization"
        • "NetworkIn"
        • "NetworkOut"
        • "StatusCheckFailed"
        • "StatusCheckFailed_Instance"
        • "StatusCheckFailed_System"
      • metricData — (Array<map>)

        An array of key-value pairs containing information about the results of your get instance metric data request.

        • average — (Float)

          The average.

        • maximum — (Float)

          The maximum.

        • minimum — (Float)

          The minimum.

        • sampleCount — (Float)

          The sample count.

        • sum — (Float)

          The sum.

        • timestamp — (Date)

          The timestamp (e.g., 1479816991.349).

        • unit — (String)

          The unit.

          Possible values include:
          • "Seconds"
          • "Microseconds"
          • "Milliseconds"
          • "Bytes"
          • "Kilobytes"
          • "Megabytes"
          • "Gigabytes"
          • "Terabytes"
          • "Bits"
          • "Kilobits"
          • "Megabits"
          • "Gigabits"
          • "Terabits"
          • "Percent"
          • "Count"
          • "Bytes/Second"
          • "Kilobytes/Second"
          • "Megabytes/Second"
          • "Gigabytes/Second"
          • "Terabytes/Second"
          • "Bits/Second"
          • "Kilobits/Second"
          • "Megabits/Second"
          • "Gigabits/Second"
          • "Terabits/Second"
          • "Count/Second"
          • "None"

Returns:

  • (AWS.Request)

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

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

Returns the port states for a specific virtual private server, or instance.

Service Reference:

Examples:

Calling the getInstancePortStates operation

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

      The name of the instance.

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:

      • portStates — (Array<map>)

        Information about the port states resulting from your request.

        • fromPort — (Integer)

          The first port in the range.

        • toPort — (Integer)

          The last port in the range.

        • protocol — (String)

          The protocol being used. Can be one of the following.

          • tcp - Transmission Control Protocol (TCP) provides reliable, ordered, and error-checked delivery of streamed data between applications running on hosts communicating by an IP network. If you have an application that doesn't require reliable data stream service, use UDP instead.

          • all - All transport layer protocol types. For more general information, see Transport layer on Wikipedia.

          • udp - With User Datagram Protocol (UDP), computer applications can send messages (or datagrams) to other hosts on an Internet Protocol (IP) network. Prior communications are not required to set up transmission channels or data paths. Applications that don't require reliable data stream service can use UDP, which provides a connectionless datagram service that emphasizes reduced latency over reliability. If you do require reliable data stream service, use TCP instead.

          Possible values include:
          • "tcp"
          • "all"
          • "udp"
        • state — (String)

          Specifies whether the instance port is open or closed.

          Possible values include:
          • "open"
          • "closed"

Returns:

  • (AWS.Request)

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

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

Returns information about all Amazon Lightsail virtual private servers, or instances.

Service Reference:

Examples:

Calling the getInstances operation

var params = {
  pageToken: 'STRING_VALUE'
};
lightsail.getInstances(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: {})
    • pageToken — (String)

      A token used for advancing to the next page of results from your get instances request.

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>)

        An array of key-value pairs containing information about your instances.

        • name — (String)

          The name the user gave the instance (e.g., Amazon_Linux-1GB-Virginia-1).

        • arn — (String)

          The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-1:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE).

        • supportCode — (String)

          The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

        • createdAt — (Date)

          The timestamp when the instance was created (e.g., 1479734909.17).

        • location — (map)

          The region name and availability zone where the instance is located.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • resourceType — (String)

          The type of resource (usually Instance).

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • blueprintId — (String)

          The blueprint ID (e.g., os_amlinux_2016_03).

        • blueprintName — (String)

          The friendly name of the blueprint (e.g., Amazon Linux).

        • bundleId — (String)

          The bundle for the instance (e.g., micro_1_0).

        • isStaticIp — (Boolean)

          A Boolean value indicating whether this instance has a static IP assigned to it.

        • privateIpAddress — (String)

          The private IP address of the instance.

        • publicIpAddress — (String)

          The public IP address of the instance.

        • ipv6Address — (String)

          The IPv6 address of the instance.

        • hardware — (map)

          The size of the vCPU and the amount of RAM for the instance.

          • cpuCount — (Integer)

            The number of vCPUs the instance has.

          • disks — (Array<map>)

            The disks attached to the instance.

            • name — (String)

              The name of the disk.

            • arn — (String)

              The Amazon Resource Name (ARN) of the disk.

            • supportCode — (String)

              The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

            • createdAt — (Date)

              The date when the disk was created.

            • location — (map)

              The region and Availability Zone where the disk is located.

              • availabilityZone — (String)

                The Availability Zone. Follows the format us-east-1a (case-sensitive).

              • regionName — (String)

                The AWS Region name.

                Possible values include:
                • "us-east-1"
                • "us-west-1"
                • "us-west-2"
                • "eu-west-1"
                • "eu-central-1"
                • "ap-south-1"
                • "ap-southeast-1"
                • "ap-southeast-2"
                • "ap-northeast-1"
                • "ap-northeast-2"
            • resourceType — (String)

              The resource type of the disk.

              Possible values include:
              • "Instance"
              • "StaticIp"
              • "KeyPair"
              • "InstanceSnapshot"
              • "Domain"
              • "PeeredVpc"
            • sizeInGb — (Integer)

              The size of the disk in GB.

            • gbInUse — (Integer)

              The number of GB in use by the disk.

            • isSystemDisk — (Boolean)

              A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).

            • iops — (Integer)

              The input/output operations per second (IOPS) of the disk.

            • path — (String)

              The disk path.

            • attachedTo — (String)

              The resources to which the disk is attached.

            • isAttached — (Boolean)

              A Boolean value indicating whether the disk is attached.

            • attachmentState — (String)

              The attachment state of the disk.

          • ramSizeInGb — (Float)

            The amount of RAM in GB on the instance (e.g., 1.0).

        • networking — (map)

          Information about the public ports and monthly data transfer rates for the instance.

          • monthlyTransfer — (map)

            The amount of data in GB allocated for monthly data transfers.

            • gbPerMonthAllocated — (Integer)

              The amount allocated per month (in GB).

          • ports — (Array<map>)

            An array of key-value pairs containing information about the ports on the instance.

            • fromPort — (Integer)

              The first port in the range.

            • toPort — (Integer)

              The last port in the range.

            • protocol — (String)

              The protocol being used. Can be one of the following.

              • tcp - Transmission Control Protocol (TCP) provides reliable, ordered, and error-checked delivery of streamed data between applications running on hosts communicating by an IP network. If you have an application that doesn't require reliable data stream service, use UDP instead.

              • all - All transport layer protocol types. For more general information, see Transport layer on Wikipedia.

              • udp - With User Datagram Protocol (UDP), computer applications can send messages (or datagrams) to other hosts on an Internet Protocol (IP) network. Prior communications are not required to set up transmission channels or data paths. Applications that don't require reliable data stream service can use UDP, which provides a connectionless datagram service that emphasizes reduced latency over reliability. If you do require reliable data stream service, use TCP instead.

              Possible values include:
              • "tcp"
              • "all"
              • "udp"
            • accessFrom — (String)

              The location from which access is allowed (e.g., Anywhere (0.0.0.0/0)).

            • accessType — (String)

              The type of access (Public or Private).

              Possible values include:
              • "Public"
              • "Private"
            • commonName — (String)

              The common name.

            • accessDirection — (String)

              The access direction (inbound or outbound).

              Possible values include:
              • "inbound"
              • "outbound"
        • state — (map)

          The status code and the state (e.g., running) for the instance.

          • code — (Integer)

            The status code for the instance.

          • name — (String)

            The state of the instance (e.g., running or pending).

        • username — (String)

          The user name for connecting to the instance (e.g., ec2-user).

        • sshKeyName — (String)

          The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair).

      • nextPageToken — (String)

        A token used for advancing to the next page of results from your get instances request.

Returns:

  • (AWS.Request)

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

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

Returns information about a specific instance snapshot.

Service Reference:

Examples:

Calling the getInstanceSnapshot operation

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

      The name of the snapshot for which you are requesting information.

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:

      • instanceSnapshot — (map)

        An array of key-value pairs containing information about the results of your get instance snapshot request.

        • name — (String)

          The name of the snapshot.

        • arn — (String)

          The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-1:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE).

        • supportCode — (String)

          The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

        • createdAt — (Date)

          The timestamp when the snapshot was created (e.g., 1479907467.024).

        • location — (map)

          The region name and availability zone where you created the snapshot.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • resourceType — (String)

          The type of resource (usually InstanceSnapshot).

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • state — (String)

          The state the snapshot is in.

          Possible values include:
          • "pending"
          • "error"
          • "available"
        • progress — (String)

          The progress of the snapshot.

        • fromInstanceName — (String)

          The instance from which the snapshot was created.

        • fromInstanceArn — (String)

          The Amazon Resource Name (ARN) of the instance from which the snapshot was created (e.g., arn:aws:lightsail:us-east-1:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE).

        • fromBlueprintId — (String)

          The blueprint ID from which you created the snapshot (e.g., os_debian_8_3). A blueprint is a virtual private server (or instance) image used to create instances quickly.

        • fromBundleId — (String)

          The bundle ID from which you created the snapshot (e.g., micro_1_0).

        • sizeInGb — (Integer)

          The size in GB of the SSD.

Returns:

  • (AWS.Request)

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

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

Returns all instance snapshots for the user's account.

Service Reference:

Examples:

Calling the getInstanceSnapshots operation

var params = {
  pageToken: 'STRING_VALUE'
};
lightsail.getInstanceSnapshots(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: {})
    • pageToken — (String)

      A token used for advancing to the next page of results from your get instance snapshots request.

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:

      • instanceSnapshots — (Array<map>)

        An array of key-value pairs containing information about the results of your get instance snapshots request.

        • name — (String)

          The name of the snapshot.

        • arn — (String)

          The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-1:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE).

        • supportCode — (String)

          The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

        • createdAt — (Date)

          The timestamp when the snapshot was created (e.g., 1479907467.024).

        • location — (map)

          The region name and availability zone where you created the snapshot.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • resourceType — (String)

          The type of resource (usually InstanceSnapshot).

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • state — (String)

          The state the snapshot is in.

          Possible values include:
          • "pending"
          • "error"
          • "available"
        • progress — (String)

          The progress of the snapshot.

        • fromInstanceName — (String)

          The instance from which the snapshot was created.

        • fromInstanceArn — (String)

          The Amazon Resource Name (ARN) of the instance from which the snapshot was created (e.g., arn:aws:lightsail:us-east-1:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE).

        • fromBlueprintId — (String)

          The blueprint ID from which you created the snapshot (e.g., os_debian_8_3). A blueprint is a virtual private server (or instance) image used to create instances quickly.

        • fromBundleId — (String)

          The bundle ID from which you created the snapshot (e.g., micro_1_0).

        • sizeInGb — (Integer)

          The size in GB of the SSD.

      • nextPageToken — (String)

        A token used for advancing to the next page of results from your get instance snapshots request.

Returns:

  • (AWS.Request)

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

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

Returns the state of a specific instance. Works on one instance at a time.

Service Reference:

Examples:

Calling the getInstanceState operation

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

      The name of the instance to get state information about.

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:

      • state — (map)

        The state of the instance.

        • code — (Integer)

          The status code for the instance.

        • name — (String)

          The state of the instance (e.g., running or pending).

Returns:

  • (AWS.Request)

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

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

Returns information about a specific key pair.

Service Reference:

Examples:

Calling the getKeyPair operation

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

      The name of the key pair for which you are requesting information.

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:

      • keyPair — (map)

        An array of key-value pairs containing information about the key pair.

        • name — (String)

          The friendly name of the SSH key pair.

        • arn — (String)

          The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-1:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE).

        • supportCode — (String)

          The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

        • createdAt — (Date)

          The timestamp when the key pair was created (e.g., 1479816991.349).

        • location — (map)

          The region name and Availability Zone where the key pair was created.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • resourceType — (String)

          The resource type (usually KeyPair).

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • fingerprint — (String)

          The RSA fingerprint of the key pair.

Returns:

  • (AWS.Request)

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

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

Returns information about all key pairs in the user's account.

Service Reference:

Examples:

Calling the getKeyPairs operation

var params = {
  pageToken: 'STRING_VALUE'
};
lightsail.getKeyPairs(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: {})
    • pageToken — (String)

      A token used for advancing to the next page of results from your get key pairs request.

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:

      • keyPairs — (Array<map>)

        An array of key-value pairs containing information about the key pairs.

        • name — (String)

          The friendly name of the SSH key pair.

        • arn — (String)

          The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-1:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE).

        • supportCode — (String)

          The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

        • createdAt — (Date)

          The timestamp when the key pair was created (e.g., 1479816991.349).

        • location — (map)

          The region name and Availability Zone where the key pair was created.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • resourceType — (String)

          The resource type (usually KeyPair).

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • fingerprint — (String)

          The RSA fingerprint of the key pair.

      • nextPageToken — (String)

        A token used for advancing to the next page of results from your get key pairs request.

Returns:

  • (AWS.Request)

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

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

Returns information about a specific operation. Operations include events such as when you create an instance, allocate a static IP, attach a static IP, and so on.

Service Reference:

Examples:

Calling the getOperation operation

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

      A GUID used to identify the 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:

      • operation — (map)

        An array of key-value pairs containing information about the results of your get operation request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Returns information about all operations.

Results are returned from oldest to newest, up to a maximum of 200. Results can be paged by making each subsequent call to GetOperations use the maximum (last) statusChangedAt value from the previous request.

Service Reference:

Examples:

Calling the getOperations operation

var params = {
  pageToken: 'STRING_VALUE'
};
lightsail.getOperations(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: {})
    • pageToken — (String)

      A token used for advancing to the next page of results from your get operations request.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the results of your get operations request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

      • nextPageToken — (String)

        A token used for advancing to the next page of results from your get operations request.

Returns:

  • (AWS.Request)

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

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

Gets operations for a specific resource (e.g., an instance or a static IP).

Service Reference:

Examples:

Calling the getOperationsForResource operation

var params = {
  resourceName: 'STRING_VALUE', /* required */
  pageToken: 'STRING_VALUE'
};
lightsail.getOperationsForResource(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: {})
    • resourceName — (String)

      The name of the resource for which you are requesting information.

    • pageToken — (String)

      A token used for advancing to the next page of results from your get operations for resource request.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the results of your get operations for resource request.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

      • nextPageCount — (String)

        Returns the number of pages of results that remain.

Returns:

  • (AWS.Request)

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

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

Returns a list of all valid regions for Amazon Lightsail. Use the include availability zones parameter to also return the availability zones in a region.

Service Reference:

Examples:

Calling the getRegions operation

var params = {
  includeAvailabilityZones: true || false
};
lightsail.getRegions(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: {})
    • includeAvailabilityZones — (Boolean)

      A Boolean value indicating whether to also include Availability Zones in your get regions request. Availability Zones are indicated with a letter: e.g., us-east-1a.

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:

      • regions — (Array<map>)

        An array of key-value pairs containing information about your get regions request.

        • continentCode — (String)

          The continent code (e.g., NA, meaning North America).

        • description — (String)

          The description of the AWS Region (e.g., This region is recommended to serve users in the eastern United States and eastern Canada).

        • displayName — (String)

          The display name (e.g., Virginia).

        • name — (String)

          The region name (e.g., us-east-1).

          Possible values include:
          • "us-east-1"
          • "us-west-1"
          • "us-west-2"
          • "eu-west-1"
          • "eu-central-1"
          • "ap-south-1"
          • "ap-southeast-1"
          • "ap-southeast-2"
          • "ap-northeast-1"
          • "ap-northeast-2"
        • availabilityZones — (Array<map>)

          The Availability Zones. Follows the format us-east-1a (case-sensitive).

          • zoneName — (String)

            The name of the Availability Zone. The format is us-east-1a (case-sensitive).

          • state — (String)

            The state of the Availability Zone.

Returns:

  • (AWS.Request)

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

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

Returns information about a specific static IP.

Service Reference:

Examples:

Calling the getStaticIp operation

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

      The name of the static IP in Lightsail.

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:

      • staticIp — (map)

        An array of key-value pairs containing information about the requested static IP.

        • name — (String)

          The name of the static IP (e.g., StaticIP-Virginia-EXAMPLE).

        • arn — (String)

          The Amazon Resource Name (ARN) of the static IP (e.g., arn:aws:lightsail:us-east-1:123456789101:StaticIp/9cbb4a9e-f8e3-4dfe-b57e-12345EXAMPLE).

        • supportCode — (String)

          The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

        • createdAt — (Date)

          The timestamp when the static IP was created (e.g., 1479735304.222).

        • location — (map)

          The region and Availability Zone where the static IP was created.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • resourceType — (String)

          The resource type (usually StaticIp).

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • ipAddress — (String)

          The static IP address.

        • attachedTo — (String)

          The instance where the static IP is attached (e.g., Amazon_Linux-1GB-Virginia-1).

        • isAttached — (Boolean)

          A Boolean value indicating whether the static IP is attached.

Returns:

  • (AWS.Request)

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

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

Returns information about all static IPs in the user's account.

Service Reference:

Examples:

Calling the getStaticIps operation

var params = {
  pageToken: 'STRING_VALUE'
};
lightsail.getStaticIps(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: {})
    • pageToken — (String)

      A token used for advancing to the next page of results from your get static IPs request.

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:

      • staticIps — (Array<map>)

        An array of key-value pairs containing information about your get static IPs request.

        • name — (String)

          The name of the static IP (e.g., StaticIP-Virginia-EXAMPLE).

        • arn — (String)

          The Amazon Resource Name (ARN) of the static IP (e.g., arn:aws:lightsail:us-east-1:123456789101:StaticIp/9cbb4a9e-f8e3-4dfe-b57e-12345EXAMPLE).

        • supportCode — (String)

          The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

        • createdAt — (Date)

          The timestamp when the static IP was created (e.g., 1479735304.222).

        • location — (map)

          The region and Availability Zone where the static IP was created.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • resourceType — (String)

          The resource type (usually StaticIp).

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • ipAddress — (String)

          The static IP address.

        • attachedTo — (String)

          The instance where the static IP is attached (e.g., Amazon_Linux-1GB-Virginia-1).

        • isAttached — (Boolean)

          A Boolean value indicating whether the static IP is attached.

      • nextPageToken — (String)

        A token used for advancing to the next page of results from your get static IPs request.

Returns:

  • (AWS.Request)

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

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

Imports a public SSH key from a specific key pair.

Service Reference:

Examples:

Calling the importKeyPair operation

var params = {
  keyPairName: 'STRING_VALUE', /* required */
  publicKeyBase64: 'STRING_VALUE' /* required */
};
lightsail.importKeyPair(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: {})
    • keyPairName — (String)

      The name of the key pair for which you want to import the public key.

    • publicKeyBase64 — (String)

      A base64-encoded public key of the ssh-rsa type.

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:

      • operation — (map)

        An array of key-value pairs containing information about the request operation.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Returns a Boolean value indicating whether your Lightsail VPC is peered.

Service Reference:

Examples:

Calling the isVpcPeered operation

var params = {
};
lightsail.isVpcPeered(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: {})

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:

      • isPeered — (Boolean)

        Returns true if the Lightsail VPC is peered; otherwise, false.

Returns:

  • (AWS.Request)

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

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

Adds public ports to an Amazon Lightsail instance.

Service Reference:

Examples:

Calling the openInstancePublicPorts operation

var params = {
  instanceName: 'STRING_VALUE', /* required */
  portInfo: { /* required */
    fromPort: 0,
    protocol: tcp | all | udp,
    toPort: 0
  }
};
lightsail.openInstancePublicPorts(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: {})
    • portInfo — (map)

      An array of key-value pairs containing information about the port mappings.

      • fromPort — (Integer)

        The first port in the range.

      • toPort — (Integer)

        The last port in the range.

      • protocol — (String)

        The protocol.

        Possible values include:
        • "tcp"
        • "all"
        • "udp"
    • instanceName — (String)

      The name of the instance for which you want to open the public ports.

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:

      • operation — (map)

        An array of key-value pairs containing information about the request operation.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Tries to peer the Lightsail VPC with the user's default VPC.

Service Reference:

Examples:

Calling the peerVpc operation

var params = {
};
lightsail.peerVpc(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: {})

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:

      • operation — (map)

        An array of key-value pairs containing information about the request operation.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Sets the specified open ports for an Amazon Lightsail instance, and closes all ports for every protocol not included in the current request.

Service Reference:

Examples:

Calling the putInstancePublicPorts operation

var params = {
  instanceName: 'STRING_VALUE', /* required */
  portInfos: [ /* required */
    {
      fromPort: 0,
      protocol: tcp | all | udp,
      toPort: 0
    },
    /* more items */
  ]
};
lightsail.putInstancePublicPorts(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: {})
    • portInfos — (Array<map>)

      Specifies information about the public port(s).

      • fromPort — (Integer)

        The first port in the range.

      • toPort — (Integer)

        The last port in the range.

      • protocol — (String)

        The protocol.

        Possible values include:
        • "tcp"
        • "all"
        • "udp"
    • instanceName — (String)

      The Lightsail instance name of the public port(s) you are setting.

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:

      • operation — (map)

        Describes metadata about the operation you just executed.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Restarts a specific instance. When your Amazon Lightsail instance is finished rebooting, Lightsail assigns a new public IP address. To use the same IP address after restarting, create a static IP address and attach it to the instance.

Service Reference:

Examples:

Calling the rebootInstance operation

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

      The name of the instance to reboot.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the request operation.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Deletes a specific static IP from your account.

Service Reference:

Examples:

Calling the releaseStaticIp operation

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

      The name of the static IP to delete.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the request operation.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Starts a specific Amazon Lightsail instance from a stopped state. To restart an instance, use the reboot instance operation.

Service Reference:

Examples:

Calling the startInstance operation

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

      The name of the instance (a virtual private server) to start.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the request operation.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Stops a specific Amazon Lightsail instance that is currently running.

Service Reference:

Examples:

Calling the stopInstance operation

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

      The name of the instance (a virtual private server) to stop.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the request operation.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Attempts to unpeer the Lightsail VPC from the user's default VPC.

Service Reference:

Examples:

Calling the unpeerVpc operation

var params = {
};
lightsail.unpeerVpc(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: {})

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:

      • operation — (map)

        An array of key-value pairs containing information about the request operation.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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

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

Updates a domain recordset after it is created.

Service Reference:

Examples:

Calling the updateDomainEntry operation

var params = {
  domainEntry: { /* required */
    id: 'STRING_VALUE',
    name: 'STRING_VALUE',
    options: {
      '<DomainEntryOptionsKeys>': 'STRING_VALUE',
      /* '<DomainEntryOptionsKeys>': ... */
    },
    target: 'STRING_VALUE',
    type: 'STRING_VALUE'
  },
  domainName: 'STRING_VALUE' /* required */
};
lightsail.updateDomainEntry(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: {})
    • domainName — (String)

      The name of the domain recordset to update.

    • domainEntry — (map)

      An array of key-value pairs containing information about the domain entry.

      • id — (String)

        The ID of the domain recordset entry.

      • name — (String)

        The name of the domain.

      • target — (String)

        The target AWS name server (e.g., ns-111.awsdns-22.com.).

      • type — (String)

        The type of domain entry (e.g., SOA or NS).

      • options — (map<String>)

        The options for the domain entry.

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:

      • operations — (Array<map>)

        An array of key-value pairs containing information about the request operation.

        • id — (String)

          The ID of the operation.

        • resourceName — (String)

          The resource name.

        • resourceType — (String)

          The resource type.

          Possible values include:
          • "Instance"
          • "StaticIp"
          • "KeyPair"
          • "InstanceSnapshot"
          • "Domain"
          • "PeeredVpc"
        • createdAt — (Date)

          The timestamp when the operation was initialized (e.g., 1479816991.349).

        • location — (map)

          The region and Availability Zone.

          • availabilityZone — (String)

            The Availability Zone. Follows the format us-east-1a (case-sensitive).

          • regionName — (String)

            The AWS Region name.

            Possible values include:
            • "us-east-1"
            • "us-west-1"
            • "us-west-2"
            • "eu-west-1"
            • "eu-central-1"
            • "ap-south-1"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-northeast-1"
            • "ap-northeast-2"
        • isTerminal — (Boolean)

          A Boolean value indicating whether the operation is terminal.

        • operationDetails — (String)

          Details about the operation (e.g., Debian-1GB-Virginia-1).

        • operationType — (String)

          The type of operation.

          Possible values include:
          • "DeleteInstance"
          • "CreateInstance"
          • "StopInstance"
          • "StartInstance"
          • "RebootInstance"
          • "OpenInstancePublicPorts"
          • "PutInstancePublicPorts"
          • "CloseInstancePublicPorts"
          • "AllocateStaticIp"
          • "ReleaseStaticIp"
          • "AttachStaticIp"
          • "DetachStaticIp"
          • "UpdateDomainEntry"
          • "DeleteDomainEntry"
          • "CreateDomain"
          • "DeleteDomain"
          • "CreateInstanceSnapshot"
          • "DeleteInstanceSnapshot"
          • "CreateInstancesFromSnapshot"
        • status — (String)

          The status of the operation.

          Possible values include:
          • "NotStarted"
          • "Started"
          • "Failed"
          • "Completed"
        • statusChangedAt — (Date)

          The timestamp when the status was changed (e.g., 1479816991.349).

        • errorCode — (String)

          The error code.

        • errorDetails — (String)

          The error details.

Returns:

  • (AWS.Request)

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