Class: AWS.EC2

Inherits:
AWS.Service show all
Identifier:
ec2
API Version:
2016-04-01
Defined in:
(unknown)

Overview

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

Sending a Request Using EC2

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

var ec2 = new AWS.EC2({apiVersion: '2016-04-01'});

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

AWS.config.apiVersions = {
  ec2: '2016-04-01',
  // other service API versions
};

var ec2 = new AWS.EC2();

Version:

  • 2016-04-01

Waiter Resource States

This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:

instanceExists, bundleTaskComplete, conversionTaskCancelled, conversionTaskCompleted, conversionTaskDeleted, customerGatewayAvailable, exportTaskCancelled, exportTaskCompleted, imageExists, imageAvailable, instanceRunning, instanceStatusOk, instanceStopped, instanceTerminated, keyPairExists, natGatewayAvailable, networkInterfaceAvailable, passwordDataAvailable, snapshotCompleted, spotInstanceRequestFulfilled, subnetAvailable, systemStatusOk, volumeAvailable, volumeDeleted, volumeInUse, vpcAvailable, vpcExists, vpnConnectionAvailable, vpnConnectionDeleted, vpcPeeringConnectionExists

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, defineService

Constructor Details

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

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

Examples:

Constructing a EC2 object

var ec2 = new AWS.EC2({apiVersion: '2016-04-01'});

Options Hash (options):

  • params (map)

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

  • endpoint (String)

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

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

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

  • credentialProvider (AWS.CredentialProviderChain)

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

  • region (String)

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

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

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

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

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

Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the pending-acceptance state, and you must be the owner of the peer VPC. Use the DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests.

Examples:

Calling the acceptVpcPeeringConnection operation

var params = {
  DryRun: true || false,
  VpcPeeringConnectionId: 'STRING_VALUE'
};
ec2.acceptVpcPeeringConnection(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpcPeeringConnectionId — (String)

      The ID of the VPC peering connection.

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:

      • VpcPeeringConnection — (map)

        Information about the VPC peering connection.

        • AccepterVpcInfo — (map)

          Information about the accepter VPC. CIDR block information is not returned when creating a VPC peering connection, or when describing a VPC peering connection that's in the initiating-request or pending-acceptance state.

          • CidrBlock — (String)

            The CIDR block for the VPC.

          • OwnerId — (String)

            The AWS account ID of the VPC owner.

          • VpcId — (String)

            The ID of the VPC.

          • PeeringOptions — (map)

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowEgressFromLocalClassicLinkToRemoteVpc — (Boolean)

              Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

            • AllowEgressFromLocalVpcToRemoteClassicLink — (Boolean)

              Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

        • ExpirationTime — (Date)

          The time that an unaccepted VPC peering connection will expire.

        • RequesterVpcInfo — (map)

          Information about the requester VPC.

          • CidrBlock — (String)

            The CIDR block for the VPC.

          • OwnerId — (String)

            The AWS account ID of the VPC owner.

          • VpcId — (String)

            The ID of the VPC.

          • PeeringOptions — (map)

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowEgressFromLocalClassicLinkToRemoteVpc — (Boolean)

              Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

            • AllowEgressFromLocalVpcToRemoteClassicLink — (Boolean)

              Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

        • Status — (map)

          The status of the VPC peering connection.

          • Code — (String)

            The status of the VPC peering connection.

            Possible values include:
            • "initiating-request"
            • "pending-acceptance"
            • "active"
            • "deleted"
            • "rejected"
            • "failed"
            • "expired"
            • "provisioning"
            • "deleting"
          • Message — (String)

            A message that provides more information about the status, if applicable.

        • Tags — (Array<map>)

          Any tags assigned to the resource.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • VpcPeeringConnectionId — (String)

          The ID of the VPC peering connection.

Returns:

  • (AWS.Request)

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

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

Acquires an Elastic IP address.

An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the allocateAddress operation

var params = {
  Domain: 'vpc | standard',
  DryRun: true || false
};
ec2.allocateAddress(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • Domain — (String)

      Set to vpc to allocate the address for use with instances in a VPC.

      Default: The address is for use with instances in EC2-Classic.

      Possible values include:
      • "vpc"
      • "standard"

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:

      • PublicIp — (String)

        The Elastic IP address.

      • Domain — (String)

        Indicates whether this Elastic IP address is for use with instances in EC2-Classic (standard) or instances in a VPC (vpc).

        Possible values include:
        • "vpc"
        • "standard"
      • AllocationId — (String)

        [EC2-VPC] The ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.

Returns:

  • (AWS.Request)

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

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

Allocates a Dedicated Host to your account. At minimum you need to specify the instance size type, Availability Zone, and quantity of hosts you want to allocate.

Examples:

Calling the allocateHosts operation

var params = {
  AvailabilityZone: 'STRING_VALUE', /* required */
  InstanceType: 'STRING_VALUE', /* required */
  Quantity: 0, /* required */
  AutoPlacement: 'on | off',
  ClientToken: 'STRING_VALUE'
};
ec2.allocateHosts(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: {})
    • AutoPlacement — (String)

      This is enabled by default. This property allows instances to be automatically placed onto available Dedicated Hosts, when you are launching instances without specifying a host ID.

      Default: Enabled

      Possible values include:
      • "on"
      • "off"
    • ClientToken — (String)

      Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

    • InstanceType — (String)

      Specify the instance type that you want your Dedicated Hosts to be configured for. When you specify the instance type, that is the only instance type that you can launch onto that host.

    • Quantity — (Integer)

      The number of Dedicated Hosts you want to allocate to your account with these parameters.

    • AvailabilityZone — (String)

      The Availability Zone for the Dedicated Hosts.

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:

      • HostIds — (Array<String>)

        The ID of the allocated Dedicated Host. This is used when you want to launch an instance onto a specific host.

Returns:

  • (AWS.Request)

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

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

Assigns one or more secondary private IP addresses to the specified network interface. You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can assign to an instance varies by instance type. For information about instance types, see Instance Types in the Amazon Elastic Compute Cloud User Guide. For more information about Elastic IP addresses, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

AssignPrivateIpAddresses is available only in EC2-VPC.

Examples:

Calling the assignPrivateIpAddresses operation

var params = {
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  AllowReassignment: true || false,
  PrivateIpAddresses: [
    'STRING_VALUE',
    /* more items */
  ],
  SecondaryPrivateIpAddressCount: 0
};
ec2.assignPrivateIpAddresses(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: {})
    • NetworkInterfaceId — (String)

      The ID of the network interface.

    • PrivateIpAddresses — (Array<String>)

      One or more IP addresses to be assigned as a secondary private IP address to the network interface. You can't specify this parameter when also specifying a number of secondary IP addresses.

      If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

    • SecondaryPrivateIpAddressCount — (Integer)

      The number of secondary IP addresses to assign to the network interface. You can't specify this parameter when also specifying private IP addresses.

    • AllowReassignment — (Boolean)

      Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Associates an Elastic IP address with an instance or a network interface.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

[EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance.

[VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation.

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

Examples:

Calling the associateAddress operation

var params = {
  AllocationId: 'STRING_VALUE',
  AllowReassociation: true || false,
  DryRun: true || false,
  InstanceId: 'STRING_VALUE',
  NetworkInterfaceId: 'STRING_VALUE',
  PrivateIpAddress: 'STRING_VALUE',
  PublicIp: 'STRING_VALUE'
};
ec2.associateAddress(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • InstanceId — (String)

      The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.

    • PublicIp — (String)

      The Elastic IP address. This is required for EC2-Classic.

    • AllocationId — (String)

      [EC2-VPC] The allocation ID. This is required for EC2-VPC.

    • NetworkInterfaceId — (String)

      [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

    • PrivateIpAddress — (String)

      [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

    • AllowReassociation — (Boolean)

      [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • AssociationId — (String)

        [EC2-VPC] The ID that represents the association of the Elastic IP address with an instance.

Returns:

  • (AWS.Request)

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

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

Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.

After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.

For more information, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the associateDhcpOptions operation

var params = {
  DhcpOptionsId: 'STRING_VALUE', /* required */
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.associateDhcpOptions(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • DhcpOptionsId — (String)

      The ID of the DHCP options set, or default to associate no DHCP options with the VPC.

    • VpcId — (String)

      The ID of the VPC.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table from the subnet later. A route table can be associated with multiple subnets.

For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the associateRouteTable operation

var params = {
  RouteTableId: 'STRING_VALUE', /* required */
  SubnetId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.associateRouteTable(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • SubnetId — (String)

      The ID of the subnet.

    • RouteTableId — (String)

      The ID of the route table.

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:

      • AssociationId — (String)

        The route table association ID (needed to disassociate the route table).

Returns:

  • (AWS.Request)

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

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

Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the running state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.

After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.

Linking your instance to a VPC is sometimes referred to as attaching your instance.

Examples:

Calling the attachClassicLinkVpc operation

var params = {
  Groups: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  InstanceId: 'STRING_VALUE', /* required */
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.attachClassicLinkVpc(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • InstanceId — (String)

      The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.

    • VpcId — (String)

      The ID of a ClassicLink-enabled VPC.

    • Groups — (Array<String>)

      The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.

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:

      • Return — (Boolean)

        Returns true if the request succeeds; otherwise, it returns an error.

Returns:

  • (AWS.Request)

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

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

Attaches an Internet gateway to a VPC, enabling connectivity between the Internet and the VPC. For more information about your VPC and Internet gateway, see the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the attachInternetGateway operation

var params = {
  InternetGatewayId: 'STRING_VALUE', /* required */
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.attachInternetGateway(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • InternetGatewayId — (String)

      The ID of the Internet gateway.

    • VpcId — (String)

      The ID of the VPC.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Attaches a network interface to an instance.

Examples:

Calling the attachNetworkInterface operation

var params = {
  DeviceIndex: 0, /* required */
  InstanceId: 'STRING_VALUE', /* required */
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.attachNetworkInterface(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • NetworkInterfaceId — (String)

      The ID of the network interface.

    • InstanceId — (String)

      The ID of the instance.

    • DeviceIndex — (Integer)

      The index of the device for the network interface attachment.

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:

      • AttachmentId — (String)

        The ID of the network interface attachment.

Returns:

  • (AWS.Request)

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

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

Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.

Encrypted EBS volumes may only be attached to instances that support Amazon EBS encryption. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

For a list of supported device names, see Attaching an EBS Volume to an Instance. Any device names that aren't reserved for instance store volumes can be used for EBS volumes. For more information, see Amazon EC2 Instance Store in the Amazon Elastic Compute Cloud User Guide.

If a volume has an AWS Marketplace product code:

  • The volume can be attached only to a stopped instance.

  • AWS Marketplace product codes are copied from the volume to the instance.

  • You must be subscribed to the product.

  • The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance.

For an overview of the AWS Marketplace, see Introducing AWS Marketplace.

For more information about EBS volumes, see Attaching Amazon EBS Volumes in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the attachVolume operation

var params = {
  Device: 'STRING_VALUE', /* required */
  InstanceId: 'STRING_VALUE', /* required */
  VolumeId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.attachVolume(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VolumeId — (String)

      The ID of the EBS volume. The volume and instance must be within the same Availability Zone.

    • InstanceId — (String)

      The ID of the instance.

    • Device — (String)

      The device name to expose to the instance (for example, /dev/sdh or xvdh).

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:

      • VolumeId — (String)

        The ID of the volume.

      • InstanceId — (String)

        The ID of the instance.

      • Device — (String)

        The device name.

      • State — (String)

        The attachment state of the volume.

        Possible values include:
        • "attaching"
        • "attached"
        • "detaching"
        • "detached"
      • AttachTime — (Date)

        The time stamp when the attachment initiated.

      • DeleteOnTermination — (Boolean)

        Indicates whether the EBS volume is deleted on instance termination.

Returns:

  • (AWS.Request)

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

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

Attaches a virtual private gateway to a VPC. For more information, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the attachVpnGateway operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  VpnGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.attachVpnGateway(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpnGatewayId — (String)

      The ID of the virtual private gateway.

    • VpcId — (String)

      The ID of the VPC.

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:

      • VpcAttachment — (map)

        Information about the attachment.

        • VpcId — (String)

          The ID of the VPC.

        • State — (String)

          The current state of the attachment.

          Possible values include:
          • "attaching"
          • "attached"
          • "detaching"
          • "detached"

Returns:

  • (AWS.Request)

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

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

[EC2-VPC only] Adds one or more egress rules to a security group for use with a VPC. Specifically, this action permits instances to send traffic to one or more destination CIDR IP address ranges, or to one or more destination security groups for the same VPC. This action doesn't apply to security groups for use in EC2-Classic. For more information, see Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.

You can have up to 50 rules per security group (covering both ingress and egress rules).

Each rule consists of the protocol (for example, TCP), plus either a CIDR range or a source group. For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.

Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.

Examples:

Calling the authorizeSecurityGroupEgress operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  CidrIp: 'STRING_VALUE',
  DryRun: true || false,
  FromPort: 0,
  IpPermissions: [
    {
      FromPort: 0,
      IpProtocol: 'STRING_VALUE',
      IpRanges: [
        {
          CidrIp: 'STRING_VALUE'
        },
        /* more items */
      ],
      PrefixListIds: [
        {
          PrefixListId: 'STRING_VALUE'
        },
        /* more items */
      ],
      ToPort: 0,
      UserIdGroupPairs: [
        {
          GroupId: 'STRING_VALUE',
          GroupName: 'STRING_VALUE',
          PeeringStatus: 'STRING_VALUE',
          UserId: 'STRING_VALUE',
          VpcId: 'STRING_VALUE',
          VpcPeeringConnectionId: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  IpProtocol: 'STRING_VALUE',
  SourceSecurityGroupName: 'STRING_VALUE',
  SourceSecurityGroupOwnerId: 'STRING_VALUE',
  ToPort: 0
};
ec2.authorizeSecurityGroupEgress(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • GroupId — (String)

      The ID of the security group.

    • SourceSecurityGroupName — (String)

      The name of a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

    • SourceSecurityGroupOwnerId — (String)

      The AWS account number for a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

    • IpProtocol — (String)

      The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.

    • FromPort — (Integer)

      The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

    • ToPort — (Integer)

      The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

    • CidrIp — (String)

      The CIDR IP address range. We recommend that you specify the CIDR range in a set of IP permissions instead.

    • IpPermissions — (Array<map>)

      A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.

      • IpProtocol — (String)

        The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).

        [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

      • FromPort — (Integer)

        The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

      • ToPort — (Integer)

        The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

      • UserIdGroupPairs — (Array<map>)

        One or more security group and AWS account ID pairs.

        • UserId — (String)

          The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

          [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

        • GroupName — (String)

          The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

        • GroupId — (String)

          The ID of the security group.

        • VpcId — (String)

          The ID of the VPC for the referenced security group, if applicable.

        • VpcPeeringConnectionId — (String)

          The ID of the VPC peering connection, if applicable.

        • PeeringStatus — (String)

          The status of a VPC peering connection, if applicable.

      • IpRanges — (Array<map>)

        One or more IP ranges.

        • CidrIp — (String)

          The CIDR range. You can either specify a CIDR range or a source security group, not both.

      • PrefixListIds — (Array<map>)

        (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

        • PrefixListId — (String)

          The ID of the prefix.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Adds one or more ingress rules to a security group.

EC2-Classic: You can have up to 100 rules per group.

EC2-VPC: You can have up to 50 rules per group (covering both ingress and egress rules).

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

[EC2-Classic] This action gives one or more CIDR IP address ranges permission to access a security group in your account, or gives one or more security groups (called the source groups) permission to access a security group for your account. A source group can be for your own AWS account, or another.

[EC2-VPC] This action gives one or more CIDR IP address ranges permission to access a security group in your VPC, or gives one or more other security groups (called the source groups) permission to access a security group for your VPC. The security groups must all be for the same VPC.

Examples:

Calling the authorizeSecurityGroupIngress operation

var params = {
  CidrIp: 'STRING_VALUE',
  DryRun: true || false,
  FromPort: 0,
  GroupId: 'STRING_VALUE',
  GroupName: 'STRING_VALUE',
  IpPermissions: [
    {
      FromPort: 0,
      IpProtocol: 'STRING_VALUE',
      IpRanges: [
        {
          CidrIp: 'STRING_VALUE'
        },
        /* more items */
      ],
      PrefixListIds: [
        {
          PrefixListId: 'STRING_VALUE'
        },
        /* more items */
      ],
      ToPort: 0,
      UserIdGroupPairs: [
        {
          GroupId: 'STRING_VALUE',
          GroupName: 'STRING_VALUE',
          PeeringStatus: 'STRING_VALUE',
          UserId: 'STRING_VALUE',
          VpcId: 'STRING_VALUE',
          VpcPeeringConnectionId: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  IpProtocol: 'STRING_VALUE',
  SourceSecurityGroupName: 'STRING_VALUE',
  SourceSecurityGroupOwnerId: 'STRING_VALUE',
  ToPort: 0
};
ec2.authorizeSecurityGroupIngress(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • GroupName — (String)

      [EC2-Classic, default VPC] The name of the security group.

    • GroupId — (String)

      The ID of the security group. Required for a nondefault VPC.

    • SourceSecurityGroupName — (String)

      [EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For EC2-VPC, the source security group must be in the same VPC.

    • SourceSecurityGroupOwnerId — (String)

      [EC2-Classic] The AWS account number for the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead.

    • IpProtocol — (String)

      The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). (VPC only) Use -1 to specify all traffic. If you specify -1, traffic on all ports is allowed, regardless of any ports you specify.

    • FromPort — (Integer)

      The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use -1 to specify all ICMP types.

    • ToPort — (Integer)

      The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.

    • CidrIp — (String)

      The CIDR IP address range. You can't specify this parameter when specifying a source security group.

    • IpPermissions — (Array<map>)

      A set of IP permissions. Can be used to specify multiple rules in a single command.

      • IpProtocol — (String)

        The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).

        [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

      • FromPort — (Integer)

        The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

      • ToPort — (Integer)

        The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

      • UserIdGroupPairs — (Array<map>)

        One or more security group and AWS account ID pairs.

        • UserId — (String)

          The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

          [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

        • GroupName — (String)

          The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

        • GroupId — (String)

          The ID of the security group.

        • VpcId — (String)

          The ID of the VPC for the referenced security group, if applicable.

        • VpcPeeringConnectionId — (String)

          The ID of the VPC peering connection, if applicable.

        • PeeringStatus — (String)

          The status of a VPC peering connection, if applicable.

      • IpRanges — (Array<map>)

        One or more IP ranges.

        • CidrIp — (String)

          The CIDR range. You can either specify a CIDR range or a source security group, not both.

      • PrefixListIds — (Array<map>)

        (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

        • PrefixListId — (String)

          The ID of the prefix.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Bundles an Amazon instance store-backed Windows instance.

During bundling, only the root device volume (C:) is bundled. Data on other instance store volumes is not preserved.

Note: This action is not applicable for Linux/Unix instances or Windows instances that are backed by Amazon EBS.

For more information, see Creating an Instance Store-Backed Windows AMI.

Examples:

Calling the bundleInstance operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  Storage: { /* required */
    S3: {
      AWSAccessKeyId: 'STRING_VALUE',
      Bucket: 'STRING_VALUE',
      Prefix: 'STRING_VALUE',
      UploadPolicy: new Buffer('...') || 'STRING_VALUE',
      UploadPolicySignature: 'STRING_VALUE'
    }
  },
  DryRun: true || false
};
ec2.bundleInstance(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • InstanceId — (String)

      The ID of the instance to bundle.

      Type: String

      Default: None

      Required: Yes

    • Storage — (map)

      The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

      • S3 — (map)

        An Amazon S3 storage location.

        • Bucket — (String)

          The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

        • Prefix — (String)

          The beginning of the file name of the AMI.

        • AWSAccessKeyId — (String)

          The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in Best Practices for Managing AWS Access Keys.

        • UploadPolicy — (Buffer, Typed Array, Blob, String)

          An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

        • UploadPolicySignature — (String)

          The signature of the JSON document.

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:

      • BundleTask — (map)

        Information about the bundle task.

        • InstanceId — (String)

          The ID of the instance associated with this bundle task.

        • BundleId — (String)

          The ID of the bundle task.

        • State — (String)

          The state of the task.

          Possible values include:
          • "pending"
          • "waiting-for-shutdown"
          • "bundling"
          • "storing"
          • "cancelling"
          • "complete"
          • "failed"
        • StartTime — (Date)

          The time this task started.

        • UpdateTime — (Date)

          The time of the most recent update for the task.

        • Storage — (map)

          The Amazon S3 storage locations.

          • S3 — (map)

            An Amazon S3 storage location.

            • Bucket — (String)

              The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

            • Prefix — (String)

              The beginning of the file name of the AMI.

            • AWSAccessKeyId — (String)

              The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in Best Practices for Managing AWS Access Keys.

            • UploadPolicy — (Buffer, Typed Array, Blob, String)

              An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

            • UploadPolicySignature — (String)

              The signature of the JSON document.

        • Progress — (String)

          The level of task completion, as a percent (for example, 20%).

        • BundleTaskError — (map)

          If the task fails, a description of the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message.

Returns:

  • (AWS.Request)

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

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

Cancels a bundling operation for an instance store-backed Windows instance.

Examples:

Calling the cancelBundleTask operation

var params = {
  BundleId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.cancelBundleTask(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • BundleId — (String)

      The ID of the bundle task.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • BundleTask — (map)

        Information about the bundle task.

        • InstanceId — (String)

          The ID of the instance associated with this bundle task.

        • BundleId — (String)

          The ID of the bundle task.

        • State — (String)

          The state of the task.

          Possible values include:
          • "pending"
          • "waiting-for-shutdown"
          • "bundling"
          • "storing"
          • "cancelling"
          • "complete"
          • "failed"
        • StartTime — (Date)

          The time this task started.

        • UpdateTime — (Date)

          The time of the most recent update for the task.

        • Storage — (map)

          The Amazon S3 storage locations.

          • S3 — (map)

            An Amazon S3 storage location.

            • Bucket — (String)

              The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

            • Prefix — (String)

              The beginning of the file name of the AMI.

            • AWSAccessKeyId — (String)

              The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in Best Practices for Managing AWS Access Keys.

            • UploadPolicy — (Buffer, Typed Array, Blob, String)

              An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

            • UploadPolicySignature — (String)

              The signature of the JSON document.

        • Progress — (String)

          The level of task completion, as a percent (for example, 20%).

        • BundleTaskError — (map)

          If the task fails, a description of the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message.

Returns:

  • (AWS.Request)

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

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

Cancels an active conversion task. The task can be the import of an instance or volume. The action removes all artifacts of the conversion, including a partially uploaded volume or instance. If the conversion is complete or is in the process of transferring the final disk image, the command fails and returns an exception.

For more information, see Importing a Virtual Machine Using the Amazon EC2 CLI.

Examples:

Calling the cancelConversionTask operation

var params = {
  ConversionTaskId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  ReasonMessage: 'STRING_VALUE'
};
ec2.cancelConversionTask(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ConversionTaskId — (String)

      The ID of the conversion task.

    • ReasonMessage — (String)

      The reason for canceling the conversion task.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Cancels an active export task. The request removes all artifacts of the export, including any partially-created Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the command fails and returns an error.

Examples:

Calling the cancelExportTask operation

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

      The ID of the export task. This is the ID returned by CreateInstanceExportTask.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Cancels an in-process import virtual machine or import snapshot task.

Examples:

Calling the cancelImportTask operation

var params = {
  CancelReason: 'STRING_VALUE',
  DryRun: true || false,
  ImportTaskId: 'STRING_VALUE'
};
ec2.cancelImportTask(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ImportTaskId — (String)

      The ID of the import image or import snapshot task to be canceled.

    • CancelReason — (String)

      The reason for canceling the task.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • ImportTaskId — (String)

        The ID of the task being canceled.

      • State — (String)

        The current state of the task being canceled.

      • PreviousState — (String)

        The current state of the task being canceled.

Returns:

  • (AWS.Request)

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

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

Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the cancelReservedInstancesListing operation

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

      The ID of the Reserved Instance listing.

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:

      • ReservedInstancesListings — (Array<map>)

        The Reserved Instance listing.

        • ReservedInstancesListingId — (String)

          The ID of the Reserved Instance listing.

        • ReservedInstancesId — (String)

          The ID of the Reserved Instance.

        • CreateDate — (Date)

          The time the listing was created.

        • UpdateDate — (Date)

          The last modified timestamp of the listing.

        • Status — (String)

          The status of the Reserved Instance listing.

          Possible values include:
          • "active"
          • "pending"
          • "cancelled"
          • "closed"
        • StatusMessage — (String)

          The reason for the current status of the Reserved Instance listing. The response can be blank.

        • InstanceCounts — (Array<map>)

          The number of instances in this state.

          • State — (String)

            The states of the listed Reserved Instances.

            Possible values include:
            • "available"
            • "sold"
            • "cancelled"
            • "pending"
          • InstanceCount — (Integer)

            The number of listed Reserved Instances in the state specified by the state.

        • PriceSchedules — (Array<map>)

          The price of the Reserved Instance listing.

          • Term — (Integer)

            The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

          • Price — (Float)

            The fixed price for the term.

          • CurrencyCode — (String)

            The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD.

            Possible values include:
            • "USD"
          • Active — (Boolean)

            The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

            A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

        • Tags — (Array<map>)

          Any tags assigned to the resource.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • ClientToken — (String)

          A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency.

Returns:

  • (AWS.Request)

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

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

Cancels the specified Spot fleet requests.

After you cancel a Spot fleet request, the Spot fleet launches no new Spot instances. You must specify whether the Spot fleet should also terminate its Spot instances. If you terminate the instances, the Spot fleet request enters the cancelled_terminating state. Otherwise, the Spot fleet request enters the cancelled_running state and the instances continue to run until they are interrupted or you terminate them manually.

Examples:

Calling the cancelSpotFleetRequests operation

var params = {
  SpotFleetRequestIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  TerminateInstances: true || false, /* required */
  DryRun: true || false
};
ec2.cancelSpotFleetRequests(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • SpotFleetRequestIds — (Array<String>)

      The IDs of the Spot fleet requests.

    • TerminateInstances — (Boolean)

      Indicates whether to terminate instances for a Spot fleet request if it is canceled successfully.

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:

      • UnsuccessfulFleetRequests — (Array<map>)

        Information about the Spot fleet requests that are not successfully canceled.

        • SpotFleetRequestIdrequired — (String)

          The ID of the Spot fleet request.

        • Errorrequired — (map)

          The error.

          • Coderequired — (String)

            The error code.

            Possible values include:
            • "fleetRequestIdDoesNotExist"
            • "fleetRequestIdMalformed"
            • "fleetRequestNotInCancellableState"
            • "unexpectedError"
          • Messagerequired — (String)

            The description for the error code.

      • SuccessfulFleetRequests — (Array<map>)

        Information about the Spot fleet requests that are successfully canceled.

        • SpotFleetRequestIdrequired — (String)

          The ID of the Spot fleet request.

        • CurrentSpotFleetRequestStaterequired — (String)

          The current state of the Spot fleet request.

          Possible values include:
          • "submitted"
          • "active"
          • "cancelled"
          • "failed"
          • "cancelled_running"
          • "cancelled_terminating"
          • "modifying"
        • PreviousSpotFleetRequestStaterequired — (String)

          The previous state of the Spot fleet request.

          Possible values include:
          • "submitted"
          • "active"
          • "cancelled"
          • "failed"
          • "cancelled_running"
          • "cancelled_terminating"
          • "modifying"

Returns:

  • (AWS.Request)

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

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

Cancels one or more Spot instance requests. Spot instances are instances that Amazon EC2 starts on your behalf when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot instance capacity and current Spot instance requests. For more information, see Spot Instance Requests in the Amazon Elastic Compute Cloud User Guide.

Canceling a Spot instance request does not terminate running Spot instances associated with the request.

Examples:

Calling the cancelSpotInstanceRequests operation

var params = {
  SpotInstanceRequestIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.cancelSpotInstanceRequests(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • SpotInstanceRequestIds — (Array<String>)

      One or more Spot instance request IDs.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • CancelledSpotInstanceRequests — (Array<map>)

        One or more Spot instance requests.

        • SpotInstanceRequestId — (String)

          The ID of the Spot instance request.

        • State — (String)

          The state of the Spot instance request.

          Possible values include:
          • "active"
          • "open"
          • "closed"
          • "cancelled"
          • "completed"

Returns:

  • (AWS.Request)

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

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

Determines whether a product code is associated with an instance. This action can only be used by the owner of the product code. It is useful when a product code owner needs to verify whether another user's instance is eligible for support.

Examples:

Calling the confirmProductInstance operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  ProductCode: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.confirmProductInstance(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ProductCode — (String)

      The product code. This must be a product code that you own.

    • InstanceId — (String)

      The ID 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:

      • OwnerId — (String)

        The AWS account ID of the instance owner. This is only present if the product code is attached to the instance.

      • Return — (Boolean)

        The return value of the request. Returns true if the specified product code is owned by the requester and associated with the specified instance.

Returns:

  • (AWS.Request)

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

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

Initiates the copy of an AMI from the specified source region to the current region. You specify the destination region by using its endpoint when making the request.

For more information, see Copying AMIs in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the copyImage operation

var params = {
  Name: 'STRING_VALUE', /* required */
  SourceImageId: 'STRING_VALUE', /* required */
  SourceRegion: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DryRun: true || false,
  Encrypted: true || false,
  KmsKeyId: 'STRING_VALUE'
};
ec2.copyImage(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • SourceRegion — (String)

      The name of the region that contains the AMI to copy.

    • SourceImageId — (String)

      The ID of the AMI to copy.

    • Name — (String)

      The name of the new AMI in the destination region.

    • Description — (String)

      A description for the new AMI in the destination region.

    • ClientToken — (String)

      Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

    • Encrypted — (Boolean)

      Specifies whether the destination snapshots of the copied image should be encrypted. The default CMK for EBS is used unless a non-default AWS Key Management Service (AWS KMS) CMK is specified with KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

    • KmsKeyId — (String)

      The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when encrypting the snapshots of an image during a copy operation. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. The specified CMK must exist in the region that the snapshot is being copied to. If a KmsKeyId is specified, the Encrypted flag must also be set.

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:

      • ImageId — (String)

        The ID of the new AMI.

Returns:

  • (AWS.Request)

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

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

Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can copy the snapshot within the same region or from one region to another. You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs). The snapshot is copied to the regional endpoint that you send the HTTP request to.

Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted, unless the Encrypted flag is specified during the snapshot copy operation. By default, encrypted snapshot copies use the default AWS Key Management Service (AWS KMS) customer master key (CMK); however, you can specify a non-default CMK with the KmsKeyId parameter.

Note: To copy an encrypted snapshot that has been shared from another account, you must have permissions for the CMK used to encrypt the snapshot.
Note: Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

For more information, see Copying an Amazon EBS Snapshot in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the copySnapshot operation

var params = {
  SourceRegion: 'STRING_VALUE', /* required */
  SourceSnapshotId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  DestinationRegion: 'STRING_VALUE',
  DryRun: true || false,
  Encrypted: true || false,
  KmsKeyId: 'STRING_VALUE',
  PresignedUrl: 'STRING_VALUE'
};
ec2.copySnapshot(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • SourceRegion — (String)

      The ID of the region that contains the snapshot to be copied.

    • SourceSnapshotId — (String)

      The ID of the EBS snapshot to copy.

    • Description — (String)

      A description for the EBS snapshot.

    • DestinationRegion — (String)

      The destination region to use in the PresignedUrl parameter of a snapshot copy operation. This parameter is only valid for specifying the destination region in a PresignedUrl parameter, where it is required.

      Note: CopySnapshot sends the snapshot copy to the regional endpoint that you send the HTTP request to, such as ec2.us-east-1.amazonaws.com (in the AWS CLI, this is specified with the --region parameter or the default region in your AWS configuration file).
    • PresignedUrl — (String)

      The pre-signed URL that facilitates copying an encrypted snapshot. This parameter is only required when copying an encrypted snapshot with the Amazon EC2 Query API; it is available as an optional parameter in all other cases. The PresignedUrl should use the snapshot source endpoint, the CopySnapshot action, and include the SourceRegion, SourceSnapshotId, and DestinationRegion parameters. The PresignedUrl must be signed using AWS Signature Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic that is described in Authenticating Requests by Using Query Parameters (AWS Signature Version 4) in the Amazon Simple Storage Service API Reference. An invalid or improperly signed PresignedUrl will cause the copy operation to fail asynchronously, and the snapshot will move to an error state.

    • Encrypted — (Boolean)

      Specifies whether the destination snapshot should be encrypted. You can encrypt a copy of an unencrypted snapshot using this flag, but you cannot use it to create an unencrypted copy from an encrypted snapshot. Your default CMK for EBS is used unless a non-default AWS Key Management Service (AWS KMS) CMK is specified with KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

    • KmsKeyId — (String)

      The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when creating the snapshot copy. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. The specified CMK must exist in the region that the snapshot is being copied to. If a KmsKeyId is specified, the Encrypted flag must also be set.

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:

      • SnapshotId — (String)

        The ID of the new snapshot.

Returns:

  • (AWS.Request)

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

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

Provides information to AWS about your VPN customer gateway device. The customer gateway is the appliance at your end of the VPN connection. (The device on the AWS side of the VPN connection is the virtual private gateway.) You must provide the Internet-routable IP address of the customer gateway's external interface. The IP address must be static and may be behind a device performing network address translation (NAT).

For devices that use Border Gateway Protocol (BGP), you can also provide the device's BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use a private ASN (in the 64512 - 65534 range).

Note: Amazon EC2 supports all 2-byte ASN numbers in the range of 1 - 65534, with the exception of 7224, which is reserved in the us-east-1 region, and 9059, which is reserved in the eu-west-1 region.

For more information about VPN customer gateways, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.

You cannot create more than one customer gateway with the same VPN type, IP address, and BGP ASN parameter values. If you run an identical request more than one time, the first request creates the customer gateway, and subsequent requests return information about the existing customer gateway. The subsequent requests do not create new customer gateway resources.

Examples:

Calling the createCustomerGateway operation

var params = {
  BgpAsn: 0, /* required */
  PublicIp: 'STRING_VALUE', /* required */
  Type: 'ipsec.1', /* required */
  DryRun: true || false
};
ec2.createCustomerGateway(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • Type — (String)

      The type of VPN connection that this customer gateway supports (ipsec.1).

      Possible values include:
      • "ipsec.1"
    • PublicIp — (String)

      The Internet-routable IP address for the customer gateway's outside interface. The address must be static.

    • BgpAsn — (Integer)

      For devices that support BGP, the customer gateway's BGP ASN.

      Default: 65000

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:

      • CustomerGateway — (map)

        Information about the customer gateway.

        • CustomerGatewayId — (String)

          The ID of the customer gateway.

        • State — (String)

          The current state of the customer gateway (pending | available | deleting | deleted).

        • Type — (String)

          The type of VPN connection the customer gateway supports (ipsec.1).

        • IpAddress — (String)

          The Internet-routable IP address of the customer gateway's outside interface.

        • BgpAsn — (String)

          The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).

        • Tags — (Array<map>)

          Any tags assigned to the customer gateway.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see RFC 2132.

  • domain-name-servers - The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas. If you want your instance to receive a custom DNS hostname as specified in domain-name, you must set domain-name-servers to a custom DNS server.

  • domain-name - If you're using AmazonProvidedDNS in "us-east-1", specify "ec2.internal". If you're using AmazonProvidedDNS in another region, specify "region.compute.internal" (for example, "ap-northeast-1.compute.internal"). Otherwise, specify a domain name (for example, "MyCompany.com"). This value is used to complete unqualified DNS hostnames. Important: Some Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP options set is associated with a VPC that has instances with multiple operating systems, specify only one domain name.

  • ntp-servers - The IP addresses of up to four Network Time Protocol (NTP) servers.

  • netbios-name-servers - The IP addresses of up to four NetBIOS name servers.

  • netbios-node-type - The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information about these node types, see RFC 2132.

Your VPC automatically starts out with a set of DHCP options that includes only a DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and if your VPC has an Internet gateway, make sure to set the domain-name-servers option either to AmazonProvidedDNS or to a domain name server of your choice. For more information about DHCP options, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createDhcpOptions operation

var params = {
  DhcpConfigurations: [ /* required */
    {
      Key: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  DryRun: true || false
};
ec2.createDhcpOptions(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • DhcpConfigurations — (Array<map>)

      A DHCP configuration option.

      • Key — (String)
      • Values — (Array<String>)

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:

      • DhcpOptions — (map)

        A set of DHCP options.

        • DhcpOptionsId — (String)

          The ID of the set of DHCP options.

        • DhcpConfigurations — (Array<map>)

          One or more DHCP options in the set.

          • Key — (String)

            The name of a DHCP option.

          • Values — (Array<map>)

            One or more values for the DHCP option.

            • Value — (String)

              The attribute value. Note that the value is case-sensitive.

        • Tags — (Array<map>)

          Any tags assigned to the DHCP options set.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Creates one or more flow logs to capture IP traffic for a specific network interface, subnet, or VPC. Flow logs are delivered to a specified log group in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request, a log stream is created in CloudWatch Logs for each network interface in the subnet or VPC. Log streams can include information about accepted and rejected traffic to a network interface. You can view the data in your log streams using Amazon CloudWatch Logs.

In your request, you must also specify an IAM role that has permission to publish logs to CloudWatch Logs.

Examples:

Calling the createFlowLogs operation

var params = {
  DeliverLogsPermissionArn: 'STRING_VALUE', /* required */
  LogGroupName: 'STRING_VALUE', /* required */
  ResourceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  ResourceType: 'VPC | Subnet | NetworkInterface', /* required */
  TrafficType: 'ACCEPT | REJECT | ALL', /* required */
  ClientToken: 'STRING_VALUE'
};
ec2.createFlowLogs(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: {})
    • ResourceIds — (Array<String>)

      One or more subnet, network interface, or VPC IDs.

      Constraints: Maximum of 1000 resources

    • ResourceType — (String)

      The type of resource on which to create the flow log.

      Possible values include:
      • "VPC"
      • "Subnet"
      • "NetworkInterface"
    • TrafficType — (String)

      The type of traffic to log.

      Possible values include:
      • "ACCEPT"
      • "REJECT"
      • "ALL"
    • LogGroupName — (String)

      The name of the CloudWatch log group.

    • DeliverLogsPermissionArn — (String)

      The ARN for the IAM role that's used to post flow logs to a CloudWatch Logs log group.

    • ClientToken — (String)

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

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:

      • FlowLogIds — (Array<String>)

        The IDs of the flow logs.

      • ClientToken — (String)

        Unique, case-sensitive identifier you provide to ensure the idempotency of the request.

      • Unsuccessful — (Array<map>)

        Information about the flow logs that could not be created successfully.

        • ResourceId — (String)

          The ID of the resource.

        • Errorrequired — (map)

          Information about the error.

          • Coderequired — (String)

            The error code.

          • Messagerequired — (String)

            The error message accompanying the error code.

Returns:

  • (AWS.Request)

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

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

Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.

If you customized your instance with instance store volumes or EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.

For more information, see Creating Amazon EBS-Backed Linux AMIs in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the createImage operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  BlockDeviceMappings: [
    {
      DeviceName: 'STRING_VALUE',
      Ebs: {
        DeleteOnTermination: true || false,
        Encrypted: true || false,
        Iops: 0,
        SnapshotId: 'STRING_VALUE',
        VolumeSize: 0,
        VolumeType: 'standard | io1 | gp2 | sc1 | st1'
      },
      NoDevice: 'STRING_VALUE',
      VirtualName: 'STRING_VALUE'
    },
    /* more items */
  ],
  Description: 'STRING_VALUE',
  DryRun: true || false,
  NoReboot: true || false
};
ec2.createImage(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • InstanceId — (String)

      The ID of the instance.

    • Name — (String)

      A name for the new image.

      Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

    • Description — (String)

      A description for the new image.

    • NoReboot — (Boolean)

      By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.

    • BlockDeviceMappings — (Array<map>)

      Information about one or more block device mappings.

      • VirtualName — (String)

        The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1.The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

        Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

      • DeviceName — (String)

        The device name exposed to the instance (for example, /dev/sdh or xvdh).

      • Ebs — (map)

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • SnapshotId — (String)

          The ID of the snapshot.

        • VolumeSize — (Integer)

          The size of the volume, in GiB.

          Constraints: 1-16384 for General Purpose SSD (gp2), 4-16384 for Provisioned IOPS SSD (io1), 500-16384 for Throughput Optimized HDD (st1), 500-16384 for Cold HDD (sc1), and 1-1024 for Magnetic (standard) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

          Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

        • DeleteOnTermination — (Boolean)

          Indicates whether the EBS volume is deleted on instance termination.

        • VolumeType — (String)

          The volume type: gp2, io1, st1, sc1, or standard.

          Default: standard

          Possible values include:
          • "standard"
          • "io1"
          • "gp2"
          • "sc1"
          • "st1"
        • Iops — (Integer)

          The number of I/O operations per second (IOPS) that the volume supports. For io1, this represents the number of IOPS that are provisioned for the volume. For gp2, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

          Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.

          Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2, st1, sc1, or standard volumes.

        • Encrypted — (Boolean)

          Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

      • NoDevice — (String)

        Suppresses the specified device included in the block device mapping of the AMI.

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:

      • ImageId — (String)

        The ID of the new AMI.

Returns:

  • (AWS.Request)

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

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

Exports a running or stopped instance to an S3 bucket.

For information about the supported operating systems, image formats, and known limitations for the types of instances you can export, see Exporting an Instance as a VM Using VM Import/Export in the VM Import/Export User Guide.

Examples:

Calling the createInstanceExportTask operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  ExportToS3Task: {
    ContainerFormat: 'ova',
    DiskImageFormat: 'VMDK | RAW | VHD',
    S3Bucket: 'STRING_VALUE',
    S3Prefix: 'STRING_VALUE'
  },
  TargetEnvironment: 'citrix | vmware | microsoft'
};
ec2.createInstanceExportTask(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: {})
    • Description — (String)

      A description for the conversion task or the resource being exported. The maximum length is 255 bytes.

    • InstanceId — (String)

      The ID of the instance.

    • TargetEnvironment — (String)

      The target virtualization environment.

      Possible values include:
      • "citrix"
      • "vmware"
      • "microsoft"
    • ExportToS3Task — (map)

      The format and location for an instance export task.

      • DiskImageFormat — (String)

        The format for the exported image.

        Possible values include:
        • "VMDK"
        • "RAW"
        • "VHD"
      • ContainerFormat — (String)

        The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

        Possible values include:
        • "ova"
      • S3Bucket — (String)

        The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.

      • S3Prefix — (String)

        The image is written to a single object in the S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.

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:

      • ExportTask — (map)

        Information about the instance export task.

        • ExportTaskId — (String)

          The ID of the export task.

        • Description — (String)

          A description of the resource being exported.

        • State — (String)

          The state of the export task.

          Possible values include:
          • "active"
          • "cancelling"
          • "cancelled"
          • "completed"
        • StatusMessage — (String)

          The status message related to the export task.

        • InstanceExportDetails — (map)

          Information about the instance to export.

          • InstanceId — (String)

            The ID of the resource being exported.

          • TargetEnvironment — (String)

            The target virtualization environment.

            Possible values include:
            • "citrix"
            • "vmware"
            • "microsoft"
        • ExportToS3Task — (map)

          Information about the export task.

          • DiskImageFormat — (String)

            The format for the exported image.

            Possible values include:
            • "VMDK"
            • "RAW"
            • "VHD"
          • ContainerFormat — (String)

            The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

            Possible values include:
            • "ova"
          • S3Bucket — (String)

            The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.

          • S3Key — (String)

            The encryption key for your S3 bucket.

Returns:

  • (AWS.Request)

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

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

Creates an Internet gateway for use with a VPC. After creating the Internet gateway, you attach it to a VPC using AttachInternetGateway.

For more information about your VPC and Internet gateway, see the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createInternetGateway operation

var params = {
  DryRun: true || false
};
ec2.createInternetGateway(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

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:

      • InternetGateway — (map)

        Information about the Internet gateway.

        • InternetGatewayId — (String)

          The ID of the Internet gateway.

        • Attachments — (Array<map>)

          Any VPCs attached to the Internet gateway.

          • VpcId — (String)

            The ID of the VPC.

          • State — (String)

            The current state of the attachment.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
        • Tags — (Array<map>)

          Any tags assigned to the Internet gateway.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error.

You can have up to five thousand key pairs per region.

The key pair returned to you is available only in the region in which you create it. To create a key pair that is available in all regions, use ImportKeyPair.

For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the createKeyPair operation

var params = {
  KeyName: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • KeyName — (String)

      A unique name for the key pair.

      Constraints: Up to 255 ASCII characters

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:

      • KeyName — (String)

        The name of the key pair.

      • KeyFingerprint — (String)

        The SHA-1 digest of the DER encoded private key.

      • KeyMaterial — (String)

        An unencrypted PEM encoded RSA private key.

Returns:

  • (AWS.Request)

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

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

Creates a NAT gateway in the specified subnet. A NAT gateway can be used to enable instances in a private subnet to connect to the Internet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. For more information, see NAT Gateways in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createNatGateway operation

var params = {
  AllocationId: 'STRING_VALUE', /* required */
  SubnetId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE'
};
ec2.createNatGateway(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: {})
    • SubnetId — (String)

      The subnet in which to create the NAT gateway.

    • AllocationId — (String)

      The allocation ID of an Elastic IP address to associate with the NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.

    • ClientToken — (String)

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

      Constraint: Maximum 64 ASCII characters.

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:

      • NatGateway — (map)

        Information about the NAT gateway.

        • VpcId — (String)

          The ID of the VPC in which the NAT gateway is located.

        • SubnetId — (String)

          The ID of the subnet in which the NAT gateway is located.

        • NatGatewayId — (String)

          The ID of the NAT gateway.

        • CreateTime — (Date)

          The date and time the NAT gateway was created.

        • DeleteTime — (Date)

          The date and time the NAT gateway was deleted, if applicable.

        • NatGatewayAddresses — (Array<map>)

          Information about the IP addresses and network interface associated with the NAT gateway.

          • PublicIp — (String)

            The Elastic IP address associated with the NAT gateway.

          • AllocationId — (String)

            The allocation ID of the Elastic IP address that's associated with the NAT gateway.

          • PrivateIp — (String)

            The private IP address associated with the Elastic IP address.

          • NetworkInterfaceId — (String)

            The ID of the network interface associated with the NAT gateway.

        • State — (String)

          The state of the NAT gateway.

          • pending: The NAT gateway is being created and is not ready to process traffic.

          • failed: The NAT gateway could not be created. Check the failureCode and failureMessage fields for the reason.

          • available: The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.

          • deleting: The NAT gateway is in the process of being terminated and may still be processing traffic.

          • deleted: The NAT gateway has been terminated and is no longer processing traffic.

          Possible values include:
          • "pending"
          • "failed"
          • "available"
          • "deleting"
          • "deleted"
        • FailureCode — (String)

          If the NAT gateway could not be created, specifies the error code for the failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached | InvalidAllocationID.NotFound | Resource.AlreadyAssociated | InternalError | InvalidSubnetID.NotFound)

        • FailureMessage — (String)

          If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.

          • For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"

          • For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"

          • For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"

          • For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"

          • For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."

          • For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."

        • ProvisionedBandwidth — (map)

          Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.

      • ClientToken — (String)

        Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.

Returns:

  • (AWS.Request)

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

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

Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.

For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createNetworkAcl operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.createNetworkAcl(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpcId — (String)

      The ID of the VPC.

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:

      • NetworkAcl — (map)

        Information about the network ACL.

        • NetworkAclId — (String)

          The ID of the network ACL.

        • VpcId — (String)

          The ID of the VPC for the network ACL.

        • IsDefault — (Boolean)

          Indicates whether this is the default network ACL for the VPC.

        • Entries — (Array<map>)

          One or more entries (rules) in the network ACL.

          • RuleNumber — (Integer)

            The rule number for the entry. ACL entries are processed in ascending order by rule number.

          • Protocol — (String)

            The protocol. A value of -1 means all protocols.

          • RuleAction — (String)

            Indicates whether to allow or deny the traffic that matches the rule.

            Possible values include:
            • "allow"
            • "deny"
          • Egress — (Boolean)

            Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).

          • CidrBlock — (String)

            The network range to allow or deny, in CIDR notation.

          • IcmpTypeCode — (map)

            ICMP protocol: The ICMP type and code.

            • Type — (Integer)

              The ICMP code. A value of -1 means all codes for the specified ICMP type.

            • Code — (Integer)

              The ICMP type. A value of -1 means all types.

          • PortRange — (map)

            TCP or UDP protocols: The range of ports the rule applies to.

            • From — (Integer)

              The first port in the range.

            • To — (Integer)

              The last port in the range.

        • Associations — (Array<map>)

          Any associations between the network ACL and one or more subnets

          • NetworkAclAssociationId — (String)

            The ID of the association between a network ACL and a subnet.

          • NetworkAclId — (String)

            The ID of the network ACL.

          • SubnetId — (String)

            The ID of the subnet.

        • Tags — (Array<map>)

          Any tags assigned to the network ACL.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of ingress rules and a separate set of egress rules.

We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.

After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.

For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createNetworkAclEntry operation

var params = {
  CidrBlock: 'STRING_VALUE', /* required */
  Egress: true || false, /* required */
  NetworkAclId: 'STRING_VALUE', /* required */
  Protocol: 'STRING_VALUE', /* required */
  RuleAction: 'allow | deny', /* required */
  RuleNumber: 0, /* required */
  DryRun: true || false,
  IcmpTypeCode: {
    Code: 0,
    Type: 0
  },
  PortRange: {
    From: 0,
    To: 0
  }
};
ec2.createNetworkAclEntry(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • NetworkAclId — (String)

      The ID of the network ACL.

    • RuleNumber — (Integer)

      The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.

      Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.

    • Protocol — (String)

      The protocol. A value of -1 means all protocols.

    • RuleAction — (String)

      Indicates whether to allow or deny the traffic that matches the rule.

      Possible values include:
      • "allow"
      • "deny"
    • Egress — (Boolean)

      Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

    • CidrBlock — (String)

      The network range to allow or deny, in CIDR notation (for example 172.16.0.0/24).

    • IcmpTypeCode — (map)

      ICMP protocol: The ICMP type and code. Required if specifying ICMP for the protocol.

      • Type — (Integer)

        The ICMP code. A value of -1 means all codes for the specified ICMP type.

      • Code — (Integer)

        The ICMP type. A value of -1 means all types.

    • PortRange — (map)

      TCP or UDP protocols: The range of ports the rule applies to.

      • From — (Integer)

        The first port in the range.

      • To — (Integer)

        The last port in the range.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Creates a network interface in the specified subnet.

For more information about network interfaces, see Elastic Network Interfaces in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the createNetworkInterface operation

var params = {
  SubnetId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  DryRun: true || false,
  Groups: [
    'STRING_VALUE',
    /* more items */
  ],
  PrivateIpAddress: 'STRING_VALUE',
  PrivateIpAddresses: [
    {
      PrivateIpAddress: 'STRING_VALUE', /* required */
      Primary: true || false
    },
    /* more items */
  ],
  SecondaryPrivateIpAddressCount: 0
};
ec2.createNetworkInterface(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: {})
    • SubnetId — (String)

      The ID of the subnet to associate with the network interface.

    • Description — (String)

      A description for the network interface.

    • PrivateIpAddress — (String)

      The primary private IP address of the network interface. If you don't specify an IP address, Amazon EC2 selects one for you from the subnet range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses as primary (only one IP address can be designated as primary).

    • Groups — (Array<String>)

      The IDs of one or more security groups.

    • PrivateIpAddresses — (Array<map>)

      One or more private IP addresses.

      • PrivateIpAddressrequired — (String)

        The private IP addresses.

      • Primary — (Boolean)

        Indicates whether the private IP address is the primary private IP address. Only one IP address can be designated as primary.

    • SecondaryPrivateIpAddressCount — (Integer)

      The number of secondary private IP addresses to assign to a network interface. When you specify a number of secondary IP addresses, Amazon EC2 selects these IP addresses within the subnet range. You can't specify this option and specify more than one private IP address using privateIpAddresses.

      The number of IP addresses you can assign to a network interface varies by instance type. For more information, see Private IP Addresses Per ENI Per Instance Type in the Amazon Elastic Compute Cloud User Guide.

    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

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:

      • NetworkInterface — (map)

        Information about the network interface.

        • NetworkInterfaceId — (String)

          The ID of the network interface.

        • SubnetId — (String)

          The ID of the subnet.

        • VpcId — (String)

          The ID of the VPC.

        • AvailabilityZone — (String)

          The Availability Zone.

        • Description — (String)

          A description.

        • OwnerId — (String)

          The AWS account ID of the owner of the network interface.

        • RequesterId — (String)

          The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).

        • RequesterManaged — (Boolean)

          Indicates whether the network interface is being managed by AWS.

        • Status — (String)

          The status of the network interface.

          Possible values include:
          • "available"
          • "attaching"
          • "in-use"
          • "detaching"
        • MacAddress — (String)

          The MAC address.

        • PrivateIpAddress — (String)

          The IP address of the network interface within the subnet.

        • PrivateDnsName — (String)

          The private DNS name.

        • SourceDestCheck — (Boolean)

          Indicates whether traffic to or from the instance is validated.

        • Groups — (Array<map>)

          Any security groups for the network interface.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • Attachment — (map)

          The network interface attachment.

          • AttachmentId — (String)

            The ID of the network interface attachment.

          • InstanceId — (String)

            The ID of the instance.

          • InstanceOwnerId — (String)

            The AWS account ID of the owner of the instance.

          • DeviceIndex — (Integer)

            The device index of the network interface attachment on the instance.

          • Status — (String)

            The attachment state.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
          • AttachTime — (Date)

            The timestamp indicating when the attachment initiated.

          • DeleteOnTermination — (Boolean)

            Indicates whether the network interface is deleted when the instance is terminated.

        • Association — (map)

          The association information for an Elastic IP associated with the network interface.

          • PublicIp — (String)

            The address of the Elastic IP address bound to the network interface.

          • PublicDnsName — (String)

            The public DNS name.

          • IpOwnerId — (String)

            The ID of the Elastic IP address owner.

          • AllocationId — (String)

            The allocation ID.

          • AssociationId — (String)

            The association ID.

        • TagSet — (Array<map>)

          Any tags assigned to the network interface.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • PrivateIpAddresses — (Array<map>)

          The private IP addresses associated with the network interface.

          • PrivateIpAddress — (String)

            The private IP address.

          • PrivateDnsName — (String)

            The private DNS name.

          • Primary — (Boolean)

            Indicates whether this IP address is the primary private IP address of the network interface.

          • Association — (map)

            The association information for an Elastic IP address associated with the network interface.

            • PublicIp — (String)

              The address of the Elastic IP address bound to the network interface.

            • PublicDnsName — (String)

              The public DNS name.

            • IpOwnerId — (String)

              The ID of the Elastic IP address owner.

            • AllocationId — (String)

              The allocation ID.

            • AssociationId — (String)

              The association ID.

        • InterfaceType — (String)

          The type of interface.

          Possible values include:
          • "interface"
          • "natGateway"

Returns:

  • (AWS.Request)

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

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

Creates a placement group that you launch cluster instances into. You must give the group a name that's unique within the scope of your account.

For more information about placement groups and cluster instances, see Cluster Instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the createPlacementGroup operation

var params = {
  GroupName: 'STRING_VALUE', /* required */
  Strategy: 'cluster', /* required */
  DryRun: true || false
};
ec2.createPlacementGroup(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • GroupName — (String)

      A name for the placement group.

      Constraints: Up to 255 ASCII characters

    • Strategy — (String)

      The placement strategy.

      Possible values include:
      • "cluster"

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Creates a listing for Amazon EC2 Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Reserved Instance listing at a time. To get a list of your Reserved Instances, you can use the DescribeReservedInstances operation.

The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.

To sell your Reserved Instances, you must first register as a seller in the Reserved Instance Marketplace. After completing the registration process, you can create a Reserved Instance Marketplace listing of some or all of your Reserved Instances, and specify the upfront price to receive for them. Your Reserved Instance listings then become available for purchase. To view the details of your Reserved Instance listing, you can use the DescribeReservedInstancesListings operation.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the createReservedInstancesListing operation

var params = {
  ClientToken: 'STRING_VALUE', /* required */
  InstanceCount: 0, /* required */
  PriceSchedules: [ /* required */
    {
      CurrencyCode: 'USD',
      Price: 0.0,
      Term: 0
    },
    /* more items */
  ],
  ReservedInstancesId: 'STRING_VALUE' /* required */
};
ec2.createReservedInstancesListing(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: {})
    • ReservedInstancesId — (String)

      The ID of the active Reserved Instance.

    • InstanceCount — (Integer)

      The number of instances that are a part of a Reserved Instance account to be listed in the Reserved Instance Marketplace. This number should be less than or equal to the instance count associated with the Reserved Instance ID specified in this call.

    • PriceSchedules — (Array<map>)

      A list specifying the price of the Reserved Instance for each month remaining in the Reserved Instance term.

      • Term — (Integer)

        The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

      • Price — (Float)

        The fixed price for the term.

      • CurrencyCode — (String)

        The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD.

        Possible values include:
        • "USD"
    • ClientToken — (String)

      Unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see Ensuring Idempotency.

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:

      • ReservedInstancesListings — (Array<map>)

        Information about the Reserved Instance listing.

        • ReservedInstancesListingId — (String)

          The ID of the Reserved Instance listing.

        • ReservedInstancesId — (String)

          The ID of the Reserved Instance.

        • CreateDate — (Date)

          The time the listing was created.

        • UpdateDate — (Date)

          The last modified timestamp of the listing.

        • Status — (String)

          The status of the Reserved Instance listing.

          Possible values include:
          • "active"
          • "pending"
          • "cancelled"
          • "closed"
        • StatusMessage — (String)

          The reason for the current status of the Reserved Instance listing. The response can be blank.

        • InstanceCounts — (Array<map>)

          The number of instances in this state.

          • State — (String)

            The states of the listed Reserved Instances.

            Possible values include:
            • "available"
            • "sold"
            • "cancelled"
            • "pending"
          • InstanceCount — (Integer)

            The number of listed Reserved Instances in the state specified by the state.

        • PriceSchedules — (Array<map>)

          The price of the Reserved Instance listing.

          • Term — (Integer)

            The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

          • Price — (Float)

            The fixed price for the term.

          • CurrencyCode — (String)

            The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD.

            Possible values include:
            • "USD"
          • Active — (Boolean)

            The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

            A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

        • Tags — (Array<map>)

          Any tags assigned to the resource.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • ClientToken — (String)

          A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency.

Returns:

  • (AWS.Request)

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

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

Creates a route in a route table within a VPC.

You must specify one of the following targets: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, or network interface.

When determining how to route traffic, we use the route with the most specific match. For example, let's say the traffic is destined for 192.0.2.3, and the route table includes the following two routes:

  • 192.0.2.0/24 (goes to some target A)

  • 192.0.2.0/28 (goes to some target B)

Both routes apply to the traffic destined for 192.0.2.3. However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic.

For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createRoute operation

var params = {
  DestinationCidrBlock: 'STRING_VALUE', /* required */
  RouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  GatewayId: 'STRING_VALUE',
  InstanceId: 'STRING_VALUE',
  NatGatewayId: 'STRING_VALUE',
  NetworkInterfaceId: 'STRING_VALUE',
  VpcPeeringConnectionId: 'STRING_VALUE'
};
ec2.createRoute(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • RouteTableId — (String)

      The ID of the route table for the route.

    • DestinationCidrBlock — (String)

      The CIDR address block used for the destination match. Routing decisions are based on the most specific match.

    • GatewayId — (String)

      The ID of an Internet gateway or virtual private gateway attached to your VPC.

    • InstanceId — (String)

      The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.

    • NetworkInterfaceId — (String)

      The ID of a network interface.

    • VpcPeeringConnectionId — (String)

      The ID of a VPC peering connection.

    • NatGatewayId — (String)

      The ID of a NAT gateway.

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:

      • Return — (Boolean)

        Returns true if the request succeeds; otherwise, it returns an error.

Returns:

  • (AWS.Request)

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

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

Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.

For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createRouteTable operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.createRouteTable(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpcId — (String)

      The ID of the VPC.

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:

      • RouteTable — (map)

        Information about the route table.

        • RouteTableId — (String)

          The ID of the route table.

        • VpcId — (String)

          The ID of the VPC.

        • Routes — (Array<map>)

          The routes in the route table.

          • DestinationCidrBlock — (String)

            The CIDR block used for the destination match.

          • DestinationPrefixListId — (String)

            The prefix of the AWS service.

          • GatewayId — (String)

            The ID of a gateway attached to your VPC.

          • InstanceId — (String)

            The ID of a NAT instance in your VPC.

          • InstanceOwnerId — (String)

            The AWS account ID of the owner of the instance.

          • NetworkInterfaceId — (String)

            The ID of the network interface.

          • VpcPeeringConnectionId — (String)

            The ID of the VPC peering connection.

          • NatGatewayId — (String)

            The ID of a NAT gateway.

          • State — (String)

            The state of the route. The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).

            Possible values include:
            • "active"
            • "blackhole"
          • Origin — (String)

            Describes how the route was created.

            • CreateRouteTable - The route was automatically created when the route table was created.

            • CreateRoute - The route was manually added to the route table.

            • EnableVgwRoutePropagation - The route was propagated by route propagation.

            Possible values include:
            • "CreateRouteTable"
            • "CreateRoute"
            • "EnableVgwRoutePropagation"
        • Associations — (Array<map>)

          The associations between the route table and one or more subnets.

          • RouteTableAssociationId — (String)

            The ID of the association between a route table and a subnet.

          • RouteTableId — (String)

            The ID of the route table.

          • SubnetId — (String)

            The ID of the subnet. A subnet ID is not returned for an implicit association.

          • Main — (Boolean)

            Indicates whether this is the main route table.

        • Tags — (Array<map>)

          Any tags assigned to the route table.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • PropagatingVgws — (Array<map>)

          Any virtual private gateway (VGW) propagating routes.

          • GatewayId — (String)

            The ID of the virtual private gateway (VGW).

Returns:

  • (AWS.Request)

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

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

Creates a security group.

A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.

EC2-Classic: You can have up to 500 security groups.

EC2-VPC: You can create up to 500 security groups per VPC.

When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.

You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.

You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress, AuthorizeSecurityGroupEgress, RevokeSecurityGroupIngress, and RevokeSecurityGroupEgress.

Examples:

Calling the createSecurityGroup operation

var params = {
  Description: 'STRING_VALUE', /* required */
  GroupName: 'STRING_VALUE', /* required */
  DryRun: true || false,
  VpcId: 'STRING_VALUE'
};
ec2.createSecurityGroup(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • GroupName — (String)

      The name of the security group.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

    • Description — (String)

      A description for the security group. This is informational only.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

    • VpcId — (String)

      [EC2-VPC] The ID of the VPC. Required for EC2-VPC.

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:

      • GroupId — (String)

        The ID of the security group.

Returns:

  • (AWS.Request)

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

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

Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance.

When a snapshot is created, any AWS Marketplace product codes that are associated with the source volume are propagated to the snapshot.

You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your EBS volume at the time the snapshot command is issued; this may exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is pending.

To create a snapshot for EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.

Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.

For more information, see Amazon Elastic Block Store and Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the createSnapshot operation

var params = {
  VolumeId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  DryRun: true || false
};
ec2.createSnapshot(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VolumeId — (String)

      The ID of the EBS volume.

    • Description — (String)

      A description for the 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:

      • SnapshotId — (String)

        The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

      • VolumeId — (String)

        The ID of the volume that was used to create the snapshot. Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

      • State — (String)

        The snapshot state.

        Possible values include:
        • "pending"
        • "completed"
        • "error"
      • StateMessage — (String)

        Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper AWS Key Management Service (AWS KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by the DescribeSnapshots API operation.

      • StartTime — (Date)

        The time stamp when the snapshot was initiated.

      • Progress — (String)

        The progress of the snapshot, as a percentage.

      • OwnerId — (String)

        The AWS account ID of the EBS snapshot owner.

      • Description — (String)

        The description for the snapshot.

      • VolumeSize — (Integer)

        The size of the volume, in GiB.

      • OwnerAlias — (String)

        Value from an Amazon-maintained list (amazon | aws-marketplace | microsoft) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console.

      • Tags — (Array<map>)

        Any tags assigned to the snapshot.

        • Key — (String)

          The key of the tag.

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

        • Value — (String)

          The value of the tag.

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

      • Encrypted — (Boolean)

        Indicates whether the snapshot is encrypted.

      • KmsKeyId — (String)

        The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the parent volume.

      • DataEncryptionKeyId — (String)

        The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by the DescribeSnapshots API operation.

Returns:

  • (AWS.Request)

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

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

Creates a data feed for Spot instances, enabling you to view Spot instance usage logs. You can create one data feed per AWS account. For more information, see Spot Instance Data Feed in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the createSpotDatafeedSubscription operation

var params = {
  Bucket: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Prefix: 'STRING_VALUE'
};
ec2.createSpotDatafeedSubscription(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • Bucket — (String)

      The Amazon S3 bucket in which to store the Spot instance data feed.

    • Prefix — (String)

      A prefix for the data feed file names.

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:

      • SpotDatafeedSubscription — (map)

        The Spot instance data feed subscription.

        • OwnerId — (String)

          The AWS account ID of the account.

        • Bucket — (String)

          The Amazon S3 bucket where the Spot instance data feed is located.

        • Prefix — (String)

          The prefix that is prepended to data feed files.

        • State — (String)

          The state of the Spot instance data feed subscription.

          Possible values include:
          • "Active"
          • "Inactive"
        • Fault — (map)

          The fault codes for the Spot instance request, if any.

          • Code — (String)

            The reason code for the Spot instance state change.

          • Message — (String)

            The message for the Spot instance state change.

Returns:

  • (AWS.Request)

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

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

Creates a subnet in an existing VPC.

When you create each subnet, you provide the VPC ID and the CIDR block you want for the subnet. After you create a subnet, you can't change its CIDR block. The subnet's CIDR block can be the same as the VPC's CIDR block (assuming you want only a single subnet in the VPC), or a subset of the VPC's CIDR block. If you create more than one subnet in a VPC, the subnets' CIDR blocks must not overlap. The smallest subnet (and VPC) you can create uses a /28 netmask (16 IP addresses), and the largest uses a /16 netmask (65,536 IP addresses).

AWS reserves both the first four and the last IP address in each subnet's CIDR block. They're not available for use.

If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle.

If you launch an instance in a VPC using an Amazon EBS-backed AMI, the IP address doesn't change if you stop and restart the instance (unlike a similar instance launched outside a VPC, which gets a new IP address when restarted). It's therefore possible to have a subnet with no running instances (they're all stopped), but no remaining IP addresses available.

For more information about subnets, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createSubnet operation

var params = {
  CidrBlock: 'STRING_VALUE', /* required */
  VpcId: 'STRING_VALUE', /* required */
  AvailabilityZone: 'STRING_VALUE',
  DryRun: true || false
};
ec2.createSubnet(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpcId — (String)

      The ID of the VPC.

    • CidrBlock — (String)

      The network range for the subnet, in CIDR notation. For example, 10.0.0.0/24.

    • AvailabilityZone — (String)

      The Availability Zone for the subnet.

      Default: AWS selects one for you. If you create more than one subnet in your VPC, we may not necessarily select a different zone for each subnet.

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:

      • Subnet — (map)

        Information about the subnet.

        • SubnetId — (String)

          The ID of the subnet.

        • State — (String)

          The current state of the subnet.

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

          The ID of the VPC the subnet is in.

        • CidrBlock — (String)

          The CIDR block assigned to the subnet.

        • AvailableIpAddressCount — (Integer)

          The number of unused IP addresses in the subnet. Note that the IP addresses for any stopped instances are considered unavailable.

        • AvailabilityZone — (String)

          The Availability Zone of the subnet.

        • DefaultForAz — (Boolean)

          Indicates whether this is the default subnet for the Availability Zone.

        • MapPublicIpOnLaunch — (Boolean)

          Indicates whether instances launched in this subnet receive a public IP address.

        • Tags — (Array<map>)

          Any tags assigned to the subnet.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 10 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide. For more information about creating IAM policies that control users' access to resources based on tags, see Supported Resource-Level Permissions for Amazon EC2 API Actions in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the createTags operation

var params = {
  Resources: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  Tags: [ /* required */
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  DryRun: true || false
};
ec2.createTags(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • Resources — (Array<String>)

      The IDs of one or more resources to tag. For example, ami-1a2b3c4d.

    • Tags — (Array<map>)

      One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

      • Key — (String)

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

      • Value — (String)

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Creates an EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the regional endpoint that you send the HTTP request to. For more information see Regions and Endpoints.

You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.

You can create encrypted volumes with the Encrypted parameter. Encrypted volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

For more information, see Creating or Restoring an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the createVolume operation

var params = {
  AvailabilityZone: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Encrypted: true || false,
  Iops: 0,
  KmsKeyId: 'STRING_VALUE',
  Size: 0,
  SnapshotId: 'STRING_VALUE',
  VolumeType: 'standard | io1 | gp2 | sc1 | st1'
};
ec2.createVolume(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • Size — (Integer)

      The size of the volume, in GiBs.

      Constraints: 1-16384 for gp2, 4-16384 for io1, 500-16384 for st1, 500-16384 for sc1, and 1-1024 for standard. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

      Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

    • SnapshotId — (String)

      The snapshot from which to create the volume.

    • AvailabilityZone — (String)

      The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.

    • VolumeType — (String)

      The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic volumes.

      Default: standard

      Possible values include:
      • "standard"
      • "io1"
      • "gp2"
      • "sc1"
      • "st1"
    • Iops — (Integer)

      Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 30 IOPS/GiB.

      Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes

    • Encrypted — (Boolean)

      Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

    • KmsKeyId — (String)

      The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. If a KmsKeyId is specified, the Encrypted flag must also be set.

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:

      • VolumeId — (String)

        The ID of the volume.

      • Size — (Integer)

        The size of the volume, in GiBs.

      • SnapshotId — (String)

        The snapshot from which the volume was created, if applicable.

      • AvailabilityZone — (String)

        The Availability Zone for the volume.

      • State — (String)

        The volume state.

        Possible values include:
        • "creating"
        • "available"
        • "in-use"
        • "deleting"
        • "deleted"
        • "error"
      • CreateTime — (Date)

        The time stamp when volume creation was initiated.

      • Attachments — (Array<map>)

        Information about the volume attachments.

        • VolumeId — (String)

          The ID of the volume.

        • InstanceId — (String)

          The ID of the instance.

        • Device — (String)

          The device name.

        • State — (String)

          The attachment state of the volume.

          Possible values include:
          • "attaching"
          • "attached"
          • "detaching"
          • "detached"
        • AttachTime — (Date)

          The time stamp when the attachment initiated.

        • DeleteOnTermination — (Boolean)

          Indicates whether the EBS volume is deleted on instance termination.

      • Tags — (Array<map>)

        Any tags assigned to the volume.

        • Key — (String)

          The key of the tag.

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

        • Value — (String)

          The value of the tag.

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

      • VolumeType — (String)

        The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic volumes.

        Possible values include:
        • "standard"
        • "io1"
        • "gp2"
        • "sc1"
        • "st1"
      • Iops — (Integer)

        The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

        Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.

        Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2, st1, sc1, or standard volumes.

      • Encrypted — (Boolean)

        Indicates whether the volume will be encrypted.

      • KmsKeyId — (String)

        The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.

Returns:

  • (AWS.Request)

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

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

Creates a VPC with the specified CIDR block.

The smallest VPC you can create uses a /28 netmask (16 IP addresses), and the largest uses a /16 netmask (65,536 IP addresses). To help you decide how big to make your VPC, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide.

By default, each instance you launch in the VPC has the default DHCP options, which includes only a default DNS server that we provide (AmazonProvidedDNS). For more information about DHCP options, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.

You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see Dedicated Instances in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createVpc operation

var params = {
  CidrBlock: 'STRING_VALUE', /* required */
  DryRun: true || false,
  InstanceTenancy: 'default | dedicated | host'
};
ec2.createVpc(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • CidrBlock — (String)

      The network range for the VPC, in CIDR notation. For example, 10.0.0.0/16.

    • InstanceTenancy — (String)

      The tenancy options for instances launched into the VPC. For default, instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For dedicated, instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of dedicated or host into a dedicated tenancy VPC.

      Important: The host value cannot be used with this parameter. Use the default or dedicated values only.

      Default: default

      Possible values include:
      • "default"
      • "dedicated"
      • "host"

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:

      • Vpc — (map)

        Information about the VPC.

        • VpcId — (String)

          The ID of the VPC.

        • State — (String)

          The current state of the VPC.

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

          The CIDR block for the VPC.

        • DhcpOptionsId — (String)

          The ID of the set of DHCP options you've associated with the VPC (or default if the default options are associated with the VPC).

        • Tags — (Array<map>)

          Any tags assigned to the VPC.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • InstanceTenancy — (String)

          The allowed tenancy of instances launched into the VPC.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • IsDefault — (Boolean)

          Indicates whether the VPC is the default VPC.

Returns:

  • (AWS.Request)

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

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

Creates a VPC endpoint for a specified AWS service. An endpoint enables you to create a private connection between your VPC and another AWS service in your account. You can specify an endpoint policy to attach to the endpoint that will control access to the service from your VPC. You can also specify the VPC route tables that use the endpoint.

Currently, only endpoints to Amazon S3 are supported.

Examples:

Calling the createVpcEndpoint operation

var params = {
  ServiceName: 'STRING_VALUE', /* required */
  VpcId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  PolicyDocument: 'STRING_VALUE',
  RouteTableIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.createVpcEndpoint(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpcId — (String)

      The ID of the VPC in which the endpoint will be used.

    • ServiceName — (String)

      The AWS service name, in the form com.amazonaws.region.service . To get a list of available services, use the DescribeVpcEndpointServices request.

    • PolicyDocument — (String)

      A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.

    • RouteTableIds — (Array<String>)

      One or more route table IDs.

    • ClientToken — (String)

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

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:

      • VpcEndpoint — (map)

        Information about the endpoint.

        • VpcEndpointId — (String)

          The ID of the VPC endpoint.

        • VpcId — (String)

          The ID of the VPC to which the endpoint is associated.

        • ServiceName — (String)

          The name of the AWS service to which the endpoint is associated.

        • State — (String)

          The state of the VPC endpoint.

          Possible values include:
          • "Pending"
          • "Available"
          • "Deleting"
          • "Deleted"
        • PolicyDocument — (String)

          The policy document associated with the endpoint.

        • RouteTableIds — (Array<String>)

          One or more route tables associated with the endpoint.

        • CreationTimestamp — (Date)

          The date and time the VPC endpoint was created.

      • ClientToken — (String)

        Unique, case-sensitive identifier you provide to ensure the idempotency of the request.

Returns:

  • (AWS.Request)

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

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

Requests a VPC peering connection between two VPCs: a requester VPC that you own and a peer VPC with which to create the connection. The peer VPC can belong to another AWS account. The requester VPC and peer VPC cannot have overlapping CIDR blocks.

The owner of the peer VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.

A CreateVpcPeeringConnection request between VPCs with overlapping CIDR blocks results in the VPC peering connection having a status of failed.

Examples:

Calling the createVpcPeeringConnection operation

var params = {
  DryRun: true || false,
  PeerOwnerId: 'STRING_VALUE',
  PeerVpcId: 'STRING_VALUE',
  VpcId: 'STRING_VALUE'
};
ec2.createVpcPeeringConnection(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpcId — (String)

      The ID of the requester VPC.

    • PeerVpcId — (String)

      The ID of the VPC with which you are creating the VPC peering connection.

    • PeerOwnerId — (String)

      The AWS account ID of the owner of the peer VPC.

      Default: Your AWS account ID

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:

      • VpcPeeringConnection — (map)

        Information about the VPC peering connection.

        • AccepterVpcInfo — (map)

          Information about the accepter VPC. CIDR block information is not returned when creating a VPC peering connection, or when describing a VPC peering connection that's in the initiating-request or pending-acceptance state.

          • CidrBlock — (String)

            The CIDR block for the VPC.

          • OwnerId — (String)

            The AWS account ID of the VPC owner.

          • VpcId — (String)

            The ID of the VPC.

          • PeeringOptions — (map)

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowEgressFromLocalClassicLinkToRemoteVpc — (Boolean)

              Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

            • AllowEgressFromLocalVpcToRemoteClassicLink — (Boolean)

              Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

        • ExpirationTime — (Date)

          The time that an unaccepted VPC peering connection will expire.

        • RequesterVpcInfo — (map)

          Information about the requester VPC.

          • CidrBlock — (String)

            The CIDR block for the VPC.

          • OwnerId — (String)

            The AWS account ID of the VPC owner.

          • VpcId — (String)

            The ID of the VPC.

          • PeeringOptions — (map)

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowEgressFromLocalClassicLinkToRemoteVpc — (Boolean)

              Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

            • AllowEgressFromLocalVpcToRemoteClassicLink — (Boolean)

              Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

        • Status — (map)

          The status of the VPC peering connection.

          • Code — (String)

            The status of the VPC peering connection.

            Possible values include:
            • "initiating-request"
            • "pending-acceptance"
            • "active"
            • "deleted"
            • "rejected"
            • "failed"
            • "expired"
            • "provisioning"
            • "deleting"
          • Message — (String)

            A message that provides more information about the status, if applicable.

        • Tags — (Array<map>)

          Any tags assigned to the resource.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • VpcPeeringConnectionId — (String)

          The ID of the VPC peering connection.

Returns:

  • (AWS.Request)

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

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

Creates a VPN connection between an existing virtual private gateway and a VPN customer gateway. The only supported connection type is ipsec.1.

The response includes information that you need to give to your network administrator to configure your customer gateway.

We strongly recommend that you use HTTPS when calling this operation because the response contains sensitive cryptographic information for configuring your customer gateway.

If you decide to shut down your VPN connection for any reason and later create a new VPN connection, you must reconfigure your customer gateway with the new information returned from this call.

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

For more information about VPN connections, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createVpnConnection operation

var params = {
  CustomerGatewayId: 'STRING_VALUE', /* required */
  Type: 'STRING_VALUE', /* required */
  VpnGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Options: {
    StaticRoutesOnly: true || false
  }
};
ec2.createVpnConnection(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • Type — (String)

      The type of VPN connection (ipsec.1).

    • CustomerGatewayId — (String)

      The ID of the customer gateway.

    • VpnGatewayId — (String)

      The ID of the virtual private gateway.

    • Options — (map)

      Indicates whether the VPN connection requires static routes. If you are creating a VPN connection for a device that does not support BGP, you must specify true.

      Default: false

      • StaticRoutesOnly — (Boolean)

        Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

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:

      • VpnConnection — (map)

        Information about the VPN connection.

        • VpnConnectionId — (String)

          The ID of the VPN connection.

        • State — (String)

          The current state of the VPN connection.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • CustomerGatewayConfiguration — (String)

          The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the CreateVpnConnection response; however, it's present in the DescribeVpnConnections response only if the VPN connection is in the pending or available state.

        • Type — (String)

          The type of VPN connection.

          Possible values include:
          • "ipsec.1"
        • CustomerGatewayId — (String)

          The ID of the customer gateway at your end of the VPN connection.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway at the AWS side of the VPN connection.

        • Tags — (Array<map>)

          Any tags assigned to the VPN connection.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • VgwTelemetry — (Array<map>)

          Information about the VPN tunnel.

          • OutsideIpAddress — (String)

            The Internet-routable IP address of the virtual private gateway's outside interface.

          • Status — (String)

            The status of the VPN tunnel.

            Possible values include:
            • "UP"
            • "DOWN"
          • LastStatusChange — (Date)

            The date and time of the last change in status.

          • StatusMessage — (String)

            If an error occurs, a description of the error.

          • AcceptedRouteCount — (Integer)

            The number of accepted routes.

        • Options — (map)

          The VPN connection options.

          • StaticRoutesOnly — (Boolean)

            Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

        • Routes — (Array<map>)

          The static routes associated with the VPN connection.

          • DestinationCidrBlock — (String)

            The CIDR block associated with the local subnet of the customer data center.

          • Source — (String)

            Indicates how the routes were provided.

            Possible values include:
            • "Static"
          • State — (String)

            The current state of the static route.

            Possible values include:
            • "pending"
            • "available"
            • "deleting"
            • "deleted"

Returns:

  • (AWS.Request)

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

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

Creates a static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

For more information about VPN connections, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createVpnConnectionRoute operation

var params = {
  DestinationCidrBlock: 'STRING_VALUE', /* required */
  VpnConnectionId: 'STRING_VALUE' /* required */
};
ec2.createVpnConnectionRoute(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: {})
    • VpnConnectionId — (String)

      The ID of the VPN connection.

    • DestinationCidrBlock — (String)

      The CIDR block associated with the local subnet of the customer network.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Creates a virtual private gateway. A virtual private gateway is the endpoint on the VPC side of your VPN connection. You can create a virtual private gateway before creating the VPC itself.

For more information about virtual private gateways, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createVpnGateway operation

var params = {
  Type: 'ipsec.1', /* required */
  AvailabilityZone: 'STRING_VALUE',
  DryRun: true || false
};
ec2.createVpnGateway(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • Type — (String)

      The type of VPN connection this virtual private gateway supports.

      Possible values include:
      • "ipsec.1"
    • AvailabilityZone — (String)

      The Availability Zone for the virtual private gateway.

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:

      • VpnGateway — (map)

        Information about the virtual private gateway.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway.

        • State — (String)

          The current state of the virtual private gateway.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • Type — (String)

          The type of VPN connection the virtual private gateway supports.

          Possible values include:
          • "ipsec.1"
        • AvailabilityZone — (String)

          The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.

        • VpcAttachments — (Array<map>)

          Any VPCs attached to the virtual private gateway.

          • VpcId — (String)

            The ID of the VPC.

          • State — (String)

            The current state of the attachment.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
        • Tags — (Array<map>)

          Any tags assigned to the virtual private gateway.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Deletes the specified customer gateway. You must delete the VPN connection before you can delete the customer gateway.

Examples:

Calling the deleteCustomerGateway operation

var params = {
  CustomerGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteCustomerGateway(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • CustomerGatewayId — (String)

      The ID of the customer gateway.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete it. You can disassociate the set of DHCP options by associating either a new set of options or the default set of options with the VPC.

Examples:

Calling the deleteDhcpOptions operation

var params = {
  DhcpOptionsId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteDhcpOptions(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • DhcpOptionsId — (String)

      The ID of the DHCP options set.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes one or more flow logs.

Examples:

Calling the deleteFlowLogs operation

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

      One or more flow log IDs.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • Unsuccessful — (Array<map>)

        Information about the flow logs that could not be deleted successfully.

        • ResourceId — (String)

          The ID of the resource.

        • Errorrequired — (map)

          Information about the error.

          • Coderequired — (String)

            The error code.

          • Messagerequired — (String)

            The error message accompanying the error code.

Returns:

  • (AWS.Request)

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

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

Deletes the specified Internet gateway. You must detach the Internet gateway from the VPC before you can delete it.

Examples:

Calling the deleteInternetGateway operation

var params = {
  InternetGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteInternetGateway(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • InternetGatewayId — (String)

      The ID of the Internet gateway.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified key pair, by removing the public key from Amazon EC2.

Examples:

Calling the deleteKeyPair operation

var params = {
  KeyName: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • KeyName — (String)

      The name of the 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.

Returns:

  • (AWS.Request)

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

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

Deletes the specified NAT gateway. Deleting a NAT gateway disassociates its Elastic IP address, but does not release the address from your account. Deleting a NAT gateway does not delete any NAT gateway routes in your route tables.

Examples:

Calling the deleteNatGateway operation

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

      The ID of the NAT gateway.

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:

      • NatGatewayId — (String)

        The ID of the NAT gateway.

Returns:

  • (AWS.Request)

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

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

Deletes the specified network ACL. You can't delete the ACL if it's associated with any subnets. You can't delete the default network ACL.

Examples:

Calling the deleteNetworkAcl operation

var params = {
  NetworkAclId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteNetworkAcl(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • NetworkAclId — (String)

      The ID of the network ACL.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified ingress or egress entry (rule) from the specified network ACL.

Examples:

Calling the deleteNetworkAclEntry operation

var params = {
  Egress: true || false, /* required */
  NetworkAclId: 'STRING_VALUE', /* required */
  RuleNumber: 0, /* required */
  DryRun: true || false
};
ec2.deleteNetworkAclEntry(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • NetworkAclId — (String)

      The ID of the network ACL.

    • RuleNumber — (Integer)

      The rule number of the entry to delete.

    • Egress — (Boolean)

      Indicates whether the rule is an egress rule.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified network interface. You must detach the network interface before you can delete it.

Examples:

Calling the deleteNetworkInterface operation

var params = {
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteNetworkInterface(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • NetworkInterfaceId — (String)

      The ID of the network interface.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified placement group. You must terminate all instances in the placement group before you can delete the placement group. For more information about placement groups and cluster instances, see Cluster Instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the deletePlacementGroup operation

var params = {
  GroupName: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deletePlacementGroup(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • GroupName — (String)

      The name of the placement group.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified route from the specified route table.

Examples:

Calling the deleteRoute operation

var params = {
  DestinationCidrBlock: 'STRING_VALUE', /* required */
  RouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteRoute(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • RouteTableId — (String)

      The ID of the route table.

    • DestinationCidrBlock — (String)

      The CIDR range for the route. The value you specify must match the CIDR for the route exactly.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.

Examples:

Calling the deleteRouteTable operation

var params = {
  RouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteRouteTable(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • RouteTableId — (String)

      The ID of the route table.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes a security group.

If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with InvalidGroup.InUse in EC2-Classic or DependencyViolation in EC2-VPC.

Examples:

Calling the deleteSecurityGroup operation

var params = {
  DryRun: true || false,
  GroupId: 'STRING_VALUE',
  GroupName: 'STRING_VALUE'
};
ec2.deleteSecurityGroup(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • GroupName — (String)

      [EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.

    • GroupId — (String)

      The ID of the security group. Required for a nondefault VPC.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified snapshot.

When you make periodic snapshots of a volume, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the volume.

You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI. You must first de-register the AMI before you can delete the snapshot.

For more information, see Deleting an Amazon EBS Snapshot in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the deleteSnapshot operation

var params = {
  SnapshotId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteSnapshot(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • SnapshotId — (String)

      The ID of the EBS 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.

Returns:

  • (AWS.Request)

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

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

Deletes the data feed for Spot instances.

Examples:

Calling the deleteSpotDatafeedSubscription operation

var params = {
  DryRun: true || false
};
ec2.deleteSpotDatafeedSubscription(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.

Examples:

Calling the deleteSubnet operation

var params = {
  SubnetId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteSubnet(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • SubnetId — (String)

      The ID of the subnet.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified set of tags from the specified set of resources. This call is designed to follow a DescribeTags request.

For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the deleteTags operation

var params = {
  Resources: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
ec2.deleteTags(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • Resources — (Array<String>)

      The ID of the resource. For example, ami-1a2b3c4d. You can specify more than one resource ID.

    • Tags — (Array<map>)

      One or more tags to delete. If you omit the value parameter, we delete the tag regardless of its value. If you specify this parameter with an empty string as the value, we delete the key only if its value is an empty string.

      • Key — (String)

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

      • Value — (String)

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified EBS volume. The volume must be in the available state (not attached to an instance).

Note: The volume may remain in the deleting state for several minutes.

For more information, see Deleting an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the deleteVolume operation

var params = {
  VolumeId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteVolume(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VolumeId — (String)

      The ID of the volume.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.

Examples:

Calling the deleteVpc operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteVpc(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpcId — (String)

      The ID of the VPC.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes the endpoint routes in the route tables that were associated with the endpoint.

Examples:

Calling the deleteVpcEndpoints operation

var params = {
  VpcEndpointIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.deleteVpcEndpoints(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpcEndpointIds — (Array<String>)

      One or more endpoint IDs.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • Unsuccessful — (Array<map>)

        Information about the endpoints that were not successfully deleted.

        • ResourceId — (String)

          The ID of the resource.

        • Errorrequired — (map)

          Information about the error.

          • Coderequired — (String)

            The error code.

          • Messagerequired — (String)

            The error message accompanying the error code.

Returns:

  • (AWS.Request)

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

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

Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the peer VPC can delete the VPC peering connection if it's in the active state. The owner of the requester VPC can delete a VPC peering connection in the pending-acceptance state.

Examples:

Calling the deleteVpcPeeringConnection operation

var params = {
  VpcPeeringConnectionId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteVpcPeeringConnection(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpcPeeringConnectionId — (String)

      The ID of the VPC peering connection.

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:

      • Return — (Boolean)

        Returns true if the request succeeds; otherwise, it returns an error.

Returns:

  • (AWS.Request)

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

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

Deletes the specified VPN connection.

If you're deleting the VPC and its associated components, we recommend that you detach the virtual private gateway from the VPC and delete the VPC before deleting the VPN connection. If you believe that the tunnel credentials for your VPN connection have been compromised, you can delete the VPN connection and create a new one that has new keys, without needing to delete the VPC or virtual private gateway. If you create a new VPN connection, you must reconfigure the customer gateway using the new configuration information returned with the new VPN connection ID.

Examples:

Calling the deleteVpnConnection operation

var params = {
  VpnConnectionId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteVpnConnection(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpnConnectionId — (String)

      The ID of the VPN connection.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

Examples:

Calling the deleteVpnConnectionRoute operation

var params = {
  DestinationCidrBlock: 'STRING_VALUE', /* required */
  VpnConnectionId: 'STRING_VALUE' /* required */
};
ec2.deleteVpnConnectionRoute(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: {})
    • VpnConnectionId — (String)

      The ID of the VPN connection.

    • DestinationCidrBlock — (String)

      The CIDR block associated with the local subnet of the customer network.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deletes the specified virtual private gateway. We recommend that before you delete a virtual private gateway, you detach it from the VPC and delete the VPN connection. Note that you don't need to delete the virtual private gateway if you plan to delete and recreate the VPN connection between your VPC and your network.

Examples:

Calling the deleteVpnGateway operation

var params = {
  VpnGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteVpnGateway(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • VpnGatewayId — (String)

      The ID of the virtual private gateway.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new instances.

This command does not delete the AMI.

Examples:

Calling the deregisterImage operation

var params = {
  ImageId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deregisterImage(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ImageId — (String)

      The ID of the AMI.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

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

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

Describes attributes of your AWS account. The following are the supported account attributes:

  • supported-platforms: Indicates whether your account can launch instances into EC2-Classic and EC2-VPC, or only into EC2-VPC.

  • default-vpc: The ID of the default VPC for your account, or none.

  • max-instances: The maximum number of On-Demand instances that you can run.

  • vpc-max-security-groups-per-interface: The maximum number of security groups that you can assign to a network interface.

  • max-elastic-ips: The maximum number of Elastic IP addresses that you can allocate for use with EC2-Classic.

  • vpc-max-elastic-ips: The maximum number of Elastic IP addresses that you can allocate for use with EC2-VPC.

Examples:

Calling the describeAccountAttributes operation

var params = {
  AttributeNames: [
    'supported-platforms | default-vpc',
    /* more items */
  ],
  DryRun: true || false
};
ec2.describeAccountAttributes(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • AttributeNames — (Array<String>)

      One or more account attribute names.

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:

      • AccountAttributes — (Array<map>)

        Information about one or more account attributes.

        • AttributeName — (String)

          The name of the account attribute.

        • AttributeValues — (Array<map>)

          One or more values for the account attribute.

          • AttributeValue — (String)

            The value of the attribute.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your Elastic IP addresses.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeAddresses operation

var params = {
  AllocationIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  PublicIps: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeAddresses(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • PublicIps — (Array<String>)

      [EC2-Classic] One or more Elastic IP addresses.

      Default: Describes all your Elastic IP addresses.

    • Filters — (Array<map>)

      One or more filters. Filter names and values are case-sensitive.

      • allocation-id - [EC2-VPC] The allocation ID for the address.

      • association-id - [EC2-VPC] The association ID for the address.

      • domain - Indicates whether the address is for use in EC2-Classic (standard) or in a VPC (vpc).

      • instance-id - The ID of the instance the address is associated with, if any.

      • network-interface-id - [EC2-VPC] The ID of the network interface that the address is associated with, if any.

      • network-interface-owner-id - The AWS account ID of the owner.

      • private-ip-address - [EC2-VPC] The private IP address associated with the Elastic IP address.

      • public-ip - The Elastic IP address.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • AllocationIds — (Array<String>)

      [EC2-VPC] One or more allocation IDs.

      Default: Describes all your Elastic IP addresses.

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:

      • Addresses — (Array<map>)

        Information about one or more Elastic IP addresses.

        • InstanceId — (String)

          The ID of the instance that the address is associated with (if any).

        • PublicIp — (String)

          The Elastic IP address.

        • AllocationId — (String)

          The ID representing the allocation of the address for use with EC2-VPC.

        • AssociationId — (String)

          The ID representing the association of the address with an instance in a VPC.

        • Domain — (String)

          Indicates whether this Elastic IP address is for use with instances in EC2-Classic (standard) or instances in a VPC (vpc).

          Possible values include:
          • "vpc"
          • "standard"
        • NetworkInterfaceId — (String)

          The ID of the network interface.

        • NetworkInterfaceOwnerId — (String)

          The ID of the AWS account that owns the network interface.

        • PrivateIpAddress — (String)

          The private IP address associated with the Elastic IP address.

Returns:

  • (AWS.Request)

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

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

Describes one or more of the Availability Zones that are available to you. The results include zones only for the region you're currently using. If there is an event impacting an Availability Zone, you can use this request to view the state and any provided message for that Availability Zone.

For more information, see Regions and Availability Zones in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeAvailabilityZones operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  ZoneNames: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeAvailabilityZones(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ZoneNames — (Array<String>)

      The names of one or more Availability Zones.

    • Filters — (Array<map>)

      One or more filters.

      • message - Information about the Availability Zone.

      • region-name - The name of the region for the Availability Zone (for example, us-east-1).

      • state - The state of the Availability Zone (available | information | impaired | unavailable).

      • zone-name - The name of the Availability Zone (for example, us-east-1a).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • AvailabilityZones — (Array<map>)

        Information about one or more Availability Zones.

        • ZoneName — (String)

          The name of the Availability Zone.

        • State — (String)

          The state of the Availability Zone.

          Possible values include:
          • "available"
          • "information"
          • "impaired"
          • "unavailable"
        • RegionName — (String)

          The name of the region.

        • Messages — (Array<map>)

          Any messages about the Availability Zone.

          • Message — (String)

            The message about the Availability Zone.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your bundling tasks.

Note: Completed bundle tasks are listed for only a limited time. If your bundle task is no longer in the list, you can still register an AMI from it. Just use RegisterImage with the Amazon S3 bucket name and image manifest name you provided to the bundle task.

Examples:

Calling the describeBundleTasks operation

var params = {
  BundleIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.describeBundleTasks(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • BundleIds — (Array<String>)

      One or more bundle task IDs.

      Default: Describes all your bundle tasks.

    • Filters — (Array<map>)

      One or more filters.

      • bundle-id - The ID of the bundle task.

      • error-code - If the task failed, the error code returned.

      • error-message - If the task failed, the error message returned.

      • instance-id - The ID of the instance.

      • progress - The level of task completion, as a percentage (for example, 20%).

      • s3-bucket - The Amazon S3 bucket to store the AMI.

      • s3-prefix - The beginning of the AMI name.

      • start-time - The time the task started (for example, 2013-09-15T17:15:20.000Z).

      • state - The state of the task (pending | waiting-for-shutdown | bundling | storing | cancelling | complete | failed).

      • update-time - The time of the most recent update for the task.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • BundleTasks — (Array<map>)

        Information about one or more bundle tasks.

        • InstanceId — (String)

          The ID of the instance associated with this bundle task.

        • BundleId — (String)

          The ID of the bundle task.

        • State — (String)

          The state of the task.

          Possible values include:
          • "pending"
          • "waiting-for-shutdown"
          • "bundling"
          • "storing"
          • "cancelling"
          • "complete"
          • "failed"
        • StartTime — (Date)

          The time this task started.

        • UpdateTime — (Date)

          The time of the most recent update for the task.

        • Storage — (map)

          The Amazon S3 storage locations.

          • S3 — (map)

            An Amazon S3 storage location.

            • Bucket — (String)

              The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

            • Prefix — (String)

              The beginning of the file name of the AMI.

            • AWSAccessKeyId — (String)

              The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in Best Practices for Managing AWS Access Keys.

            • UploadPolicy — (Buffer, Typed Array, Blob, String)

              An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

            • UploadPolicySignature — (String)

              The signature of the JSON document.

        • Progress — (String)

          The level of task completion, as a percent (for example, 20%).

        • BundleTaskError — (map)

          If the task fails, a description of the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message.

Returns:

  • (AWS.Request)

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

Waiter Resource States:

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

Describes one or more of your linked EC2-Classic instances. This request only returns information about EC2-Classic instances linked to a VPC through ClassicLink; you cannot use this request to return information about other instances.

Examples:

Calling the describeClassicLinkInstances operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  InstanceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE'
};
ec2.describeClassicLinkInstances(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • InstanceIds — (Array<String>)

      One or more instance IDs. Must be instances linked to a VPC through ClassicLink.

    • Filters — (Array<map>)

      One or more filters.

      • group-id - The ID of a VPC security group that's associated with the instance.

      • instance-id - The ID of the instance.

      • tag:key=value - The key/value combination of a tag assigned to the resource.

      • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

      • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

      • vpc-id - The ID of the VPC that the instance is linked to.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • NextToken — (String)

      The token to retrieve the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. You cannot specify this parameter and the instance IDs parameter in the same request.

      Constraint: If the value is greater than 1000, we return only 1000 items.

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

        Information about one or more linked EC2-Classic instances.

        • InstanceId — (String)

          The ID of the instance.

        • VpcId — (String)

          The ID of the VPC.

        • Groups — (Array<map>)

          A list of security groups.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • Tags — (Array<map>)

          Any tags assigned to the instance.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your conversion tasks. For more information, see the VM Import/Export User Guide.

For information about the import manifest referenced by this API action, see VM Import Manifest.

Examples:

Calling the describeConversionTasks operation

var params = {
  ConversionTaskIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.describeConversionTasks(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • Filters — (Array<map>)

      One or more filters.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • ConversionTaskIds — (Array<String>)

      One or more conversion task IDs.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • ConversionTasks — (Array<map>)

        Information about the conversion tasks.

        • ConversionTaskIdrequired — (String)

          The ID of the conversion task.

        • ExpirationTime — (String)

          The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.

        • ImportInstance — (map)

          If the task is for importing an instance, this contains information about the import instance task.

          • Volumesrequired — (Array<map>)

            One or more volumes.

            • BytesConvertedrequired — (Integer)

              The number of bytes converted so far.

            • AvailabilityZonerequired — (String)

              The Availability Zone where the resulting instance will reside.

            • Imagerequired — (map)

              The image.

              • Formatrequired — (String)

                The disk image format.

                Possible values include:
                • "VMDK"
                • "RAW"
                • "VHD"
              • Sizerequired — (Integer)

                The size of the disk image, in GiB.

              • ImportManifestUrlrequired — (String)

                A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.

                For information about the import manifest referenced by this API action, see VM Import Manifest.

              • Checksum — (String)

                The checksum computed for the disk image.

            • Volumerequired — (map)

              The volume.

              • Size — (Integer)

                The size of the volume, in GiB.

              • Idrequired — (String)

                The volume identifier.

            • Statusrequired — (String)

              The status of the import of this particular disk image.

            • StatusMessage — (String)

              The status information or errors related to the disk image.

            • Description — (String)

              A description of the task.

          • InstanceId — (String)

            The ID of the instance.

          • Platform — (String)

            The instance operating system.

            Possible values include:
            • "Windows"
          • Description — (String)

            A description of the task.

        • ImportVolume — (map)

          If the task is for importing a volume, this contains information about the import volume task.

          • BytesConvertedrequired — (Integer)

            The number of bytes converted so far.

          • AvailabilityZonerequired — (String)

            The Availability Zone where the resulting volume will reside.

          • Description — (String)

            The description you provided when starting the import volume task.

          • Imagerequired — (map)

            The image.

            • Formatrequired — (String)

              The disk image format.

              Possible values include:
              • "VMDK"
              • "RAW"
              • "VHD"
            • Sizerequired — (Integer)

              The size of the disk image, in GiB.

            • ImportManifestUrlrequired — (String)

              A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.

              For information about the import manifest referenced by this API action, see VM Import Manifest.

            • Checksum — (String)

              The checksum computed for the disk image.

          • Volumerequired — (map)

            The volume.

            • Size — (Integer)

              The size of the volume, in GiB.

            • Idrequired — (String)

              The volume identifier.

        • Staterequired — (String)

          The state of the conversion task.

          Possible values include:
          • "active"
          • "cancelling"
          • "cancelled"
          • "completed"
        • StatusMessage — (String)

          The status message related to the conversion task.

        • Tags — (Array<map>)

          Any tags assigned to the task.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

Waiter Resource States:

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

Describes one or more of your VPN customer gateways.

For more information about VPN customer gateways, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the describeCustomerGateways operation

var params = {
  CustomerGatewayIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.describeCustomerGateways(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • CustomerGatewayIds — (Array<String>)

      One or more customer gateway IDs.

      Default: Describes all your customer gateways.

    • Filters — (Array<map>)

      One or more filters.

      • bgp-asn - The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).

      • customer-gateway-id - The ID of the customer gateway.

      • ip-address - The IP address of the customer gateway's Internet-routable external interface.

      • state - The state of the customer gateway (pending | available | deleting | deleted).

      • type - The type of customer gateway. Currently, the only supported type is ipsec.1.

      • tag:key=value - The key/value combination of a tag assigned to the resource.

      • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

      • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • CustomerGateways — (Array<map>)

        Information about one or more customer gateways.

        • CustomerGatewayId — (String)

          The ID of the customer gateway.

        • State — (String)

          The current state of the customer gateway (pending | available | deleting | deleted).

        • Type — (String)

          The type of VPN connection the customer gateway supports (ipsec.1).

        • IpAddress — (String)

          The Internet-routable IP address of the customer gateway's outside interface.

        • BgpAsn — (String)

          The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).

        • Tags — (Array<map>)

          Any tags assigned to the customer gateway.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

Waiter Resource States:

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

Describes one or more of your DHCP options sets.

For more information about DHCP options sets, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the describeDhcpOptions operation

var params = {
  DhcpOptionsIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.describeDhcpOptions(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • DhcpOptionsIds — (Array<String>)

      The IDs of one or more DHCP options sets.

      Default: Describes all your DHCP options sets.

    • Filters — (Array<map>)

      One or more filters.

      • dhcp-options-id - The ID of a set of DHCP options.

      • key - The key for one of the options (for example, domain-name).

      • value - The value for one of the options.

      • tag:key=value - The key/value combination of a tag assigned to the resource.

      • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

      • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • DhcpOptions — (Array<map>)

        Information about one or more DHCP options sets.

        • DhcpOptionsId — (String)

          The ID of the set of DHCP options.

        • DhcpConfigurations — (Array<map>)

          One or more DHCP options in the set.

          • Key — (String)

            The name of a DHCP option.

          • Values — (Array<map>)

            One or more values for the DHCP option.

            • Value — (String)

              The attribute value. Note that the value is case-sensitive.

        • Tags — (Array<map>)

          Any tags assigned to the DHCP options set.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your export tasks.

Examples:

Calling the describeExportTasks operation

var params = {
  ExportTaskIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeExportTasks(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: {})
    • ExportTaskIds — (Array<String>)

      One or more export task IDs.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • ExportTasks — (Array<map>)

        Information about the export tasks.

        • ExportTaskId — (String)

          The ID of the export task.

        • Description — (String)

          A description of the resource being exported.

        • State — (String)

          The state of the export task.

          Possible values include:
          • "active"
          • "cancelling"
          • "cancelled"
          • "completed"
        • StatusMessage — (String)

          The status message related to the export task.

        • InstanceExportDetails — (map)

          Information about the instance to export.

          • InstanceId — (String)

            The ID of the resource being exported.

          • TargetEnvironment — (String)

            The target virtualization environment.

            Possible values include:
            • "citrix"
            • "vmware"
            • "microsoft"
        • ExportToS3Task — (map)

          Information about the export task.

          • DiskImageFormat — (String)

            The format for the exported image.

            Possible values include:
            • "VMDK"
            • "RAW"
            • "VHD"
          • ContainerFormat — (String)

            The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

            Possible values include:
            • "ova"
          • S3Bucket — (String)

            The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.

          • S3Key — (String)

            The encryption key for your S3 bucket.

Returns:

  • (AWS.Request)

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

Waiter Resource States:

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

Describes one or more flow logs. To view the information in your flow logs (the log streams for the network interfaces), you must use the CloudWatch Logs console or the CloudWatch Logs API.

Examples:

Calling the describeFlowLogs operation

var params = {
  Filter: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  FlowLogIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE'
};
ec2.describeFlowLogs(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: {})
    • FlowLogIds — (Array<String>)

      One or more flow log IDs.

    • Filter — (Array<map>)

      One or more filters.

      • deliver-log-status - The status of the logs delivery (SUCCESS | FAILED).

      • flow-log-id - The ID of the flow log.

      • log-group-name - The name of the log group.

      • resource-id - The ID of the VPC, subnet, or network interface.

      • traffic-type - The type of traffic (ACCEPT | REJECT | ALL)

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • NextToken — (String)

      The token to retrieve the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. You cannot specify this parameter and the flow log IDs parameter in the same 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:

      • FlowLogs — (Array<map>)

        Information about the flow logs.

        • CreationTime — (Date)

          The date and time the flow log was created.

        • FlowLogId — (String)

          The flow log ID.

        • FlowLogStatus — (String)

          The status of the flow log (ACTIVE).

        • ResourceId — (String)

          The ID of the resource on which the flow log was created.

        • TrafficType — (String)

          The type of traffic captured for the flow log.

          Possible values include:
          • "ACCEPT"
          • "REJECT"
          • "ALL"
        • LogGroupName — (String)

          The name of the flow log group.

        • DeliverLogsStatus — (String)

          The status of the logs delivery (SUCCESS | FAILED).

        • DeliverLogsErrorMessage — (String)

          Information about the error that occurred. Rate limited indicates that CloudWatch logs throttling has been applied for one or more network interfaces, or that you've reached the limit on the number of CloudWatch Logs log groups that you can create. Access error indicates that the IAM role associated with the flow log does not have sufficient permissions to publish to CloudWatch Logs. Unknown error indicates an internal error.

        • DeliverLogsPermissionArn — (String)

          The ARN of the IAM role that posts logs to CloudWatch Logs.

      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

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

Describes the Dedicated Host Reservations that are available to purchase.

The results describe all the Dedicated Host Reservation offerings, including offerings that may not match the instance family and region of your Dedicated Hosts. When purchasing an offering, ensure that the the instance family and region of the offering matches that of the Dedicated Host/s it will be associated with. For an overview of supported instance types, see Dedicated Hosts Overview in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeHostReservationOfferings operation

var params = {
  Filter: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxDuration: 0,
  MaxResults: 0,
  MinDuration: 0,
  NextToken: 'STRING_VALUE',
  OfferingId: 'STRING_VALUE'
};
ec2.describeHostReservationOfferings(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: {})
    • OfferingId — (String)

      The ID of the reservation offering.

    • MinDuration — (Integer)

      This is the minimum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in 1, 3, and 5 year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1, 3, or 5). For example, specify 94608000 for 3 years.

    • MaxDuration — (Integer)

      This is the maximum duration of the reservation you'd like to purchase, specified in seconds.Reservations are available in 1, 3, and 5 year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1, 3, or 5). For example, specify 157680000 for 5 years.

    • Filter — (Array<map>)

      One or more filters.

      • instance-family - The instance family of the offering (e.g., m4).

      • payment-option - The payment option (No Upfront | Partial Upfront | All Upfront).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500; if maxResults is given a larger value than 500, you will receive an error.

    • NextToken — (String)

      The token to use to retrieve the next page of results.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • OfferingSet — (Array<map>)

        Information about the offerings.

        • OfferingId — (String)

          The ID of the offering.

        • InstanceFamily — (String)

          The instance family that the offering covers.

        • PaymentOption — (String)

          The available payment option.

          Possible values include:
          • "AllUpfront"
          • "PartialUpfront"
          • "NoUpfront"
        • UpfrontPrice — (String)

          The upfront price of the offering. Does not apply to No Upfront offerings.

        • HourlyPrice — (String)

          The hourly price of the offering.

        • CurrencyCode — (String)

          The currency of the offering.

          Possible values include:
          • "USD"
        • Duration — (Integer)

          The duration of the offering (in seconds).

      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

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

Describes Dedicated Host Reservations which are associated with Dedicated Hosts in your account.

Examples:

Calling the describeHostReservations operation

var params = {
  Filter: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  HostReservationIdSet: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE'
};
ec2.describeHostReservations(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: {})
    • HostReservationIdSet — (Array<String>)

      One or more host reservation IDs.

    • Filter — (Array<map>)

      One or more filters.

      • instance-family - The instance family (e.g., m4).

      • payment-option - The payment option (No Upfront | Partial Upfront | All Upfront).

      • state - The state of the reservation (payment-pending | payment-failed | active | retired).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500; if maxResults is given a larger value than 500, you will receive an error.

    • NextToken — (String)

      The token to use to retrieve the next page of results.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • HostReservationSet — (Array<map>)

        Details about the reservation's configuration.

        • HostReservationId — (String)

          The ID of the reservation that specifies the associated Dedicated Hosts.

        • HostIdSet — (Array<String>)

          The IDs of the Dedicated Hosts associated with the reservation.

        • OfferingId — (String)

          The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.

        • InstanceFamily — (String)

          The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.

        • PaymentOption — (String)

          The payment option selected for this reservation.

          Possible values include:
          • "AllUpfront"
          • "PartialUpfront"
          • "NoUpfront"
        • HourlyPrice — (String)

          The hourly price of the reservation.

        • UpfrontPrice — (String)

          The upfront price of the reservation.

        • CurrencyCode — (String)

          The currency in which the upfrontPrice and hourlyPrice amounts are specified. At this time, the only supported currency is USD.

          Possible values include:
          • "USD"
        • Count — (Integer)

          The number of Dedicated Hosts the reservation is associated with.

        • Duration — (Integer)

          The length of the reservation's term, specified in seconds. Can be 31536000 (1 year) | 94608000 (3 years) | 157680000 (5 years).

        • End — (Date)

          The date and time that the reservation ends.

        • Start — (Date)

          The date and time that the reservation started.

        • State — (String)

          The state of the reservation.

          Possible values include:
          • "payment-pending"
          • "payment-failed"
          • "active"
          • "retired"
      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your Dedicated Hosts.

The results describe only the Dedicated Hosts in the region you're currently using. All listed instances consume capacity on your Dedicated Host. Dedicated Hosts that have recently been released will be listed with the state released.

Examples:

Calling the describeHosts operation

var params = {
  Filter: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  HostIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE'
};
ec2.describeHosts(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: {})
    • HostIds — (Array<String>)

      The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches.

    • NextToken — (String)

      The token to retrieve the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500; if maxResults is given a larger value than 500, you will receive an error. You cannot specify this parameter and the host IDs parameter in the same request.

    • Filter — (Array<map>)

      One or more filters.

      • instance-type - The instance type size that the Dedicated Host is configured to support.

      • auto-placement - Whether auto-placement is enabled or disabled (on | off).

      • host-reservation-id - The ID of the reservation assigned to this host.

      • client-token - The idempotency token you provided when you launched the instance

      • state- The allocation state of the Dedicated Host (available | under-assessment | permanent-failure | released | released-permanent-failure).

      • availability-zone - The Availability Zone of the host.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • Hosts — (Array<map>)

        Information about the Dedicated Hosts.

        • HostId — (String)

          The ID of the Dedicated Host.

        • AutoPlacement — (String)

          Whether auto-placement is on or off.

          Possible values include:
          • "on"
          • "off"
        • HostReservationId — (String)

          The reservation ID of the Dedicated Host. This returns a null response if the Dedicated Host doesn't have an associated reservation.

        • ClientToken — (String)

          Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

        • HostProperties — (map)

          The hardware specifications of the Dedicated Host.

          • Sockets — (Integer)

            The number of sockets on the Dedicated Host.

          • Cores — (Integer)

            The number of cores on the Dedicated Host.

          • TotalVCpus — (Integer)

            The number of vCPUs on the Dedicated Host.

          • InstanceType — (String)

            The instance type size that the Dedicated Host supports (for example, m3.medium).

        • State — (String)

          The Dedicated Host's state.

          Possible values include:
          • "available"
          • "under-assessment"
          • "permanent-failure"
          • "released"
          • "released-permanent-failure"
        • AvailabilityZone — (String)

          The Availability Zone of the Dedicated Host.

        • Instances — (Array<map>)

          The IDs and instance type that are currently running on the Dedicated Host.

          • InstanceId — (String)

            the IDs of instances that are running on the Dedicated Host.

          • InstanceType — (String)

            The instance type size (for example, m3.medium) of the running instance.

        • AvailableCapacity — (map)

          The number of new instances that can be launched onto the Dedicated Host.

          • AvailableInstanceCapacity — (Array<map>)

            The total number of instances that the Dedicated Host supports.

            • InstanceType — (String)

              The instance type size supported by the Dedicated Host.

            • AvailableCapacity — (Integer)

              The number of instances that can still be launched onto the Dedicated Host.

            • TotalCapacity — (Integer)

              The total number of instances that can be launched onto the Dedicated Host.

          • AvailableVCpus — (Integer)

            The number of vCPUs available on the Dedicated Host.

      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

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

Describes the ID format settings for resources for the specified IAM user, IAM role, or root user. For example, you can view the resource types that are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types. For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide.

The following resource types support longer IDs: instance | reservation | snapshot | volume.

These settings apply to the principal specified in the request. They do not apply to the principal that makes the request.

Examples:

Calling the describeIdentityIdFormat operation

var params = {
  PrincipalArn: 'STRING_VALUE', /* required */
  Resource: 'STRING_VALUE'
};
ec2.describeIdentityIdFormat(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: {})
    • Resource — (String)

      The type of resource: instance | reservation | snapshot | volume

    • PrincipalArn — (String)

      The ARN of the principal, which can be an IAM role, IAM user, or the root user.

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:

      • Statuses — (Array<map>)

        Information about the ID format for the resources.

        • Resource — (String)

          The type of resource.

        • UseLongIds — (Boolean)

          Indicates whether longer IDs (17-character IDs) are enabled for the resource.

        • Deadline — (Date)

          The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.

Returns:

  • (AWS.Request)

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

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

Describes the ID format settings for your resources on a per-region basis, for example, to view which resource types are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types.

The following resource types support longer IDs: instance | reservation | snapshot | volume.

These settings apply to the IAM user who makes the request; they do not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user, unless they explicitly override the settings by running the ModifyIdFormat command. Resources created with longer IDs are visible to all IAM users, regardless of these settings and provided that they have permission to use the relevant Describe command for the resource type.

Examples:

Calling the describeIdFormat operation

var params = {
  Resource: 'STRING_VALUE'
};
ec2.describeIdFormat(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: {})
    • Resource — (String)

      The type of resource: instance | reservation | snapshot | volume

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:

      • Statuses — (Array<map>)

        Information about the ID format for the resource.

        • Resource — (String)

          The type of resource.

        • UseLongIds — (Boolean)

          Indicates whether longer IDs (17-character IDs) are enabled for the resource.

        • Deadline — (Date)

          The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.

Returns:

  • (AWS.Request)

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

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

Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.

Examples:

Calling the describeImageAttribute operation

var params = {
  Attribute: 'description | kernel | ramdisk | launchPermission | productCodes | blockDeviceMapping | sriovNetSupport', /* required */
  ImageId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.describeImageAttribute(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ImageId — (String)

      The ID of the AMI.

    • Attribute — (String)

      The AMI attribute.

      Note: Depending on your account privileges, the blockDeviceMapping attribute may return a Client.AuthFailure error. If this happens, use DescribeImages to get information about the block device mapping for the AMI.

      Possible values include:
      • "description"
      • "kernel"
      • "ramdisk"
      • "launchPermission"
      • "productCodes"
      • "blockDeviceMapping"
      • "sriovNetSupport"

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:

      • ImageId — (String)

        The ID of the AMI.

      • LaunchPermissions — (Array<map>)

        One or more launch permissions.

        • UserId — (String)

          The AWS account ID.

        • Group — (String)

          The name of the group.

          Possible values include:
          • "all"
      • ProductCodes — (Array<map>)

        One or more product codes.

        • ProductCodeId — (String)

          The product code.

        • ProductCodeType — (String)

          The type of product code.

          Possible values include:
          • "devpay"
          • "marketplace"
      • KernelId — (map)

        The kernel ID.

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • RamdiskId — (map)

        The RAM disk ID.

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • Description — (map)

        A description for the AMI.

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • SriovNetSupport — (map)

        Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • BlockDeviceMappings — (Array<map>)

        One or more block device mapping entries.

        • VirtualName — (String)

          The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1.The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

          Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

        • DeviceName — (String)

          The device name exposed to the instance (for example, /dev/sdh or xvdh).

        • Ebs — (map)

          Parameters used to automatically set up EBS volumes when the instance is launched.

          • SnapshotId — (String)

            The ID of the snapshot.

          • VolumeSize — (Integer)

            The size of the volume, in GiB.

            Constraints: 1-16384 for General Purpose SSD (gp2), 4-16384 for Provisioned IOPS SSD (io1), 500-16384 for Throughput Optimized HDD (st1), 500-16384 for Cold HDD (sc1), and 1-1024 for Magnetic (standard) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

            Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

          • DeleteOnTermination — (Boolean)

            Indicates whether the EBS volume is deleted on instance termination.

          • VolumeType — (String)

            The volume type: gp2, io1, st1, sc1, or standard.

            Default: standard

            Possible values include:
            • "standard"
            • "io1"
            • "gp2"
            • "sc1"
            • "st1"
          • Iops — (Integer)

            The number of I/O operations per second (IOPS) that the volume supports. For io1, this represents the number of IOPS that are provisioned for the volume. For gp2, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

            Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.

            Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2, st1, sc1, or standard volumes.

          • Encrypted — (Boolean)

            Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

        • NoDevice — (String)

          Suppresses the specified device included in the block device mapping of the AMI.

Returns:

  • (AWS.Request)

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

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

Describes one or more of the images (AMIs, AKIs, and ARIs) available to you. Images available to you include public images, private images that you own, and private images owned by other AWS accounts but for which you have explicit launch permissions.

Note: Deregistered images are included in the returned results for an unspecified interval after deregistration.

Examples:

Calling the describeImages operation

var params = {
  DryRun: true || false,
  ExecutableUsers: [
    'STRING_VALUE',
    /* more items */
  ],
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  ImageIds: [
    'STRING_VALUE',
    /* more items */
  ],
  Owners: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeImages(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ImageIds — (Array<String>)

      One or more image IDs.

      Default: Describes all images available to you.

    • Owners — (Array<String>)

      Filters the images by the owner. Specify an AWS account ID, self (owner is the sender of the request), or an AWS owner alias (valid values are amazon | aws-marketplace | microsoft). Omitting this option returns all images for which you have launch permissions, regardless of ownership.

    • ExecutableUsers — (Array<String>)

      Scopes the images by users with explicit launch permissions. Specify an AWS account ID, self (the sender of the request), or all (public AMIs).

    • Filters — (Array<map>)

      One or more filters.

      • architecture - The image architecture (i386 | x86_64).

      • block-device-mapping.delete-on-termination - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination.

      • block-device-mapping.device-name - The device name for the EBS volume (for example, /dev/sdh).

      • block-device-mapping.snapshot-id - The ID of the snapshot used for the EBS volume.

      • block-device-mapping.volume-size - The volume size of the EBS volume, in GiB.

      • block-device-mapping.volume-type - The volume type of the EBS volume (gp2 | io1 | st1 | sc1 | standard).

      • description - The description of the image (provided during image creation).

      • hypervisor - The hypervisor type (ovm | xen).

      • image-id - The ID of the image.

      • image-type - The image type (machine | kernel | ramdisk).

      • is-public - A Boolean that indicates whether the image is public.

      • kernel-id - The kernel ID.

      • manifest-location - The location of the image manifest.

      • name - The name of the AMI (provided during image creation).

      • owner-alias - String value from an Amazon-maintained list (amazon | aws-marketplace | microsoft) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console.

      • owner-id - The AWS account ID of the image owner.

      • platform - The platform. To only list Windows-based AMIs, use windows.

      • product-code - The product code.

      • product-code.type - The type of the product code (devpay | marketplace).

      • ramdisk-id - The RAM disk ID.

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

      • root-device-type - The type of the root device volume (ebs | instance-store).

      • state - The state of the image (available | pending | failed).

      • state-reason-code - The reason code for the state change.

      • state-reason-message - The message for the state change.

      • tag:key=value - The key/value combination of a tag assigned to the resource.

      • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

      • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

      • virtualization-type - The virtualization type (paravirtual | hvm).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • Images — (Array<map>)

        Information about one or more images.

        • ImageId — (String)

          The ID of the AMI.

        • ImageLocation — (String)

          The location of the AMI.

        • State — (String)

          The current state of the AMI. If the state is available, the image is successfully registered and can be used to launch an instance.

          Possible values include:
          • "pending"
          • "available"
          • "invalid"
          • "deregistered"
          • "transient"
          • "failed"
          • "error"
        • OwnerId — (String)

          The AWS account ID of the image owner.

        • CreationDate — (String)

          The date and time the image was created.

        • Public — (Boolean)

          Indicates whether the image has public launch permissions. The value is true if this image has public launch permissions or false if it has only implicit and explicit launch permissions.

        • ProductCodes — (Array<map>)

          Any product codes associated with the AMI.

          • ProductCodeId — (String)

            The product code.

          • ProductCodeType — (String)

            The type of product code.

            Possible values include:
            • "devpay"
            • "marketplace"
        • Architecture — (String)

          The architecture of the image.

          Possible values include:
          • "i386"
          • "x86_64"
        • ImageType — (String)

          The type of image.

          Possible values include:
          • "machine"
          • "kernel"
          • "ramdisk"
        • KernelId — (String)

          The kernel associated with the image, if any. Only applicable for machine images.

        • RamdiskId — (String)

          The RAM disk associated with the image, if any. Only applicable for machine images.

        • Platform — (String)

          The value is Windows for Windows AMIs; otherwise blank.

          Possible values include:
          • "Windows"
        • SriovNetSupport — (String)

          Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

        • EnaSupport — (Boolean)

          Specifies whether enhanced networking with ENA is enabled.

        • StateReason — (map)

          The reason for the state change.

          • Code — (String)

            The reason code for the state change.

          • Message — (String)

            The message for the state change.

            • Server.SpotInstanceTermination: A Spot instance was terminated due to an increase in the market price.

            • Server.InternalError: An internal error occurred during instance launch, resulting in termination.

            • Server.InsufficientInstanceCapacity: There was insufficient instance capacity to satisfy the launch request.

            • Client.InternalError: A client error caused the instance to terminate on launch.

            • Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.

            • Client.UserInitiatedShutdown: The instance was shut down using the Amazon EC2 API.

            • Client.VolumeLimitExceeded: The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits.

            • Client.InvalidSnapshot.NotFound: The specified snapshot was not found.

        • ImageOwnerAlias — (String)

          The AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.

        • Name — (String)

          The name of the AMI that was provided during image creation.

        • Description — (String)

          The description of the AMI that was provided during image creation.

        • RootDeviceType — (String)

          The type of root device used by the AMI. The AMI can use an EBS volume or an instance store volume.

          Possible values include:
          • "ebs"
          • "instance-store"
        • RootDeviceName — (String)

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

        • BlockDeviceMappings — (Array<map>)

          Any block device mapping entries.

          • VirtualName — (String)

            The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1.The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

            Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

          • DeviceName — (String)

            The device name exposed to the instance (for example, /dev/sdh or xvdh).

          • Ebs — (map)

            Parameters used to automatically set up EBS volumes when the instance is launched.

            • SnapshotId — (String)

              The ID of the snapshot.

            • VolumeSize — (Integer)

              The size of the volume, in GiB.

              Constraints: 1-16384 for General Purpose SSD (gp2), 4-16384 for Provisioned IOPS SSD (io1), 500-16384 for Throughput Optimized HDD (st1), 500-16384 for Cold HDD (sc1), and 1-1024 for Magnetic (standard) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

              Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

            • DeleteOnTermination — (Boolean)

              Indicates whether the EBS volume is deleted on instance termination.

            • VolumeType — (String)

              The volume type: gp2, io1, st1, sc1, or standard.

              Default: standard

              Possible values include:
              • "standard"
              • "io1"
              • "gp2"
              • "sc1"
              • "st1"
            • Iops — (Integer)

              The number of I/O operations per second (IOPS) that the volume supports. For io1, this represents the number of IOPS that are provisioned for the volume. For gp2, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

              Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.

              Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2, st1, sc1, or standard volumes.

            • Encrypted — (Boolean)

              Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

          • NoDevice — (String)

            Suppresses the specified device included in the block device mapping of the AMI.

        • VirtualizationType — (String)

          The type of virtualization of the AMI.

          Possible values include:
          • "hvm"
          • "paravirtual"
        • Tags — (Array<map>)

          Any tags assigned to the image.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • Hypervisor — (String)

          The hypervisor type of the image.

          Possible values include:
          • "ovm"
          • "xen"

Returns:

  • (AWS.Request)

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

Waiter Resource States:

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

Displays details about an import virtual machine or import snapshot tasks that are already created.

Examples:

Calling the describeImportImageTasks operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  ImportTaskIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE'
};
ec2.describeImportImageTasks(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ImportTaskIds — (Array<String>)

      A list of import image task IDs.

    • NextToken — (String)

      A token that indicates the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.

    • Filters — (Array<map>)

      Filter tasks using the task-state filter and one of the following values: active, completed, deleting, deleted.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • ImportImageTasks — (Array<map>)

        A list of zero or more import image tasks that are currently active or were completed or canceled in the previous 7 days.

        • ImportTaskId — (String)

          The ID of the import image task.

        • Architecture — (String)

          The architecture of the virtual machine.

          Valid values: i386 | x86_64

        • LicenseType — (String)

          The license type of the virtual machine.

        • Platform — (String)

          The description string for the import image task.

        • Hypervisor — (String)

          The target hypervisor for the import task.

          Valid values: xen

        • Description — (String)

          A description of the import task.

        • SnapshotDetails — (Array<map>)

          Information about the snapshots.

          • DiskImageSize — (Float)

            The size of the disk in the snapshot, in GiB.

          • Description — (String)

            A description for the snapshot.

          • Format — (String)

            The format of the disk image from which the snapshot is created.

          • Url — (String)

            The URL used to access the disk image.

          • UserBucket — (map)

            The S3 bucket for the disk image.

            • S3Bucket — (String)

              The S3 bucket from which the disk image was created.

            • S3Key — (String)

              The file name of the disk image.

          • DeviceName — (String)

            The block device mapping for the snapshot.

          • SnapshotId — (String)

            The snapshot ID of the disk being imported.

          • Progress — (String)

            The percentage of progress for the task.

          • StatusMessage — (String)

            A detailed status message for the snapshot creation.

          • Status — (String)

            A brief status of the snapshot creation.

        • ImageId — (String)

          The ID of the Amazon Machine Image (AMI) of the imported virtual machine.

        • Progress — (String)

          The percentage of progress of the import image task.

        • StatusMessage — (String)

          A descriptive status message for the import image task.

        • Status — (String)

          A brief status for the import image task.

      • NextToken — (String)

        The token to use to get the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

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

Describes your import snapshot tasks.

Examples:

Calling the describeImportSnapshotTasks operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  ImportTaskIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE'
};
ec2.describeImportSnapshotTasks(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ImportTaskIds — (Array<String>)

      A list of import snapshot task IDs.

    • NextToken — (String)

      A token that indicates the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.

    • Filters — (Array<map>)

      One or more filters.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • ImportSnapshotTasks — (Array<map>)

        A list of zero or more import snapshot tasks that are currently active or were completed or canceled in the previous 7 days.

        • ImportTaskId — (String)

          The ID of the import snapshot task.

        • SnapshotTaskDetail — (map)

          Describes an import snapshot task.

          • DiskImageSize — (Float)

            The size of the disk in the snapshot, in GiB.

          • Description — (String)

            The description of the snapshot.

          • Format — (String)

            The format of the disk image from which the snapshot is created.

          • Url — (String)

            The URL of the disk image from which the snapshot is created.

          • UserBucket — (map)

            The S3 bucket for the disk image.

            • S3Bucket — (String)

              The S3 bucket from which the disk image was created.

            • S3Key — (String)

              The file name of the disk image.

          • SnapshotId — (String)

            The snapshot ID of the disk being imported.

          • Progress — (String)

            The percentage of completion for the import snapshot task.

          • StatusMessage — (String)

            A detailed status message for the import snapshot task.

          • Status — (String)

            A brief status for the import snapshot task.

        • Description — (String)

          A description of the import snapshot task.

      • NextToken — (String)

        The token to use to get the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

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

Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Valid attribute values are: instanceType | kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport

Examples:

Calling the describeInstanceAttribute operation

var params = {
  Attribute: 'instanceType | kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport | enaSupport', /* required */
  InstanceId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.describeInstanceAttribute(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • InstanceId — (String)

      The ID of the instance.

    • Attribute — (String)

      The instance attribute.

      Note: The enaSupport attribute is not supported at this time.

      Possible values include:
      • "instanceType"
      • "kernel"
      • "ramdisk"
      • "userData"
      • "disableApiTermination"
      • "instanceInitiatedShutdownBehavior"
      • "rootDeviceName"
      • "blockDeviceMapping"
      • "productCodes"
      • "sourceDestCheck"
      • "groupSet"
      • "ebsOptimized"
      • "sriovNetSupport"
      • "enaSupport"

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:

      • InstanceId — (String)

        The ID of the instance.

      • InstanceType — (map)

        The instance type.

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • KernelId — (map)

        The kernel ID.

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • RamdiskId — (map)

        The RAM disk ID.

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • UserData — (map)

        The user data.

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • DisableApiTermination — (map)

        If the value is true, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.

        • Value — (Boolean)

          The attribute value. The valid values are true or false.

      • InstanceInitiatedShutdownBehavior — (map)

        Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • RootDeviceName — (map)

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

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • BlockDeviceMappings — (Array<map>)

        The block device mapping of the instance.

        • DeviceName — (String)

          The device name exposed to the instance (for example, /dev/sdh or xvdh).

        • Ebs — (map)

          Parameters used to automatically set up EBS volumes when the instance is launched.

          • VolumeId — (String)

            The ID of the EBS volume.

          • Status — (String)

            The attachment state.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
          • AttachTime — (Date)

            The time stamp when the attachment initiated.

          • DeleteOnTermination — (Boolean)

            Indicates whether the volume is deleted on instance termination.

      • ProductCodes — (Array<map>)

        A list of product codes.

        • ProductCodeId — (String)

          The product code.

        • ProductCodeType — (String)

          The type of product code.

          Possible values include:
          • "devpay"
          • "marketplace"
      • EbsOptimized — (map)

        Indicates whether the instance is optimized for EBS I/O.

        • Value — (Boolean)

          The attribute value. The valid values are true or false.

      • SriovNetSupport — (map)

        Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • EnaSupport — (map)

        Indicates whether enhanced networking with ENA is enabled.

        • Value — (Boolean)

          The attribute value. The valid values are true or false.

      • SourceDestCheck — (map)

        Indicates whether source/destination checking is enabled. A value of true means checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

        • Value — (Boolean)

          The attribute value. The valid values are true or false.

      • Groups — (Array<map>)

        The security groups associated with the instance.

        • GroupName — (String)

          The name of the security group.

        • GroupId — (String)

          The ID of the security group.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your instances.

If you specify one or more instance IDs, Amazon EC2 returns information for those instances. If you do not specify instance IDs, Amazon EC2 returns information for all relevant instances. If you specify an instance ID that is not valid, an error is returned. If you specify an instance that you do not own, it is not included in the returned results.

Recently terminated instances might appear in the returned results. This interval is usually less than one hour.

If you describe instances in the rare case where an Availability Zone is experiencing a service disruption and you specify instance IDs that are in the affected zone, or do not specify any instance IDs at all, the call fails. If you describe instances and specify only instance IDs that are in an unaffected zone, the call works normally.

Examples:

Calling the describeInstances operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  InstanceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE'
};
ec2.describeInstances(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • InstanceIds — (Array<String>)

      One or more instance IDs.

      Default: Describes all your instances.

    • Filters — (Array<map>)

      One or more filters.

      • affinity - The affinity setting for an instance running on a Dedicated Host (default | host).

      • architecture - The instance architecture (i386 | x86_64).

      • availability-zone - The Availability Zone of the instance.

      • block-device-mapping.attach-time - The attach time for an EBS volume mapped to the instance, for example, 2010-09-15T17:15:20.000Z.

      • block-device-mapping.delete-on-termination - A Boolean that indicates whether the EBS volume is deleted on instance termination.

      • block-device-mapping.device-name - The device name for the EBS volume (for example, /dev/sdh or xvdh).

      • block-device-mapping.status - The status for the EBS volume (attaching | attached | detaching | detached).

      • block-device-mapping.volume-id - The volume ID of the EBS volume.

      • client-token - The idempotency token you provided when you launched the instance.

      • dns-name - The public DNS name of the instance.

      • group-id - The ID of the security group for the instance. EC2-Classic only.

      • group-name - The name of the security group for the instance. EC2-Classic only.

      • host-id - The ID of the Dedicated Host on which the instance is running, if applicable.

      • hypervisor - The hypervisor type of the instance (ovm | xen).

      • iam-instance-profile.arn - The instance profile associated with the instance. Specified as an ARN.

      • image-id - The ID of the image used to launch the instance.

      • instance-id - The ID of the instance.

      • instance-lifecycle - Indicates whether this is a Spot Instance or a Scheduled Instance (spot | scheduled).

      • instance-state-code - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).

      • instance-state-name - The state of the instance (pending | running | shutting-down | terminated | stopping | stopped).

      • instance-type - The type of instance (for example, t2.micro).

      • instance.group-id - The ID of the security group for the instance.

      • instance.group-name - The name of the security group for the instance.

      • ip-address - The public IP address of the instance.

      • kernel-id - The kernel ID.

      • key-name - The name of the key pair used when the instance was launched.

      • launch-index - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).

      • launch-time - The time when the instance was launched.

      • monitoring-state - Indicates whether monitoring is enabled for the instance (disabled | enabled).

      • owner-id - The AWS account ID of the instance owner.

      • placement-group-name - The name of the placement group for the instance.

      • platform - The platform. Use windows if you have Windows instances; otherwise, leave blank.

      • private-dns-name - The private DNS name of the instance.

      • private-ip-address - The private IP address of the instance.

      • product-code - The product code associated with the AMI used to launch the instance.

      • product-code.type - The type of product code (devpay | marketplace).

      • ramdisk-id - The RAM disk ID.

      • reason - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter.

      • requester-id - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on).

      • reservation-id - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID.

      • root-device-name - The name of the root device for the instance (for example, /dev/sda1 or /dev/xvda).

      • root-device-type - The type of root device that the instance uses (ebs | instance-store).

      • source-dest-check - Indicates whether the instance performs source/destination checking. A value of true means that checking is enabled, and false means checking is disabled. The value must be false for the instance to perform network address translation (NAT) in your VPC.

      • spot-instance-request-id - The ID of the Spot instance request.

      • state-reason-code - The reason code for the state change.

      • state-reason-message - A message that describes the state change.

      • subnet-id - The ID of the subnet for the instance.

      • tag:key=value - The key/value combination of a tag assigned to the resource, where tag:key is the tag's key.

      • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

      • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

      • tenancy - The tenancy of an instance (dedicated | default | host).

      • virtualization-type - The virtualization type of the instance (paravirtual | hvm).

      • vpc-id - The ID of the VPC that the instance is running in.

      • network-interface.description - The description of the network interface.

      • network-interface.subnet-id - The ID of the subnet for the network interface.

      • network-interface.vpc-id - The ID of the VPC for the network interface.

      • network-interface.network-interface-id - The ID of the network interface.

      • network-interface.owner-id - The ID of the owner of the network interface.

      • network-interface.availability-zone - The Availability Zone for the network interface.

      • network-interface.requester-id - The requester ID for the network interface.

      • network-interface.requester-managed - Indicates whether the network interface is being managed by AWS.

      • network-interface.status - The status of the network interface (available) | in-use).

      • network-interface.mac-address - The MAC address of the network interface.

      • network-interface.private-dns-name - The private DNS name of the network interface.

      • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.

      • network-interface.group-id - The ID of a security group associated with the network interface.

      • network-interface.group-name - The name of a security group associated with the network interface.

      • network-interface.attachment.attachment-id - The ID of the interface attachment.

      • network-interface.attachment.instance-id - The ID of the instance to which the network interface is attached.

      • network-interface.attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached.

      • network-interface.addresses.private-ip-address - The private IP address associated with the network interface.

      • network-interface.attachment.device-index - The device index to which the network interface is attached.

      • network-interface.attachment.status - The status of the attachment (attaching | attached | detaching | detached).

      • network-interface.attachment.attach-time - The time that the network interface was attached to an instance.

      • network-interface.attachment.delete-on-termination - Specifies whether the attachment is deleted when an instance is terminated.

      • network-interface.addresses.primary - Specifies whether the IP address of the network interface is the primary private IP address.

      • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address with a network interface.

      • network-interface.addresses.association.ip-owner-id - The owner ID of the private IP address associated with the network interface.

      • association.public-ip - The address of the Elastic IP address bound to the network interface.

      • association.ip-owner-id - The owner of the Elastic IP address associated with the network interface.

      • association.allocation-id - The allocation ID returned when you allocated the Elastic IP address for your network interface.

      • association.association-id - The association ID returned when the network interface was associated with an IP address.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • NextToken — (String)

      The token to request the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

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:

      • Reservations — (Array<map>)

        Zero or more reservations.

        • ReservationId — (String)

          The ID of the reservation.

        • OwnerId — (String)

          The ID of the AWS account that owns the reservation.

        • RequesterId — (String)

          The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).

        • Groups — (Array<map>)

          [EC2-Classic only] One or more security groups.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • Instances — (Array<map>)

          One or more instances.

          • InstanceId — (String)

            The ID of the instance.

          • ImageId — (String)

            The ID of the AMI used to launch the instance.

          • State — (map)

            The current state of the instance.

            • Code — (Integer)

              The low byte represents the state. The high byte is an opaque internal value and should be ignored.

              • 0 : pending

              • 16 : running

              • 32 : shutting-down

              • 48 : terminated

              • 64 : stopping

              • 80 : stopped

            • Name — (String)

              The current state of the instance.

              Possible values include:
              • "pending"
              • "running"
              • "shutting-down"
              • "terminated"
              • "stopping"
              • "stopped"
          • PrivateDnsName — (String)

            The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.

          • PublicDnsName — (String)

            The public DNS name assigned to the instance. This name is not available until the instance enters the running state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.

          • StateTransitionReason — (String)

            The reason for the most recent state transition. This might be an empty string.

          • KeyName — (String)

            The name of the key pair, if this instance was launched with an associated key pair.

          • AmiLaunchIndex — (Integer)

            The AMI launch index, which can be used to find this instance in the launch group.

          • ProductCodes — (Array<map>)

            The product codes attached to this instance, if applicable.

            • ProductCodeId — (String)

              The product code.

            • ProductCodeType — (String)

              The type of product code.

              Possible values include:
              • "devpay"
              • "marketplace"
          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "m1.small"
            • "m1.medium"
            • "m1.large"
            • "m1.xlarge"
            • "m3.medium"
            • "m3.large"
            • "m3.xlarge"
            • "m3.2xlarge"
            • "m4.large"
            • "m4.xlarge"
            • "m4.2xlarge"
            • "m4.4xlarge"
            • "m4.10xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "x1.4xlarge"
            • "x1.8xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "hi1.4xlarge"
            • "hs1.8xlarge"
            • "c1.medium"
            • "c1.xlarge"
            • "c3.large"
            • "c3.xlarge"
            • "c3.2xlarge"
            • "c3.4xlarge"
            • "c3.8xlarge"
            • "c4.large"
            • "c4.xlarge"
            • "c4.2xlarge"
            • "c4.4xlarge"
            • "c4.8xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "cg1.4xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
          • LaunchTime — (Date)

            The time the instance was launched.

          • Placement — (map)

            The location where the instance launched, if applicable.

            • AvailabilityZone — (String)

              The Availability Zone of the instance.

            • GroupName — (String)

              The name of the placement group the instance is in (for cluster compute instances).

            • Tenancy — (String)

              The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.

              Possible values include:
              • "default"
              • "dedicated"
              • "host"
            • HostId — (String)

              The ID of the Dedicted host on which the instance resides. This parameter is not support for the ImportInstance command.

            • Affinity — (String)

              The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

          • KernelId — (String)

            The kernel associated with this instance, if applicable.

          • RamdiskId — (String)

            The RAM disk associated with this instance, if applicable.

          • Platform — (String)

            The value is Windows for Windows instances; otherwise blank.

            Possible values include:
            • "Windows"
          • Monitoring — (map)

            The monitoring information for the instance.

            • State — (String)

              Indicates whether monitoring is enabled for the instance.

              Possible values include:
              • "disabled"
              • "disabling"
              • "enabled"
              • "pending"
          • SubnetId — (String)

            [EC2-VPC] The ID of the subnet in which the instance is running.

          • VpcId — (String)

            [EC2-VPC] The ID of the VPC in which the instance is running.

          • PrivateIpAddress — (String)

            The private IP address assigned to the instance.

          • PublicIpAddress — (String)

            The public IP address assigned to the instance, if applicable.

          • StateReason — (map)

            The reason for the most recent state transition.

            • Code — (String)

              The reason code for the state change.

            • Message — (String)

              The message for the state change.

              • Server.SpotInstanceTermination: A Spot instance was terminated due to an increase in the market price.

              • Server.InternalError: An internal error occurred during instance launch, resulting in termination.

              • Server.InsufficientInstanceCapacity: There was insufficient instance capacity to satisfy the launch request.

              • Client.InternalError: A client error caused the instance to terminate on launch.

              • Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.

              • Client.UserInitiatedShutdown: The instance was shut down using the Amazon EC2 API.

              • Client.VolumeLimitExceeded: The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits.

              • Client.InvalidSnapshot.NotFound: The specified snapshot was not found.

          • Architecture — (String)

            The architecture of the image.

            Possible values include:
            • "i386"
            • "x86_64"
          • RootDeviceType — (String)

            The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

            Possible values include:
            • "ebs"
            • "instance-store"
          • RootDeviceName — (String)

            The root device name (for example, /dev/sda1 or /dev/xvda).

          • BlockDeviceMappings — (Array<map>)

            Any block device mapping entries for the instance.

            • DeviceName — (String)

              The device name exposed to the instance (for example, /dev/sdh or xvdh).

            • Ebs — (map)

              Parameters used to automatically set up EBS volumes when the instance is launched.

              • VolumeId — (String)

                The ID of the EBS volume.

              • Status — (String)

                The attachment state.

                Possible values include:
                • "attaching"
                • "attached"
                • "detaching"
                • "detached"
              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • DeleteOnTermination — (Boolean)

                Indicates whether the volume is deleted on instance termination.

          • VirtualizationType — (String)

            The virtualization type of the instance.

            Possible values include:
            • "hvm"
            • "paravirtual"
          • InstanceLifecycle — (String)

            Indicates whether this is a Spot instance or a Scheduled Instance.

            Possible values include:
            • "spot"
            • "scheduled"
          • SpotInstanceRequestId — (String)

            If the request is a Spot instance request, the ID of the request.

          • ClientToken — (String)

            The idempotency token you provided when you launched the instance, if applicable.

          • Tags — (Array<map>)

            Any tags assigned to the instance.

            • Key — (String)

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

            • Value — (String)

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          • SecurityGroups — (Array<map>)

            One or more security groups for the instance.

            • GroupName — (String)

              The name of the security group.

            • GroupId — (String)

              The ID of the security group.

          • SourceDestCheck — (Boolean)

            Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.

          • Hypervisor — (String)

            The hypervisor type of the instance.

            Possible values include:
            • "ovm"
            • "xen"
          • NetworkInterfaces — (Array<map>)

            [EC2-VPC] One or more network interfaces for the instance.

            • NetworkInterfaceId — (String)

              The ID of the network interface.

            • SubnetId — (String)

              The ID of the subnet.

            • VpcId — (String)

              The ID of the VPC.

            • Description — (String)

              The description.

            • OwnerId — (String)

              The ID of the AWS account that created the network interface.

            • Status — (String)

              The status of the network interface.

              Possible values include:
              • "available"
              • "attaching"
              • "in-use"
              • "detaching"
            • MacAddress — (String)

              The MAC address.

            • PrivateIpAddress — (String)

              The IP address of the network interface within the subnet.

            • PrivateDnsName — (String)

              The private DNS name.

            • SourceDestCheck — (Boolean)

              Indicates whether to validate network traffic to or from this network interface.

            • Groups — (Array<map>)

              One or more security groups.

              • GroupName — (String)

                The name of the security group.

              • GroupId — (String)

                The ID of the security group.

            • Attachment — (map)

              The network interface attachment.

              • AttachmentId — (String)

                The ID of the network interface attachment.

              • DeviceIndex — (Integer)

                The index of the device on the instance for the network interface attachment.

              • Status — (String)

                The attachment state.

                Possible values include:
                • "attaching"
                • "attached"
                • "detaching"
                • "detached"
              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • DeleteOnTermination — (Boolean)

                Indicates whether the network interface is deleted when the instance is terminated.

            • Association — (map)

              The association information for an Elastic IP associated with the network interface.

              • PublicIp — (String)

                The public IP address or Elastic IP address bound to the network interface.

              • PublicDnsName — (String)

                The public DNS name.

              • IpOwnerId — (String)

                The ID of the owner of the Elastic IP address.

            • PrivateIpAddresses — (Array<map>)

              The private IP addresses associated with the network interface.

              • PrivateIpAddress — (String)

                The private IP address of the network interface.

              • PrivateDnsName — (String)

                The private DNS name.

              • Primary — (Boolean)

                Indicates whether this IP address is the primary private IP address of the network interface.

              • Association — (map)

                The association information for an Elastic IP address for the network interface.

                • PublicIp — (String)

                  The public IP address or Elastic IP address bound to the network interface.

                • PublicDnsName — (String)

                  The public DNS name.

                • IpOwnerId — (String)

                  The ID of the owner of the Elastic IP address.

          • IamInstanceProfile — (map)

            The IAM instance profile associated with the instance, if applicable.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the instance profile.

            • Id — (String)

              The ID of the instance profile.

          • EbsOptimized — (Boolean)

            Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

          • SriovNetSupport — (String)

            Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

          • EnaSupport — (Boolean)

            Specifies whether enhanced networking with ENA is enabled.

      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

Waiter Resource States:

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

Describes the status of one or more instances. By default, only running instances are described, unless specified otherwise.

Instance status includes the following components:

  • Status checks - Amazon EC2 performs status checks on running EC2 instances to identify hardware and software issues. For more information, see Status Checks for Your Instances and Troubleshooting Instances with Failed Status Checks in the Amazon Elastic Compute Cloud User Guide.

  • Scheduled events - Amazon EC2 can schedule events (such as reboot, stop, or terminate) for your instances related to hardware issues, software updates, or system maintenance. For more information, see Scheduled Events for Your Instances in the Amazon Elastic Compute Cloud User Guide.

  • Instance state - You can manage your instances from the moment you launch them through their termination. For more information, see Instance Lifecycle in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeInstanceStatus operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  IncludeAllInstances: true || false,
  InstanceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE'
};
ec2.describeInstanceStatus(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • InstanceIds — (Array<String>)

      One or more instance IDs.

      Default: Describes all your instances.

      Constraints: Maximum 100 explicitly specified instance IDs.

    • Filters — (Array<map>)

      One or more filters.

      • availability-zone - The Availability Zone of the instance.

      • event.code - The code for the scheduled event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop).

      • event.description - A description of the event.

      • event.not-after - The latest end time for the scheduled event (for example, 2014-09-15T17:15:20.000Z).

      • event.not-before - The earliest start time for the scheduled event (for example, 2014-09-15T17:15:20.000Z).

      • instance-state-code - The code for the instance state, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).

      • instance-state-name - The state of the instance (pending | running | shutting-down | terminated | stopping | stopped).

      • instance-status.reachability - Filters on instance status where the name is reachability (passed | failed | initializing | insufficient-data).

      • instance-status.status - The status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

      • system-status.reachability - Filters on system status where the name is reachability (passed | failed | initializing | insufficient-data).

      • system-status.status - The system status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • NextToken — (String)

      The token to retrieve the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.

    • IncludeAllInstances — (Boolean)

      When true, includes the health status for all instances. When false, includes the health status for running instances only.

      Default: false

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:

      • InstanceStatuses — (Array<map>)

        One or more instance status descriptions.

        • InstanceId — (String)

          The ID of the instance.

        • AvailabilityZone — (String)

          The Availability Zone of the instance.

        • Events — (Array<map>)

          Any scheduled events associated with the instance.

          • Code — (String)

            The event code.

            Possible values include:
            • "instance-reboot"
            • "system-reboot"
            • "system-maintenance"
            • "instance-retirement"
            • "instance-stop"
          • Description — (String)

            A description of the event.

            After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].

          • NotBefore — (Date)

            The earliest scheduled start time for the event.

          • NotAfter — (Date)

            The latest scheduled end time for the event.

        • InstanceState — (map)

          The intended state of the instance. DescribeInstanceStatus requires that an instance be in the running state.

          • Code — (Integer)

            The low byte represents the state. The high byte is an opaque internal value and should be ignored.

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

          • Name — (String)

            The current state of the instance.

            Possible values include:
            • "pending"
            • "running"
            • "shutting-down"
            • "terminated"
            • "stopping"
            • "stopped"
        • SystemStatus — (map)

          Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.

          • Status — (String)

            The status.

            Possible values include:
            • "ok"
            • "impaired"
            • "insufficient-data"
            • "not-applicable"
            • "initializing"
          • Details — (Array<map>)

            The system instance health or application instance health.

            • Name — (String)

              The type of instance status.

              Possible values include:
              • "reachability"
            • Status — (String)

              The status.

              Possible values include:
              • "passed"
              • "failed"
              • "insufficient-data"
              • "initializing"
            • ImpairedSince — (Date)

              The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

        • InstanceStatus — (map)

          Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.

          • Status — (String)

            The status.

            Possible values include:
            • "ok"
            • "impaired"
            • "insufficient-data"
            • "not-applicable"
            • "initializing"
          • Details — (Array<map>)

            The system instance health or application instance health.

            • Name — (String)

              The type of instance status.

              Possible values include:
              • "reachability"
            • Status — (String)

              The status.

              Possible values include:
              • "passed"
              • "failed"
              • "insufficient-data"
              • "initializing"
            • ImpairedSince — (Date)

              The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

Waiter Resource States:

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

Describes one or more of your Internet gateways.

Examples:

Calling the describeInternetGateways operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  InternetGatewayIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeInternetGateways(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • InternetGatewayIds — (Array<String>)

      One or more Internet gateway IDs.

      Default: Describes all your Internet gateways.

    • Filters — (Array<map>)

      One or more filters.

      • attachment.state - The current state of the attachment between the gateway and the VPC (available). Present only if a VPC is attached.

      • attachment.vpc-id - The ID of an attached VPC.

      • internet-gateway-id - The ID of the Internet gateway.

      • tag:key=value - The key/value combination of a tag assigned to the resource.

      • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

      • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • InternetGateways — (Array<map>)

        Information about one or more Internet gateways.

        • InternetGatewayId — (String)

          The ID of the Internet gateway.

        • Attachments — (Array<map>)

          Any VPCs attached to the Internet gateway.

          • VpcId — (String)

            The ID of the VPC.

          • State — (String)

            The current state of the attachment.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
        • Tags — (Array<map>)

          Any tags assigned to the Internet gateway.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your key pairs.

For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeKeyPairs operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  KeyNames: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeKeyPairs(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • KeyNames — (Array<String>)

      One or more key pair names.

      Default: Describes all your key pairs.

    • Filters — (Array<map>)

      One or more filters.

      • fingerprint - The fingerprint of the key pair.

      • key-name - The name of the key pair.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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

        Information about one or more key pairs.

        • KeyName — (String)

          The name of the key pair.

        • KeyFingerprint — (String)

          If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used ImportKeyPair to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.

Returns:

  • (AWS.Request)

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

Waiter Resource States:

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

Describes your Elastic IP addresses that are being moved to the EC2-VPC platform, or that are being restored to the EC2-Classic platform. This request does not return information about any other Elastic IP addresses in your account.

Examples:

Calling the describeMovingAddresses operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE',
  PublicIps: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeMovingAddresses(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • PublicIps — (Array<String>)

      One or more Elastic IP addresses.

    • NextToken — (String)

      The token to use to retrieve the next page of results.

    • Filters — (Array<map>)

      One or more filters.

      • moving-status - The status of the Elastic IP address (MovingToVpc | RestoringToClassic).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value outside of this range, an error is returned.

      Default: If no value is provided, the default is 1000.

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:

      • MovingAddressStatuses — (Array<map>)

        The status for each Elastic IP address.

        • PublicIp — (String)

          The Elastic IP address.

        • MoveStatus — (String)

          The status of the Elastic IP address that's being moved to the EC2-VPC platform, or restored to the EC2-Classic platform.

          Possible values include:
          • "movingToVpc"
          • "restoringToClassic"
      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

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

Describes one or more of the your NAT gateways.

Examples:

Calling the describeNatGateways operation

var params = {
  Filter: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 0,
  NatGatewayIds: [
    'STRING_VALUE',
    /* more items */
  ],
  NextToken: 'STRING_VALUE'
};
ec2.describeNatGateways(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: {})
    • NatGatewayIds — (Array<String>)

      One or more NAT gateway IDs.

    • Filter — (Array<map>)

      One or more filters.

      • nat-gateway-id - The ID of the NAT gateway.

      • state - The state of the NAT gateway (pending | failed | available | deleting | deleted).

      • subnet-id - The ID of the subnet in which the NAT gateway resides.

      • vpc-id - The ID of the VPC in which the NAT gateway resides.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

      Constraint: If the value specified is greater than 1000, we return only 1000 items.

    • NextToken — (String)

      The token to retrieve the next page of results.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • NatGateways — (Array<map>)

        Information about the NAT gateways.

        • VpcId — (String)

          The ID of the VPC in which the NAT gateway is located.

        • SubnetId — (String)

          The ID of the subnet in which the NAT gateway is located.

        • NatGatewayId — (String)

          The ID of the NAT gateway.

        • CreateTime — (Date)

          The date and time the NAT gateway was created.

        • DeleteTime — (Date)

          The date and time the NAT gateway was deleted, if applicable.

        • NatGatewayAddresses — (Array<map>)

          Information about the IP addresses and network interface associated with the NAT gateway.

          • PublicIp — (String)

            The Elastic IP address associated with the NAT gateway.

          • AllocationId — (String)

            The allocation ID of the Elastic IP address that's associated with the NAT gateway.

          • PrivateIp — (String)

            The private IP address associated with the Elastic IP address.

          • NetworkInterfaceId — (String)

            The ID of the network interface associated with the NAT gateway.

        • State — (String)

          The state of the NAT gateway.

          • pending: The NAT gateway is being created and is not ready to process traffic.

          • failed: The NAT gateway could not be created. Check the failureCode and failureMessage fields for the reason.

          • available: The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.

          • deleting: The NAT gateway is in the process of being terminated and may still be processing traffic.

          • deleted: The NAT gateway has been terminated and is no longer processing traffic.

          Possible values include:
          • "pending"
          • "failed"
          • "available"
          • "deleting"
          • "deleted"
        • FailureCode — (String)

          If the NAT gateway could not be created, specifies the error code for the failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached | InvalidAllocationID.NotFound | Resource.AlreadyAssociated | InternalError | InvalidSubnetID.NotFound)

        • FailureMessage — (String)

          If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.

          • For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"

          • For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"

          • For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"

          • For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"

          • For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."

          • For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."

        • ProvisionedBandwidth — (map)

          Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.

      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

Waiter Resource States:

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

Describes one or more of your network ACLs.

For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the describeNetworkAcls operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  NetworkAclIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeNetworkAcls(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • NetworkAclIds — (Array<String>)

      One or more network ACL IDs.

      Default: Describes all your network ACLs.

    • Filters — (Array<map>)

      One or more filters.

      • association.association-id - The ID of an association ID for the ACL.

      • association.network-acl-id - The ID of the network ACL involved in the association.

      • association.subnet-id - The ID of the subnet involved in the association.

      • default - Indicates whether the ACL is the default network ACL for the VPC.

      • entry.cidr - The CIDR range specified in the entry.

      • entry.egress - Indicates whether the entry applies to egress traffic.

      • entry.icmp.code - The ICMP code specified in the entry, if any.

      • entry.icmp.type - The ICMP type specified in the entry, if any.

      • entry.port-range.from - The start of the port range specified in the entry.

      • entry.port-range.to - The end of the port range specified in the entry.

      • entry.protocol - The protocol specified in the entry (tcp | udp | icmp or a protocol number).

      • entry.rule-action - Allows or denies the matching traffic (allow | deny).

      • entry.rule-number - The number of an entry (in other words, rule) in the ACL's set of entries.

      • network-acl-id - The ID of the network ACL.

      • tag:key=value - The key/value combination of a tag assigned to the resource.

      • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

      • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

      • vpc-id - The ID of the VPC for the network ACL.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • NetworkAcls — (Array<map>)

        Information about one or more network ACLs.

        • NetworkAclId — (String)

          The ID of the network ACL.

        • VpcId — (String)

          The ID of the VPC for the network ACL.

        • IsDefault — (Boolean)

          Indicates whether this is the default network ACL for the VPC.

        • Entries — (Array<map>)

          One or more entries (rules) in the network ACL.

          • RuleNumber — (Integer)

            The rule number for the entry. ACL entries are processed in ascending order by rule number.

          • Protocol — (String)

            The protocol. A value of -1 means all protocols.

          • RuleAction — (String)

            Indicates whether to allow or deny the traffic that matches the rule.

            Possible values include:
            • "allow"
            • "deny"
          • Egress — (Boolean)

            Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).

          • CidrBlock — (String)

            The network range to allow or deny, in CIDR notation.

          • IcmpTypeCode — (map)

            ICMP protocol: The ICMP type and code.

            • Type — (Integer)

              The ICMP code. A value of -1 means all codes for the specified ICMP type.

            • Code — (Integer)

              The ICMP type. A value of -1 means all types.

          • PortRange — (map)

            TCP or UDP protocols: The range of ports the rule applies to.

            • From — (Integer)

              The first port in the range.

            • To — (Integer)

              The last port in the range.

        • Associations — (Array<map>)

          Any associations between the network ACL and one or more subnets

          • NetworkAclAssociationId — (String)

            The ID of the association between a network ACL and a subnet.

          • NetworkAclId — (String)

            The ID of the network ACL.

          • SubnetId — (String)

            The ID of the subnet.

        • Tags — (Array<map>)

          Any tags assigned to the network ACL.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Describes a network interface attribute. You can specify only one attribute at a time.

Examples:

Calling the describeNetworkInterfaceAttribute operation

var params = {
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  Attribute: 'description | groupSet | sourceDestCheck | attachment',
  DryRun: true || false
};
ec2.describeNetworkInterfaceAttribute(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • NetworkInterfaceId — (String)

      The ID of the network interface.

    • Attribute — (String)

      The attribute of the network interface.

      Possible values include:
      • "description"
      • "groupSet"
      • "sourceDestCheck"
      • "attachment"

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:

      • NetworkInterfaceId — (String)

        The ID of the network interface.

      • Description — (map)

        The description of the network interface.

        • Value — (String)

          The attribute value. Note that the value is case-sensitive.

      • SourceDestCheck — (map)

        Indicates whether source/destination checking is enabled.

        • Value — (Boolean)

          The attribute value. The valid values are true or false.

      • Groups — (Array<map>)

        The security groups associated with the network interface.

        • GroupName — (String)

          The name of the security group.

        • GroupId — (String)

          The ID of the security group.

      • Attachment — (map)

        The attachment (if any) of the network interface.

        • AttachmentId — (String)

          The ID of the network interface attachment.

        • InstanceId — (String)

          The ID of the instance.

        • InstanceOwnerId — (String)

          The AWS account ID of the owner of the instance.

        • DeviceIndex — (Integer)

          The device index of the network interface attachment on the instance.

        • Status — (String)

          The attachment state.

          Possible values include:
          • "attaching"
          • "attached"
          • "detaching"
          • "detached"
        • AttachTime — (Date)

          The timestamp indicating when the attachment initiated.

        • DeleteOnTermination — (Boolean)

          Indicates whether the network interface is deleted when the instance is terminated.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your network interfaces.

Examples:

Calling the describeNetworkInterfaces operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  NetworkInterfaceIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeNetworkInterfaces(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • NetworkInterfaceIds — (Array<String>)

      One or more network interface IDs.

      Default: Describes all your network interfaces.

    • Filters — (Array<map>)

      One or more filters.

      • addresses.private-ip-address - The private IP addresses associated with the network interface.

      • addresses.primary - Whether the private IP address is the primary IP address associated with the network interface.

      • addresses.association.public-ip - The association ID returned when the network interface was associated with the Elastic IP address.

      • addresses.association.owner-id - The owner ID of the addresses associated with the network interface.

      • association.association-id - The association ID returned when the network interface was associated with an IP address.

      • association.allocation-id - The allocation ID returned when you allocated the Elastic IP address for your network interface.

      • association.ip-owner-id - The owner of the Elastic IP address associated with the network interface.

      • association.public-ip - The address of the Elastic IP address bound to the network interface.

      • association.public-dns-name - The public DNS name for the network interface.

      • attachment.attachment-id - The ID of the interface attachment.

      • attachment.attach.time - The time that the network interface was attached to an instance.

      • attachment.delete-on-termination - Indicates whether the attachment is deleted when an instance is terminated.

      • attachment.device-index - The device index to which the network interface is attached.

      • attachment.instance-id - The ID of the instance to which the network interface is attached.

      • attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached.

      • attachment.nat-gateway-id - The ID of the NAT gateway to which the network interface is attached.

      • attachment.status - The status of the attachment (attaching | attached | detaching | detached).

      • availability-zone - The Availability Zone of the network interface.

      • description - The description of the network interface.

      • group-id - The ID of a security group associated with the network interface.

      • group-name - The name of a security group associated with the network interface.

      • mac-address - The MAC address of the network interface.

      • network-interface-id - The ID of the network interface.

      • owner-id - The AWS account ID of the network interface owner.

      • private-ip-address - The private IP address or addresses of the network interface.

      • private-dns-name - The private DNS name of the network interface.

      • requester-id - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on).

      • requester-managed - Indicates whether the network interface is being managed by an AWS service (for example, AWS Management Console, Auto Scaling, and so on).

      • source-desk-check - Indicates whether the network interface performs source/destination checking. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.

      • status - The status of the network interface. If the network interface is not attached to an instance, the status is available; if a network interface is attached to an instance the status is in-use.

      • subnet-id - The ID of the subnet for the network interface.

      • tag:key=value - The key/value combination of a tag assigned to the resource.

      • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

      • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

      • vpc-id - The ID of the VPC for the network interface.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • NetworkInterfaces — (Array<map>)

        Information about one or more network interfaces.

        • NetworkInterfaceId — (String)

          The ID of the network interface.

        • SubnetId — (String)

          The ID of the subnet.

        • VpcId — (String)

          The ID of the VPC.

        • AvailabilityZone — (String)

          The Availability Zone.

        • Description — (String)

          A description.

        • OwnerId — (String)

          The AWS account ID of the owner of the network interface.

        • RequesterId — (String)

          The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).

        • RequesterManaged — (Boolean)

          Indicates whether the network interface is being managed by AWS.

        • Status — (String)

          The status of the network interface.

          Possible values include:
          • "available"
          • "attaching"
          • "in-use"
          • "detaching"
        • MacAddress — (String)

          The MAC address.

        • PrivateIpAddress — (String)

          The IP address of the network interface within the subnet.

        • PrivateDnsName — (String)

          The private DNS name.

        • SourceDestCheck — (Boolean)

          Indicates whether traffic to or from the instance is validated.

        • Groups — (Array<map>)

          Any security groups for the network interface.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • Attachment — (map)

          The network interface attachment.

          • AttachmentId — (String)

            The ID of the network interface attachment.

          • InstanceId — (String)

            The ID of the instance.

          • InstanceOwnerId — (String)

            The AWS account ID of the owner of the instance.

          • DeviceIndex — (Integer)

            The device index of the network interface attachment on the instance.

          • Status — (String)

            The attachment state.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
          • AttachTime — (Date)

            The timestamp indicating when the attachment initiated.

          • DeleteOnTermination — (Boolean)

            Indicates whether the network interface is deleted when the instance is terminated.

        • Association — (map)

          The association information for an Elastic IP associated with the network interface.

          • PublicIp — (String)

            The address of the Elastic IP address bound to the network interface.

          • PublicDnsName — (String)

            The public DNS name.

          • IpOwnerId — (String)

            The ID of the Elastic IP address owner.

          • AllocationId — (String)

            The allocation ID.

          • AssociationId — (String)

            The association ID.

        • TagSet — (Array<map>)

          Any tags assigned to the network interface.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • PrivateIpAddresses — (Array<map>)

          The private IP addresses associated with the network interface.

          • PrivateIpAddress — (String)

            The private IP address.

          • PrivateDnsName — (String)

            The private DNS name.

          • Primary — (Boolean)

            Indicates whether this IP address is the primary private IP address of the network interface.

          • Association — (map)

            The association information for an Elastic IP address associated with the network interface.

            • PublicIp — (String)

              The address of the Elastic IP address bound to the network interface.

            • PublicDnsName — (String)

              The public DNS name.

            • IpOwnerId — (String)

              The ID of the Elastic IP address owner.

            • AllocationId — (String)

              The allocation ID.

            • AssociationId — (String)

              The association ID.

        • InterfaceType — (String)

          The type of interface.

          Possible values include:
          • "interface"
          • "natGateway"

Returns:

  • (AWS.Request)

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

Waiter Resource States:

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

Describes one or more of your placement groups. For more information about placement groups and cluster instances, see Cluster Instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describePlacementGroups operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  GroupNames: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describePlacementGroups(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • GroupNames — (Array<String>)

      One or more placement group names.

      Default: Describes all your placement groups, or only those otherwise specified.

    • Filters — (Array<map>)

      One or more filters.

      • group-name - The name of the placement group.

      • state - The state of the placement group (pending | available | deleting | deleted).

      • strategy - The strategy of the placement group (cluster).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • PlacementGroups — (Array<map>)

        One or more placement groups.

        • GroupName — (String)

          The name of the placement group.

        • Strategy — (String)

          The placement strategy.

          Possible values include:
          • "cluster"
        • State — (String)

          The state of the placement group.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"

Returns:

  • (AWS.Request)

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

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

Describes available AWS services in a prefix list format, which includes the prefix list name and prefix list ID of the service and the IP address range for the service. A prefix list ID is required for creating an outbound security group rule that allows traffic from a VPC to access an AWS service through a VPC endpoint.

Examples:

Calling the describePrefixLists operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE',
  PrefixListIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describePrefixLists(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • PrefixListIds — (Array<String>)

      One or more prefix list IDs.

    • Filters — (Array<map>)

      One or more filters.

      • prefix-list-id: The ID of a prefix list.

      • prefix-list-name: The name of a prefix list.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

      Constraint: If the value specified is greater than 1000, we return only 1000 items.

    • NextToken — (String)

      The token for the next set of items to return. (You received this token from a prior call.)

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:

      • PrefixLists — (Array<map>)

        All available prefix lists.

        • PrefixListId — (String)

          The ID of the prefix.

        • PrefixListName — (String)

          The name of the prefix.

        • Cidrs — (Array<String>)

          The IP address range of the AWS service.

      • NextToken — (String)

        The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

Returns:

  • (AWS.Request)

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

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

Describes one or more regions that are currently available to you.

For a list of the regions supported by Amazon EC2, see Regions and Endpoints.

Examples:

Calling the describeRegions operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  RegionNames: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeRegions(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • RegionNames — (Array<String>)

      The names of one or more regions.

    • Filters — (Array<map>)

      One or more filters.

      • endpoint - The endpoint of the region (for example, ec2.us-east-1.amazonaws.com).

      • region-name - The name of the region (for example, us-east-1).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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

        Information about one or more regions.

        • RegionName — (String)

          The name of the region.

        • Endpoint — (String)

          The region service endpoint.

Returns:

  • (AWS.Request)

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

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

Describes one or more of the Reserved Instances that you purchased.

For more information about Reserved Instances, see Reserved Instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeReservedInstances operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  OfferingType: 'Heavy Utilization | Medium Utilization | Light Utilization | No Upfront | Partial Upfront | All Upfront',
  ReservedInstancesIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeReservedInstances(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ReservedInstancesIds — (Array<String>)

      One or more Reserved Instance IDs.

      Default: Describes all your Reserved Instances, or only those otherwise specified.

    • Filters — (Array<map>)

      One or more filters.

      • availability-zone - The Availability Zone where the Reserved Instance can be used.

      • duration - The duration of the Reserved Instance (one year or three years), in seconds (31536000 | 94608000).

      • end - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z).

      • fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).

      • instance-type - The instance type that is covered by the reservation.

      • product-description - The Reserved Instance product platform description. Instances that include (Amazon VPC) in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC)).

      • reserved-instances-id - The ID of the Reserved Instance.

      • start - The time at which the Reserved Instance purchase request was placed (for example, 2014-08-07T11:54:42.000Z).

      • state - The state of the Reserved Instance (payment-pending | active | payment-failed | retired).

      • tag:key=value - The key/value combination of a tag assigned to the resource.

      • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

      • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

      • usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • OfferingType — (String)

      The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.

      Possible values include:
      • "Heavy Utilization"
      • "Medium Utilization"
      • "Light Utilization"
      • "No Upfront"
      • "Partial Upfront"
      • "All Upfront"

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:

      • ReservedInstances — (Array<map>)

        A list of Reserved Instances.

        • ReservedInstancesId — (String)

          The ID of the Reserved Instance.

        • InstanceType — (String)

          The instance type on which the Reserved Instance can be used.

          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "m1.small"
          • "m1.medium"
          • "m1.large"
          • "m1.xlarge"
          • "m3.medium"
          • "m3.large"
          • "m3.xlarge"
          • "m3.2xlarge"
          • "m4.large"
          • "m4.xlarge"
          • "m4.2xlarge"
          • "m4.4xlarge"
          • "m4.10xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "x1.4xlarge"
          • "x1.8xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "hi1.4xlarge"
          • "hs1.8xlarge"
          • "c1.medium"
          • "c1.xlarge"
          • "c3.large"
          • "c3.xlarge"
          • "c3.2xlarge"
          • "c3.4xlarge"
          • "c3.8xlarge"
          • "c4.large"
          • "c4.xlarge"
          • "c4.2xlarge"
          • "c4.4xlarge"
          • "c4.8xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "cg1.4xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
        • AvailabilityZone — (String)

          The Availability Zone in which the Reserved Instance can be used.

        • Start — (Date)

          The date and time the Reserved Instance started.

        • End — (Date)

          The time when the Reserved Instance expires.

        • Duration — (Integer)

          The duration of the Reserved Instance, in seconds.

        • UsagePrice — (Float)

          The usage price of the Reserved Instance, per hour.

        • FixedPrice — (Float)

          The purchase price of the Reserved Instance.

        • InstanceCount — (Integer)

          The number of reservations purchased.

        • ProductDescription — (String)

          The Reserved Instance product platform description.

          Possible values include:
          • "Linux/UNIX"
          • "Linux/UNIX (Amazon VPC)"
          • "Windows"
          • "Windows (Amazon VPC)"
        • State — (String)

          The state of the Reserved Instance purchase.

          Possible values include:
          • "payment-pending"
          • "active"
          • "payment-failed"
          • "retired"
        • Tags — (Array<map>)

          Any tags assigned to the resource.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • InstanceTenancy — (String)

          The tenancy of the instance.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • CurrencyCode — (String)

          The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is USD.

          Possible values include:
          • "USD"
        • OfferingType — (String)

          The Reserved Instance offering type.

          Possible values include:
          • "Heavy Utilization"
          • "Medium Utilization"
          • "Light Utilization"
          • "No Upfront"
          • "Partial Upfront"
          • "All Upfront"
        • RecurringCharges — (Array<map>)

          The recurring charge tag assigned to the resource.

          • Frequency — (String)

            The frequency of the recurring charge.

            Possible values include:
            • "Hourly"
          • Amount — (Float)

            The amount of the recurring charge.

Returns:

  • (AWS.Request)

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

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

Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.

The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.

As a seller, you choose to list some or all of your Reserved Instances, and you specify the upfront price to receive for them. Your Reserved Instances are then listed in the Reserved Instance Marketplace and are available for purchase.

As a buyer, you specify the configuration of the Reserved Instance to purchase, and the Marketplace matches what you're searching for with what's available. The Marketplace first sells the lowest priced Reserved Instances to you, and continues to sell available Reserved Instance listings to you until your demand is met. You are charged based on the total price of all of the listings that you purchase.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeReservedInstancesListings operation

var params = {
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  ReservedInstancesId: 'STRING_VALUE',
  ReservedInstancesListingId: 'STRING_VALUE'
};
ec2.describeReservedInstancesListings(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: {})
    • ReservedInstancesId — (String)

      One or more Reserved Instance IDs.

    • ReservedInstancesListingId — (String)

      One or more Reserved Instance listing IDs.

    • Filters — (Array<map>)

      One or more filters.

      • reserved-instances-id - The ID of the Reserved Instances.

      • reserved-instances-listing-id - The ID of the Reserved Instances listing.

      • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

      • status-message - The reason for the status.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • ReservedInstancesListings — (Array<map>)

        Information about the Reserved Instance listing.

        • ReservedInstancesListingId — (String)

          The ID of the Reserved Instance listing.

        • ReservedInstancesId — (String)

          The ID of the Reserved Instance.

        • CreateDate — (Date)

          The time the listing was created.

        • UpdateDate — (Date)

          The last modified timestamp of the listing.

        • Status — (String)

          The status of the Reserved Instance listing.

          Possible values include:
          • "active"
          • "pending"
          • "cancelled"
          • "closed"
        • StatusMessage — (String)

          The reason for the current status of the Reserved Instance listing. The response can be blank.

        • InstanceCounts — (Array<map>)

          The number of instances in this state.

          • State — (String)

            The states of the listed Reserved Instances.

            Possible values include:
            • "available"
            • "sold"
            • "cancelled"
            • "pending"
          • InstanceCount — (Integer)

            The number of listed Reserved Instances in the state specified by the state.

        • PriceSchedules — (Array<map>)

          The price of the Reserved Instance listing.

          • Term — (Integer)

            The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

          • Price — (Float)

            The fixed price for the term.

          • CurrencyCode — (String)

            The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD.

            Possible values include:
            • "USD"
          • Active — (Boolean)

            The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

            A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

        • Tags — (Array<map>)

          Any tags assigned to the resource.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • ClientToken — (String)

          A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency.

Returns:

  • (AWS.Request)

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

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

Describes the modifications made to your Reserved Instances. If no parameter is specified, information about all your Reserved Instances modification requests is returned. If a modification ID is specified, only information about the specific modification is returned.

For more information, see Modifying Reserved Instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeReservedInstancesModifications operation

var params = {
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  NextToken: 'STRING_VALUE',
  ReservedInstancesModificationIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeReservedInstancesModifications(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: {})
    • ReservedInstancesModificationIds — (Array<String>)

      IDs for the submitted modification request.

    • NextToken — (String)

      The token to retrieve the next page of results.

    • Filters — (Array<map>)

      One or more filters.

      • client-token - The idempotency token for the modification request.

      • create-date - The time when the modification request was created.

      • effective-date - The time when the modification becomes effective.

      • modification-result.reserved-instances-id - The ID for the Reserved Instances created as part of the modification request. This ID is only available when the status of the modification is fulfilled.

      • modification-result.target-configuration.availability-zone - The Availability Zone for the new Reserved Instances.

      • modification-result.target-configuration.instance-count - The number of new Reserved Instances.

      • modification-result.target-configuration.instance-type - The instance type of the new Reserved Instances.

      • modification-result.target-configuration.platform - The network platform of the new Reserved Instances (EC2-Classic | EC2-VPC).

      • reserved-instances-id - The ID of the Reserved Instances modified.

      • reserved-instances-modification-id - The ID of the modification request.

      • status - The status of the Reserved Instances modification request (processing | fulfilled | failed).

      • status-message - The reason for the status.

      • update-date - The time when the modification request was last updated.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • ReservedInstancesModifications — (Array<map>)

        The Reserved Instance modification information.

        • ReservedInstancesModificationId — (String)

          A unique ID for the Reserved Instance modification.

        • ReservedInstancesIds — (Array<map>)

          The IDs of one or more Reserved Instances.

          • ReservedInstancesId — (String)

            The ID of the Reserved Instance.

        • ModificationResults — (Array<map>)

          Contains target configurations along with their corresponding new Reserved Instance IDs.

          • ReservedInstancesId — (String)

            The ID for the Reserved Instances that were created as part of the modification request. This field is only available when the modification is fulfilled.

          • TargetConfiguration — (map)

            The target Reserved Instances configurations supplied as part of the modification request.

            • AvailabilityZone — (String)

              The Availability Zone for the modified Reserved Instances.

            • Platform — (String)

              The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.

            • InstanceCount — (Integer)

              The number of modified Reserved Instances.

            • InstanceType — (String)

              The instance type for the modified Reserved Instances.

              Possible values include:
              • "t1.micro"
              • "t2.nano"
              • "t2.micro"
              • "t2.small"
              • "t2.medium"
              • "t2.large"
              • "m1.small"
              • "m1.medium"
              • "m1.large"
              • "m1.xlarge"
              • "m3.medium"
              • "m3.large"
              • "m3.xlarge"
              • "m3.2xlarge"
              • "m4.large"
              • "m4.xlarge"
              • "m4.2xlarge"
              • "m4.4xlarge"
              • "m4.10xlarge"
              • "m2.xlarge"
              • "m2.2xlarge"
              • "m2.4xlarge"
              • "cr1.8xlarge"
              • "r3.large"
              • "r3.xlarge"
              • "r3.2xlarge"
              • "r3.4xlarge"
              • "r3.8xlarge"
              • "x1.4xlarge"
              • "x1.8xlarge"
              • "x1.16xlarge"
              • "x1.32xlarge"
              • "i2.xlarge"
              • "i2.2xlarge"
              • "i2.4xlarge"
              • "i2.8xlarge"
              • "hi1.4xlarge"
              • "hs1.8xlarge"
              • "c1.medium"
              • "c1.xlarge"
              • "c3.large"
              • "c3.xlarge"
              • "c3.2xlarge"
              • "c3.4xlarge"
              • "c3.8xlarge"
              • "c4.large"
              • "c4.xlarge"
              • "c4.2xlarge"
              • "c4.4xlarge"
              • "c4.8xlarge"
              • "cc1.4xlarge"
              • "cc2.8xlarge"
              • "g2.2xlarge"
              • "g2.8xlarge"
              • "cg1.4xlarge"
              • "d2.xlarge"
              • "d2.2xlarge"
              • "d2.4xlarge"
              • "d2.8xlarge"
        • CreateDate — (Date)

          The time when the modification request was created.

        • UpdateDate — (Date)

          The time when the modification request was last updated.

        • EffectiveDate — (Date)

          The time for the modification to become effective.

        • Status — (String)

          The status of the Reserved Instances modification request.

        • StatusMessage — (String)

          The reason for the status.

        • ClientToken — (String)

          A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency.

      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

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

Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used.

If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeReservedInstancesOfferings operation

var params = {
  AvailabilityZone: 'STRING_VALUE',
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  IncludeMarketplace: true || false,
  InstanceTenancy: 'default | dedicated | host',
  InstanceType: 't1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | m1.small | m1.medium | m1.large | m1.xlarge | m3.medium | m3.large | m3.xlarge | m3.2xlarge | m4.large | m4.xlarge | m4.2xlarge | m4.4xlarge | m4.10xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | x1.4xlarge | x1.8xlarge | x1.16xlarge | x1.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | hi1.4xlarge | hs1.8xlarge | c1.medium | c1.xlarge | c3.large | c3.xlarge | c3.2xlarge | c3.4xlarge | c3.8xlarge | c4.large | c4.xlarge | c4.2xlarge | c4.4xlarge | c4.8xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | cg1.4xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge',
  MaxDuration: 0,
  MaxInstanceCount: 0,
  MaxResults: 0,
  MinDuration: 0,
  NextToken: 'STRING_VALUE',
  OfferingType: 'Heavy Utilization | Medium Utilization | Light Utilization | No Upfront | Partial Upfront | All Upfront',
  ProductDescription: 'Linux/UNIX | Linux/UNIX (Amazon VPC) | Windows | Windows (Amazon VPC)',
  ReservedInstancesOfferingIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeReservedInstancesOfferings(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ReservedInstancesOfferingIds — (Array<String>)

      One or more Reserved Instances offering IDs.

    • InstanceType — (String)

      The instance type that the reservation will cover (for example, m1.small). For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.

      Possible values include:
      • "t1.micro"
      • "t2.nano"
      • "t2.micro"
      • "t2.small"
      • "t2.medium"
      • "t2.large"
      • "m1.small"
      • "m1.medium"
      • "m1.large"
      • "m1.xlarge"
      • "m3.medium"
      • "m3.large"
      • "m3.xlarge"
      • "m3.2xlarge"
      • "m4.large"
      • "m4.xlarge"
      • "m4.2xlarge"
      • "m4.4xlarge"
      • "m4.10xlarge"
      • "m2.xlarge"
      • "m2.2xlarge"
      • "m2.4xlarge"
      • "cr1.8xlarge"
      • "r3.large"
      • "r3.xlarge"
      • "r3.2xlarge"
      • "r3.4xlarge"
      • "r3.8xlarge"
      • "x1.4xlarge"
      • "x1.8xlarge"
      • "x1.16xlarge"
      • "x1.32xlarge"
      • "i2.xlarge"
      • "i2.2xlarge"
      • "i2.4xlarge"
      • "i2.8xlarge"
      • "hi1.4xlarge"
      • "hs1.8xlarge"
      • "c1.medium"
      • "c1.xlarge"
      • "c3.large"
      • "c3.xlarge"
      • "c3.2xlarge"
      • "c3.4xlarge"
      • "c3.8xlarge"
      • "c4.large"
      • "c4.xlarge"
      • "c4.2xlarge"
      • "c4.4xlarge"
      • "c4.8xlarge"
      • "cc1.4xlarge"
      • "cc2.8xlarge"
      • "g2.2xlarge"
      • "g2.8xlarge"
      • "cg1.4xlarge"
      • "d2.xlarge"
      • "d2.2xlarge"
      • "d2.4xlarge"
      • "d2.8xlarge"
    • AvailabilityZone — (String)

      The Availability Zone in which the Reserved Instance can be used.

    • ProductDescription — (String)

      The Reserved Instance product platform description. Instances that include (Amazon VPC) in the description are for use with Amazon VPC.

      Possible values include:
      • "Linux/UNIX"
      • "Linux/UNIX (Amazon VPC)"
      • "Windows"
      • "Windows (Amazon VPC)"
    • Filters — (Array<map>)

      One or more filters.

      • availability-zone - The Availability Zone where the Reserved Instance can be used.

      • duration - The duration of the Reserved Instance (for example, one year or three years), in seconds (31536000 | 94608000).

      • fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).

      • instance-type - The instance type that is covered by the reservation.

      • marketplace - Set to true to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from both AWS and the Reserved Instance Marketplace are listed.

      • product-description - The Reserved Instance product platform description. Instances that include (Amazon VPC) in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC))

      • reserved-instances-offering-id - The Reserved Instances offering ID.

      • usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

    • InstanceTenancy — (String)

      The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy of dedicated is applied to instances that run in a VPC on single-tenant hardware (i.e., Dedicated Instances).

      Default: default

      Possible values include:
      • "default"
      • "dedicated"
      • "host"
    • OfferingType — (String)

      The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.

      Possible values include:
      • "Heavy Utilization"
      • "Medium Utilization"
      • "Light Utilization"
      • "No Upfront"
      • "Partial Upfront"
      • "All Upfront"
    • NextToken — (String)

      The token to retrieve the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. The maximum is 100.

      Default: 100

    • IncludeMarketplace — (Boolean)

      Include Reserved Instance Marketplace offerings in the response.

    • MinDuration — (Integer)

      The minimum duration (in seconds) to filter when searching for offerings.

      Default: 2592000 (1 month)

    • MaxDuration — (Integer)

      The maximum duration (in seconds) to filter when searching for offerings.

      Default: 94608000 (3 years)

    • MaxInstanceCount — (Integer)

      The maximum number of instances to filter when searching for offerings.

      Default: 20

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:

      • ReservedInstancesOfferings — (Array<map>)

        A list of Reserved Instances offerings.

        • ReservedInstancesOfferingId — (String)

          The ID of the Reserved Instance offering.

        • InstanceType — (String)

          The instance type on which the Reserved Instance can be used.

          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "m1.small"
          • "m1.medium"
          • "m1.large"
          • "m1.xlarge"
          • "m3.medium"
          • "m3.large"
          • "m3.xlarge"
          • "m3.2xlarge"
          • "m4.large"
          • "m4.xlarge"
          • "m4.2xlarge"
          • "m4.4xlarge"
          • "m4.10xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "x1.4xlarge"
          • "x1.8xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "hi1.4xlarge"
          • "hs1.8xlarge"
          • "c1.medium"
          • "c1.xlarge"
          • "c3.large"
          • "c3.xlarge"
          • "c3.2xlarge"
          • "c3.4xlarge"
          • "c3.8xlarge"
          • "c4.large"
          • "c4.xlarge"
          • "c4.2xlarge"
          • "c4.4xlarge"
          • "c4.8xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "cg1.4xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
        • AvailabilityZone — (String)

          The Availability Zone in which the Reserved Instance can be used.

        • Duration — (Integer)

          The duration of the Reserved Instance, in seconds.

        • UsagePrice — (Float)

          The usage price of the Reserved Instance, per hour.

        • FixedPrice — (Float)

          The purchase price of the Reserved Instance.

        • ProductDescription — (String)

          The Reserved Instance product platform description.

          Possible values include:
          • "Linux/UNIX"
          • "Linux/UNIX (Amazon VPC)"
          • "Windows"
          • "Windows (Amazon VPC)"
        • InstanceTenancy — (String)

          The tenancy of the instance.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • CurrencyCode — (String)

          The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is USD.

          Possible values include:
          • "USD"
        • OfferingType — (String)

          The Reserved Instance offering type.

          Possible values include:
          • "Heavy Utilization"
          • "Medium Utilization"
          • "Light Utilization"
          • "No Upfront"
          • "Partial Upfront"
          • "All Upfront"
        • RecurringCharges — (Array<map>)

          The recurring charge tag assigned to the resource.

          • Frequency — (String)

            The frequency of the recurring charge.

            Possible values include:
            • "Hourly"
          • Amount — (Float)

            The amount of the recurring charge.

        • Marketplace — (Boolean)

          Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering, this is true.

        • PricingDetails — (Array<map>)

          The pricing details of the Reserved Instance offering.

          • Price — (Float)

            The price per instance.

          • Count — (Integer)

            The number of reservations available for the price.

      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your route tables.

Each subnet in your VPC must be associated with a route table. If a subnet is not explicitly associated with any route table, it is implicitly associated with the main route table. This command does not return the subnet ID for implicit associations.

For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the describeRouteTables operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  RouteTableIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeRouteTables(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • RouteTableIds — (Array<String>)

      One or more route table IDs.

      Default: Describes all your route tables.

    • Filters — (Array<map>)

      One or more filters.

      • association.route-table-association-id - The ID of an association ID for the route table.

      • association.route-table-id - The ID of the route table involved in the association.

      • association.subnet-id - The ID of the subnet involved in the association.

      • association.main - Indicates whether the route table is the main route table for the VPC (true | false).

      • route-table-id - The ID of the route table.

      • route.destination-cidr-block - The CIDR range specified in a route in the table.

      • route.destination-prefix-list-id - The ID (prefix) of the AWS service specified in a route in the table.

      • route.gateway-id - The ID of a gateway specified in a route in the table.

      • route.instance-id - The ID of an instance specified in a route in the table.

      • route.nat-gateway-id - The ID of a NAT gateway.

      • route.origin - Describes how the route was created. CreateRouteTable indicates that the route was automatically created when the route table was created; CreateRoute indicates that the route was manually added to the route table; EnableVgwRoutePropagation indicates that the route was propagated by route propagation.

      • route.state - The state of a route in the route table (active | blackhole). The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, the specified NAT instance has been terminated, and so on).

      • route.vpc-peering-connection-id - The ID of a VPC peering connection specified in a route in the table.

      • tag:key=value - The key/value combination of a tag assigned to the resource.

      • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

      • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

      • vpc-id - The ID of the VPC for the route table.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • RouteTables — (Array<map>)

        Information about one or more route tables.

        • RouteTableId — (String)

          The ID of the route table.

        • VpcId — (String)

          The ID of the VPC.

        • Routes — (Array<map>)

          The routes in the route table.

          • DestinationCidrBlock — (String)

            The CIDR block used for the destination match.

          • DestinationPrefixListId — (String)

            The prefix of the AWS service.

          • GatewayId — (String)

            The ID of a gateway attached to your VPC.

          • InstanceId — (String)

            The ID of a NAT instance in your VPC.

          • InstanceOwnerId — (String)

            The AWS account ID of the owner of the instance.

          • NetworkInterfaceId — (String)

            The ID of the network interface.

          • VpcPeeringConnectionId — (String)

            The ID of the VPC peering connection.

          • NatGatewayId — (String)

            The ID of a NAT gateway.

          • State — (String)

            The state of the route. The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).

            Possible values include:
            • "active"
            • "blackhole"
          • Origin — (String)

            Describes how the route was created.

            • CreateRouteTable - The route was automatically created when the route table was created.

            • CreateRoute - The route was manually added to the route table.

            • EnableVgwRoutePropagation - The route was propagated by route propagation.

            Possible values include:
            • "CreateRouteTable"
            • "CreateRoute"
            • "EnableVgwRoutePropagation"
        • Associations — (Array<map>)

          The associations between the route table and one or more subnets.

          • RouteTableAssociationId — (String)

            The ID of the association between a route table and a subnet.

          • RouteTableId — (String)

            The ID of the route table.

          • SubnetId — (String)

            The ID of the subnet. A subnet ID is not returned for an implicit association.

          • Main — (Boolean)

            Indicates whether this is the main route table.

        • Tags — (Array<map>)

          Any tags assigned to the route table.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • PropagatingVgws — (Array<map>)

          Any virtual private gateway (VGW) propagating routes.

          • GatewayId — (String)

            The ID of the virtual private gateway (VGW).

Returns:

  • (AWS.Request)

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

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

Finds available schedules that meet the specified criteria.

You can search for an available schedule no more than 3 months in advance. You must meet the minimum required duration of 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.

After you find a schedule that meets your needs, call PurchaseScheduledInstances to purchase Scheduled Instances with that schedule.

Examples:

Calling the describeScheduledInstanceAvailability operation

var params = {
  FirstSlotStartTimeRange: { /* required */
    EarliestTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
    LatestTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789 /* required */
  },
  Recurrence: { /* required */
    Frequency: 'STRING_VALUE',
    Interval: 0,
    OccurrenceDays: [
      0,
      /* more items */
    ],
    OccurrenceRelativeToEnd: true || false,
    OccurrenceUnit: 'STRING_VALUE'
  },
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 0,
  MaxSlotDurationInHours: 0,
  MinSlotDurationInHours: 0,
  NextToken: 'STRING_VALUE'
};
ec2.describeScheduledInstanceAvailability(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • Recurrence — (map)

      The schedule recurrence.

      • Frequency — (String)

        The frequency (Daily, Weekly, or Monthly).

      • Interval — (Integer)

        The interval quantity. The interval unit depends on the value of Frequency. For example, every 2 weeks or every 2 months.

      • OccurrenceDays — (Array<Integer>)

        The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday). You can't specify this value with a daily schedule. If the occurrence is relative to the end of the month, you can specify only a single day.

      • OccurrenceRelativeToEnd — (Boolean)

        Indicates whether the occurrence is relative to the end of the specified week or month. You can't specify this value with a daily schedule.

      • OccurrenceUnit — (String)

        The unit for OccurrenceDays (DayOfWeek or DayOfMonth). This value is required for a monthly schedule. You can't specify DayOfWeek with a weekly schedule. You can't specify this value with a daily schedule.

    • FirstSlotStartTimeRange — (map)

      The time period for the first schedule to start.

      • EarliestTimerequired — (Date)

        The earliest date and time, in UTC, for the Scheduled Instance to start.

      • LatestTimerequired — (Date)

        The latest date and time, in UTC, for the Scheduled Instance to start. This value must be later than or equal to the earliest date and at most three months in the future.

    • MinSlotDurationInHours — (Integer)

      The minimum available duration, in hours. The minimum required duration is 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.

    • MaxSlotDurationInHours — (Integer)

      The maximum available duration, in hours. This value must be greater than MinSlotDurationInHours and less than 1,720.

    • NextToken — (String)

      The token for the next set of results.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 300. To retrieve the remaining results, make another call with the returned NextToken value.

    • Filters — (Array<map>)

      One or more filters.

      • availability-zone - The Availability Zone (for example, us-west-2a).

      • instance-type - The instance type (for example, c4.large).

      • network-platform - The network platform (EC2-Classic or EC2-VPC).

      • platform - The platform (Linux/UNIX or Windows).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • NextToken — (String)

        The token required to retrieve the next set of results. This value is null when there are no more results to return.

      • ScheduledInstanceAvailabilitySet — (Array<map>)

        Information about the available Scheduled Instances.

        • InstanceType — (String)

          The instance type. You can specify one of the C3, C4, M4, or R3 instance types.

        • Platform — (String)

          The platform (Linux/UNIX or Windows).

        • NetworkPlatform — (String)

          The network platform (EC2-Classic or EC2-VPC).

        • AvailabilityZone — (String)

          The Availability Zone.

        • PurchaseToken — (String)

          The purchase token. This token expires in two hours.

        • SlotDurationInHours — (Integer)

          The number of hours in the schedule.

        • Recurrence — (map)

          The schedule recurrence.

          • Frequency — (String)

            The frequency (Daily, Weekly, or Monthly).

          • Interval — (Integer)

            The interval quantity. The interval unit depends on the value of frequency. For example, every 2 weeks or every 2 months.

          • OccurrenceDaySet — (Array<Integer>)

            The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).

          • OccurrenceRelativeToEnd — (Boolean)

            Indicates whether the occurrence is relative to the end of the specified week or month.

          • OccurrenceUnit — (String)

            The unit for occurrenceDaySet (DayOfWeek or DayOfMonth).

        • FirstSlotStartTime — (Date)

          The time period for the first schedule to start.

        • HourlyPrice — (String)

          The hourly price for a single instance.

        • TotalScheduledInstanceHours — (Integer)

          The total number of hours for a single instance for the entire term.

        • AvailableInstanceCount — (Integer)

          The number of available instances.

        • MinTermDurationInDays — (Integer)

          The minimum term. The only possible value is 365 days.

        • MaxTermDurationInDays — (Integer)

          The maximum term. The only possible value is 365 days.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your Scheduled Instances.

Examples:

Calling the describeScheduledInstances operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE',
  ScheduledInstanceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  SlotStartTimeRange: {
    EarliestTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
    LatestTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
  }
};
ec2.describeScheduledInstances(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • ScheduledInstanceIds — (Array<String>)

      One or more Scheduled Instance IDs.

    • SlotStartTimeRange — (map)

      The time period for the first schedule to start.

      • EarliestTime — (Date)

        The earliest date and time, in UTC, for the Scheduled Instance to start.

      • LatestTime — (Date)

        The latest date and time, in UTC, for the Scheduled Instance to start.

    • NextToken — (String)

      The token for the next set of results.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 100. To retrieve the remaining results, make another call with the returned NextToken value.

    • Filters — (Array<map>)

      One or more filters.

      • availability-zone - The Availability Zone (for example, us-west-2a).

      • instance-type - The instance type (for example, c4.large).

      • network-platform - The network platform (EC2-Classic or EC2-VPC).

      • platform - The platform (Linux/UNIX or Windows).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • NextToken — (String)

        The token required to retrieve the next set of results. This value is null when there are no more results to return.

      • ScheduledInstanceSet — (Array<map>)

        Information about the Scheduled Instances.

        • ScheduledInstanceId — (String)

          The Scheduled Instance ID.

        • InstanceType — (String)

          The instance type.

        • Platform — (String)

          The platform (Linux/UNIX or Windows).

        • NetworkPlatform — (String)

          The network platform (EC2-Classic or EC2-VPC).

        • AvailabilityZone — (String)

          The Availability Zone.

        • SlotDurationInHours — (Integer)

          The number of hours in the schedule.

        • Recurrence — (map)

          The schedule recurrence.

          • Frequency — (String)

            The frequency (Daily, Weekly, or Monthly).

          • Interval — (Integer)

            The interval quantity. The interval unit depends on the value of frequency. For example, every 2 weeks or every 2 months.

          • OccurrenceDaySet — (Array<Integer>)

            The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).

          • OccurrenceRelativeToEnd — (Boolean)

            Indicates whether the occurrence is relative to the end of the specified week or month.

          • OccurrenceUnit — (String)

            The unit for occurrenceDaySet (DayOfWeek or DayOfMonth).

        • PreviousSlotEndTime — (Date)

          The time that the previous schedule ended or will end.

        • NextSlotStartTime — (Date)

          The time for the next schedule to start.

        • HourlyPrice — (String)

          The hourly price for a single instance.

        • TotalScheduledInstanceHours — (Integer)

          The total number of hours for a single instance for the entire term.

        • InstanceCount — (Integer)

          The number of instances.

        • TermStartDate — (Date)

          The start date for the Scheduled Instance.

        • TermEndDate — (Date)

          The end date for the Scheduled Instance.

        • CreateDate — (Date)

          The date when the Scheduled Instance was purchased.

Returns:

  • (AWS.Request)

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

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

[EC2-VPC only] Describes the VPCs on the other side of a VPC peering connection that are referencing the security groups you've specified in this request.

Examples:

Calling the describeSecurityGroupReferences operation

var params = {
  GroupId: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.describeSecurityGroupReferences(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • GroupId — (Array<String>)

      One or more security group IDs in your account.

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:

      • SecurityGroupReferenceSet — (Array<map>)

        Information about the VPCs with the referencing security groups.

        • GroupIdrequired — (String)

          The ID of your security group.

        • ReferencingVpcIdrequired — (String)

          The ID of the VPC with the referencing security group.

        • VpcPeeringConnectionId — (String)

          The ID of the VPC peering connection.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your security groups.

A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the describeSecurityGroups operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  GroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  GroupNames: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeSecurityGroups(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • GroupNames — (Array<String>)

      [EC2-Classic and default VPC only] One or more security group names. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, use the group-name filter to describe security groups by name.

      Default: Describes all your security groups.

    • GroupIds — (Array<String>)

      One or more security group IDs. Required for security groups in a nondefault VPC.

      Default: Describes all your security groups.

    • Filters — (Array<map>)

      One or more filters. If using multiple filters for rules, the results include security groups for which any combination of rules - not necessarily a single rule - match all filters.

      • description - The description of the security group.

      • egress.ip-permission.prefix-list-id - The ID (prefix) of the AWS service to which the security group allows access.

      • group-id - The ID of the security group.

      • group-name - The name of the security group.

      • ip-permission.cidr - A CIDR range that has been granted permission.

      • ip-permission.from-port - The start of port range for the TCP and UDP protocols, or an ICMP type number.

      • ip-permission.group-id - The ID of a security group that has been granted permission.

      • ip-permission.group-name - The name of a security group that has been granted permission.

      • ip-permission.protocol - The IP protocol for the permission (tcp | udp | icmp or a protocol number).

      • ip-permission.to-port - The end of port range for the TCP and UDP protocols, or an ICMP code.

      • ip-permission.user-id - The ID of an AWS account that has been granted permission.

      • owner-id - The AWS account ID of the owner of the security group.

      • tag-key - The key of a tag assigned to the security group.

      • tag-value - The value of a tag assigned to the security group.

      • vpc-id - The ID of the VPC specified when the security group was created.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        One or more filter values. Filter values are case-sensitive.

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:

      • SecurityGroups — (Array<map>)

        Information about one or more security groups.

        • OwnerId — (String)

          The AWS account ID of the owner of the security group.

        • GroupName — (String)

          The name of the security group.

        • GroupId — (String)

          The ID of the security group.

        • Description — (String)

          A description of the security group.

        • IpPermissions — (Array<map>)

          One or more inbound rules associated with the security group.

          • IpProtocol — (String)

            The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).

            [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

          • FromPort — (Integer)

            The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

          • ToPort — (Integer)

            The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

          • UserIdGroupPairs — (Array<map>)

            One or more security group and AWS account ID pairs.

            • UserId — (String)

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

            • GroupName — (String)

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

            • GroupId — (String)

              The ID of the security group.

            • VpcId — (String)

              The ID of the VPC for the referenced security group, if applicable.

            • VpcPeeringConnectionId — (String)

              The ID of the VPC peering connection, if applicable.

            • PeeringStatus — (String)

              The status of a VPC peering connection, if applicable.

          • IpRanges — (Array<map>)

            One or more IP ranges.

            • CidrIp — (String)

              The CIDR range. You can either specify a CIDR range or a source security group, not both.

          • PrefixListIds — (Array<map>)

            (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

            • PrefixListId — (String)

              The ID of the prefix.

        • IpPermissionsEgress — (Array<map>)

          [EC2-VPC] One or more outbound rules associated with the security group.

          • IpProtocol — (String)

            The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).

            [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

          • FromPort — (Integer)

            The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

          • ToPort — (Integer)

            The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

          • UserIdGroupPairs — (Array<map>)

            One or more security group and AWS account ID pairs.

            • UserId — (String)

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

            • GroupName — (String)

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

            • GroupId — (String)

              The ID of the security group.

            • VpcId — (String)

              The ID of the VPC for the referenced security group, if applicable.

            • VpcPeeringConnectionId — (String)

              The ID of the VPC peering connection, if applicable.

            • PeeringStatus — (String)

              The status of a VPC peering connection, if applicable.

          • IpRanges — (Array<map>)

            One or more IP ranges.

            • CidrIp — (String)

              The CIDR range. You can either specify a CIDR range or a source security group, not both.

          • PrefixListIds — (Array<map>)

            (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

            • PrefixListId — (String)

              The ID of the prefix.

        • VpcId — (String)

          [EC2-VPC] The ID of the VPC for the security group.

        • Tags — (Array<map>)

          Any tags assigned to the security group.

          • Key — (String)

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value — (String)

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Describes the specified attribute of the specified snapshot. You can specify only one attribute at a time.

For more information about EBS snapshots, see Amazon EBS Snapshots in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeSnapshotAttribute operation

var params = {
  Attribute: 'productCodes | createVolumePermission', /* required */
  SnapshotId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.describeSnapshotAttribute(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • SnapshotId — (String)

      The ID of the EBS snapshot.

    • Attribute — (String)

      The snapshot attribute you would like to view.

      Possible values include:
      • "productCodes"
      • "createVolumePermission"

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:

      • SnapshotId — (String)

        The ID of the EBS snapshot.

      • CreateVolumePermissions — (Array<map>)

        A list of permissions for creating volumes from the snapshot.

        • UserId — (String)

          The specific AWS account ID that is to be added or removed from a volume's list of create volume permissions.

        • Group — (String)

          The specific group that is to be added or removed from a volume's list of create volume permissions.

          Possible values include:
          • "all"
      • ProductCodes — (Array<map>)

        A list of product codes.

        • ProductCodeId — (String)

          The product code.

        • ProductCodeType — (String)

          The type of product code.

          Possible values include:
          • "devpay"
          • "marketplace"

Returns:

  • (AWS.Request)

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

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

Describes one or more of the EBS snapshots available to you. Available snapshots include public snapshots available for any AWS account to launch, private snapshots that you own, and private snapshots owned by another AWS account but for which you've been given explicit create volume permissions.

The create volume permissions fall into the following categories:

  • public: The owner of the snapshot granted create volume permissions for the snapshot to the all group. All AWS accounts have create volume permissions for these snapshots.

  • explicit: The owner of the snapshot granted create volume permissions to a specific AWS account.

  • implicit: An AWS account has implicit create volume permissions for all snapshots it owns.

The list of snapshots returned can be modified by specifying snapshot IDs, snapshot owners, or AWS accounts with create volume permissions. If no options are specified, Amazon EC2 returns all snapshots for which you have create volume permissions.

If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, an error is returned. If you specify a snapshot ID for which you do not have access, it is not included in the returned results.

If you specify one or more snapshot owners using the OwnerIds option, only snapshots from the specified owners and for which you have access are returned. The results can include the AWS account IDs of the specified owners, amazon for snapshots owned by Amazon, or self for snapshots that you own.

If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned. You can specify AWS account IDs (if you own the snapshots), self for snapshots for which you own or have explicit permissions, or all for public snapshots.

If you are describing a long list of snapshots, you can paginate the output to make the list more manageable. The MaxResults parameter sets the maximum number of results returned in a single page. If the list of results exceeds your MaxResults value, then that number of results is returned along with a NextToken value that can be passed to a subsequent DescribeSnapshots request to retrieve the remaining results.

For more information about EBS snapshots, see Amazon EBS Snapshots in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeSnapshots operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE',
  OwnerIds: [
    'STRING_VALUE',
    /* more items */
  ],
  RestorableByUserIds: [
    'STRING_VALUE',
    /* more items */
  ],
  SnapshotIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeSnapshots(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: {})
    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    • SnapshotIds — (Array<String>)

      One or more snapshot IDs.

      Default: Describes snapshots for which you have launch permissions.

    • OwnerIds — (Array<String>)

      Returns the snapshots owned by the spe