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

Class: AWS.EC2

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

Overview

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

Service Description

Amazon Elastic Compute Cloud (Amazon EC2) provides secure and resizable computing capacity in the AWS Cloud. Using Amazon EC2 eliminates the need to invest in hardware up front, so you can develop and deploy applications faster. Amazon Virtual Private Cloud (Amazon VPC) enables you to provision a logically isolated section of the AWS Cloud where you can launch AWS resources in a virtual network that you've defined. Amazon Elastic Block Store (Amazon EBS) provides block level storage volumes for use with EC2 instances. EBS volumes are highly available and reliable storage volumes that can be attached to any running instance and used like a hard drive.

To learn more, see the following resources:

Sending a Request Using EC2

var ec2 = new AWS.EC2();
ec2.applySecurityGroupsToClientVpnTargetNetwork(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-11-15'});

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

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

var ec2 = new AWS.EC2();

Version:

  • 2016-11-15

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, securityGroupExists, spotInstanceRequestFulfilled, subnetAvailable, systemStatusOk, volumeAvailable, volumeDeleted, volumeInUse, vpcAvailable, vpcExists, vpnConnectionAvailable, vpnConnectionDeleted, vpcPeeringConnectionExists, vpcPeeringConnectionDeleted

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-11-15'});

Options Hash (options):

  • params (map)

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

  • endpoint (String|AWS.Endpoint)

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

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

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

  • credentialProvider (AWS.CredentialProviderChain)

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

  • region (String)

    the region to send service requests to. See AWS.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.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

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

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

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

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

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

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

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

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

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

  • logger (#write, #log)

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

  • systemClockOffset (Number)

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

  • signatureVersion (String)

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

  • signatureCache (Boolean)

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

  • dynamoDbCrc32 (Boolean)

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

  • useAccelerateEndpoint (Boolean)

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

  • clientSideMonitoring (Boolean)

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

  • endpointDiscoveryEnabled (Boolean|undefined)

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

  • endpointCacheSize (Number)

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

  • hostPrefixEnabled (Boolean)

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

  • stsRegionalEndpoints ('legacy'|'regional')

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

Property Details

endpointAWS.Endpoint (readwrite)

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

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

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

Accepts the Convertible Reserved Instance exchange quote described in the GetReservedInstancesExchangeQuote call.

Examples:

Calling the acceptReservedInstancesExchangeQuote operation

var params = {
  ReservedInstanceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  TargetConfigurations: [
    {
      OfferingId: 'STRING_VALUE', /* required */
      InstanceCount: 'NUMBER_VALUE'
    },
    /* more items */
  ]
};
ec2.acceptReservedInstancesExchangeQuote(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.

    • ReservedInstanceIds — (Array<String>)

      The IDs of the Convertible Reserved Instances to exchange for another Convertible Reserved Instance of the same or higher value.

    • TargetConfigurations — (Array<map>)

      The configuration of the target Convertible Reserved Instance to exchange for your current Convertible Reserved Instances.

      • InstanceCount — (Integer)

        The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request

      • OfferingIdrequired — (String)

        The Convertible Reserved Instance offering 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:

      • ExchangeId — (String)

        The ID of the successful exchange.

Returns:

  • (AWS.Request)

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

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

Accepts a request to associate subnets with a transit gateway multicast domain.

Examples:

Calling the acceptTransitGatewayMulticastDomainAssociations operation

var params = {
  DryRun: true || false,
  SubnetIds: [
    'STRING_VALUE',
    /* more items */
  ],
  TransitGatewayAttachmentId: 'STRING_VALUE',
  TransitGatewayMulticastDomainId: 'STRING_VALUE'
};
ec2.acceptTransitGatewayMulticastDomainAssociations(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: {})
    • TransitGatewayMulticastDomainId — (String)

      The ID of the transit gateway multicast domain.

    • TransitGatewayAttachmentId — (String)

      The ID of the transit gateway attachment.

    • SubnetIds — (Array<String>)

      The IDs of the subnets to associate with the transit gateway multicast domain.

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

      • Associations — (map)

        Describes the multicast domain associations.

        • TransitGatewayMulticastDomainId — (String)

          The ID of the transit gateway multicast domain.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway attachment.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The type of resource, for example a VPC attachment.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • ResourceOwnerId — (String)

          The ID of the Amazon Web Services account that owns the resource.

        • Subnets — (Array<map>)

          The subnets associated with the multicast domain.

          • SubnetId — (String)

            The ID of the subnet.

          • State — (String)

            The state of the subnet association.

            Possible values include:
            • "pendingAcceptance"
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
            • "rejected"
            • "failed"

Returns:

  • (AWS.Request)

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

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

Accepts a transit gateway peering attachment request. The peering attachment must be in the pendingAcceptance state.

Examples:

Calling the acceptTransitGatewayPeeringAttachment operation

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

      The ID of the transit gateway attachment.

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

      • TransitGatewayPeeringAttachment — (map)

        The transit gateway peering attachment.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway peering attachment.

        • RequesterTgwInfo — (map)

          Information about the requester transit gateway.

          • TransitGatewayId — (String)

            The ID of the transit gateway.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region — (String)

            The Region of the transit gateway.

        • AccepterTgwInfo — (map)

          Information about the accepter transit gateway.

          • TransitGatewayId — (String)

            The ID of the transit gateway.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region — (String)

            The Region of the transit gateway.

        • Status — (map)

          The status of the transit gateway peering attachment.

          • Code — (String)

            The status code.

          • Message — (String)

            The status message, if applicable.

        • State — (String)

          The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • CreationTime — (Date)

          The time the transit gateway peering attachment was created.

        • Tags — (Array<map>)

          The tags for the transit gateway peering attachment.

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

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

Accepts a request to attach a VPC to a transit gateway.

The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to view your pending VPC attachment requests. Use RejectTransitGatewayVpcAttachment to reject a VPC attachment request.

Examples:

Calling the acceptTransitGatewayVpcAttachment operation

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

      The ID of the attachment.

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

      • TransitGatewayVpcAttachment — (map)

        The VPC attachment.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • VpcId — (String)

          The ID of the VPC.

        • VpcOwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC.

        • State — (String)

          The state of the VPC attachment. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • SubnetIds — (Array<String>)

          The IDs of the subnets.

        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The VPC attachment options.

          • DnsSupport — (String)

            Indicates whether DNS support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • Ipv6Support — (String)

            Indicates whether IPv6 support is disabled.

            Possible values include:
            • "enable"
            • "disable"
          • ApplianceModeSupport — (String)

            Indicates whether appliance mode support is enabled.

            Possible values include:
            • "enable"
            • "disable"
        • Tags — (Array<map>)

          The tags for the VPC attachment.

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

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

Accepts one or more interface VPC endpoint connection requests to your VPC endpoint service.

Service Reference:

Examples:

Calling the acceptVpcEndpointConnections operation

var params = {
  ServiceId: 'STRING_VALUE', /* required */
  VpcEndpointIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.acceptVpcEndpointConnections(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.

    • ServiceId — (String)

      The ID of the VPC endpoint service.

    • VpcEndpointIds — (Array<String>)

      The IDs of one or more interface VPC endpoints.

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 interface endpoints that were not accepted, if applicable.

        • Error — (map)

          Information about the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message accompanying the error code.

        • ResourceId — (String)

          The ID of the resource.

Returns:

  • (AWS.Request)

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

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 DescribeVpcPeeringConnections to view your outstanding VPC peering connection requests.

For an inter-Region VPC peering connection request, you must accept the VPC peering connection in the Region of the accepter VPC.

Service Reference:

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. You must specify this parameter in the 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:

      • VpcPeeringConnection — (map)

        Information about the VPC peering connection.

        • AccepterVpcInfo — (map)

          Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock — (String)

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet — (Array<map>)

            The IPv6 CIDR block for the VPC.

            • Ipv6CidrBlock — (String)

              The IPv6 CIDR block.

          • CidrBlockSet — (Array<map>)

            Information about the IPv4 CIDR blocks for the VPC.

            • CidrBlock — (String)

              The IPv4 CIDR block.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions — (map)

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

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer 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.

          • VpcId — (String)

            The ID of the VPC.

          • Region — (String)

            The Region in which the VPC is located.

        • ExpirationTime — (Date)

          The time that an unaccepted VPC peering connection will expire.

        • RequesterVpcInfo — (map)

          Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock — (String)

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet — (Array<map>)

            The IPv6 CIDR block for the VPC.

            • Ipv6CidrBlock — (String)

              The IPv6 CIDR block.

          • CidrBlockSet — (Array<map>)

            Information about the IPv4 CIDR blocks for the VPC.

            • CidrBlock — (String)

              The IPv4 CIDR block.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions — (map)

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

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer 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.

          • VpcId — (String)

            The ID of the VPC.

          • Region — (String)

            The Region in which the VPC is located.

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

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

Advertises an IPv4 or IPv6 address range that is provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP).

You can perform this operation at most once every 10 seconds, even if you specify different address ranges each time.

We recommend that you stop advertising the BYOIP CIDR from other locations when you advertise it from Amazon Web Services. To minimize down time, you can configure your Amazon Web Services resources to use an address from a BYOIP CIDR before it is advertised, and then simultaneously stop advertising it from the current location and start advertising it through Amazon Web Services.

It can take a few minutes before traffic to the specified addresses starts routing to Amazon Web Services because of BGP propagation delays.

To stop advertising the BYOIP CIDR, use WithdrawByoipCidr.

Service Reference:

Examples:

Calling the advertiseByoipCidr operation

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

      The address range, in CIDR notation. This must be the exact range that you provisioned. You can't advertise only a portion of the provisioned range.

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

      • ByoipCidr — (map)

        Information about the address range.

        • Cidr — (String)

          The address range, in CIDR notation.

        • Description — (String)

          The description of the address range.

        • StatusMessage — (String)

          Upon success, contains the ID of the address pool. Otherwise, contains an error message.

        • State — (String)

          The state of the address pool.

          Possible values include:
          • "advertised"
          • "deprovisioned"
          • "failed-deprovision"
          • "failed-provision"
          • "pending-deprovision"
          • "pending-provision"
          • "provisioned"
          • "provisioned-not-publicly-advertisable"

Returns:

  • (AWS.Request)

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

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

Allocates an Elastic IP address to your Amazon Web Services account. After you allocate the Elastic IP address you can associate it with an instance or network interface. After you release an Elastic IP address, it is released to the IP address pool and can be allocated to a different Amazon Web Services account.

You can allocate an Elastic IP address from an address pool owned by Amazon Web Services or from an address pool created from a public IPv4 address range that you have brought to Amazon Web Services for use with your Amazon Web Services resources using bring your own IP addresses (BYOIP). For more information, see Bring Your Own IP Addresses (BYOIP) in the Amazon Elastic Compute Cloud User Guide.

[EC2-VPC] If you release an Elastic IP address, you might be able to recover it. You cannot recover an Elastic IP address that you released after it is allocated to another Amazon Web Services account. You cannot recover an Elastic IP address for EC2-Classic. To attempt to recover an Elastic IP address that you released, specify it in this operation.

An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. By default, you can allocate 5 Elastic IP addresses for EC2-Classic per Region and 5 Elastic IP addresses for EC2-VPC per Region.

For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

You can allocate a carrier IP address which is a public IP address from a telecommunication carrier, to a network interface which resides in a subnet in a Wavelength Zone (for example an EC2 instance).

Service Reference:

Examples:

To allocate an Elastic IP address for EC2-VPC


/* This example allocates an Elastic IP address to use with an instance in a VPC. */

 var params = {
  Domain: "vpc"
 };
 ec2.allocateAddress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AllocationId: "eipalloc-64d5890a", 
    Domain: "vpc", 
    PublicIp: "203.0.113.0"
   }
   */
 });

To allocate an Elastic IP address for EC2-Classic


/* This example allocates an Elastic IP address to use with an instance in EC2-Classic. */

 var params = {
 };
 ec2.allocateAddress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Domain: "standard", 
    PublicIp: "198.51.100.0"
   }
   */
 });

Calling the allocateAddress operation

var params = {
  Address: 'STRING_VALUE',
  CustomerOwnedIpv4Pool: 'STRING_VALUE',
  Domain: vpc | standard,
  DryRun: true || false,
  NetworkBorderGroup: 'STRING_VALUE',
  PublicIpv4Pool: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • Domain — (String)

      Indicates whether the Elastic IP address is for use with instances in a VPC or instances in EC2-Classic.

      Default: If the Region supports EC2-Classic, the default is standard. Otherwise, the default is vpc.

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

      [EC2-VPC] The Elastic IP address to recover or an IPv4 address from an address pool.

    • PublicIpv4Pool — (String)

      The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. To specify a specific address from the address pool, use the Address parameter instead.

    • NetworkBorderGroup — (String)

      A unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses. Use this parameter to limit the IP address to this location. IP addresses cannot move between network border groups.

      Use DescribeAvailabilityZones to view the network border groups.

      You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 Classic, you receive an InvalidParameterCombination error.

    • CustomerOwnedIpv4Pool — (String)

      The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 select an address from the address pool. Alternatively, specify a specific address from the address pool.

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

    • TagSpecifications — (Array<map>)

      The tags to assign to the Elastic IP address.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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.

      • AllocationId — (String)

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

      • PublicIpv4Pool — (String)

        The ID of an address pool.

      • NetworkBorderGroup — (String)

        The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.

      • Domain — (String)

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

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

        The customer-owned IP address.

      • CustomerOwnedIpv4Pool — (String)

        The ID of the customer-owned address pool.

      • CarrierIp — (String)

        The carrier IP address. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance).

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 a minimum, specify the supported instance type or instance family, the Availability Zone in which to allocate the host, and the number of hosts to allocate.

Service Reference:

Examples:

Calling the allocateHosts operation

var params = {
  AvailabilityZone: 'STRING_VALUE', /* required */
  Quantity: 'NUMBER_VALUE', /* required */
  AutoPlacement: on | off,
  ClientToken: 'STRING_VALUE',
  HostRecovery: on | off,
  InstanceFamily: 'STRING_VALUE',
  InstanceType: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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)

      Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide.

      Default: on

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

      The Availability Zone in which to allocate the Dedicated Host.

    • ClientToken — (String)

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

    • InstanceType — (String)

      Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.

      If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.

    • InstanceFamily — (String)

      Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, the Dedicated Hosts support multiple instance types within that instance family.

      If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.

    • Quantity — (Integer)

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

    • TagSpecifications — (Array<map>)

      The tags to apply to the Dedicated Host during creation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • HostRecovery — (String)

      Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by default. For more information, see Host recovery in the Amazon EC2 User Guide.

      Default: off

      Possible values include:
      • "on"
      • "off"

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 to launch an instance onto a specific host.

Returns:

  • (AWS.Request)

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

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

Applies a security group to the association between the target network and the Client VPN endpoint. This action replaces the existing security groups with the specified security groups.

Examples:

Calling the applySecurityGroupsToClientVpnTargetNetwork operation

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

      The ID of the Client VPN endpoint.

    • VpcId — (String)

      The ID of the VPC in which the associated target network is located.

    • SecurityGroupIds — (Array<String>)

      The IDs of the security groups to apply to the associated target network. Up to 5 security groups can be applied to an associated target network.

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

      • SecurityGroupIds — (Array<String>)

        The IDs of the applied security groups.

Returns:

  • (AWS.Request)

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

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

Assigns one or more IPv6 addresses to the specified network interface. You can specify one or more specific IPv6 addresses, or you can specify the number of IPv6 addresses to be automatically assigned from within the subnet's IPv6 CIDR block range. You can assign as many IPv6 addresses to a network interface as you can assign private IPv4 addresses, and the limit varies per instance type. For information, see IP Addresses Per Network Interface Per Instance Type in the Amazon Elastic Compute Cloud User Guide.

You must specify either the IPv6 addresses or the IPv6 address count in the request.

You can optionally use Prefix Delegation on the network interface. You must specify either the IPV6 Prefix Delegation prefixes, or the IPv6 Prefix Delegation count. For information, see Assigning prefixes to Amazon EC2 network interfaces in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the assignIpv6Addresses operation

var params = {
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  Ipv6AddressCount: 'NUMBER_VALUE',
  Ipv6Addresses: [
    'STRING_VALUE',
    /* more items */
  ],
  Ipv6PrefixCount: 'NUMBER_VALUE',
  Ipv6Prefixes: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.assignIpv6Addresses(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: {})
    • Ipv6AddressCount — (Integer)

      The number of additional IPv6 addresses to assign to the network interface. The specified number of IPv6 addresses are assigned in addition to the existing IPv6 addresses that are already assigned to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.

    • Ipv6Addresses — (Array<String>)

      One or more specific IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 addresses.

    • Ipv6PrefixCount — (Integer)

      The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv6Prefixes option.

    • Ipv6Prefixes — (Array<String>)

      One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

    • 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. The data object has the following properties:

      • AssignedIpv6Addresses — (Array<String>)

        The new IPv6 addresses assigned to the network interface. Existing IPv6 addresses that were assigned to the network interface before the request are not included.

      • AssignedIpv6Prefixes — (Array<String>)

        The IPv6 prefixes that are assigned to the network interface.

      • NetworkInterfaceId — (String)

        The ID of the network interface.

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.

When you move a secondary private IP address to another network interface, any Elastic IP address that is associated with the IP address is also moved.

Remapping an IP address is an asynchronous operation. When you move an IP address from one network interface to another, check network/interfaces/macs/mac/local-ipv4s in the instance metadata to confirm that the remapping is complete.

You must specify either the IP addresses or the IP address count in the request.

You can optionally use Prefix Delegation on the network interface. You must specify either the IPv4 Prefix Delegation prefixes, or the IPv4 Prefix Delegation count. For information, see Assigning prefixes to Amazon EC2 network interfaces in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To assign a specific secondary private IP address to an interface


/* This example assigns the specified secondary private IP address to the specified network interface. */

 var params = {
  NetworkInterfaceId: "eni-e5aa89a3", 
  PrivateIpAddresses: [
     "10.0.0.82"
  ]
 };
 ec2.assignPrivateIpAddresses(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

To assign secondary private IP addresses that Amazon EC2 selects to an interface


/* This example assigns two secondary private IP addresses to the specified network interface. Amazon EC2 automatically assigns these IP addresses from the available IP addresses in the CIDR block range of the subnet the network interface is associated with. */

 var params = {
  NetworkInterfaceId: "eni-e5aa89a3", 
  SecondaryPrivateIpAddressCount: 2
 };
 ec2.assignPrivateIpAddresses(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the assignPrivateIpAddresses operation

var params = {
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  AllowReassignment: true || false,
  Ipv4PrefixCount: 'NUMBER_VALUE',
  Ipv4Prefixes: [
    'STRING_VALUE',
    /* more items */
  ],
  PrivateIpAddresses: [
    'STRING_VALUE',
    /* more items */
  ],
  SecondaryPrivateIpAddressCount: 'NUMBER_VALUE'
};
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: {})
    • 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.

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

    • Ipv4Prefixes — (Array<String>)

      One or more IPv4 prefixes assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

    • Ipv4PrefixCount — (Integer)

      The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv4 Prefixes option.

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.

      • AssignedPrivateIpAddresses — (Array<map>)

        The private IP addresses assigned to the network interface.

        • PrivateIpAddress — (String)

          The private IP address assigned to the network interface.

      • AssignedIpv4Prefixes — (Array<map>)

        The IPv4 prefixes that are assigned to the network interface.

Returns:

  • (AWS.Request)

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

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

Associates an Elastic IP address, or carrier IP address (for instances that are in subnets in Wavelength Zones) with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account.

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. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.

[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. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.

[Subnets in Wavelength Zones] You can associate an IP address from the telecommunication carrier to the instance or network interface.

You cannot associate an Elastic IP address with an interface in a different network border group.

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the Elastic IP Addresses section of Amazon EC2 Pricing.

Service Reference:

Examples:

To associate an Elastic IP address in EC2-VPC


/* This example associates the specified Elastic IP address with the specified instance in a VPC. */

 var params = {
  AllocationId: "eipalloc-64d5890a", 
  InstanceId: "i-0b263919b6498b123"
 };
 ec2.associateAddress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AssociationId: "eipassoc-2bebb745"
   }
   */
 });

To associate an Elastic IP address with a network interface


/* This example associates the specified Elastic IP address with the specified network interface. */

 var params = {
  AllocationId: "eipalloc-64d5890a", 
  NetworkInterfaceId: "eni-1a2b3c4d"
 };
 ec2.associateAddress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AssociationId: "eipassoc-2bebb745"
   }
   */
 });

To associate an Elastic IP address in EC2-Classic


/* This example associates an Elastic IP address with an instance in EC2-Classic. */

 var params = {
  InstanceId: "i-07ffe74c7330ebf53", 
  PublicIp: "198.51.100.0"
 };
 ec2.associateAddress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

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: {})
    • AllocationId — (String)

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

    • InstanceId — (String)

      The ID of the instance. The instance must have exactly one attached network interface. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. For EC2-Classic, you must specify an instance ID and the instance must be in the running state.

    • PublicIp — (String)

      [EC2-Classic] The Elastic IP address to associate with the instance. This is required for EC2-Classic.

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

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

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

      For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both.

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

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.

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

Associates a target network with a Client VPN endpoint. A target network is a subnet in a VPC. You can associate multiple subnets from the same VPC with a Client VPN endpoint. You can associate only one subnet in each Availability Zone. We recommend that you associate at least two subnets to provide Availability Zone redundancy.

If you specified a VPC when you created the Client VPN endpoint or if you have previous subnet associations, the specified subnet must be in the same VPC. To specify a subnet that's in a different VPC, you must first modify the Client VPN endpoint (ModifyClientVpnEndpoint) and change the VPC that's associated with it.

Service Reference:

Examples:

Calling the associateClientVpnTargetNetwork operation

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

      The ID of the Client VPN endpoint.

    • SubnetId — (String)

      The ID of the subnet to associate with the Client VPN endpoint.

    • ClientToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.
    • 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:

      • AssociationId — (String)

        The unique ID of the target network association.

      • Status — (map)

        The current state of the target network association.

        • Code — (String)

          The state of the target network association.

          Possible values include:
          • "associating"
          • "associated"
          • "association-failed"
          • "disassociating"
          • "disassociated"
        • Message — (String)

          A message about the status of the target network association, if applicable.

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.

Service Reference:

Examples:

To associate a DHCP options set with a VPC


/* This example associates the specified DHCP options set with the specified VPC. */

 var params = {
  DhcpOptionsId: "dopt-d9070ebb", 
  VpcId: "vpc-a01106c2"
 };
 ec2.associateDhcpOptions(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

To associate the default DHCP options set with a VPC


/* This example associates the default DHCP options set with the specified VPC. */

 var params = {
  DhcpOptionsId: "default", 
  VpcId: "vpc-a01106c2"
 };
 ec2.associateDhcpOptions(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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: {})
    • 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.

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

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

Associates an Identity and Access Management (IAM) role with an Certificate Manager (ACM) certificate. This enables the certificate to be used by the ACM for Nitro Enclaves application inside an enclave. For more information, see Certificate Manager for Nitro Enclaves in the Amazon Web Services Nitro Enclaves User Guide.

When the IAM role is associated with the ACM certificate, the certificate, certificate chain, and encrypted private key are placed in an Amazon S3 bucket that only the associated IAM role can access. The private key of the certificate is encrypted with an Amazon Web Services managed key that has an attached attestation-based key policy.

To enable the IAM role to access the Amazon S3 object, you must grant it permission to call s3:GetObject on the Amazon S3 bucket returned by the command. To enable the IAM role to access the KMS key, you must grant it permission to call kms:Decrypt on the KMS key returned by the command. For more information, see Grant the role permission to access the certificate and encryption key in the Amazon Web Services Nitro Enclaves User Guide.

Examples:

Calling the associateEnclaveCertificateIamRole operation

var params = {
  CertificateArn: 'STRING_VALUE',
  DryRun: true || false,
  RoleArn: 'STRING_VALUE'
};
ec2.associateEnclaveCertificateIamRole(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: {})
    • CertificateArn — (String)

      The ARN of the ACM certificate with which to associate the IAM role.

    • RoleArn — (String)

      The ARN of the IAM role to associate with the ACM certificate. You can associate up to 16 IAM roles with an ACM certificate.

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

      • CertificateS3BucketName — (String)

        The name of the Amazon S3 bucket to which the certificate was uploaded.

      • CertificateS3ObjectKey — (String)

        The Amazon S3 object key where the certificate, certificate chain, and encrypted private key bundle are stored. The object key is formatted as follows: role_arn/certificate_arn.

      • EncryptionKmsKeyId — (String)

        The ID of the KMS key used to encrypt the private key of the certificate.

Returns:

  • (AWS.Request)

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

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

Associates an IAM instance profile with a running or stopped instance. You cannot associate more than one IAM instance profile with an instance.

Service Reference:

Examples:

To associate an IAM instance profile with an instance


/* This example associates an IAM instance profile named admin-role with the specified instance. */

 var params = {
  IamInstanceProfile: {
   Name: "admin-role"
  }, 
  InstanceId: "i-123456789abcde123"
 };
 ec2.associateIamInstanceProfile(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    IamInstanceProfileAssociation: {
     AssociationId: "iip-assoc-0e7736511a163c209", 
     IamInstanceProfile: {
      Arn: "arn:aws:iam::123456789012:instance-profile/admin-role", 
      Id: "AIPAJBLK7RKJKWDXVHIEC"
     }, 
     InstanceId: "i-123456789abcde123", 
     State: "associating"
    }
   }
   */
 });

Calling the associateIamInstanceProfile operation

var params = {
  IamInstanceProfile: { /* required */
    Arn: 'STRING_VALUE',
    Name: 'STRING_VALUE'
  },
  InstanceId: 'STRING_VALUE' /* required */
};
ec2.associateIamInstanceProfile(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: {})
    • IamInstanceProfile — (map)

      The IAM instance profile.

      • Arn — (String)

        The Amazon Resource Name (ARN) of the instance profile.

      • Name — (String)

        The name of the instance profile.

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

      • IamInstanceProfileAssociation — (map)

        Information about the IAM instance profile association.

        • AssociationId — (String)

          The ID of the association.

        • InstanceId — (String)

          The ID of the instance.

        • IamInstanceProfile — (map)

          The IAM instance profile.

          • Arn — (String)

            The Amazon Resource Name (ARN) of the instance profile.

          • Id — (String)

            The ID of the instance profile.

        • State — (String)

          The state of the association.

          Possible values include:
          • "associating"
          • "associated"
          • "disassociating"
          • "disassociated"
        • Timestamp — (Date)

          The time the IAM instance profile was associated with the instance.

Returns:

  • (AWS.Request)

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

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

Associates one or more targets with an event window. Only one type of target (instance IDs, Dedicated Host IDs, or tags) can be specified with an event window.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the associateInstanceEventWindow operation

var params = {
  AssociationTarget: { /* required */
    DedicatedHostIds: [
      'STRING_VALUE',
      /* more items */
    ],
    InstanceIds: [
      'STRING_VALUE',
      /* more items */
    ],
    InstanceTags: [
      {
        Key: 'STRING_VALUE',
        Value: 'STRING_VALUE'
      },
      /* more items */
    ]
  },
  InstanceEventWindowId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.associateInstanceEventWindow(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.

    • InstanceEventWindowId — (String)

      The ID of the event window.

    • AssociationTarget — (map)

      One or more targets associated with the specified event window.

      • InstanceIds — (Array<String>)

        The IDs of the instances to associate with the event window. If the instance is on a Dedicated Host, you can't specify the Instance ID parameter; you must use the Dedicated Host ID parameter.

      • InstanceTags — (Array<map>)

        The instance tags to associate with the event window. Any instances associated with the tags will be associated with the event window.

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

      • DedicatedHostIds — (Array<String>)

        The IDs of the Dedicated Hosts to associate with the event window.

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:

      • InstanceEventWindow — (map)

        Information about the event window.

        • InstanceEventWindowId — (String)

          The ID of the event window.

        • TimeRanges — (Array<map>)

          One or more time ranges defined for the event window.

          • StartWeekDay — (String)

            The day on which the time range begins.

            Possible values include:
            • "sunday"
            • "monday"
            • "tuesday"
            • "wednesday"
            • "thursday"
            • "friday"
            • "saturday"
          • StartHour — (Integer)

            The hour when the time range begins.

          • EndWeekDay — (String)

            The day on which the time range ends.

            Possible values include:
            • "sunday"
            • "monday"
            • "tuesday"
            • "wednesday"
            • "thursday"
            • "friday"
            • "saturday"
          • EndHour — (Integer)

            The hour when the time range ends.

        • Name — (String)

          The name of the event window.

        • CronExpression — (String)

          The cron expression defined for the event window.

        • AssociationTarget — (map)

          One or more targets associated with the event window.

          • InstanceIds — (Array<String>)

            The IDs of the instances associated with the event window.

          • Tags — (Array<map>)

            The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.

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

          • DedicatedHostIds — (Array<String>)

            The IDs of the Dedicated Hosts associated with the event window.

        • State — (String)

          The current state of the event window.

          Possible values include:
          • "creating"
          • "deleting"
          • "active"
          • "deleted"
        • Tags — (Array<map>)

          The instance tags associated with the event window.

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

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

Associates a subnet in your VPC or an internet gateway or virtual private gateway attached to your VPC with a route table in your VPC. This association causes traffic from the subnet or gateway 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 later. A route table can be associated with multiple subnets.

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

Service Reference:

Examples:

To associate a route table with a subnet


/* This example associates the specified route table with the specified subnet. */

 var params = {
  RouteTableId: "rtb-22574640", 
  SubnetId: "subnet-9d4a7b6"
 };
 ec2.associateRouteTable(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AssociationId: "rtbassoc-781d0d1a"
   }
   */
 });

Calling the associateRouteTable operation

var params = {
  RouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  GatewayId: 'STRING_VALUE',
  SubnetId: 'STRING_VALUE'
};
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.

    • RouteTableId — (String)

      The ID of the route table.

    • SubnetId — (String)

      The ID of the subnet.

    • GatewayId — (String)

      The ID of the internet gateway or 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:

      • AssociationId — (String)

        The route table association ID. This ID is required for disassociating the route table.

      • AssociationState — (map)

        The state of the association.

        • State — (String)

          The state of the association.

          Possible values include:
          • "associating"
          • "associated"
          • "disassociating"
          • "disassociated"
          • "failed"
        • StatusMessage — (String)

          The status message, if applicable.

Returns:

  • (AWS.Request)

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

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

Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR block with your subnet. An IPv6 CIDR block must have a prefix length of /64.

Service Reference:

Examples:

Calling the associateSubnetCidrBlock operation

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

      The IPv6 CIDR block for your subnet. The subnet must have a /64 prefix length.

    • SubnetId — (String)

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

      • Ipv6CidrBlockAssociation — (map)

        Information about the IPv6 CIDR block association.

        • AssociationId — (String)

          The association ID for the CIDR block.

        • Ipv6CidrBlock — (String)

          The IPv6 CIDR block.

        • Ipv6CidrBlockState — (map)

          Information about the state of the CIDR block.

          • State — (String)

            The state of a CIDR block.

            Possible values include:
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
            • "failing"
            • "failed"
          • StatusMessage — (String)

            A message about the status of the CIDR block, if applicable.

      • SubnetId — (String)

        The ID of the subnet.

Returns:

  • (AWS.Request)

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

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

Associates the specified subnets and transit gateway attachments with the specified transit gateway multicast domain.

The transit gateway attachment must be in the available state before you can add a resource. Use DescribeTransitGatewayAttachments to see the state of the attachment.

Examples:

Calling the associateTransitGatewayMulticastDomain operation

var params = {
  DryRun: true || false,
  SubnetIds: [
    'STRING_VALUE',
    /* more items */
  ],
  TransitGatewayAttachmentId: 'STRING_VALUE',
  TransitGatewayMulticastDomainId: 'STRING_VALUE'
};
ec2.associateTransitGatewayMulticastDomain(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: {})
    • TransitGatewayMulticastDomainId — (String)

      The ID of the transit gateway multicast domain.

    • TransitGatewayAttachmentId — (String)

      The ID of the transit gateway attachment to associate with the transit gateway multicast domain.

    • SubnetIds — (Array<String>)

      The IDs of the subnets to associate with the transit gateway multicast domain.

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

      • Associations — (map)

        Information about the transit gateway multicast domain associations.

        • TransitGatewayMulticastDomainId — (String)

          The ID of the transit gateway multicast domain.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway attachment.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The type of resource, for example a VPC attachment.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • ResourceOwnerId — (String)

          The ID of the Amazon Web Services account that owns the resource.

        • Subnets — (Array<map>)

          The subnets associated with the multicast domain.

          • SubnetId — (String)

            The ID of the subnet.

          • State — (String)

            The state of the subnet association.

            Possible values include:
            • "pendingAcceptance"
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
            • "rejected"
            • "failed"

Returns:

  • (AWS.Request)

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

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

Associates the specified attachment with the specified transit gateway route table. You can associate only one route table with an attachment.

Examples:

Calling the associateTransitGatewayRouteTable operation

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

      The ID of the transit gateway route table.

    • TransitGatewayAttachmentId — (String)

      The ID of the attachment.

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

      • Association — (map)

        The ID of the association.

        • TransitGatewayRouteTableId — (String)

          The ID of the transit gateway route table.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The resource type. Note that the tgw-peering resource type has been deprecated.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • State — (String)

          The state of the association.

          Possible values include:
          • "associating"
          • "associated"
          • "disassociating"
          • "disassociated"

Returns:

  • (AWS.Request)

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

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

Note: This API action is currently in limited preview only. If you are interested in using this feature, contact your account manager.

Associates a branch network interface with a trunk network interface.

Before you create the association, run the create-network-interface command and set --interface-type to trunk. You must also create a network interface for each branch network interface that you want to associate with the trunk network interface.

Service Reference:

Examples:

Calling the associateTrunkInterface operation

var params = {
  BranchInterfaceId: 'STRING_VALUE', /* required */
  TrunkInterfaceId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  GreKey: 'NUMBER_VALUE',
  VlanId: 'NUMBER_VALUE'
};
ec2.associateTrunkInterface(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: {})
    • BranchInterfaceId — (String)

      The ID of the branch network interface.

    • TrunkInterfaceId — (String)

      The ID of the trunk network interface.

    • VlanId — (Integer)

      The ID of the VLAN. This applies to the VLAN protocol.

    • GreKey — (Integer)

      The application key. This applies to the GRE protocol.

    • ClientToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.
    • 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:

      • InterfaceAssociation — (map)

        Information about the association between the trunk network interface and branch network interface.

        • AssociationId — (String)

          The ID of the association.

        • BranchInterfaceId — (String)

          The ID of the branch network interface.

        • TrunkInterfaceId — (String)

          The ID of the trunk network interface.

        • InterfaceProtocol — (String)

          The interface protocol. Valid values are VLAN and GRE.

          Possible values include:
          • "VLAN"
          • "GRE"
        • VlanId — (Integer)

          The ID of the VLAN when you use the VLAN protocol.

        • GreKey — (Integer)

          The application key when you use the GRE protocol.

        • Tags — (Array<map>)

          The tags for the trunk interface association.

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

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

Returns:

  • (AWS.Request)

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

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

Associates a CIDR block with your VPC. You can associate a secondary IPv4 CIDR block, an Amazon-provided IPv6 CIDR block, or an IPv6 CIDR block from an IPv6 address pool that you provisioned through bring your own IP addresses (BYOIP). The IPv6 CIDR block size is fixed at /56.

You must specify one of the following in the request: an IPv4 CIDR block, an IPv6 pool, or an Amazon-provided IPv6 CIDR block.

For more information about associating CIDR blocks with your VPC and applicable restrictions, see VPC and subnet sizing in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

Calling the associateVpcCidrBlock operation

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

      Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses, or the size of the CIDR block.

    • CidrBlock — (String)

      An IPv4 CIDR block to associate with the VPC.

    • VpcId — (String)

      The ID of the VPC.

    • Ipv6CidrBlockNetworkBorderGroup — (String)

      The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the CIDR block to this location.

      You must set AmazonProvidedIpv6CidrBlock to true to use this parameter.

      You can have one IPv6 CIDR block association per network border group.

    • Ipv6Pool — (String)

      The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.

    • Ipv6CidrBlock — (String)

      An IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in the request.

      To let Amazon choose the IPv6 CIDR block for you, omit this parameter.

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:

      • Ipv6CidrBlockAssociation — (map)

        Information about the IPv6 CIDR block association.

        • AssociationId — (String)

          The association ID for the IPv6 CIDR block.

        • Ipv6CidrBlock — (String)

          The IPv6 CIDR block.

        • Ipv6CidrBlockState — (map)

          Information about the state of the CIDR block.

          • State — (String)

            The state of the CIDR block.

            Possible values include:
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
            • "failing"
            • "failed"
          • StatusMessage — (String)

            A message about the status of the CIDR block, if applicable.

        • NetworkBorderGroup — (String)

          The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1.

        • Ipv6Pool — (String)

          The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

      • CidrBlockAssociation — (map)

        Information about the IPv4 CIDR block association.

        • AssociationId — (String)

          The association ID for the IPv4 CIDR block.

        • CidrBlock — (String)

          The IPv4 CIDR block.

        • CidrBlockState — (map)

          Information about the state of the CIDR block.

          • State — (String)

            The state of the CIDR block.

            Possible values include:
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
            • "failing"
            • "failed"
          • StatusMessage — (String)

            A message about the status of the CIDR block, if applicable.

      • VpcId — (String)

        The ID of the VPC.

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.

Service Reference:

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.

    • Groups — (Array<String>)

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

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

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 or a virtual private 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.

Service Reference:

Examples:

To attach an Internet gateway to a VPC


/* This example attaches the specified Internet gateway to the specified VPC. */

 var params = {
  InternetGatewayId: "igw-c0a643a9", 
  VpcId: "vpc-a01106c2"
 };
 ec2.attachInternetGateway(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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.

Service Reference:

Examples:

To attach a network interface to an instance


/* This example attaches the specified network interface to the specified instance. */

 var params = {
  DeviceIndex: 1, 
  InstanceId: "i-1234567890abcdef0", 
  NetworkInterfaceId: "eni-e5aa89a3"
 };
 ec2.attachNetworkInterface(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AttachmentId: "eni-attach-66c4350a"
   }
   */
 });

Calling the attachNetworkInterface operation

var params = {
  DeviceIndex: 'NUMBER_VALUE', /* required */
  InstanceId: 'STRING_VALUE', /* required */
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  NetworkCardIndex: 'NUMBER_VALUE'
};
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: {})
    • DeviceIndex — (Integer)

      The index of the device for the network interface attachment.

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

    • NetworkInterfaceId — (String)

      The ID of the network interface.

    • NetworkCardIndex — (Integer)

      The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

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.

      • NetworkCardIndex — (Integer)

        The index of the network card.

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 must be attached to instances that support Amazon EBS encryption. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide.

After you attach an EBS volume, you must make it available. For more information, see Make an EBS volume available for use.

If a volume has an Amazon Web Services Marketplace product code:

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

  • Amazon Web Services 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 more information, see Attach an Amazon EBS volume to an instance in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To attach a volume to an instance


/* This example attaches a volume (``vol-1234567890abcdef0``) to an instance (``i-01474ef662b89480``) as ``/dev/sdf``. */

 var params = {
  Device: "/dev/sdf", 
  InstanceId: "i-01474ef662b89480", 
  VolumeId: "vol-1234567890abcdef0"
 };
 ec2.attachVolume(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AttachTime: <Date Representation>, 
    Device: "/dev/sdf", 
    InstanceId: "i-01474ef662b89480", 
    State: "attaching", 
    VolumeId: "vol-1234567890abcdef0"
   }
   */
 });

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: {})
    • Device — (String)

      The device name (for example, /dev/sdh or xvdh).

    • InstanceId — (String)

      The ID of the instance.

    • VolumeId — (String)

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

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

      • AttachTime — (Date)

        The time stamp when the attachment initiated.

      • Device — (String)

        The device name.

      • InstanceId — (String)

        The ID of the instance.

      • State — (String)

        The attachment state of the volume.

        Possible values include:
        • "attaching"
        • "attached"
        • "detaching"
        • "detached"
        • "busy"
      • VolumeId — (String)

        The ID of the volume.

      • 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. You can attach one virtual private gateway to one VPC at a time.

For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.

Service Reference:

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: {})
    • VpcId — (String)

      The ID of the VPC.

    • VpnGatewayId — (String)

      The ID of the virtual private gateway.

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

      • VpcAttachment — (map)

        Information about the attachment.

        • State — (String)

          The current state of the attachment.

          Possible values include:
          • "attaching"
          • "attached"
          • "detaching"
          • "detached"
        • VpcId — (String)

          The ID of the VPC.

Returns:

  • (AWS.Request)

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

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

Adds an ingress authorization rule to a Client VPN endpoint. Ingress authorization rules act as firewall rules that grant access to networks. You must configure ingress authorization rules to enable clients to access resources in Amazon Web Services or on-premises networks.

Service Reference:

Examples:

Calling the authorizeClientVpnIngress operation

var params = {
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  TargetNetworkCidr: 'STRING_VALUE', /* required */
  AccessGroupId: 'STRING_VALUE',
  AuthorizeAllGroups: true || false,
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DryRun: true || false
};
ec2.authorizeClientVpnIngress(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint.

    • TargetNetworkCidr — (String)

      The IPv4 address range, in CIDR notation, of the network for which access is being authorized.

    • AccessGroupId — (String)

      The ID of the group to grant access to, for example, the Active Directory group or identity provider (IdP) group. Required if AuthorizeAllGroups is false or not specified.

    • AuthorizeAllGroups — (Boolean)

      Indicates whether to grant access to all clients. Specify true to grant all clients who successfully establish a VPN connection access to the network. Must be set to true if AccessGroupId is not specified.

    • Description — (String)

      A brief description of the authorization rule.

    • ClientToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.
    • 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:

      • Status — (map)

        The current state of the authorization rule.

        • Code — (String)

          The state of the authorization rule.

          Possible values include:
          • "authorizing"
          • "active"
          • "failed"
          • "revoking"
        • Message — (String)

          A message about the status of the authorization rule, if applicable.

Returns:

  • (AWS.Request)

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

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

[VPC only] Adds the specified outbound (egress) rules to a security group for use with a VPC.

An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 CIDR address ranges, or to the instances that are associated with the specified destination security groups.

You specify a protocol for each rule (for example, TCP). 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.

For information about VPC security group quotas, see Amazon VPC quotas.

Service Reference:

Examples:

To add a rule that allows outbound traffic to a specific address range


/* This example adds a rule that grants access to the specified address ranges on TCP port 80. */

 var params = {
  GroupId: "sg-1a2b3c4d", 
  IpPermissions: [
     {
    FromPort: 80, 
    IpProtocol: "tcp", 
    IpRanges: [
       {
      CidrIp: "10.0.0.0/16"
     }
    ], 
    ToPort: 80
   }
  ]
 };
 ec2.authorizeSecurityGroupEgress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

To add a rule that allows outbound traffic to a specific security group


/* This example adds a rule that grants access to the specified security group on TCP port 80. */

 var params = {
  GroupId: "sg-1a2b3c4d", 
  IpPermissions: [
     {
    FromPort: 80, 
    IpProtocol: "tcp", 
    ToPort: 80, 
    UserIdGroupPairs: [
       {
      GroupId: "sg-4b51a32f"
     }
    ]
   }
  ]
 };
 ec2.authorizeSecurityGroupEgress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the authorizeSecurityGroupEgress operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  CidrIp: 'STRING_VALUE',
  DryRun: true || false,
  FromPort: 'NUMBER_VALUE',
  IpPermissions: [
    {
      FromPort: 'NUMBER_VALUE',
      IpProtocol: 'STRING_VALUE',
      IpRanges: [
        {
          CidrIp: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      Ipv6Ranges: [
        {
          CidrIpv6: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      PrefixListIds: [
        {
          Description: 'STRING_VALUE',
          PrefixListId: 'STRING_VALUE'
        },
        /* more items */
      ],
      ToPort: 'NUMBER_VALUE',
      UserIdGroupPairs: [
        {
          Description: 'STRING_VALUE',
          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',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  ToPort: 'NUMBER_VALUE'
};
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.

    • IpPermissions — (Array<map>)

      The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions.

      • FromPort — (Integer)

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol — (String)

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

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges — (Array<map>)

        The IPv4 ranges.

        • CidrIp — (String)

          The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv4 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges — (Array<map>)

        [VPC only] The IPv6 ranges.

        • CidrIpv6 — (String)

          The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv6 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds — (Array<map>)

        [VPC only] The prefix list IDs.

        • Description — (String)

          A description for the security group rule that references this prefix list ID.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • PrefixListId — (String)

          The ID of the prefix.

      • ToPort — (Integer)

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs — (Array<map>)

        The security group and Amazon Web Services account ID pairs.

        • Description — (String)

          A description for the security group rule that references this user ID group pair.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • GroupId — (String)

          The ID of the security group.

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

          For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

        • PeeringStatus — (String)

          The status of a VPC peering connection, if applicable.

        • UserId — (String)

          The ID of an Amazon Web Services account.

          For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

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

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

    • TagSpecifications — (Array<map>)

      The tags applied to the security group rule.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • CidrIp — (String)

      Not supported. Use a set of IP permissions to specify the CIDR.

    • FromPort — (Integer)

      Not supported. Use a set of IP permissions to specify the port.

    • IpProtocol — (String)

      Not supported. Use a set of IP permissions to specify the protocol name or number.

    • ToPort — (Integer)

      Not supported. Use a set of IP permissions to specify the port.

    • SourceSecurityGroupName — (String)

      Not supported. Use a set of IP permissions to specify a destination security group.

    • SourceSecurityGroupOwnerId — (String)

      Not supported. Use a set of IP permissions to specify a destination security 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. The data object has the following properties:

      • Return — (Boolean)

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

      • SecurityGroupRules — (Array<map>)

        Information about the outbound (egress) security group rules that were added.

        • SecurityGroupRuleId — (String)

          The ID of the security group rule.

        • GroupId — (String)

          The ID of the security group.

        • GroupOwnerId — (String)

          The ID of the Amazon Web Services account that owns the security group.

        • IsEgress — (Boolean)

          Indicates whether the security group rule is an outbound rule.

        • IpProtocol — (String)

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

          Use -1 to specify all protocols.

        • FromPort — (Integer)

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • ToPort — (Integer)

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • CidrIpv4 — (String)

          The IPv4 CIDR range.

        • CidrIpv6 — (String)

          The IPv6 CIDR range.

        • PrefixListId — (String)

          The ID of the prefix list.

        • ReferencedGroupInfo — (map)

          Describes the security group that is referenced in the rule.

          • GroupId — (String)

            The ID of the security group.

          • PeeringStatus — (String)

            The status of a VPC peering connection, if applicable.

          • UserId — (String)

            The Amazon Web Services account ID.

          • VpcId — (String)

            The ID of the VPC.

          • VpcPeeringConnectionId — (String)

            The ID of the VPC peering connection.

        • Description — (String)

          The security group rule description.

        • Tags — (Array<map>)

          The tags applied to the security group rule.

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

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

Adds the specified inbound (ingress) rules to a security group.

An inbound rule permits instances to receive traffic from the specified IPv4 or IPv6 CIDR address range, or from the instances that are associated with the specified destination security groups.

You specify a protocol for each rule (for example, TCP). For TCP and UDP, you must also specify the destination port or port range. For ICMP/ICMPv6, you must also specify the ICMP/ICMPv6 type and code. You can use -1 to mean all types or all codes.

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

For more information about VPC security group quotas, see Amazon VPC quotas.

Service Reference:

Examples:

To add a rule that allows inbound SSH traffic from an IPv4 address range


/* This example enables inbound traffic on TCP port 22 (SSH). The rule includes a description to help you identify it later. */

 var params = {
  GroupId: "sg-903004f8", 
  IpPermissions: [
     {
    FromPort: 22, 
    IpProtocol: "tcp", 
    IpRanges: [
       {
      CidrIp: "203.0.113.0/24", 
      Description: "SSH access from the LA office"
     }
    ], 
    ToPort: 22
   }
  ]
 };
 ec2.authorizeSecurityGroupIngress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

To add a rule that allows inbound HTTP traffic from another security group


/* This example enables inbound traffic on TCP port 80 from the specified security group. The group must be in the same VPC or a peer VPC. Incoming traffic is allowed based on the private IP addresses of instances that are associated with the specified security group. */

 var params = {
  GroupId: "sg-111aaa22", 
  IpPermissions: [
     {
    FromPort: 80, 
    IpProtocol: "tcp", 
    ToPort: 80, 
    UserIdGroupPairs: [
       {
      Description: "HTTP access from other instances", 
      GroupId: "sg-1a2b3c4d"
     }
    ]
   }
  ]
 };
 ec2.authorizeSecurityGroupIngress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

To add a rule that allows inbound RDP traffic from an IPv6 address range


/* This example adds an inbound rule that allows RDP traffic from the specified IPv6 address range. The rule includes a description to help you identify it later. */

 var params = {
  GroupId: "sg-123abc12 ", 
  IpPermissions: [
     {
    FromPort: 3389, 
    IpProtocol: "tcp", 
    Ipv6Ranges: [
       {
      CidrIpv6: "2001:db8:1234:1a00::/64", 
      Description: "RDP access from the NY office"
     }
    ], 
    ToPort: 3389
   }
  ]
 };
 ec2.authorizeSecurityGroupIngress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the authorizeSecurityGroupIngress operation

var params = {
  CidrIp: 'STRING_VALUE',
  DryRun: true || false,
  FromPort: 'NUMBER_VALUE',
  GroupId: 'STRING_VALUE',
  GroupName: 'STRING_VALUE',
  IpPermissions: [
    {
      FromPort: 'NUMBER_VALUE',
      IpProtocol: 'STRING_VALUE',
      IpRanges: [
        {
          CidrIp: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      Ipv6Ranges: [
        {
          CidrIpv6: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      PrefixListIds: [
        {
          Description: 'STRING_VALUE',
          PrefixListId: 'STRING_VALUE'
        },
        /* more items */
      ],
      ToPort: 'NUMBER_VALUE',
      UserIdGroupPairs: [
        {
          Description: 'STRING_VALUE',
          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',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  ToPort: 'NUMBER_VALUE'
};
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: {})
    • CidrIp — (String)

      The IPv4 address range, in CIDR format. You can't specify this parameter when specifying a source security group. To specify an IPv6 address range, use a set of IP permissions.

      Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

    • 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 types. If you specify all ICMP types, you must specify all codes.

      Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

    • GroupId — (String)

      The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

    • GroupName — (String)

      [EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.

    • IpPermissions — (Array<map>)

      The sets of IP permissions.

      • FromPort — (Integer)

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol — (String)

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

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges — (Array<map>)

        The IPv4 ranges.

        • CidrIp — (String)

          The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv4 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges — (Array<map>)

        [VPC only] The IPv6 ranges.

        • CidrIpv6 — (String)

          The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv6 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds — (Array<map>)

        [VPC only] The prefix list IDs.

        • Description — (String)

          A description for the security group rule that references this prefix list ID.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • PrefixListId — (String)

          The ID of the prefix.

      • ToPort — (Integer)

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs — (Array<map>)

        The security group and Amazon Web Services account ID pairs.

        • Description — (String)

          A description for the security group rule that references this user ID group pair.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • GroupId — (String)

          The ID of the security group.

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

          For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

        • PeeringStatus — (String)

          The status of a VPC peering connection, if applicable.

        • UserId — (String)

          The ID of an Amazon Web Services account.

          For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

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

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

    • IpProtocol — (String)

      The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). To specify icmpv6, use a set of IP permissions.

      [VPC only] Use -1 to specify all protocols. If you specify -1 or a protocol other than tcp, udp, or icmp, traffic on all ports is allowed, regardless of any ports you specify.

      Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

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

      [nondefault VPC] The Amazon Web Services account ID 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.

    • 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 codes. If you specify all ICMP types, you must specify all codes.

      Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

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

    • TagSpecifications — (Array<map>)

      [VPC Only] The tags applied to the security group rule.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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, returns an error.

      • SecurityGroupRules — (Array<map>)

        Information about the inbound (ingress) security group rules that were added.

        • SecurityGroupRuleId — (String)

          The ID of the security group rule.

        • GroupId — (String)

          The ID of the security group.

        • GroupOwnerId — (String)

          The ID of the Amazon Web Services account that owns the security group.

        • IsEgress — (Boolean)

          Indicates whether the security group rule is an outbound rule.

        • IpProtocol — (String)

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

          Use -1 to specify all protocols.

        • FromPort — (Integer)

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • ToPort — (Integer)

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • CidrIpv4 — (String)

          The IPv4 CIDR range.

        • CidrIpv6 — (String)

          The IPv6 CIDR range.

        • PrefixListId — (String)

          The ID of the prefix list.

        • ReferencedGroupInfo — (map)

          Describes the security group that is referenced in the rule.

          • GroupId — (String)

            The ID of the security group.

          • PeeringStatus — (String)

            The status of a VPC peering connection, if applicable.

          • UserId — (String)

            The Amazon Web Services account ID.

          • VpcId — (String)

            The ID of the VPC.

          • VpcPeeringConnectionId — (String)

            The ID of the VPC peering connection.

        • Description — (String)

          The security group rule description.

        • Tags — (Array<map>)

          The tags applied to the security group rule.

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

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.

Service Reference:

Examples:

Calling the bundleInstance operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  Storage: { /* required */
    S3: {
      AWSAccessKeyId: 'STRING_VALUE',
      Bucket: 'STRING_VALUE',
      Prefix: 'STRING_VALUE',
      UploadPolicy: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
      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: {})
    • 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.

        • 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 Amazon Web Services Access Keys.

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

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

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

      • BundleTask — (map)

        Information about the bundle task.

        • BundleId — (String)

          The ID of the bundle task.

        • BundleTaskError — (map)

          If the task fails, a description of the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message.

        • InstanceId — (String)

          The ID of the instance associated with this bundle task.

        • Progress — (String)

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

        • StartTime — (Date)

          The time this task started.

        • State — (String)

          The state of the task.

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

          The Amazon S3 storage locations.

          • S3 — (map)

            An Amazon S3 storage location.

            • 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 Amazon Web Services Access Keys.

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

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

        • UpdateTime — (Date)

          The time of the most recent update for the task.

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.

Service Reference:

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: {})
    • BundleId — (String)

      The ID of the bundle task.

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

      • BundleTask — (map)

        Information about the bundle task.

        • BundleId — (String)

          The ID of the bundle task.

        • BundleTaskError — (map)

          If the task fails, a description of the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message.

        • InstanceId — (String)

          The ID of the instance associated with this bundle task.

        • Progress — (String)

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

        • StartTime — (Date)

          The time this task started.

        • State — (String)

          The state of the task.

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

          The Amazon S3 storage locations.

          • S3 — (map)

            An Amazon S3 storage location.

            • 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 Amazon Web Services Access Keys.

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

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

        • UpdateTime — (Date)

          The time of the most recent update for the task.

Returns:

  • (AWS.Request)

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

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

Cancels the specified Capacity Reservation, releases the reserved capacity, and changes the Capacity Reservation's state to cancelled.

Instances running in the reserved capacity continue running until you stop them. Stopped instances that target the Capacity Reservation can no longer launch. Modify these instances to either target a different Capacity Reservation, launch On-Demand Instance capacity, or run in any open Capacity Reservation that has matching attributes and sufficient capacity.

Service Reference:

Examples:

Calling the cancelCapacityReservation operation

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

      The ID of the Capacity Reservation to be cancelled.

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

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

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

Cancels one or more Capacity Reservation Fleets. When you cancel a Capacity Reservation Fleet, the following happens:

  • The Capacity Reservation Fleet's status changes to cancelled.

  • The individual Capacity Reservations in the Fleet are cancelled. Instances running in the Capacity Reservations at the time of cancelling the Fleet continue to run in shared capacity.

  • The Fleet stops creating new Capacity Reservations.

Service Reference:

Examples:

Calling the cancelCapacityReservationFleets operation

var params = {
  CapacityReservationFleetIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.cancelCapacityReservationFleets(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.

    • CapacityReservationFleetIds — (Array<String>)

      The IDs of the Capacity Reservation Fleets to cancel.

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:

      • SuccessfulFleetCancellations — (Array<map>)

        Information about the Capacity Reservation Fleets that were successfully cancelled.

        • CurrentFleetState — (String)

          The current state of the Capacity Reservation Fleet.

          Possible values include:
          • "submitted"
          • "modifying"
          • "active"
          • "partially_fulfilled"
          • "expiring"
          • "expired"
          • "cancelling"
          • "cancelled"
          • "failed"
        • PreviousFleetState — (String)

          The previous state of the Capacity Reservation Fleet.

          Possible values include:
          • "submitted"
          • "modifying"
          • "active"
          • "partially_fulfilled"
          • "expiring"
          • "expired"
          • "cancelling"
          • "cancelled"
          • "failed"
        • CapacityReservationFleetId — (String)

          The ID of the Capacity Reservation Fleet that was successfully cancelled.

      • FailedFleetCancellations — (Array<map>)

        Information about the Capacity Reservation Fleets that could not be cancelled.

        • CapacityReservationFleetId — (String)

          The ID of the Capacity Reservation Fleet that could not be cancelled.

        • CancelCapacityReservationFleetError — (map)

          Information about the Capacity Reservation Fleet cancellation 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.

Service Reference:

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: {})
    • ConversionTaskId — (String)

      The ID of the conversion task.

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

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

Service Reference:

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.

Service Reference:

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: {})
    • CancelReason — (String)

      The reason for canceling the task.

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

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.

      • PreviousState — (String)

        The current state of the task being canceled.

      • State — (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 EC2 User Guide.

Service Reference:

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.

        • ClientToken — (String)

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

        • CreateDate — (Date)

          The time the listing was created.

        • InstanceCounts — (Array<map>)

          The number of instances in this state.

          • InstanceCount — (Integer)

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

          • State — (String)

            The states of the listed Reserved Instances.

            Possible values include:
            • "available"
            • "sold"
            • "cancelled"
            • "pending"
        • PriceSchedules — (Array<map>)

          The price of the Reserved Instance listing.

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

          • CurrencyCode — (String)

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

            Possible values include:
            • "USD"
          • Price — (Float)

            The fixed price for the 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.

        • ReservedInstancesId — (String)

          The ID of the Reserved Instance.

        • ReservedInstancesListingId — (String)

          The ID of the Reserved Instance 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.

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

        • UpdateDate — (Date)

          The last modified timestamp of the listing.

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.

Service Reference:

Examples:

To cancel a Spot fleet request


/* This example cancels the specified Spot fleet request and terminates its associated Spot Instances. */

 var params = {
  SpotFleetRequestIds: [
     "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
  ], 
  TerminateInstances: true
 };
 ec2.cancelSpotFleetRequests(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SuccessfulFleetRequests: [
       {
      CurrentSpotFleetRequestState: "cancelled_running", 
      PreviousSpotFleetRequestState: "active", 
      SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
     }
    ]
   }
   */
 });

To cancel a Spot fleet request without terminating its Spot Instances


/* This example cancels the specified Spot fleet request without terminating its associated Spot Instances. */

 var params = {
  SpotFleetRequestIds: [
     "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
  ], 
  TerminateInstances: false
 };
 ec2.cancelSpotFleetRequests(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SuccessfulFleetRequests: [
       {
      CurrentSpotFleetRequestState: "cancelled_terminating", 
      PreviousSpotFleetRequestState: "active", 
      SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
     }
    ]
   }
   */
 });

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:

      • SuccessfulFleetRequests — (Array<map>)

        Information about the Spot Fleet requests that are successfully canceled.

        • CurrentSpotFleetRequestState — (String)

          The current state of the Spot Fleet request.

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

          The previous state of the Spot Fleet request.

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

          The ID of the Spot Fleet request.

      • UnsuccessfulFleetRequests — (Array<map>)

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

        • Error — (map)

          The error.

          • Code — (String)

            The error code.

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

            The description for the error code.

        • SpotFleetRequestId — (String)

          The ID of the Spot Fleet request.

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.

Canceling a Spot Instance request does not terminate running Spot Instances associated with the request.

Service Reference:

Examples:

To cancel Spot Instance requests


/* This example cancels a Spot Instance request. */

 var params = {
  SpotInstanceRequestIds: [
     "sir-08b93456"
  ]
 };
 ec2.cancelSpotInstanceRequests(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    CancelledSpotInstanceRequests: [
       {
      SpotInstanceRequestId: "sir-08b93456", 
      State: "cancelled"
     }
    ]
   }
   */
 });

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 must verify whether another user's instance is eligible for support.

Service Reference:

Examples:

To confirm the product instance


/* This example determines whether the specified product code is associated with the specified instance. */

 var params = {
  InstanceId: "i-1234567890abcdef0", 
  ProductCode: "774F4FF8"
 };
 ec2.confirmProductInstance(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    OwnerId: "123456789012"
   }
   */
 });

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: {})
    • InstanceId — (String)

      The ID of the instance.

    • ProductCode — (String)

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

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

      • OwnerId — (String)

        The Amazon Web Services 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.

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

Copies the specified Amazon FPGA Image (AFI) to the current Region.

Service Reference:

Examples:

Calling the copyFpgaImage operation

var params = {
  SourceFpgaImageId: 'STRING_VALUE', /* required */
  SourceRegion: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DryRun: true || false,
  Name: 'STRING_VALUE'
};
ec2.copyFpgaImage(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.

    • SourceFpgaImageId — (String)

      The ID of the source AFI.

    • Description — (String)

      The description for the new AFI.

    • Name — (String)

      The name for the new AFI. The default is the name of the source AFI.

    • SourceRegion — (String)

      The Region that contains the source AFI.

    • ClientToken — (String)

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. 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:

      • FpgaImageId — (String)

        The ID of the new AFI.

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. You can copy an AMI from one Region to another, or from a Region to an Outpost. You can't copy an AMI from an Outpost to a Region, from one Outpost to another, or within the same Outpost. To copy an AMI to another partition, see CreateStoreImageTask.

To copy an AMI from one Region to another, specify the source Region using the SourceRegion parameter, and specify the destination Region using its endpoint. Copies of encrypted backing snapshots for the AMI are encrypted. Copies of unencrypted backing snapshots remain unencrypted, unless you set Encrypted during the copy operation. You cannot create an unencrypted copy of an encrypted backing snapshot.

To copy an AMI from a Region to an Outpost, specify the source Region using the SourceRegion parameter, and specify the ARN of the destination Outpost using DestinationOutpostArn. Backing snapshots copied to an Outpost are encrypted by default using the default encryption key for the Region, or a different key that you specify in the request using KmsKeyId. Outposts do not support unencrypted snapshots. For more information, Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide.

For more information about the prerequisites and limits when copying an AMI, see Copying an AMI in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To copy an AMI to another region


/* This example copies the specified AMI from the us-east-1 region to the current region. */

 var params = {
  Description: "", 
  Name: "My server", 
  SourceImageId: "ami-5731123e", 
  SourceRegion: "us-east-1"
 };
 ec2.copyImage(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ImageId: "ami-438bea42"
   }
   */
 });

Calling the copyImage operation

var params = {
  Name: 'STRING_VALUE', /* required */
  SourceImageId: 'STRING_VALUE', /* required */
  SourceRegion: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DestinationOutpostArn: '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: {})
    • ClientToken — (String)

      Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

    • Description — (String)

      A description for the new AMI in the destination Region.

    • Encrypted — (Boolean)

      Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a copy of an unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The default KMS key for Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS key using KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

    • KmsKeyId — (String)

      The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted volumes. If this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is used. If you specify a KMS key, you must also set the encrypted state to true.

      You can specify a KMS key using any of the following:

      • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.

      • Key alias. For example, alias/ExampleAlias.

      • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.

      • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

      Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that is not valid, the action can appear to complete, but eventually fails.

      The specified KMS key must exist in the destination Region.

      Amazon EBS does not support asymmetric KMS keys.

    • Name — (String)

      The name of the new AMI in the destination Region.

    • SourceImageId — (String)

      The ID of the AMI to copy.

    • SourceRegion — (String)

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

    • DestinationOutpostArn — (String)

      The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when copying an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the destination Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or within the same Outpost.

      For more information, see Copying AMIs from an Amazon Web Services Region to an Outpost 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:

      • 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 a snapshot within the same Region, from one Region to another, or from a Region to an Outpost. You can't copy a snapshot from an Outpost to a Region, from one Outpost to another, or within the same Outpost.

You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs).

When copying snapshots to a Region, copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted, unless you enable encryption for the snapshot copy operation. By default, encrypted snapshot copies use the default Key Management Service (KMS) KMS key; however, you can specify a different KMS key. To copy an encrypted snapshot that has been shared from another account, you must have permissions for the KMS key used to encrypt the snapshot.

Snapshots copied to an Outpost are encrypted by default using the default encryption key for the Region, or a different key that you specify in the request using KmsKeyId. Outposts do not support unencrypted snapshots. For more information, Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide.

Snapshots created by copying another snapshot have an arbitrary volume ID that should not be used for any purpose.

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

Service Reference:

Examples:

To copy a snapshot


/* This example copies a snapshot with the snapshot ID of ``snap-066877671789bd71b`` from the ``us-west-2`` region to the ``us-east-1`` region and adds a short description to identify the snapshot. */

 var params = {
  Description: "This is my copied snapshot.", 
  DestinationRegion: "us-east-1", 
  SourceRegion: "us-west-2", 
  SourceSnapshotId: "snap-066877671789bd71b"
 };
 ec2.copySnapshot(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SnapshotId: "snap-066877671789bd71b"
   }
   */
 });

Calling the copySnapshot operation

var params = {
  SourceRegion: 'STRING_VALUE', /* required */
  SourceSnapshotId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  DestinationOutpostArn: 'STRING_VALUE',
  DestinationRegion: 'STRING_VALUE',
  DryRun: true || false,
  Encrypted: true || false,
  KmsKeyId: 'STRING_VALUE',
  PresignedUrl: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • Description — (String)

      A description for the EBS snapshot.

    • DestinationOutpostArn — (String)

      The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot. Only specify this parameter when copying a snapshot from an Amazon Web Services Region to an Outpost. The snapshot must be in the Region for the destination Outpost. You cannot copy a snapshot from an Outpost to a Region, from one Outpost to another, or within the same Outpost.

      For more information, see Copy snapshots from an Amazon Web Services Region to an Outpost in the Amazon Elastic Compute Cloud User Guide.

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

      The snapshot copy is sent to the regional endpoint that you sent the HTTP request to (for example, ec2.us-east-1.amazonaws.com). With the CLI, this is specified using the --region parameter or the default Region in your Amazon Web Services configuration file.

    • Encrypted — (Boolean)

      To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Otherwise, omit this parameter. Encrypted snapshots are encrypted, even if you omit this parameter and encryption by default is not enabled. You cannot set this parameter to false. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide.

    • KmsKeyId — (String)

      The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If KmsKeyId is specified, the encrypted state must be true.

      You can specify the KMS key using any of the following:

      • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.

      • Key alias. For example, alias/ExampleAlias.

      • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.

      • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

      Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

    • PresignedUrl — (String)

      When you copy an encrypted source snapshot using the Amazon EC2 Query API, you must supply a pre-signed URL. This parameter is optional for unencrypted snapshots. For more information, see Query requests.

      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 Amazon Web Services 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: Using Query Parameters (Amazon Web Services 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.

    • SourceRegion — (String)

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

    • SourceSnapshotId — (String)

      The ID of the EBS snapshot to copy.

    • TagSpecifications — (Array<map>)

      The tags to apply to the new snapshot.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • SnapshotId — (String)

        The ID of the new snapshot.

      • Tags — (Array<map>)

        Any tags applied to the new 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.

Returns:

  • (AWS.Request)

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

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

Creates a new Capacity Reservation with the specified attributes.

Capacity Reservations enable you to reserve capacity for your Amazon EC2 instances in a specific Availability Zone for any duration. This gives you the flexibility to selectively add capacity reservations and still get the Regional RI discounts for that usage. By creating Capacity Reservations, you ensure that you always have access to Amazon EC2 capacity when you need it, for as long as you need it. For more information, see Capacity Reservations in the Amazon EC2 User Guide.

Your request to create a Capacity Reservation could fail if Amazon EC2 does not have sufficient capacity to fulfill the request. If your request fails due to Amazon EC2 capacity constraints, either try again at a later time, try in a different Availability Zone, or request a smaller capacity reservation. If your application is flexible across instance types and sizes, try to create a Capacity Reservation with different instance attributes.

Your request could also fail if the requested quantity exceeds your On-Demand Instance limit for the selected instance type. If your request fails due to limit constraints, increase your On-Demand Instance limit for the required instance type and try again. For more information about increasing your instance limits, see Amazon EC2 Service Quotas in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the createCapacityReservation operation

var params = {
  InstanceCount: 'NUMBER_VALUE', /* required */
  InstancePlatform: Linux/UNIX | Red Hat Enterprise Linux | SUSE Linux | Windows | Windows with SQL Server | Windows with SQL Server Enterprise | Windows with SQL Server Standard | Windows with SQL Server Web | Linux with SQL Server Standard | Linux with SQL Server Web | Linux with SQL Server Enterprise, /* required */
  InstanceType: 'STRING_VALUE', /* required */
  AvailabilityZone: 'STRING_VALUE',
  AvailabilityZoneId: 'STRING_VALUE',
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  EbsOptimized: true || false,
  EndDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  EndDateType: unlimited | limited,
  EphemeralStorage: true || false,
  InstanceMatchCriteria: open | targeted,
  OutpostArn: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  Tenancy: default | dedicated
};
ec2.createCapacityReservation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClientToken — (String)

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

    • InstanceType — (String)

      The instance type for which to reserve capacity. For more information, see Instance types in the Amazon EC2 User Guide.

    • InstancePlatform — (String)

      The type of operating system for which to reserve capacity.

      Possible values include:
      • "Linux/UNIX"
      • "Red Hat Enterprise Linux"
      • "SUSE Linux"
      • "Windows"
      • "Windows with SQL Server"
      • "Windows with SQL Server Enterprise"
      • "Windows with SQL Server Standard"
      • "Windows with SQL Server Web"
      • "Linux with SQL Server Standard"
      • "Linux with SQL Server Web"
      • "Linux with SQL Server Enterprise"
    • AvailabilityZone — (String)

      The Availability Zone in which to create the Capacity Reservation.

    • AvailabilityZoneId — (String)

      The ID of the Availability Zone in which to create the Capacity Reservation.

    • Tenancy — (String)

      Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

      • default - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.

      • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.

      Possible values include:
      • "default"
      • "dedicated"
    • InstanceCount — (Integer)

      The number of instances for which to reserve capacity.

      Valid range: 1 - 1000

    • EbsOptimized — (Boolean)

      Indicates whether the Capacity Reservation supports EBS-optimized instances. 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.

    • EphemeralStorage — (Boolean)

      Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.

    • EndDate — (Date)

      The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

      You must provide an EndDate value if EndDateType is limited. Omit EndDate if EndDateType is unlimited.

      If the EndDateType is limited, the Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.

    • EndDateType — (String)

      Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

      • unlimited - The Capacity Reservation remains active until you explicitly cancel it. Do not provide an EndDate if the EndDateType is unlimited.

      • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if the EndDateType value is limited.

      Possible values include:
      • "unlimited"
      • "limited"
    • InstanceMatchCriteria — (String)

      Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

      • open - The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes run in the Capacity Reservation automatically without specifying any additional parameters.

      • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.

      Default: open

      Possible values include:
      • "open"
      • "targeted"
    • TagSpecifications — (Array<map>)

      The tags to apply to the Capacity Reservation during launch.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

    • OutpostArn — (String)

      The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.

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:

      • CapacityReservation — (map)

        Information about the Capacity Reservation.

        • CapacityReservationId — (String)

          The ID of the Capacity Reservation.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the Capacity Reservation.

        • CapacityReservationArn — (String)

          The Amazon Resource Name (ARN) of the Capacity Reservation.

        • AvailabilityZoneId — (String)

          The Availability Zone ID of the Capacity Reservation.

        • InstanceType — (String)

          The type of instance for which the Capacity Reservation reserves capacity.

        • InstancePlatform — (String)

          The type of operating system for which the Capacity Reservation reserves capacity.

          Possible values include:
          • "Linux/UNIX"
          • "Red Hat Enterprise Linux"
          • "SUSE Linux"
          • "Windows"
          • "Windows with SQL Server"
          • "Windows with SQL Server Enterprise"
          • "Windows with SQL Server Standard"
          • "Windows with SQL Server Web"
          • "Linux with SQL Server Standard"
          • "Linux with SQL Server Web"
          • "Linux with SQL Server Enterprise"
        • AvailabilityZone — (String)

          The Availability Zone in which the capacity is reserved.

        • Tenancy — (String)

          Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

          • default - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.

          • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.

          Possible values include:
          • "default"
          • "dedicated"
        • TotalInstanceCount — (Integer)

          The total number of instances for which the Capacity Reservation reserves capacity.

        • AvailableInstanceCount — (Integer)

          The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

        • EbsOptimized — (Boolean)

          Indicates whether the Capacity Reservation supports EBS-optimized instances. 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.

        • EphemeralStorage — (Boolean)

          Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.

        • State — (String)

          The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

          • active - The Capacity Reservation is active and the capacity is available for your use.

          • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.

          • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.

          • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.

          • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.

          Possible values include:
          • "active"
          • "expired"
          • "cancelled"
          • "pending"
          • "failed"
        • StartDate — (Date)

          The date and time at which the Capacity Reservation was started.

        • EndDate — (Date)

          The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

        • EndDateType — (String)

          Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

          • unlimited - The Capacity Reservation remains active until you explicitly cancel it.

          • limited - The Capacity Reservation expires automatically at a specified date and time.

          Possible values include:
          • "unlimited"
          • "limited"
        • InstanceMatchCriteria — (String)

          Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

          • open - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.

          • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.

          Possible values include:
          • "open"
          • "targeted"
        • CreateDate — (Date)

          The date and time at which the Capacity Reservation was created.

        • Tags — (Array<map>)

          Any tags assigned to the Capacity Reservation.

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

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.

        • CapacityReservationFleetId — (String)

          The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.

Returns:

  • (AWS.Request)

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

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

Creates a Capacity Reservation Fleet. For more information, see Create a Capacity Reservation Fleet in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the createCapacityReservationFleet operation

var params = {
  InstanceTypeSpecifications: [ /* required */
    {
      AvailabilityZone: 'STRING_VALUE',
      AvailabilityZoneId: 'STRING_VALUE',
      EbsOptimized: true || false,
      InstancePlatform: Linux/UNIX | Red Hat Enterprise Linux | SUSE Linux | Windows | Windows with SQL Server | Windows with SQL Server Enterprise | Windows with SQL Server Standard | Windows with SQL Server Web | Linux with SQL Server Standard | Linux with SQL Server Web | Linux with SQL Server Enterprise,
      InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
      Priority: 'NUMBER_VALUE',
      Weight: 'NUMBER_VALUE'
    },
    /* more items */
  ],
  TotalTargetCapacity: 'NUMBER_VALUE', /* required */
  AllocationStrategy: 'STRING_VALUE',
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  EndDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  InstanceMatchCriteria: open,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  Tenancy: default
};
ec2.createCapacityReservationFleet(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: {})
    • AllocationStrategy — (String)

      The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. Currently, only the prioritized allocation strategy is supported. For more information, see Allocation strategy in the Amazon EC2 User Guide.

      Valid values: prioritized

    • ClientToken — (String)

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

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

      Information about the instance types for which to reserve the capacity.

      • InstanceType — (String)

        The instance type for which the Capacity Reservation Fleet reserves capacity.

        Possible values include:
        • "t1.micro"
        • "t2.nano"
        • "t2.micro"
        • "t2.small"
        • "t2.medium"
        • "t2.large"
        • "t2.xlarge"
        • "t2.2xlarge"
        • "t3.nano"
        • "t3.micro"
        • "t3.small"
        • "t3.medium"
        • "t3.large"
        • "t3.xlarge"
        • "t3.2xlarge"
        • "t3a.nano"
        • "t3a.micro"
        • "t3a.small"
        • "t3a.medium"
        • "t3a.large"
        • "t3a.xlarge"
        • "t3a.2xlarge"
        • "t4g.nano"
        • "t4g.micro"
        • "t4g.small"
        • "t4g.medium"
        • "t4g.large"
        • "t4g.xlarge"
        • "t4g.2xlarge"
        • "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"
        • "m4.16xlarge"
        • "m2.xlarge"
        • "m2.2xlarge"
        • "m2.4xlarge"
        • "cr1.8xlarge"
        • "r3.large"
        • "r3.xlarge"
        • "r3.2xlarge"
        • "r3.4xlarge"
        • "r3.8xlarge"
        • "r4.large"
        • "r4.xlarge"
        • "r4.2xlarge"
        • "r4.4xlarge"
        • "r4.8xlarge"
        • "r4.16xlarge"
        • "r5.large"
        • "r5.xlarge"
        • "r5.2xlarge"
        • "r5.4xlarge"
        • "r5.8xlarge"
        • "r5.12xlarge"
        • "r5.16xlarge"
        • "r5.24xlarge"
        • "r5.metal"
        • "r5a.large"
        • "r5a.xlarge"
        • "r5a.2xlarge"
        • "r5a.4xlarge"
        • "r5a.8xlarge"
        • "r5a.12xlarge"
        • "r5a.16xlarge"
        • "r5a.24xlarge"
        • "r5b.large"
        • "r5b.xlarge"
        • "r5b.2xlarge"
        • "r5b.4xlarge"
        • "r5b.8xlarge"
        • "r5b.12xlarge"
        • "r5b.16xlarge"
        • "r5b.24xlarge"
        • "r5b.metal"
        • "r5d.large"
        • "r5d.xlarge"
        • "r5d.2xlarge"
        • "r5d.4xlarge"
        • "r5d.8xlarge"
        • "r5d.12xlarge"
        • "r5d.16xlarge"
        • "r5d.24xlarge"
        • "r5d.metal"
        • "r5ad.large"
        • "r5ad.xlarge"
        • "r5ad.2xlarge"
        • "r5ad.4xlarge"
        • "r5ad.8xlarge"
        • "r5ad.12xlarge"
        • "r5ad.16xlarge"
        • "r5ad.24xlarge"
        • "r6g.metal"
        • "r6g.medium"
        • "r6g.large"
        • "r6g.xlarge"
        • "r6g.2xlarge"
        • "r6g.4xlarge"
        • "r6g.8xlarge"
        • "r6g.12xlarge"
        • "r6g.16xlarge"
        • "r6gd.metal"
        • "r6gd.medium"
        • "r6gd.large"
        • "r6gd.xlarge"
        • "r6gd.2xlarge"
        • "r6gd.4xlarge"
        • "r6gd.8xlarge"
        • "r6gd.12xlarge"
        • "r6gd.16xlarge"
        • "x1.16xlarge"
        • "x1.32xlarge"
        • "x1e.xlarge"
        • "x1e.2xlarge"
        • "x1e.4xlarge"
        • "x1e.8xlarge"
        • "x1e.16xlarge"
        • "x1e.32xlarge"
        • "i2.xlarge"
        • "i2.2xlarge"
        • "i2.4xlarge"
        • "i2.8xlarge"
        • "i3.large"
        • "i3.xlarge"
        • "i3.2xlarge"
        • "i3.4xlarge"
        • "i3.8xlarge"
        • "i3.16xlarge"
        • "i3.metal"
        • "i3en.large"
        • "i3en.xlarge"
        • "i3en.2xlarge"
        • "i3en.3xlarge"
        • "i3en.6xlarge"
        • "i3en.12xlarge"
        • "i3en.24xlarge"
        • "i3en.metal"
        • "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"
        • "c5.large"
        • "c5.xlarge"
        • "c5.2xlarge"
        • "c5.4xlarge"
        • "c5.9xlarge"
        • "c5.12xlarge"
        • "c5.18xlarge"
        • "c5.24xlarge"
        • "c5.metal"
        • "c5a.large"
        • "c5a.xlarge"
        • "c5a.2xlarge"
        • "c5a.4xlarge"
        • "c5a.8xlarge"
        • "c5a.12xlarge"
        • "c5a.16xlarge"
        • "c5a.24xlarge"
        • "c5ad.large"
        • "c5ad.xlarge"
        • "c5ad.2xlarge"
        • "c5ad.4xlarge"
        • "c5ad.8xlarge"
        • "c5ad.12xlarge"
        • "c5ad.16xlarge"
        • "c5ad.24xlarge"
        • "c5d.large"
        • "c5d.xlarge"
        • "c5d.2xlarge"
        • "c5d.4xlarge"
        • "c5d.9xlarge"
        • "c5d.12xlarge"
        • "c5d.18xlarge"
        • "c5d.24xlarge"
        • "c5d.metal"
        • "c5n.large"
        • "c5n.xlarge"
        • "c5n.2xlarge"
        • "c5n.4xlarge"
        • "c5n.9xlarge"
        • "c5n.18xlarge"
        • "c5n.metal"
        • "c6g.metal"
        • "c6g.medium"
        • "c6g.large"
        • "c6g.xlarge"
        • "c6g.2xlarge"
        • "c6g.4xlarge"
        • "c6g.8xlarge"
        • "c6g.12xlarge"
        • "c6g.16xlarge"
        • "c6gd.metal"
        • "c6gd.medium"
        • "c6gd.large"
        • "c6gd.xlarge"
        • "c6gd.2xlarge"
        • "c6gd.4xlarge"
        • "c6gd.8xlarge"
        • "c6gd.12xlarge"
        • "c6gd.16xlarge"
        • "c6gn.medium"
        • "c6gn.large"
        • "c6gn.xlarge"
        • "c6gn.2xlarge"
        • "c6gn.4xlarge"
        • "c6gn.8xlarge"
        • "c6gn.12xlarge"
        • "c6gn.16xlarge"
        • "cc1.4xlarge"
        • "cc2.8xlarge"
        • "g2.2xlarge"
        • "g2.8xlarge"
        • "g3.4xlarge"
        • "g3.8xlarge"
        • "g3.16xlarge"
        • "g3s.xlarge"
        • "g4ad.xlarge"
        • "g4ad.2xlarge"
        • "g4ad.4xlarge"
        • "g4ad.8xlarge"
        • "g4ad.16xlarge"
        • "g4dn.xlarge"
        • "g4dn.2xlarge"
        • "g4dn.4xlarge"
        • "g4dn.8xlarge"
        • "g4dn.12xlarge"
        • "g4dn.16xlarge"
        • "g4dn.metal"
        • "cg1.4xlarge"
        • "p2.xlarge"
        • "p2.8xlarge"
        • "p2.16xlarge"
        • "p3.2xlarge"
        • "p3.8xlarge"
        • "p3.16xlarge"
        • "p3dn.24xlarge"
        • "p4d.24xlarge"
        • "d2.xlarge"
        • "d2.2xlarge"
        • "d2.4xlarge"
        • "d2.8xlarge"
        • "d3.xlarge"
        • "d3.2xlarge"
        • "d3.4xlarge"
        • "d3.8xlarge"
        • "d3en.xlarge"
        • "d3en.2xlarge"
        • "d3en.4xlarge"
        • "d3en.6xlarge"
        • "d3en.8xlarge"
        • "d3en.12xlarge"
        • "dl1.24xlarge"
        • "f1.2xlarge"
        • "f1.4xlarge"
        • "f1.16xlarge"
        • "m5.large"
        • "m5.xlarge"
        • "m5.2xlarge"
        • "m5.4xlarge"
        • "m5.8xlarge"
        • "m5.12xlarge"
        • "m5.16xlarge"
        • "m5.24xlarge"
        • "m5.metal"
        • "m5a.large"
        • "m5a.xlarge"
        • "m5a.2xlarge"
        • "m5a.4xlarge"
        • "m5a.8xlarge"
        • "m5a.12xlarge"
        • "m5a.16xlarge"
        • "m5a.24xlarge"
        • "m5d.large"
        • "m5d.xlarge"
        • "m5d.2xlarge"
        • "m5d.4xlarge"
        • "m5d.8xlarge"
        • "m5d.12xlarge"
        • "m5d.16xlarge"
        • "m5d.24xlarge"
        • "m5d.metal"
        • "m5ad.large"
        • "m5ad.xlarge"
        • "m5ad.2xlarge"
        • "m5ad.4xlarge"
        • "m5ad.8xlarge"
        • "m5ad.12xlarge"
        • "m5ad.16xlarge"
        • "m5ad.24xlarge"
        • "m5zn.large"
        • "m5zn.xlarge"
        • "m5zn.2xlarge"
        • "m5zn.3xlarge"
        • "m5zn.6xlarge"
        • "m5zn.12xlarge"
        • "m5zn.metal"
        • "h1.2xlarge"
        • "h1.4xlarge"
        • "h1.8xlarge"
        • "h1.16xlarge"
        • "z1d.large"
        • "z1d.xlarge"
        • "z1d.2xlarge"
        • "z1d.3xlarge"
        • "z1d.6xlarge"
        • "z1d.12xlarge"
        • "z1d.metal"
        • "u-6tb1.56xlarge"
        • "u-6tb1.112xlarge"
        • "u-9tb1.112xlarge"
        • "u-12tb1.112xlarge"
        • "u-6tb1.metal"
        • "u-9tb1.metal"
        • "u-12tb1.metal"
        • "u-18tb1.metal"
        • "u-24tb1.metal"
        • "a1.medium"
        • "a1.large"
        • "a1.xlarge"
        • "a1.2xlarge"
        • "a1.4xlarge"
        • "a1.metal"
        • "m5dn.large"
        • "m5dn.xlarge"
        • "m5dn.2xlarge"
        • "m5dn.4xlarge"
        • "m5dn.8xlarge"
        • "m5dn.12xlarge"
        • "m5dn.16xlarge"
        • "m5dn.24xlarge"
        • "m5dn.metal"
        • "m5n.large"
        • "m5n.xlarge"
        • "m5n.2xlarge"
        • "m5n.4xlarge"
        • "m5n.8xlarge"
        • "m5n.12xlarge"
        • "m5n.16xlarge"
        • "m5n.24xlarge"
        • "m5n.metal"
        • "r5dn.large"
        • "r5dn.xlarge"
        • "r5dn.2xlarge"
        • "r5dn.4xlarge"
        • "r5dn.8xlarge"
        • "r5dn.12xlarge"
        • "r5dn.16xlarge"
        • "r5dn.24xlarge"
        • "r5dn.metal"
        • "r5n.large"
        • "r5n.xlarge"
        • "r5n.2xlarge"
        • "r5n.4xlarge"
        • "r5n.8xlarge"
        • "r5n.12xlarge"
        • "r5n.16xlarge"
        • "r5n.24xlarge"
        • "r5n.metal"
        • "inf1.xlarge"
        • "inf1.2xlarge"
        • "inf1.6xlarge"
        • "inf1.24xlarge"
        • "m6g.metal"
        • "m6g.medium"
        • "m6g.large"
        • "m6g.xlarge"
        • "m6g.2xlarge"
        • "m6g.4xlarge"
        • "m6g.8xlarge"
        • "m6g.12xlarge"
        • "m6g.16xlarge"
        • "m6gd.metal"
        • "m6gd.medium"
        • "m6gd.large"
        • "m6gd.xlarge"
        • "m6gd.2xlarge"
        • "m6gd.4xlarge"
        • "m6gd.8xlarge"
        • "m6gd.12xlarge"
        • "m6gd.16xlarge"
        • "m6i.large"
        • "m6i.xlarge"
        • "m6i.2xlarge"
        • "m6i.4xlarge"
        • "m6i.8xlarge"
        • "m6i.12xlarge"
        • "m6i.16xlarge"
        • "m6i.24xlarge"
        • "m6i.32xlarge"
        • "mac1.metal"
        • "x2gd.medium"
        • "x2gd.large"
        • "x2gd.xlarge"
        • "x2gd.2xlarge"
        • "x2gd.4xlarge"
        • "x2gd.8xlarge"
        • "x2gd.12xlarge"
        • "x2gd.16xlarge"
        • "x2gd.metal"
        • "vt1.3xlarge"
        • "vt1.6xlarge"
        • "vt1.24xlarge"
      • InstancePlatform — (String)

        The type of operating system for which the Capacity Reservation Fleet reserves capacity.

        Possible values include:
        • "Linux/UNIX"
        • "Red Hat Enterprise Linux"
        • "SUSE Linux"
        • "Windows"
        • "Windows with SQL Server"
        • "Windows with SQL Server Enterprise"
        • "Windows with SQL Server Standard"
        • "Windows with SQL Server Web"
        • "Linux with SQL Server Standard"
        • "Linux with SQL Server Web"
        • "Linux with SQL Server Enterprise"
      • Weight — (Float)

        The number of capacity units provided by the specified instance type. This value, together with the total target capacity that you specify for the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see Total target capacity in the Amazon EC2 User Guide.

      • AvailabilityZone — (String)

        The Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.

      • AvailabilityZoneId — (String)

        The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.

      • EbsOptimized — (Boolean)

        Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types. 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 EBS-optimized instance types.

      • Priority — (Integer)

        The priority to assign to the instance type. This value is used to determine which of the instance types specified for the Fleet should be prioritized for use. A lower value indicates a high priority. For more information, see Instance type priority in the Amazon EC2 User Guide.

    • Tenancy — (String)

      Indicates the tenancy of the Capacity Reservation Fleet. All Capacity Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet can have one of the following tenancy settings:

      • default - The Capacity Reservation Fleet is created on hardware that is shared with other Amazon Web Services accounts.

      • dedicated - The Capacity Reservations are created on single-tenant hardware that is dedicated to a single Amazon Web Services account.

      Possible values include:
      • "default"
    • TotalTargetCapacity — (Integer)

      The total number of capacity units to be reserved by the Capacity Reservation Fleet. This value, together with the instance type weights that you assign to each instance type used by the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see Total target capacity in the Amazon EC2 User Guide.

    • EndDate — (Date)

      The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation Fleet expires, its state changes to expired and all of the Capacity Reservations in the Fleet expire.

      The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation Fleet is guaranteed to expire between 13:30:55 and 14:30:55 on 5/31/2019.

    • InstanceMatchCriteria — (String)

      Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.

      Currently, Capacity Reservation Fleets support open instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.

      Possible values include:
      • "open"
    • TagSpecifications — (Array<map>)

      The tags to assign to the Capacity Reservation Fleet. The tags are automatically assigned to the Capacity Reservations in the Fleet.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • CapacityReservationFleetId — (String)

        The ID of the Capacity Reservation Fleet.

      • State — (String)

        The status of the Capacity Reservation Fleet.

        Possible values include:
        • "submitted"
        • "modifying"
        • "active"
        • "partially_fulfilled"
        • "expiring"
        • "expired"
        • "cancelling"
        • "cancelled"
        • "failed"
      • TotalTargetCapacity — (Integer)

        The total number of capacity units for which the Capacity Reservation Fleet reserves capacity.

      • TotalFulfilledCapacity — (Float)

        The requested capacity units that have been successfully reserved.

      • InstanceMatchCriteria — (String)

        The instance matching criteria for the Capacity Reservation Fleet.

        Possible values include:
        • "open"
      • AllocationStrategy — (String)

        The allocation strategy used by the Capacity Reservation Fleet.

      • CreateTime — (Date)

        The date and time at which the Capacity Reservation Fleet was created.

      • EndDate — (Date)

        The date and time at which the Capacity Reservation Fleet expires.

      • Tenancy — (String)

        Indicates the tenancy of Capacity Reservation Fleet.

        Possible values include:
        • "default"
      • FleetCapacityReservations — (Array<map>)

        Information about the individual Capacity Reservations in the Capacity Reservation Fleet.

        • CapacityReservationId — (String)

          The ID of the Capacity Reservation.

        • AvailabilityZoneId — (String)

          The ID of the Availability Zone in which the Capacity Reservation reserves capacity.

        • InstanceType — (String)

          The instance type for which the Capacity Reservation reserves capacity.

          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • InstancePlatform — (String)

          The type of operating system for which the Capacity Reservation reserves capacity.

          Possible values include:
          • "Linux/UNIX"
          • "Red Hat Enterprise Linux"
          • "SUSE Linux"
          • "Windows"
          • "Windows with SQL Server"
          • "Windows with SQL Server Enterprise"
          • "Windows with SQL Server Standard"
          • "Windows with SQL Server Web"
          • "Linux with SQL Server Standard"
          • "Linux with SQL Server Web"
          • "Linux with SQL Server Enterprise"
        • AvailabilityZone — (String)

          The Availability Zone in which the Capacity Reservation reserves capacity.

        • TotalInstanceCount — (Integer)

          The total number of instances for which the Capacity Reservation reserves capacity.

        • FulfilledCapacity — (Float)

          The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target capacity in the Amazon EC2 User Guide.

        • EbsOptimized — (Boolean)

          Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.

        • CreateDate — (Date)

          The date and time at which the Capacity Reservation was created.

        • Weight — (Float)

          The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type weight in the Amazon EC2 User Guide.

        • Priority — (Integer)

          The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type priority in the Amazon EC2 User Guide.

      • Tags — (Array<map>)

        The tags assigned to the Capacity Reservation Fleet.

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

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

Creates a carrier gateway. For more information about carrier gateways, see Carrier gateways in the Amazon Web Services Wavelength Developer Guide.

Service Reference:

Examples:

Calling the createCarrierGateway operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createCarrierGateway(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: {})
    • VpcId — (String)

      The ID of the VPC to associate with the carrier gateway.

    • TagSpecifications — (Array<map>)

      The tags to associate with the carrier gateway.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

    • ClientToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.

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:

      • CarrierGateway — (map)

        Information about the carrier gateway.

        • CarrierGatewayId — (String)

          The ID of the carrier gateway.

        • VpcId — (String)

          The ID of the VPC associated with the carrier gateway.

        • State — (String)

          The state of the carrier gateway.

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

          The Amazon Web Services account ID of the owner of the carrier gateway.

        • Tags — (Array<map>)

          The tags assigned to the carrier 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.

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

Creates a Client VPN endpoint. A Client VPN endpoint is the resource you create and configure to enable and manage client VPN sessions. It is the destination endpoint at which all client VPN sessions are terminated.

Service Reference:

Examples:

Calling the createClientVpnEndpoint operation

var params = {
  AuthenticationOptions: [ /* required */
    {
      ActiveDirectory: {
        DirectoryId: 'STRING_VALUE'
      },
      FederatedAuthentication: {
        SAMLProviderArn: 'STRING_VALUE',
        SelfServiceSAMLProviderArn: 'STRING_VALUE'
      },
      MutualAuthentication: {
        ClientRootCertificateChainArn: 'STRING_VALUE'
      },
      Type: certificate-authentication | directory-service-authentication | federated-authentication
    },
    /* more items */
  ],
  ClientCidrBlock: 'STRING_VALUE', /* required */
  ConnectionLogOptions: { /* required */
    CloudwatchLogGroup: 'STRING_VALUE',
    CloudwatchLogStream: 'STRING_VALUE',
    Enabled: true || false
  },
  ServerCertificateArn: 'STRING_VALUE', /* required */
  ClientConnectOptions: {
    Enabled: true || false,
    LambdaFunctionArn: 'STRING_VALUE'
  },
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DnsServers: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  SecurityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  SelfServicePortal: enabled | disabled,
  SplitTunnel: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  TransportProtocol: tcp | udp,
  VpcId: 'STRING_VALUE',
  VpnPort: 'NUMBER_VALUE'
};
ec2.createClientVpnEndpoint(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: {})
    • ClientCidrBlock — (String)

      The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.

    • ServerCertificateArn — (String)

      The ARN of the server certificate. For more information, see the Certificate Manager User Guide.

    • AuthenticationOptions — (Array<map>)

      Information about the authentication method to be used to authenticate clients.

      • Type — (String)

        The type of client authentication to be used.

        Possible values include:
        • "certificate-authentication"
        • "directory-service-authentication"
        • "federated-authentication"
      • ActiveDirectory — (map)

        Information about the Active Directory to be used, if applicable. You must provide this information if Type is directory-service-authentication.

        • DirectoryId — (String)

          The ID of the Active Directory to be used for authentication.

      • MutualAuthentication — (map)

        Information about the authentication certificates to be used, if applicable. You must provide this information if Type is certificate-authentication.

        • ClientRootCertificateChainArn — (String)

          The ARN of the client certificate. The certificate must be signed by a certificate authority (CA) and it must be provisioned in Certificate Manager (ACM).

      • FederatedAuthentication — (map)

        Information about the IAM SAML identity provider to be used, if applicable. You must provide this information if Type is federated-authentication.

        • SAMLProviderArn — (String)

          The Amazon Resource Name (ARN) of the IAM SAML identity provider.

        • SelfServiceSAMLProviderArn — (String)

          The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.

    • ConnectionLogOptions — (map)

      Information about the client connection logging options.

      If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:

      • Client connection requests

      • Client connection results (successful and unsuccessful)

      • Reasons for unsuccessful client connection requests

      • Client connection termination time

      • Enabled — (Boolean)

        Indicates whether connection logging is enabled.

      • CloudwatchLogGroup — (String)

        The name of the CloudWatch Logs log group. Required if connection logging is enabled.

      • CloudwatchLogStream — (String)

        The name of the CloudWatch Logs log stream to which the connection data is published.

    • DnsServers — (Array<String>)

      Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS server.

    • TransportProtocol — (String)

      The transport protocol to be used by the VPN session.

      Default value: udp

      Possible values include:
      • "tcp"
      • "udp"
    • VpnPort — (Integer)

      The port number to assign to the Client VPN endpoint for TCP and UDP traffic.

      Valid Values: 443 | 1194

      Default Value: 443

    • Description — (String)

      A brief description of the Client VPN endpoint.

    • SplitTunnel — (Boolean)

      Indicates whether split-tunnel is enabled on the Client VPN endpoint.

      By default, split-tunnel on a VPN endpoint is disabled.

      For information about split-tunnel VPN endpoints, see Split-tunnel Client VPN endpoint in the Client VPN Administrator 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.

    • ClientToken — (String)

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

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

      The tags to apply to the Client VPN endpoint during creation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • SecurityGroupIds — (Array<String>)

      The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.

    • VpcId — (String)

      The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.

    • SelfServicePortal — (String)

      Specify whether to enable the self-service portal for the Client VPN endpoint.

      Default Value: enabled

      Possible values include:
      • "enabled"
      • "disabled"
    • ClientConnectOptions — (map)

      The options for managing connection authorization for new client connections.

      • Enabled — (Boolean)

        Indicates whether client connect options are enabled. The default is false (not enabled).

      • LambdaFunctionArn — (String)

        The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.

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:

      • ClientVpnEndpointId — (String)

        The ID of the Client VPN endpoint.

      • Status — (map)

        The current state of the Client VPN endpoint.

        • Code — (String)

          The state of the Client VPN endpoint. Possible states include:

          • pending-associate - The Client VPN endpoint has been created but no target networks have been associated. The Client VPN endpoint cannot accept connections.

          • available - The Client VPN endpoint has been created and a target network has been associated. The Client VPN endpoint can accept connections.

          • deleting - The Client VPN endpoint is being deleted. The Client VPN endpoint cannot accept connections.

          • deleted - The Client VPN endpoint has been deleted. The Client VPN endpoint cannot accept connections.

          Possible values include:
          • "pending-associate"
          • "available"
          • "deleting"
          • "deleted"
        • Message — (String)

          A message about the status of the Client VPN endpoint.

      • DnsName — (String)

        The DNS name to be used by clients when establishing their VPN session.

Returns:

  • (AWS.Request)

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

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

Adds a route to a network to a Client VPN endpoint. Each Client VPN endpoint has a route table that describes the available destination network routes. Each route in the route table specifies the path for traffic to specific resources or networks.

Service Reference:

Examples:

Calling the createClientVpnRoute operation

var params = {
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  DestinationCidrBlock: 'STRING_VALUE', /* required */
  TargetVpcSubnetId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DryRun: true || false
};
ec2.createClientVpnRoute(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint to which to add the route.

    • DestinationCidrBlock — (String)

      The IPv4 address range, in CIDR notation, of the route destination. For example:

      • To add a route for Internet access, enter 0.0.0.0/0

      • To add a route for a peered VPC, enter the peered VPC's IPv4 CIDR range

      • To add a route for an on-premises network, enter the Amazon Web Services Site-to-Site VPN connection's IPv4 CIDR range

      • To add a route for the local network, enter the client CIDR range

    • TargetVpcSubnetId — (String)

      The ID of the subnet through which you want to route traffic. The specified subnet must be an existing target network of the Client VPN endpoint.

      Alternatively, if you're adding a route for the local network, specify local.

    • Description — (String)

      A brief description of the route.

    • ClientToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.
    • 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:

      • Status — (map)

        The current state of the route.

        • Code — (String)

          The state of the Client VPN endpoint route.

          Possible values include:
          • "creating"
          • "active"
          • "failed"
          • "deleting"
        • Message — (String)

          A message about the status of the Client VPN endpoint route, if applicable.

Returns:

  • (AWS.Request)

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

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

Provides information to Amazon Web Services about your VPN customer gateway device. The customer gateway is the appliance at your end of the VPN connection. (The device on the Amazon Web Services 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 can 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 4-byte ASN numbers in the range of 1 - 2147483647, with the exception of the following:
  • 7224 - reserved in the us-east-1 Region
  • 9059 - reserved in the eu-west-1 Region
  • 17943 - reserved in the ap-southeast-1 Region
  • 10124 - reserved in the ap-northeast-1 Region

For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.

To create more than one customer gateway with the same VPN type, IP address, and BGP ASN, specify a unique device name for each customer gateway. Identical requests return information about the existing customer gateway and do not create new customer gateways.

Service Reference:

Examples:

To create a customer gateway


/* This example creates a customer gateway with the specified IP address for its outside interface. */

 var params = {
  BgpAsn: 65534, 
  PublicIp: "12.1.2.3", 
  Type: "ipsec.1"
 };
 ec2.createCustomerGateway(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    CustomerGateway: {
     BgpAsn: "65534", 
     CustomerGatewayId: "cgw-0e11f167", 
     IpAddress: "12.1.2.3", 
     State: "available", 
     Type: "ipsec.1"
    }
   }
   */
 });

Calling the createCustomerGateway operation

var params = {
  BgpAsn: 'NUMBER_VALUE', /* required */
  Type: ipsec.1, /* required */
  CertificateArn: 'STRING_VALUE',
  DeviceName: 'STRING_VALUE',
  DryRun: true || false,
  PublicIp: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • BgpAsn — (Integer)

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

      Default: 65000

    • PublicIp — (String)

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

    • CertificateArn — (String)

      The Amazon Resource Name (ARN) for the customer gateway certificate.

    • Type — (String)

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

      Possible values include:
      • "ipsec.1"
    • TagSpecifications — (Array<map>)

      The tags to apply to the customer gateway.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • DeviceName — (String)

      A name for the customer gateway device.

      Length Constraints: Up to 255 characters.

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

      • CustomerGateway — (map)

        Information about the customer gateway.

        • BgpAsn — (String)

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

        • CustomerGatewayId — (String)

          The ID of the customer gateway.

        • IpAddress — (String)

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

        • CertificateArn — (String)

          The Amazon Resource Name (ARN) for the customer gateway certificate.

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

        • DeviceName — (String)

          The name of customer gateway device.

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

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

Creates a default subnet with a size /20 IPv4 CIDR block in the specified Availability Zone in your default VPC. You can have only one default subnet per Availability Zone. For more information, see Creating a default subnet in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

Calling the createDefaultSubnet operation

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

      The Availability Zone in which to create the default subnet.

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

      • Subnet — (map)

        Information about the subnet.

        • AvailabilityZone — (String)

          The Availability Zone of the subnet.

        • AvailabilityZoneId — (String)

          The AZ ID of the subnet.

        • AvailableIpAddressCount — (Integer)

          The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.

        • CidrBlock — (String)

          The IPv4 CIDR block assigned to 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 IPv4 address.

        • MapCustomerOwnedIpOnLaunch — (Boolean)

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives a customer-owned IPv4 address.

        • CustomerOwnedIpv4Pool — (String)

          The customer-owned IPv4 address pool associated with the subnet.

        • State — (String)

          The current state of the subnet.

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

          The ID of the subnet.

        • VpcId — (String)

          The ID of the VPC the subnet is in.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the subnet.

        • AssignIpv6AddressOnCreation — (Boolean)

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives an IPv6 address.

        • Ipv6CidrBlockAssociationSet — (Array<map>)

          Information about the IPv6 CIDR blocks associated with the subnet.

          • AssociationId — (String)

            The association ID for the CIDR block.

          • Ipv6CidrBlock — (String)

            The IPv6 CIDR block.

          • Ipv6CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of a CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

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

        • SubnetArn — (String)

          The Amazon Resource Name (ARN) of the subnet.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

Returns:

  • (AWS.Request)

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

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

Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet in each Availability Zone. For more information about the components of a default VPC, see Default VPC and default subnets in the Amazon Virtual Private Cloud User Guide. You cannot specify the components of the default VPC yourself.

If you deleted your previous default VPC, you can create a default VPC. You cannot have more than one default VPC per Region.

If your account supports EC2-Classic, you cannot use this action to create a default VPC in a Region that supports EC2-Classic. If you want a default VPC in a Region that supports EC2-Classic, see "I really want a default VPC for my existing EC2 account. Is that possible?" in the Default VPCs FAQ.

Service Reference:

Examples:

Calling the createDefaultVpc operation

var params = {
  DryRun: true || false
};
ec2.createDefaultVpc(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:

      • Vpc — (map)

        Information about the VPC.

        • CidrBlock — (String)

          The primary IPv4 CIDR block for the VPC.

        • DhcpOptionsId — (String)

          The ID of the set of DHCP options you've associated with the VPC.

        • State — (String)

          The current state of the VPC.

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

          The ID of the VPC.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC.

        • InstanceTenancy — (String)

          The allowed tenancy of instances launched into the VPC.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • Ipv6CidrBlockAssociationSet — (Array<map>)

          Information about the IPv6 CIDR blocks associated with the VPC.

          • AssociationId — (String)

            The association ID for the IPv6 CIDR block.

          • Ipv6CidrBlock — (String)

            The IPv6 CIDR block.

          • Ipv6CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of the CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

          • NetworkBorderGroup — (String)

            The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1.

          • Ipv6Pool — (String)

            The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

        • CidrBlockAssociationSet — (Array<map>)

          Information about the IPv4 CIDR blocks associated with the VPC.

          • AssociationId — (String)

            The association ID for the IPv4 CIDR block.

          • CidrBlock — (String)

            The IPv4 CIDR block.

          • CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of the CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

        • IsDefault — (Boolean)

          Indicates whether the VPC is the default 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.

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. To have your instance 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, ExampleCompany.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, see DHCP options sets in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

To create a DHCP options set


/* This example creates a DHCP options set. */

 var params = {
  DhcpConfigurations: [
     {
    Key: "domain-name-servers", 
    Values: [
       "10.2.5.1", 
       "10.2.5.2"
    ]
   }
  ]
 };
 ec2.createDhcpOptions(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    DhcpOptions: {
     DhcpConfigurations: [
        {
       Key: "domain-name-servers", 
       Values: [
          {
         Value: "10.2.5.2"
        }, 
          {
         Value: "10.2.5.1"
        }
       ]
      }
     ], 
     DhcpOptionsId: "dopt-d9070ebb"
    }
   }
   */
 });

Calling the createDhcpOptions operation

var params = {
  DhcpConfigurations: [ /* required */
    {
      Key: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • DhcpConfigurations — (Array<map>)

      A DHCP configuration option.

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

      The tags to assign to the DHCP option.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • DhcpOptions — (map)

        A 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. The value is case-sensitive.

        • DhcpOptionsId — (String)

          The ID of the set of DHCP options.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the DHCP options set.

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

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

[IPv6 only] Creates an egress-only internet gateway for your VPC. An egress-only internet gateway is used to enable outbound communication over IPv6 from instances in your VPC to the internet, and prevents hosts outside of your VPC from initiating an IPv6 connection with your instance.

Service Reference:

Examples:

Calling the createEgressOnlyInternetGateway operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createEgressOnlyInternetGateway(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClientToken — (String)

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

    • 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 for which to create the egress-only internet gateway.

    • TagSpecifications — (Array<map>)

      The tags to assign to the egress-only internet gateway.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • ClientToken — (String)

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

      • EgressOnlyInternetGateway — (map)

        Information about the egress-only internet gateway.

        • Attachments — (Array<map>)

          Information about the attachment of the egress-only internet gateway.

          • State — (String)

            The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
          • VpcId — (String)

            The ID of the VPC.

        • EgressOnlyInternetGatewayId — (String)

          The ID of the egress-only internet gateway.

        • Tags — (Array<map>)

          The tags assigned to the egress-only 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.

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

Launches an EC2 Fleet.

You can create a single EC2 Fleet that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.

For more information, see Launching an EC2 Fleet in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the createFleet operation

var params = {
  LaunchTemplateConfigs: [ /* required */
    {
      LaunchTemplateSpecification: {
        LaunchTemplateId: 'STRING_VALUE',
        LaunchTemplateName: 'STRING_VALUE',
        Version: 'STRING_VALUE'
      },
      Overrides: [
        {
          AvailabilityZone: 'STRING_VALUE',
          InstanceRequirements: {
            MemoryMiB: { /* required */
              Min: 'NUMBER_VALUE', /* required */
              Max: 'NUMBER_VALUE'
            },
            VCpuCount: { /* required */
              Min: 'NUMBER_VALUE', /* required */
              Max: 'NUMBER_VALUE'
            },
            AcceleratorCount: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            AcceleratorManufacturers: [
              nvidia | amd | amazon-web-services | xilinx,
              /* more items */
            ],
            AcceleratorNames: [
              a100 | v100 | k80 | t4 | m60 | radeon-pro-v520 | vu9p,
              /* more items */
            ],
            AcceleratorTotalMemoryMiB: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            AcceleratorTypes: [
              gpu | fpga | inference,
              /* more items */
            ],
            BareMetal: included | required | excluded,
            BaselineEbsBandwidthMbps: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            BurstablePerformance: included | required | excluded,
            CpuManufacturers: [
              intel | amd | amazon-web-services,
              /* more items */
            ],
            ExcludedInstanceTypes: [
              'STRING_VALUE',
              /* more items */
            ],
            InstanceGenerations: [
              current | previous,
              /* more items */
            ],
            LocalStorage: included | required | excluded,
            LocalStorageTypes: [
              hdd | ssd,
              /* more items */
            ],
            MemoryGiBPerVCpu: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            NetworkInterfaceCount: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            OnDemandMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
            RequireHibernateSupport: true || false,
            SpotMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
            TotalLocalStorageGB: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            }
          },
          InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
          MaxPrice: 'STRING_VALUE',
          Placement: {
            Affinity: 'STRING_VALUE',
            AvailabilityZone: 'STRING_VALUE',
            GroupName: 'STRING_VALUE',
            HostId: 'STRING_VALUE',
            HostResourceGroupArn: 'STRING_VALUE',
            PartitionNumber: 'NUMBER_VALUE',
            SpreadDomain: 'STRING_VALUE',
            Tenancy: default | dedicated | host
          },
          Priority: 'NUMBER_VALUE',
          SubnetId: 'STRING_VALUE',
          WeightedCapacity: 'NUMBER_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  TargetCapacitySpecification: { /* required */
    TotalTargetCapacity: 'NUMBER_VALUE', /* required */
    DefaultTargetCapacityType: spot | on-demand,
    OnDemandTargetCapacity: 'NUMBER_VALUE',
    SpotTargetCapacity: 'NUMBER_VALUE',
    TargetCapacityUnitType: vcpu | memory-mib | units
  },
  ClientToken: 'STRING_VALUE',
  Context: 'STRING_VALUE',
  DryRun: true || false,
  ExcessCapacityTerminationPolicy: no-termination | termination,
  OnDemandOptions: {
    AllocationStrategy: lowest-price | prioritized,
    CapacityReservationOptions: {
      UsageStrategy: use-capacity-reservations-first
    },
    MaxTotalPrice: 'STRING_VALUE',
    MinTargetCapacity: 'NUMBER_VALUE',
    SingleAvailabilityZone: true || false,
    SingleInstanceType: true || false
  },
  ReplaceUnhealthyInstances: true || false,
  SpotOptions: {
    AllocationStrategy: lowest-price | diversified | capacity-optimized | capacity-optimized-prioritized,
    InstanceInterruptionBehavior: hibernate | stop | terminate,
    InstancePoolsToUseCount: 'NUMBER_VALUE',
    MaintenanceStrategies: {
      CapacityRebalance: {
        ReplacementStrategy: launch | launch-before-terminate,
        TerminationDelay: 'NUMBER_VALUE'
      }
    },
    MaxTotalPrice: 'STRING_VALUE',
    MinTargetCapacity: 'NUMBER_VALUE',
    SingleAvailabilityZone: true || false,
    SingleInstanceType: true || false
  },
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  TerminateInstancesWithExpiration: true || false,
  Type: request | maintain | instant,
  ValidFrom: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  ValidUntil: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
ec2.createFleet(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.

    • ClientToken — (String)

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

    • SpotOptions — (map)

      Describes the configuration of Spot Instances in an EC2 Fleet.

      • AllocationStrategy — (String)

        Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.

        If the allocation strategy is lowest-price, EC2 Fleet launches instances from the Spot Instance pools with the lowest price. This is the default allocation strategy.

        If the allocation strategy is diversified, EC2 Fleet launches instances from all of the Spot Instance pools that you specify.

        If the allocation strategy is capacity-optimized (recommended), EC2 Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacity-optimized-prioritized. Set a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides. You can assign the same priority to different LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacity-optimized-prioritized is supported only if your fleet uses a launch template. Note that if the On-Demand AllocationStrategy is set to prioritized, the same priority is applied when fulfilling On-Demand capacity.

        Possible values include:
        • "lowest-price"
        • "diversified"
        • "capacity-optimized"
        • "capacity-optimized-prioritized"
      • MaintenanceStrategies — (map)

        The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.

        • CapacityRebalance — (map)

          The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.

          • ReplacementStrategy — (String)

            The replacement strategy to use. Only available for fleets of type maintain.

            launch - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.

            launch-before-terminate - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in TerminationDelay), terminates the instances that received a rebalance notification.

            Possible values include:
            • "launch"
            • "launch-before-terminate"
          • TerminationDelay — (Integer)

            The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.

      • InstanceInterruptionBehavior — (String)

        The behavior when a Spot Instance is interrupted. The default is terminate.

        Possible values include:
        • "hibernate"
        • "stop"
        • "terminate"
      • InstancePoolsToUseCount — (Integer)

        The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot AllocationStrategy is set to lowest-price. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

        Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.

      • SingleInstanceType — (Boolean)

        Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet. Supported only for fleets of type instant.

      • SingleAvailabilityZone — (Boolean)

        Indicates that the fleet launches all Spot Instances into a single Availability Zone. Supported only for fleets of type instant.

      • MinTargetCapacity — (Integer)

        The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.

      • MaxTotalPrice — (String)

        The maximum amount per hour for Spot Instances that you're willing to pay.

    • OnDemandOptions — (map)

      Describes the configuration of On-Demand Instances in an EC2 Fleet.

      • AllocationStrategy — (String)

        The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify lowest-price, EC2 Fleet uses price to determine the order, launching the lowest price first. If you specify prioritized, EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first. If you do not specify a value, EC2 Fleet defaults to lowest-price.

        Possible values include:
        • "lowest-price"
        • "prioritized"
      • CapacityReservationOptions — (map)

        The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity. Supported only for fleets of type instant.

        • UsageStrategy — (String)

          Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

          If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (lowest-price or prioritized) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (lowest-price or prioritized).

          If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.

          Possible values include:
          • "use-capacity-reservations-first"
      • SingleInstanceType — (Boolean)

        Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet. Supported only for fleets of type instant.

      • SingleAvailabilityZone — (Boolean)

        Indicates that the fleet launches all On-Demand Instances into a single Availability Zone. Supported only for fleets of type instant.

      • MinTargetCapacity — (Integer)

        The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.

      • MaxTotalPrice — (String)

        The maximum amount per hour for On-Demand Instances that you're willing to pay.

    • ExcessCapacityTerminationPolicy — (String)

      Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.

      Possible values include:
      • "no-termination"
      • "termination"
    • LaunchTemplateConfigs — (Array<map>)

      The configuration for the EC2 Fleet.

      • LaunchTemplateSpecification — (map)

        The launch template to use. You must specify either the launch template ID or launch template name in the request.

        • LaunchTemplateId — (String)

          The ID of the launch template. If you specify the template ID, you can't specify the template name.

        • LaunchTemplateName — (String)

          The name of the launch template. If you specify the template name, you can't specify the template ID.

        • Version — (String)

          The launch template version number, $Latest, or $Default. You must specify a value, otherwise the request fails.

          If the value is $Latest, Amazon EC2 uses the latest version of the launch template.

          If the value is $Default, Amazon EC2 uses the default version of the launch template.

      • Overrides — (Array<map>)

        Any parameters that you specify override the same parameters in the launch template.

        For fleets of type request and maintain, a maximum of 300 items is allowed across all launch templates.

        • InstanceType — (String)

          The instance type.

          Note: If you specify InstanceTypes, you can't specify InstanceRequirements.
          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • MaxPrice — (String)

          The maximum price per unit hour that you are willing to pay for a Spot Instance.

        • SubnetId — (String)

          The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, subnet-1234abcdeexample1, subnet-0987cdef6example2). A request of type instant can have only one subnet ID.

        • AvailabilityZone — (String)

          The Availability Zone in which to launch the instances.

        • WeightedCapacity — (Float)

          The number of units provided by the specified instance type.

        • Priority — (Float)

          The priority for the launch template override. The highest priority is launched first.

          If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

          If the Spot AllocationStrategy is set to capacity-optimized-prioritized, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

          Valid values are whole numbers starting at 0. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.

        • Placement — (map)

          The location where the instance launched, if applicable.

          • AvailabilityZone — (String)

            The Availability Zone of the instance.

            If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

            This parameter is not supported by CreateFleet.

          • Affinity — (String)

            The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

            This parameter is not supported by CreateFleet.

          • GroupName — (String)

            The name of the placement group the instance is in.

          • PartitionNumber — (Integer)

            The number of the partition the instance is in. Valid only if the placement group strategy is set to partition.

            This parameter is not supported by CreateFleet.

          • HostId — (String)

            The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

            This parameter is not supported by CreateFleet.

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

            This parameter is not supported by CreateFleet.

            T3 instances that use the unlimited CPU credit option do not support host tenancy.

            Possible values include:
            • "default"
            • "dedicated"
            • "host"
          • SpreadDomain — (String)

            Reserved for future use.

            This parameter is not supported by CreateFleet.

          • HostResourceGroupArn — (String)

            The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

            This parameter is not supported by CreateFleet.

        • InstanceRequirements — (map)

          The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

          Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
          • VCpuCountrequired — (map)

            The minimum and maximum number of vCPUs.

            • Minrequired — (Integer)

              The minimum number of vCPUs. To specify no minimum limit, specify 0.

            • Max — (Integer)

              The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

          • MemoryMiBrequired — (map)

            The minimum and maximum amount of memory, in MiB.

            • Minrequired — (Integer)

              The minimum amount of memory, in MiB. To specify no minimum limit, specify 0.

            • Max — (Integer)

              The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

          • CpuManufacturers — (Array<String>)

            The CPU manufacturers to include.

            • For instance types with Intel CPUs, specify intel.

            • For instance types with AMD CPUs, specify amd.

            • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

            Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

            Default: Any manufacturer

          • MemoryGiBPerVCpu — (map)

            The minimum and maximum amount of memory per vCPU, in GiB.

            Default: No minimum or maximum limits

            • Min — (Float)

              The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

            • Max — (Float)

              The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

          • ExcludedInstanceTypes — (Array<String>)

            The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

            For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

            Default: No excluded instance types

          • InstanceGenerations — (Array<String>)

            Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

            For current generation instance types, specify current.

            For previous generation instance types, specify previous.

            Default: Current and previous generation instance types

          • SpotMaxPricePercentageOverLowestPrice — (Integer)

            The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999.

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

            Default: 100

          • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

            The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999.

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

            Default: 20

          • BareMetal — (String)

            Indicates whether bare metal instance types must be included, excluded, or required.

            • To include bare metal instance types, specify included.

            • To require only bare metal instance types, specify required.

            • To exclude bare metal instance types, specify excluded.

            Default: excluded

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • BurstablePerformance — (String)

            Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

            • To include burstable performance instance types, specify included.

            • To require only burstable performance instance types, specify required.

            • To exclude burstable performance instance types, specify excluded.

            Default: excluded

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • RequireHibernateSupport — (Boolean)

            Indicates whether instance types must support hibernation for On-Demand Instances.

            This parameter is not supported for GetSpotPlacementScores.

            Default: false

          • NetworkInterfaceCount — (map)

            The minimum and maximum number of network interfaces.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

            • Max — (Integer)

              The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

          • LocalStorage — (String)

            Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

            • To include instance types with instance store volumes, specify included.

            • To require only instance types with instance store volumes, specify required.

            • To exclude instance types with instance store volumes, specify excluded.

            Default: included

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • LocalStorageTypes — (Array<String>)

            The type of local storage that is required.

            • For instance types with hard disk drive (HDD) storage, specify hdd.

            • For instance types with solid state drive (SDD) storage, specify sdd.

            Default: hdd and sdd

          • TotalLocalStorageGB — (map)

            The minimum and maximum amount of total local storage, in GB.

            Default: No minimum or maximum limits

            • Min — (Float)

              The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

            • Max — (Float)

              The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

          • BaselineEbsBandwidthMbps — (map)

            The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

            • Max — (Integer)

              The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

          • AcceleratorTypes — (Array<String>)

            The accelerator types that must be on the instance type.

            • To include instance types with GPU hardware, specify gpu.

            • To include instance types with FPGA hardware, specify fpga.

            • To include instance types with inference hardware, specify inference.

            Default: Any accelerator type

          • AcceleratorCount — (map)

            The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

            To exclude accelerator-enabled instance types, set Max to 0.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum number of accelerators. To specify no minimum limit, omit this parameter.

            • Max — (Integer)

              The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0.

          • AcceleratorManufacturers — (Array<String>)

            Indicates whether instance types must have accelerators by specific manufacturers.

            • For instance types with NVIDIA devices, specify nvidia.

            • For instance types with AMD devices, specify amd.

            • For instance types with Amazon Web Services devices, specify amazon-web-services.

            • For instance types with Xilinx devices, specify xilinx.

            Default: Any manufacturer

          • AcceleratorNames — (Array<String>)

            The accelerators that must be on the instance type.

            • For instance types with NVIDIA A100 GPUs, specify a100.

            • For instance types with NVIDIA V100 GPUs, specify v100.

            • For instance types with NVIDIA K80 GPUs, specify k80.

            • For instance types with NVIDIA T4 GPUs, specify t4.

            • For instance types with NVIDIA M60 GPUs, specify m60.

            • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

            • For instance types with Xilinx VU9P FPGAs, specify vu9p.

            Default: Any accelerator

          • AcceleratorTotalMemoryMiB — (map)

            The minimum and maximum amount of total accelerator memory, in MiB.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

            • Max — (Integer)

              The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

    • TargetCapacitySpecification — (map)

      The number of units to request.

      • TotalTargetCapacityrequired — (Integer)

        The number of units to request, filled using DefaultTargetCapacityType.

      • OnDemandTargetCapacity — (Integer)

        The number of On-Demand units to request.

      • SpotTargetCapacity — (Integer)

        The number of Spot units to request.

      • DefaultTargetCapacityType — (String)

        The default TotalTargetCapacity, which is either Spot or On-Demand.

        Possible values include:
        • "spot"
        • "on-demand"
      • TargetCapacityUnitType — (String)

        The unit for the target capacity.

        Default: units (translates to number of instances)

        Possible values include:
        • "vcpu"
        • "memory-mib"
        • "units"
    • TerminateInstancesWithExpiration — (Boolean)

      Indicates whether running instances should be terminated when the EC2 Fleet expires.

    • Type — (String)

      The fleet type. The default value is maintain.

      • maintain - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.

      • request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.

      • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

      For more information, see EC2 Fleet request types in the Amazon EC2 User Guide.

      Possible values include:
      • "request"
      • "maintain"
      • "instant"
    • ValidFrom — (Date)

      The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.

    • ValidUntil — (Date)

      The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.

    • ReplaceUnhealthyInstances — (Boolean)

      Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide.

    • TagSpecifications — (Array<map>)

      The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tagging your resources.

      If the fleet type is instant, specify a resource type of fleet to tag the fleet or instance to tag the instances at launch.

      If the fleet type is maintain or request, specify a resource type of fleet to tag the fleet. You cannot specify a resource type of instance. To tag instances at launch, specify the tags in a launch template.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • Context — (String)

      Reserved.

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:

      • FleetId — (String)

        The ID of the EC2 Fleet.

      • Errors — (Array<map>)

        Information about the instances that could not be launched by the fleet. Supported only for fleets of type instant.

        • LaunchTemplateAndOverrides — (map)

          The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.

          • LaunchTemplateSpecification — (map)

            The launch template.

            • LaunchTemplateId — (String)

              The ID of the launch template. If you specify the template ID, you can't specify the template name.

            • LaunchTemplateName — (String)

              The name of the launch template. If you specify the template name, you can't specify the template ID.

            • Version — (String)

              The launch template version number, $Latest, or $Default. You must specify a value, otherwise the request fails.

              If the value is $Latest, Amazon EC2 uses the latest version of the launch template.

              If the value is $Default, Amazon EC2 uses the default version of the launch template.

          • Overrides — (map)

            Any parameters that you specify override the same parameters in the launch template.

            • InstanceType — (String)

              The instance type.

              Note: If you specify InstanceTypes, you can't specify InstanceRequirements.
              Possible values include:
              • "t1.micro"
              • "t2.nano"
              • "t2.micro"
              • "t2.small"
              • "t2.medium"
              • "t2.large"
              • "t2.xlarge"
              • "t2.2xlarge"
              • "t3.nano"
              • "t3.micro"
              • "t3.small"
              • "t3.medium"
              • "t3.large"
              • "t3.xlarge"
              • "t3.2xlarge"
              • "t3a.nano"
              • "t3a.micro"
              • "t3a.small"
              • "t3a.medium"
              • "t3a.large"
              • "t3a.xlarge"
              • "t3a.2xlarge"
              • "t4g.nano"
              • "t4g.micro"
              • "t4g.small"
              • "t4g.medium"
              • "t4g.large"
              • "t4g.xlarge"
              • "t4g.2xlarge"
              • "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"
              • "m4.16xlarge"
              • "m2.xlarge"
              • "m2.2xlarge"
              • "m2.4xlarge"
              • "cr1.8xlarge"
              • "r3.large"
              • "r3.xlarge"
              • "r3.2xlarge"
              • "r3.4xlarge"
              • "r3.8xlarge"
              • "r4.large"
              • "r4.xlarge"
              • "r4.2xlarge"
              • "r4.4xlarge"
              • "r4.8xlarge"
              • "r4.16xlarge"
              • "r5.large"
              • "r5.xlarge"
              • "r5.2xlarge"
              • "r5.4xlarge"
              • "r5.8xlarge"
              • "r5.12xlarge"
              • "r5.16xlarge"
              • "r5.24xlarge"
              • "r5.metal"
              • "r5a.large"
              • "r5a.xlarge"
              • "r5a.2xlarge"
              • "r5a.4xlarge"
              • "r5a.8xlarge"
              • "r5a.12xlarge"
              • "r5a.16xlarge"
              • "r5a.24xlarge"
              • "r5b.large"
              • "r5b.xlarge"
              • "r5b.2xlarge"
              • "r5b.4xlarge"
              • "r5b.8xlarge"
              • "r5b.12xlarge"
              • "r5b.16xlarge"
              • "r5b.24xlarge"
              • "r5b.metal"
              • "r5d.large"
              • "r5d.xlarge"
              • "r5d.2xlarge"
              • "r5d.4xlarge"
              • "r5d.8xlarge"
              • "r5d.12xlarge"
              • "r5d.16xlarge"
              • "r5d.24xlarge"
              • "r5d.metal"
              • "r5ad.large"
              • "r5ad.xlarge"
              • "r5ad.2xlarge"
              • "r5ad.4xlarge"
              • "r5ad.8xlarge"
              • "r5ad.12xlarge"
              • "r5ad.16xlarge"
              • "r5ad.24xlarge"
              • "r6g.metal"
              • "r6g.medium"
              • "r6g.large"
              • "r6g.xlarge"
              • "r6g.2xlarge"
              • "r6g.4xlarge"
              • "r6g.8xlarge"
              • "r6g.12xlarge"
              • "r6g.16xlarge"
              • "r6gd.metal"
              • "r6gd.medium"
              • "r6gd.large"
              • "r6gd.xlarge"
              • "r6gd.2xlarge"
              • "r6gd.4xlarge"
              • "r6gd.8xlarge"
              • "r6gd.12xlarge"
              • "r6gd.16xlarge"
              • "x1.16xlarge"
              • "x1.32xlarge"
              • "x1e.xlarge"
              • "x1e.2xlarge"
              • "x1e.4xlarge"
              • "x1e.8xlarge"
              • "x1e.16xlarge"
              • "x1e.32xlarge"
              • "i2.xlarge"
              • "i2.2xlarge"
              • "i2.4xlarge"
              • "i2.8xlarge"
              • "i3.large"
              • "i3.xlarge"
              • "i3.2xlarge"
              • "i3.4xlarge"
              • "i3.8xlarge"
              • "i3.16xlarge"
              • "i3.metal"
              • "i3en.large"
              • "i3en.xlarge"
              • "i3en.2xlarge"
              • "i3en.3xlarge"
              • "i3en.6xlarge"
              • "i3en.12xlarge"
              • "i3en.24xlarge"
              • "i3en.metal"
              • "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"
              • "c5.large"
              • "c5.xlarge"
              • "c5.2xlarge"
              • "c5.4xlarge"
              • "c5.9xlarge"
              • "c5.12xlarge"
              • "c5.18xlarge"
              • "c5.24xlarge"
              • "c5.metal"
              • "c5a.large"
              • "c5a.xlarge"
              • "c5a.2xlarge"
              • "c5a.4xlarge"
              • "c5a.8xlarge"
              • "c5a.12xlarge"
              • "c5a.16xlarge"
              • "c5a.24xlarge"
              • "c5ad.large"
              • "c5ad.xlarge"
              • "c5ad.2xlarge"
              • "c5ad.4xlarge"
              • "c5ad.8xlarge"
              • "c5ad.12xlarge"
              • "c5ad.16xlarge"
              • "c5ad.24xlarge"
              • "c5d.large"
              • "c5d.xlarge"
              • "c5d.2xlarge"
              • "c5d.4xlarge"
              • "c5d.9xlarge"
              • "c5d.12xlarge"
              • "c5d.18xlarge"
              • "c5d.24xlarge"
              • "c5d.metal"
              • "c5n.large"
              • "c5n.xlarge"
              • "c5n.2xlarge"
              • "c5n.4xlarge"
              • "c5n.9xlarge"
              • "c5n.18xlarge"
              • "c5n.metal"
              • "c6g.metal"
              • "c6g.medium"
              • "c6g.large"
              • "c6g.xlarge"
              • "c6g.2xlarge"
              • "c6g.4xlarge"
              • "c6g.8xlarge"
              • "c6g.12xlarge"
              • "c6g.16xlarge"
              • "c6gd.metal"
              • "c6gd.medium"
              • "c6gd.large"
              • "c6gd.xlarge"
              • "c6gd.2xlarge"
              • "c6gd.4xlarge"
              • "c6gd.8xlarge"
              • "c6gd.12xlarge"
              • "c6gd.16xlarge"
              • "c6gn.medium"
              • "c6gn.large"
              • "c6gn.xlarge"
              • "c6gn.2xlarge"
              • "c6gn.4xlarge"
              • "c6gn.8xlarge"
              • "c6gn.12xlarge"
              • "c6gn.16xlarge"
              • "cc1.4xlarge"
              • "cc2.8xlarge"
              • "g2.2xlarge"
              • "g2.8xlarge"
              • "g3.4xlarge"
              • "g3.8xlarge"
              • "g3.16xlarge"
              • "g3s.xlarge"
              • "g4ad.xlarge"
              • "g4ad.2xlarge"
              • "g4ad.4xlarge"
              • "g4ad.8xlarge"
              • "g4ad.16xlarge"
              • "g4dn.xlarge"
              • "g4dn.2xlarge"
              • "g4dn.4xlarge"
              • "g4dn.8xlarge"
              • "g4dn.12xlarge"
              • "g4dn.16xlarge"
              • "g4dn.metal"
              • "cg1.4xlarge"
              • "p2.xlarge"
              • "p2.8xlarge"
              • "p2.16xlarge"
              • "p3.2xlarge"
              • "p3.8xlarge"
              • "p3.16xlarge"
              • "p3dn.24xlarge"
              • "p4d.24xlarge"
              • "d2.xlarge"
              • "d2.2xlarge"
              • "d2.4xlarge"
              • "d2.8xlarge"
              • "d3.xlarge"
              • "d3.2xlarge"
              • "d3.4xlarge"
              • "d3.8xlarge"
              • "d3en.xlarge"
              • "d3en.2xlarge"
              • "d3en.4xlarge"
              • "d3en.6xlarge"
              • "d3en.8xlarge"
              • "d3en.12xlarge"
              • "dl1.24xlarge"
              • "f1.2xlarge"
              • "f1.4xlarge"
              • "f1.16xlarge"
              • "m5.large"
              • "m5.xlarge"
              • "m5.2xlarge"
              • "m5.4xlarge"
              • "m5.8xlarge"
              • "m5.12xlarge"
              • "m5.16xlarge"
              • "m5.24xlarge"
              • "m5.metal"
              • "m5a.large"
              • "m5a.xlarge"
              • "m5a.2xlarge"
              • "m5a.4xlarge"
              • "m5a.8xlarge"
              • "m5a.12xlarge"
              • "m5a.16xlarge"
              • "m5a.24xlarge"
              • "m5d.large"
              • "m5d.xlarge"
              • "m5d.2xlarge"
              • "m5d.4xlarge"
              • "m5d.8xlarge"
              • "m5d.12xlarge"
              • "m5d.16xlarge"
              • "m5d.24xlarge"
              • "m5d.metal"
              • "m5ad.large"
              • "m5ad.xlarge"
              • "m5ad.2xlarge"
              • "m5ad.4xlarge"
              • "m5ad.8xlarge"
              • "m5ad.12xlarge"
              • "m5ad.16xlarge"
              • "m5ad.24xlarge"
              • "m5zn.large"
              • "m5zn.xlarge"
              • "m5zn.2xlarge"
              • "m5zn.3xlarge"
              • "m5zn.6xlarge"
              • "m5zn.12xlarge"
              • "m5zn.metal"
              • "h1.2xlarge"
              • "h1.4xlarge"
              • "h1.8xlarge"
              • "h1.16xlarge"
              • "z1d.large"
              • "z1d.xlarge"
              • "z1d.2xlarge"
              • "z1d.3xlarge"
              • "z1d.6xlarge"
              • "z1d.12xlarge"
              • "z1d.metal"
              • "u-6tb1.56xlarge"
              • "u-6tb1.112xlarge"
              • "u-9tb1.112xlarge"
              • "u-12tb1.112xlarge"
              • "u-6tb1.metal"
              • "u-9tb1.metal"
              • "u-12tb1.metal"
              • "u-18tb1.metal"
              • "u-24tb1.metal"
              • "a1.medium"
              • "a1.large"
              • "a1.xlarge"
              • "a1.2xlarge"
              • "a1.4xlarge"
              • "a1.metal"
              • "m5dn.large"
              • "m5dn.xlarge"
              • "m5dn.2xlarge"
              • "m5dn.4xlarge"
              • "m5dn.8xlarge"
              • "m5dn.12xlarge"
              • "m5dn.16xlarge"
              • "m5dn.24xlarge"
              • "m5dn.metal"
              • "m5n.large"
              • "m5n.xlarge"
              • "m5n.2xlarge"
              • "m5n.4xlarge"
              • "m5n.8xlarge"
              • "m5n.12xlarge"
              • "m5n.16xlarge"
              • "m5n.24xlarge"
              • "m5n.metal"
              • "r5dn.large"
              • "r5dn.xlarge"
              • "r5dn.2xlarge"
              • "r5dn.4xlarge"
              • "r5dn.8xlarge"
              • "r5dn.12xlarge"
              • "r5dn.16xlarge"
              • "r5dn.24xlarge"
              • "r5dn.metal"
              • "r5n.large"
              • "r5n.xlarge"
              • "r5n.2xlarge"
              • "r5n.4xlarge"
              • "r5n.8xlarge"
              • "r5n.12xlarge"
              • "r5n.16xlarge"
              • "r5n.24xlarge"
              • "r5n.metal"
              • "inf1.xlarge"
              • "inf1.2xlarge"
              • "inf1.6xlarge"
              • "inf1.24xlarge"
              • "m6g.metal"
              • "m6g.medium"
              • "m6g.large"
              • "m6g.xlarge"
              • "m6g.2xlarge"
              • "m6g.4xlarge"
              • "m6g.8xlarge"
              • "m6g.12xlarge"
              • "m6g.16xlarge"
              • "m6gd.metal"
              • "m6gd.medium"
              • "m6gd.large"
              • "m6gd.xlarge"
              • "m6gd.2xlarge"
              • "m6gd.4xlarge"
              • "m6gd.8xlarge"
              • "m6gd.12xlarge"
              • "m6gd.16xlarge"
              • "m6i.large"
              • "m6i.xlarge"
              • "m6i.2xlarge"
              • "m6i.4xlarge"
              • "m6i.8xlarge"
              • "m6i.12xlarge"
              • "m6i.16xlarge"
              • "m6i.24xlarge"
              • "m6i.32xlarge"
              • "mac1.metal"
              • "x2gd.medium"
              • "x2gd.large"
              • "x2gd.xlarge"
              • "x2gd.2xlarge"
              • "x2gd.4xlarge"
              • "x2gd.8xlarge"
              • "x2gd.12xlarge"
              • "x2gd.16xlarge"
              • "x2gd.metal"
              • "vt1.3xlarge"
              • "vt1.6xlarge"
              • "vt1.24xlarge"
            • MaxPrice — (String)

              The maximum price per unit hour that you are willing to pay for a Spot Instance.

            • SubnetId — (String)

              The ID of the subnet in which to launch the instances.

            • AvailabilityZone — (String)

              The Availability Zone in which to launch the instances.

            • WeightedCapacity — (Float)

              The number of units provided by the specified instance type.

            • Priority — (Float)

              The priority for the launch template override. The highest priority is launched first.

              If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

              If the Spot AllocationStrategy is set to capacity-optimized-prioritized, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

              Valid values are whole numbers starting at 0. The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

            • Placement — (map)

              The location where the instance launched, if applicable.

              • GroupName — (String)

                The name of the placement group that the instance is in.

            • InstanceRequirements — (map)

              The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

              Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
              • VCpuCount — (map)

                The minimum and maximum number of vCPUs.

                • Min — (Integer)

                  The minimum number of vCPUs. If the value is 0, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

              • MemoryMiB — (map)

                The minimum and maximum amount of memory, in MiB.

                • Min — (Integer)

                  The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

              • CpuManufacturers — (Array<String>)

                The CPU manufacturers to include.

                • For instance types with Intel CPUs, specify intel.

                • For instance types with AMD CPUs, specify amd.

                • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

                Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                Default: Any manufacturer

              • MemoryGiBPerVCpu — (map)

                The minimum and maximum amount of memory per vCPU, in GiB.

                Default: No minimum or maximum limits

                • Min — (Float)

                  The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Float)

                  The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

              • ExcludedInstanceTypes — (Array<String>)

                The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

                For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                Default: No excluded instance types

              • InstanceGenerations — (Array<String>)

                Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

                For current generation instance types, specify current.

                For previous generation instance types, specify previous.

                Default: Current and previous generation instance types

              • SpotMaxPricePercentageOverLowestPrice — (Integer)

                The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999.

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                Default: 100

              • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

                The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999.

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                Default: 20

              • BareMetal — (String)

                Indicates whether bare metal instance types must be included, excluded, or required.

                • To include bare metal instance types, specify included.

                • To require only bare metal instance types, specify required.

                • To exclude bare metal instance types, specify excluded.

                Default: excluded

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • BurstablePerformance — (String)

                Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

                • To include burstable performance instance types, specify included.

                • To require only burstable performance instance types, specify required.

                • To exclude burstable performance instance types, specify excluded.

                Default: excluded

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • RequireHibernateSupport — (Boolean)

                Indicates whether instance types must support hibernation for On-Demand Instances.

                This parameter is not supported for GetSpotPlacementScores.

                Default: false

              • NetworkInterfaceCount — (map)

                The minimum and maximum number of network interfaces.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

              • LocalStorage — (String)

                Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

                • To include instance types with instance store volumes, specify included.

                • To require only instance types with instance store volumes, specify required.

                • To exclude instance types with instance store volumes, specify excluded.

                Default: included

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • LocalStorageTypes — (Array<String>)

                The type of local storage that is required.

                • For instance types with hard disk drive (HDD) storage, specify hdd.

                • For instance types with solid state drive (SDD) storage, specify sdd.

                Default: hdd and sdd

              • TotalLocalStorageGB — (map)

                The minimum and maximum amount of total local storage, in GB.

                Default: No minimum or maximum limits

                • Min — (Float)

                  The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                • Max — (Float)

                  The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

              • BaselineEbsBandwidthMbps — (map)

                The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

              • AcceleratorTypes — (Array<String>)

                The accelerator types that must be on the instance type.

                • For instance types with GPU accelerators, specify gpu.

                • For instance types with FPGA accelerators, specify fpga.

                • For instance types with inference accelerators, specify inference.

                Default: Any accelerator type

              • AcceleratorCount — (map)

                The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                To exclude accelerator-enabled instance types, set Max to 0.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

              • AcceleratorManufacturers — (Array<String>)

                Indicates whether instance types must have accelerators by specific manufacturers.

                • For instance types with NVIDIA devices, specify nvidia.

                • For instance types with AMD devices, specify amd.

                • For instance types with Amazon Web Services devices, specify amazon-web-services.

                • For instance types with Xilinx devices, specify xilinx.

                Default: Any manufacturer

              • AcceleratorNames — (Array<String>)

                The accelerators that must be on the instance type.

                • For instance types with NVIDIA A100 GPUs, specify a100.

                • For instance types with NVIDIA V100 GPUs, specify v100.

                • For instance types with NVIDIA K80 GPUs, specify k80.

                • For instance types with NVIDIA T4 GPUs, specify t4.

                • For instance types with NVIDIA M60 GPUs, specify m60.

                • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

                • For instance types with Xilinx VU9P FPGAs, specify vu9p.

                Default: Any accelerator

              • AcceleratorTotalMemoryMiB — (map)

                The minimum and maximum amount of total accelerator memory, in MiB.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

        • Lifecycle — (String)

          Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.

          Possible values include:
          • "spot"
          • "on-demand"
        • ErrorCode — (String)

          The error code that indicates why the instance could not be launched. For more information about error codes, see Error Codes.

        • ErrorMessage — (String)

          The error message that describes why the instance could not be launched. For more information about error messages, see Error Codes.

      • Instances — (Array<map>)

        Information about the instances that were launched by the fleet. Supported only for fleets of type instant.

        • LaunchTemplateAndOverrides — (map)

          The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.

          • LaunchTemplateSpecification — (map)

            The launch template.

            • LaunchTemplateId — (String)

              The ID of the launch template. If you specify the template ID, you can't specify the template name.

            • LaunchTemplateName — (String)

              The name of the launch template. If you specify the template name, you can't specify the template ID.

            • Version — (String)

              The launch template version number, $Latest, or $Default. You must specify a value, otherwise the request fails.

              If the value is $Latest, Amazon EC2 uses the latest version of the launch template.

              If the value is $Default, Amazon EC2 uses the default version of the launch template.

          • Overrides — (map)

            Any parameters that you specify override the same parameters in the launch template.

            • InstanceType — (String)

              The instance type.

              Note: If you specify InstanceTypes, you can't specify InstanceRequirements.
              Possible values include:
              • "t1.micro"
              • "t2.nano"
              • "t2.micro"
              • "t2.small"
              • "t2.medium"
              • "t2.large"
              • "t2.xlarge"
              • "t2.2xlarge"
              • "t3.nano"
              • "t3.micro"
              • "t3.small"
              • "t3.medium"
              • "t3.large"
              • "t3.xlarge"
              • "t3.2xlarge"
              • "t3a.nano"
              • "t3a.micro"
              • "t3a.small"
              • "t3a.medium"
              • "t3a.large"
              • "t3a.xlarge"
              • "t3a.2xlarge"
              • "t4g.nano"
              • "t4g.micro"
              • "t4g.small"
              • "t4g.medium"
              • "t4g.large"
              • "t4g.xlarge"
              • "t4g.2xlarge"
              • "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"
              • "m4.16xlarge"
              • "m2.xlarge"
              • "m2.2xlarge"
              • "m2.4xlarge"
              • "cr1.8xlarge"
              • "r3.large"
              • "r3.xlarge"
              • "r3.2xlarge"
              • "r3.4xlarge"
              • "r3.8xlarge"
              • "r4.large"
              • "r4.xlarge"
              • "r4.2xlarge"
              • "r4.4xlarge"
              • "r4.8xlarge"
              • "r4.16xlarge"
              • "r5.large"
              • "r5.xlarge"
              • "r5.2xlarge"
              • "r5.4xlarge"
              • "r5.8xlarge"
              • "r5.12xlarge"
              • "r5.16xlarge"
              • "r5.24xlarge"
              • "r5.metal"
              • "r5a.large"
              • "r5a.xlarge"
              • "r5a.2xlarge"
              • "r5a.4xlarge"
              • "r5a.8xlarge"
              • "r5a.12xlarge"
              • "r5a.16xlarge"
              • "r5a.24xlarge"
              • "r5b.large"
              • "r5b.xlarge"
              • "r5b.2xlarge"
              • "r5b.4xlarge"
              • "r5b.8xlarge"
              • "r5b.12xlarge"
              • "r5b.16xlarge"
              • "r5b.24xlarge"
              • "r5b.metal"
              • "r5d.large"
              • "r5d.xlarge"
              • "r5d.2xlarge"
              • "r5d.4xlarge"
              • "r5d.8xlarge"
              • "r5d.12xlarge"
              • "r5d.16xlarge"
              • "r5d.24xlarge"
              • "r5d.metal"
              • "r5ad.large"
              • "r5ad.xlarge"
              • "r5ad.2xlarge"
              • "r5ad.4xlarge"
              • "r5ad.8xlarge"
              • "r5ad.12xlarge"
              • "r5ad.16xlarge"
              • "r5ad.24xlarge"
              • "r6g.metal"
              • "r6g.medium"
              • "r6g.large"
              • "r6g.xlarge"
              • "r6g.2xlarge"
              • "r6g.4xlarge"
              • "r6g.8xlarge"
              • "r6g.12xlarge"
              • "r6g.16xlarge"
              • "r6gd.metal"
              • "r6gd.medium"
              • "r6gd.large"
              • "r6gd.xlarge"
              • "r6gd.2xlarge"
              • "r6gd.4xlarge"
              • "r6gd.8xlarge"
              • "r6gd.12xlarge"
              • "r6gd.16xlarge"
              • "x1.16xlarge"
              • "x1.32xlarge"
              • "x1e.xlarge"
              • "x1e.2xlarge"
              • "x1e.4xlarge"
              • "x1e.8xlarge"
              • "x1e.16xlarge"
              • "x1e.32xlarge"
              • "i2.xlarge"
              • "i2.2xlarge"
              • "i2.4xlarge"
              • "i2.8xlarge"
              • "i3.large"
              • "i3.xlarge"
              • "i3.2xlarge"
              • "i3.4xlarge"
              • "i3.8xlarge"
              • "i3.16xlarge"
              • "i3.metal"
              • "i3en.large"
              • "i3en.xlarge"
              • "i3en.2xlarge"
              • "i3en.3xlarge"
              • "i3en.6xlarge"
              • "i3en.12xlarge"
              • "i3en.24xlarge"
              • "i3en.metal"
              • "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"
              • "c5.large"
              • "c5.xlarge"
              • "c5.2xlarge"
              • "c5.4xlarge"
              • "c5.9xlarge"
              • "c5.12xlarge"
              • "c5.18xlarge"
              • "c5.24xlarge"
              • "c5.metal"
              • "c5a.large"
              • "c5a.xlarge"
              • "c5a.2xlarge"
              • "c5a.4xlarge"
              • "c5a.8xlarge"
              • "c5a.12xlarge"
              • "c5a.16xlarge"
              • "c5a.24xlarge"
              • "c5ad.large"
              • "c5ad.xlarge"
              • "c5ad.2xlarge"
              • "c5ad.4xlarge"
              • "c5ad.8xlarge"
              • "c5ad.12xlarge"
              • "c5ad.16xlarge"
              • "c5ad.24xlarge"
              • "c5d.large"
              • "c5d.xlarge"
              • "c5d.2xlarge"
              • "c5d.4xlarge"
              • "c5d.9xlarge"
              • "c5d.12xlarge"
              • "c5d.18xlarge"
              • "c5d.24xlarge"
              • "c5d.metal"
              • "c5n.large"
              • "c5n.xlarge"
              • "c5n.2xlarge"
              • "c5n.4xlarge"
              • "c5n.9xlarge"
              • "c5n.18xlarge"
              • "c5n.metal"
              • "c6g.metal"
              • "c6g.medium"
              • "c6g.large"
              • "c6g.xlarge"
              • "c6g.2xlarge"
              • "c6g.4xlarge"
              • "c6g.8xlarge"
              • "c6g.12xlarge"
              • "c6g.16xlarge"
              • "c6gd.metal"
              • "c6gd.medium"
              • "c6gd.large"
              • "c6gd.xlarge"
              • "c6gd.2xlarge"
              • "c6gd.4xlarge"
              • "c6gd.8xlarge"
              • "c6gd.12xlarge"
              • "c6gd.16xlarge"
              • "c6gn.medium"
              • "c6gn.large"
              • "c6gn.xlarge"
              • "c6gn.2xlarge"
              • "c6gn.4xlarge"
              • "c6gn.8xlarge"
              • "c6gn.12xlarge"
              • "c6gn.16xlarge"
              • "cc1.4xlarge"
              • "cc2.8xlarge"
              • "g2.2xlarge"
              • "g2.8xlarge"
              • "g3.4xlarge"
              • "g3.8xlarge"
              • "g3.16xlarge"
              • "g3s.xlarge"
              • "g4ad.xlarge"
              • "g4ad.2xlarge"
              • "g4ad.4xlarge"
              • "g4ad.8xlarge"
              • "g4ad.16xlarge"
              • "g4dn.xlarge"
              • "g4dn.2xlarge"
              • "g4dn.4xlarge"
              • "g4dn.8xlarge"
              • "g4dn.12xlarge"
              • "g4dn.16xlarge"
              • "g4dn.metal"
              • "cg1.4xlarge"
              • "p2.xlarge"
              • "p2.8xlarge"
              • "p2.16xlarge"
              • "p3.2xlarge"
              • "p3.8xlarge"
              • "p3.16xlarge"
              • "p3dn.24xlarge"
              • "p4d.24xlarge"
              • "d2.xlarge"
              • "d2.2xlarge"
              • "d2.4xlarge"
              • "d2.8xlarge"
              • "d3.xlarge"
              • "d3.2xlarge"
              • "d3.4xlarge"
              • "d3.8xlarge"
              • "d3en.xlarge"
              • "d3en.2xlarge"
              • "d3en.4xlarge"
              • "d3en.6xlarge"
              • "d3en.8xlarge"
              • "d3en.12xlarge"
              • "dl1.24xlarge"
              • "f1.2xlarge"
              • "f1.4xlarge"
              • "f1.16xlarge"
              • "m5.large"
              • "m5.xlarge"
              • "m5.2xlarge"
              • "m5.4xlarge"
              • "m5.8xlarge"
              • "m5.12xlarge"
              • "m5.16xlarge"
              • "m5.24xlarge"
              • "m5.metal"
              • "m5a.large"
              • "m5a.xlarge"
              • "m5a.2xlarge"
              • "m5a.4xlarge"
              • "m5a.8xlarge"
              • "m5a.12xlarge"
              • "m5a.16xlarge"
              • "m5a.24xlarge"
              • "m5d.large"
              • "m5d.xlarge"
              • "m5d.2xlarge"
              • "m5d.4xlarge"
              • "m5d.8xlarge"
              • "m5d.12xlarge"
              • "m5d.16xlarge"
              • "m5d.24xlarge"
              • "m5d.metal"
              • "m5ad.large"
              • "m5ad.xlarge"
              • "m5ad.2xlarge"
              • "m5ad.4xlarge"
              • "m5ad.8xlarge"
              • "m5ad.12xlarge"
              • "m5ad.16xlarge"
              • "m5ad.24xlarge"
              • "m5zn.large"
              • "m5zn.xlarge"
              • "m5zn.2xlarge"
              • "m5zn.3xlarge"
              • "m5zn.6xlarge"
              • "m5zn.12xlarge"
              • "m5zn.metal"
              • "h1.2xlarge"
              • "h1.4xlarge"
              • "h1.8xlarge"
              • "h1.16xlarge"
              • "z1d.large"
              • "z1d.xlarge"
              • "z1d.2xlarge"
              • "z1d.3xlarge"
              • "z1d.6xlarge"
              • "z1d.12xlarge"
              • "z1d.metal"
              • "u-6tb1.56xlarge"
              • "u-6tb1.112xlarge"
              • "u-9tb1.112xlarge"
              • "u-12tb1.112xlarge"
              • "u-6tb1.metal"
              • "u-9tb1.metal"
              • "u-12tb1.metal"
              • "u-18tb1.metal"
              • "u-24tb1.metal"
              • "a1.medium"
              • "a1.large"
              • "a1.xlarge"
              • "a1.2xlarge"
              • "a1.4xlarge"
              • "a1.metal"
              • "m5dn.large"
              • "m5dn.xlarge"
              • "m5dn.2xlarge"
              • "m5dn.4xlarge"
              • "m5dn.8xlarge"
              • "m5dn.12xlarge"
              • "m5dn.16xlarge"
              • "m5dn.24xlarge"
              • "m5dn.metal"
              • "m5n.large"
              • "m5n.xlarge"
              • "m5n.2xlarge"
              • "m5n.4xlarge"
              • "m5n.8xlarge"
              • "m5n.12xlarge"
              • "m5n.16xlarge"
              • "m5n.24xlarge"
              • "m5n.metal"
              • "r5dn.large"
              • "r5dn.xlarge"
              • "r5dn.2xlarge"
              • "r5dn.4xlarge"
              • "r5dn.8xlarge"
              • "r5dn.12xlarge"
              • "r5dn.16xlarge"
              • "r5dn.24xlarge"
              • "r5dn.metal"
              • "r5n.large"
              • "r5n.xlarge"
              • "r5n.2xlarge"
              • "r5n.4xlarge"
              • "r5n.8xlarge"
              • "r5n.12xlarge"
              • "r5n.16xlarge"
              • "r5n.24xlarge"
              • "r5n.metal"
              • "inf1.xlarge"
              • "inf1.2xlarge"
              • "inf1.6xlarge"
              • "inf1.24xlarge"
              • "m6g.metal"
              • "m6g.medium"
              • "m6g.large"
              • "m6g.xlarge"
              • "m6g.2xlarge"
              • "m6g.4xlarge"
              • "m6g.8xlarge"
              • "m6g.12xlarge"
              • "m6g.16xlarge"
              • "m6gd.metal"
              • "m6gd.medium"
              • "m6gd.large"
              • "m6gd.xlarge"
              • "m6gd.2xlarge"
              • "m6gd.4xlarge"
              • "m6gd.8xlarge"
              • "m6gd.12xlarge"
              • "m6gd.16xlarge"
              • "m6i.large"
              • "m6i.xlarge"
              • "m6i.2xlarge"
              • "m6i.4xlarge"
              • "m6i.8xlarge"
              • "m6i.12xlarge"
              • "m6i.16xlarge"
              • "m6i.24xlarge"
              • "m6i.32xlarge"
              • "mac1.metal"
              • "x2gd.medium"
              • "x2gd.large"
              • "x2gd.xlarge"
              • "x2gd.2xlarge"
              • "x2gd.4xlarge"
              • "x2gd.8xlarge"
              • "x2gd.12xlarge"
              • "x2gd.16xlarge"
              • "x2gd.metal"
              • "vt1.3xlarge"
              • "vt1.6xlarge"
              • "vt1.24xlarge"
            • MaxPrice — (String)

              The maximum price per unit hour that you are willing to pay for a Spot Instance.

            • SubnetId — (String)

              The ID of the subnet in which to launch the instances.

            • AvailabilityZone — (String)

              The Availability Zone in which to launch the instances.

            • WeightedCapacity — (Float)

              The number of units provided by the specified instance type.

            • Priority — (Float)

              The priority for the launch template override. The highest priority is launched first.

              If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

              If the Spot AllocationStrategy is set to capacity-optimized-prioritized, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

              Valid values are whole numbers starting at 0. The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

            • Placement — (map)

              The location where the instance launched, if applicable.

              • GroupName — (String)

                The name of the placement group that the instance is in.

            • InstanceRequirements — (map)

              The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

              Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
              • VCpuCount — (map)

                The minimum and maximum number of vCPUs.

                • Min — (Integer)

                  The minimum number of vCPUs. If the value is 0, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

              • MemoryMiB — (map)

                The minimum and maximum amount of memory, in MiB.

                • Min — (Integer)

                  The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

              • CpuManufacturers — (Array<String>)

                The CPU manufacturers to include.

                • For instance types with Intel CPUs, specify intel.

                • For instance types with AMD CPUs, specify amd.

                • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

                Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                Default: Any manufacturer

              • MemoryGiBPerVCpu — (map)

                The minimum and maximum amount of memory per vCPU, in GiB.

                Default: No minimum or maximum limits

                • Min — (Float)

                  The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Float)

                  The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

              • ExcludedInstanceTypes — (Array<String>)

                The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

                For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                Default: No excluded instance types

              • InstanceGenerations — (Array<String>)

                Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

                For current generation instance types, specify current.

                For previous generation instance types, specify previous.

                Default: Current and previous generation instance types

              • SpotMaxPricePercentageOverLowestPrice — (Integer)

                The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999.

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                Default: 100

              • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

                The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999.

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                Default: 20

              • BareMetal — (String)

                Indicates whether bare metal instance types must be included, excluded, or required.

                • To include bare metal instance types, specify included.

                • To require only bare metal instance types, specify required.

                • To exclude bare metal instance types, specify excluded.

                Default: excluded

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • BurstablePerformance — (String)

                Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

                • To include burstable performance instance types, specify included.

                • To require only burstable performance instance types, specify required.

                • To exclude burstable performance instance types, specify excluded.

                Default: excluded

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • RequireHibernateSupport — (Boolean)

                Indicates whether instance types must support hibernation for On-Demand Instances.

                This parameter is not supported for GetSpotPlacementScores.

                Default: false

              • NetworkInterfaceCount — (map)

                The minimum and maximum number of network interfaces.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

              • LocalStorage — (String)

                Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

                • To include instance types with instance store volumes, specify included.

                • To require only instance types with instance store volumes, specify required.

                • To exclude instance types with instance store volumes, specify excluded.

                Default: included

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • LocalStorageTypes — (Array<String>)

                The type of local storage that is required.

                • For instance types with hard disk drive (HDD) storage, specify hdd.

                • For instance types with solid state drive (SDD) storage, specify sdd.

                Default: hdd and sdd

              • TotalLocalStorageGB — (map)

                The minimum and maximum amount of total local storage, in GB.

                Default: No minimum or maximum limits

                • Min — (Float)

                  The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                • Max — (Float)

                  The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

              • BaselineEbsBandwidthMbps — (map)

                The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

              • AcceleratorTypes — (Array<String>)

                The accelerator types that must be on the instance type.

                • For instance types with GPU accelerators, specify gpu.

                • For instance types with FPGA accelerators, specify fpga.

                • For instance types with inference accelerators, specify inference.

                Default: Any accelerator type

              • AcceleratorCount — (map)

                The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                To exclude accelerator-enabled instance types, set Max to 0.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

              • AcceleratorManufacturers — (Array<String>)

                Indicates whether instance types must have accelerators by specific manufacturers.

                • For instance types with NVIDIA devices, specify nvidia.

                • For instance types with AMD devices, specify amd.

                • For instance types with Amazon Web Services devices, specify amazon-web-services.

                • For instance types with Xilinx devices, specify xilinx.

                Default: Any manufacturer

              • AcceleratorNames — (Array<String>)

                The accelerators that must be on the instance type.

                • For instance types with NVIDIA A100 GPUs, specify a100.

                • For instance types with NVIDIA V100 GPUs, specify v100.

                • For instance types with NVIDIA K80 GPUs, specify k80.

                • For instance types with NVIDIA T4 GPUs, specify t4.

                • For instance types with NVIDIA M60 GPUs, specify m60.

                • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

                • For instance types with Xilinx VU9P FPGAs, specify vu9p.

                Default: Any accelerator

              • AcceleratorTotalMemoryMiB — (map)

                The minimum and maximum amount of total accelerator memory, in MiB.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

        • Lifecycle — (String)

          Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.

          Possible values include:
          • "spot"
          • "on-demand"
        • InstanceIds — (Array<String>)

          The IDs of the instances.

        • InstanceType — (String)

          The instance type.

          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • Platform — (String)

          The value is Windows for Windows instances. Otherwise, the value is blank.

          Possible values include:
          • "Windows"

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 information about IP traffic for a specific network interface, subnet, or VPC.

Flow log data for a monitored network interface is recorded as flow log records, which are log events consisting of fields that describe the traffic flow. For more information, see Flow log records in the Amazon Virtual Private Cloud User Guide.

When publishing to CloudWatch Logs, flow log records are published to a log group, and each network interface has a unique log stream in the log group. When publishing to Amazon S3, flow log records for all of the monitored network interfaces are published to a single log file object that is stored in the specified bucket.

For more information, see VPC Flow Logs in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

Calling the createFlowLogs operation

var params = {
  ResourceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  ResourceType: VPC | Subnet | NetworkInterface, /* required */
  TrafficType: ACCEPT | REJECT | ALL, /* required */
  ClientToken: 'STRING_VALUE',
  DeliverLogsPermissionArn: 'STRING_VALUE',
  DestinationOptions: {
    FileFormat: plain-text | parquet,
    HiveCompatiblePartitions: true || false,
    PerHourPartition: true || false
  },
  DryRun: true || false,
  LogDestination: 'STRING_VALUE',
  LogDestinationType: cloud-watch-logs | s3,
  LogFormat: 'STRING_VALUE',
  LogGroupName: 'STRING_VALUE',
  MaxAggregationInterval: 'NUMBER_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • 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.

    • ClientToken — (String)

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

    • DeliverLogsPermissionArn — (String)

      The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your account.

      If you specify LogDestinationType as s3, do not specify DeliverLogsPermissionArn or LogGroupName.

    • LogGroupName — (String)

      The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.

      If you specify LogDestinationType as s3, do not specify DeliverLogsPermissionArn or LogGroupName.

    • ResourceIds — (Array<String>)

      The ID of the subnet, network interface, or VPC for which you want to create a flow log.

      Constraints: Maximum of 1000 resources

    • ResourceType — (String)

      The type of resource for which to create the flow log. For example, if you specified a VPC ID for the ResourceId property, specify VPC for this property.

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

      The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic.

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

      The type of destination to which the flow log data is to be published. Flow log data can be published to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify cloud-watch-logs. To publish flow log data to Amazon S3, specify s3.

      If you specify LogDestinationType as s3, do not specify DeliverLogsPermissionArn or LogGroupName.

      Default: cloud-watch-logs

      Possible values include:
      • "cloud-watch-logs"
      • "s3"
    • LogDestination — (String)

      The destination to which the flow log data is to be published. Flow log data can be published to a CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the value specified for LogDestinationType.

      If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon Resource Name (ARN) of the CloudWatch Logs log group. For example, to publish to a log group called my-logs, specify arn:aws:logs:us-east-1:123456789012:log-group:my-logs. Alternatively, use LogGroupName instead.

      If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You can also specify a subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format: bucket_ARN/subfolder_name/. For example, to specify a subfolder named my-logs in a bucket named my-bucket, use the following ARN: arn:aws:s3:::my-bucket/my-logs/. You cannot use AWSLogs as a subfolder name. This is a reserved term.

    • LogFormat — (String)

      The fields to include in the flow log record, in the order in which they should appear. For a list of available fields, see Flow log records. If you omit this parameter, the flow log is created using the default format. If you specify this parameter, you must specify at least one field.

      Specify the fields using the ${field-id} format, separated by spaces. For the CLI, surround this parameter value with single quotes on Linux or double quotes on Windows.

    • TagSpecifications — (Array<map>)

      The tags to apply to the flow logs.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • MaxAggregationInterval — (Integer)

      The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. You can specify 60 seconds (1 minute) or 600 seconds (10 minutes).

      When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds or less, regardless of the value that you specify.

      Default: 600

    • DestinationOptions — (map)

      The destination options.

      • FileFormat — (String)

        The format for the flow log. The default is plain-text.

        Possible values include:
        • "plain-text"
        • "parquet"
      • HiveCompatiblePartitions — (Boolean)

        Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is false.

      • PerHourPartition — (Boolean)

        Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The default is 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:

      • ClientToken — (String)

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

      • FlowLogIds — (Array<String>)

        The IDs of the flow logs.

      • Unsuccessful — (Array<map>)

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

        • Error — (map)

          Information about the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message accompanying the error code.

        • ResourceId — (String)

          The ID of the resource.

Returns:

  • (AWS.Request)

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

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

Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).

The create operation is asynchronous. To verify that the AFI is ready for use, check the output logs.

An AFI contains the FPGA bitstream that is ready to download to an FPGA. You can securely deploy an AFI on multiple FPGA-accelerated instances. For more information, see the Amazon Web Services FPGA Hardware Development Kit.

Service Reference:

Examples:

Calling the createFpgaImage operation

var params = {
  InputStorageLocation: { /* required */
    Bucket: 'STRING_VALUE',
    Key: 'STRING_VALUE'
  },
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DryRun: true || false,
  LogsStorageLocation: {
    Bucket: 'STRING_VALUE',
    Key: 'STRING_VALUE'
  },
  Name: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createFpgaImage(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.

    • InputStorageLocation — (map)

      The location of the encrypted design checkpoint in Amazon S3. The input must be a tarball.

      • Bucket — (String)

        The name of the S3 bucket.

      • Key — (String)

        The key.

    • LogsStorageLocation — (map)

      The location in Amazon S3 for the output logs.

      • Bucket — (String)

        The name of the S3 bucket.

      • Key — (String)

        The key.

    • Description — (String)

      A description for the AFI.

    • Name — (String)

      A name for the AFI.

    • ClientToken — (String)

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

    • TagSpecifications — (Array<map>)

      The tags to apply to the FPGA image during creation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • FpgaImageId — (String)

        The FPGA image identifier (AFI ID).

      • FpgaImageGlobalId — (String)

        The global FPGA image identifier (AGFI ID).

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

Service Reference:

Examples:

To create an AMI from an Amazon EBS-backed instance


/* This example creates an AMI from the specified instance and adds an EBS volume with the device name /dev/sdh and an instance store volume with the device name /dev/sdc. */

 var params = {
  BlockDeviceMappings: [
     {
    DeviceName: "/dev/sdh", 
    Ebs: {
     VolumeSize: 100
    }
   }, 
     {
    DeviceName: "/dev/sdc", 
    VirtualName: "ephemeral1"
   }
  ], 
  Description: "An AMI for my server", 
  InstanceId: "i-1234567890abcdef0", 
  Name: "My server", 
  NoReboot: true
 };
 ec2.createImage(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ImageId: "ami-1a2b3c4d"
   }
   */
 });

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: 'NUMBER_VALUE',
        KmsKeyId: 'STRING_VALUE',
        OutpostArn: 'STRING_VALUE',
        SnapshotId: 'STRING_VALUE',
        Throughput: 'NUMBER_VALUE',
        VolumeSize: 'NUMBER_VALUE',
        VolumeType: standard | io1 | io2 | gp2 | sc1 | st1 | gp3
      },
      NoDevice: 'STRING_VALUE',
      VirtualName: 'STRING_VALUE'
    },
    /* more items */
  ],
  Description: 'STRING_VALUE',
  DryRun: true || false,
  NoReboot: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • BlockDeviceMappings — (Array<map>)

      The block device mappings. This parameter cannot be used to modify the encryption status of existing volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.

      • DeviceName — (String)

        The device name (for example, /dev/sdh or xvdh).

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

        NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

        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.

      • Ebs — (map)

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

        • DeleteOnTermination — (Boolean)

          Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

        • Iops — (Integer)

          The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

          The following are the supported values for each volume type:

          • gp3: 3,000-16,000 IOPS

          • io1: 100-64,000 IOPS

          • io2: 100-64,000 IOPS

          For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

          This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

        • SnapshotId — (String)

          The ID of the snapshot.

        • VolumeSize — (Integer)

          The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

          The following are the supported volumes sizes for each volume type:

          • gp2 and gp3:1-16,384

          • io1 and io2: 4-16,384

          • st1 and sc1: 125-16,384

          • standard: 1-1,024

        • VolumeType — (String)

          The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

          Possible values include:
          • "standard"
          • "io1"
          • "io2"
          • "gp2"
          • "sc1"
          • "st1"
          • "gp3"
        • KmsKeyId — (String)

          Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

          This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

        • Throughput — (Integer)

          The throughput that the volume supports, in MiB/s.

          This parameter is valid only for gp3 volumes.

          Valid Range: Minimum value of 125. Maximum value of 1000.

        • OutpostArn — (String)

          The ARN of the Outpost on which the snapshot is stored.

        • Encrypted — (Boolean)

          Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

          In no case can you remove encryption from an encrypted volume.

          Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

          This parameter is not returned by .

      • NoDevice — (String)

        To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

    • Description — (String)

      A description for the new image.

    • 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(_)

    • 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. Without a reboot, the AMI will be crash consistent (all the volumes are snapshotted at the same time), but not application consistent (all the operating system buffers are not flushed to disk before the snapshots are created).

    • TagSpecifications — (Array<map>)

      The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.

      • To tag the AMI, the value for ResourceType must be image.

      • To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the instance, the value for ResourceType must be snapshot. The same tag is applied to all of the snapshots that are created.

      If you specify other values for ResourceType, the request fails.

      To tag an AMI or snapshot after it has been created, see CreateTags.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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.

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

Creates an event window in which scheduled events for the associated Amazon EC2 instances can run.

You can define either a set of time ranges or a cron expression when creating the event window, but not both. All event window times are in UTC.

You can create up to 200 event windows per Amazon Web Services Region.

When you create the event window, targets (instance IDs, Dedicated Host IDs, or tags) are not yet associated with it. To ensure that the event window can be used, you must associate one or more targets with it by using the AssociateInstanceEventWindow API.

Event windows are applicable only for scheduled events that stop, reboot, or terminate instances.

Event windows are not applicable for:

  • Expedited scheduled events and network maintenance events.

  • Unscheduled maintenance such as AutoRecovery and unplanned reboots.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the createInstanceEventWindow operation

var params = {
  CronExpression: 'STRING_VALUE',
  DryRun: true || false,
  Name: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  TimeRanges: [
    {
      EndHour: 'NUMBER_VALUE',
      EndWeekDay: sunday | monday | tuesday | wednesday | thursday | friday | saturday,
      StartHour: 'NUMBER_VALUE',
      StartWeekDay: sunday | monday | tuesday | wednesday | thursday | friday | saturday
    },
    /* more items */
  ]
};
ec2.createInstanceEventWindow(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.

    • Name — (String)

      The name of the event window.

    • TimeRanges — (Array<map>)

      The time range for the event window. If you specify a time range, you can't specify a cron expression.

      • StartWeekDay — (String)

        The day on which the time range begins.

        Possible values include:
        • "sunday"
        • "monday"
        • "tuesday"
        • "wednesday"
        • "thursday"
        • "friday"
        • "saturday"
      • StartHour — (Integer)

        The hour when the time range begins.

      • EndWeekDay — (String)

        The day on which the time range ends.

        Possible values include:
        • "sunday"
        • "monday"
        • "tuesday"
        • "wednesday"
        • "thursday"
        • "friday"
        • "saturday"
      • EndHour — (Integer)

        The hour when the time range ends.

    • CronExpression — (String)

      The cron expression for the event window, for example, * 0-4,20-23 * * 1,5. If you specify a cron expression, you can't specify a time range.

      Constraints:

      • Only hour and day of the week values are supported.

      • For day of the week values, you can specify either integers 0 through 6, or alternative single values SUN through SAT.

      • The minute, month, and year must be specified by *.

      • The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23.

      • Each hour range must be >= 2 hours, for example, 0-2 or 20-23.

      • The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours.

      For more information about cron expressions, see cron on the Wikipedia website.

    • TagSpecifications — (Array<map>)

      The tags to apply to the event window.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • InstanceEventWindow — (map)

        Information about the event window.

        • InstanceEventWindowId — (String)

          The ID of the event window.

        • TimeRanges — (Array<map>)

          One or more time ranges defined for the event window.

          • StartWeekDay — (String)

            The day on which the time range begins.

            Possible values include:
            • "sunday"
            • "monday"
            • "tuesday"
            • "wednesday"
            • "thursday"
            • "friday"
            • "saturday"
          • StartHour — (Integer)

            The hour when the time range begins.

          • EndWeekDay — (String)

            The day on which the time range ends.

            Possible values include:
            • "sunday"
            • "monday"
            • "tuesday"
            • "wednesday"
            • "thursday"
            • "friday"
            • "saturday"
          • EndHour — (Integer)

            The hour when the time range ends.

        • Name — (String)

          The name of the event window.

        • CronExpression — (String)

          The cron expression defined for the event window.

        • AssociationTarget — (map)

          One or more targets associated with the event window.

          • InstanceIds — (Array<String>)

            The IDs of the instances associated with the event window.

          • Tags — (Array<map>)

            The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.

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

          • DedicatedHostIds — (Array<String>)

            The IDs of the Dedicated Hosts associated with the event window.

        • State — (String)

          The current state of the event window.

          Possible values include:
          • "creating"
          • "deleting"
          • "active"
          • "deleted"
        • Tags — (Array<map>)

          The instance tags associated with the event window.

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

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

Exports a running or stopped instance to an Amazon 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.

Service Reference:

Examples:

Calling the createInstanceExportTask operation

var params = {
  ExportToS3Task: { /* required */
    ContainerFormat: ova,
    DiskImageFormat: VMDK | RAW | VHD,
    S3Bucket: 'STRING_VALUE',
    S3Prefix: 'STRING_VALUE'
  },
  InstanceId: 'STRING_VALUE', /* required */
  TargetEnvironment: citrix | vmware | microsoft, /* required */
  Description: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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 characters.

    • ExportToS3Task — (map)

      The format and location for an export instance task.

      • 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"
      • DiskImageFormat — (String)

        The format for the exported image.

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

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

      • S3Prefix — (String)

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

    • InstanceId — (String)

      The ID of the instance.

    • TargetEnvironment — (String)

      The target virtualization environment.

      Possible values include:
      • "citrix"
      • "vmware"
      • "microsoft"
    • TagSpecifications — (Array<map>)

      The tags to apply to the export instance task during creation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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 export instance task.

        • Description — (String)

          A description of the resource being exported.

        • ExportTaskId — (String)

          The ID of the export task.

        • ExportToS3Task — (map)

          Information about the export task.

          • 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"
          • DiskImageFormat — (String)

            The format for the exported image.

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

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

          • S3Key — (String)

            The encryption key for your S3 bucket.

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

        • Tags — (Array<map>)

          The tags for the export 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.

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.

Service Reference:

Examples:

To create an Internet gateway


/* This example creates an Internet gateway. */

 var params = {
 };
 ec2.createInternetGateway(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    InternetGateway: {
     Attachments: [
     ], 
     InternetGatewayId: "igw-c0a643a9", 
     Tags: [
     ]
    }
   }
   */
 });

Calling the createInternetGateway operation

var params = {
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • TagSpecifications — (Array<map>)

      The tags to assign to the internet gateway.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

        • Attachments — (Array<map>)

          Any VPCs attached to the internet gateway.

          • State — (String)

            The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
          • VpcId — (String)

            The ID of the VPC.

        • InternetGatewayId — (String)

          The ID of the internet gateway.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the internet gateway.

        • 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 an ED25519 or 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#1 private key. If a key with the specified name already exists, Amazon EC2 returns an error.

The key pair returned to you is available only in the Amazon Web Services Region in which you create it. If you prefer, you can create your own key pair using a third-party tool and upload it to any Region using ImportKeyPair.

You can have up to 5,000 key pairs per Amazon Web Services Region.

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

Service Reference:

Examples:

To create a key pair


/* This example creates a key pair named my-key-pair. */

 var params = {
  KeyName: "my-key-pair"
 };
 ec2.createKeyPair(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the createKeyPair operation

var params = {
  KeyName: 'STRING_VALUE', /* required */
  DryRun: true || false,
  KeyType: rsa | ed25519,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • KeyName — (String)

      A unique name for the key pair.

      Constraints: Up to 255 ASCII characters

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

    • KeyType — (String)

      The type of key pair. Note that ED25519 keys are not supported for Windows instances, EC2 Instance Connect, and EC2 Serial Console.

      Default: rsa

      Possible values include:
      • "rsa"
      • "ed25519"
    • TagSpecifications — (Array<map>)

      The tags to apply to the new key pair.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • KeyFingerprint — (String)

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

      • KeyMaterial — (String)

        An unencrypted PEM encoded RSA or ED25519 private key.

      • KeyName — (String)

        The name of the key pair.

      • KeyPairId — (String)

        The ID of the key pair.

      • Tags — (Array<map>)

        Any tags applied to the key pair.

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

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

Creates a launch template. A launch template contains the parameters to launch an instance. When you launch an instance using RunInstances, you can specify a launch template instead of providing the launch parameters in the request. For more information, see Launching an instance from a launch template in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To create a launch template


/* This example creates a launch template that specifies the subnet in which to launch the instance, assigns a public IP address and an IPv6 address to the instance, and creates a tag for the instance. */

 var params = {
  LaunchTemplateData: {
   ImageId: "ami-8c1be5f6", 
   InstanceType: "t2.small", 
   NetworkInterfaces: [
      {
     AssociatePublicIpAddress: true, 
     DeviceIndex: 0, 
     Ipv6AddressCount: 1, 
     SubnetId: "subnet-7b16de0c"
    }
   ], 
   TagSpecifications: [
      {
     ResourceType: "instance", 
     Tags: [
        {
       Key: "Name", 
       Value: "webserver"
      }
     ]
    }
   ]
  }, 
  LaunchTemplateName: "my-template", 
  VersionDescription: "WebVersion1"
 };
 ec2.createLaunchTemplate(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    LaunchTemplate: {
     CreateTime: <Date Representation>, 
     CreatedBy: "arn:aws:iam::123456789012:root", 
     DefaultVersionNumber: 1, 
     LatestVersionNumber: 1, 
     LaunchTemplateId: "lt-01238c059e3466abc", 
     LaunchTemplateName: "my-template"
    }
   }
   */
 });

Calling the createLaunchTemplate operation

var params = {
  LaunchTemplateData: { /* required */
    BlockDeviceMappings: [
      {
        DeviceName: 'STRING_VALUE',
        Ebs: {
          DeleteOnTermination: true || false,
          Encrypted: true || false,
          Iops: 'NUMBER_VALUE',
          KmsKeyId: 'STRING_VALUE',
          SnapshotId: 'STRING_VALUE',
          Throughput: 'NUMBER_VALUE',
          VolumeSize: 'NUMBER_VALUE',
          VolumeType: standard | io1 | io2 | gp2 | sc1 | st1 | gp3
        },
        NoDevice: 'STRING_VALUE',
        VirtualName: 'STRING_VALUE'
      },
      /* more items */
    ],
    CapacityReservationSpecification: {
      CapacityReservationPreference: open | none,
      CapacityReservationTarget: {
        CapacityReservationId: 'STRING_VALUE',
        CapacityReservationResourceGroupArn: 'STRING_VALUE'
      }
    },
    CpuOptions: {
      CoreCount: 'NUMBER_VALUE',
      ThreadsPerCore: 'NUMBER_VALUE'
    },
    CreditSpecification: {
      CpuCredits: 'STRING_VALUE' /* required */
    },
    DisableApiTermination: true || false,
    EbsOptimized: true || false,
    ElasticGpuSpecifications: [
      {
        Type: 'STRING_VALUE' /* required */
      },
      /* more items */
    ],
    ElasticInferenceAccelerators: [
      {
        Type: 'STRING_VALUE', /* required */
        Count: 'NUMBER_VALUE'
      },
      /* more items */
    ],
    EnclaveOptions: {
      Enabled: true || false
    },
    HibernationOptions: {
      Configured: true || false
    },
    IamInstanceProfile: {
      Arn: 'STRING_VALUE',
      Name: 'STRING_VALUE'
    },
    ImageId: 'STRING_VALUE',
    InstanceInitiatedShutdownBehavior: stop | terminate,
    InstanceMarketOptions: {
      MarketType: spot,
      SpotOptions: {
        BlockDurationMinutes: 'NUMBER_VALUE',
        InstanceInterruptionBehavior: hibernate | stop | terminate,
        MaxPrice: 'STRING_VALUE',
        SpotInstanceType: one-time | persistent,
        ValidUntil: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
      }
    },
    InstanceRequirements: {
      MemoryMiB: { /* required */
        Min: 'NUMBER_VALUE', /* required */
        Max: 'NUMBER_VALUE'
      },
      VCpuCount: { /* required */
        Min: 'NUMBER_VALUE', /* required */
        Max: 'NUMBER_VALUE'
      },
      AcceleratorCount: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      AcceleratorManufacturers: [
        nvidia | amd | amazon-web-services | xilinx,
        /* more items */
      ],
      AcceleratorNames: [
        a100 | v100 | k80 | t4 | m60 | radeon-pro-v520 | vu9p,
        /* more items */
      ],
      AcceleratorTotalMemoryMiB: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      AcceleratorTypes: [
        gpu | fpga | inference,
        /* more items */
      ],
      BareMetal: included | required | excluded,
      BaselineEbsBandwidthMbps: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      BurstablePerformance: included | required | excluded,
      CpuManufacturers: [
        intel | amd | amazon-web-services,
        /* more items */
      ],
      ExcludedInstanceTypes: [
        'STRING_VALUE',
        /* more items */
      ],
      InstanceGenerations: [
        current | previous,
        /* more items */
      ],
      LocalStorage: included | required | excluded,
      LocalStorageTypes: [
        hdd | ssd,
        /* more items */
      ],
      MemoryGiBPerVCpu: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      NetworkInterfaceCount: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      OnDemandMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
      RequireHibernateSupport: true || false,
      SpotMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
      TotalLocalStorageGB: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      }
    },
    InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
    KernelId: 'STRING_VALUE',
    KeyName: 'STRING_VALUE',
    LicenseSpecifications: [
      {
        LicenseConfigurationArn: 'STRING_VALUE'
      },
      /* more items */
    ],
    MetadataOptions: {
      HttpEndpoint: disabled | enabled,
      HttpProtocolIpv6: disabled | enabled,
      HttpPutResponseHopLimit: 'NUMBER_VALUE',
      HttpTokens: optional | required
    },
    Monitoring: {
      Enabled: true || false
    },
    NetworkInterfaces: [
      {
        AssociateCarrierIpAddress: true || false,
        AssociatePublicIpAddress: true || false,
        DeleteOnTermination: true || false,
        Description: 'STRING_VALUE',
        DeviceIndex: 'NUMBER_VALUE',
        Groups: [
          'STRING_VALUE',
          /* more items */
        ],
        InterfaceType: 'STRING_VALUE',
        Ipv4PrefixCount: 'NUMBER_VALUE',
        Ipv4Prefixes: [
          {
            Ipv4Prefix: 'STRING_VALUE'
          },
          /* more items */
        ],
        Ipv6AddressCount: 'NUMBER_VALUE',
        Ipv6Addresses: [
          {
            Ipv6Address: 'STRING_VALUE'
          },
          /* more items */
        ],
        Ipv6PrefixCount: 'NUMBER_VALUE',
        Ipv6Prefixes: [
          {
            Ipv6Prefix: 'STRING_VALUE'
          },
          /* more items */
        ],
        NetworkCardIndex: 'NUMBER_VALUE',
        NetworkInterfaceId: 'STRING_VALUE',
        PrivateIpAddress: 'STRING_VALUE',
        PrivateIpAddresses: [
          {
            Primary: true || false,
            PrivateIpAddress: 'STRING_VALUE'
          },
          /* more items */
        ],
        SecondaryPrivateIpAddressCount: 'NUMBER_VALUE',
        SubnetId: 'STRING_VALUE'
      },
      /* more items */
    ],
    Placement: {
      Affinity: 'STRING_VALUE',
      AvailabilityZone: 'STRING_VALUE',
      GroupName: 'STRING_VALUE',
      HostId: 'STRING_VALUE',
      HostResourceGroupArn: 'STRING_VALUE',
      PartitionNumber: 'NUMBER_VALUE',
      SpreadDomain: 'STRING_VALUE',
      Tenancy: default | dedicated | host
    },
    RamDiskId: 'STRING_VALUE',
    SecurityGroupIds: [
      'STRING_VALUE',
      /* more items */
    ],
    SecurityGroups: [
      'STRING_VALUE',
      /* more items */
    ],
    TagSpecifications: [
      {
        ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
        Tags: [
          {
            Key: 'STRING_VALUE',
            Value: 'STRING_VALUE'
          },
          /* more items */
        ]
      },
      /* more items */
    ],
    UserData: 'STRING_VALUE'
  },
  LaunchTemplateName: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  VersionDescription: 'STRING_VALUE'
};
ec2.createLaunchTemplate(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.

    • ClientToken — (String)

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

      Constraint: Maximum 128 ASCII characters.

    • LaunchTemplateName — (String)

      A name for the launch template.

    • VersionDescription — (String)

      A description for the first version of the launch template.

    • LaunchTemplateData — (map)

      The information for the launch template.

      • KernelId — (String)

        The ID of the kernel.

        We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.

      • EbsOptimized — (Boolean)

        Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

      • IamInstanceProfile — (map)

        The name or Amazon Resource Name (ARN) of an IAM instance profile.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the instance profile.

        • Name — (String)

          The name of the instance profile.

      • BlockDeviceMappings — (Array<map>)

        The block device mapping.

        • DeviceName — (String)

          The device name (for example, /dev/sdh or xvdh).

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

        • Ebs — (map)

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

          • Encrypted — (Boolean)

            Indicates whether the EBS volume is encrypted. Encrypted volumes can only be attached to instances that support Amazon EBS encryption. If you are creating a volume from a snapshot, you can't specify an encryption value.

          • DeleteOnTermination — (Boolean)

            Indicates whether the EBS volume is deleted on instance termination.

          • Iops — (Integer)

            The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

            The following are the supported values for each volume type:

            • gp3: 3,000-16,000 IOPS

            • io1: 100-64,000 IOPS

            • io2: 100-64,000 IOPS

            For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

            This parameter is supported for io1, io2, and gp3 volumes only. This parameter is not supported for gp2, st1, sc1, or standard volumes.

          • KmsKeyId — (String)

            The ARN of the symmetric Key Management Service (KMS) CMK used for encryption.

          • SnapshotId — (String)

            The ID of the snapshot.

          • VolumeSize — (Integer)

            The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. The following are the supported volumes sizes for each volume type:

            • gp2 and gp3: 1-16,384

            • io1 and io2: 4-16,384

            • st1 and sc1: 125-16,384

            • standard: 1-1,024

          • VolumeType — (String)

            The volume type. For more information, see Amazon EBS volume types in the Amazon Elastic Compute Cloud User Guide.

            Possible values include:
            • "standard"
            • "io1"
            • "io2"
            • "gp2"
            • "sc1"
            • "st1"
            • "gp3"
          • Throughput — (Integer)

            The throughput to provision for a gp3 volume, with a maximum of 1,000 MiB/s.

            Valid Range: Minimum value of 125. Maximum value of 1000.

        • NoDevice — (String)

          To omit the device from the block device mapping, specify an empty string.

      • NetworkInterfaces — (Array<map>)

        One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.

        • AssociateCarrierIpAddress — (Boolean)

          Associates a Carrier IP address with eth0 for a new network interface.

          Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Wavelength Developer Guide.

        • AssociatePublicIpAddress — (Boolean)

          Associates a public IPv4 address with eth0 for a new network interface.

        • DeleteOnTermination — (Boolean)

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

        • Description — (String)

          A description for the network interface.

        • DeviceIndex — (Integer)

          The device index for the network interface attachment.

        • Groups — (Array<String>)

          The IDs of one or more security groups.

        • InterfaceType — (String)

          The type of network interface. To create an Elastic Fabric Adapter (EFA), specify efa. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide.

          If you are not creating an EFA, specify interface or omit this parameter.

          Valid values: interface | efa

        • Ipv6AddressCount — (Integer)

          The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.

        • Ipv6Addresses — (Array<map>)

          One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.

          • Ipv6Address — (String)

            The IPv6 address.

        • NetworkInterfaceId — (String)

          The ID of the network interface.

        • PrivateIpAddress — (String)

          The primary private IPv4 address of the network interface.

        • PrivateIpAddresses — (Array<map>)

          One or more private IPv4 addresses.

          • Primary — (Boolean)

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

          • PrivateIpAddress — (String)

            The private IPv4 addresses.

        • SecondaryPrivateIpAddressCount — (Integer)

          The number of secondary private IPv4 addresses to assign to a network interface.

        • SubnetId — (String)

          The ID of the subnet for the network interface.

        • NetworkCardIndex — (Integer)

          The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

        • Ipv4Prefixes — (Array<map>)

          One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

        • Ipv4PrefixCount — (Integer)

          The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

        • Ipv6Prefixes — (Array<map>)

          One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

          • Ipv6Prefix — (String)

            The IPv6 prefix.

        • Ipv6PrefixCount — (Integer)

          The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

      • ImageId — (String)

        The ID of the AMI.

      • InstanceType — (String)

        The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.

        If you specify InstanceTypes, you can't specify InstanceRequirements.

        Possible values include:
        • "t1.micro"
        • "t2.nano"
        • "t2.micro"
        • "t2.small"
        • "t2.medium"
        • "t2.large"
        • "t2.xlarge"
        • "t2.2xlarge"
        • "t3.nano"
        • "t3.micro"
        • "t3.small"
        • "t3.medium"
        • "t3.large"
        • "t3.xlarge"
        • "t3.2xlarge"
        • "t3a.nano"
        • "t3a.micro"
        • "t3a.small"
        • "t3a.medium"
        • "t3a.large"
        • "t3a.xlarge"
        • "t3a.2xlarge"
        • "t4g.nano"
        • "t4g.micro"
        • "t4g.small"
        • "t4g.medium"
        • "t4g.large"
        • "t4g.xlarge"
        • "t4g.2xlarge"
        • "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"
        • "m4.16xlarge"
        • "m2.xlarge"
        • "m2.2xlarge"
        • "m2.4xlarge"
        • "cr1.8xlarge"
        • "r3.large"
        • "r3.xlarge"
        • "r3.2xlarge"
        • "r3.4xlarge"
        • "r3.8xlarge"
        • "r4.large"
        • "r4.xlarge"
        • "r4.2xlarge"
        • "r4.4xlarge"
        • "r4.8xlarge"
        • "r4.16xlarge"
        • "r5.large"
        • "r5.xlarge"
        • "r5.2xlarge"
        • "r5.4xlarge"
        • "r5.8xlarge"
        • "r5.12xlarge"
        • "r5.16xlarge"
        • "r5.24xlarge"
        • "r5.metal"
        • "r5a.large"
        • "r5a.xlarge"
        • "r5a.2xlarge"
        • "r5a.4xlarge"
        • "r5a.8xlarge"
        • "r5a.12xlarge"
        • "r5a.16xlarge"
        • "r5a.24xlarge"
        • "r5b.large"
        • "r5b.xlarge"
        • "r5b.2xlarge"
        • "r5b.4xlarge"
        • "r5b.8xlarge"
        • "r5b.12xlarge"
        • "r5b.16xlarge"
        • "r5b.24xlarge"
        • "r5b.metal"
        • "r5d.large"
        • "r5d.xlarge"
        • "r5d.2xlarge"
        • "r5d.4xlarge"
        • "r5d.8xlarge"
        • "r5d.12xlarge"
        • "r5d.16xlarge"
        • "r5d.24xlarge"
        • "r5d.metal"
        • "r5ad.large"
        • "r5ad.xlarge"
        • "r5ad.2xlarge"
        • "r5ad.4xlarge"
        • "r5ad.8xlarge"
        • "r5ad.12xlarge"
        • "r5ad.16xlarge"
        • "r5ad.24xlarge"
        • "r6g.metal"
        • "r6g.medium"
        • "r6g.large"
        • "r6g.xlarge"
        • "r6g.2xlarge"
        • "r6g.4xlarge"
        • "r6g.8xlarge"
        • "r6g.12xlarge"
        • "r6g.16xlarge"
        • "r6gd.metal"
        • "r6gd.medium"
        • "r6gd.large"
        • "r6gd.xlarge"
        • "r6gd.2xlarge"
        • "r6gd.4xlarge"
        • "r6gd.8xlarge"
        • "r6gd.12xlarge"
        • "r6gd.16xlarge"
        • "x1.16xlarge"
        • "x1.32xlarge"
        • "x1e.xlarge"
        • "x1e.2xlarge"
        • "x1e.4xlarge"
        • "x1e.8xlarge"
        • "x1e.16xlarge"
        • "x1e.32xlarge"
        • "i2.xlarge"
        • "i2.2xlarge"
        • "i2.4xlarge"
        • "i2.8xlarge"
        • "i3.large"
        • "i3.xlarge"
        • "i3.2xlarge"
        • "i3.4xlarge"
        • "i3.8xlarge"
        • "i3.16xlarge"
        • "i3.metal"
        • "i3en.large"
        • "i3en.xlarge"
        • "i3en.2xlarge"
        • "i3en.3xlarge"
        • "i3en.6xlarge"
        • "i3en.12xlarge"
        • "i3en.24xlarge"
        • "i3en.metal"
        • "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"
        • "c5.large"
        • "c5.xlarge"
        • "c5.2xlarge"
        • "c5.4xlarge"
        • "c5.9xlarge"
        • "c5.12xlarge"
        • "c5.18xlarge"
        • "c5.24xlarge"
        • "c5.metal"
        • "c5a.large"
        • "c5a.xlarge"
        • "c5a.2xlarge"
        • "c5a.4xlarge"
        • "c5a.8xlarge"
        • "c5a.12xlarge"
        • "c5a.16xlarge"
        • "c5a.24xlarge"
        • "c5ad.large"
        • "c5ad.xlarge"
        • "c5ad.2xlarge"
        • "c5ad.4xlarge"
        • "c5ad.8xlarge"
        • "c5ad.12xlarge"
        • "c5ad.16xlarge"
        • "c5ad.24xlarge"
        • "c5d.large"
        • "c5d.xlarge"
        • "c5d.2xlarge"
        • "c5d.4xlarge"
        • "c5d.9xlarge"
        • "c5d.12xlarge"
        • "c5d.18xlarge"
        • "c5d.24xlarge"
        • "c5d.metal"
        • "c5n.large"
        • "c5n.xlarge"
        • "c5n.2xlarge"
        • "c5n.4xlarge"
        • "c5n.9xlarge"
        • "c5n.18xlarge"
        • "c5n.metal"
        • "c6g.metal"
        • "c6g.medium"
        • "c6g.large"
        • "c6g.xlarge"
        • "c6g.2xlarge"
        • "c6g.4xlarge"
        • "c6g.8xlarge"
        • "c6g.12xlarge"
        • "c6g.16xlarge"
        • "c6gd.metal"
        • "c6gd.medium"
        • "c6gd.large"
        • "c6gd.xlarge"
        • "c6gd.2xlarge"
        • "c6gd.4xlarge"
        • "c6gd.8xlarge"
        • "c6gd.12xlarge"
        • "c6gd.16xlarge"
        • "c6gn.medium"
        • "c6gn.large"
        • "c6gn.xlarge"
        • "c6gn.2xlarge"
        • "c6gn.4xlarge"
        • "c6gn.8xlarge"
        • "c6gn.12xlarge"
        • "c6gn.16xlarge"
        • "cc1.4xlarge"
        • "cc2.8xlarge"
        • "g2.2xlarge"
        • "g2.8xlarge"
        • "g3.4xlarge"
        • "g3.8xlarge"
        • "g3.16xlarge"
        • "g3s.xlarge"
        • "g4ad.xlarge"
        • "g4ad.2xlarge"
        • "g4ad.4xlarge"
        • "g4ad.8xlarge"
        • "g4ad.16xlarge"
        • "g4dn.xlarge"
        • "g4dn.2xlarge"
        • "g4dn.4xlarge"
        • "g4dn.8xlarge"
        • "g4dn.12xlarge"
        • "g4dn.16xlarge"
        • "g4dn.metal"
        • "cg1.4xlarge"
        • "p2.xlarge"
        • "p2.8xlarge"
        • "p2.16xlarge"
        • "p3.2xlarge"
        • "p3.8xlarge"
        • "p3.16xlarge"
        • "p3dn.24xlarge"
        • "p4d.24xlarge"
        • "d2.xlarge"
        • "d2.2xlarge"
        • "d2.4xlarge"
        • "d2.8xlarge"
        • "d3.xlarge"
        • "d3.2xlarge"
        • "d3.4xlarge"
        • "d3.8xlarge"
        • "d3en.xlarge"
        • "d3en.2xlarge"
        • "d3en.4xlarge"
        • "d3en.6xlarge"
        • "d3en.8xlarge"
        • "d3en.12xlarge"
        • "dl1.24xlarge"
        • "f1.2xlarge"
        • "f1.4xlarge"
        • "f1.16xlarge"
        • "m5.large"
        • "m5.xlarge"
        • "m5.2xlarge"
        • "m5.4xlarge"
        • "m5.8xlarge"
        • "m5.12xlarge"
        • "m5.16xlarge"
        • "m5.24xlarge"
        • "m5.metal"
        • "m5a.large"
        • "m5a.xlarge"
        • "m5a.2xlarge"
        • "m5a.4xlarge"
        • "m5a.8xlarge"
        • "m5a.12xlarge"
        • "m5a.16xlarge"
        • "m5a.24xlarge"
        • "m5d.large"
        • "m5d.xlarge"
        • "m5d.2xlarge"
        • "m5d.4xlarge"
        • "m5d.8xlarge"
        • "m5d.12xlarge"
        • "m5d.16xlarge"
        • "m5d.24xlarge"
        • "m5d.metal"
        • "m5ad.large"
        • "m5ad.xlarge"
        • "m5ad.2xlarge"
        • "m5ad.4xlarge"
        • "m5ad.8xlarge"
        • "m5ad.12xlarge"
        • "m5ad.16xlarge"
        • "m5ad.24xlarge"
        • "m5zn.large"
        • "m5zn.xlarge"
        • "m5zn.2xlarge"
        • "m5zn.3xlarge"
        • "m5zn.6xlarge"
        • "m5zn.12xlarge"
        • "m5zn.metal"
        • "h1.2xlarge"
        • "h1.4xlarge"
        • "h1.8xlarge"
        • "h1.16xlarge"
        • "z1d.large"
        • "z1d.xlarge"
        • "z1d.2xlarge"
        • "z1d.3xlarge"
        • "z1d.6xlarge"
        • "z1d.12xlarge"
        • "z1d.metal"
        • "u-6tb1.56xlarge"
        • "u-6tb1.112xlarge"
        • "u-9tb1.112xlarge"
        • "u-12tb1.112xlarge"
        • "u-6tb1.metal"
        • "u-9tb1.metal"
        • "u-12tb1.metal"
        • "u-18tb1.metal"
        • "u-24tb1.metal"
        • "a1.medium"
        • "a1.large"
        • "a1.xlarge"
        • "a1.2xlarge"
        • "a1.4xlarge"
        • "a1.metal"
        • "m5dn.large"
        • "m5dn.xlarge"
        • "m5dn.2xlarge"
        • "m5dn.4xlarge"
        • "m5dn.8xlarge"
        • "m5dn.12xlarge"
        • "m5dn.16xlarge"
        • "m5dn.24xlarge"
        • "m5dn.metal"
        • "m5n.large"
        • "m5n.xlarge"
        • "m5n.2xlarge"
        • "m5n.4xlarge"
        • "m5n.8xlarge"
        • "m5n.12xlarge"
        • "m5n.16xlarge"
        • "m5n.24xlarge"
        • "m5n.metal"
        • "r5dn.large"
        • "r5dn.xlarge"
        • "r5dn.2xlarge"
        • "r5dn.4xlarge"
        • "r5dn.8xlarge"
        • "r5dn.12xlarge"
        • "r5dn.16xlarge"
        • "r5dn.24xlarge"
        • "r5dn.metal"
        • "r5n.large"
        • "r5n.xlarge"
        • "r5n.2xlarge"
        • "r5n.4xlarge"
        • "r5n.8xlarge"
        • "r5n.12xlarge"
        • "r5n.16xlarge"
        • "r5n.24xlarge"
        • "r5n.metal"
        • "inf1.xlarge"
        • "inf1.2xlarge"
        • "inf1.6xlarge"
        • "inf1.24xlarge"
        • "m6g.metal"
        • "m6g.medium"
        • "m6g.large"
        • "m6g.xlarge"
        • "m6g.2xlarge"
        • "m6g.4xlarge"
        • "m6g.8xlarge"
        • "m6g.12xlarge"
        • "m6g.16xlarge"
        • "m6gd.metal"
        • "m6gd.medium"
        • "m6gd.large"
        • "m6gd.xlarge"
        • "m6gd.2xlarge"
        • "m6gd.4xlarge"
        • "m6gd.8xlarge"
        • "m6gd.12xlarge"
        • "m6gd.16xlarge"
        • "m6i.large"
        • "m6i.xlarge"
        • "m6i.2xlarge"
        • "m6i.4xlarge"
        • "m6i.8xlarge"
        • "m6i.12xlarge"
        • "m6i.16xlarge"
        • "m6i.24xlarge"
        • "m6i.32xlarge"
        • "mac1.metal"
        • "x2gd.medium"
        • "x2gd.large"
        • "x2gd.xlarge"
        • "x2gd.2xlarge"
        • "x2gd.4xlarge"
        • "x2gd.8xlarge"
        • "x2gd.12xlarge"
        • "x2gd.16xlarge"
        • "x2gd.metal"
        • "vt1.3xlarge"
        • "vt1.6xlarge"
        • "vt1.24xlarge"
      • KeyName — (String)

        The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.

        If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.

      • Monitoring — (map)

        The monitoring for the instance.

        • Enabled — (Boolean)

          Specify true to enable detailed monitoring. Otherwise, basic monitoring is enabled.

      • Placement — (map)

        The placement for the instance.

        • AvailabilityZone — (String)

          The Availability Zone for the instance.

        • Affinity — (String)

          The affinity setting for an instance on a Dedicated Host.

        • GroupName — (String)

          The name of the placement group for the instance.

        • HostId — (String)

          The ID of the Dedicated Host for the instance.

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

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • SpreadDomain — (String)

          Reserved for future use.

        • HostResourceGroupArn — (String)

          The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

        • PartitionNumber — (Integer)

          The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.

      • RamDiskId — (String)

        The ID of the RAM disk.

        We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.

      • DisableApiTermination — (Boolean)

        If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance by running the shutdown command from the instance.

      • InstanceInitiatedShutdownBehavior — (String)

        Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

        Default: stop

        Possible values include:
        • "stop"
        • "terminate"
      • UserData — (String)

        The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see Running Commands on Your Linux Instance at Launch (Linux) or Adding User Data (Windows).

        If you are creating the launch template for use with Batch, the user data must be provided in the MIME multi-part archive format. For more information, see Amazon EC2 user data in launch templates in the Batch User Guide.

      • TagSpecifications — (Array<map>)

        The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.

        • ResourceType — (String)

          The type of resource to tag. Currently, the resource types that support tagging on creation are instance and volume. To tag a resource after it has been created, see CreateTags.

          Possible values include:
          • "capacity-reservation"
          • "client-vpn-endpoint"
          • "customer-gateway"
          • "carrier-gateway"
          • "dedicated-host"
          • "dhcp-options"
          • "egress-only-internet-gateway"
          • "elastic-ip"
          • "elastic-gpu"
          • "export-image-task"
          • "export-instance-task"
          • "fleet"
          • "fpga-image"
          • "host-reservation"
          • "image"
          • "import-image-task"
          • "import-snapshot-task"
          • "instance"
          • "instance-event-window"
          • "internet-gateway"
          • "ipv4pool-ec2"
          • "ipv6pool-ec2"
          • "key-pair"
          • "launch-template"
          • "local-gateway"
          • "local-gateway-route-table"
          • "local-gateway-virtual-interface"
          • "local-gateway-virtual-interface-group"
          • "local-gateway-route-table-vpc-association"
          • "local-gateway-route-table-virtual-interface-group-association"
          • "natgateway"
          • "network-acl"
          • "network-interface"
          • "network-insights-analysis"
          • "network-insights-path"
          • "placement-group"
          • "prefix-list"
          • "replace-root-volume-task"
          • "reserved-instances"
          • "route-table"
          • "security-group"
          • "security-group-rule"
          • "snapshot"
          • "spot-fleet-request"
          • "spot-instances-request"
          • "subnet"
          • "traffic-mirror-filter"
          • "traffic-mirror-session"
          • "traffic-mirror-target"
          • "transit-gateway"
          • "transit-gateway-attachment"
          • "transit-gateway-connect-peer"
          • "transit-gateway-multicast-domain"
          • "transit-gateway-route-table"
          • "volume"
          • "vpc"
          • "vpc-endpoint"
          • "vpc-endpoint-service"
          • "vpc-peering-connection"
          • "vpn-connection"
          • "vpn-gateway"
          • "vpc-flow-log"
        • Tags — (Array<map>)

          The tags to apply 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.

      • ElasticGpuSpecifications — (Array<map>)

        An elastic GPU to associate with the instance.

        • Typerequired — (String)

          The type of Elastic Graphics accelerator. For more information about the values to specify for Type, see Elastic Graphics Basics, specifically the Elastic Graphics accelerator column, in the Amazon Elastic Compute Cloud User Guide for Windows Instances.

      • ElasticInferenceAccelerators — (Array<map>)

        The elastic inference accelerator for the instance.

        • Typerequired — (String)

          The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

        • Count — (Integer)

          The number of elastic inference accelerators to attach to the instance.

          Default: 1

      • SecurityGroupIds — (Array<String>)

        One or more security group IDs. You can create a security group using CreateSecurityGroup. You cannot specify both a security group ID and security name in the same request.

      • SecurityGroups — (Array<String>)

        [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.

      • InstanceMarketOptions — (map)

        The market (purchasing) option for the instances.

        • MarketType — (String)

          The market type.

          Possible values include:
          • "spot"
        • SpotOptions — (map)

          The options for Spot Instances.

          • MaxPrice — (String)

            The maximum hourly price you're willing to pay for the Spot Instances.

          • SpotInstanceType — (String)

            The Spot Instance request type.

            Possible values include:
            • "one-time"
            • "persistent"
          • BlockDurationMinutes — (Integer)

            The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).

          • ValidUntil — (Date)

            The end date of the request. For a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached. The default end date is 7 days from the current date.

          • InstanceInterruptionBehavior — (String)

            The behavior when a Spot Instance is interrupted. The default is terminate.

            Possible values include:
            • "hibernate"
            • "stop"
            • "terminate"
      • CreditSpecification — (map)

        The credit option for CPU usage of the instance. Valid for T2, T3, or T3a instances only.

        • CpuCreditsrequired — (String)

          The credit option for CPU usage of a T2, T3, or T3a instance. Valid values are standard and unlimited.

      • CpuOptions — (map)

        The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide.

        • CoreCount — (Integer)

          The number of CPU cores for the instance.

        • ThreadsPerCore — (Integer)

          The number of threads per CPU core. To disable multithreading for the instance, specify a value of 1. Otherwise, specify the default value of 2.

      • CapacityReservationSpecification — (map)

        The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

        • CapacityReservationPreference — (String)

          Indicates the instance's Capacity Reservation preferences. Possible preferences include:

          • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

          • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

          Possible values include:
          • "open"
          • "none"
        • CapacityReservationTarget — (map)

          Information about the target Capacity Reservation or Capacity Reservation group.

          • CapacityReservationId — (String)

            The ID of the Capacity Reservation in which to run the instance.

          • CapacityReservationResourceGroupArn — (String)

            The ARN of the Capacity Reservation resource group in which to run the instance.

      • LicenseSpecifications — (Array<map>)

        The license configurations.

        • LicenseConfigurationArn — (String)

          The Amazon Resource Name (ARN) of the license configuration.

      • HibernationOptions — (map)

        Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide.

        • Configured — (Boolean)

          If you set this parameter to true, the instance is enabled for hibernation.

          Default: false

      • MetadataOptions — (map)

        The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide.

        • HttpTokens — (String)

          The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

          If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

          If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

          Possible values include:
          • "optional"
          • "required"
        • HttpPutResponseHopLimit — (Integer)

          The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

          Default: 1

          Possible values: Integers from 1 to 64

        • HttpEndpoint — (String)

          This parameter enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled.

          Note: If you specify a value of disabled, you will not be able to access your instance metadata.
          Possible values include:
          • "disabled"
          • "enabled"
        • HttpProtocolIpv6 — (String)

          Enables or disables the IPv6 endpoint for the instance metadata service.

          Default: disabled

          Possible values include:
          • "disabled"
          • "enabled"
      • EnclaveOptions — (map)

        Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide.

        You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.

        • Enabled — (Boolean)

          To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true.

      • InstanceRequirements — (map)

        The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.

        If you specify InstanceRequirements, you can't specify InstanceTypes.

        • VCpuCountrequired — (map)

          The minimum and maximum number of vCPUs.

          • Minrequired — (Integer)

            The minimum number of vCPUs. To specify no minimum limit, specify 0.

          • Max — (Integer)

            The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

        • MemoryMiBrequired — (map)

          The minimum and maximum amount of memory, in MiB.

          • Minrequired — (Integer)

            The minimum amount of memory, in MiB. To specify no minimum limit, specify 0.

          • Max — (Integer)

            The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

        • CpuManufacturers — (Array<String>)

          The CPU manufacturers to include.

          • For instance types with Intel CPUs, specify intel.

          • For instance types with AMD CPUs, specify amd.

          • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

          Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

          Default: Any manufacturer

        • MemoryGiBPerVCpu — (map)

          The minimum and maximum amount of memory per vCPU, in GiB.

          Default: No minimum or maximum limits

          • Min — (Float)

            The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

          • Max — (Float)

            The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

        • ExcludedInstanceTypes — (Array<String>)

          The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

          For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

          Default: No excluded instance types

        • InstanceGenerations — (Array<String>)

          Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

          For current generation instance types, specify current.

          For previous generation instance types, specify previous.

          Default: Current and previous generation instance types

        • SpotMaxPricePercentageOverLowestPrice — (Integer)

          The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

          The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

          To turn off price protection, specify a high value, such as 999999.

          This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

          Default: 100

        • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

          The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

          The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

          To turn off price protection, specify a high value, such as 999999.

          This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

          Default: 20

        • BareMetal — (String)

          Indicates whether bare metal instance types must be included, excluded, or required.

          • To include bare metal instance types, specify included.

          • To require only bare metal instance types, specify required.

          • To exclude bare metal instance types, specify excluded.

          Default: excluded

          Possible values include:
          • "included"
          • "required"
          • "excluded"
        • BurstablePerformance — (String)

          Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

          • To include burstable performance instance types, specify included.

          • To require only burstable performance instance types, specify required.

          • To exclude burstable performance instance types, specify excluded.

          Default: excluded

          Possible values include:
          • "included"
          • "required"
          • "excluded"
        • RequireHibernateSupport — (Boolean)

          Indicates whether instance types must support hibernation for On-Demand Instances.

          This parameter is not supported for GetSpotPlacementScores.

          Default: false

        • NetworkInterfaceCount — (map)

          The minimum and maximum number of network interfaces.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

        • LocalStorage — (String)

          Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

          • To include instance types with instance store volumes, specify included.

          • To require only instance types with instance store volumes, specify required.

          • To exclude instance types with instance store volumes, specify excluded.

          Default: included

          Possible values include:
          • "included"
          • "required"
          • "excluded"
        • LocalStorageTypes — (Array<String>)

          The type of local storage that is required.

          • For instance types with hard disk drive (HDD) storage, specify hdd.

          • For instance types with solid state drive (SDD) storage, specify sdd.

          Default: hdd and sdd

        • TotalLocalStorageGB — (map)

          The minimum and maximum amount of total local storage, in GB.

          Default: No minimum or maximum limits

          • Min — (Float)

            The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

          • Max — (Float)

            The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

        • BaselineEbsBandwidthMbps — (map)

          The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

        • AcceleratorTypes — (Array<String>)

          The accelerator types that must be on the instance type.

          • To include instance types with GPU hardware, specify gpu.

          • To include instance types with FPGA hardware, specify fpga.

          • To include instance types with inference hardware, specify inference.

          Default: Any accelerator type

        • AcceleratorCount — (map)

          The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

          To exclude accelerator-enabled instance types, set Max to 0.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum number of accelerators. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0.

        • AcceleratorManufacturers — (Array<String>)

          Indicates whether instance types must have accelerators by specific manufacturers.

          • For instance types with NVIDIA devices, specify nvidia.

          • For instance types with AMD devices, specify amd.

          • For instance types with Amazon Web Services devices, specify amazon-web-services.

          • For instance types with Xilinx devices, specify xilinx.

          Default: Any manufacturer

        • AcceleratorNames — (Array<String>)

          The accelerators that must be on the instance type.

          • For instance types with NVIDIA A100 GPUs, specify a100.

          • For instance types with NVIDIA V100 GPUs, specify v100.

          • For instance types with NVIDIA K80 GPUs, specify k80.

          • For instance types with NVIDIA T4 GPUs, specify t4.

          • For instance types with NVIDIA M60 GPUs, specify m60.

          • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

          • For instance types with Xilinx VU9P FPGAs, specify vu9p.

          Default: Any accelerator

        • AcceleratorTotalMemoryMiB — (map)

          The minimum and maximum amount of total accelerator memory, in MiB.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

    • TagSpecifications — (Array<map>)

      The tags to apply to the launch template during creation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • LaunchTemplate — (map)

        Information about the launch template.

        • LaunchTemplateId — (String)

          The ID of the launch template.

        • LaunchTemplateName — (String)

          The name of the launch template.

        • CreateTime — (Date)

          The time launch template was created.

        • CreatedBy — (String)

          The principal that created the launch template.

        • DefaultVersionNumber — (Integer)

          The version number of the default version of the launch template.

        • LatestVersionNumber — (Integer)

          The version number of the latest version of the launch template.

        • Tags — (Array<map>)

          The tags for the launch template.

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

      • Warning — (map)

        If the launch template contains parameters or parameter combinations that are not valid, an error code and an error message are returned for each issue that's found.

        • Errors — (Array<map>)

          The error codes and error messages.

          • Code — (String)

            The error code that indicates why the parameter or parameter combination is not valid. For more information about error codes, see Error Codes.

          • Message — (String)

            The error message that describes why the parameter or parameter combination is not valid. For more information about error messages, see Error Codes.

Returns:

  • (AWS.Request)

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

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

Creates a new version for a launch template. You can specify an existing version of launch template from which to base the new version.

Launch template versions are numbered in the order in which they are created. You cannot specify, change, or replace the numbering of launch template versions.

For more information, see Managing launch template versionsin the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To create a launch template version


/* This example creates a new launch template version based on version 1 of the specified launch template and specifies a different AMI ID. */

 var params = {
  LaunchTemplateData: {
   ImageId: "ami-c998b6b2"
  }, 
  LaunchTemplateId: "lt-0abcd290751193123", 
  SourceVersion: "1", 
  VersionDescription: "WebVersion2"
 };
 ec2.createLaunchTemplateVersion(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    LaunchTemplateVersion: {
     CreateTime: <Date Representation>, 
     CreatedBy: "arn:aws:iam::123456789012:root", 
     DefaultVersion: false, 
     LaunchTemplateData: {
      ImageId: "ami-c998b6b2", 
      InstanceType: "t2.micro", 
      NetworkInterfaces: [
         {
        AssociatePublicIpAddress: true, 
        DeviceIndex: 0, 
        Ipv6Addresses: [
           {
          Ipv6Address: "2001:db8:1234:1a00::123"
         }
        ], 
        SubnetId: "subnet-7b16de0c"
       }
      ]
     }, 
     LaunchTemplateId: "lt-0abcd290751193123", 
     LaunchTemplateName: "my-template", 
     VersionDescription: "WebVersion2", 
     VersionNumber: 2
    }
   }
   */
 });

Calling the createLaunchTemplateVersion operation

var params = {
  LaunchTemplateData: { /* required */
    BlockDeviceMappings: [
      {
        DeviceName: 'STRING_VALUE',
        Ebs: {
          DeleteOnTermination: true || false,
          Encrypted: true || false,
          Iops: 'NUMBER_VALUE',
          KmsKeyId: 'STRING_VALUE',
          SnapshotId: 'STRING_VALUE',
          Throughput: 'NUMBER_VALUE',
          VolumeSize: 'NUMBER_VALUE',
          VolumeType: standard | io1 | io2 | gp2 | sc1 | st1 | gp3
        },
        NoDevice: 'STRING_VALUE',
        VirtualName: 'STRING_VALUE'
      },
      /* more items */
    ],
    CapacityReservationSpecification: {
      CapacityReservationPreference: open | none,
      CapacityReservationTarget: {
        CapacityReservationId: 'STRING_VALUE',
        CapacityReservationResourceGroupArn: 'STRING_VALUE'
      }
    },
    CpuOptions: {
      CoreCount: 'NUMBER_VALUE',
      ThreadsPerCore: 'NUMBER_VALUE'
    },
    CreditSpecification: {
      CpuCredits: 'STRING_VALUE' /* required */
    },
    DisableApiTermination: true || false,
    EbsOptimized: true || false,
    ElasticGpuSpecifications: [
      {
        Type: 'STRING_VALUE' /* required */
      },
      /* more items */
    ],
    ElasticInferenceAccelerators: [
      {
        Type: 'STRING_VALUE', /* required */
        Count: 'NUMBER_VALUE'
      },
      /* more items */
    ],
    EnclaveOptions: {
      Enabled: true || false
    },
    HibernationOptions: {
      Configured: true || false
    },
    IamInstanceProfile: {
      Arn: 'STRING_VALUE',
      Name: 'STRING_VALUE'
    },
    ImageId: 'STRING_VALUE',
    InstanceInitiatedShutdownBehavior: stop | terminate,
    InstanceMarketOptions: {
      MarketType: spot,
      SpotOptions: {
        BlockDurationMinutes: 'NUMBER_VALUE',
        InstanceInterruptionBehavior: hibernate | stop | terminate,
        MaxPrice: 'STRING_VALUE',
        SpotInstanceType: one-time | persistent,
        ValidUntil: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
      }
    },
    InstanceRequirements: {
      MemoryMiB: { /* required */
        Min: 'NUMBER_VALUE', /* required */
        Max: 'NUMBER_VALUE'
      },
      VCpuCount: { /* required */
        Min: 'NUMBER_VALUE', /* required */
        Max: 'NUMBER_VALUE'
      },
      AcceleratorCount: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      AcceleratorManufacturers: [
        nvidia | amd | amazon-web-services | xilinx,
        /* more items */
      ],
      AcceleratorNames: [
        a100 | v100 | k80 | t4 | m60 | radeon-pro-v520 | vu9p,
        /* more items */
      ],
      AcceleratorTotalMemoryMiB: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      AcceleratorTypes: [
        gpu | fpga | inference,
        /* more items */
      ],
      BareMetal: included | required | excluded,
      BaselineEbsBandwidthMbps: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      BurstablePerformance: included | required | excluded,
      CpuManufacturers: [
        intel | amd | amazon-web-services,
        /* more items */
      ],
      ExcludedInstanceTypes: [
        'STRING_VALUE',
        /* more items */
      ],
      InstanceGenerations: [
        current | previous,
        /* more items */
      ],
      LocalStorage: included | required | excluded,
      LocalStorageTypes: [
        hdd | ssd,
        /* more items */
      ],
      MemoryGiBPerVCpu: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      NetworkInterfaceCount: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      OnDemandMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
      RequireHibernateSupport: true || false,
      SpotMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
      TotalLocalStorageGB: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      }
    },
    InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
    KernelId: 'STRING_VALUE',
    KeyName: 'STRING_VALUE',
    LicenseSpecifications: [
      {
        LicenseConfigurationArn: 'STRING_VALUE'
      },
      /* more items */
    ],
    MetadataOptions: {
      HttpEndpoint: disabled | enabled,
      HttpProtocolIpv6: disabled | enabled,
      HttpPutResponseHopLimit: 'NUMBER_VALUE',
      HttpTokens: optional | required
    },
    Monitoring: {
      Enabled: true || false
    },
    NetworkInterfaces: [
      {
        AssociateCarrierIpAddress: true || false,
        AssociatePublicIpAddress: true || false,
        DeleteOnTermination: true || false,
        Description: 'STRING_VALUE',
        DeviceIndex: 'NUMBER_VALUE',
        Groups: [
          'STRING_VALUE',
          /* more items */
        ],
        InterfaceType: 'STRING_VALUE',
        Ipv4PrefixCount: 'NUMBER_VALUE',
        Ipv4Prefixes: [
          {
            Ipv4Prefix: 'STRING_VALUE'
          },
          /* more items */
        ],
        Ipv6AddressCount: 'NUMBER_VALUE',
        Ipv6Addresses: [
          {
            Ipv6Address: 'STRING_VALUE'
          },
          /* more items */
        ],
        Ipv6PrefixCount: 'NUMBER_VALUE',
        Ipv6Prefixes: [
          {
            Ipv6Prefix: 'STRING_VALUE'
          },
          /* more items */
        ],
        NetworkCardIndex: 'NUMBER_VALUE',
        NetworkInterfaceId: 'STRING_VALUE',
        PrivateIpAddress: 'STRING_VALUE',
        PrivateIpAddresses: [
          {
            Primary: true || false,
            PrivateIpAddress: 'STRING_VALUE'
          },
          /* more items */
        ],
        SecondaryPrivateIpAddressCount: 'NUMBER_VALUE',
        SubnetId: 'STRING_VALUE'
      },
      /* more items */
    ],
    Placement: {
      Affinity: 'STRING_VALUE',
      AvailabilityZone: 'STRING_VALUE',
      GroupName: 'STRING_VALUE',
      HostId: 'STRING_VALUE',
      HostResourceGroupArn: 'STRING_VALUE',
      PartitionNumber: 'NUMBER_VALUE',
      SpreadDomain: 'STRING_VALUE',
      Tenancy: default | dedicated | host
    },
    RamDiskId: 'STRING_VALUE',
    SecurityGroupIds: [
      'STRING_VALUE',
      /* more items */
    ],
    SecurityGroups: [
      'STRING_VALUE',
      /* more items */
    ],
    TagSpecifications: [
      {
        ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
        Tags: [
          {
            Key: 'STRING_VALUE',
            Value: 'STRING_VALUE'
          },
          /* more items */
        ]
      },
      /* more items */
    ],
    UserData: 'STRING_VALUE'
  },
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  LaunchTemplateId: 'STRING_VALUE',
  LaunchTemplateName: 'STRING_VALUE',
  SourceVersion: 'STRING_VALUE',
  VersionDescription: 'STRING_VALUE'
};
ec2.createLaunchTemplateVersion(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.

    • ClientToken — (String)

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

      Constraint: Maximum 128 ASCII characters.

    • LaunchTemplateId — (String)

      The ID of the launch template. You must specify either the launch template ID or launch template name in the request.

    • LaunchTemplateName — (String)

      The name of the launch template. You must specify either the launch template ID or launch template name in the request.

    • SourceVersion — (String)

      The version number of the launch template version on which to base the new version. The new version inherits the same launch parameters as the source version, except for parameters that you specify in LaunchTemplateData. Snapshots applied to the block device mapping are ignored when creating a new version unless they are explicitly included.

    • VersionDescription — (String)

      A description for the version of the launch template.

    • LaunchTemplateData — (map)

      The information for the launch template.

      • KernelId — (String)

        The ID of the kernel.

        We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.

      • EbsOptimized — (Boolean)

        Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

      • IamInstanceProfile — (map)

        The name or Amazon Resource Name (ARN) of an IAM instance profile.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the instance profile.

        • Name — (String)

          The name of the instance profile.

      • BlockDeviceMappings — (Array<map>)

        The block device mapping.

        • DeviceName — (String)

          The device name (for example, /dev/sdh or xvdh).

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

        • Ebs — (map)

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

          • Encrypted — (Boolean)

            Indicates whether the EBS volume is encrypted. Encrypted volumes can only be attached to instances that support Amazon EBS encryption. If you are creating a volume from a snapshot, you can't specify an encryption value.

          • DeleteOnTermination — (Boolean)

            Indicates whether the EBS volume is deleted on instance termination.

          • Iops — (Integer)

            The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

            The following are the supported values for each volume type:

            • gp3: 3,000-16,000 IOPS

            • io1: 100-64,000 IOPS

            • io2: 100-64,000 IOPS

            For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

            This parameter is supported for io1, io2, and gp3 volumes only. This parameter is not supported for gp2, st1, sc1, or standard volumes.

          • KmsKeyId — (String)

            The ARN of the symmetric Key Management Service (KMS) CMK used for encryption.

          • SnapshotId — (String)

            The ID of the snapshot.

          • VolumeSize — (Integer)

            The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. The following are the supported volumes sizes for each volume type:

            • gp2 and gp3: 1-16,384

            • io1 and io2: 4-16,384

            • st1 and sc1: 125-16,384

            • standard: 1-1,024

          • VolumeType — (String)

            The volume type. For more information, see Amazon EBS volume types in the Amazon Elastic Compute Cloud User Guide.

            Possible values include:
            • "standard"
            • "io1"
            • "io2"
            • "gp2"
            • "sc1"
            • "st1"
            • "gp3"
          • Throughput — (Integer)

            The throughput to provision for a gp3 volume, with a maximum of 1,000 MiB/s.

            Valid Range: Minimum value of 125. Maximum value of 1000.

        • NoDevice — (String)

          To omit the device from the block device mapping, specify an empty string.

      • NetworkInterfaces — (Array<map>)

        One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.

        • AssociateCarrierIpAddress — (Boolean)

          Associates a Carrier IP address with eth0 for a new network interface.

          Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Wavelength Developer Guide.

        • AssociatePublicIpAddress — (Boolean)

          Associates a public IPv4 address with eth0 for a new network interface.

        • DeleteOnTermination — (Boolean)

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

        • Description — (String)

          A description for the network interface.

        • DeviceIndex — (Integer)

          The device index for the network interface attachment.

        • Groups — (Array<String>)

          The IDs of one or more security groups.

        • InterfaceType — (String)

          The type of network interface. To create an Elastic Fabric Adapter (EFA), specify efa. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide.

          If you are not creating an EFA, specify interface or omit this parameter.

          Valid values: interface | efa

        • Ipv6AddressCount — (Integer)

          The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.

        • Ipv6Addresses — (Array<map>)

          One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.

          • Ipv6Address — (String)

            The IPv6 address.

        • NetworkInterfaceId — (String)

          The ID of the network interface.

        • PrivateIpAddress — (String)

          The primary private IPv4 address of the network interface.

        • PrivateIpAddresses — (Array<map>)

          One or more private IPv4 addresses.

          • Primary — (Boolean)

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

          • PrivateIpAddress — (String)

            The private IPv4 addresses.

        • SecondaryPrivateIpAddressCount — (Integer)

          The number of secondary private IPv4 addresses to assign to a network interface.

        • SubnetId — (String)

          The ID of the subnet for the network interface.

        • NetworkCardIndex — (Integer)

          The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

        • Ipv4Prefixes — (Array<map>)

          One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

        • Ipv4PrefixCount — (Integer)

          The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

        • Ipv6Prefixes — (Array<map>)

          One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

          • Ipv6Prefix — (String)

            The IPv6 prefix.

        • Ipv6PrefixCount — (Integer)

          The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

      • ImageId — (String)

        The ID of the AMI.

      • InstanceType — (String)

        The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.

        If you specify InstanceTypes, you can't specify InstanceRequirements.

        Possible values include:
        • "t1.micro"
        • "t2.nano"
        • "t2.micro"
        • "t2.small"
        • "t2.medium"
        • "t2.large"
        • "t2.xlarge"
        • "t2.2xlarge"
        • "t3.nano"
        • "t3.micro"
        • "t3.small"
        • "t3.medium"
        • "t3.large"
        • "t3.xlarge"
        • "t3.2xlarge"
        • "t3a.nano"
        • "t3a.micro"
        • "t3a.small"
        • "t3a.medium"
        • "t3a.large"
        • "t3a.xlarge"
        • "t3a.2xlarge"
        • "t4g.nano"
        • "t4g.micro"
        • "t4g.small"
        • "t4g.medium"
        • "t4g.large"
        • "t4g.xlarge"
        • "t4g.2xlarge"
        • "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"
        • "m4.16xlarge"
        • "m2.xlarge"
        • "m2.2xlarge"
        • "m2.4xlarge"
        • "cr1.8xlarge"
        • "r3.large"
        • "r3.xlarge"
        • "r3.2xlarge"
        • "r3.4xlarge"
        • "r3.8xlarge"
        • "r4.large"
        • "r4.xlarge"
        • "r4.2xlarge"
        • "r4.4xlarge"
        • "r4.8xlarge"
        • "r4.16xlarge"
        • "r5.large"
        • "r5.xlarge"
        • "r5.2xlarge"
        • "r5.4xlarge"
        • "r5.8xlarge"
        • "r5.12xlarge"
        • "r5.16xlarge"
        • "r5.24xlarge"
        • "r5.metal"
        • "r5a.large"
        • "r5a.xlarge"
        • "r5a.2xlarge"
        • "r5a.4xlarge"
        • "r5a.8xlarge"
        • "r5a.12xlarge"
        • "r5a.16xlarge"
        • "r5a.24xlarge"
        • "r5b.large"
        • "r5b.xlarge"
        • "r5b.2xlarge"
        • "r5b.4xlarge"
        • "r5b.8xlarge"
        • "r5b.12xlarge"
        • "r5b.16xlarge"
        • "r5b.24xlarge"
        • "r5b.metal"
        • "r5d.large"
        • "r5d.xlarge"
        • "r5d.2xlarge"
        • "r5d.4xlarge"
        • "r5d.8xlarge"
        • "r5d.12xlarge"
        • "r5d.16xlarge"
        • "r5d.24xlarge"
        • "r5d.metal"
        • "r5ad.large"
        • "r5ad.xlarge"
        • "r5ad.2xlarge"
        • "r5ad.4xlarge"
        • "r5ad.8xlarge"
        • "r5ad.12xlarge"
        • "r5ad.16xlarge"
        • "r5ad.24xlarge"
        • "r6g.metal"
        • "r6g.medium"
        • "r6g.large"
        • "r6g.xlarge"
        • "r6g.2xlarge"
        • "r6g.4xlarge"
        • "r6g.8xlarge"
        • "r6g.12xlarge"
        • "r6g.16xlarge"
        • "r6gd.metal"
        • "r6gd.medium"
        • "r6gd.large"
        • "r6gd.xlarge"
        • "r6gd.2xlarge"
        • "r6gd.4xlarge"
        • "r6gd.8xlarge"
        • "r6gd.12xlarge"
        • "r6gd.16xlarge"
        • "x1.16xlarge"
        • "x1.32xlarge"
        • "x1e.xlarge"
        • "x1e.2xlarge"
        • "x1e.4xlarge"
        • "x1e.8xlarge"
        • "x1e.16xlarge"
        • "x1e.32xlarge"
        • "i2.xlarge"
        • "i2.2xlarge"
        • "i2.4xlarge"
        • "i2.8xlarge"
        • "i3.large"
        • "i3.xlarge"
        • "i3.2xlarge"
        • "i3.4xlarge"
        • "i3.8xlarge"
        • "i3.16xlarge"
        • "i3.metal"
        • "i3en.large"
        • "i3en.xlarge"
        • "i3en.2xlarge"
        • "i3en.3xlarge"
        • "i3en.6xlarge"
        • "i3en.12xlarge"
        • "i3en.24xlarge"
        • "i3en.metal"
        • "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"
        • "c5.large"
        • "c5.xlarge"
        • "c5.2xlarge"
        • "c5.4xlarge"
        • "c5.9xlarge"
        • "c5.12xlarge"
        • "c5.18xlarge"
        • "c5.24xlarge"
        • "c5.metal"
        • "c5a.large"
        • "c5a.xlarge"
        • "c5a.2xlarge"
        • "c5a.4xlarge"
        • "c5a.8xlarge"
        • "c5a.12xlarge"
        • "c5a.16xlarge"
        • "c5a.24xlarge"
        • "c5ad.large"
        • "c5ad.xlarge"
        • "c5ad.2xlarge"
        • "c5ad.4xlarge"
        • "c5ad.8xlarge"
        • "c5ad.12xlarge"
        • "c5ad.16xlarge"
        • "c5ad.24xlarge"
        • "c5d.large"
        • "c5d.xlarge"
        • "c5d.2xlarge"
        • "c5d.4xlarge"
        • "c5d.9xlarge"
        • "c5d.12xlarge"
        • "c5d.18xlarge"
        • "c5d.24xlarge"
        • "c5d.metal"
        • "c5n.large"
        • "c5n.xlarge"
        • "c5n.2xlarge"
        • "c5n.4xlarge"
        • "c5n.9xlarge"
        • "c5n.18xlarge"
        • "c5n.metal"
        • "c6g.metal"
        • "c6g.medium"
        • "c6g.large"
        • "c6g.xlarge"
        • "c6g.2xlarge"
        • "c6g.4xlarge"
        • "c6g.8xlarge"
        • "c6g.12xlarge"
        • "c6g.16xlarge"
        • "c6gd.metal"
        • "c6gd.medium"
        • "c6gd.large"
        • "c6gd.xlarge"
        • "c6gd.2xlarge"
        • "c6gd.4xlarge"
        • "c6gd.8xlarge"
        • "c6gd.12xlarge"
        • "c6gd.16xlarge"
        • "c6gn.medium"
        • "c6gn.large"
        • "c6gn.xlarge"
        • "c6gn.2xlarge"
        • "c6gn.4xlarge"
        • "c6gn.8xlarge"
        • "c6gn.12xlarge"
        • "c6gn.16xlarge"
        • "cc1.4xlarge"
        • "cc2.8xlarge"
        • "g2.2xlarge"
        • "g2.8xlarge"
        • "g3.4xlarge"
        • "g3.8xlarge"
        • "g3.16xlarge"
        • "g3s.xlarge"
        • "g4ad.xlarge"
        • "g4ad.2xlarge"
        • "g4ad.4xlarge"
        • "g4ad.8xlarge"
        • "g4ad.16xlarge"
        • "g4dn.xlarge"
        • "g4dn.2xlarge"
        • "g4dn.4xlarge"
        • "g4dn.8xlarge"
        • "g4dn.12xlarge"
        • "g4dn.16xlarge"
        • "g4dn.metal"
        • "cg1.4xlarge"
        • "p2.xlarge"
        • "p2.8xlarge"
        • "p2.16xlarge"
        • "p3.2xlarge"
        • "p3.8xlarge"
        • "p3.16xlarge"
        • "p3dn.24xlarge"
        • "p4d.24xlarge"
        • "d2.xlarge"
        • "d2.2xlarge"
        • "d2.4xlarge"
        • "d2.8xlarge"
        • "d3.xlarge"
        • "d3.2xlarge"
        • "d3.4xlarge"
        • "d3.8xlarge"
        • "d3en.xlarge"
        • "d3en.2xlarge"
        • "d3en.4xlarge"
        • "d3en.6xlarge"
        • "d3en.8xlarge"
        • "d3en.12xlarge"
        • "dl1.24xlarge"
        • "f1.2xlarge"
        • "f1.4xlarge"
        • "f1.16xlarge"
        • "m5.large"
        • "m5.xlarge"
        • "m5.2xlarge"
        • "m5.4xlarge"
        • "m5.8xlarge"
        • "m5.12xlarge"
        • "m5.16xlarge"
        • "m5.24xlarge"
        • "m5.metal"
        • "m5a.large"
        • "m5a.xlarge"
        • "m5a.2xlarge"
        • "m5a.4xlarge"
        • "m5a.8xlarge"
        • "m5a.12xlarge"
        • "m5a.16xlarge"
        • "m5a.24xlarge"
        • "m5d.large"
        • "m5d.xlarge"
        • "m5d.2xlarge"
        • "m5d.4xlarge"
        • "m5d.8xlarge"
        • "m5d.12xlarge"
        • "m5d.16xlarge"
        • "m5d.24xlarge"
        • "m5d.metal"
        • "m5ad.large"
        • "m5ad.xlarge"
        • "m5ad.2xlarge"
        • "m5ad.4xlarge"
        • "m5ad.8xlarge"
        • "m5ad.12xlarge"
        • "m5ad.16xlarge"
        • "m5ad.24xlarge"
        • "m5zn.large"
        • "m5zn.xlarge"
        • "m5zn.2xlarge"
        • "m5zn.3xlarge"
        • "m5zn.6xlarge"
        • "m5zn.12xlarge"
        • "m5zn.metal"
        • "h1.2xlarge"
        • "h1.4xlarge"
        • "h1.8xlarge"
        • "h1.16xlarge"
        • "z1d.large"
        • "z1d.xlarge"
        • "z1d.2xlarge"
        • "z1d.3xlarge"
        • "z1d.6xlarge"
        • "z1d.12xlarge"
        • "z1d.metal"
        • "u-6tb1.56xlarge"
        • "u-6tb1.112xlarge"
        • "u-9tb1.112xlarge"
        • "u-12tb1.112xlarge"
        • "u-6tb1.metal"
        • "u-9tb1.metal"
        • "u-12tb1.metal"
        • "u-18tb1.metal"
        • "u-24tb1.metal"
        • "a1.medium"
        • "a1.large"
        • "a1.xlarge"
        • "a1.2xlarge"
        • "a1.4xlarge"
        • "a1.metal"
        • "m5dn.large"
        • "m5dn.xlarge"
        • "m5dn.2xlarge"
        • "m5dn.4xlarge"
        • "m5dn.8xlarge"
        • "m5dn.12xlarge"
        • "m5dn.16xlarge"
        • "m5dn.24xlarge"
        • "m5dn.metal"
        • "m5n.large"
        • "m5n.xlarge"
        • "m5n.2xlarge"
        • "m5n.4xlarge"
        • "m5n.8xlarge"
        • "m5n.12xlarge"
        • "m5n.16xlarge"
        • "m5n.24xlarge"
        • "m5n.metal"
        • "r5dn.large"
        • "r5dn.xlarge"
        • "r5dn.2xlarge"
        • "r5dn.4xlarge"
        • "r5dn.8xlarge"
        • "r5dn.12xlarge"
        • "r5dn.16xlarge"
        • "r5dn.24xlarge"
        • "r5dn.metal"
        • "r5n.large"
        • "r5n.xlarge"
        • "r5n.2xlarge"
        • "r5n.4xlarge"
        • "r5n.8xlarge"
        • "r5n.12xlarge"
        • "r5n.16xlarge"
        • "r5n.24xlarge"
        • "r5n.metal"
        • "inf1.xlarge"
        • "inf1.2xlarge"
        • "inf1.6xlarge"
        • "inf1.24xlarge"
        • "m6g.metal"
        • "m6g.medium"
        • "m6g.large"
        • "m6g.xlarge"
        • "m6g.2xlarge"
        • "m6g.4xlarge"
        • "m6g.8xlarge"
        • "m6g.12xlarge"
        • "m6g.16xlarge"
        • "m6gd.metal"
        • "m6gd.medium"
        • "m6gd.large"
        • "m6gd.xlarge"
        • "m6gd.2xlarge"
        • "m6gd.4xlarge"
        • "m6gd.8xlarge"
        • "m6gd.12xlarge"
        • "m6gd.16xlarge"
        • "m6i.large"
        • "m6i.xlarge"
        • "m6i.2xlarge"
        • "m6i.4xlarge"
        • "m6i.8xlarge"
        • "m6i.12xlarge"
        • "m6i.16xlarge"
        • "m6i.24xlarge"
        • "m6i.32xlarge"
        • "mac1.metal"
        • "x2gd.medium"
        • "x2gd.large"
        • "x2gd.xlarge"
        • "x2gd.2xlarge"
        • "x2gd.4xlarge"
        • "x2gd.8xlarge"
        • "x2gd.12xlarge"
        • "x2gd.16xlarge"
        • "x2gd.metal"
        • "vt1.3xlarge"
        • "vt1.6xlarge"
        • "vt1.24xlarge"
      • KeyName — (String)

        The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.

        If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.

      • Monitoring — (map)

        The monitoring for the instance.

        • Enabled — (Boolean)

          Specify true to enable detailed monitoring. Otherwise, basic monitoring is enabled.

      • Placement — (map)

        The placement for the instance.

        • AvailabilityZone — (String)

          The Availability Zone for the instance.

        • Affinity — (String)

          The affinity setting for an instance on a Dedicated Host.

        • GroupName — (String)

          The name of the placement group for the instance.

        • HostId — (String)

          The ID of the Dedicated Host for the instance.

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

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • SpreadDomain — (String)

          Reserved for future use.

        • HostResourceGroupArn — (String)

          The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

        • PartitionNumber — (Integer)

          The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.

      • RamDiskId — (String)

        The ID of the RAM disk.

        We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.

      • DisableApiTermination — (Boolean)

        If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance by running the shutdown command from the instance.

      • InstanceInitiatedShutdownBehavior — (String)

        Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

        Default: stop

        Possible values include:
        • "stop"
        • "terminate"
      • UserData — (String)

        The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see Running Commands on Your Linux Instance at Launch (Linux) or Adding User Data (Windows).

        If you are creating the launch template for use with Batch, the user data must be provided in the MIME multi-part archive format. For more information, see Amazon EC2 user data in launch templates in the Batch User Guide.

      • TagSpecifications — (Array<map>)

        The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.

        • ResourceType — (String)

          The type of resource to tag. Currently, the resource types that support tagging on creation are instance and volume. To tag a resource after it has been created, see CreateTags.

          Possible values include:
          • "capacity-reservation"
          • "client-vpn-endpoint"
          • "customer-gateway"
          • "carrier-gateway"
          • "dedicated-host"
          • "dhcp-options"
          • "egress-only-internet-gateway"
          • "elastic-ip"
          • "elastic-gpu"
          • "export-image-task"
          • "export-instance-task"
          • "fleet"
          • "fpga-image"
          • "host-reservation"
          • "image"
          • "import-image-task"
          • "import-snapshot-task"
          • "instance"
          • "instance-event-window"
          • "internet-gateway"
          • "ipv4pool-ec2"
          • "ipv6pool-ec2"
          • "key-pair"
          • "launch-template"
          • "local-gateway"
          • "local-gateway-route-table"
          • "local-gateway-virtual-interface"
          • "local-gateway-virtual-interface-group"
          • "local-gateway-route-table-vpc-association"
          • "local-gateway-route-table-virtual-interface-group-association"
          • "natgateway"
          • "network-acl"
          • "network-interface"
          • "network-insights-analysis"
          • "network-insights-path"
          • "placement-group"
          • "prefix-list"
          • "replace-root-volume-task"
          • "reserved-instances"
          • "route-table"
          • "security-group"
          • "security-group-rule"
          • "snapshot"
          • "spot-fleet-request"
          • "spot-instances-request"
          • "subnet"
          • "traffic-mirror-filter"
          • "traffic-mirror-session"
          • "traffic-mirror-target"
          • "transit-gateway"
          • "transit-gateway-attachment"
          • "transit-gateway-connect-peer"
          • "transit-gateway-multicast-domain"
          • "transit-gateway-route-table"
          • "volume"
          • "vpc"
          • "vpc-endpoint"
          • "vpc-endpoint-service"
          • "vpc-peering-connection"
          • "vpn-connection"
          • "vpn-gateway"
          • "vpc-flow-log"
        • Tags — (Array<map>)

          The tags to apply 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.

      • ElasticGpuSpecifications — (Array<map>)

        An elastic GPU to associate with the instance.

        • Typerequired — (String)

          The type of Elastic Graphics accelerator. For more information about the values to specify for Type, see Elastic Graphics Basics, specifically the Elastic Graphics accelerator column, in the Amazon Elastic Compute Cloud User Guide for Windows Instances.

      • ElasticInferenceAccelerators — (Array<map>)

        The elastic inference accelerator for the instance.

        • Typerequired — (String)

          The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

        • Count — (Integer)

          The number of elastic inference accelerators to attach to the instance.

          Default: 1

      • SecurityGroupIds — (Array<String>)

        One or more security group IDs. You can create a security group using CreateSecurityGroup. You cannot specify both a security group ID and security name in the same request.

      • SecurityGroups — (Array<String>)

        [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.

      • InstanceMarketOptions — (map)

        The market (purchasing) option for the instances.

        • MarketType — (String)

          The market type.

          Possible values include:
          • "spot"
        • SpotOptions — (map)

          The options for Spot Instances.

          • MaxPrice — (String)

            The maximum hourly price you're willing to pay for the Spot Instances.

          • SpotInstanceType — (String)

            The Spot Instance request type.

            Possible values include:
            • "one-time"
            • "persistent"
          • BlockDurationMinutes — (Integer)

            The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).

          • ValidUntil — (Date)

            The end date of the request. For a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached. The default end date is 7 days from the current date.

          • InstanceInterruptionBehavior — (String)

            The behavior when a Spot Instance is interrupted. The default is terminate.

            Possible values include:
            • "hibernate"
            • "stop"
            • "terminate"
      • CreditSpecification — (map)

        The credit option for CPU usage of the instance. Valid for T2, T3, or T3a instances only.

        • CpuCreditsrequired — (String)

          The credit option for CPU usage of a T2, T3, or T3a instance. Valid values are standard and unlimited.

      • CpuOptions — (map)

        The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide.

        • CoreCount — (Integer)

          The number of CPU cores for the instance.

        • ThreadsPerCore — (Integer)

          The number of threads per CPU core. To disable multithreading for the instance, specify a value of 1. Otherwise, specify the default value of 2.

      • CapacityReservationSpecification — (map)

        The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

        • CapacityReservationPreference — (String)

          Indicates the instance's Capacity Reservation preferences. Possible preferences include:

          • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

          • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

          Possible values include:
          • "open"
          • "none"
        • CapacityReservationTarget — (map)

          Information about the target Capacity Reservation or Capacity Reservation group.

          • CapacityReservationId — (String)

            The ID of the Capacity Reservation in which to run the instance.

          • CapacityReservationResourceGroupArn — (String)

            The ARN of the Capacity Reservation resource group in which to run the instance.

      • LicenseSpecifications — (Array<map>)

        The license configurations.

        • LicenseConfigurationArn — (String)

          The Amazon Resource Name (ARN) of the license configuration.

      • HibernationOptions — (map)

        Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide.

        • Configured — (Boolean)

          If you set this parameter to true, the instance is enabled for hibernation.

          Default: false

      • MetadataOptions — (map)

        The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide.

        • HttpTokens — (String)

          The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

          If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

          If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

          Possible values include:
          • "optional"
          • "required"
        • HttpPutResponseHopLimit — (Integer)

          The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

          Default: 1

          Possible values: Integers from 1 to 64

        • HttpEndpoint — (String)

          This parameter enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled.

          Note: If you specify a value of disabled, you will not be able to access your instance metadata.
          Possible values include:
          • "disabled"
          • "enabled"
        • HttpProtocolIpv6 — (String)

          Enables or disables the IPv6 endpoint for the instance metadata service.

          Default: disabled

          Possible values include:
          • "disabled"
          • "enabled"
      • EnclaveOptions — (map)

        Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide.

        You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.

        • Enabled — (Boolean)

          To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true.

      • InstanceRequirements — (map)

        The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.

        If you specify InstanceRequirements, you can't specify InstanceTypes.

        • VCpuCountrequired — (map)

          The minimum and maximum number of vCPUs.

          • Minrequired — (Integer)

            The minimum number of vCPUs. To specify no minimum limit, specify 0.

          • Max — (Integer)

            The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

        • MemoryMiBrequired — (map)

          The minimum and maximum amount of memory, in MiB.

          • Minrequired — (Integer)

            The minimum amount of memory, in MiB. To specify no minimum limit, specify 0.

          • Max — (Integer)

            The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

        • CpuManufacturers — (Array<String>)

          The CPU manufacturers to include.

          • For instance types with Intel CPUs, specify intel.

          • For instance types with AMD CPUs, specify amd.

          • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

          Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

          Default: Any manufacturer

        • MemoryGiBPerVCpu — (map)

          The minimum and maximum amount of memory per vCPU, in GiB.

          Default: No minimum or maximum limits

          • Min — (Float)

            The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

          • Max — (Float)

            The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

        • ExcludedInstanceTypes — (Array<String>)

          The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

          For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

          Default: No excluded instance types

        • InstanceGenerations — (Array<String>)

          Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

          For current generation instance types, specify current.

          For previous generation instance types, specify previous.

          Default: Current and previous generation instance types

        • SpotMaxPricePercentageOverLowestPrice — (Integer)

          The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

          The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

          To turn off price protection, specify a high value, such as 999999.

          This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

          Default: 100

        • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

          The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

          The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

          To turn off price protection, specify a high value, such as 999999.

          This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

          Default: 20

        • BareMetal — (String)

          Indicates whether bare metal instance types must be included, excluded, or required.

          • To include bare metal instance types, specify included.

          • To require only bare metal instance types, specify required.

          • To exclude bare metal instance types, specify excluded.

          Default: excluded

          Possible values include:
          • "included"
          • "required"
          • "excluded"
        • BurstablePerformance — (String)

          Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

          • To include burstable performance instance types, specify included.

          • To require only burstable performance instance types, specify required.

          • To exclude burstable performance instance types, specify excluded.

          Default: excluded

          Possible values include:
          • "included"
          • "required"
          • "excluded"
        • RequireHibernateSupport — (Boolean)

          Indicates whether instance types must support hibernation for On-Demand Instances.

          This parameter is not supported for GetSpotPlacementScores.

          Default: false

        • NetworkInterfaceCount — (map)

          The minimum and maximum number of network interfaces.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

        • LocalStorage — (String)

          Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

          • To include instance types with instance store volumes, specify included.

          • To require only instance types with instance store volumes, specify required.

          • To exclude instance types with instance store volumes, specify excluded.

          Default: included

          Possible values include:
          • "included"
          • "required"
          • "excluded"
        • LocalStorageTypes — (Array<String>)

          The type of local storage that is required.

          • For instance types with hard disk drive (HDD) storage, specify hdd.

          • For instance types with solid state drive (SDD) storage, specify sdd.

          Default: hdd and sdd

        • TotalLocalStorageGB — (map)

          The minimum and maximum amount of total local storage, in GB.

          Default: No minimum or maximum limits

          • Min — (Float)

            The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

          • Max — (Float)

            The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

        • BaselineEbsBandwidthMbps — (map)

          The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

        • AcceleratorTypes — (Array<String>)

          The accelerator types that must be on the instance type.

          • To include instance types with GPU hardware, specify gpu.

          • To include instance types with FPGA hardware, specify fpga.

          • To include instance types with inference hardware, specify inference.

          Default: Any accelerator type

        • AcceleratorCount — (map)

          The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

          To exclude accelerator-enabled instance types, set Max to 0.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum number of accelerators. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0.

        • AcceleratorManufacturers — (Array<String>)

          Indicates whether instance types must have accelerators by specific manufacturers.

          • For instance types with NVIDIA devices, specify nvidia.

          • For instance types with AMD devices, specify amd.

          • For instance types with Amazon Web Services devices, specify amazon-web-services.

          • For instance types with Xilinx devices, specify xilinx.

          Default: Any manufacturer

        • AcceleratorNames — (Array<String>)

          The accelerators that must be on the instance type.

          • For instance types with NVIDIA A100 GPUs, specify a100.

          • For instance types with NVIDIA V100 GPUs, specify v100.

          • For instance types with NVIDIA K80 GPUs, specify k80.

          • For instance types with NVIDIA T4 GPUs, specify t4.

          • For instance types with NVIDIA M60 GPUs, specify m60.

          • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

          • For instance types with Xilinx VU9P FPGAs, specify vu9p.

          Default: Any accelerator

        • AcceleratorTotalMemoryMiB — (map)

          The minimum and maximum amount of total accelerator memory, in MiB.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

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:

      • LaunchTemplateVersion — (map)

        Information about the launch template version.

        • LaunchTemplateId — (String)

          The ID of the launch template.

        • LaunchTemplateName — (String)

          The name of the launch template.

        • VersionNumber — (Integer)

          The version number.

        • VersionDescription — (String)

          The description for the version.

        • CreateTime — (Date)

          The time the version was created.

        • CreatedBy — (String)

          The principal that created the version.

        • DefaultVersion — (Boolean)

          Indicates whether the version is the default version.

        • LaunchTemplateData — (map)

          Information about the launch template.

          • KernelId — (String)

            The ID of the kernel, if applicable.

          • EbsOptimized — (Boolean)

            Indicates whether the instance is optimized for Amazon EBS I/O.

          • IamInstanceProfile — (map)

            The IAM instance profile.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the instance profile.

            • Name — (String)

              The name of the instance profile.

          • BlockDeviceMappings — (Array<map>)

            The block device mappings.

            • DeviceName — (String)

              The device name.

            • VirtualName — (String)

              The virtual device name (ephemeralN).

            • Ebs — (map)

              Information about the block device for an EBS volume.

              • Encrypted — (Boolean)

                Indicates whether the EBS volume is encrypted.

              • DeleteOnTermination — (Boolean)

                Indicates whether the EBS volume is deleted on instance termination.

              • Iops — (Integer)

                The number of I/O operations per second (IOPS) that the volume supports.

              • KmsKeyId — (String)

                The ARN of the Key Management Service (KMS) CMK used for encryption.

              • SnapshotId — (String)

                The ID of the snapshot.

              • VolumeSize — (Integer)

                The size of the volume, in GiB.

              • VolumeType — (String)

                The volume type.

                Possible values include:
                • "standard"
                • "io1"
                • "io2"
                • "gp2"
                • "sc1"
                • "st1"
                • "gp3"
              • Throughput — (Integer)

                The throughput that the volume supports, in MiB/s.

            • NoDevice — (String)

              To omit the device from the block device mapping, specify an empty string.

          • NetworkInterfaces — (Array<map>)

            The network interfaces.

            • AssociateCarrierIpAddress — (Boolean)

              Indicates whether to associate a Carrier IP address with eth0 for a new network interface.

              Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Wavelength Developer Guide.

            • AssociatePublicIpAddress — (Boolean)

              Indicates whether to associate a public IPv4 address with eth0 for a new network interface.

            • DeleteOnTermination — (Boolean)

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

            • Description — (String)

              A description for the network interface.

            • DeviceIndex — (Integer)

              The device index for the network interface attachment.

            • Groups — (Array<String>)

              The IDs of one or more security groups.

            • InterfaceType — (String)

              The type of network interface.

            • Ipv6AddressCount — (Integer)

              The number of IPv6 addresses for the network interface.

            • Ipv6Addresses — (Array<map>)

              The IPv6 addresses for the network interface.

              • Ipv6Address — (String)

                The IPv6 address.

            • NetworkInterfaceId — (String)

              The ID of the network interface.

            • PrivateIpAddress — (String)

              The primary private IPv4 address of the network interface.

            • PrivateIpAddresses — (Array<map>)

              One or more private IPv4 addresses.

              • Primary — (Boolean)

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

              • PrivateIpAddress — (String)

                The private IPv4 addresses.

            • SecondaryPrivateIpAddressCount — (Integer)

              The number of secondary private IPv4 addresses for the network interface.

            • SubnetId — (String)

              The ID of the subnet for the network interface.

            • NetworkCardIndex — (Integer)

              The index of the network card.

            • Ipv4Prefixes — (Array<map>)

              One or more IPv4 prefixes assigned to the network interface.

              • Ipv4Prefix — (String)

                One or more IPv4 delegated prefixes assigned to the network interface.

            • Ipv4PrefixCount — (Integer)

              The number of IPv4 prefixes that Amazon Web Services automatically assigned to the network interface.

            • Ipv6Prefixes — (Array<map>)

              One or more IPv6 prefixes assigned to the network interface.

              • Ipv6Prefix — (String)

                One or more IPv6 delegated prefixes assigned to the network interface.

            • Ipv6PrefixCount — (Integer)

              The number of IPv6 prefixes that Amazon Web Services automatically assigned to the network interface.

          • ImageId — (String)

            The ID of the AMI that was used to launch the instance.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • KeyName — (String)

            The name of the key pair.

          • Monitoring — (map)

            The monitoring for the instance.

            • Enabled — (Boolean)

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

          • Placement — (map)

            The placement of the instance.

            • AvailabilityZone — (String)

              The Availability Zone of the instance.

            • Affinity — (String)

              The affinity setting for the instance on the Dedicated Host.

            • GroupName — (String)

              The name of the placement group for the instance.

            • HostId — (String)

              The ID of the Dedicated Host for the instance.

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

              Possible values include:
              • "default"
              • "dedicated"
              • "host"
            • SpreadDomain — (String)

              Reserved for future use.

            • HostResourceGroupArn — (String)

              The ARN of the host resource group in which to launch the instances.

            • PartitionNumber — (Integer)

              The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.

          • RamDiskId — (String)

            The ID of the RAM disk, if applicable.

          • DisableApiTermination — (Boolean)

            If set to true, indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.

          • InstanceInitiatedShutdownBehavior — (String)

            Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

            Possible values include:
            • "stop"
            • "terminate"
          • UserData — (String)

            The user data for the instance.

          • TagSpecifications — (Array<map>)

            The tags.

            • ResourceType — (String)

              The type of resource.

              Possible values include:
              • "capacity-reservation"
              • "client-vpn-endpoint"
              • "customer-gateway"
              • "carrier-gateway"
              • "dedicated-host"
              • "dhcp-options"
              • "egress-only-internet-gateway"
              • "elastic-ip"
              • "elastic-gpu"
              • "export-image-task"
              • "export-instance-task"
              • "fleet"
              • "fpga-image"
              • "host-reservation"
              • "image"
              • "import-image-task"
              • "import-snapshot-task"
              • "instance"
              • "instance-event-window"
              • "internet-gateway"
              • "ipv4pool-ec2"
              • "ipv6pool-ec2"
              • "key-pair"
              • "launch-template"
              • "local-gateway"
              • "local-gateway-route-table"
              • "local-gateway-virtual-interface"
              • "local-gateway-virtual-interface-group"
              • "local-gateway-route-table-vpc-association"
              • "local-gateway-route-table-virtual-interface-group-association"
              • "natgateway"
              • "network-acl"
              • "network-interface"
              • "network-insights-analysis"
              • "network-insights-path"
              • "placement-group"
              • "prefix-list"
              • "replace-root-volume-task"
              • "reserved-instances"
              • "route-table"
              • "security-group"
              • "security-group-rule"
              • "snapshot"
              • "spot-fleet-request"
              • "spot-instances-request"
              • "subnet"
              • "traffic-mirror-filter"
              • "traffic-mirror-session"
              • "traffic-mirror-target"
              • "transit-gateway"
              • "transit-gateway-attachment"
              • "transit-gateway-connect-peer"
              • "transit-gateway-multicast-domain"
              • "transit-gateway-route-table"
              • "volume"
              • "vpc"
              • "vpc-endpoint"
              • "vpc-endpoint-service"
              • "vpc-peering-connection"
              • "vpn-connection"
              • "vpn-gateway"
              • "vpc-flow-log"
            • Tags — (Array<map>)

              The tags for 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.

          • ElasticGpuSpecifications — (Array<map>)

            The elastic GPU specification.

            • Type — (String)

              The elastic GPU type.

          • ElasticInferenceAccelerators — (Array<map>)

            The elastic inference accelerator for the instance.

            • Type — (String)

              The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

            • Count — (Integer)

              The number of elastic inference accelerators to attach to the instance.

              Default: 1

          • SecurityGroupIds — (Array<String>)

            The security group IDs.

          • SecurityGroups — (Array<String>)

            The security group names.

          • InstanceMarketOptions — (map)

            The market (purchasing) option for the instances.

            • MarketType — (String)

              The market type.

              Possible values include:
              • "spot"
            • SpotOptions — (map)

              The options for Spot Instances.

              • MaxPrice — (String)

                The maximum hourly price you're willing to pay for the Spot Instances.

              • SpotInstanceType — (String)

                The Spot Instance request type.

                Possible values include:
                • "one-time"
                • "persistent"
              • BlockDurationMinutes — (Integer)

                The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).

              • ValidUntil — (Date)

                The end date of the request. For a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

              • InstanceInterruptionBehavior — (String)

                The behavior when a Spot Instance is interrupted.

                Possible values include:
                • "hibernate"
                • "stop"
                • "terminate"
          • CreditSpecification — (map)

            The credit option for CPU usage of the instance.

            • CpuCredits — (String)

              The credit option for CPU usage of a T2, T3, or T3a instance. Valid values are standard and unlimited.

          • CpuOptions — (map)

            The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon Elastic Compute Cloud User Guide.

            • CoreCount — (Integer)

              The number of CPU cores for the instance.

            • ThreadsPerCore — (Integer)

              The number of threads per CPU core.

          • CapacityReservationSpecification — (map)

            Information about the Capacity Reservation targeting option.

            • CapacityReservationPreference — (String)

              Indicates the instance's Capacity Reservation preferences. Possible preferences include:

              • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

              • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

              Possible values include:
              • "open"
              • "none"
            • CapacityReservationTarget — (map)

              Information about the target Capacity Reservation or Capacity Reservation group.

              • CapacityReservationId — (String)

                The ID of the targeted Capacity Reservation.

              • CapacityReservationResourceGroupArn — (String)

                The ARN of the targeted Capacity Reservation group.

          • LicenseSpecifications — (Array<map>)

            The license configurations.

            • LicenseConfigurationArn — (String)

              The Amazon Resource Name (ARN) of the license configuration.

          • HibernationOptions — (map)

            Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide.

            • Configured — (Boolean)

              If this parameter is set to true, the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

          • MetadataOptions — (map)

            The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide.

            • State — (String)

              The state of the metadata option changes.

              pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

              applied - The metadata options have been successfully applied on the instance.

              Possible values include:
              • "pending"
              • "applied"
            • HttpTokens — (String)

              The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

              If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

              If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

              Possible values include:
              • "optional"
              • "required"
            • HttpPutResponseHopLimit — (Integer)

              The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

              Default: 1

              Possible values: Integers from 1 to 64

            • HttpEndpoint — (String)

              This parameter enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled.

              Note: If you specify a value of disabled, you will not be able to access your instance metadata.
              Possible values include:
              • "disabled"
              • "enabled"
            • HttpProtocolIpv6 — (String)

              Enables or disables the IPv6 endpoint for the instance metadata service.

              Default: disabled

              Possible values include:
              • "disabled"
              • "enabled"
          • EnclaveOptions — (map)

            Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

            • Enabled — (Boolean)

              If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

          • InstanceRequirements — (map)

            The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.

            If you specify InstanceRequirements, you can't specify InstanceTypes.

            • VCpuCount — (map)

              The minimum and maximum number of vCPUs.

              • Min — (Integer)

                The minimum number of vCPUs. If the value is 0, there is no minimum limit.

              • Max — (Integer)

                The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

            • MemoryMiB — (map)

              The minimum and maximum amount of memory, in MiB.

              • Min — (Integer)

                The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

            • CpuManufacturers — (Array<String>)

              The CPU manufacturers to include.

              • For instance types with Intel CPUs, specify intel.

              • For instance types with AMD CPUs, specify amd.

              • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

              Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

              Default: Any manufacturer

            • MemoryGiBPerVCpu — (map)

              The minimum and maximum amount of memory per vCPU, in GiB.

              Default: No minimum or maximum limits

              • Min — (Float)

                The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

              • Max — (Float)

                The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

            • ExcludedInstanceTypes — (Array<String>)

              The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

              For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

              Default: No excluded instance types

            • InstanceGenerations — (Array<String>)

              Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

              For current generation instance types, specify current.

              For previous generation instance types, specify previous.

              Default: Current and previous generation instance types

            • SpotMaxPricePercentageOverLowestPrice — (Integer)

              The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999.

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

              Default: 100

            • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

              The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999.

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

              Default: 20

            • BareMetal — (String)

              Indicates whether bare metal instance types must be included, excluded, or required.

              • To include bare metal instance types, specify included.

              • To require only bare metal instance types, specify required.

              • To exclude bare metal instance types, specify excluded.

              Default: excluded

              Possible values include:
              • "included"
              • "required"
              • "excluded"
            • BurstablePerformance — (String)

              Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

              • To include burstable performance instance types, specify included.

              • To require only burstable performance instance types, specify required.

              • To exclude burstable performance instance types, specify excluded.

              Default: excluded

              Possible values include:
              • "included"
              • "required"
              • "excluded"
            • RequireHibernateSupport — (Boolean)

              Indicates whether instance types must support hibernation for On-Demand Instances.

              This parameter is not supported for GetSpotPlacementScores.

              Default: false

            • NetworkInterfaceCount — (map)

              The minimum and maximum number of network interfaces.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

            • LocalStorage — (String)

              Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

              • To include instance types with instance store volumes, specify included.

              • To require only instance types with instance store volumes, specify required.

              • To exclude instance types with instance store volumes, specify excluded.

              Default: included

              Possible values include:
              • "included"
              • "required"
              • "excluded"
            • LocalStorageTypes — (Array<String>)

              The type of local storage that is required.

              • For instance types with hard disk drive (HDD) storage, specify hdd.

              • For instance types with solid state drive (SDD) storage, specify sdd.

              Default: hdd and sdd

            • TotalLocalStorageGB — (map)

              The minimum and maximum amount of total local storage, in GB.

              Default: No minimum or maximum limits

              • Min — (Float)

                The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

              • Max — (Float)

                The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

            • BaselineEbsBandwidthMbps — (map)

              The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

            • AcceleratorTypes — (Array<String>)

              The accelerator types that must be on the instance type.

              • For instance types with GPU accelerators, specify gpu.

              • For instance types with FPGA accelerators, specify fpga.

              • For instance types with inference accelerators, specify inference.

              Default: Any accelerator type

            • AcceleratorCount — (map)

              The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

              To exclude accelerator-enabled instance types, set Max to 0.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

            • AcceleratorManufacturers — (Array<String>)

              Indicates whether instance types must have accelerators by specific manufacturers.

              • For instance types with NVIDIA devices, specify nvidia.

              • For instance types with AMD devices, specify amd.

              • For instance types with Amazon Web Services devices, specify amazon-web-services.

              • For instance types with Xilinx devices, specify xilinx.

              Default: Any manufacturer

            • AcceleratorNames — (Array<String>)

              The accelerators that must be on the instance type.

              • For instance types with NVIDIA A100 GPUs, specify a100.

              • For instance types with NVIDIA V100 GPUs, specify v100.

              • For instance types with NVIDIA K80 GPUs, specify k80.

              • For instance types with NVIDIA T4 GPUs, specify t4.

              • For instance types with NVIDIA M60 GPUs, specify m60.

              • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

              • For instance types with Xilinx VU9P FPGAs, specify vu9p.

              Default: Any accelerator

            • AcceleratorTotalMemoryMiB — (map)

              The minimum and maximum amount of total accelerator memory, in MiB.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

      • Warning — (map)

        If the new version of the launch template contains parameters or parameter combinations that are not valid, an error code and an error message are returned for each issue that's found.

        • Errors — (Array<map>)

          The error codes and error messages.

          • Code — (String)

            The error code that indicates why the parameter or parameter combination is not valid. For more information about error codes, see Error Codes.

          • Message — (String)

            The error message that describes why the parameter or parameter combination is not valid. For more information about error messages, see Error Codes.

Returns:

  • (AWS.Request)

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

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

Creates a static route for the specified local gateway route table.

Service Reference:

Examples:

Calling the createLocalGatewayRoute operation

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

      The CIDR range used for destination matches. Routing decisions are based on the most specific match.

    • LocalGatewayRouteTableId — (String)

      The ID of the local gateway route table.

    • LocalGatewayVirtualInterfaceGroupId — (String)

      The ID of the virtual interface group.

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

      • Route — (map)

        Information about the route.

        • DestinationCidrBlock — (String)

          The CIDR block used for destination matches.

        • LocalGatewayVirtualInterfaceGroupId — (String)

          The ID of the virtual interface group.

        • Type — (String)

          The route type.

          Possible values include:
          • "static"
          • "propagated"
        • State — (String)

          The state of the route.

          Possible values include:
          • "pending"
          • "active"
          • "blackhole"
          • "deleting"
          • "deleted"
        • LocalGatewayRouteTableId — (String)

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn — (String)

          The Amazon Resource Name (ARN) of the local gateway route table.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the local gateway route.

Returns:

  • (AWS.Request)

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

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

Associates the specified VPC with the specified local gateway route table.

Examples:

Calling the createLocalGatewayRouteTableVpcAssociation operation

var params = {
  LocalGatewayRouteTableId: 'STRING_VALUE', /* required */
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createLocalGatewayRouteTableVpcAssociation(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: {})
    • LocalGatewayRouteTableId — (String)

      The ID of the local gateway route table.

    • VpcId — (String)

      The ID of the VPC.

    • TagSpecifications — (Array<map>)

      The tags to assign to the local gateway route table VPC association.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • LocalGatewayRouteTableVpcAssociation — (map)

        Information about the association.

        • LocalGatewayRouteTableVpcAssociationId — (String)

          The ID of the association.

        • LocalGatewayRouteTableId — (String)

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn — (String)

          The Amazon Resource Name (ARN) of the local gateway route table for the association.

        • LocalGatewayId — (String)

          The ID of the local gateway.

        • VpcId — (String)

          The ID of the VPC.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the local gateway route table for the association.

        • State — (String)

          The state of the association.

        • Tags — (Array<map>)

          The tags assigned to the association.

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

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

Creates a managed prefix list. You can specify one or more entries for the prefix list. Each entry consists of a CIDR block and an optional description.

Service Reference:

Examples:

Calling the createManagedPrefixList operation

var params = {
  AddressFamily: 'STRING_VALUE', /* required */
  MaxEntries: 'NUMBER_VALUE', /* required */
  PrefixListName: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  Entries: [
    {
      Cidr: 'STRING_VALUE', /* required */
      Description: 'STRING_VALUE'
    },
    /* more items */
  ],
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createManagedPrefixList(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.

    • PrefixListName — (String)

      A name for the prefix list.

      Constraints: Up to 255 characters in length. The name cannot start with com.amazonaws.

    • Entries — (Array<map>)

      One or more entries for the prefix list.

      • Cidrrequired — (String)

        The CIDR block.

      • Description — (String)

        A description for the entry.

        Constraints: Up to 255 characters in length.

    • MaxEntries — (Integer)

      The maximum number of entries for the prefix list.

    • TagSpecifications — (Array<map>)

      The tags to apply to the prefix list during creation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • AddressFamily — (String)

      The IP address type.

      Valid Values: IPv4 | IPv6

    • ClientToken — (String)

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

      Constraints: Up to 255 UTF-8 characters in length.

      If a token is not provided, the SDK will use a version 4 UUID.

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:

      • PrefixList — (map)

        Information about the prefix list.

        • PrefixListId — (String)

          The ID of the prefix list.

        • AddressFamily — (String)

          The IP address version.

        • State — (String)

          The current state of the prefix list.

          Possible values include:
          • "create-in-progress"
          • "create-complete"
          • "create-failed"
          • "modify-in-progress"
          • "modify-complete"
          • "modify-failed"
          • "restore-in-progress"
          • "restore-complete"
          • "restore-failed"
          • "delete-in-progress"
          • "delete-complete"
          • "delete-failed"
        • StateMessage — (String)

          The state message.

        • PrefixListArn — (String)

          The Amazon Resource Name (ARN) for the prefix list.

        • PrefixListName — (String)

          The name of the prefix list.

        • MaxEntries — (Integer)

          The maximum number of entries for the prefix list.

        • Version — (Integer)

          The version of the prefix list.

        • Tags — (Array<map>)

          The tags for the prefix list.

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

        • OwnerId — (String)

          The ID of the owner of the prefix list.

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. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. You can create either a public NAT gateway or a private NAT gateway.

With a public NAT gateway, internet-bound traffic from a private subnet can be routed to the NAT gateway, so that instances in a private subnet can connect to the internet.

With a private NAT gateway, private communication is routed across VPCs and on-premises networks through a transit gateway or virtual private gateway. Common use cases include running large workloads behind a small pool of allowlisted IPv4 addresses, preserving private IPv4 addresses, and communicating between overlapping networks.

For more information, see NAT gateways in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

To create a NAT gateway


/* This example creates a NAT gateway in subnet subnet-1a2b3c4d and associates an Elastic IP address with the allocation ID eipalloc-37fc1a52 with the NAT gateway. */

 var params = {
  AllocationId: "eipalloc-37fc1a52", 
  SubnetId: "subnet-1a2b3c4d"
 };
 ec2.createNatGateway(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NatGateway: {
     CreateTime: <Date Representation>, 
     NatGatewayAddresses: [
        {
       AllocationId: "eipalloc-37fc1a52"
      }
     ], 
     NatGatewayId: "nat-08d48af2a8e83edfd", 
     State: "pending", 
     SubnetId: "subnet-1a2b3c4d", 
     VpcId: "vpc-1122aabb"
    }
   }
   */
 });

Calling the createNatGateway operation

var params = {
  SubnetId: 'STRING_VALUE', /* required */
  AllocationId: 'STRING_VALUE',
  ClientToken: 'STRING_VALUE',
  ConnectivityType: private | public,
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • AllocationId — (String)

      [Public NAT gateways only] The allocation ID of an Elastic IP address to associate with the NAT gateway. You cannot specify an Elastic IP address with a private NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.

    • ClientToken — (String)

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

      Constraint: Maximum 64 ASCII characters.

      If a token is not provided, the SDK will use a version 4 UUID.
    • 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 subnet in which to create the NAT gateway.

    • TagSpecifications — (Array<map>)

      The tags to assign to the NAT gateway.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • ConnectivityType — (String)

      Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity.

      Possible values include:
      • "private"
      • "public"

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:

      • ClientToken — (String)

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

      • NatGateway — (map)

        Information about 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.

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

        • NatGatewayAddresses — (Array<map>)

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

          • AllocationId — (String)

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

          • NetworkInterfaceId — (String)

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

          • PrivateIp — (String)

            The private IP address associated with the NAT gateway.

          • PublicIp — (String)

            [Public NAT gateway only] The Elastic IP address associated with the NAT gateway.

        • NatGatewayId — (String)

          The ID of the NAT gateway.

        • ProvisionedBandwidth — (map)

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

        • 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"
        • SubnetId — (String)

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

        • VpcId — (String)

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

        • Tags — (Array<map>)

          The tags for the NAT 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.

        • ConnectivityType — (String)

          Indicates whether the NAT gateway supports public or private connectivity.

          Possible values include:
          • "private"
          • "public"

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, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

To create a network ACL


/* This example creates a network ACL for the specified VPC. */

 var params = {
  VpcId: "vpc-a01106c2"
 };
 ec2.createNetworkAcl(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NetworkAcl: {
     Associations: [
     ], 
     Entries: [
        {
       CidrBlock: "0.0.0.0/0", 
       Egress: true, 
       Protocol: "-1", 
       RuleAction: "deny", 
       RuleNumber: 32767
      }, 
        {
       CidrBlock: "0.0.0.0/0", 
       Egress: false, 
       Protocol: "-1", 
       RuleAction: "deny", 
       RuleNumber: 32767
      }
     ], 
     IsDefault: false, 
     NetworkAclId: "acl-5fb85d36", 
     Tags: [
     ], 
     VpcId: "vpc-a01106c2"
    }
   }
   */
 });

Calling the createNetworkAcl operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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.

    • TagSpecifications — (Array<map>)

      The tags to assign to the network ACL.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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.

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

        • Entries — (Array<map>)

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

          • CidrBlock — (String)

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

          • Egress — (Boolean)

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

          • IcmpTypeCode — (map)

            ICMP protocol: The ICMP type and code.

            • Code — (Integer)

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

            • Type — (Integer)

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

          • Ipv6CidrBlock — (String)

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

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

          • Protocol — (String)

            The protocol number. 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"
          • RuleNumber — (Integer)

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

        • IsDefault — (Boolean)

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

        • NetworkAclId — (String)

          The ID of the network ACL.

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

        • VpcId — (String)

          The ID of the VPC for the network ACL.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the network ACL.

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.

Service Reference:

Examples:

To create a network ACL entry


/* This example creates an entry for the specified network ACL. The rule allows ingress traffic from anywhere (0.0.0.0/0) on UDP port 53 (DNS) into any associated subnet. */

 var params = {
  CidrBlock: "0.0.0.0/0", 
  Egress: false, 
  NetworkAclId: "acl-5fb85d36", 
  PortRange: {
   From: 53, 
   To: 53
  }, 
  Protocol: "17", 
  RuleAction: "allow", 
  RuleNumber: 100
 };
 ec2.createNetworkAclEntry(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the createNetworkAclEntry operation

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

      The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24). We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.

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

    • Egress — (Boolean)

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

    • IcmpTypeCode — (map)

      ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

      • Code — (Integer)

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

      • Type — (Integer)

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

    • Ipv6CidrBlock — (String)

      The IPv6 network range to allow or deny, in CIDR notation (for example 2001:db8:1234:1a00::/64).

    • NetworkAclId — (String)

      The ID of the network ACL.

    • PortRange — (map)

      TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17 (UDP).

      • From — (Integer)

        The first port in the range.

      • To — (Integer)

        The last port in the range.

    • Protocol — (String)

      The protocol number. A value of "-1" means all protocols. If you specify "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is allowed, regardless of any ports or ICMP types or codes that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

    • RuleAction — (String)

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

      Possible values include:
      • "allow"
      • "deny"
    • 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.

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.

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

Creates a path to analyze for reachability.

Reachability Analyzer enables you to analyze and debug network reachability between two resources in your virtual private cloud (VPC). For more information, see What is Reachability Analyzer.

Service Reference:

Examples:

Calling the createNetworkInsightsPath operation

var params = {
  ClientToken: 'STRING_VALUE', /* required */
  Destination: 'STRING_VALUE', /* required */
  Protocol: tcp | udp, /* required */
  Source: 'STRING_VALUE', /* required */
  DestinationIp: 'STRING_VALUE',
  DestinationPort: 'NUMBER_VALUE',
  DryRun: true || false,
  SourceIp: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createNetworkInsightsPath(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: {})
    • SourceIp — (String)

      The IP address of the Amazon Web Services resource that is the source of the path.

    • DestinationIp — (String)

      The IP address of the Amazon Web Services resource that is the destination of the path.

    • Source — (String)

      The Amazon Web Services resource that is the source of the path.

    • Destination — (String)

      The Amazon Web Services resource that is the destination of the path.

    • Protocol — (String)

      The protocol.

      Possible values include:
      • "tcp"
      • "udp"
    • DestinationPort — (Integer)

      The destination port.

    • TagSpecifications — (Array<map>)

      The tags to add to the path.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

    • ClientToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.

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:

      • NetworkInsightsPath — (map)

        Information about the path.

        • NetworkInsightsPathId — (String)

          The ID of the path.

        • NetworkInsightsPathArn — (String)

          The Amazon Resource Name (ARN) of the path.

        • CreatedDate — (Date)

          The time stamp when the path was created.

        • Source — (String)

          The Amazon Web Services resource that is the source of the path.

        • Destination — (String)

          The Amazon Web Services resource that is the destination of the path.

        • SourceIp — (String)

          The IP address of the Amazon Web Services resource that is the source of the path.

        • DestinationIp — (String)

          The IP address of the Amazon Web Services resource that is the destination of the path.

        • Protocol — (String)

          The protocol.

          Possible values include:
          • "tcp"
          • "udp"
        • DestinationPort — (Integer)

          The destination port.

        • Tags — (Array<map>)

          The tags associated with the path.

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

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 Virtual Private Cloud User Guide.

Service Reference:

Examples:

To create a network interface


/* This example creates a network interface for the specified subnet. */

 var params = {
  Description: "my network interface", 
  Groups: [
     "sg-903004f8"
  ], 
  PrivateIpAddress: "10.0.2.17", 
  SubnetId: "subnet-9d4a7b6c"
 };
 ec2.createNetworkInterface(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NetworkInterface: {
     AvailabilityZone: "us-east-1d", 
     Description: "my network interface", 
     Groups: [
        {
       GroupId: "sg-903004f8", 
       GroupName: "default"
      }
     ], 
     MacAddress: "02:1a:80:41:52:9c", 
     NetworkInterfaceId: "eni-e5aa89a3", 
     OwnerId: "123456789012", 
     PrivateIpAddress: "10.0.2.17", 
     PrivateIpAddresses: [
        {
       Primary: true, 
       PrivateIpAddress: "10.0.2.17"
      }
     ], 
     RequesterManaged: false, 
     SourceDestCheck: true, 
     Status: "pending", 
     SubnetId: "subnet-9d4a7b6c", 
     TagSet: [
     ], 
     VpcId: "vpc-a01106c2"
    }
   }
   */
 });

Calling the createNetworkInterface operation

var params = {
  SubnetId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DryRun: true || false,
  Groups: [
    'STRING_VALUE',
    /* more items */
  ],
  InterfaceType: efa | branch | trunk,
  Ipv4PrefixCount: 'NUMBER_VALUE',
  Ipv4Prefixes: [
    {
      Ipv4Prefix: 'STRING_VALUE'
    },
    /* more items */
  ],
  Ipv6AddressCount: 'NUMBER_VALUE',
  Ipv6Addresses: [
    {
      Ipv6Address: 'STRING_VALUE'
    },
    /* more items */
  ],
  Ipv6PrefixCount: 'NUMBER_VALUE',
  Ipv6Prefixes: [
    {
      Ipv6Prefix: 'STRING_VALUE'
    },
    /* more items */
  ],
  PrivateIpAddress: 'STRING_VALUE',
  PrivateIpAddresses: [
    {
      Primary: true || false,
      PrivateIpAddress: 'STRING_VALUE'
    },
    /* more items */
  ],
  SecondaryPrivateIpAddressCount: 'NUMBER_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • Description — (String)

      A description for the network interface.

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

    • Groups — (Array<String>)

      The IDs of one or more security groups.

    • Ipv6AddressCount — (Integer)

      The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses. If your subnet has the AssignIpv6AddressOnCreation attribute set to true, you can specify 0 to override this setting.

    • Ipv6Addresses — (Array<map>)

      One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.

      • Ipv6Address — (String)

        The IPv6 address.

    • PrivateIpAddress — (String)

      The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR 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).

    • PrivateIpAddresses — (Array<map>)

      One or more private IPv4 addresses.

      • Primary — (Boolean)

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

      • PrivateIpAddress — (String)

        The private IPv4 addresses.

    • SecondaryPrivateIpAddressCount — (Integer)

      The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR 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 IP Addresses Per ENI Per Instance Type in the Amazon Virtual Private Cloud User Guide.

    • Ipv4Prefixes — (Array<map>)

      One or more IPv4 prefixes assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

    • Ipv4PrefixCount — (Integer)

      The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv4 Prefixes option.

    • Ipv6Prefixes — (Array<map>)

      One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

      • Ipv6Prefix — (String)

        The IPv6 prefix.

    • Ipv6PrefixCount — (Integer)

      The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv6Prefixes option.

    • InterfaceType — (String)

      Indicates the type of network interface. To create an Elastic Fabric Adapter (EFA), specify efa. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide. To create a trunk network interface, specify efa. For more information, see Network interface trunking in the Amazon Elastic Compute Cloud User Guide.

      Possible values include:
      • "efa"
      • "branch"
      • "trunk"
    • SubnetId — (String)

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

    • TagSpecifications — (Array<map>)

      The tags to apply to the new network interface.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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)

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

      If a token is not provided, the SDK will use a version 4 UUID.

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.

        • Association — (map)

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

          • AllocationId — (String)

            The allocation ID.

          • AssociationId — (String)

            The association ID.

          • IpOwnerId — (String)

            The ID of the Elastic IP address owner.

          • PublicDnsName — (String)

            The public DNS name.

          • PublicIp — (String)

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

          • CustomerOwnedIp — (String)

            The customer-owned IP address associated with the network interface.

          • CarrierIp — (String)

            The carrier IP address associated with the network interface.

            This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

        • Attachment — (map)

          The network interface attachment.

          • AttachTime — (Date)

            The timestamp indicating when the attachment initiated.

          • AttachmentId — (String)

            The ID of the network interface attachment.

          • DeleteOnTermination — (Boolean)

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

          • DeviceIndex — (Integer)

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

          • NetworkCardIndex — (Integer)

            The index of the network card.

          • InstanceId — (String)

            The ID of the instance.

          • InstanceOwnerId — (String)

            The Amazon Web Services account ID of the owner of the instance.

          • Status — (String)

            The attachment state.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
        • AvailabilityZone — (String)

          The Availability Zone.

        • Description — (String)

          A description.

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

        • InterfaceType — (String)

          The type of network interface.

          Possible values include:
          • "interface"
          • "natGateway"
          • "efa"
          • "trunk"
        • Ipv6Addresses — (Array<map>)

          The IPv6 addresses associated with the network interface.

          • Ipv6Address — (String)

            The IPv6 address.

        • MacAddress — (String)

          The MAC address.

        • NetworkInterfaceId — (String)

          The ID of the network interface.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • OwnerId — (String)

          The Amazon Web Services account ID of the owner of the network interface.

        • PrivateDnsName — (String)

          The private DNS name.

        • PrivateIpAddress — (String)

          The IPv4 address of the network interface within the subnet.

        • PrivateIpAddresses — (Array<map>)

          The private IPv4 addresses associated with the network interface.

          • Association — (map)

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

            • AllocationId — (String)

              The allocation ID.

            • AssociationId — (String)

              The association ID.

            • IpOwnerId — (String)

              The ID of the Elastic IP address owner.

            • PublicDnsName — (String)

              The public DNS name.

            • PublicIp — (String)

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

            • CustomerOwnedIp — (String)

              The customer-owned IP address associated with the network interface.

            • CarrierIp — (String)

              The carrier IP address associated with the network interface.

              This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

          • Primary — (Boolean)

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

          • PrivateDnsName — (String)

            The private DNS name.

          • PrivateIpAddress — (String)

            The private IPv4 address.

        • Ipv4Prefixes — (Array<map>)

          The IPv4 prefixes that are assigned to the network interface.

        • Ipv6Prefixes — (Array<map>)

          The IPv6 prefixes that are assigned to the network interface.

          • Ipv6Prefix — (String)

            The IPv6 prefix.

        • RequesterId — (String)

          The alias or Amazon Web Services account ID of the principal or service that created the network interface.

        • RequesterManaged — (Boolean)

          Indicates whether the network interface is being managed by Amazon Web Services.

        • SourceDestCheck — (Boolean)

          Indicates whether source/destination checking is enabled.

        • Status — (String)

          The status of the network interface.

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

          The ID of the subnet.

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

        • VpcId — (String)

          The ID of the VPC.

        • DenyAllIgwTraffic — (Boolean)

          Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is true, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.

      • ClientToken — (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.

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

Grants an Amazon Web Services-authorized account permission to attach the specified network interface to an instance in their account.

You can grant permission to a single Amazon Web Services account only, and only one account at a time.

Examples:

Calling the createNetworkInterfacePermission operation

var params = {
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  Permission: INSTANCE-ATTACH | EIP-ASSOCIATE, /* required */
  AwsAccountId: 'STRING_VALUE',
  AwsService: 'STRING_VALUE',
  DryRun: true || false
};
ec2.createNetworkInterfacePermission(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.

    • AwsAccountId — (String)

      The Amazon Web Services account ID.

    • AwsService — (String)

      The Amazon Web Service. Currently not supported.

    • Permission — (String)

      The type of permission to grant.

      Possible values include:
      • "INSTANCE-ATTACH"
      • "EIP-ASSOCIATE"
    • 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:

      • InterfacePermission — (map)

        Information about the permission for the network interface.

        • NetworkInterfacePermissionId — (String)

          The ID of the network interface permission.

        • NetworkInterfaceId — (String)

          The ID of the network interface.

        • AwsAccountId — (String)

          The Amazon Web Services account ID.

        • AwsService — (String)

          The Amazon Web Service.

        • Permission — (String)

          The type of permission.

          Possible values include:
          • "INSTANCE-ATTACH"
          • "EIP-ASSOCIATE"
        • PermissionState — (map)

          Information about the state of the permission.

          • State — (String)

            The state of the permission.

            Possible values include:
            • "pending"
            • "granted"
            • "revoking"
            • "revoked"
          • StatusMessage — (String)

            A status message, if applicable.

Returns:

  • (AWS.Request)

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

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

Creates a placement group in which to launch instances. The strategy of the placement group determines how the instances are organized within the group.

A cluster placement group is a logical grouping of instances within a single Availability Zone that benefit from low network latency, high network throughput. A spread placement group places instances on distinct hardware. A partition placement group places groups of instances in different partitions, where instances in one partition do not share the same hardware with instances in another partition.

For more information, see Placement groups in the Amazon EC2 User Guide.

Service Reference:

Examples:

To create a placement group


/* This example creates a placement group with the specified name. */

 var params = {
  GroupName: "my-cluster", 
  Strategy: "cluster"
 };
 ec2.createPlacementGroup(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the createPlacementGroup operation

var params = {
  DryRun: true || false,
  GroupName: 'STRING_VALUE',
  PartitionCount: 'NUMBER_VALUE',
  Strategy: cluster | spread | partition,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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. Must be unique within the scope of your account for the Region.

      Constraints: Up to 255 ASCII characters

    • Strategy — (String)

      The placement strategy.

      Possible values include:
      • "cluster"
      • "spread"
      • "partition"
    • PartitionCount — (Integer)

      The number of partitions. Valid only when Strategy is set to partition.

    • TagSpecifications — (Array<map>)

      The tags to apply to the new placement group.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • PlacementGroup — (map)

        Describes a placement group.

        • GroupName — (String)

          The name of the placement group.

        • State — (String)

          The state of the placement group.

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

          The placement strategy.

          Possible values include:
          • "cluster"
          • "spread"
          • "partition"
        • PartitionCount — (Integer)

          The number of partitions. Valid only if strategy is set to partition.

        • GroupId — (String)

          The ID of the placement group.

        • Tags — (Array<map>)

          Any tags applied to the placement 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.

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

Creates a root volume replacement task for an Amazon EC2 instance. The root volume can either be restored to its initial launch state, or it can be restored using a specific snapshot.

For more information, see Replace a root volume in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the createReplaceRootVolumeTask operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  SnapshotId: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createReplaceRootVolumeTask(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: {})
    • InstanceId — (String)

      The ID of the instance for which to replace the root volume.

    • SnapshotId — (String)

      The ID of the snapshot from which to restore the replacement root volume. If you want to restore the volume to the initial launch state, omit this parameter.

    • ClientToken — (String)

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency. For more information, see Ensuring idempotency.

      If a token is not provided, the SDK will use a version 4 UUID.
    • 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.

    • TagSpecifications — (Array<map>)

      The tags to apply to the root volume replacement task.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • ReplaceRootVolumeTask — (map)

        Information about the root volume replacement task.

        • ReplaceRootVolumeTaskId — (String)

          The ID of the root volume replacement task.

        • InstanceId — (String)

          The ID of the instance for which the root volume replacement task was created.

        • TaskState — (String)

          The state of the task. The task can be in one of the following states:

          • pending - the replacement volume is being created.

          • in-progress - the original volume is being detached and the replacement volume is being attached.

          • succeeded - the replacement volume has been successfully attached to the instance and the instance is available.

          • failing - the replacement task is in the process of failing.

          • failed - the replacement task has failed but the original root volume is still attached.

          • failing-detached - the replacement task is in the process of failing. The instance might have no root volume attached.

          • failed-detached - the replacement task has failed and the instance has no root volume attached.

          Possible values include:
          • "pending"
          • "in-progress"
          • "failing"
          • "succeeded"
          • "failed"
          • "failed-detached"
        • StartTime — (String)

          The time the task was started.

        • CompleteTime — (String)

          The time the task completed.

        • Tags — (Array<map>)

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

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

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

Note: Only Standard Reserved Instances can be sold in the Reserved Instance Marketplace. Convertible Reserved Instances cannot be sold.

The Reserved Instance Marketplace matches sellers who want to resell Standard 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 Standard 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 Standard Reserved Instances, and specify the upfront price to receive for them. Your Standard Reserved Instance listings then become available for purchase. To view the details of your Standard Reserved Instance listing, you can use the DescribeReservedInstancesListings operation.

For more information, see Reserved Instance Marketplace in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the createReservedInstancesListing operation

var params = {
  ClientToken: 'STRING_VALUE', /* required */
  InstanceCount: 'NUMBER_VALUE', /* required */
  PriceSchedules: [ /* required */
    {
      CurrencyCode: USD,
      Price: 'NUMBER_VALUE',
      Term: 'NUMBER_VALUE'
    },
    /* 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: {})
    • 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.

    • 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 Standard Reserved Instance for each month remaining in the Reserved Instance term.

      • CurrencyCode — (String)

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

        Possible values include:
        • "USD"
      • Price — (Float)

        The fixed price for the 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.

    • ReservedInstancesId — (String)

      The ID of the active Standard Reserved 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:

      • ReservedInstancesListings — (Array<map>)

        Information about the Standard Reserved Instance listing.

        • ClientToken — (String)

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

        • CreateDate — (Date)

          The time the listing was created.

        • InstanceCounts — (Array<map>)

          The number of instances in this state.

          • InstanceCount — (Integer)

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

          • State — (String)

            The states of the listed Reserved Instances.

            Possible values include:
            • "available"
            • "sold"
            • "cancelled"
            • "pending"
        • PriceSchedules — (Array<map>)

          The price of the Reserved Instance listing.

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

          • CurrencyCode — (String)

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

            Possible values include:
            • "USD"
          • Price — (Float)

            The fixed price for the 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.

        • ReservedInstancesId — (String)

          The ID of the Reserved Instance.

        • ReservedInstancesListingId — (String)

          The ID of the Reserved Instance 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.

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

        • UpdateDate — (Date)

          The last modified timestamp of the listing.

Returns:

  • (AWS.Request)

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

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

Starts a task that restores an AMI from an Amazon S3 object that was previously created by using CreateStoreImageTask.

To use this API, you must have the required permissions. For more information, see Permissions for storing and restoring AMIs using Amazon S3 in the Amazon Elastic Compute Cloud User Guide.

For more information, see Store and restore an AMI using Amazon S3 in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the createRestoreImageTask operation

var params = {
  Bucket: 'STRING_VALUE', /* required */
  ObjectKey: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Name: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createRestoreImageTask(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: {})
    • Bucket — (String)

      The name of the Amazon S3 bucket that contains the stored AMI object.

    • ObjectKey — (String)

      The name of the stored AMI object in the bucket.

    • Name — (String)

      The name for the restored AMI. The name must be unique for AMIs in the Region for this account. If you do not provide a name, the new AMI gets the same name as the original AMI.

    • TagSpecifications — (Array<map>)

      The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the snapshots, or both.

      • To tag the AMI, the value for ResourceType must be image.

      • To tag the snapshots, the value for ResourceType must be snapshot. The same tag is applied to all of the snapshots that are created.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • ImageId — (String)

        The AMI ID.

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, network interface, egress-only internet gateway, or transit gateway.

When determining how to route traffic, we use the route with the most specific match. For example, traffic is destined for the IPv4 address 192.0.2.3, and the route table includes the following two IPv4 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.

Service Reference:

Examples:

To create a route


/* This example creates a route for the specified route table. The route matches all traffic (0.0.0.0/0) and routes it to the specified Internet gateway. */

 var params = {
  DestinationCidrBlock: "0.0.0.0/0", 
  GatewayId: "igw-c0a643a9", 
  RouteTableId: "rtb-22574640"
 };
 ec2.createRoute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the createRoute operation

var params = {
  RouteTableId: 'STRING_VALUE', /* required */
  CarrierGatewayId: 'STRING_VALUE',
  DestinationCidrBlock: 'STRING_VALUE',
  DestinationIpv6CidrBlock: 'STRING_VALUE',
  DestinationPrefixListId: 'STRING_VALUE',
  DryRun: true || false,
  EgressOnlyInternetGatewayId: 'STRING_VALUE',
  GatewayId: 'STRING_VALUE',
  InstanceId: 'STRING_VALUE',
  LocalGatewayId: 'STRING_VALUE',
  NatGatewayId: 'STRING_VALUE',
  NetworkInterfaceId: 'STRING_VALUE',
  TransitGatewayId: 'STRING_VALUE',
  VpcEndpointId: '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: {})
    • DestinationCidrBlock — (String)

      The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.

    • DestinationIpv6CidrBlock — (String)

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

    • DestinationPrefixListId — (String)

      The ID of a prefix list used for the destination match.

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

    • VpcEndpointId — (String)

      The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.

    • EgressOnlyInternetGatewayId — (String)

      [IPv6 traffic only] The ID of an egress-only internet gateway.

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

    • NatGatewayId — (String)

      [IPv4 traffic only] The ID of a NAT gateway.

    • TransitGatewayId — (String)

      The ID of a transit gateway.

    • LocalGatewayId — (String)

      The ID of the local gateway.

    • CarrierGatewayId — (String)

      The ID of the carrier gateway.

      You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.

    • NetworkInterfaceId — (String)

      The ID of a network interface.

    • RouteTableId — (String)

      The ID of the route table for the route.

    • VpcPeeringConnectionId — (String)

      The ID of a 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.

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, see Route tables in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

To create a route table


/* This example creates a route table for the specified VPC. */

 var params = {
  VpcId: "vpc-a01106c2"
 };
 ec2.createRouteTable(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    RouteTable: {
     Associations: [
     ], 
     PropagatingVgws: [
     ], 
     RouteTableId: "rtb-22574640", 
     Routes: [
        {
       DestinationCidrBlock: "10.0.0.0/16", 
       GatewayId: "local", 
       State: "active"
      }
     ], 
     Tags: [
     ], 
     VpcId: "vpc-a01106c2"
    }
   }
   */
 });

Calling the createRouteTable operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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.

    • TagSpecifications — (Array<map>)

      The tags to assign to the route table.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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.

        • Associations — (Array<map>)

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

          • Main — (Boolean)

            Indicates whether this is the main route table.

          • RouteTableAssociationId — (String)

            The ID of the association.

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

          • GatewayId — (String)

            The ID of the internet gateway or virtual private gateway.

          • AssociationState — (map)

            The state of the association.

            • State — (String)

              The state of the association.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failed"
            • StatusMessage — (String)

              The status message, if applicable.

        • PropagatingVgws — (Array<map>)

          Any virtual private gateway (VGW) propagating routes.

          • GatewayId — (String)

            The ID of the virtual private gateway.

        • RouteTableId — (String)

          The ID of the route table.

        • Routes — (Array<map>)

          The routes in the route table.

          • DestinationCidrBlock — (String)

            The IPv4 CIDR block used for the destination match.

          • DestinationIpv6CidrBlock — (String)

            The IPv6 CIDR block used for the destination match.

          • DestinationPrefixListId — (String)

            The prefix of the Amazon Web Service.

          • EgressOnlyInternetGatewayId — (String)

            The ID of the egress-only internet gateway.

          • 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 ID of Amazon Web Services account that owns the instance.

          • NatGatewayId — (String)

            The ID of a NAT gateway.

          • TransitGatewayId — (String)

            The ID of a transit gateway.

          • LocalGatewayId — (String)

            The ID of the local gateway.

          • CarrierGatewayId — (String)

            The ID of the carrier gateway.

          • NetworkInterfaceId — (String)

            The ID of the network interface.

          • 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"
          • 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"
          • VpcPeeringConnectionId — (String)

            The ID of a VPC peering connection.

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

        • VpcId — (String)

          The ID of the VPC.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the route table.

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 acts as a virtual firewall for your instance to control inbound and outbound traffic. 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.

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.

For more information about VPC security group limits, see Amazon VPC Limits.

Service Reference:

Examples:

To create a security group for a VPC


/* This example creates a security group for the specified VPC. */

 var params = {
  Description: "My security group", 
  GroupName: "my-security-group", 
  VpcId: "vpc-1a2b3c4d"
 };
 ec2.createSecurityGroup(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    GroupId: "sg-903004f8"
   }
   */
 });

Calling the createSecurityGroup operation

var params = {
  Description: 'STRING_VALUE', /* required */
  GroupName: 'STRING_VALUE', /* required */
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  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: {})
    • 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 ._-:/()#,@[]+=&;{}!$*

    • GroupName — (String)

      The name of the security group.

      Constraints: Up to 255 characters in length. Cannot start with sg-.

      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.

    • TagSpecifications — (Array<map>)

      The tags to assign to the security group.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • GroupId — (String)

        The ID of the security group.

      • Tags — (Array<map>)

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

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.

You can create snapshots of volumes in a Region and volumes on an Outpost. If you create a snapshot of a volume in a Region, the snapshot must be stored in the same Region as the volume. If you create a snapshot of a volume on an Outpost, the snapshot can be stored on the same Outpost as the volume, or in the Region for that Outpost.

When a snapshot is created, any Amazon Web Services 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 Amazon EBS volume at the time the snapshot command is issued; this might 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 Amazon 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.

You can tag your snapshots during creation. For more information, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.

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

Service Reference:

Examples:

To create a snapshot


/* This example creates a snapshot of the volume with a volume ID of ``vol-1234567890abcdef0`` and a short description to identify the snapshot. */

 var params = {
  Description: "This is my root volume snapshot.", 
  VolumeId: "vol-1234567890abcdef0"
 };
 ec2.createSnapshot(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Description: "This is my root volume snapshot.", 
    OwnerId: "012345678910", 
    SnapshotId: "snap-066877671789bd71b", 
    StartTime: <Date Representation>, 
    State: "pending", 
    Tags: [
    ], 
    VolumeId: "vol-1234567890abcdef0", 
    VolumeSize: 8
   }
   */
 });

Calling the createSnapshot operation

var params = {
  VolumeId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  DryRun: true || false,
  OutpostArn: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • Description — (String)

      A description for the snapshot.

    • OutpostArn — (String)

      The Amazon Resource Name (ARN) of the Outpost on which to create a local snapshot.

      • To create a snapshot of a volume in a Region, omit this parameter. The snapshot is created in the same Region as the volume.

      • To create a snapshot of a volume on an Outpost and store the snapshot in the Region, omit this parameter. The snapshot is created in the Region for the Outpost.

      • To create a snapshot of a volume on an Outpost and store the snapshot on an Outpost, specify the ARN of the destination Outpost. The snapshot must be created on the same Outpost as the volume.

      For more information, see Create local snapshots from volumes on an Outpost in the Amazon Elastic Compute Cloud User Guide.

    • VolumeId — (String)

      The ID of the Amazon EBS volume.

    • TagSpecifications — (Array<map>)

      The tags to apply to the snapshot during creation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

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

      • Description — (String)

        The description for the snapshot.

      • Encrypted — (Boolean)

        Indicates whether the snapshot is encrypted.

      • KmsKeyId — (String)

        The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the parent volume.

      • OwnerId — (String)

        The ID of the Amazon Web Services account that owns the EBS snapshot.

      • Progress — (String)

        The progress of the snapshot, as a percentage.

      • SnapshotId — (String)

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

      • StartTime — (Date)

        The time stamp when the snapshot was initiated.

      • 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 Key Management Service (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 DescribeSnapshots.

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

      • VolumeSize — (Integer)

        The size of the volume, in GiB.

      • OwnerAlias — (String)

        The Amazon Web Services owner alias, from an Amazon-maintained list (amazon). This is not the user-configured Amazon Web Services account alias set using the IAM console.

      • OutpostArn — (String)

        The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide.

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

Returns:

  • (AWS.Request)

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

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

Creates crash-consistent snapshots of multiple EBS volumes and stores the data in S3. Volumes are chosen by specifying an instance. Any attached volumes will produce one snapshot each that is crash-consistent across the instance. Boot volumes can be excluded by changing the parameters.

You can create multi-volume snapshots of instances in a Region and instances on an Outpost. If you create snapshots from an instance in a Region, the snapshots must be stored in the same Region as the instance. If you create snapshots from an instance on an Outpost, the snapshots can be stored on the same Outpost as the instance, or in the Region for that Outpost.

Service Reference:

Examples:

Calling the createSnapshots operation

var params = {
  InstanceSpecification: { /* required */
    ExcludeBootVolume: true || false,
    InstanceId: 'STRING_VALUE'
  },
  CopyTagsFromSource: volume,
  Description: 'STRING_VALUE',
  DryRun: true || false,
  OutpostArn: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createSnapshots(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 propagated to every snapshot specified by the instance.

    • InstanceSpecification — (map)

      The instance to specify which volumes should be included in the snapshots.

      • InstanceId — (String)

        The instance to specify which volumes should be snapshotted.

      • ExcludeBootVolume — (Boolean)

        Excludes the root volume from being snapshotted.

    • OutpostArn — (String)

      The Amazon Resource Name (ARN) of the Outpost on which to create the local snapshots.

      • To create snapshots from an instance in a Region, omit this parameter. The snapshots are created in the same Region as the instance.

      • To create snapshots from an instance on an Outpost and store the snapshots in the Region, omit this parameter. The snapshots are created in the Region for the Outpost.

      • To create snapshots from an instance on an Outpost and store the snapshots on an Outpost, specify the ARN of the destination Outpost. The snapshots must be created on the same Outpost as the instance.

      For more information, see Create multi-volume local snapshots from instances on an Outpost in the Amazon Elastic Compute Cloud User Guide.

    • TagSpecifications — (Array<map>)

      Tags to apply to every snapshot specified by the instance.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

    • CopyTagsFromSource — (String)

      Copies the tags from the specified volume to corresponding snapshot.

      Possible values include:
      • "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:

      • Snapshots — (Array<map>)

        List of snapshots.

        • Description — (String)

          Description specified by the CreateSnapshotRequest that has been applied to all snapshots.

        • Tags — (Array<map>)

          Tags associated with this 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.

        • VolumeId — (String)

          Source volume from which this snapshot was created.

        • State — (String)

          Current state of the snapshot.

          Possible values include:
          • "pending"
          • "completed"
          • "error"
        • VolumeSize — (Integer)

          Size of the volume from which this snapshot was created.

        • StartTime — (Date)

          Time this snapshot was started. This is the same for all snapshots initiated by the same request.

        • Progress — (String)

          Progress this snapshot has made towards completing.

        • OwnerId — (String)

          Account id used when creating this snapshot.

        • SnapshotId — (String)

          Snapshot id that can be used to describe this snapshot.

        • OutpostArn — (String)

          The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide.

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 Amazon Web Services account. For more information, see Spot Instance data feed in the Amazon EC2 User Guide for Linux Instances.

Service Reference:

Examples:

To create a Spot Instance datafeed


/* This example creates a Spot Instance data feed for your AWS account. */

 var params = {
  Bucket: "my-s3-bucket", 
  Prefix: "spotdata"
 };
 ec2.createSpotDatafeedSubscription(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SpotDatafeedSubscription: {
     Bucket: "my-s3-bucket", 
     OwnerId: "123456789012", 
     Prefix: "spotdata", 
     State: "Active"
    }
   }
   */
 });

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: {})
    • Bucket — (String)

      The name of the Amazon S3 bucket in which to store the Spot Instance data feed. For more information about bucket names, see Rules for bucket naming in the Amazon S3 Developer 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.

    • Prefix — (String)

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

        • Bucket — (String)

          The name of the Amazon S3 bucket where the Spot Instance data feed is located.

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

        • OwnerId — (String)

          The Amazon Web Services account ID of the account.

        • Prefix — (String)

          The prefix for the data feed files.

        • State — (String)

          The state of the Spot Instance data feed subscription.

          Possible values include:
          • "Active"
          • "Inactive"

Returns:

  • (AWS.Request)

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

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

Stores an AMI as a single object in an Amazon S3 bucket.

To use this API, you must have the required permissions. For more information, see Permissions for storing and restoring AMIs using Amazon S3 in the Amazon Elastic Compute Cloud User Guide.

For more information, see Store and restore an AMI using Amazon S3 in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the createStoreImageTask operation

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

      The ID of the AMI.

    • Bucket — (String)

      The name of the Amazon S3 bucket in which the AMI object will be stored. The bucket must be in the Region in which the request is being made. The AMI object appears in the bucket only after the upload task has completed.

    • S3ObjectTags — (Array<map>)

      The tags to apply to the AMI object that will be stored in the Amazon S3 bucket.

      • Key — (String)

        The key of the tag.

        Constraints: Tag keys are case-sensitive and can be up to 128 Unicode characters in length. May not begin with aws:.

      • Value — (String)

        The value of the tag.

        Constraints: Tag values are case-sensitive and can be up to 256 Unicode characters in length.

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

      • ObjectKey — (String)

        The name of the stored AMI object in the S3 bucket.

Returns:

  • (AWS.Request)

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

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

Creates a subnet in a specified VPC.

You must specify an IPv4 CIDR block for the subnet. After you create a subnet, you can't change its CIDR block. The allowed block size is between a /16 netmask (65,536 IP addresses) and /28 netmask (16 IP addresses). The CIDR block must not overlap with the CIDR block of an existing subnet in the VPC.

If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with an IPv6 CIDR block that uses a /64 prefix length.

Amazon Web Services reserves both the first four and the last IPv4 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.

When you stop an instance in a subnet, it retains its private IPv4 address. 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.

Service Reference:

Examples:

To create a subnet


/* This example creates a subnet in the specified VPC with the specified CIDR block. We recommend that you let us select an Availability Zone for you. */

 var params = {
  CidrBlock: "10.0.1.0/24", 
  VpcId: "vpc-a01106c2"
 };
 ec2.createSubnet(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Subnet: {
     AvailabilityZone: "us-west-2c", 
     AvailableIpAddressCount: 251, 
     CidrBlock: "10.0.1.0/24", 
     State: "pending", 
     SubnetId: "subnet-9d4a7b6c", 
     VpcId: "vpc-a01106c2"
    }
   }
   */
 });

Calling the createSubnet operation

var params = {
  CidrBlock: 'STRING_VALUE', /* required */
  VpcId: 'STRING_VALUE', /* required */
  AvailabilityZone: 'STRING_VALUE',
  AvailabilityZoneId: 'STRING_VALUE',
  DryRun: true || false,
  Ipv6CidrBlock: 'STRING_VALUE',
  OutpostArn: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • TagSpecifications — (Array<map>)

      The tags to assign to the subnet.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • AvailabilityZone — (String)

      The Availability Zone or Local Zone for the subnet.

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

      To create a subnet in a Local Zone, set this value to the Local Zone ID, for example us-west-2-lax-1a. For information about the Regions that support Local Zones, see Available Regions in the Amazon Elastic Compute Cloud User Guide.

      To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost ARN.

    • AvailabilityZoneId — (String)

      The AZ ID or the Local Zone ID of the subnet.

    • CidrBlock — (String)

      The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.

    • Ipv6CidrBlock — (String)

      The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

    • OutpostArn — (String)

      The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the Availability Zone of the Outpost subnet.

    • VpcId — (String)

      The ID of the VPC.

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

      • Subnet — (map)

        Information about the subnet.

        • AvailabilityZone — (String)

          The Availability Zone of the subnet.

        • AvailabilityZoneId — (String)

          The AZ ID of the subnet.

        • AvailableIpAddressCount — (Integer)

          The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.

        • CidrBlock — (String)

          The IPv4 CIDR block assigned to 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 IPv4 address.

        • MapCustomerOwnedIpOnLaunch — (Boolean)

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives a customer-owned IPv4 address.

        • CustomerOwnedIpv4Pool — (String)

          The customer-owned IPv4 address pool associated with the subnet.

        • State — (String)

          The current state of the subnet.

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

          The ID of the subnet.

        • VpcId — (String)

          The ID of the VPC the subnet is in.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the subnet.

        • AssignIpv6AddressOnCreation — (Boolean)

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives an IPv6 address.

        • Ipv6CidrBlockAssociationSet — (Array<map>)

          Information about the IPv6 CIDR blocks associated with the subnet.

          • AssociationId — (String)

            The association ID for the CIDR block.

          • Ipv6CidrBlock — (String)

            The IPv6 CIDR block.

          • Ipv6CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of a CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

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

        • SubnetArn — (String)

          The Amazon Resource Name (ARN) of the subnet.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

Returns:

  • (AWS.Request)

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

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

Creates a subnet CIDR reservation. For information about subnet CIDR reservations, see Subnet CIDR reservations in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

Calling the createSubnetCidrReservation operation

var params = {
  Cidr: 'STRING_VALUE', /* required */
  ReservationType: prefix | explicit, /* required */
  SubnetId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createSubnetCidrReservation(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: {})
    • TagSpecifications — (Array<map>)

      The tags to assign to the subnet CIDR reservation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • SubnetId — (String)

      The ID of the subnet.

    • Cidr — (String)

      The IPv4 or IPV6 CIDR range to reserve.

    • ReservationType — (String)

      The type of reservation.

      The following are valid values:

      • prefix: The Amazon EC2 Prefix Delegation feature assigns the IP addresses to network interfaces that are associated with an instance. For information about Prefix Delegation, see Prefix Delegation for Amazon EC2 network interfaces in the Amazon Elastic Compute Cloud User Guide.

      • explicit: You manually assign the IP addresses to resources that reside in your subnet.

      Possible values include:
      • "prefix"
      • "explicit"
    • Description — (String)

      The description to assign to the subnet CIDR reservation.

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

      • SubnetCidrReservation — (map)

        Information about the created subnet CIDR reservation.

        • SubnetCidrReservationId — (String)

          The ID of the subnet CIDR reservation.

        • SubnetId — (String)

          The ID of the subnet.

        • Cidr — (String)

          The CIDR that has been reserved.

        • ReservationType — (String)

          The type of reservation.

          Possible values include:
          • "prefix"
          • "explicit"
        • OwnerId — (String)

          The ID of the account that owns the subnet CIDR reservation.

        • Description — (String)

          The description assigned to the subnet CIDR reservation.

        • Tags — (Array<map>)

          The tags assigned to the subnet CIDR reservation.

          • 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 only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 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.

Service Reference:

Examples:

To add a tag to a resource


/* This example adds the tag Stack=production to the specified image, or overwrites an existing tag for the AMI where the tag key is Stack. */

 var params = {
  Resources: [
     "ami-78a54011"
  ], 
  Tags: [
     {
    Key: "Stack", 
    Value: "production"
   }
  ]
 };
 ec2.createTags(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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 the resources, separated by spaces.

      Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.

    • Tags — (Array<map>)

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

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

Creates a Traffic Mirror filter.

A Traffic Mirror filter is a set of rules that defines the traffic to mirror.

By default, no traffic is mirrored. To mirror traffic, use CreateTrafficMirrorFilterRule to add Traffic Mirror rules to the filter. The rules you add define what traffic gets mirrored. You can also use ModifyTrafficMirrorFilterNetworkServices to mirror supported network services.

Service Reference:

Examples:

Calling the createTrafficMirrorFilter operation

var params = {
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createTrafficMirrorFilter(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)

      The description of the Traffic Mirror filter.

    • TagSpecifications — (Array<map>)

      The tags to assign to a Traffic Mirror filter.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

    • ClientToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.

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:

      • TrafficMirrorFilter — (map)

        Information about the Traffic Mirror filter.

        • TrafficMirrorFilterId — (String)

          The ID of the Traffic Mirror filter.

        • IngressFilterRules — (Array<map>)

          Information about the ingress rules that are associated with the Traffic Mirror filter.

          • TrafficMirrorFilterRuleId — (String)

            The ID of the Traffic Mirror rule.

          • TrafficMirrorFilterId — (String)

            The ID of the Traffic Mirror filter that the rule is associated with.

          • TrafficDirection — (String)

            The traffic direction assigned to the Traffic Mirror rule.

            Possible values include:
            • "ingress"
            • "egress"
          • RuleNumber — (Integer)

            The rule number of the Traffic Mirror rule.

          • RuleAction — (String)

            The action assigned to the Traffic Mirror rule.

            Possible values include:
            • "accept"
            • "reject"
          • Protocol — (Integer)

            The protocol assigned to the Traffic Mirror rule.

          • DestinationPortRange — (map)

            The destination port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • SourcePortRange — (map)

            The source port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • DestinationCidrBlock — (String)

            The destination CIDR block assigned to the Traffic Mirror rule.

          • SourceCidrBlock — (String)

            The source CIDR block assigned to the Traffic Mirror rule.

          • Description — (String)

            The description of the Traffic Mirror rule.

        • EgressFilterRules — (Array<map>)

          Information about the egress rules that are associated with the Traffic Mirror filter.

          • TrafficMirrorFilterRuleId — (String)

            The ID of the Traffic Mirror rule.

          • TrafficMirrorFilterId — (String)

            The ID of the Traffic Mirror filter that the rule is associated with.

          • TrafficDirection — (String)

            The traffic direction assigned to the Traffic Mirror rule.

            Possible values include:
            • "ingress"
            • "egress"
          • RuleNumber — (Integer)

            The rule number of the Traffic Mirror rule.

          • RuleAction — (String)

            The action assigned to the Traffic Mirror rule.

            Possible values include:
            • "accept"
            • "reject"
          • Protocol — (Integer)

            The protocol assigned to the Traffic Mirror rule.

          • DestinationPortRange — (map)

            The destination port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • SourcePortRange — (map)

            The source port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • DestinationCidrBlock — (String)

            The destination CIDR block assigned to the Traffic Mirror rule.

          • SourceCidrBlock — (String)

            The source CIDR block assigned to the Traffic Mirror rule.

          • Description — (String)

            The description of the Traffic Mirror rule.

        • NetworkServices — (Array<String>)

          The network service traffic that is associated with the Traffic Mirror filter.

        • Description — (String)

          The description of the Traffic Mirror filter.

        • Tags — (Array<map>)

          The tags assigned to the Traffic Mirror filter.

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

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

Returns:

  • (AWS.Request)

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

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

Creates a Traffic Mirror filter rule.

A Traffic Mirror rule defines the Traffic Mirror source traffic to mirror.

You need the Traffic Mirror filter ID when you create the rule.

Service Reference:

Examples:

Calling the createTrafficMirrorFilterRule operation

var params = {
  DestinationCidrBlock: 'STRING_VALUE', /* required */
  RuleAction: accept | reject, /* required */
  RuleNumber: 'NUMBER_VALUE', /* required */
  SourceCidrBlock: 'STRING_VALUE', /* required */
  TrafficDirection: ingress | egress, /* required */
  TrafficMirrorFilterId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DestinationPortRange: {
    FromPort: 'NUMBER_VALUE',
    ToPort: 'NUMBER_VALUE'
  },
  DryRun: true || false,
  Protocol: 'NUMBER_VALUE',
  SourcePortRange: {
    FromPort: 'NUMBER_VALUE',
    ToPort: 'NUMBER_VALUE'
  }
};
ec2.createTrafficMirrorFilterRule(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: {})
    • TrafficMirrorFilterId — (String)

      The ID of the filter that this rule is associated with.

    • TrafficDirection — (String)

      The type of traffic.

      Possible values include:
      • "ingress"
      • "egress"
    • RuleNumber — (Integer)

      The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.

    • RuleAction — (String)

      The action to take on the filtered traffic.

      Possible values include:
      • "accept"
      • "reject"
    • DestinationPortRange — (map)

      The destination port range.

      • FromPort — (Integer)

        The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

      • ToPort — (Integer)

        The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

    • SourcePortRange — (map)

      The source port range.

      • FromPort — (Integer)

        The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

      • ToPort — (Integer)

        The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

    • Protocol — (Integer)

      The protocol, for example UDP, to assign to the Traffic Mirror rule.

      For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.

    • DestinationCidrBlock — (String)

      The destination CIDR block to assign to the Traffic Mirror rule.

    • SourceCidrBlock — (String)

      The source CIDR block to assign to the Traffic Mirror rule.

    • Description — (String)

      The description of the Traffic Mirror rule.

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

    • ClientToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.

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:

      • TrafficMirrorFilterRule — (map)

        The Traffic Mirror rule.

        • TrafficMirrorFilterRuleId — (String)

          The ID of the Traffic Mirror rule.

        • TrafficMirrorFilterId — (String)

          The ID of the Traffic Mirror filter that the rule is associated with.

        • TrafficDirection — (String)

          The traffic direction assigned to the Traffic Mirror rule.

          Possible values include:
          • "ingress"
          • "egress"
        • RuleNumber — (Integer)

          The rule number of the Traffic Mirror rule.

        • RuleAction — (String)

          The action assigned to the Traffic Mirror rule.

          Possible values include:
          • "accept"
          • "reject"
        • Protocol — (Integer)

          The protocol assigned to the Traffic Mirror rule.

        • DestinationPortRange — (map)

          The destination port range assigned to the Traffic Mirror rule.

          • FromPort — (Integer)

            The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • ToPort — (Integer)

            The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

        • SourcePortRange — (map)

          The source port range assigned to the Traffic Mirror rule.

          • FromPort — (Integer)

            The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • ToPort — (Integer)

            The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

        • DestinationCidrBlock — (String)

          The destination CIDR block assigned to the Traffic Mirror rule.

        • SourceCidrBlock — (String)

          The source CIDR block assigned to the Traffic Mirror rule.

        • Description — (String)

          The description of the Traffic Mirror rule.

      • ClientToken — (String)

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

Returns:

  • (AWS.Request)

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

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

Creates a Traffic Mirror session.

A Traffic Mirror session actively copies packets from a Traffic Mirror source to a Traffic Mirror target. Create a filter, and then assign it to the session to define a subset of the traffic to mirror, for example all TCP traffic.

The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in a different VPC connected via VPC peering or a transit gateway.

By default, no traffic is mirrored. Use CreateTrafficMirrorFilter to create filter rules that specify the traffic to mirror.

Service Reference:

Examples:

Calling the createTrafficMirrorSession operation

var params = {
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  SessionNumber: 'NUMBER_VALUE', /* required */
  TrafficMirrorFilterId: 'STRING_VALUE', /* required */
  TrafficMirrorTargetId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DryRun: true || false,
  PacketLength: 'NUMBER_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  VirtualNetworkId: 'NUMBER_VALUE'
};
ec2.createTrafficMirrorSession(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 source network interface.

    • TrafficMirrorTargetId — (String)

      The ID of the Traffic Mirror target.

    • TrafficMirrorFilterId — (String)

      The ID of the Traffic Mirror filter.

    • PacketLength — (Integer)

      The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target.

      If you do not want to mirror the entire packet, use the PacketLength parameter to specify the number of bytes in each packet to mirror.

    • SessionNumber — (Integer)

      The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

      Valid values are 1-32766.

    • VirtualNetworkId — (Integer)

      The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at random.

    • Description — (String)

      The description of the Traffic Mirror session.

    • TagSpecifications — (Array<map>)

      The tags to assign to a Traffic Mirror session.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

    • ClientToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.

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:

      • TrafficMirrorSession — (map)

        Information about the Traffic Mirror session.

        • TrafficMirrorSessionId — (String)

          The ID for the Traffic Mirror session.

        • TrafficMirrorTargetId — (String)

          The ID of the Traffic Mirror target.

        • TrafficMirrorFilterId — (String)

          The ID of the Traffic Mirror filter.

        • NetworkInterfaceId — (String)

          The ID of the Traffic Mirror session's network interface.

        • OwnerId — (String)

          The ID of the account that owns the Traffic Mirror session.

        • PacketLength — (Integer)

          The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet

        • SessionNumber — (Integer)

          The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

          Valid values are 1-32766.

        • VirtualNetworkId — (Integer)

          The virtual network ID associated with the Traffic Mirror session.

        • Description — (String)

          The description of the Traffic Mirror session.

        • Tags — (Array<map>)

          The tags assigned to the Traffic Mirror session.

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

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

Returns:

  • (AWS.Request)

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

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

Creates a target for your Traffic Mirror session.

A Traffic Mirror target is the destination for mirrored traffic. The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in different VPCs connected via VPC peering or a transit gateway.

A Traffic Mirror target can be a network interface, or a Network Load Balancer.

To use the target in a Traffic Mirror session, use CreateTrafficMirrorSession.

Service Reference:

Examples:

Calling the createTrafficMirrorTarget operation

var params = {
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DryRun: true || false,
  NetworkInterfaceId: 'STRING_VALUE',
  NetworkLoadBalancerArn: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createTrafficMirrorTarget(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 network interface ID that is associated with the target.

    • NetworkLoadBalancerArn — (String)

      The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.

    • Description — (String)

      The description of the Traffic Mirror target.

    • TagSpecifications — (Array<map>)

      The tags to assign to the Traffic Mirror target.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

    • ClientToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.

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:

      • TrafficMirrorTarget — (map)

        Information about the Traffic Mirror target.

        • TrafficMirrorTargetId — (String)

          The ID of the Traffic Mirror target.

        • NetworkInterfaceId — (String)

          The network interface ID that is attached to the target.

        • NetworkLoadBalancerArn — (String)

          The Amazon Resource Name (ARN) of the Network Load Balancer.

        • Type — (String)

          The type of Traffic Mirror target.

          Possible values include:
          • "network-interface"
          • "network-load-balancer"
        • Description — (String)

          Information about the Traffic Mirror target.

        • OwnerId — (String)

          The ID of the account that owns the Traffic Mirror target.

        • Tags — (Array<map>)

          The tags assigned to the Traffic Mirror target.

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

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

Returns:

  • (AWS.Request)

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

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

Creates a transit gateway.

You can use a transit gateway to interconnect your virtual private clouds (VPC) and on-premises networks. After the transit gateway enters the available state, you can attach your VPCs and VPN connections to the transit gateway.

To attach your VPCs, use CreateTransitGatewayVpcAttachment.

To attach a VPN connection, use CreateCustomerGateway to create a customer gateway and specify the ID of the customer gateway and the ID of the transit gateway in a call to CreateVpnConnection.

When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table and the default propagation route table. You can use CreateTransitGatewayRouteTable to create additional transit gateway route tables. If you disable automatic route propagation, we do not create a default transit gateway route table. You can use EnableTransitGatewayRouteTablePropagation to propagate routes from a resource attachment to a transit gateway route table. If you disable automatic associations, you can use AssociateTransitGatewayRouteTable to associate a resource attachment with a transit gateway route table.

Service Reference:

Examples:

Calling the createTransitGateway operation

var params = {
  Description: 'STRING_VALUE',
  DryRun: true || false,
  Options: {
    AmazonSideAsn: 'NUMBER_VALUE',
    AutoAcceptSharedAttachments: enable | disable,
    DefaultRouteTableAssociation: enable | disable,
    DefaultRouteTablePropagation: enable | disable,
    DnsSupport: enable | disable,
    MulticastSupport: enable | disable,
    TransitGatewayCidrBlocks: [
      'STRING_VALUE',
      /* more items */
    ],
    VpnEcmpSupport: enable | disable
  },
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createTransitGateway(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 of the transit gateway.

    • Options — (map)

      The transit gateway options.

      • AmazonSideAsn — (Integer)

        A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs. The default is 64512.

      • AutoAcceptSharedAttachments — (String)

        Enable or disable automatic acceptance of attachment requests. Disabled by default.

        Possible values include:
        • "enable"
        • "disable"
      • DefaultRouteTableAssociation — (String)

        Enable or disable automatic association with the default association route table. Enabled by default.

        Possible values include:
        • "enable"
        • "disable"
      • DefaultRouteTablePropagation — (String)

        Enable or disable automatic propagation of routes to the default propagation route table. Enabled by default.

        Possible values include:
        • "enable"
        • "disable"
      • VpnEcmpSupport — (String)

        Enable or disable Equal Cost Multipath Protocol support. Enabled by default.

        Possible values include:
        • "enable"
        • "disable"
      • DnsSupport — (String)

        Enable or disable DNS support. Enabled by default.

        Possible values include:
        • "enable"
        • "disable"
      • MulticastSupport — (String)

        Indicates whether multicast is enabled on the transit gateway

        Possible values include:
        • "enable"
        • "disable"
      • TransitGatewayCidrBlocks — (Array<String>)

        One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.

    • TagSpecifications — (Array<map>)

      The tags to apply to the transit gateway.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • TransitGateway — (map)

        Information about the transit gateway.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • TransitGatewayArn — (String)

          The Amazon Resource Name (ARN) of the transit gateway.

        • State — (String)

          The state of the transit gateway.

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

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Description — (String)

          The description of the transit gateway.

        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The transit gateway options.

          • AmazonSideAsn — (Integer)

            A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.

          • TransitGatewayCidrBlocks — (Array<String>)

            The transit gateway CIDR blocks.

          • AutoAcceptSharedAttachments — (String)

            Indicates whether attachment requests are automatically accepted.

            Possible values include:
            • "enable"
            • "disable"
          • DefaultRouteTableAssociation — (String)

            Indicates whether resource attachments are automatically associated with the default association route table.

            Possible values include:
            • "enable"
            • "disable"
          • AssociationDefaultRouteTableId — (String)

            The ID of the default association route table.

          • DefaultRouteTablePropagation — (String)

            Indicates whether resource attachments automatically propagate routes to the default propagation route table.

            Possible values include:
            • "enable"
            • "disable"
          • PropagationDefaultRouteTableId — (String)

            The ID of the default propagation route table.

          • VpnEcmpSupport — (String)

            Indicates whether Equal Cost Multipath Protocol support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • DnsSupport — (String)

            Indicates whether DNS support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • MulticastSupport — (String)

            Indicates whether multicast is enabled on the transit gateway

            Possible values include:
            • "enable"
            • "disable"
        • Tags — (Array<map>)

          The tags for the transit 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.

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

Creates a Connect attachment from a specified transit gateway attachment. A Connect attachment is a GRE-based tunnel attachment that you can use to establish a connection between a transit gateway and an appliance.

A Connect attachment uses an existing VPC or Amazon Web Services Direct Connect attachment as the underlying transport mechanism.

Service Reference:

Examples:

Calling the createTransitGatewayConnect operation

var params = {
  Options: { /* required */
    Protocol: gre /* required */
  },
  TransportTransitGatewayAttachmentId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createTransitGatewayConnect(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: {})
    • TransportTransitGatewayAttachmentId — (String)

      The ID of the transit gateway attachment. You can specify a VPC attachment or Amazon Web Services Direct Connect attachment.

    • Options — (map)

      The Connect attachment options.

      • Protocolrequired — (String)

        The tunnel protocol.

        Possible values include:
        • "gre"
    • TagSpecifications — (Array<map>)

      The tags to apply to the Connect attachment.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • TransitGatewayConnect — (map)

        Information about the Connect attachment.

        • TransitGatewayAttachmentId — (String)

          The ID of the Connect attachment.

        • TransportTransitGatewayAttachmentId — (String)

          The ID of the attachment from which the Connect attachment was created.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • State — (String)

          The state of the attachment.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The Connect attachment options.

          • Protocol — (String)

            The tunnel protocol.

            Possible values include:
            • "gre"
        • Tags — (Array<map>)

          The tags for the attachment.

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

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

Creates a Connect peer for a specified transit gateway Connect attachment between a transit gateway and an appliance.

The peer address and transit gateway address must be the same IP address family (IPv4 or IPv6).

For more information, see Connect peers in the Transit Gateways Guide.

Service Reference:

Examples:

Calling the createTransitGatewayConnectPeer operation

var params = {
  InsideCidrBlocks: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  PeerAddress: 'STRING_VALUE', /* required */
  TransitGatewayAttachmentId: 'STRING_VALUE', /* required */
  BgpOptions: {
    PeerAsn: 'NUMBER_VALUE'
  },
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  TransitGatewayAddress: 'STRING_VALUE'
};
ec2.createTransitGatewayConnectPeer(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: {})
    • TransitGatewayAttachmentId — (String)

      The ID of the Connect attachment.

    • TransitGatewayAddress — (String)

      The peer IP address (GRE outer IP address) on the transit gateway side of the Connect peer, which must be specified from a transit gateway CIDR block. If not specified, Amazon automatically assigns the first available IP address from the transit gateway CIDR block.

    • PeerAddress — (String)

      The peer IP address (GRE outer IP address) on the appliance side of the Connect peer.

    • BgpOptions — (map)

      The BGP options for the Connect peer.

      • PeerAsn — (Integer)

        The peer Autonomous System Number (ASN).

    • InsideCidrBlocks — (Array<String>)

      The range of inside IP addresses that are used for BGP peering. You must specify a size /29 IPv4 CIDR block from the 169.254.0.0/16 range. The first address from the range must be configured on the appliance as the BGP IP address. You can also optionally specify a size /125 IPv6 CIDR block from the fd00::/8 range.

    • TagSpecifications — (Array<map>)

      The tags to apply to the Connect peer.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • TransitGatewayConnectPeer — (map)

        Information about the Connect peer.

        • TransitGatewayAttachmentId — (String)

          The ID of the Connect attachment.

        • TransitGatewayConnectPeerId — (String)

          The ID of the Connect peer.

        • State — (String)

          The state of the Connect peer.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • CreationTime — (Date)

          The creation time.

        • ConnectPeerConfiguration — (map)

          The Connect peer details.

          • TransitGatewayAddress — (String)

            The Connect peer IP address on the transit gateway side of the tunnel.

          • PeerAddress — (String)

            The Connect peer IP address on the appliance side of the tunnel.

          • InsideCidrBlocks — (Array<String>)

            The range of interior BGP peer IP addresses.

          • Protocol — (String)

            The tunnel protocol.

            Possible values include:
            • "gre"
          • BgpConfigurations — (Array<map>)

            The BGP configuration details.

            • TransitGatewayAsn — (Integer)

              The transit gateway Autonomous System Number (ASN).

            • PeerAsn — (Integer)

              The peer Autonomous System Number (ASN).

            • TransitGatewayAddress — (String)

              The interior BGP peer IP address for the transit gateway.

            • PeerAddress — (String)

              The interior BGP peer IP address for the appliance.

            • BgpStatus — (String)

              The BGP status.

              Possible values include:
              • "up"
              • "down"
        • Tags — (Array<map>)

          The tags for the Connect peer.

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

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

Creates a multicast domain using the specified transit gateway.

The transit gateway must be in the available state before you create a domain. Use DescribeTransitGateways to see the state of transit gateway.

Examples:

Calling the createTransitGatewayMulticastDomain operation

var params = {
  TransitGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Options: {
    AutoAcceptSharedAssociations: enable | disable,
    Igmpv2Support: enable | disable,
    StaticSourcesSupport: enable | disable
  },
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createTransitGatewayMulticastDomain(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: {})
    • TransitGatewayId — (String)

      The ID of the transit gateway.

    • Options — (map)

      The options for the transit gateway multicast domain.

      • Igmpv2Support — (String)

        Specify whether to enable Internet Group Management Protocol (IGMP) version 2 for the transit gateway multicast domain.

        Possible values include:
        • "enable"
        • "disable"
      • StaticSourcesSupport — (String)

        Specify whether to enable support for statically configuring multicast group sources for a domain.

        Possible values include:
        • "enable"
        • "disable"
      • AutoAcceptSharedAssociations — (String)

        Indicates whether to automatically accept cross-account subnet associations that are associated with the transit gateway multicast domain.

        Possible values include:
        • "enable"
        • "disable"
    • TagSpecifications — (Array<map>)

      The tags for the transit gateway multicast domain.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • TransitGatewayMulticastDomain — (map)

        Information about the transit gateway multicast domain.

        • TransitGatewayMulticastDomainId — (String)

          The ID of the transit gateway multicast domain.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • TransitGatewayMulticastDomainArn — (String)

          The Amazon Resource Name (ARN) of the transit gateway multicast domain.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the transit gateway multicast domain.

        • Options — (map)

          The options for the transit gateway multicast domain.

          • Igmpv2Support — (String)

            Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned on for the transit gateway multicast domain.

            Possible values include:
            • "enable"
            • "disable"
          • StaticSourcesSupport — (String)

            Indicates whether support for statically configuring transit gateway multicast group sources is turned on.

            Possible values include:
            • "enable"
            • "disable"
          • AutoAcceptSharedAssociations — (String)

            Indicates whether to automatically cross-account subnet associations that are associated with the transit gateway multicast domain.

            Possible values include:
            • "enable"
            • "disable"
        • State — (String)

          The state of the transit gateway multicast domain.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • CreationTime — (Date)

          The time the transit gateway multicast domain was created.

        • Tags — (Array<map>)

          The tags for the transit gateway multicast domain.

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

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

Requests a transit gateway peering attachment between the specified transit gateway (requester) and a peer transit gateway (accepter). The transit gateways must be in different Regions. The peer transit gateway can be in your account or a different Amazon Web Services account.

After you create the peering attachment, the owner of the accepter transit gateway must accept the attachment request.

Examples:

Calling the createTransitGatewayPeeringAttachment operation

var params = {
  PeerAccountId: 'STRING_VALUE', /* required */
  PeerRegion: 'STRING_VALUE', /* required */
  PeerTransitGatewayId: 'STRING_VALUE', /* required */
  TransitGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createTransitGatewayPeeringAttachment(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: {})
    • TransitGatewayId — (String)

      The ID of the transit gateway.

    • PeerTransitGatewayId — (String)

      The ID of the peer transit gateway with which to create the peering attachment.

    • PeerAccountId — (String)

      The ID of the Amazon Web Services account that owns the peer transit gateway.

    • PeerRegion — (String)

      The Region where the peer transit gateway is located.

    • TagSpecifications — (Array<map>)

      The tags to apply to the transit gateway peering attachment.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • TransitGatewayPeeringAttachment — (map)

        The transit gateway peering attachment.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway peering attachment.

        • RequesterTgwInfo — (map)

          Information about the requester transit gateway.

          • TransitGatewayId — (String)

            The ID of the transit gateway.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region — (String)

            The Region of the transit gateway.

        • AccepterTgwInfo — (map)

          Information about the accepter transit gateway.

          • TransitGatewayId — (String)

            The ID of the transit gateway.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region — (String)

            The Region of the transit gateway.

        • Status — (map)

          The status of the transit gateway peering attachment.

          • Code — (String)

            The status code.

          • Message — (String)

            The status message, if applicable.

        • State — (String)

          The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • CreationTime — (Date)

          The time the transit gateway peering attachment was created.

        • Tags — (Array<map>)

          The tags for the transit gateway peering attachment.

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

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

Creates a reference (route) to a prefix list in a specified transit gateway route table.

Examples:

Calling the createTransitGatewayPrefixListReference operation

var params = {
  PrefixListId: 'STRING_VALUE', /* required */
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  Blackhole: true || false,
  DryRun: true || false,
  TransitGatewayAttachmentId: 'STRING_VALUE'
};
ec2.createTransitGatewayPrefixListReference(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: {})
    • TransitGatewayRouteTableId — (String)

      The ID of the transit gateway route table.

    • PrefixListId — (String)

      The ID of the prefix list that is used for destination matches.

    • TransitGatewayAttachmentId — (String)

      The ID of the attachment to which traffic is routed.

    • Blackhole — (Boolean)

      Indicates whether to drop traffic that matches this route.

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

      • TransitGatewayPrefixListReference — (map)

        Information about the prefix list reference.

        • TransitGatewayRouteTableId — (String)

          The ID of the transit gateway route table.

        • PrefixListId — (String)

          The ID of the prefix list.

        • PrefixListOwnerId — (String)

          The ID of the prefix list owner.

        • State — (String)

          The state of the prefix list reference.

          Possible values include:
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
        • Blackhole — (Boolean)

          Indicates whether traffic that matches this route is dropped.

        • TransitGatewayAttachment — (map)

          Information about the transit gateway attachment.

          • TransitGatewayAttachmentId — (String)

            The ID of the attachment.

          • ResourceType — (String)

            The resource type. Note that the tgw-peering resource type has been deprecated.

            Possible values include:
            • "vpc"
            • "vpn"
            • "direct-connect-gateway"
            • "connect"
            • "peering"
            • "tgw-peering"
          • ResourceId — (String)

            The ID of the resource.

Returns:

  • (AWS.Request)

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

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

Creates a static route for the specified transit gateway route table.

Service Reference:

Examples:

Calling the createTransitGatewayRoute operation

var params = {
  DestinationCidrBlock: 'STRING_VALUE', /* required */
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  Blackhole: true || false,
  DryRun: true || false,
  TransitGatewayAttachmentId: 'STRING_VALUE'
};
ec2.createTransitGatewayRoute(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: {})
    • DestinationCidrBlock — (String)

      The CIDR range used for destination matches. Routing decisions are based on the most specific match.

    • TransitGatewayRouteTableId — (String)

      The ID of the transit gateway route table.

    • TransitGatewayAttachmentId — (String)

      The ID of the attachment.

    • Blackhole — (Boolean)

      Indicates whether to drop traffic that matches this route.

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

      • Route — (map)

        Information about the route.

        • DestinationCidrBlock — (String)

          The CIDR block used for destination matches.

        • PrefixListId — (String)

          The ID of the prefix list used for destination matches.

        • TransitGatewayAttachments — (Array<map>)

          The attachments.

          • ResourceId — (String)

            The ID of the resource.

          • TransitGatewayAttachmentId — (String)

            The ID of the attachment.

          • ResourceType — (String)

            The resource type. Note that the tgw-peering resource type has been deprecated.

            Possible values include:
            • "vpc"
            • "vpn"
            • "direct-connect-gateway"
            • "connect"
            • "peering"
            • "tgw-peering"
        • Type — (String)

          The route type.

          Possible values include:
          • "static"
          • "propagated"
        • State — (String)

          The state of the route.

          Possible values include:
          • "pending"
          • "active"
          • "blackhole"
          • "deleting"
          • "deleted"

Returns:

  • (AWS.Request)

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

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

Creates a route table for the specified transit gateway.

Service Reference:

Examples:

Calling the createTransitGatewayRouteTable operation

var params = {
  TransitGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createTransitGatewayRouteTable(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: {})
    • TransitGatewayId — (String)

      The ID of the transit gateway.

    • TagSpecifications — (Array<map>)

      The tags to apply to the transit gateway route table.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • TransitGatewayRouteTable — (map)

        Information about the transit gateway route table.

        • TransitGatewayRouteTableId — (String)

          The ID of the transit gateway route table.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • State — (String)

          The state of the transit gateway route table.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • DefaultAssociationRouteTable — (Boolean)

          Indicates whether this is the default association route table for the transit gateway.

        • DefaultPropagationRouteTable — (Boolean)

          Indicates whether this is the default propagation route table for the transit gateway.

        • CreationTime — (Date)

          The creation time.

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

Returns:

  • (AWS.Request)

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

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

Attaches the specified VPC to the specified transit gateway.

If you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC that is already attached, the new VPC CIDR range is not propagated to the default propagation route table.

To send VPC traffic to an attached transit gateway, add a route to the VPC route table using CreateRoute.

Examples:

Calling the createTransitGatewayVpcAttachment operation

var params = {
  SubnetIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  TransitGatewayId: 'STRING_VALUE', /* required */
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Options: {
    ApplianceModeSupport: enable | disable,
    DnsSupport: enable | disable,
    Ipv6Support: enable | disable
  },
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createTransitGatewayVpcAttachment(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: {})
    • TransitGatewayId — (String)

      The ID of the transit gateway.

    • VpcId — (String)

      The ID of the VPC.

    • SubnetIds — (Array<String>)

      The IDs of one or more subnets. You can specify only one subnet per Availability Zone. You must specify at least one subnet, but we recommend that you specify two subnets for better availability. The transit gateway uses one IP address from each specified subnet.

    • Options — (map)

      The VPC attachment options.

      • DnsSupport — (String)

        Enable or disable DNS support. The default is enable.

        Possible values include:
        • "enable"
        • "disable"
      • Ipv6Support — (String)

        Enable or disable IPv6 support. The default is disable.

        Possible values include:
        • "enable"
        • "disable"
      • ApplianceModeSupport — (String)

        Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is disable.

        Possible values include:
        • "enable"
        • "disable"
    • TagSpecifications — (Array<map>)

      The tags to apply to the VPC attachment.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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

      • TransitGatewayVpcAttachment — (map)

        Information about the VPC attachment.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • VpcId — (String)

          The ID of the VPC.

        • VpcOwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC.

        • State — (String)

          The state of the VPC attachment. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • SubnetIds — (Array<String>)

          The IDs of the subnets.

        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The VPC attachment options.

          • DnsSupport — (String)

            Indicates whether DNS support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • Ipv6Support — (String)

            Indicates whether IPv6 support is disabled.

            Possible values include:
            • "enable"
            • "disable"
          • ApplianceModeSupport — (String)

            Indicates whether appliance mode support is enabled.

            Possible values include:
            • "enable"
            • "disable"
        • Tags — (Array<map>)

          The tags for the VPC attachment.

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

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

Creates an EBS volume that can be attached to an instance in the same Availability Zone.

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

You can create encrypted volumes. Encrypted volumes must 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.

You can tag your volumes during creation. For more information, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.

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

Service Reference:

Examples:

To create a new volume


/* This example creates an 80 GiB General Purpose (SSD) volume in the Availability Zone ``us-east-1a``. */

 var params = {
  AvailabilityZone: "us-east-1a", 
  Size: 80, 
  VolumeType: "gp2"
 };
 ec2.createVolume(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AvailabilityZone: "us-east-1a", 
    CreateTime: <Date Representation>, 
    Encrypted: false, 
    Iops: 240, 
    Size: 80, 
    SnapshotId: "", 
    State: "creating", 
    VolumeId: "vol-6b60b7c7", 
    VolumeType: "gp2"
   }
   */
 });

To create a new Provisioned IOPS (SSD) volume from a snapshot


/* This example creates a new Provisioned IOPS (SSD) volume with 1000 provisioned IOPS from a snapshot in the Availability Zone ``us-east-1a``. */

 var params = {
  AvailabilityZone: "us-east-1a", 
  Iops: 1000, 
  SnapshotId: "snap-066877671789bd71b", 
  VolumeType: "io1"
 };
 ec2.createVolume(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Attachments: [
    ], 
    AvailabilityZone: "us-east-1a", 
    CreateTime: <Date Representation>, 
    Iops: 1000, 
    Size: 500, 
    SnapshotId: "snap-066877671789bd71b", 
    State: "creating", 
    Tags: [
    ], 
    VolumeId: "vol-1234567890abcdef0", 
    VolumeType: "io1"
   }
   */
 });

Calling the createVolume operation

var params = {
  AvailabilityZone: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  Encrypted: true || false,
  Iops: 'NUMBER_VALUE',
  KmsKeyId: 'STRING_VALUE',
  MultiAttachEnabled: true || false,
  OutpostArn: 'STRING_VALUE',
  Size: 'NUMBER_VALUE',
  SnapshotId: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  Throughput: 'NUMBER_VALUE',
  VolumeType: standard | io1 | io2 | gp2 | sc1 | st1 | gp3
};
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: {})
    • AvailabilityZone — (String)

      The Availability Zone in which to create the volume.

    • Encrypted — (Boolean)

      Indicates whether the volume should be encrypted. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Encryption by default in the Amazon Elastic Compute Cloud User Guide.

      Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

    • Iops — (Integer)

      The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

      The following are the supported values for each volume type:

      • gp3: 3,000-16,000 IOPS

      • io1: 100-64,000 IOPS

      • io2: 100-64,000 IOPS

      io1 and io2 volumes support up to 64,000 IOPS only on Instances built on the Nitro System. Other instance families support performance up to 32,000 IOPS.

      This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

    • KmsKeyId — (String)

      The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If KmsKeyId is specified, the encrypted state must be true.

      You can specify the KMS key using any of the following:

      • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.

      • Key alias. For example, alias/ExampleAlias.

      • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.

      • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

      Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

    • OutpostArn — (String)

      The Amazon Resource Name (ARN) of the Outpost.

    • Size — (Integer)

      The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

      The following are the supported volumes sizes for each volume type:

      • gp2 and gp3: 1-16,384

      • io1 and io2: 4-16,384

      • st1 and sc1: 125-16,384

      • standard: 1-1,024

    • SnapshotId — (String)

      The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.

    • VolumeType — (String)

      The volume type. This parameter can be one of the following values:

      • General Purpose SSD: gp2 | gp3

      • Provisioned IOPS SSD: io1 | io2

      • Throughput Optimized HDD: st1

      • Cold HDD: sc1

      • Magnetic: standard

      For more information, see Amazon EBS volume types in the Amazon Elastic Compute Cloud User Guide.

      Default: gp2

      Possible values include:
      • "standard"
      • "io1"
      • "io2"
      • "gp2"
      • "sc1"
      • "st1"
      • "gp3"
    • 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.

    • TagSpecifications — (Array<map>)

      The tags to apply to the volume during creation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • MultiAttachEnabled — (Boolean)

      Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up to 16 Instances built on the Nitro System in the same Availability Zone. This parameter is supported with io1 and io2 volumes only. For more information, see Amazon EBS Multi-Attach in the Amazon Elastic Compute Cloud User Guide.

    • Throughput — (Integer)

      The throughput to provision for a volume, with a maximum of 1,000 MiB/s.

      This parameter is valid only for gp3 volumes.

      Valid Range: Minimum value of 125. Maximum value of 1000.

    • ClientToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.

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:

      • Attachments — (Array<map>)

        Information about the volume attachments.

        • AttachTime — (Date)

          The time stamp when the attachment initiated.

        • Device — (String)

          The device name.

        • InstanceId — (String)

          The ID of the instance.

        • State — (String)

          The attachment state of the volume.

          Possible values include:
          • "attaching"
          • "attached"
          • "detaching"
          • "detached"
          • "busy"
        • VolumeId — (String)

          The ID of the volume.

        • DeleteOnTermination — (Boolean)

          Indicates whether the EBS volume is deleted on instance termination.

      • AvailabilityZone — (String)

        The Availability Zone for the volume.

      • CreateTime — (Date)

        The time stamp when volume creation was initiated.

      • Encrypted — (Boolean)

        Indicates whether the volume is encrypted.

      • KmsKeyId — (String)

        The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.

      • OutpostArn — (String)

        The Amazon Resource Name (ARN) of the Outpost.

      • Size — (Integer)

        The size of the volume, in GiBs.

      • SnapshotId — (String)

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

      • State — (String)

        The volume state.

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

        The ID of the volume.

      • Iops — (Integer)

        The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

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

        Possible values include:
        • "standard"
        • "io1"
        • "io2"
        • "gp2"
        • "sc1"
        • "st1"
        • "gp3"
      • FastRestored — (Boolean)

        Indicates whether the volume was created using fast snapshot restore.

      • MultiAttachEnabled — (Boolean)

        Indicates whether Amazon EBS Multi-Attach is enabled.

      • Throughput — (Integer)

        The throughput that the volume supports, in MiB/s.

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 IPv4 CIDR block. The smallest VPC you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). For more information about how large to make your VPC, see Your VPC and subnets in the Amazon Virtual Private Cloud User Guide.

You can optionally request an IPv6 CIDR block for the VPC. You can request an Amazon-provided IPv6 CIDR block from Amazon's pool of IPv6 addresses, or an IPv6 CIDR block from an IPv6 address pool that you provisioned through bring your own IP addresses (BYOIP).

By default, each instance you launch in the VPC has the default DHCP options, which include only a default DNS server that we provide (AmazonProvidedDNS). For more information, 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 Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To create a VPC


/* This example creates a VPC with the specified CIDR block. */

 var params = {
  CidrBlock: "10.0.0.0/16"
 };
 ec2.createVpc(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Vpc: {
     CidrBlock: "10.0.0.0/16", 
     DhcpOptionsId: "dopt-7a8b9c2d", 
     InstanceTenancy: "default", 
     State: "pending", 
     VpcId: "vpc-a01106c2"
    }
   }
   */
 });

Calling the createVpc operation

var params = {
  CidrBlock: 'STRING_VALUE', /* required */
  AmazonProvidedIpv6CidrBlock: true || false,
  DryRun: true || false,
  InstanceTenancy: default | dedicated | host,
  Ipv6CidrBlock: 'STRING_VALUE',
  Ipv6CidrBlockNetworkBorderGroup: 'STRING_VALUE',
  Ipv6Pool: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • CidrBlock — (String)

      The IPv4 network range for the VPC, in CIDR notation. For example, 10.0.0.0/16. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.

    • AmazonProvidedIpv6CidrBlock — (Boolean)

      Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.

    • Ipv6Pool — (String)

      The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.

    • Ipv6CidrBlock — (String)

      The IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in the request.

      To let Amazon choose the IPv6 CIDR block for you, omit this parameter.

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

    • 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"
    • Ipv6CidrBlockNetworkBorderGroup — (String)

      The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the address to this location.

      You must set AmazonProvidedIpv6CidrBlock to true to use this parameter.

    • TagSpecifications — (Array<map>)

      The tags to assign to the VPC.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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.

        • CidrBlock — (String)

          The primary IPv4 CIDR block for the VPC.

        • DhcpOptionsId — (String)

          The ID of the set of DHCP options you've associated with the VPC.

        • State — (String)

          The current state of the VPC.

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

          The ID of the VPC.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC.

        • InstanceTenancy — (String)

          The allowed tenancy of instances launched into the VPC.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • Ipv6CidrBlockAssociationSet — (Array<map>)

          Information about the IPv6 CIDR blocks associated with the VPC.

          • AssociationId — (String)

            The association ID for the IPv6 CIDR block.

          • Ipv6CidrBlock — (String)

            The IPv6 CIDR block.

          • Ipv6CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of the CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

          • NetworkBorderGroup — (String)

            The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1.

          • Ipv6Pool — (String)

            The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

        • CidrBlockAssociationSet — (Array<map>)

          Information about the IPv4 CIDR blocks associated with the VPC.

          • AssociationId — (String)

            The association ID for the IPv4 CIDR block.

          • CidrBlock — (String)

            The IPv4 CIDR block.

          • CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of the CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

        • IsDefault — (Boolean)

          Indicates whether the VPC is the default 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.

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 service. An endpoint enables you to create a private connection between your VPC and the service. The service may be provided by Amazon Web Services, an Amazon Web Services Marketplace Partner, or another Amazon Web Services account. For more information, see VPC Endpoints in the Amazon Virtual Private Cloud User Guide.

A gateway endpoint serves as a target for a route in your route table for traffic destined for the Amazon Web Service. You can specify an endpoint policy to attach to the endpoint, which will control access to the service from your VPC. You can also specify the VPC route tables that use the endpoint.

An interface endpoint is a network interface in your subnet that serves as an endpoint for communicating with the specified service. You can specify the subnets in which to create an endpoint, and the security groups to associate with the endpoint network interface.

A GatewayLoadBalancer endpoint is a network interface in your subnet that serves an endpoint for communicating with a Gateway Load Balancer that you've configured as a VPC endpoint service.

Use DescribeVpcEndpointServices to get a list of supported services.

Service Reference:

Examples:

Calling the createVpcEndpoint operation

var params = {
  ServiceName: 'STRING_VALUE', /* required */
  VpcId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  PolicyDocument: 'STRING_VALUE',
  PrivateDnsEnabled: true || false,
  RouteTableIds: [
    'STRING_VALUE',
    /* more items */
  ],
  SecurityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  SubnetIds: [
    'STRING_VALUE',
    /* more items */
  ],
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  VpcEndpointType: Interface | Gateway | GatewayLoadBalancer
};
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.

    • VpcEndpointType — (String)

      The type of endpoint.

      Default: Gateway

      Possible values include:
      • "Interface"
      • "Gateway"
      • "GatewayLoadBalancer"
    • VpcId — (String)

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

    • ServiceName — (String)

      The service name. To get a list of available services, use the DescribeVpcEndpointServices request, or get the name from the service provider.

    • PolicyDocument — (String)

      (Interface and gateway endpoints) 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>)

      (Gateway endpoint) One or more route table IDs.

    • SubnetIds — (Array<String>)

      (Interface and Gateway Load Balancer endpoints) The ID of one or more subnets in which to create an endpoint network interface. For a Gateway Load Balancer endpoint, you can specify one subnet only.

    • SecurityGroupIds — (Array<String>)

      (Interface endpoint) The ID of one or more security groups to associate with the endpoint network interface.

    • ClientToken — (String)

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

    • PrivateDnsEnabled — (Boolean)

      (Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example, kinesis.us-east-1.amazonaws.com), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.

      To use a private hosted zone, you must set the following VPC attributes to true: enableDnsHostnames and enableDnsSupport. Use ModifyVpcAttribute to set the VPC attributes.

      Default: true

    • TagSpecifications — (Array<map>)

      The tags to associate with the endpoint.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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.

        • VpcEndpointType — (String)

          The type of endpoint.

          Possible values include:
          • "Interface"
          • "Gateway"
          • "GatewayLoadBalancer"
        • VpcId — (String)

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

        • ServiceName — (String)

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

        • State — (String)

          The state of the VPC endpoint.

          Possible values include:
          • "PendingAcceptance"
          • "Pending"
          • "Available"
          • "Deleting"
          • "Deleted"
          • "Rejected"
          • "Failed"
          • "Expired"
        • PolicyDocument — (String)

          The policy document associated with the endpoint, if applicable.

        • RouteTableIds — (Array<String>)

          (Gateway endpoint) One or more route tables associated with the endpoint.

        • SubnetIds — (Array<String>)

          (Interface endpoint) One or more subnets in which the endpoint is located.

        • Groups — (Array<map>)

          (Interface endpoint) Information about the security groups that are associated with the network interface.

          • GroupId — (String)

            The ID of the security group.

          • GroupName — (String)

            The name of the security group.

        • PrivateDnsEnabled — (Boolean)

          (Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.

        • RequesterManaged — (Boolean)

          Indicates whether the VPC endpoint is being managed by its service.

        • NetworkInterfaceIds — (Array<String>)

          (Interface endpoint) One or more network interfaces for the endpoint.

        • DnsEntries — (Array<map>)

          (Interface endpoint) The DNS entries for the endpoint.

          • DnsName — (String)

            The DNS name.

          • HostedZoneId — (String)

            The ID of the private hosted zone.

        • CreationTimestamp — (Date)

          The date and time that the VPC endpoint was created.

        • Tags — (Array<map>)

          Any tags assigned to the VPC endpoint.

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

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC endpoint.

        • LastError — (map)

          The last error that occurred for VPC endpoint.

          • Message — (String)

            The error message for the VPC endpoint error.

          • Code — (String)

            The error code for the VPC endpoint error.

      • ClientToken — (String)

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

Returns:

  • (AWS.Request)

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

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

Creates a connection notification for a specified VPC endpoint or VPC endpoint service. A connection notification notifies you of specific endpoint events. You must create an SNS topic to receive notifications. For more information, see Create a Topic in the Amazon Simple Notification Service Developer Guide.

You can create a connection notification for interface endpoints only.

Examples:

Calling the createVpcEndpointConnectionNotification operation

var params = {
  ConnectionEvents: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  ConnectionNotificationArn: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  ServiceId: 'STRING_VALUE',
  VpcEndpointId: 'STRING_VALUE'
};
ec2.createVpcEndpointConnectionNotification(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.

    • ServiceId — (String)

      The ID of the endpoint service.

    • VpcEndpointId — (String)

      The ID of the endpoint.

    • ConnectionNotificationArn — (String)

      The ARN of the SNS topic for the notifications.

    • ConnectionEvents — (Array<String>)

      One or more endpoint events for which to receive notifications. Valid values are Accept, Connect, Delete, and Reject.

    • ClientToken — (String)

      Unique, case-sensitive identifier that 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:

      • ConnectionNotification — (map)

        Information about the notification.

        • ConnectionNotificationId — (String)

          The ID of the notification.

        • ServiceId — (String)

          The ID of the endpoint service.

        • VpcEndpointId — (String)

          The ID of the VPC endpoint.

        • ConnectionNotificationType — (String)

          The type of notification.

          Possible values include:
          • "Topic"
        • ConnectionNotificationArn — (String)

          The ARN of the SNS topic for the notification.

        • ConnectionEvents — (Array<String>)

          The events for the notification. Valid values are Accept, Connect, Delete, and Reject.

        • ConnectionNotificationState — (String)

          The state of the notification.

          Possible values include:
          • "Enabled"
          • "Disabled"
      • ClientToken — (String)

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

Returns:

  • (AWS.Request)

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

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

Creates a VPC endpoint service configuration to which service consumers (Amazon Web Services accounts, IAM users, and IAM roles) can connect.

To create an endpoint service configuration, you must first create one of the following for your service:

For more information, see VPC Endpoint Services in the Amazon Virtual Private Cloud User Guide.

If you set the private DNS name, you must prove that you own the private DNS domain name. For more information, see VPC Endpoint Service Private DNS Name Verification in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the createVpcEndpointServiceConfiguration operation

var params = {
  AcceptanceRequired: true || false,
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  GatewayLoadBalancerArns: [
    'STRING_VALUE',
    /* more items */
  ],
  NetworkLoadBalancerArns: [
    'STRING_VALUE',
    /* more items */
  ],
  PrivateDnsName: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createVpcEndpointServiceConfiguration(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.

    • AcceptanceRequired — (Boolean)

      Indicates whether requests from service consumers to create an endpoint to your service must be accepted. To accept a request, use AcceptVpcEndpointConnections.

    • PrivateDnsName — (String)

      (Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.

    • NetworkLoadBalancerArns — (Array<String>)

      The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.

    • GatewayLoadBalancerArns — (Array<String>)

      The Amazon Resource Names (ARNs) of one or more Gateway Load Balancers.

    • ClientToken — (String)

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

    • TagSpecifications — (Array<map>)

      The tags to associate with the service.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • ServiceConfiguration — (map)

        Information about the service configuration.

        • ServiceType — (Array<map>)

          The type of service.

          • ServiceType — (String)

            The type of service.

            Possible values include:
            • "Interface"
            • "Gateway"
            • "GatewayLoadBalancer"
        • ServiceId — (String)

          The ID of the service.

        • ServiceName — (String)

          The name of the service.

        • ServiceState — (String)

          The service state.

          Possible values include:
          • "Pending"
          • "Available"
          • "Deleting"
          • "Deleted"
          • "Failed"
        • AvailabilityZones — (Array<String>)

          The Availability Zones in which the service is available.

        • AcceptanceRequired — (Boolean)

          Indicates whether requests from other Amazon Web Services accounts to create an endpoint to the service must first be accepted.

        • ManagesVpcEndpoints — (Boolean)

          Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.

        • NetworkLoadBalancerArns — (Array<String>)

          The Amazon Resource Names (ARNs) of the Network Load Balancers for the service.

        • GatewayLoadBalancerArns — (Array<String>)

          The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.

        • BaseEndpointDnsNames — (Array<String>)

          The DNS names for the service.

        • PrivateDnsName — (String)

          The private DNS name for the service.

        • PrivateDnsNameConfiguration — (map)

          Information about the endpoint service private DNS name configuration.

          • State — (String)

            The verification state of the VPC endpoint service.

            >Consumers of the endpoint service can use the private name only when the state is verified.

            Possible values include:
            • "pendingVerification"
            • "verified"
            • "failed"
          • Type — (String)

            The endpoint service verification type, for example TXT.

          • Value — (String)

            The value the service provider adds to the private DNS name domain record before verification.

          • Name — (String)

            The name of the record subdomain the service provider needs to create. The service provider adds the value text to the name.

        • Tags — (Array<map>)

          Any tags assigned to the service.

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

        Unique, case-sensitive identifier that 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 an accepter VPC with which to create the connection. The accepter VPC can belong to another Amazon Web Services account and can be in a different Region to the requester VPC. The requester VPC and accepter VPC cannot have overlapping CIDR blocks.

Note: Limitations and rules apply to a VPC peering connection. For more information, see the limitations section in the VPC Peering Guide.

The owner of the accepter 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.

If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of failed.

Service Reference:

Examples:

Calling the createVpcPeeringConnection operation

var params = {
  DryRun: true || false,
  PeerOwnerId: 'STRING_VALUE',
  PeerRegion: 'STRING_VALUE',
  PeerVpcId: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  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.

    • PeerOwnerId — (String)

      The Amazon Web Services account ID of the owner of the accepter VPC.

      Default: Your Amazon Web Services account ID

    • PeerVpcId — (String)

      The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.

    • VpcId — (String)

      The ID of the requester VPC. You must specify this parameter in the request.

    • PeerRegion — (String)

      The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.

      Default: The Region in which you make the request.

    • TagSpecifications — (Array<map>)

      The tags to assign to the peering connection.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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 only returned when describing an active VPC peering connection.

          • CidrBlock — (String)

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet — (Array<map>)

            The IPv6 CIDR block for the VPC.

            • Ipv6CidrBlock — (String)

              The IPv6 CIDR block.

          • CidrBlockSet — (Array<map>)

            Information about the IPv4 CIDR blocks for the VPC.

            • CidrBlock — (String)

              The IPv4 CIDR block.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions — (map)

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

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer 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.

          • VpcId — (String)

            The ID of the VPC.

          • Region — (String)

            The Region in which the VPC is located.

        • ExpirationTime — (Date)

          The time that an unaccepted VPC peering connection will expire.

        • RequesterVpcInfo — (map)

          Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock — (String)

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet — (Array<map>)

            The IPv6 CIDR block for the VPC.

            • Ipv6CidrBlock — (String)

              The IPv6 CIDR block.

          • CidrBlockSet — (Array<map>)

            Information about the IPv4 CIDR blocks for the VPC.

            • CidrBlock — (String)

              The IPv4 CIDR block.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions — (map)

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

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer 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.

          • VpcId — (String)

            The ID of the VPC.

          • Region — (String)

            The Region in which the VPC is located.

        • 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 or transit gateway and a customer gateway. The 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 device.

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, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.

Service Reference:

Examples:

Calling the createVpnConnection operation

var params = {
  CustomerGatewayId: 'STRING_VALUE', /* required */
  Type: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Options: {
    EnableAcceleration: true || false,
    LocalIpv4NetworkCidr: 'STRING_VALUE',
    LocalIpv6NetworkCidr: 'STRING_VALUE',
    RemoteIpv4NetworkCidr: 'STRING_VALUE',
    RemoteIpv6NetworkCidr: 'STRING_VALUE',
    StaticRoutesOnly: true || false,
    TunnelInsideIpVersion: ipv4 | ipv6,
    TunnelOptions: [
      {
        DPDTimeoutAction: 'STRING_VALUE',
        DPDTimeoutSeconds: 'NUMBER_VALUE',
        IKEVersions: [
          {
            Value: 'STRING_VALUE'
          },
          /* more items */
        ],
        Phase1DHGroupNumbers: [
          {
            Value: 'NUMBER_VALUE'
          },
          /* more items */
        ],
        Phase1EncryptionAlgorithms: [
          {
            Value: 'STRING_VALUE'
          },
          /* more items */
        ],
        Phase1IntegrityAlgorithms: [
          {
            Value: 'STRING_VALUE'
          },
          /* more items */
        ],
        Phase1LifetimeSeconds: 'NUMBER_VALUE',
        Phase2DHGroupNumbers: [
          {
            Value: 'NUMBER_VALUE'
          },
          /* more items */
        ],
        Phase2EncryptionAlgorithms: [
          {
            Value: 'STRING_VALUE'
          },
          /* more items */
        ],
        Phase2IntegrityAlgorithms: [
          {
            Value: 'STRING_VALUE'
          },
          /* more items */
        ],
        Phase2LifetimeSeconds: 'NUMBER_VALUE',
        PreSharedKey: 'STRING_VALUE',
        RekeyFuzzPercentage: 'NUMBER_VALUE',
        RekeyMarginTimeSeconds: 'NUMBER_VALUE',
        ReplayWindowSize: 'NUMBER_VALUE',
        StartupAction: 'STRING_VALUE',
        TunnelInsideCidr: 'STRING_VALUE',
        TunnelInsideIpv6Cidr: 'STRING_VALUE'
      },
      /* more items */
    ]
  },
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  TransitGatewayId: 'STRING_VALUE',
  VpnGatewayId: 'STRING_VALUE'
};
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: {})
    • CustomerGatewayId — (String)

      The ID of the customer gateway.

    • Type — (String)

      The type of VPN connection (ipsec.1).

    • VpnGatewayId — (String)

      The ID of the virtual private gateway. If you specify a virtual private gateway, you cannot specify a transit gateway.

    • TransitGatewayId — (String)

      The ID of the transit gateway. If you specify a transit gateway, you cannot specify a virtual private gateway.

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

    • Options — (map)

      The options for the VPN connection.

      • EnableAcceleration — (Boolean)

        Indicate whether to enable acceleration for the VPN connection.

        Default: false

      • StaticRoutesOnly — (Boolean)

        Indicate whether the VPN connection uses static routes only. If you are creating a VPN connection for a device that does not support BGP, you must specify true. Use CreateVpnConnectionRoute to create a static route.

        Default: false

      • TunnelInsideIpVersion — (String)

        Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.

        Default: ipv4

        Possible values include:
        • "ipv4"
        • "ipv6"
      • TunnelOptions — (Array<map>)

        The tunnel options for the VPN connection.

        • TunnelInsideCidr — (String)

          The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.

          Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The following CIDR blocks are reserved and cannot be used:

          • 169.254.0.0/30

          • 169.254.1.0/30

          • 169.254.2.0/30

          • 169.254.3.0/30

          • 169.254.4.0/30

          • 169.254.5.0/30

          • 169.254.169.252/30

        • TunnelInsideIpv6Cidr — (String)

          The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.

          Constraints: A size /126 CIDR block from the local fd00::/8 range.

        • PreSharedKey — (String)

          The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.

          Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).

        • Phase1LifetimeSeconds — (Integer)

          The lifetime for phase 1 of the IKE negotiation, in seconds.

          Constraints: A value between 900 and 28,800.

          Default: 28800

        • Phase2LifetimeSeconds — (Integer)

          The lifetime for phase 2 of the IKE negotiation, in seconds.

          Constraints: A value between 900 and 3,600. The value must be less than the value for Phase1LifetimeSeconds.

          Default: 3600

        • RekeyMarginTimeSeconds — (Integer)

          The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for RekeyFuzzPercentage.

          Constraints: A value between 60 and half of Phase2LifetimeSeconds.

          Default: 540

        • RekeyFuzzPercentage — (Integer)

          The percentage of the rekey window (determined by RekeyMarginTimeSeconds) during which the rekey time is randomly selected.

          Constraints: A value between 0 and 100.

          Default: 100

        • ReplayWindowSize — (Integer)

          The number of packets in an IKE replay window.

          Constraints: A value between 64 and 2048.

          Default: 1024

        • DPDTimeoutSeconds — (Integer)

          The number of seconds after which a DPD timeout occurs.

          Constraints: A value between 0 and 30.

          Default: 30

        • DPDTimeoutAction — (String)

          The action to take after DPD timeout occurs. Specify restart to restart the IKE initiation. Specify clear to end the IKE session.

          Valid Values: clear | none | restart

          Default: clear

        • Phase1EncryptionAlgorithms — (Array<map>)

          One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.

          Valid values: AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16

          • Value — (String)

            The value for the encryption algorithm.

        • Phase2EncryptionAlgorithms — (Array<map>)

          One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.

          Valid values: AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16

          • Value — (String)

            The encryption algorithm.

        • Phase1IntegrityAlgorithms — (Array<map>)

          One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.

          Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512

          • Value — (String)

            The value for the integrity algorithm.

        • Phase2IntegrityAlgorithms — (Array<map>)

          One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.

          Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512

          • Value — (String)

            The integrity algorithm.

        • Phase1DHGroupNumbers — (Array<map>)

          One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.

          Valid values: 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24

          • Value — (Integer)

            The Diffie-Hellmann group number.

        • Phase2DHGroupNumbers — (Array<map>)

          One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.

          Valid values: 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24

          • Value — (Integer)

            The Diffie-Hellmann group number.

        • IKEVersions — (Array<map>)

          The IKE versions that are permitted for the VPN tunnel.

          Valid values: ikev1 | ikev2

          • Value — (String)

            The IKE version.

        • StartupAction — (String)

          The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify start for Amazon Web Services to initiate the IKE negotiation.

          Valid Values: add | start

          Default: add

      • LocalIpv4NetworkCidr — (String)

        The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

        Default: 0.0.0.0/0

      • RemoteIpv4NetworkCidr — (String)

        The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

        Default: 0.0.0.0/0

      • LocalIpv6NetworkCidr — (String)

        The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

        Default: ::/0

      • RemoteIpv6NetworkCidr — (String)

        The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

        Default: ::/0

    • TagSpecifications — (Array<map>)

      The tags to apply to the VPN connection.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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.

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

        • CustomerGatewayId — (String)

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

        • Category — (String)

          The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

        • State — (String)

          The current state of the VPN connection.

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

          The type of VPN connection.

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

          The ID of the VPN connection.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

        • TransitGatewayId — (String)

          The ID of the transit gateway associated with the VPN connection.

        • CoreNetworkArn — (String)

          The ARN of the core network.

        • CoreNetworkAttachmentArn — (String)

          The ARN of the core network attachment.

        • GatewayAssociationState — (String)

          The current state of the gateway association.

          Possible values include:
          • "associated"
          • "not-associated"
          • "associating"
          • "disassociating"
        • Options — (map)

          The VPN connection options.

          • EnableAcceleration — (Boolean)

            Indicates whether acceleration is enabled for the VPN connection.

          • StaticRoutesOnly — (Boolean)

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

          • LocalIpv4NetworkCidr — (String)

            The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv4NetworkCidr — (String)

            The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

          • LocalIpv6NetworkCidr — (String)

            The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv6NetworkCidr — (String)

            The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

          • TunnelInsideIpVersion — (String)

            Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

            Possible values include:
            • "ipv4"
            • "ipv6"
          • TunnelOptions — (Array<map>)

            Indicates the VPN tunnel options.

            • OutsideIpAddress — (String)

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr — (String)

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr — (String)

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey — (String)

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds — (Integer)

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds — (Integer)

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds — (Integer)

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage — (Integer)

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize — (Integer)

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds — (Integer)

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction — (String)

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The encryption algorithm.

            • Phase1IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The integrity algorithm.

            • Phase1DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • IkeVersions — (Array<map>)

              The IKE versions that are permitted for the VPN tunnel.

              • Value — (String)

                The IKE version.

            • StartupAction — (String)

              The action to take when the establishing the VPN tunnels for a VPN connection.

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

          • AcceptedRouteCount — (Integer)

            The number of accepted routes.

          • LastStatusChange — (Date)

            The date and time of the last change in status.

          • 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"
          • StatusMessage — (String)

            If an error occurs, a description of the error.

          • CertificateArn — (String)

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

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, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.

Service Reference:

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: {})
    • DestinationCidrBlock — (String)

      The CIDR block associated with the local subnet of the customer network.

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

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, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.

Service Reference:

Examples:

Calling the createVpnGateway operation

var params = {
  Type: ipsec.1, /* required */
  AmazonSideAsn: 'NUMBER_VALUE',
  AvailabilityZone: 'STRING_VALUE',
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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: {})
    • AvailabilityZone — (String)

      The Availability Zone for the virtual private gateway.

    • Type — (String)

      The type of VPN connection this virtual private gateway supports.

      Possible values include:
      • "ipsec.1"
    • TagSpecifications — (Array<map>)

      The tags to apply to the virtual private gateway.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • AmazonSideAsn — (Integer)

      A private Autonomous System Number (ASN) for the Amazon side of a BGP session. If you're using a 16-bit ASN, it must be in the 64512 to 65534 range. If you're using a 32-bit ASN, it must be in the 4200000000 to 4294967294 range.

      Default: 64512

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

      • VpnGateway — (map)

        Information about the virtual private gateway.

        • AvailabilityZone — (String)

          The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.

        • 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"
        • VpcAttachments — (Array<map>)

          Any VPCs attached to the virtual private gateway.

          • State — (String)

            The current state of the attachment.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
          • VpcId — (String)

            The ID of the VPC.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway.

        • AmazonSideAsn — (Integer)

          The private Autonomous System Number (ASN) for the Amazon side of a BGP session.

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

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

Deletes a carrier gateway.

If you do not delete the route that contains the carrier gateway as the Target, the route is a blackhole route. For information about how to delete a route, see DeleteRoute.

Service Reference:

Examples:

Calling the deleteCarrierGateway operation

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

      The ID of the carrier gateway.

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

      • CarrierGateway — (map)

        Information about the carrier gateway.

        • CarrierGatewayId — (String)

          The ID of the carrier gateway.

        • VpcId — (String)

          The ID of the VPC associated with the carrier gateway.

        • State — (String)

          The state of the carrier gateway.

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

          The Amazon Web Services account ID of the owner of the carrier gateway.

        • Tags — (Array<map>)

          The tags assigned to the carrier 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.

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

Deletes the specified Client VPN endpoint. You must disassociate all target networks before you can delete a Client VPN endpoint.

Service Reference:

Examples:

Calling the deleteClientVpnEndpoint operation

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

      The ID of the Client VPN to be deleted.

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

      • Status — (map)

        The current state of the Client VPN endpoint.

        • Code — (String)

          The state of the Client VPN endpoint. Possible states include:

          • pending-associate - The Client VPN endpoint has been created but no target networks have been associated. The Client VPN endpoint cannot accept connections.

          • available - The Client VPN endpoint has been created and a target network has been associated. The Client VPN endpoint can accept connections.

          • deleting - The Client VPN endpoint is being deleted. The Client VPN endpoint cannot accept connections.

          • deleted - The Client VPN endpoint has been deleted. The Client VPN endpoint cannot accept connections.

          Possible values include:
          • "pending-associate"
          • "available"
          • "deleting"
          • "deleted"
        • Message — (String)

          A message about the status of the Client VPN endpoint.

Returns:

  • (AWS.Request)

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

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

Deletes a route from a Client VPN endpoint. You can only delete routes that you manually added using the CreateClientVpnRoute action. You cannot delete routes that were automatically added when associating a subnet. To remove routes that have been automatically added, disassociate the target subnet from the Client VPN endpoint.

Service Reference:

Examples:

Calling the deleteClientVpnRoute operation

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

      The ID of the Client VPN endpoint from which the route is to be deleted.

    • TargetVpcSubnetId — (String)

      The ID of the target subnet used by the route.

    • DestinationCidrBlock — (String)

      The IPv4 address range, in CIDR notation, of the route to be deleted.

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

      • Status — (map)

        The current state of the route.

        • Code — (String)

          The state of the Client VPN endpoint route.

          Possible values include:
          • "creating"
          • "active"
          • "failed"
          • "deleting"
        • Message — (String)

          A message about the status of the Client VPN endpoint route, if applicable.

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.

Service Reference:

Examples:

To delete a customer gateway


/* This example deletes the specified customer gateway. */

 var params = {
  CustomerGatewayId: "cgw-0e11f167"
 };
 ec2.deleteCustomerGateway(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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: {})
    • CustomerGatewayId — (String)

      The ID of the customer gateway.

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

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.

Service Reference:

Examples:

To delete a DHCP options set


/* This example deletes the specified DHCP options set. */

 var params = {
  DhcpOptionsId: "dopt-d9070ebb"
 };
 ec2.deleteDhcpOptions(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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: {})
    • DhcpOptionsId — (String)

      The ID of the DHCP options set.

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

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

Deletes an egress-only internet gateway.

Service Reference:

Examples:

Calling the deleteEgressOnlyInternetGateway operation

var params = {
  EgressOnlyInternetGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteEgressOnlyInternetGateway(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.

    • EgressOnlyInternetGatewayId — (String)

      The ID of the egress-only 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. The data object has the following properties:

      • ReturnCode — (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.

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

Deletes the specified EC2 Fleet.

After you delete an EC2 Fleet, it launches no new instances.

You must specify whether a deleted EC2 Fleet should also terminate its instances. If you choose to terminate the instances, the EC2 Fleet enters the deleted_terminating state. Otherwise, the EC2 Fleet enters the deleted_running state, and the instances continue to run until they are interrupted or you terminate them manually.

For instant fleets, EC2 Fleet must terminate the instances when the fleet is deleted. A deleted instant fleet with running instances is not supported.

Restrictions

  • You can delete up to 25 instant fleets in a single request. If you exceed this number, no instant fleets are deleted and an error is returned. There is no restriction on the number of fleets of type maintain or request that can be deleted in a single request.

  • Up to 1000 instances can be terminated in a single request to delete instant fleets.

For more information, see Deleting an EC2 Fleet in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the deleteFleets operation

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

    • FleetIds — (Array<String>)

      The IDs of the EC2 Fleets.

    • TerminateInstances — (Boolean)

      Indicates whether to terminate the instances when the EC2 Fleet is deleted. The default is to terminate the instances.

      To let the instances continue to run after the EC2 Fleet is deleted, specify NoTerminateInstances. Supported only for fleets of type maintain and request.

      For instant fleets, you cannot specify NoTerminateInstances. A deleted instant fleet with running instances is not supported.

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:

      • SuccessfulFleetDeletions — (Array<map>)

        Information about the EC2 Fleets that are successfully deleted.

        • CurrentFleetState — (String)

          The current state of the EC2 Fleet.

          Possible values include:
          • "submitted"
          • "active"
          • "deleted"
          • "failed"
          • "deleted_running"
          • "deleted_terminating"
          • "modifying"
        • PreviousFleetState — (String)

          The previous state of the EC2 Fleet.

          Possible values include:
          • "submitted"
          • "active"
          • "deleted"
          • "failed"
          • "deleted_running"
          • "deleted_terminating"
          • "modifying"
        • FleetId — (String)

          The ID of the EC2 Fleet.

      • UnsuccessfulFleetDeletions — (Array<map>)

        Information about the EC2 Fleets that are not successfully deleted.

        • Error — (map)

          The error.

          • Code — (String)

            The error code.

            Possible values include:
            • "fleetIdDoesNotExist"
            • "fleetIdMalformed"
            • "fleetNotInDeletableState"
            • "unexpectedError"
          • Message — (String)

            The description for the error code.

        • FleetId — (String)

          The ID of the EC2 Fleet.

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.

Service Reference:

Examples:

Calling the deleteFlowLogs operation

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

    • FlowLogIds — (Array<String>)

      One or more flow log IDs.

      Constraint: Maximum of 1000 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.

        • Error — (map)

          Information about the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message accompanying the error code.

        • ResourceId — (String)

          The ID of the resource.

Returns:

  • (AWS.Request)

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

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

Deletes the specified Amazon FPGA Image (AFI).

Service Reference:

Examples:

Calling the deleteFpgaImage operation

var params = {
  FpgaImageId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteFpgaImage(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.

    • FpgaImageId — (String)

      The ID of the AFI.

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)

        Is true if the request succeeds, and an error otherwise.

Returns:

  • (AWS.Request)

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

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

Deletes the specified event window.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the deleteInstanceEventWindow operation

var params = {
  InstanceEventWindowId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  ForceDelete: true || false
};
ec2.deleteInstanceEventWindow(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.

    • ForceDelete — (Boolean)

      Specify true to force delete the event window. Use the force delete parameter if the event window is currently associated with targets.

    • InstanceEventWindowId — (String)

      The ID of the event window.

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:

      • InstanceEventWindowState — (map)

        The state of the event window.

        • InstanceEventWindowId — (String)

          The ID of the event window.

        • State — (String)

          The current state of the event window.

          Possible values include:
          • "creating"
          • "deleting"
          • "active"
          • "deleted"

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.

Service Reference:

Examples:

To delete an Internet gateway


/* This example deletes the specified Internet gateway. */

 var params = {
  InternetGatewayId: "igw-c0a643a9"
 };
 ec2.deleteInternetGateway(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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.

Service Reference:

Examples:

To delete a key pair


/* This example deletes the specified key pair. */

 var params = {
  KeyName: "my-key-pair"
 };
 ec2.deleteKeyPair(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the deleteKeyPair operation

var params = {
  DryRun: true || false,
  KeyName: 'STRING_VALUE',
  KeyPairId: 'STRING_VALUE'
};
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: {})
    • KeyName — (String)

      The name of the key pair.

    • KeyPairId — (String)

      The ID of the key pair.

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

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

Deletes a launch template. Deleting a launch template deletes all of its versions.

Service Reference:

Examples:

To delete a launch template


/* This example deletes the specified launch template. */

 var params = {
  LaunchTemplateId: "lt-0abcd290751193123"
 };
 ec2.deleteLaunchTemplate(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    LaunchTemplate: {
     CreateTime: <Date Representation>, 
     CreatedBy: "arn:aws:iam::123456789012:root", 
     DefaultVersionNumber: 2, 
     LatestVersionNumber: 2, 
     LaunchTemplateId: "lt-0abcd290751193123", 
     LaunchTemplateName: "my-template"
    }
   }
   */
 });

Calling the deleteLaunchTemplate operation

var params = {
  DryRun: true || false,
  LaunchTemplateId: 'STRING_VALUE',
  LaunchTemplateName: 'STRING_VALUE'
};
ec2.deleteLaunchTemplate(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.

    • LaunchTemplateId — (String)

      The ID of the launch template. You must specify either the launch template ID or launch template name in the request.

    • LaunchTemplateName — (String)

      The name of the launch template. You must specify either the launch template ID or launch template name in the 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:

      • LaunchTemplate — (map)

        Information about the launch template.

        • LaunchTemplateId — (String)

          The ID of the launch template.

        • LaunchTemplateName — (String)

          The name of the launch template.

        • CreateTime — (Date)

          The time launch template was created.

        • CreatedBy — (String)

          The principal that created the launch template.

        • DefaultVersionNumber — (Integer)

          The version number of the default version of the launch template.

        • LatestVersionNumber — (Integer)

          The version number of the latest version of the launch template.

        • Tags — (Array<map>)

          The tags for the launch template.

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

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

Deletes one or more versions of a launch template. You cannot delete the default version of a launch template; you must first assign a different version as the default. If the default version is the only version for the launch template, you must delete the entire launch template using DeleteLaunchTemplate.

Service Reference:

Examples:

To delete a launch template version


/* This example deletes the specified launch template version. */

 var params = {
  LaunchTemplateId: "lt-0abcd290751193123", 
  Versions: [
     "1"
  ]
 };
 ec2.deleteLaunchTemplateVersions(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SuccessfullyDeletedLaunchTemplateVersions: [
       {
      LaunchTemplateId: "lt-0abcd290751193123", 
      LaunchTemplateName: "my-template", 
      VersionNumber: 1
     }
    ], 
    UnsuccessfullyDeletedLaunchTemplateVersions: [
    ]
   }
   */
 });

Calling the deleteLaunchTemplateVersions operation

var params = {
  Versions: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  LaunchTemplateId: 'STRING_VALUE',
  LaunchTemplateName: 'STRING_VALUE'
};
ec2.deleteLaunchTemplateVersions(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.

    • LaunchTemplateId — (String)

      The ID of the launch template. You must specify either the launch template ID or launch template name in the request.

    • LaunchTemplateName — (String)

      The name of the launch template. You must specify either the launch template ID or launch template name in the request.

    • Versions — (Array<String>)

      The version numbers of one or more launch template versions to delete.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • SuccessfullyDeletedLaunchTemplateVersions — (Array<map>)

        Information about the launch template versions that were successfully deleted.

        • LaunchTemplateId — (String)

          The ID of the launch template.

        • LaunchTemplateName — (String)

          The name of the launch template.

        • VersionNumber — (Integer)

          The version number of the launch template.

      • UnsuccessfullyDeletedLaunchTemplateVersions — (Array<map>)

        Information about the launch template versions that could not be deleted.

        • LaunchTemplateId — (String)

          The ID of the launch template.

        • LaunchTemplateName — (String)

          The name of the launch template.

        • VersionNumber — (Integer)

          The version number of the launch template.

        • ResponseError — (map)

          Information about the error.

          • Code — (String)

            The error code.

            Possible values include:
            • "launchTemplateIdDoesNotExist"
            • "launchTemplateIdMalformed"
            • "launchTemplateNameDoesNotExist"
            • "launchTemplateNameMalformed"
            • "launchTemplateVersionDoesNotExist"
            • "unexpectedError"
          • Message — (String)

            The error message, if applicable.

Returns:

  • (AWS.Request)

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

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

Deletes the specified route from the specified local gateway route table.

Service Reference:

Examples:

Calling the deleteLocalGatewayRoute operation

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

      The CIDR range for the route. This must match the CIDR for the route exactly.

    • LocalGatewayRouteTableId — (String)

      The ID of the local gateway route table.

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

      • Route — (map)

        Information about the route.

        • DestinationCidrBlock — (String)

          The CIDR block used for destination matches.

        • LocalGatewayVirtualInterfaceGroupId — (String)

          The ID of the virtual interface group.

        • Type — (String)

          The route type.

          Possible values include:
          • "static"
          • "propagated"
        • State — (String)

          The state of the route.

          Possible values include:
          • "pending"
          • "active"
          • "blackhole"
          • "deleting"
          • "deleted"
        • LocalGatewayRouteTableId — (String)

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn — (String)

          The Amazon Resource Name (ARN) of the local gateway route table.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the local gateway route.

Returns:

  • (AWS.Request)

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

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

Deletes the specified association between a VPC and local gateway route table.

Examples:

Calling the deleteLocalGatewayRouteTableVpcAssociation operation

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

      The ID of the association.

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

      • LocalGatewayRouteTableVpcAssociation — (map)

        Information about the association.

        • LocalGatewayRouteTableVpcAssociationId — (String)

          The ID of the association.

        • LocalGatewayRouteTableId — (String)

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn — (String)

          The Amazon Resource Name (ARN) of the local gateway route table for the association.

        • LocalGatewayId — (String)

          The ID of the local gateway.

        • VpcId — (String)

          The ID of the VPC.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the local gateway route table for the association.

        • State — (String)

          The state of the association.

        • Tags — (Array<map>)

          The tags assigned to the association.

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

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

Deletes the specified managed prefix list. You must first remove all references to the prefix list in your resources.

Service Reference:

Examples:

Calling the deleteManagedPrefixList operation

var params = {
  PrefixListId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteManagedPrefixList(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.

    • PrefixListId — (String)

      The ID of the prefix list.

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:

      • PrefixList — (map)

        Information about the prefix list.

        • PrefixListId — (String)

          The ID of the prefix list.

        • AddressFamily — (String)

          The IP address version.

        • State — (String)

          The current state of the prefix list.

          Possible values include:
          • "create-in-progress"
          • "create-complete"
          • "create-failed"
          • "modify-in-progress"
          • "modify-complete"
          • "modify-failed"
          • "restore-in-progress"
          • "restore-complete"
          • "restore-failed"
          • "delete-in-progress"
          • "delete-complete"
          • "delete-failed"
        • StateMessage — (String)

          The state message.

        • PrefixListArn — (String)

          The Amazon Resource Name (ARN) for the prefix list.

        • PrefixListName — (String)

          The name of the prefix list.

        • MaxEntries — (Integer)

          The maximum number of entries for the prefix list.

        • Version — (Integer)

          The version of the prefix list.

        • Tags — (Array<map>)

          The tags for the prefix list.

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

        • OwnerId — (String)

          The ID of the owner of the prefix list.

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

Service Reference:

Examples:

To delete a NAT gateway


/* This example deletes the specified NAT gateway. */

 var params = {
  NatGatewayId: "nat-04ae55e711cec5680"
 };
 ec2.deleteNatGateway(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NatGatewayId: "nat-04ae55e711cec5680"
   }
   */
 });

Calling the deleteNatGateway operation

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

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

Service Reference:

Examples:

To delete a network ACL


/* This example deletes the specified network ACL. */

 var params = {
  NetworkAclId: "acl-5fb85d36"
 };
 ec2.deleteNetworkAcl(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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.

Service Reference:

Examples:

To delete a network ACL entry


/* This example deletes ingress rule number 100 from the specified network ACL. */

 var params = {
  Egress: true, 
  NetworkAclId: "acl-5fb85d36", 
  RuleNumber: 100
 };
 ec2.deleteNetworkAclEntry(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the deleteNetworkAclEntry operation

var params = {
  Egress: true || false, /* required */
  NetworkAclId: 'STRING_VALUE', /* required */
  RuleNumber: 'NUMBER_VALUE', /* 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.

    • Egress — (Boolean)

      Indicates whether the rule is an egress rule.

    • NetworkAclId — (String)

      The ID of the network ACL.

    • RuleNumber — (Integer)

      The rule number of the entry to delete.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes the specified network insights analysis.

Service Reference:

Examples:

Calling the deleteNetworkInsightsAnalysis operation

var params = {
  NetworkInsightsAnalysisId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteNetworkInsightsAnalysis(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.

    • NetworkInsightsAnalysisId — (String)

      The ID of the network insights analysis.

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:

      • NetworkInsightsAnalysisId — (String)

        The ID of the network insights analysis.

Returns:

  • (AWS.Request)

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

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

Deletes the specified path.

Service Reference:

Examples:

Calling the deleteNetworkInsightsPath operation

var params = {
  NetworkInsightsPathId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.deleteNetworkInsightsPath(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.

    • NetworkInsightsPathId — (String)

      The ID of the path.

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:

      • NetworkInsightsPathId — (String)

        The ID of the path.

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.

Service Reference:

Examples:

To delete a network interface


/* This example deletes the specified network interface. */

 var params = {
  NetworkInterfaceId: "eni-e5aa89a3"
 };
 ec2.deleteNetworkInterface(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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.

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

Deletes a permission for a network interface. By default, you cannot delete the permission if the account for which you're removing the permission has attached the network interface to an instance. However, you can force delete the permission, regardless of any attachment.

Examples:

Calling the deleteNetworkInterfacePermission operation

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

      The ID of the network interface permission.

    • Force — (Boolean)

      Specify true to remove the permission even if the network interface is attached to an instance.

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

      • Return — (Boolean)

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

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, see Placement groups in the Amazon EC2 User Guide.

Service Reference:

Examples:

To delete a placement group


/* This example deletes the specified placement group.
*/

 var params = {
  GroupName: "my-cluster"
 };
 ec2.deletePlacementGroup(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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.

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

Deletes the queued purchases for the specified Reserved Instances.

Service Reference:

Examples:

Calling the deleteQueuedReservedInstances operation

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

      The IDs of the Reserved Instances.

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:

      • SuccessfulQueuedPurchaseDeletions — (Array<map>)

        Information about the queued purchases that were successfully deleted.

        • ReservedInstancesId — (String)

          The ID of the Reserved Instance.

      • FailedQueuedPurchaseDeletions — (Array<map>)

        Information about the queued purchases that could not be deleted.

        • Error — (map)

          The error.

          • Code — (String)

            The error code.

            Possible values include:
            • "reserved-instances-id-invalid"
            • "reserved-instances-not-in-queued-state"
            • "unexpected-error"
          • Message — (String)

            The error message.

        • ReservedInstancesId — (String)

          The ID of the Reserved Instance.

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.

Service Reference:

Examples:

To delete a route


/* This example deletes the specified route from the specified route table. */

 var params = {
  DestinationCidrBlock: "0.0.0.0/0", 
  RouteTableId: "rtb-22574640"
 };
 ec2.deleteRoute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the deleteRoute operation

var params = {
  RouteTableId: 'STRING_VALUE', /* required */
  DestinationCidrBlock: 'STRING_VALUE',
  DestinationIpv6CidrBlock: 'STRING_VALUE',
  DestinationPrefixListId: 'STRING_VALUE',
  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: {})
    • DestinationCidrBlock — (String)

      The IPv4 CIDR range for the route. The value you specify must match the CIDR for the route exactly.

    • DestinationIpv6CidrBlock — (String)

      The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly.

    • DestinationPrefixListId — (String)

      The ID of the prefix list for the route.

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

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.

Service Reference:

Examples:

To delete a route table


/* This example deletes the specified route table. */

 var params = {
  RouteTableId: "rtb-22574640"
 };
 ec2.deleteRouteTable(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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.

Service Reference:

Examples:

To delete a security group


/* This example deletes the specified security group. */

 var params = {
  GroupId: "sg-903004f8"
 };
 ec2.deleteSecurityGroup(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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: {})
    • GroupId — (String)

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

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

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

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 Delete an Amazon EBS snapshot in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To delete a snapshot


/* This example deletes a snapshot with the snapshot ID of ``snap-1234567890abcdef0``. If the command succeeds, no output is returned. */

 var params = {
  SnapshotId: "snap-1234567890abcdef0"
 };
 ec2.deleteSnapshot(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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: {})
    • SnapshotId — (String)

      The ID of the EBS snapshot.

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

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

Deletes the data feed for Spot Instances.

Service Reference:

Examples:

To cancel a Spot Instance data feed subscription


/* This example deletes a Spot data feed subscription for the account. */

 var params = {
 };
 ec2.deleteSpotDatafeedSubscription(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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.

Service Reference:

Examples:

To delete a subnet


/* This example deletes the specified subnet. */

 var params = {
  SubnetId: "subnet-9d4a7b6c"
 };
 ec2.deleteSubnet(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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: {})
    • SubnetId — (String)

      The ID of the subnet.

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

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

Deletes a subnet CIDR reservation.

Service Reference:

Examples:

Calling the deleteSubnetCidrReservation operation

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

      The ID of the subnet CIDR reservation.

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

      • DeletedSubnetCidrReservation — (map)

        Information about the deleted subnet CIDR reservation.

        • SubnetCidrReservationId — (String)

          The ID of the subnet CIDR reservation.

        • SubnetId — (String)

          The ID of the subnet.

        • Cidr — (String)

          The CIDR that has been reserved.

        • ReservationType — (String)

          The type of reservation.

          Possible values include:
          • "prefix"
          • "explicit"
        • OwnerId — (String)

          The ID of the account that owns the subnet CIDR reservation.

        • Description — (String)

          The description assigned to the subnet CIDR reservation.

        • Tags — (Array<map>)

          The tags assigned to the subnet CIDR reservation.

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

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

Deletes the specified set of tags from the specified set of resources.

To list the current tags, use DescribeTags. For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To delete a tag from a resource


/* This example deletes the tag Stack=test from the specified image. */

 var params = {
  Resources: [
     "ami-78a54011"
  ], 
  Tags: [
     {
    Key: "Stack", 
    Value: "test"
   }
  ]
 };
 ec2.deleteTags(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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 IDs of the resources, separated by spaces.

      Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.

    • Tags — (Array<map>)

      The tags to delete. Specify a tag key and an optional tag value to delete specific tags. If you specify a tag key without a tag value, we delete any tag with this key regardless of its value. If you specify a tag key with an empty string as the tag value, we delete the tag only if its value is an empty string.

      If you omit this parameter, we delete all user-defined tags for the specified resources. We do not delete Amazon Web Services-generated tags (tags that have the aws: prefix).

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

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

Deletes the specified Traffic Mirror filter.

You cannot delete a Traffic Mirror filter that is in use by a Traffic Mirror session.

Service Reference:

Examples:

Calling the deleteTrafficMirrorFilter operation

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

      The ID of the Traffic Mirror filter.

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

      • TrafficMirrorFilterId — (String)

        The ID of the Traffic Mirror filter.

Returns:

  • (AWS.Request)

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

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

Deletes the specified Traffic Mirror rule.

Service Reference:

Examples:

Calling the deleteTrafficMirrorFilterRule operation

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

      The ID of the Traffic Mirror rule.

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

      • TrafficMirrorFilterRuleId — (String)

        The ID of the deleted Traffic Mirror rule.

Returns:

  • (AWS.Request)

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

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

Deletes the specified Traffic Mirror session.

Service Reference:

Examples:

Calling the deleteTrafficMirrorSession operation

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

      The ID of the Traffic Mirror session.

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

      • TrafficMirrorSessionId — (String)

        The ID of the deleted Traffic Mirror session.

Returns:

  • (AWS.Request)

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

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

Deletes the specified Traffic Mirror target.

You cannot delete a Traffic Mirror target that is in use by a Traffic Mirror session.

Service Reference:

Examples:

Calling the deleteTrafficMirrorTarget operation

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

      The ID of the Traffic Mirror target.

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

      • TrafficMirrorTargetId — (String)

        The ID of the deleted Traffic Mirror target.

Returns:

  • (AWS.Request)

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

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

Deletes the specified transit gateway.

Service Reference:

Examples:

Calling the deleteTransitGateway operation

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

      The ID of the transit gateway.

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

      • TransitGateway — (map)

        Information about the deleted transit gateway.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • TransitGatewayArn — (String)

          The Amazon Resource Name (ARN) of the transit gateway.

        • State — (String)

          The state of the transit gateway.

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

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Description — (String)

          The description of the transit gateway.

        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The transit gateway options.

          • AmazonSideAsn — (Integer)

            A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.

          • TransitGatewayCidrBlocks — (Array<String>)

            The transit gateway CIDR blocks.

          • AutoAcceptSharedAttachments — (String)

            Indicates whether attachment requests are automatically accepted.

            Possible values include:
            • "enable"
            • "disable"
          • DefaultRouteTableAssociation — (String)

            Indicates whether resource attachments are automatically associated with the default association route table.

            Possible values include:
            • "enable"
            • "disable"
          • AssociationDefaultRouteTableId — (String)

            The ID of the default association route table.

          • DefaultRouteTablePropagation — (String)

            Indicates whether resource attachments automatically propagate routes to the default propagation route table.

            Possible values include:
            • "enable"
            • "disable"
          • PropagationDefaultRouteTableId — (String)

            The ID of the default propagation route table.

          • VpnEcmpSupport — (String)

            Indicates whether Equal Cost Multipath Protocol support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • DnsSupport — (String)

            Indicates whether DNS support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • MulticastSupport — (String)

            Indicates whether multicast is enabled on the transit gateway

            Possible values include:
            • "enable"
            • "disable"
        • Tags — (Array<map>)

          The tags for the transit 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.

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

Deletes the specified Connect attachment. You must first delete any Connect peers for the attachment.

Service Reference:

Examples:

Calling the deleteTransitGatewayConnect operation

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

      The ID of the Connect attachment.

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

      • TransitGatewayConnect — (map)

        Information about the deleted Connect attachment.

        • TransitGatewayAttachmentId — (String)

          The ID of the Connect attachment.

        • TransportTransitGatewayAttachmentId — (String)

          The ID of the attachment from which the Connect attachment was created.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • State — (String)

          The state of the attachment.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The Connect attachment options.

          • Protocol — (String)

            The tunnel protocol.

            Possible values include:
            • "gre"
        • Tags — (Array<map>)

          The tags for the attachment.

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

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

Deletes the specified Connect peer.

Service Reference:

Examples:

Calling the deleteTransitGatewayConnectPeer operation

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

      The ID of the Connect peer.

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

      • TransitGatewayConnectPeer — (map)

        Information about the deleted Connect peer.

        • TransitGatewayAttachmentId — (String)

          The ID of the Connect attachment.

        • TransitGatewayConnectPeerId — (String)

          The ID of the Connect peer.

        • State — (String)

          The state of the Connect peer.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • CreationTime — (Date)

          The creation time.

        • ConnectPeerConfiguration — (map)

          The Connect peer details.

          • TransitGatewayAddress — (String)

            The Connect peer IP address on the transit gateway side of the tunnel.

          • PeerAddress — (String)

            The Connect peer IP address on the appliance side of the tunnel.

          • InsideCidrBlocks — (Array<String>)

            The range of interior BGP peer IP addresses.

          • Protocol — (String)

            The tunnel protocol.

            Possible values include:
            • "gre"
          • BgpConfigurations — (Array<map>)

            The BGP configuration details.

            • TransitGatewayAsn — (Integer)

              The transit gateway Autonomous System Number (ASN).

            • PeerAsn — (Integer)

              The peer Autonomous System Number (ASN).

            • TransitGatewayAddress — (String)

              The interior BGP peer IP address for the transit gateway.

            • PeerAddress — (String)

              The interior BGP peer IP address for the appliance.

            • BgpStatus — (String)

              The BGP status.

              Possible values include:
              • "up"
              • "down"
        • Tags — (Array<map>)

          The tags for the Connect peer.

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

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

Deletes the specified transit gateway multicast domain.

Examples:

Calling the deleteTransitGatewayMulticastDomain operation

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

      The ID of the transit gateway multicast domain.

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

      • TransitGatewayMulticastDomain — (map)

        Information about the deleted transit gateway multicast domain.

        • TransitGatewayMulticastDomainId — (String)

          The ID of the transit gateway multicast domain.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • TransitGatewayMulticastDomainArn — (String)

          The Amazon Resource Name (ARN) of the transit gateway multicast domain.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the transit gateway multicast domain.

        • Options — (map)

          The options for the transit gateway multicast domain.

          • Igmpv2Support — (String)

            Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned on for the transit gateway multicast domain.

            Possible values include:
            • "enable"
            • "disable"
          • StaticSourcesSupport — (String)

            Indicates whether support for statically configuring transit gateway multicast group sources is turned on.

            Possible values include:
            • "enable"
            • "disable"
          • AutoAcceptSharedAssociations — (String)

            Indicates whether to automatically cross-account subnet associations that are associated with the transit gateway multicast domain.

            Possible values include:
            • "enable"
            • "disable"
        • State — (String)

          The state of the transit gateway multicast domain.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • CreationTime — (Date)

          The time the transit gateway multicast domain was created.

        • Tags — (Array<map>)

          The tags for the transit gateway multicast domain.

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

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

Deletes a transit gateway peering attachment.

Examples:

Calling the deleteTransitGatewayPeeringAttachment operation

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

      The ID of the transit gateway peering attachment.

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

      • TransitGatewayPeeringAttachment — (map)

        The transit gateway peering attachment.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway peering attachment.

        • RequesterTgwInfo — (map)

          Information about the requester transit gateway.

          • TransitGatewayId — (String)

            The ID of the transit gateway.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region — (String)

            The Region of the transit gateway.

        • AccepterTgwInfo — (map)

          Information about the accepter transit gateway.

          • TransitGatewayId — (String)

            The ID of the transit gateway.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region — (String)

            The Region of the transit gateway.

        • Status — (map)

          The status of the transit gateway peering attachment.

          • Code — (String)

            The status code.

          • Message — (String)

            The status message, if applicable.

        • State — (String)

          The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • CreationTime — (Date)

          The time the transit gateway peering attachment was created.

        • Tags — (Array<map>)

          The tags for the transit gateway peering attachment.

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

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

Deletes a reference (route) to a prefix list in a specified transit gateway route table.

Examples:

Calling the deleteTransitGatewayPrefixListReference operation

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

      The ID of the route table.

    • PrefixListId — (String)

      The ID of the prefix list.

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

      • TransitGatewayPrefixListReference — (map)

        Information about the deleted prefix list reference.

        • TransitGatewayRouteTableId — (String)

          The ID of the transit gateway route table.

        • PrefixListId — (String)

          The ID of the prefix list.

        • PrefixListOwnerId — (String)

          The ID of the prefix list owner.

        • State — (String)

          The state of the prefix list reference.

          Possible values include:
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
        • Blackhole — (Boolean)

          Indicates whether traffic that matches this route is dropped.

        • TransitGatewayAttachment — (map)

          Information about the transit gateway attachment.

          • TransitGatewayAttachmentId — (String)

            The ID of the attachment.

          • ResourceType — (String)

            The resource type. Note that the tgw-peering resource type has been deprecated.

            Possible values include:
            • "vpc"
            • "vpn"
            • "direct-connect-gateway"
            • "connect"
            • "peering"
            • "tgw-peering"
          • ResourceId — (String)

            The ID of the resource.

Returns:

  • (AWS.Request)

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

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

Deletes the specified route from the specified transit gateway route table.

Service Reference:

Examples:

Calling the deleteTransitGatewayRoute operation

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

      The ID of the transit gateway route table.

    • DestinationCidrBlock — (String)

      The CIDR range for the route. This must match the CIDR for the route exactly.

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

      • Route — (map)

        Information about the route.

        • DestinationCidrBlock — (String)

          The CIDR block used for destination matches.

        • PrefixListId — (String)

          The ID of the prefix list used for destination matches.

        • TransitGatewayAttachments — (Array<map>)

          The attachments.

          • ResourceId — (String)

            The ID of the resource.

          • TransitGatewayAttachmentId — (String)

            The ID of the attachment.

          • ResourceType — (String)

            The resource type. Note that the tgw-peering resource type has been deprecated.

            Possible values include:
            • "vpc"
            • "vpn"
            • "direct-connect-gateway"
            • "connect"
            • "peering"
            • "tgw-peering"
        • Type — (String)

          The route type.

          Possible values include:
          • "static"
          • "propagated"
        • State — (String)

          The state of the route.

          Possible values include:
          • "pending"
          • "active"
          • "blackhole"
          • "deleting"
          • "deleted"

Returns:

  • (AWS.Request)

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

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

Deletes the specified transit gateway route table. You must disassociate the route table from any transit gateway route tables before you can delete it.

Service Reference:

Examples:

Calling the deleteTransitGatewayRouteTable operation

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

      The ID of the transit gateway route table.

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

      • TransitGatewayRouteTable — (map)

        Information about the deleted transit gateway route table.

        • TransitGatewayRouteTableId — (String)

          The ID of the transit gateway route table.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • State — (String)

          The state of the transit gateway route table.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • DefaultAssociationRouteTable — (Boolean)

          Indicates whether this is the default association route table for the transit gateway.

        • DefaultPropagationRouteTable — (Boolean)

          Indicates whether this is the default propagation route table for the transit gateway.

        • CreationTime — (Date)

          The creation time.

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

Returns:

  • (AWS.Request)

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

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

Deletes the specified VPC attachment.

Examples:

Calling the deleteTransitGatewayVpcAttachment operation

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

      The ID of the attachment.

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

      • TransitGatewayVpcAttachment — (map)

        Information about the deleted VPC attachment.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • VpcId — (String)

          The ID of the VPC.

        • VpcOwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC.

        • State — (String)

          The state of the VPC attachment. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • SubnetIds — (Array<String>)

          The IDs of the subnets.

        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The VPC attachment options.

          • DnsSupport — (String)

            Indicates whether DNS support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • Ipv6Support — (String)

            Indicates whether IPv6 support is disabled.

            Possible values include:
            • "enable"
            • "disable"
          • ApplianceModeSupport — (String)

            Indicates whether appliance mode support is enabled.

            Possible values include:
            • "enable"
            • "disable"
        • Tags — (Array<map>)

          The tags for the VPC attachment.

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

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

Deletes the specified EBS volume. The volume must be in the available state (not attached to an instance).

The volume can remain in the deleting state for several minutes.

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

Service Reference:

Examples:

To delete a volume


/* This example deletes an available volume with the volume ID of ``vol-049df61146c4d7901``. If the command succeeds, no output is returned. */

 var params = {
  VolumeId: "vol-049df61146c4d7901"
 };
 ec2.deleteVolume(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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: {})
    • VolumeId — (String)

      The ID of the volume.

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

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.

Service Reference:

Examples:

To delete a VPC


/* This example deletes the specified VPC. */

 var params = {
  VpcId: "vpc-a01106c2"
 };
 ec2.deleteVpc(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

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: {})
    • VpcId — (String)

      The ID of the VPC.

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

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

Deletes one or more VPC endpoint connection notifications.

Examples:

Calling the deleteVpcEndpointConnectionNotifications operation

var params = {
  ConnectionNotificationIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.deleteVpcEndpointConnectionNotifications(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.

    • ConnectionNotificationIds — (Array<String>)

      One or more notification 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 notifications that could not be deleted successfully.

        • Error — (map)

          Information about the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message accompanying the error code.

        • ResourceId — (String)

          The ID of the resource.

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. You can delete any of the following types of VPC endpoints.

  • Gateway endpoint,

  • Gateway Load Balancer endpoint,

  • Interface endpoint

The following rules apply when you delete a VPC endpoint:

  • When you delete a gateway endpoint, we delete the endpoint routes in the route tables that are associated with the endpoint.

  • When you delete a Gateway Load Balancer endpoint, we delete the endpoint network interfaces.

    You can only delete Gateway Load Balancer endpoints when the routes that are associated with the endpoint are deleted.

  • When you delete an interface endpoint, we delete the endpoint network interfaces.

Service Reference:

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 VPC 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 VPC endpoints that were not successfully deleted.

        • Error — (map)

          Information about the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message accompanying the error code.

        • ResourceId — (String)

          The ID of the resource.

Returns:

  • (AWS.Request)

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

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

Deletes one or more VPC endpoint service configurations in your account. Before you delete the endpoint service configuration, you must reject any Available or PendingAcceptance interface endpoint connections that are attached to the service.

Examples:

Calling the deleteVpcEndpointServiceConfigurations operation

var params = {
  ServiceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.deleteVpcEndpointServiceConfigurations(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.

    • ServiceIds — (Array<String>)

      The IDs of one or more services.

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 service configurations that were not deleted, if applicable.

        • Error — (map)

          Information about the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message accompanying the error code.

        • ResourceId — (String)

          The ID of the resource.

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 accepter 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. You cannot delete a VPC peering connection that's in the failed state.

Service Reference:

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 device using the new configuration information returned with the new VPN connection ID.

For certificate-based authentication, delete all Certificate Manager (ACM) private certificates used for the Amazon Web Services-side tunnel endpoints for the VPN connection before deleting the VPN connection.

Service Reference:

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: {})
    • VpnConnectionId — (String)

      The ID of the VPN connection.

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

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.

Service Reference:

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: {})
    • DestinationCidrBlock — (String)

      The CIDR block associated with the local subnet of the customer network.

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

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

Deletes the specified virtual private gateway. You must first detach the virtual private gateway from the VPC. 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.

Service Reference:

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: {})
    • VpnGatewayId — (String)

      The ID of the virtual private gateway.

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

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

Releases the specified address range that you provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP) and deletes the corresponding address pool.

Before you can release an address range, you must stop advertising it using WithdrawByoipCidr and you must not have any IP addresses allocated from its address range.

Service Reference:

Examples:

Calling the deprovisionByoipCidr operation

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

      The address range, in CIDR notation. The prefix must be the same prefix that you specified when you provisioned the address range.

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

      • ByoipCidr — (map)

        Information about the address range.

        • Cidr — (String)

          The address range, in CIDR notation.

        • Description — (String)

          The description of the address range.

        • StatusMessage — (String)

          Upon success, contains the ID of the address pool. Otherwise, contains an error message.

        • State — (String)

          The state of the address pool.

          Possible values include:
          • "advertised"
          • "deprovisioned"
          • "failed-deprovision"
          • "failed-provision"
          • "pending-deprovision"
          • "pending-provision"
          • "provisioned"
          • "provisioned-not-publicly-advertisable"

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; however, it doesn't affect any instances that you've already launched from the AMI. You'll continue to incur usage costs for those instances until you terminate them.

When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was created for the root volume of the instance during the AMI creation process. When you deregister an instance store-backed AMI, it doesn't affect the files that you uploaded to Amazon S3 when you created the AMI.

Service Reference:

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: {})
    • ImageId — (String)

      The ID of the AMI.

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

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

c

Deregisters tag keys to prevent tags that have the specified tag keys from being included in scheduled event notifications for resources in the Region.

Examples:

Calling the deregisterInstanceEventNotificationAttributes operation

var params = {
  DryRun: true || false,
  InstanceTagAttribute: {
    IncludeAllTagsOfInstance: true || false,
    InstanceTagKeys: [
      'STRING_VALUE',
      /* more items */
    ]
  }
};
ec2.deregisterInstanceEventNotificationAttributes(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.

    • InstanceTagAttribute — (map)

      Information about the tag keys to deregister.

      • IncludeAllTagsOfInstance — (Boolean)

        Indicates whether to deregister all tag keys in the current Region. Specify false to deregister all tag keys.

      • InstanceTagKeys — (Array<String>)

        Information about the tag keys to deregister.

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:

      • InstanceTagAttribute — (map)

        The resulting set of tag keys.

        • InstanceTagKeys — (Array<String>)

          The registered tag keys.

        • IncludeAllTagsOfInstance — (Boolean)

          Indicates wheter all tag keys in the current Region are registered to appear in scheduled event notifications. true indicates that all tag keys in the current Region are registered.

Returns:

  • (AWS.Request)

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

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

Deregisters the specified members (network interfaces) from the transit gateway multicast group.

Examples:

Calling the deregisterTransitGatewayMulticastGroupMembers operation

var params = {
  DryRun: true || false,
  GroupIpAddress: 'STRING_VALUE',
  NetworkInterfaceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  TransitGatewayMulticastDomainId: 'STRING_VALUE'
};
ec2.deregisterTransitGatewayMulticastGroupMembers(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: {})
    • TransitGatewayMulticastDomainId — (String)

      The ID of the transit gateway multicast domain.

    • GroupIpAddress — (String)

      The IP address assigned to the transit gateway multicast group.

    • NetworkInterfaceIds — (Array<String>)

      The IDs of the group members' network interfaces.

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

      • DeregisteredMulticastGroupMembers — (map)

        Information about the deregistered members.

        • TransitGatewayMulticastDomainId — (String)

          The ID of the transit gateway multicast domain.

        • DeregisteredNetworkInterfaceIds — (Array<String>)

          The network interface IDs of the deregistered members.

        • GroupIpAddress — (String)

          The IP address assigned to the transit gateway multicast group.

Returns:

  • (AWS.Request)

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

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

Deregisters the specified sources (network interfaces) from the transit gateway multicast group.

Examples:

Calling the deregisterTransitGatewayMulticastGroupSources operation

var params = {
  DryRun: true || false,
  GroupIpAddress: 'STRING_VALUE',
  NetworkInterfaceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  TransitGatewayMulticastDomainId: 'STRING_VALUE'
};
ec2.deregisterTransitGatewayMulticastGroupSources(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: {})
    • TransitGatewayMulticastDomainId — (String)

      The ID of the transit gateway multicast domain.

    • GroupIpAddress — (String)

      The IP address assigned to the transit gateway multicast group.

    • NetworkInterfaceIds — (Array<String>)

      The IDs of the group sources' network interfaces.

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

      • DeregisteredMulticastGroupSources — (map)

        Information about the deregistered group sources.

        • TransitGatewayMulticastDomainId — (String)

          The ID of the transit gateway multicast domain.

        • DeregisteredNetworkInterfaceIds — (Array<String>)

          The network interface IDs of the non-registered members.

        • GroupIpAddress — (String)

          The IP address assigned to the transit gateway multicast group.

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: This attribute is no longer supported. The returned value does not reflect your actual vCPU limit for running On-Demand Instances. For more information, see On-Demand Instance Limits in the Amazon Elastic Compute Cloud User Guide.

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

Service Reference:

Examples:

To describe a single attribute for your AWS account


/* This example describes the supported-platforms attribute for your AWS account. */

 var params = {
  AttributeNames: [
     "supported-platforms"
  ]
 };
 ec2.describeAccountAttributes(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AccountAttributes: [
       {
      AttributeName: "supported-platforms", 
      AttributeValues: [
         {
        AttributeValue: "EC2"
       }, 
         {
        AttributeValue: "VPC"
       }
      ]
     }
    ]
   }
   */
 });

To describe all attributes for your AWS account


/* This example describes the attributes for your AWS account. */

 var params = {
 };
 ec2.describeAccountAttributes(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AccountAttributes: [
       {
      AttributeName: "supported-platforms", 
      AttributeValues: [
         {
        AttributeValue: "EC2"
       }, 
         {
        AttributeValue: "VPC"
       }
      ]
     }, 
       {
      AttributeName: "vpc-max-security-groups-per-interface", 
      AttributeValues: [
         {
        AttributeValue: "5"
       }
      ]
     }, 
       {
      AttributeName: "max-elastic-ips", 
      AttributeValues: [
         {
        AttributeValue: "5"
       }
      ]
     }, 
       {
      AttributeName: "max-instances", 
      AttributeValues: [
         {
        AttributeValue: "20"
       }
      ]
     }, 
       {
      AttributeName: "vpc-max-elastic-ips", 
      AttributeValues: [
         {
        AttributeValue: "5"
       }
      ]
     }, 
       {
      AttributeName: "default-vpc", 
      AttributeValues: [
         {
        AttributeValue: "none"
       }
      ]
     }
    ]
   }
   */
 });

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: {})
    • AttributeNames — (Array<String>)

      The account attribute names.

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

      • AccountAttributes — (Array<map>)

        Information about the account attributes.

        • AttributeName — (String)

          The name of the account attribute.

        • AttributeValues — (Array<map>)

          The 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 the specified Elastic IP addresses or all 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.

Service Reference:

Examples:

To describe your Elastic IP addresses


/* This example describes your Elastic IP addresses. */

 var params = {
 };
 ec2.describeAddresses(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Addresses: [
       {
      Domain: "standard", 
      InstanceId: "i-1234567890abcdef0", 
      PublicIp: "198.51.100.0"
     }, 
       {
      AllocationId: "eipalloc-12345678", 
      AssociationId: "eipassoc-12345678", 
      Domain: "vpc", 
      InstanceId: "i-1234567890abcdef0", 
      NetworkInterfaceId: "eni-12345678", 
      NetworkInterfaceOwnerId: "123456789012", 
      PrivateIpAddress: "10.0.1.241", 
      PublicIp: "203.0.113.0"
     }
    ]
   }
   */
 });

To describe your Elastic IP addresses for EC2-VPC


/* This example describes your Elastic IP addresses for use with instances in a VPC. */

 var params = {
  Filters: [
     {
    Name: "domain", 
    Values: [
       "vpc"
    ]
   }
  ]
 };
 ec2.describeAddresses(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Addresses: [
       {
      AllocationId: "eipalloc-12345678", 
      AssociationId: "eipassoc-12345678", 
      Domain: "vpc", 
      InstanceId: "i-1234567890abcdef0", 
      NetworkInterfaceId: "eni-12345678", 
      NetworkInterfaceOwnerId: "123456789012", 
      PrivateIpAddress: "10.0.1.241", 
      PublicIp: "203.0.113.0"
     }
    ]
   }
   */
 });

To describe your Elastic IP addresses for EC2-Classic


/* This example describes your Elastic IP addresses for use with instances in EC2-Classic. */

 var params = {
  Filters: [
     {
    Name: "domain", 
    Values: [
       "standard"
    ]
   }
  ]
 };
 ec2.describeAddresses(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Addresses: [
       {
      Domain: "standard", 
      InstanceId: "i-1234567890abcdef0", 
      PublicIp: "198.51.100.0"
     }
    ]
   }
   */
 });

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: {})
    • 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-border-group - A unique set of Availability Zones, Local Zones, or Wavelength Zones from where Amazon Web Services advertises IP addresses.

      • network-interface-id - [EC2-VPC] The ID of the network interface that the address is associated with, if any.

      • network-interface-owner-id - The Amazon Web Services 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, or the carrier IP address.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • PublicIps — (Array<String>)

      One or more Elastic IP addresses.

      Default: Describes all your Elastic IP addresses.

    • AllocationIds — (Array<String>)

      [EC2-VPC] Information about the allocation IDs.

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

      • Addresses — (Array<map>)

        Information about the 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 Amazon Web Services account that owns the network interface.

        • PrivateIpAddress — (String)

          The private IP address associated with the Elastic IP address.

        • Tags — (Array<map>)

          Any tags assigned to the Elastic IP address.

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

        • PublicIpv4Pool — (String)

          The ID of an address pool.

        • NetworkBorderGroup — (String)

          The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.

        • CustomerOwnedIp — (String)

          The customer-owned IP address.

        • CustomerOwnedIpv4Pool — (String)

          The ID of the customer-owned address pool.

        • CarrierIp — (String)

          The carrier IP address associated. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance).

Returns:

  • (AWS.Request)

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

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

Describes the attributes of the specified Elastic IP addresses. For requirements, see Using reverse DNS for email applications.

Service Reference:

Examples:

Calling the describeAddressesAttribute operation

var params = {
  AllocationIds: [
    'STRING_VALUE',
    /* more items */
  ],
  Attribute: domain-name,
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeAddressesAttribute(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: {})
    • AllocationIds — (Array<String>)

      [EC2-VPC] The allocation IDs.

    • Attribute — (String)

      The attribute of the IP address.

      Possible values include:
      • "domain-name"
    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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

      • Addresses — (Array<map>)

        Information about the IP addresses.

        • PublicIp — (String)

          The public IP address.

        • AllocationId — (String)

          [EC2-VPC] The allocation ID.

        • PtrRecord — (String)

          The pointer (PTR) record for the IP address.

        • PtrRecordUpdate — (map)

          The updated PTR record for the IP address.

          • Value — (String)

            The value for the PTR record update.

          • Status — (String)

            The status of the PTR record update.

          • Reason — (String)

            The reason for the PTR record update.

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

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

Describes the longer ID format settings for all resource types in a specific Region. This request is useful for performing a quick audit to determine whether a specific Region is fully opted in for longer IDs (17-character IDs).

This request only returns information about resource types that support longer IDs.

The following resource types support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

Service Reference:

Examples:

Calling the describeAggregateIdFormat operation

var params = {
  DryRun: true || false
};
ec2.describeAggregateIdFormat(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:

      • UseLongIdsAggregated — (Boolean)

        Indicates whether all resource types in the Region are configured to use longer IDs. This value is only true if all users are configured to use longer IDs for all resources types in the Region.

      • Statuses — (Array<map>)

        Information about each resource's ID format.

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

        • Resource — (String)

          The type of resource.

        • UseLongIds — (Boolean)

          Indicates whether longer IDs (17-character IDs) are enabled for the resource.

Returns:

  • (AWS.Request)

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

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

Describes the Availability Zones, Local Zones, and Wavelength Zones that are available to you. If there is an event impacting a zone, you can use this request to view the state and any provided messages for that zone.

For more information about Availability Zones, Local Zones, and Wavelength Zones, see Regions and zones in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To describe your Availability Zones


/* This example describes the Availability Zones that are available to you. The response includes Availability Zones only for the current region. */

 var params = {
 };
 ec2.describeAvailabilityZones(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AvailabilityZones: [
       {
      Messages: [
      ], 
      RegionName: "us-east-1", 
      State: "available", 
      ZoneName: "us-east-1b"
     }, 
       {
      Messages: [
      ], 
      RegionName: "us-east-1", 
      State: "available", 
      ZoneName: "us-east-1c"
     }, 
       {
      Messages: [
      ], 
      RegionName: "us-east-1", 
      State: "available", 
      ZoneName: "us-east-1d"
     }, 
       {
      Messages: [
      ], 
      RegionName: "us-east-1", 
      State: "available", 
      ZoneName: "us-east-1e"
     }
    ]
   }
   */
 });

Calling the describeAvailabilityZones operation

var params = {
  AllAvailabilityZones: true || false,
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  ZoneIds: [
    'STRING_VALUE',
    /* 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: {})
    • Filters — (Array<map>)

      The filters.

      • group-name - For Availability Zones, use the Region name. For Local Zones, use the name of the group associated with the Local Zone (for example, us-west-2-lax-1) For Wavelength Zones, use the name of the group associated with the Wavelength Zone (for example, us-east-1-wl1-bos-wlz-1).

      • message - The Zone message.

      • opt-in-status - The opt-in status (opted-in, and not-opted-in | opt-in-not-required).

      • parent-zoneID - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.

      • parent-zoneName - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.

      • region-name - The name of the Region for the Zone (for example, us-east-1).

      • state - The state of the Availability Zone, the Local Zone, or the Wavelength Zone (available | information | impaired | unavailable).

      • zone-id - The ID of the Availability Zone (for example, use1-az1), the Local Zone (for example, usw2-lax1-az1), or the Wavelength Zone (for example, us-east-1-wl1-bos-wlz-1).

      • zone-type - The type of zone, for example, local-zone.

      • zone-name - The name of the Availability Zone (for example, us-east-1a), the Local Zone (for example, us-west-2-lax-1a), or the Wavelength Zone (for example, us-east-1-wl1-bos-wlz-1).

      • zone-type - The type of zone, for example, local-zone.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • ZoneNames — (Array<String>)

      The names of the Availability Zones, Local Zones, and Wavelength Zones.

    • ZoneIds — (Array<String>)

      The IDs of the Availability Zones, Local Zones, and Wavelength Zones.

    • AllAvailabilityZones — (Boolean)

      Include all Availability Zones, Local Zones, and Wavelength Zones regardless of your opt-in status.

      If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.

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

      • AvailabilityZones — (Array<map>)

        Information about the Availability Zones, Local Zones, and Wavelength Zones.

        • State — (String)

          The state of the Availability Zone, Local Zone, or Wavelength Zone.

          Possible values include:
          • "available"
          • "information"
          • "impaired"
          • "unavailable"
        • OptInStatus — (String)

          For Availability Zones, this parameter always has the value of opt-in-not-required.

          For Local Zones and Wavelength Zones, this parameter is the opt-in status. The possible values are opted-in, and not-opted-in.

          Possible values include:
          • "opt-in-not-required"
          • "opted-in"
          • "not-opted-in"
        • Messages — (Array<map>)

          Any messages about the Availability Zone, Local Zone, or Wavelength Zone.

          • Message — (String)

            The message about the Availability Zone, Local Zone, or Wavelength Zone.

        • RegionName — (String)

          The name of the Region.

        • ZoneName — (String)

          The name of the Availability Zone, Local Zone, or Wavelength Zone.

        • ZoneId — (String)

          The ID of the Availability Zone, Local Zone, or Wavelength Zone.

        • GroupName — (String)

          For Availability Zones, this parameter has the same value as the Region name.

          For Local Zones, the name of the associated group, for example us-west-2-lax-1.

          For Wavelength Zones, the name of the associated group, for example us-east-1-wl1-bos-wlz-1.

        • NetworkBorderGroup — (String)

          The name of the network border group.

        • ZoneType — (String)

          The type of zone. The valid values are availability-zone, local-zone, and wavelength-zone.

        • ParentZoneName — (String)

          The name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.

        • ParentZoneId — (String)

          The ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.

Returns:

  • (AWS.Request)

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

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

Describes the specified bundle tasks or all of your bundle 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.

Service Reference:

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: {})
    • BundleIds — (Array<String>)

      The bundle task IDs.

      Default: Describes all your bundle tasks.

    • Filters — (Array<map>)

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

        The filter values. Filter values are case-sensitive.

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

      • BundleTasks — (Array<map>)

        Information about the bundle tasks.

        • BundleId — (String)

          The ID of the bundle task.

        • BundleTaskError — (map)

          If the task fails, a description of the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message.

        • InstanceId — (String)

          The ID of the instance associated with this bundle task.

        • Progress — (String)

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

        • StartTime — (Date)

          The time this task started.

        • State — (String)

          The state of the task.

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

          The Amazon S3 storage locations.

          • S3 — (map)

            An Amazon S3 storage location.

            • 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 Amazon Web Services Access Keys.

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

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

        • UpdateTime — (Date)

          The time of the most recent update for the task.

Returns:

  • (AWS.Request)

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

Waiter Resource States:

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

Describes the IP address ranges that were specified in calls to ProvisionByoipCidr.

To describe the address pools that were created when you provisioned the address ranges, use DescribePublicIpv4Pools or DescribeIpv6Pools.

Service Reference:

Examples:

Calling the describeByoipCidrs operation

var params = {
  MaxResults: 'NUMBER_VALUE', /* required */
  DryRun: true || false,
  NextToken: 'STRING_VALUE'
};
ec2.describeByoipCidrs(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.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for 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:

      • ByoipCidrs — (Array<map>)

        Information about your address ranges.

        • Cidr — (String)

          The address range, in CIDR notation.

        • Description — (String)

          The description of the address range.

        • StatusMessage — (String)

          Upon success, contains the ID of the address pool. Otherwise, contains an error message.

        • State — (String)

          The state of the address pool.

          Possible values include:
          • "advertised"
          • "deprovisioned"
          • "failed-deprovision"
          • "failed-provision"
          • "pending-deprovision"
          • "pending-provision"
          • "provisioned"
          • "provisioned-not-publicly-advertisable"
      • 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.

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

Describes one or more Capacity Reservation Fleets.

Examples:

Calling the describeCapacityReservationFleets operation

var params = {
  CapacityReservationFleetIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeCapacityReservationFleets(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: {})
    • CapacityReservationFleetIds — (Array<String>)

      The IDs of the Capacity Reservation Fleets to describe.

    • NextToken — (String)

      The token to use 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 receive an error.

    • Filters — (Array<map>)

      One or more filters.

      • state - The state of the Fleet (submitted | modifying | active | partially_fulfilled | expiring | expired | cancelling | cancelled | failed).

      • instance-match-criteria - The instance matching criteria for the Fleet. Only open is supported.

      • tenancy - The tenancy of the Fleet (default | dedicated).

      • allocation-strategy - The allocation strategy used by the Fleet. Only prioritized is supported.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

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

      • CapacityReservationFleets — (Array<map>)

        Information about the Capacity Reservation Fleets.

        • CapacityReservationFleetId — (String)

          The ID of the Capacity Reservation Fleet.

        • CapacityReservationFleetArn — (String)

          The ARN of the Capacity Reservation Fleet.

        • State — (String)

          The state of the Capacity Reservation Fleet. Possible states include:

          • submitted - The Capacity Reservation Fleet request has been submitted and Amazon Elastic Compute Cloud is preparing to create the Capacity Reservations.

          • modifying - The Capacity Reservation Fleet is being modified. The Fleet remains in this state until the modification is complete.

          • active - The Capacity Reservation Fleet has fulfilled its total target capacity and it is attempting to maintain this capacity. The Fleet remains in this state until it is modified or deleted.

          • partially_fulfilled - The Capacity Reservation Fleet has partially fulfilled its total target capacity. There is insufficient Amazon EC2 to fulfill the total target capacity. The Fleet is attempting to asynchronously fulfill its total target capacity.

          • expiring - The Capacity Reservation Fleet has reach its end date and it is in the process of expiring. One or more of its Capacity reservations might still be active.

          • expired - The Capacity Reservation Fleet has reach its end date. The Fleet and its Capacity Reservations are expired. The Fleet can't create new Capacity Reservations.

          • cancelling - The Capacity Reservation Fleet is in the process of being cancelled. One or more of its Capacity reservations might still be active.

          • cancelled - The Capacity Reservation Fleet has been manually cancelled. The Fleet and its Capacity Reservations are cancelled and the Fleet can't create new Capacity Reservations.

          • failed - The Capacity Reservation Fleet failed to reserve capacity for the specified instance types.

          Possible values include:
          • "submitted"
          • "modifying"
          • "active"
          • "partially_fulfilled"
          • "expiring"
          • "expired"
          • "cancelling"
          • "cancelled"
          • "failed"
        • TotalTargetCapacity — (Integer)

          The total number of capacity units for which the Capacity Reservation Fleet reserves capacity. For more information, see Total target capacity in the Amazon EC2 User Guide.

        • TotalFulfilledCapacity — (Float)

          The capacity units that have been fulfilled.

        • Tenancy — (String)

          The tenancy of the Capacity Reservation Fleet. Tenancies include:

          • default - The Capacity Reservation Fleet is created on hardware that is shared with other Amazon Web Services accounts.

          • dedicated - The Capacity Reservation Fleet is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.

          Possible values include:
          • "default"
        • EndDate — (Date)

          The date and time at which the Capacity Reservation Fleet expires.

        • CreateTime — (Date)

          The date and time at which the Capacity Reservation Fleet was created.

        • InstanceMatchCriteria — (String)

          Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.

          Currently, Capacity Reservation Fleets support open instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.

          Possible values include:
          • "open"
        • AllocationStrategy — (String)

          The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. For more information, see For more information, see Allocation strategy in the Amazon EC2 User Guide.

        • InstanceTypeSpecifications — (Array<map>)

          Information about the instance types for which to reserve the capacity.

          • CapacityReservationId — (String)

            The ID of the Capacity Reservation.

          • AvailabilityZoneId — (String)

            The ID of the Availability Zone in which the Capacity Reservation reserves capacity.

          • InstanceType — (String)

            The instance type for which the Capacity Reservation reserves capacity.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • InstancePlatform — (String)

            The type of operating system for which the Capacity Reservation reserves capacity.

            Possible values include:
            • "Linux/UNIX"
            • "Red Hat Enterprise Linux"
            • "SUSE Linux"
            • "Windows"
            • "Windows with SQL Server"
            • "Windows with SQL Server Enterprise"
            • "Windows with SQL Server Standard"
            • "Windows with SQL Server Web"
            • "Linux with SQL Server Standard"
            • "Linux with SQL Server Web"
            • "Linux with SQL Server Enterprise"
          • AvailabilityZone — (String)

            The Availability Zone in which the Capacity Reservation reserves capacity.

          • TotalInstanceCount — (Integer)

            The total number of instances for which the Capacity Reservation reserves capacity.

          • FulfilledCapacity — (Float)

            The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target capacity in the Amazon EC2 User Guide.

          • EbsOptimized — (Boolean)

            Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.

          • CreateDate — (Date)

            The date and time at which the Capacity Reservation was created.

          • Weight — (Float)

            The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type weight in the Amazon EC2 User Guide.

          • Priority — (Integer)

            The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type priority in the Amazon EC2 User Guide.

        • Tags — (Array<map>)

          The tags assigned to the Capacity Reservation Fleet.

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

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

Describes one or more of your Capacity Reservations. The results describe only the Capacity Reservations in the Amazon Web Services Region that you're currently using.

Service Reference:

Examples:

Calling the describeCapacityReservations operation

var params = {
  CapacityReservationIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeCapacityReservations(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: {})
    • CapacityReservationIds — (Array<String>)

      The ID of the Capacity Reservation.

    • NextToken — (String)

      The token to use 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 receive an error.

    • Filters — (Array<map>)

      One or more filters.

      • instance-type - The type of instance for which the Capacity Reservation reserves capacity.

      • owner-id - The ID of the Amazon Web Services account that owns the Capacity Reservation.

      • availability-zone-id - The Availability Zone ID of the Capacity Reservation.

      • instance-platform - The type of operating system for which the Capacity Reservation reserves capacity.

      • availability-zone - The Availability Zone ID of the Capacity Reservation.

      • tenancy - Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

        • default - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.

        • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.

      • outpost-arn - The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.

      • state - The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

        • active- The Capacity Reservation is active and the capacity is available for your use.

        • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.

        • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.

        • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.

        • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.

      • start-date - The date and time at which the Capacity Reservation was started.

      • end-date - The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

      • end-date-type - Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

        • unlimited - The Capacity Reservation remains active until you explicitly cancel it.

        • limited - The Capacity Reservation expires automatically at a specified date and time.

      • instance-match-criteria - Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

        • open - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.

        • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

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

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

      • CapacityReservations — (Array<map>)

        Information about the Capacity Reservations.

        • CapacityReservationId — (String)

          The ID of the Capacity Reservation.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the Capacity Reservation.

        • CapacityReservationArn — (String)

          The Amazon Resource Name (ARN) of the Capacity Reservation.

        • AvailabilityZoneId — (String)

          The Availability Zone ID of the Capacity Reservation.

        • InstanceType — (String)

          The type of instance for which the Capacity Reservation reserves capacity.

        • InstancePlatform — (String)

          The type of operating system for which the Capacity Reservation reserves capacity.

          Possible values include:
          • "Linux/UNIX"
          • "Red Hat Enterprise Linux"
          • "SUSE Linux"
          • "Windows"
          • "Windows with SQL Server"
          • "Windows with SQL Server Enterprise"
          • "Windows with SQL Server Standard"
          • "Windows with SQL Server Web"
          • "Linux with SQL Server Standard"
          • "Linux with SQL Server Web"
          • "Linux with SQL Server Enterprise"
        • AvailabilityZone — (String)

          The Availability Zone in which the capacity is reserved.

        • Tenancy — (String)

          Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

          • default - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.

          • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.

          Possible values include:
          • "default"
          • "dedicated"
        • TotalInstanceCount — (Integer)

          The total number of instances for which the Capacity Reservation reserves capacity.

        • AvailableInstanceCount — (Integer)

          The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

        • EbsOptimized — (Boolean)

          Indicates whether the Capacity Reservation supports EBS-optimized instances. 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.

        • EphemeralStorage — (Boolean)

          Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.

        • State — (String)

          The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

          • active - The Capacity Reservation is active and the capacity is available for your use.

          • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.

          • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.

          • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.

          • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.

          Possible values include:
          • "active"
          • "expired"
          • "cancelled"
          • "pending"
          • "failed"
        • StartDate — (Date)

          The date and time at which the Capacity Reservation was started.

        • EndDate — (Date)

          The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

        • EndDateType — (String)

          Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

          • unlimited - The Capacity Reservation remains active until you explicitly cancel it.

          • limited - The Capacity Reservation expires automatically at a specified date and time.

          Possible values include:
          • "unlimited"
          • "limited"
        • InstanceMatchCriteria — (String)

          Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

          • open - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.

          • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.

          Possible values include:
          • "open"
          • "targeted"
        • CreateDate — (Date)

          The date and time at which the Capacity Reservation was created.

        • Tags — (Array<map>)

          Any tags assigned to the Capacity Reservation.

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

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.

        • CapacityReservationFleetId — (String)

          The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.

Returns:

  • (AWS.Request)

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

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

Describes one or more of your carrier gateways.

Service Reference:

Examples:

Calling the describeCarrierGateways operation

var params = {
  CarrierGatewayIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeCarrierGateways(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: {})
    • CarrierGatewayIds — (Array<String>)

      One or more carrier gateway IDs.

    • Filters — (Array<map>)

      One or more filters.

      • carrier-gateway-id - The ID of the carrier gateway.

      • state - The state of the carrier gateway (pending | failed | available | deleting | deleted).

      • owner-id - The Amazon Web Services account ID of the owner of the carrier gateway.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • vpc-id - The ID of the VPC associated with the carrier gateway.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

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

      • CarrierGateways — (Array<map>)

        Information about the carrier gateway.

        • CarrierGatewayId — (String)

          The ID of the carrier gateway.

        • VpcId — (String)

          The ID of the VPC associated with the carrier gateway.

        • State — (String)

          The state of the carrier gateway.

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

          The Amazon Web Services account ID of the owner of the carrier gateway.

        • Tags — (Array<map>)

          The tags assigned to the carrier 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.

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

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.

Service Reference:

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: 'NUMBER_VALUE',
  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: {})
    • 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • vpc-id - The ID of the VPC to which the instance is linked.

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

        The filter values. Filter values are case-sensitive.

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

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

      Constraint: If the value is greater than 1000, we return only 1000 items.

    • NextToken — (String)

      The token for 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:

      • Instances — (Array<map>)

        Information about one or more linked EC2-Classic instances.

        • Groups — (Array<map>)

          A list of security groups.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • InstanceId — (String)

          The ID of the instance.

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

        • VpcId — (String)

          The ID of the VPC.

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

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

Describes the authorization rules for a specified Client VPN endpoint.

Examples:

Calling the describeClientVpnAuthorizationRules operation

var params = {
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeClientVpnAuthorizationRules(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint.

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

    • NextToken — (String)

      The token to retrieve the next page of results.

    • Filters — (Array<map>)

      One or more filters. Filter names and values are case-sensitive.

      • description - The description of the authorization rule.

      • destination-cidr - The CIDR of the network to which the authorization rule applies.

      • group-id - The ID of the Active Directory group to which the authorization rule grants access.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 nextToken value.

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:

      • AuthorizationRules — (Array<map>)

        Information about the authorization rules.

        • ClientVpnEndpointId — (String)

          The ID of the Client VPN endpoint with which the authorization rule is associated.

        • Description — (String)

          A brief description of the authorization rule.

        • GroupId — (String)

          The ID of the Active Directory group to which the authorization rule grants access.

        • AccessAll — (Boolean)

          Indicates whether the authorization rule grants access to all clients.

        • DestinationCidr — (String)

          The IPv4 address range, in CIDR notation, of the network to which the authorization rule applies.

        • Status — (map)

          The current state of the authorization rule.

          • Code — (String)

            The state of the authorization rule.

            Possible values include:
            • "authorizing"
            • "active"
            • "failed"
            • "revoking"
          • Message — (String)

            A message about the status of the authorization rule, if applicable.

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

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

Describes active client connections and connections that have been terminated within the last 60 minutes for the specified Client VPN endpoint.

Service Reference:

Examples:

Calling the describeClientVpnConnections operation

var params = {
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeClientVpnConnections(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint.

    • Filters — (Array<map>)

      One or more filters. Filter names and values are case-sensitive.

      • connection-id - The ID of the connection.

      • username - For Active Directory client authentication, the user name of the client who established the client connection.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 nextToken value.

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

      • Connections — (Array<map>)

        Information about the active and terminated client connections.

        • ClientVpnEndpointId — (String)

          The ID of the Client VPN endpoint to which the client is connected.

        • Timestamp — (String)

          The current date and time.

        • ConnectionId — (String)

          The ID of the client connection.

        • Username — (String)

          The username of the client who established the client connection. This information is only provided if Active Directory client authentication is used.

        • ConnectionEstablishedTime — (String)

          The date and time the client connection was established.

        • IngressBytes — (String)

          The number of bytes sent by the client.

        • EgressBytes — (String)

          The number of bytes received by the client.

        • IngressPackets — (String)

          The number of packets sent by the client.

        • EgressPackets — (String)

          The number of packets received by the client.

        • ClientIp — (String)

          The IP address of the client.

        • CommonName — (String)

          The common name associated with the client. This is either the name of the client certificate, or the Active Directory user name.

        • Status — (map)

          The current state of the client connection.

          • Code — (String)

            The state of the client connection.

            Possible values include:
            • "active"
            • "failed-to-terminate"
            • "terminating"
            • "terminated"
          • Message — (String)

            A message about the status of the client connection, if applicable.

        • ConnectionEndTime — (String)

          The date and time the client connection was terminated.

        • PostureComplianceStatuses — (Array<String>)

          The statuses returned by the client connect handler for posture compliance, if applicable.

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

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

Describes one or more Client VPN endpoints in the account.

Service Reference:

Examples:

Calling the describeClientVpnEndpoints operation

var params = {
  ClientVpnEndpointIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeClientVpnEndpoints(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: {})
    • ClientVpnEndpointIds — (Array<String>)

      The ID of the Client VPN endpoint.

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

    • NextToken — (String)

      The token to retrieve the next page of results.

    • Filters — (Array<map>)

      One or more filters. Filter names and values are case-sensitive.

      • endpoint-id - The ID of the Client VPN endpoint.

      • transport-protocol - The transport protocol (tcp | udp).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

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

      • ClientVpnEndpoints — (Array<map>)

        Information about the Client VPN endpoints.

        • ClientVpnEndpointId — (String)

          The ID of the Client VPN endpoint.

        • Description — (String)

          A brief description of the endpoint.

        • Status — (map)

          The current state of the Client VPN endpoint.

          • Code — (String)

            The state of the Client VPN endpoint. Possible states include:

            • pending-associate - The Client VPN endpoint has been created but no target networks have been associated. The Client VPN endpoint cannot accept connections.

            • available - The Client VPN endpoint has been created and a target network has been associated. The Client VPN endpoint can accept connections.

            • deleting - The Client VPN endpoint is being deleted. The Client VPN endpoint cannot accept connections.

            • deleted - The Client VPN endpoint has been deleted. The Client VPN endpoint cannot accept connections.

            Possible values include:
            • "pending-associate"
            • "available"
            • "deleting"
            • "deleted"
          • Message — (String)

            A message about the status of the Client VPN endpoint.

        • CreationTime — (String)

          The date and time the Client VPN endpoint was created.

        • DeletionTime — (String)

          The date and time the Client VPN endpoint was deleted, if applicable.

        • DnsName — (String)

          The DNS name to be used by clients when connecting to the Client VPN endpoint.

        • ClientCidrBlock — (String)

          The IPv4 address range, in CIDR notation, from which client IP addresses are assigned.

        • DnsServers — (Array<String>)

          Information about the DNS servers to be used for DNS resolution.

        • SplitTunnel — (Boolean)

          Indicates whether split-tunnel is enabled in the Client VPN endpoint.

          For information about split-tunnel VPN endpoints, see Split-Tunnel Client VPN endpoint in the Client VPN Administrator Guide.

        • VpnProtocol — (String)

          The protocol used by the VPN session.

          Possible values include:
          • "openvpn"
        • TransportProtocol — (String)

          The transport protocol used by the Client VPN endpoint.

          Possible values include:
          • "tcp"
          • "udp"
        • VpnPort — (Integer)

          The port number for the Client VPN endpoint.

        • AssociatedTargetNetworks — (Array<map>)

          Information about the associated target networks. A target network is a subnet in a VPC.

          • NetworkId — (String)

            The ID of the subnet.

          • NetworkType — (String)

            The target network type.

            Possible values include:
            • "vpc"
        • ServerCertificateArn — (String)

          The ARN of the server certificate.

        • AuthenticationOptions — (Array<map>)

          Information about the authentication method used by the Client VPN endpoint.

          • Type — (String)

            The authentication type used.

            Possible values include:
            • "certificate-authentication"
            • "directory-service-authentication"
            • "federated-authentication"
          • ActiveDirectory — (map)

            Information about the Active Directory, if applicable.

            • DirectoryId — (String)

              The ID of the Active Directory used for authentication.

          • MutualAuthentication — (map)

            Information about the authentication certificates, if applicable.

            • ClientRootCertificateChain — (String)

              The ARN of the client certificate.

          • FederatedAuthentication — (map)

            Information about the IAM SAML identity provider, if applicable.

            • SamlProviderArn — (String)

              The Amazon Resource Name (ARN) of the IAM SAML identity provider.

            • SelfServiceSamlProviderArn — (String)

              The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.

        • ConnectionLogOptions — (map)

          Information about the client connection logging options for the Client VPN endpoint.

          • Enabled — (Boolean)

            Indicates whether client connection logging is enabled for the Client VPN endpoint.

          • CloudwatchLogGroup — (String)

            The name of the Amazon CloudWatch Logs log group to which connection logging data is published.

          • CloudwatchLogStream — (String)

            The name of the Amazon CloudWatch Logs log stream to which connection logging data is published.

        • Tags — (Array<map>)

          Any tags assigned to the Client VPN endpoint.

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

        • SecurityGroupIds — (Array<String>)

          The IDs of the security groups for the target network.

        • VpcId — (String)

          The ID of the VPC.

        • SelfServicePortalUrl — (String)

          The URL of the self-service portal.

        • ClientConnectOptions — (map)

          The options for managing connection authorization for new client connections.

          • Enabled — (Boolean)

            Indicates whether client connect options are enabled.

          • LambdaFunctionArn — (String)

            The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.

          • Status — (map)

            The status of any updates to the client connect options.

            • Code — (String)

              The status code.

              Possible values include:
              • "applying"
              • "applied"
            • Message — (String)

              The status message.

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

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

Describes the routes for the specified Client VPN endpoint.

Service Reference:

Examples:

Calling the describeClientVpnRoutes operation

var params = {
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeClientVpnRoutes(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint.

    • Filters — (Array<map>)

      One or more filters. Filter names and values are case-sensitive.

      • destination-cidr - The CIDR of the route destination.

      • origin - How the route was associated with the Client VPN endpoint (associate | add-route).

      • target-subnet - The ID of the subnet through which traffic is routed.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 nextToken value.

    • NextToken — (String)

      The token to retrieve the next page of results.

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

      • Routes — (Array<map>)

        Information about the Client VPN endpoint routes.

        • ClientVpnEndpointId — (String)

          The ID of the Client VPN endpoint with which the route is associated.

        • DestinationCidr — (String)

          The IPv4 address range, in CIDR notation, of the route destination.

        • TargetSubnet — (String)

          The ID of the subnet through which traffic is routed.

        • Type — (String)

          The route type.

        • Origin — (String)

          Indicates how the route was associated with the Client VPN endpoint. associate indicates that the route was automatically added when the target network was associated with the Client VPN endpoint. add-route indicates that the route was manually added using the CreateClientVpnRoute action.

        • Status — (map)

          The current state of the route.

          • Code — (String)

            The state of the Client VPN endpoint route.

            Possible values include:
            • "creating"
            • "active"
            • "failed"
            • "deleting"
          • Message — (String)

            A message about the status of the Client VPN endpoint route, if applicable.

        • Description — (String)

          A brief description of the route.

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

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

Describes the target networks associated with the specified Client VPN endpoint.

Service Reference:

Examples:

Calling the describeClientVpnTargetNetworks operation

var params = {
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  AssociationIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeClientVpnTargetNetworks(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint.

    • AssociationIds — (Array<String>)

      The IDs of the target network associations.

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

    • NextToken — (String)

      The token to retrieve the next page of results.

    • Filters — (Array<map>)

      One or more filters. Filter names and values are case-sensitive.

      • association-id - The ID of the association.

      • target-network-id - The ID of the subnet specified as the target network.

      • vpc-id - The ID of the VPC in which the target network is located.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

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

      • ClientVpnTargetNetworks — (Array<map>)

        Information about the associated target networks.

        • AssociationId — (String)

          The ID of the association.

        • VpcId — (String)

          The ID of the VPC in which the target network (subnet) is located.

        • TargetNetworkId — (String)

          The ID of the subnet specified as the target network.

        • ClientVpnEndpointId — (String)

          The ID of the Client VPN endpoint with which the target network is associated.

        • Status — (map)

          The current state of the target network association.

          • Code — (String)

            The state of the target network association.

            Possible values include:
            • "associating"
            • "associated"
            • "association-failed"
            • "disassociating"
            • "disassociated"
          • Message — (String)

            A message about the status of the target network association, if applicable.

        • SecurityGroups — (Array<String>)

          The IDs of the security groups applied to the target network association.

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

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

Describes the specified customer-owned address pools or all of your customer-owned address pools.

Service Reference:

Examples:

Calling the describeCoipPools operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  PoolIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeCoipPools(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: {})
    • PoolIds — (Array<String>)

      The IDs of the address pools.

    • Filters — (Array<map>)

      The filters. The following are the possible values:

      • coip-pool.pool-id

      • coip-pool.local-gateway-route-table-id

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

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

      • CoipPools — (Array<map>)

        Information about the address pools.

        • PoolId — (String)

          The ID of the address pool.

        • PoolCidrs — (Array<String>)

          The address ranges of the address pool.

        • LocalGatewayRouteTableId — (String)

          The ID of the local gateway route table.

        • Tags — (Array<map>)

          The tags.

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

        • PoolArn — (String)

          The ARN of the address pool.

      • 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 the specified conversion tasks or all 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.

Service Reference:

Examples:

Calling the describeConversionTasks operation

var params = {
  ConversionTaskIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
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: {})
    • ConversionTaskIds — (Array<String>)

      The conversion task IDs.

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

      • ConversionTasks — (Array<map>)

        Information about the conversion tasks.

        • ConversionTaskId — (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.

          • Description — (String)

            A description of the task.

          • InstanceId — (String)

            The ID of the instance.

          • Platform — (String)

            The instance operating system.

            Possible values include:
            • "Windows"
          • Volumes — (Array<map>)

            The volumes.

            • AvailabilityZone — (String)

              The Availability Zone where the resulting instance will reside.

            • BytesConverted — (Integer)

              The number of bytes converted so far.

            • Description — (String)

              A description of the task.

            • Image — (map)

              The image.

              • Checksum — (String)

                The checksum computed for the disk image.

              • Format — (String)

                The disk image format.

                Possible values include:
                • "VMDK"
                • "RAW"
                • "VHD"
              • ImportManifestUrl — (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.

              • Size — (Integer)

                The size of the disk image, in GiB.

            • Status — (String)

              The status of the import of this particular disk image.

            • StatusMessage — (String)

              The status information or errors related to the disk image.

            • Volume — (map)

              The volume.

              • Id — (String)

                The volume identifier.

              • Size — (Integer)

                The size of the volume, in GiB.

        • ImportVolume — (map)

          If the task is for importing a volume, this contains information about the import volume task.

          • AvailabilityZone — (String)

            The Availability Zone where the resulting volume will reside.

          • BytesConverted — (Integer)

            The number of bytes converted so far.

          • Description — (String)

            The description you provided when starting the import volume task.

          • Image — (map)

            The image.

            • Checksum — (String)

              The checksum computed for the disk image.

            • Format — (String)

              The disk image format.

              Possible values include:
              • "VMDK"
              • "RAW"
              • "VHD"
            • ImportManifestUrl — (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.

            • Size — (Integer)

              The size of the disk image, in GiB.

          • Volume — (map)

            The volume.

            • Id — (String)

              The volume identifier.

            • Size — (Integer)

              The size of the volume, in GiB.

        • State — (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, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.

Service Reference:

Examples:

To describe a customer gateway


/* This example describes the specified customer gateway. */

 var params = {
  CustomerGatewayIds: [
     "cgw-0e11f167"
  ]
 };
 ec2.describeCustomerGateways(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    CustomerGateways: [
       {
      BgpAsn: "65534", 
      CustomerGatewayId: "cgw-0e11f167", 
      IpAddress: "12.1.2.3", 
      State: "available", 
      Type: "ipsec.1"
     }
    ]
   }
   */
 });

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: {})
    • 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

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

      • CustomerGateways — (Array<map>)

        Information about one or more customer gateways.

        • BgpAsn — (String)

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

        • CustomerGatewayId — (String)

          The ID of the customer gateway.

        • IpAddress — (String)

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

        • CertificateArn — (String)

          The Amazon Resource Name (ARN) for the customer gateway certificate.

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

        • DeviceName — (String)

          The name of customer gateway device.

        • 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, see DHCP options sets in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

To describe a DHCP options set


/* This example describes the specified DHCP options set. */

 var params = {
  DhcpOptionsIds: [
     "dopt-d9070ebb"
  ]
 };
 ec2.describeDhcpOptions(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    DhcpOptions: [
       {
      DhcpConfigurations: [
         {
        Key: "domain-name-servers", 
        Values: [
           {
          Value: "10.2.5.2"
         }, 
           {
          Value: "10.2.5.1"
         }
        ]
       }
      ], 
      DhcpOptionsId: "dopt-d9070ebb"
     }
    ]
   }
   */
 });

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 */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
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: {})
    • 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 DHCP options set.

      • key - The key for one of the options (for example, domain-name).

      • value - The value for one of the options.

      • owner-id - The ID of the Amazon Web Services account that owns the DHCP options set.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

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

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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.

        • 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. The value is case-sensitive.

        • DhcpOptionsId — (String)

          The ID of the set of DHCP options.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the DHCP options set.

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

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

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

Describes one or more of your egress-only internet gateways.

Examples:

Calling the describeEgressOnlyInternetGateways operation

var params = {
  DryRun: true || false,
  EgressOnlyInternetGatewayIds: [
    'STRING_VALUE',
    /* more items */
  ],
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeEgressOnlyInternetGateways(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.

    • EgressOnlyInternetGatewayIds — (Array<String>)

      One or more egress-only internet gateway IDs.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • Filters — (Array<map>)

      One or more filters.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

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

      • EgressOnlyInternetGateways — (Array<map>)

        Information about the egress-only internet gateways.

        • Attachments — (Array<map>)

          Information about the attachment of the egress-only internet gateway.

          • State — (String)

            The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
          • VpcId — (String)

            The ID of the VPC.

        • EgressOnlyInternetGatewayId — (String)

          The ID of the egress-only internet gateway.

        • Tags — (Array<map>)

          The tags assigned to the egress-only 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.

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

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

Describes the Elastic Graphics accelerator associated with your instances. For more information about Elastic Graphics, see Amazon Elastic Graphics.

Service Reference:

Examples:

Calling the describeElasticGpus operation

var params = {
  DryRun: true || false,
  ElasticGpuIds: [
    'STRING_VALUE',
    /* more items */
  ],
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeElasticGpus(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: {})
    • ElasticGpuIds — (Array<String>)

      The Elastic Graphics accelerator IDs.

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

      The filters.

      • availability-zone - The Availability Zone in which the Elastic Graphics accelerator resides.

      • elastic-gpu-health - The status of the Elastic Graphics accelerator (OK | IMPAIRED).

      • elastic-gpu-state - The state of the Elastic Graphics accelerator (ATTACHED).

      • elastic-gpu-type - The type of Elastic Graphics accelerator; for example, eg1.medium.

      • instance-id - The ID of the instance to which the Elastic Graphics accelerator is associated.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

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

    • NextToken — (String)

      The token to request 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:

      • ElasticGpuSet — (Array<map>)

        Information about the Elastic Graphics accelerators.

        • ElasticGpuId — (String)

          The ID of the Elastic Graphics accelerator.

        • AvailabilityZone — (String)

          The Availability Zone in the which the Elastic Graphics accelerator resides.

        • ElasticGpuType — (String)

          The type of Elastic Graphics accelerator.

        • ElasticGpuHealth — (map)

          The status of the Elastic Graphics accelerator.

          • Status — (String)

            The health status.

            Possible values include:
            • "OK"
            • "IMPAIRED"
        • ElasticGpuState — (String)

          The state of the Elastic Graphics accelerator.

          Possible values include:
          • "ATTACHED"
        • InstanceId — (String)

          The ID of the instance to which the Elastic Graphics accelerator is attached.

        • Tags — (Array<map>)

          The tags assigned to the Elastic Graphics accelerator.

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

      • MaxResults — (Integer)

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a Next-Token will be provided in the output that you can use to resume pagination.

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

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

Describes the specified export image tasks or all of your export image tasks.

Service Reference:

Examples:

Calling the describeExportImageTasks operation

var params = {
  DryRun: true || false,
  ExportImageTaskIds: [
    'STRING_VALUE',
    /* more items */
  ],
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeExportImageTasks(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>)

      Filter tasks using the task-state filter and one of the following values: active, completed, deleting, or deleted.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • ExportImageTaskIds — (Array<String>)

      The IDs of the export image tasks.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call.

    • NextToken — (String)

      A token that indicates 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:

      • ExportImageTasks — (Array<map>)

        Information about the export image tasks.

        • Description — (String)

          A description of the image being exported.

        • ExportImageTaskId — (String)

          The ID of the export image task.

        • ImageId — (String)

          The ID of the image.

        • Progress — (String)

          The percent complete of the export image task.

        • S3ExportLocation — (map)

          Information about the destination Amazon S3 bucket.

          • S3Bucket — (String)

            The destination Amazon S3 bucket.

          • S3Prefix — (String)

            The prefix (logical hierarchy) in the bucket.

        • Status — (String)

          The status of the export image task. The possible values are active, completed, deleting, and deleted.

        • StatusMessage — (String)

          The status message for the export image task.

        • Tags — (Array<map>)

          Any tags assigned to the export image 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.

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

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

Describes the specified export instance tasks or all of your export instance tasks.

Service Reference:

Examples:

Calling the describeExportTasks operation

var params = {
  ExportTaskIds: [
    'STRING_VALUE',
    /* more items */
  ],
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* 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>)

      The export task IDs.

    • Filters — (Array<map>)

      the filters for the export tasks.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

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

      • ExportTasks — (Array<map>)

        Information about the export tasks.

        • Description — (String)

          A description of the resource being exported.

        • ExportTaskId — (String)

          The ID of the export task.

        • ExportToS3Task — (map)

          Information about the export task.

          • 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"
          • DiskImageFormat — (String)

            The format for the exported image.

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

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

          • S3Key — (String)

            The encryption key for your S3 bucket.

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

        • Tags — (Array<map>)

          The tags for the export 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:

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

Describes the state of fast snapshot restores for your snapshots.

Service Reference:

Examples:

Calling the describeFastSnapshotRestores operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeFastSnapshotRestores(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: {})
    • Filters — (Array<map>)

      The filters. The possible values are:

      • availability-zone: The Availability Zone of the snapshot.

      • owner-id: The ID of the Amazon Web Services account that enabled fast snapshot restore on the snapshot.

      • snapshot-id: The ID of the snapshot.

      • state: The state of fast snapshot restores for the snapshot (enabling | optimizing | enabled | disabling | disabled).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

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

      • FastSnapshotRestores — (Array<map>)

        Information about the state of fast snapshot restores.

        • SnapshotId — (String)

          The ID of the snapshot.

        • AvailabilityZone — (String)

          The Availability Zone.

        • State — (String)

          The state of fast snapshot restores.

          Possible values include:
          • "enabling"
          • "optimizing"
          • "enabled"
          • "disabling"
          • "disabled"
        • StateTransitionReason — (String)

          The reason for the state transition. The possible values are as follows:

          • Client.UserInitiated - The state successfully transitioned to enabling or disabling.

          • Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to optimizing, enabled, or disabled.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.

        • OwnerAlias — (String)

          The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.

        • EnablingTime — (Date)

          The time at which fast snapshot restores entered the enabling state.

        • OptimizingTime — (Date)

          The time at which fast snapshot restores entered the optimizing state.

        • EnabledTime — (Date)

          The time at which fast snapshot restores entered the enabled state.

        • DisablingTime — (Date)

          The time at which fast snapshot restores entered the disabling state.

        • DisabledTime — (Date)

          The time at which fast snapshot restores entered the disabled state.

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

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

Describes the events for the specified EC2 Fleet during the specified time.

EC2 Fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event. EC2 Fleet events are available for 48 hours.

For more information, see Monitor fleet events using Amazon EventBridge in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the describeFleetHistory operation

var params = {
  FleetId: 'STRING_VALUE', /* required */
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  DryRun: true || false,
  EventType: instance-change | fleet-change | service-error,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeFleetHistory(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.

    • EventType — (String)

      The type of events to describe. By default, all events are described.

      Possible values include:
      • "instance-change"
      • "fleet-change"
      • "service-error"
    • MaxResults — (Integer)

      The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

    • NextToken — (String)

      The token for the next set of results.

    • FleetId — (String)

      The ID of the EC2 Fleet.

    • StartTime — (Date)

      The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

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:

      • HistoryRecords — (Array<map>)

        Information about the events in the history of the EC2 Fleet.

        • EventInformation — (map)

          Information about the event.

          • EventDescription — (String)

            The description of the event.

          • EventSubType — (String)

            The event.

            error events:

            • iamFleetRoleInvalid - The EC2 Fleet or Spot Fleet does not have the required permissions either to launch or terminate an instance.

            • allLaunchSpecsTemporarilyBlacklisted - None of the configurations are valid, and several attempts to launch instances have failed. For more information, see the description of the event.

            • spotInstanceCountLimitExceeded - You've reached the limit on the number of Spot Instances that you can launch.

            • spotFleetRequestConfigurationInvalid - The configuration is not valid. For more information, see the description of the event.

            fleetRequestChange events:

            • active - The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to maintain the target number of running instances.

            • cancelled - The EC2 Fleet or Spot Fleet request is canceled and has no running instances. The EC2 Fleet or Spot Fleet will be deleted two days after its instances are terminated.

            • cancelled_running - The EC2 Fleet or Spot Fleet request is canceled and does not launch additional instances. Its existing instances continue to run until they are interrupted or terminated. The request remains in this state until all instances are interrupted or terminated.

            • cancelled_terminating - The EC2 Fleet or Spot Fleet request is canceled and its instances are terminating. The request remains in this state until all instances are terminated.

            • expired - The EC2 Fleet or Spot Fleet request has expired. If the request was created with TerminateInstancesWithExpiration set, a subsequent terminated event indicates that the instances are terminated.

            • modify_in_progress - The EC2 Fleet or Spot Fleet request is being modified. The request remains in this state until the modification is fully processed.

            • modify_succeeded - The EC2 Fleet or Spot Fleet request was modified.

            • submitted - The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to launch the target number of instances.

            • progress - The EC2 Fleet or Spot Fleet request is in the process of being fulfilled.

            instanceChange events:

            • launched - A new instance was launched.

            • terminated - An instance was terminated by the user.

            • termination_notified - An instance termination notification was sent when a Spot Instance was terminated by Amazon EC2 during scale-down, when the target capacity of the fleet was modified down, for example, from a target capacity of 4 to a target capacity of 3.

            Information events:

            • fleetProgressHalted - The price in every launch specification is not valid because it is below the Spot price (all the launch specifications have produced launchSpecUnusable events). A launch specification might become valid if the Spot price changes.

            • launchSpecTemporarilyBlacklisted - The configuration is not valid and several attempts to launch instances have failed. For more information, see the description of the event.

            • launchSpecUnusable - The price in a launch specification is not valid because it is below the Spot price.

            • registerWithLoadBalancersFailed - An attempt to register instances with load balancers failed. For more information, see the description of the event.

          • InstanceId — (String)

            The ID of the instance. This information is available only for instanceChange events.

        • EventType — (String)

          The event type.

          Possible values include:
          • "instance-change"
          • "fleet-change"
          • "service-error"
        • Timestamp — (Date)

          The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

      • LastEvaluatedTime — (Date)

        The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). All records up to this time were retrieved.

        If nextToken indicates that there are more results, this value is not present.

      • NextToken — (String)

        The token for the next set of results.

      • FleetId — (String)

        The ID of the EC Fleet.

      • StartTime — (Date)

        The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Returns:

  • (AWS.Request)

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

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

Describes the running instances for the specified EC2 Fleet.

For more information, see Monitoring your EC2 Fleet in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the describeFleetInstances operation

var params = {
  FleetId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeFleetInstances(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.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

    • NextToken — (String)

      The token for the next set of results.

    • FleetId — (String)

      The ID of the EC2 Fleet.

    • Filters — (Array<map>)

      The filters.

      • instance-type - The instance type.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

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

      • ActiveInstances — (Array<map>)

        The running instances. This list is refreshed periodically and might be out of date.

        • InstanceId — (String)

          The ID of the instance.

        • InstanceType — (String)

          The instance type.

        • SpotInstanceRequestId — (String)

          The ID of the Spot Instance request.

        • InstanceHealth — (String)

          The health status of the instance. If the status of either the instance status check or the system status check is impaired, the health status of the instance is unhealthy. Otherwise, the health status is healthy.

          Possible values include:
          • "healthy"
          • "unhealthy"
      • NextToken — (String)

        The token for the next set of results.

      • FleetId — (String)

        The ID of the EC2 Fleet.

Returns:

  • (AWS.Request)

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

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

Describes the specified EC2 Fleets or all of your EC2 Fleets.

For more information, see Monitoring your EC2 Fleet in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the describeFleets operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  FleetIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeFleets(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.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

    • NextToken — (String)

      The token for the next set of results.

    • FleetIds — (Array<String>)

      The ID of the EC2 Fleets.

    • Filters — (Array<map>)

      The filters.

      • activity-status - The progress of the EC2 Fleet ( error | pending-fulfillment | pending-termination | fulfilled).

      • excess-capacity-termination-policy - Indicates whether to terminate running instances if the target capacity is decreased below the current EC2 Fleet size (true | false).

      • fleet-state - The state of the EC2 Fleet (submitted | active | deleted | failed | deleted-running | deleted-terminating | modifying).

      • replace-unhealthy-instances - Indicates whether EC2 Fleet should replace unhealthy instances (true | false).

      • type - The type of request (instant | request | maintain).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 for the next set of results.

      • Fleets — (Array<map>)

        Information about the EC2 Fleets.

        • ActivityStatus — (String)

          The progress of the EC2 Fleet. If there is an error, the status is error. After all requests are placed, the status is pending_fulfillment. If the size of the EC2 Fleet is equal to or greater than its target capacity, the status is fulfilled. If the size of the EC2 Fleet is decreased, the status is pending_termination while instances are terminating.

          Possible values include:
          • "error"
          • "pending_fulfillment"
          • "pending_termination"
          • "fulfilled"
        • CreateTime — (Date)

          The creation date and time of the EC2 Fleet.

        • FleetId — (String)

          The ID of the EC2 Fleet.

        • FleetState — (String)

          The state of the EC2 Fleet.

          Possible values include:
          • "submitted"
          • "active"
          • "deleted"
          • "failed"
          • "deleted_running"
          • "deleted_terminating"
          • "modifying"
        • ClientToken — (String)

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

          Constraints: Maximum 64 ASCII characters

        • ExcessCapacityTerminationPolicy — (String)

          Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.

          Possible values include:
          • "no-termination"
          • "termination"
        • FulfilledCapacity — (Float)

          The number of units fulfilled by this request compared to the set target capacity.

        • FulfilledOnDemandCapacity — (Float)

          The number of units fulfilled by this request compared to the set target On-Demand capacity.

        • LaunchTemplateConfigs — (Array<map>)

          The launch template and overrides.

          • LaunchTemplateSpecification — (map)

            The launch template.

            • LaunchTemplateId — (String)

              The ID of the launch template. If you specify the template ID, you can't specify the template name.

            • LaunchTemplateName — (String)

              The name of the launch template. If you specify the template name, you can't specify the template ID.

            • Version — (String)

              The launch template version number, $Latest, or $Default. You must specify a value, otherwise the request fails.

              If the value is $Latest, Amazon EC2 uses the latest version of the launch template.

              If the value is $Default, Amazon EC2 uses the default version of the launch template.

          • Overrides — (Array<map>)

            Any parameters that you specify override the same parameters in the launch template.

            • InstanceType — (String)

              The instance type.

              Note: If you specify InstanceTypes, you can't specify InstanceRequirements.
              Possible values include:
              • "t1.micro"
              • "t2.nano"
              • "t2.micro"
              • "t2.small"
              • "t2.medium"
              • "t2.large"
              • "t2.xlarge"
              • "t2.2xlarge"
              • "t3.nano"
              • "t3.micro"
              • "t3.small"
              • "t3.medium"
              • "t3.large"
              • "t3.xlarge"
              • "t3.2xlarge"
              • "t3a.nano"
              • "t3a.micro"
              • "t3a.small"
              • "t3a.medium"
              • "t3a.large"
              • "t3a.xlarge"
              • "t3a.2xlarge"
              • "t4g.nano"
              • "t4g.micro"
              • "t4g.small"
              • "t4g.medium"
              • "t4g.large"
              • "t4g.xlarge"
              • "t4g.2xlarge"
              • "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"
              • "m4.16xlarge"
              • "m2.xlarge"
              • "m2.2xlarge"
              • "m2.4xlarge"
              • "cr1.8xlarge"
              • "r3.large"
              • "r3.xlarge"
              • "r3.2xlarge"
              • "r3.4xlarge"
              • "r3.8xlarge"
              • "r4.large"
              • "r4.xlarge"
              • "r4.2xlarge"
              • "r4.4xlarge"
              • "r4.8xlarge"
              • "r4.16xlarge"
              • "r5.large"
              • "r5.xlarge"
              • "r5.2xlarge"
              • "r5.4xlarge"
              • "r5.8xlarge"
              • "r5.12xlarge"
              • "r5.16xlarge"
              • "r5.24xlarge"
              • "r5.metal"
              • "r5a.large"
              • "r5a.xlarge"
              • "r5a.2xlarge"
              • "r5a.4xlarge"
              • "r5a.8xlarge"
              • "r5a.12xlarge"
              • "r5a.16xlarge"
              • "r5a.24xlarge"
              • "r5b.large"
              • "r5b.xlarge"
              • "r5b.2xlarge"
              • "r5b.4xlarge"
              • "r5b.8xlarge"
              • "r5b.12xlarge"
              • "r5b.16xlarge"
              • "r5b.24xlarge"
              • "r5b.metal"
              • "r5d.large"
              • "r5d.xlarge"
              • "r5d.2xlarge"
              • "r5d.4xlarge"
              • "r5d.8xlarge"
              • "r5d.12xlarge"
              • "r5d.16xlarge"
              • "r5d.24xlarge"
              • "r5d.metal"
              • "r5ad.large"
              • "r5ad.xlarge"
              • "r5ad.2xlarge"
              • "r5ad.4xlarge"
              • "r5ad.8xlarge"
              • "r5ad.12xlarge"
              • "r5ad.16xlarge"
              • "r5ad.24xlarge"
              • "r6g.metal"
              • "r6g.medium"
              • "r6g.large"
              • "r6g.xlarge"
              • "r6g.2xlarge"
              • "r6g.4xlarge"
              • "r6g.8xlarge"
              • "r6g.12xlarge"
              • "r6g.16xlarge"
              • "r6gd.metal"
              • "r6gd.medium"
              • "r6gd.large"
              • "r6gd.xlarge"
              • "r6gd.2xlarge"
              • "r6gd.4xlarge"
              • "r6gd.8xlarge"
              • "r6gd.12xlarge"
              • "r6gd.16xlarge"
              • "x1.16xlarge"
              • "x1.32xlarge"
              • "x1e.xlarge"
              • "x1e.2xlarge"
              • "x1e.4xlarge"
              • "x1e.8xlarge"
              • "x1e.16xlarge"
              • "x1e.32xlarge"
              • "i2.xlarge"
              • "i2.2xlarge"
              • "i2.4xlarge"
              • "i2.8xlarge"
              • "i3.large"
              • "i3.xlarge"
              • "i3.2xlarge"
              • "i3.4xlarge"
              • "i3.8xlarge"
              • "i3.16xlarge"
              • "i3.metal"
              • "i3en.large"
              • "i3en.xlarge"
              • "i3en.2xlarge"
              • "i3en.3xlarge"
              • "i3en.6xlarge"
              • "i3en.12xlarge"
              • "i3en.24xlarge"
              • "i3en.metal"
              • "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"
              • "c5.large"
              • "c5.xlarge"
              • "c5.2xlarge"
              • "c5.4xlarge"
              • "c5.9xlarge"
              • "c5.12xlarge"
              • "c5.18xlarge"
              • "c5.24xlarge"
              • "c5.metal"
              • "c5a.large"
              • "c5a.xlarge"
              • "c5a.2xlarge"
              • "c5a.4xlarge"
              • "c5a.8xlarge"
              • "c5a.12xlarge"
              • "c5a.16xlarge"
              • "c5a.24xlarge"
              • "c5ad.large"
              • "c5ad.xlarge"
              • "c5ad.2xlarge"
              • "c5ad.4xlarge"
              • "c5ad.8xlarge"
              • "c5ad.12xlarge"
              • "c5ad.16xlarge"
              • "c5ad.24xlarge"
              • "c5d.large"
              • "c5d.xlarge"
              • "c5d.2xlarge"
              • "c5d.4xlarge"
              • "c5d.9xlarge"
              • "c5d.12xlarge"
              • "c5d.18xlarge"
              • "c5d.24xlarge"
              • "c5d.metal"
              • "c5n.large"
              • "c5n.xlarge"
              • "c5n.2xlarge"
              • "c5n.4xlarge"
              • "c5n.9xlarge"
              • "c5n.18xlarge"
              • "c5n.metal"
              • "c6g.metal"
              • "c6g.medium"
              • "c6g.large"
              • "c6g.xlarge"
              • "c6g.2xlarge"
              • "c6g.4xlarge"
              • "c6g.8xlarge"
              • "c6g.12xlarge"
              • "c6g.16xlarge"
              • "c6gd.metal"
              • "c6gd.medium"
              • "c6gd.large"
              • "c6gd.xlarge"
              • "c6gd.2xlarge"
              • "c6gd.4xlarge"
              • "c6gd.8xlarge"
              • "c6gd.12xlarge"
              • "c6gd.16xlarge"
              • "c6gn.medium"
              • "c6gn.large"
              • "c6gn.xlarge"
              • "c6gn.2xlarge"
              • "c6gn.4xlarge"
              • "c6gn.8xlarge"
              • "c6gn.12xlarge"
              • "c6gn.16xlarge"
              • "cc1.4xlarge"
              • "cc2.8xlarge"
              • "g2.2xlarge"
              • "g2.8xlarge"
              • "g3.4xlarge"
              • "g3.8xlarge"
              • "g3.16xlarge"
              • "g3s.xlarge"
              • "g4ad.xlarge"
              • "g4ad.2xlarge"
              • "g4ad.4xlarge"
              • "g4ad.8xlarge"
              • "g4ad.16xlarge"
              • "g4dn.xlarge"
              • "g4dn.2xlarge"
              • "g4dn.4xlarge"
              • "g4dn.8xlarge"
              • "g4dn.12xlarge"
              • "g4dn.16xlarge"
              • "g4dn.metal"
              • "cg1.4xlarge"
              • "p2.xlarge"
              • "p2.8xlarge"
              • "p2.16xlarge"
              • "p3.2xlarge"
              • "p3.8xlarge"
              • "p3.16xlarge"
              • "p3dn.24xlarge"
              • "p4d.24xlarge"
              • "d2.xlarge"
              • "d2.2xlarge"
              • "d2.4xlarge"
              • "d2.8xlarge"
              • "d3.xlarge"
              • "d3.2xlarge"
              • "d3.4xlarge"
              • "d3.8xlarge"
              • "d3en.xlarge"
              • "d3en.2xlarge"
              • "d3en.4xlarge"
              • "d3en.6xlarge"
              • "d3en.8xlarge"
              • "d3en.12xlarge"
              • "dl1.24xlarge"
              • "f1.2xlarge"
              • "f1.4xlarge"
              • "f1.16xlarge"
              • "m5.large"
              • "m5.xlarge"
              • "m5.2xlarge"
              • "m5.4xlarge"
              • "m5.8xlarge"
              • "m5.12xlarge"
              • "m5.16xlarge"
              • "m5.24xlarge"
              • "m5.metal"
              • "m5a.large"
              • "m5a.xlarge"
              • "m5a.2xlarge"
              • "m5a.4xlarge"
              • "m5a.8xlarge"
              • "m5a.12xlarge"
              • "m5a.16xlarge"
              • "m5a.24xlarge"
              • "m5d.large"
              • "m5d.xlarge"
              • "m5d.2xlarge"
              • "m5d.4xlarge"
              • "m5d.8xlarge"
              • "m5d.12xlarge"
              • "m5d.16xlarge"
              • "m5d.24xlarge"
              • "m5d.metal"
              • "m5ad.large"
              • "m5ad.xlarge"
              • "m5ad.2xlarge"
              • "m5ad.4xlarge"
              • "m5ad.8xlarge"
              • "m5ad.12xlarge"
              • "m5ad.16xlarge"
              • "m5ad.24xlarge"
              • "m5zn.large"
              • "m5zn.xlarge"
              • "m5zn.2xlarge"
              • "m5zn.3xlarge"
              • "m5zn.6xlarge"
              • "m5zn.12xlarge"
              • "m5zn.metal"
              • "h1.2xlarge"
              • "h1.4xlarge"
              • "h1.8xlarge"
              • "h1.16xlarge"
              • "z1d.large"
              • "z1d.xlarge"
              • "z1d.2xlarge"
              • "z1d.3xlarge"
              • "z1d.6xlarge"
              • "z1d.12xlarge"
              • "z1d.metal"
              • "u-6tb1.56xlarge"
              • "u-6tb1.112xlarge"
              • "u-9tb1.112xlarge"
              • "u-12tb1.112xlarge"
              • "u-6tb1.metal"
              • "u-9tb1.metal"
              • "u-12tb1.metal"
              • "u-18tb1.metal"
              • "u-24tb1.metal"
              • "a1.medium"
              • "a1.large"
              • "a1.xlarge"
              • "a1.2xlarge"
              • "a1.4xlarge"
              • "a1.metal"
              • "m5dn.large"
              • "m5dn.xlarge"
              • "m5dn.2xlarge"
              • "m5dn.4xlarge"
              • "m5dn.8xlarge"
              • "m5dn.12xlarge"
              • "m5dn.16xlarge"
              • "m5dn.24xlarge"
              • "m5dn.metal"
              • "m5n.large"
              • "m5n.xlarge"
              • "m5n.2xlarge"
              • "m5n.4xlarge"
              • "m5n.8xlarge"
              • "m5n.12xlarge"
              • "m5n.16xlarge"
              • "m5n.24xlarge"
              • "m5n.metal"
              • "r5dn.large"
              • "r5dn.xlarge"
              • "r5dn.2xlarge"
              • "r5dn.4xlarge"
              • "r5dn.8xlarge"
              • "r5dn.12xlarge"
              • "r5dn.16xlarge"
              • "r5dn.24xlarge"
              • "r5dn.metal"
              • "r5n.large"
              • "r5n.xlarge"
              • "r5n.2xlarge"
              • "r5n.4xlarge"
              • "r5n.8xlarge"
              • "r5n.12xlarge"
              • "r5n.16xlarge"
              • "r5n.24xlarge"
              • "r5n.metal"
              • "inf1.xlarge"
              • "inf1.2xlarge"
              • "inf1.6xlarge"
              • "inf1.24xlarge"
              • "m6g.metal"
              • "m6g.medium"
              • "m6g.large"
              • "m6g.xlarge"
              • "m6g.2xlarge"
              • "m6g.4xlarge"
              • "m6g.8xlarge"
              • "m6g.12xlarge"
              • "m6g.16xlarge"
              • "m6gd.metal"
              • "m6gd.medium"
              • "m6gd.large"
              • "m6gd.xlarge"
              • "m6gd.2xlarge"
              • "m6gd.4xlarge"
              • "m6gd.8xlarge"
              • "m6gd.12xlarge"
              • "m6gd.16xlarge"
              • "m6i.large"
              • "m6i.xlarge"
              • "m6i.2xlarge"
              • "m6i.4xlarge"
              • "m6i.8xlarge"
              • "m6i.12xlarge"
              • "m6i.16xlarge"
              • "m6i.24xlarge"
              • "m6i.32xlarge"
              • "mac1.metal"
              • "x2gd.medium"
              • "x2gd.large"
              • "x2gd.xlarge"
              • "x2gd.2xlarge"
              • "x2gd.4xlarge"
              • "x2gd.8xlarge"
              • "x2gd.12xlarge"
              • "x2gd.16xlarge"
              • "x2gd.metal"
              • "vt1.3xlarge"
              • "vt1.6xlarge"
              • "vt1.24xlarge"
            • MaxPrice — (String)

              The maximum price per unit hour that you are willing to pay for a Spot Instance.

            • SubnetId — (String)

              The ID of the subnet in which to launch the instances.

            • AvailabilityZone — (String)

              The Availability Zone in which to launch the instances.

            • WeightedCapacity — (Float)

              The number of units provided by the specified instance type.

            • Priority — (Float)

              The priority for the launch template override. The highest priority is launched first.

              If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

              If the Spot AllocationStrategy is set to capacity-optimized-prioritized, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

              Valid values are whole numbers starting at 0. The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

            • Placement — (map)

              The location where the instance launched, if applicable.

              • GroupName — (String)

                The name of the placement group that the instance is in.

            • InstanceRequirements — (map)

              The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

              Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
              • VCpuCount — (map)

                The minimum and maximum number of vCPUs.

                • Min — (Integer)

                  The minimum number of vCPUs. If the value is 0, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

              • MemoryMiB — (map)

                The minimum and maximum amount of memory, in MiB.

                • Min — (Integer)

                  The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

              • CpuManufacturers — (Array<String>)

                The CPU manufacturers to include.

                • For instance types with Intel CPUs, specify intel.

                • For instance types with AMD CPUs, specify amd.

                • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

                Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                Default: Any manufacturer

              • MemoryGiBPerVCpu — (map)

                The minimum and maximum amount of memory per vCPU, in GiB.

                Default: No minimum or maximum limits

                • Min — (Float)

                  The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Float)

                  The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

              • ExcludedInstanceTypes — (Array<String>)

                The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

                For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                Default: No excluded instance types

              • InstanceGenerations — (Array<String>)

                Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

                For current generation instance types, specify current.

                For previous generation instance types, specify previous.

                Default: Current and previous generation instance types

              • SpotMaxPricePercentageOverLowestPrice — (Integer)

                The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999.

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                Default: 100

              • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

                The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999.

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                Default: 20

              • BareMetal — (String)

                Indicates whether bare metal instance types must be included, excluded, or required.

                • To include bare metal instance types, specify included.

                • To require only bare metal instance types, specify required.

                • To exclude bare metal instance types, specify excluded.

                Default: excluded

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • BurstablePerformance — (String)

                Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

                • To include burstable performance instance types, specify included.

                • To require only burstable performance instance types, specify required.

                • To exclude burstable performance instance types, specify excluded.

                Default: excluded

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • RequireHibernateSupport — (Boolean)

                Indicates whether instance types must support hibernation for On-Demand Instances.

                This parameter is not supported for GetSpotPlacementScores.

                Default: false

              • NetworkInterfaceCount — (map)

                The minimum and maximum number of network interfaces.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

              • LocalStorage — (String)

                Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

                • To include instance types with instance store volumes, specify included.

                • To require only instance types with instance store volumes, specify required.

                • To exclude instance types with instance store volumes, specify excluded.

                Default: included

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • LocalStorageTypes — (Array<String>)

                The type of local storage that is required.

                • For instance types with hard disk drive (HDD) storage, specify hdd.

                • For instance types with solid state drive (SDD) storage, specify sdd.

                Default: hdd and sdd

              • TotalLocalStorageGB — (map)

                The minimum and maximum amount of total local storage, in GB.

                Default: No minimum or maximum limits

                • Min — (Float)

                  The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                • Max — (Float)

                  The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

              • BaselineEbsBandwidthMbps — (map)

                The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

              • AcceleratorTypes — (Array<String>)

                The accelerator types that must be on the instance type.

                • For instance types with GPU accelerators, specify gpu.

                • For instance types with FPGA accelerators, specify fpga.

                • For instance types with inference accelerators, specify inference.

                Default: Any accelerator type

              • AcceleratorCount — (map)

                The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                To exclude accelerator-enabled instance types, set Max to 0.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

              • AcceleratorManufacturers — (Array<String>)

                Indicates whether instance types must have accelerators by specific manufacturers.

                • For instance types with NVIDIA devices, specify nvidia.

                • For instance types with AMD devices, specify amd.

                • For instance types with Amazon Web Services devices, specify amazon-web-services.

                • For instance types with Xilinx devices, specify xilinx.

                Default: Any manufacturer

              • AcceleratorNames — (Array<String>)

                The accelerators that must be on the instance type.

                • For instance types with NVIDIA A100 GPUs, specify a100.

                • For instance types with NVIDIA V100 GPUs, specify v100.

                • For instance types with NVIDIA K80 GPUs, specify k80.

                • For instance types with NVIDIA T4 GPUs, specify t4.

                • For instance types with NVIDIA M60 GPUs, specify m60.

                • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

                • For instance types with Xilinx VU9P FPGAs, specify vu9p.

                Default: Any accelerator

              • AcceleratorTotalMemoryMiB — (map)

                The minimum and maximum amount of total accelerator memory, in MiB.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

        • TargetCapacitySpecification — (map)

          The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.

          • TotalTargetCapacity — (Integer)

            The number of units to request, filled using DefaultTargetCapacityType.

          • OnDemandTargetCapacity — (Integer)

            The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units.

          • SpotTargetCapacity — (Integer)

            The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units.

          • DefaultTargetCapacityType — (String)

            The default TotalTargetCapacity, which is either Spot or On-Demand.

            Possible values include:
            • "spot"
            • "on-demand"
          • TargetCapacityUnitType — (String)

            The unit for the target capacity.

            Default: units (translates to number of instances)

            Possible values include:
            • "vcpu"
            • "memory-mib"
            • "units"
        • TerminateInstancesWithExpiration — (Boolean)

          Indicates whether running instances should be terminated when the EC2 Fleet expires.

        • Type — (String)

          The type of request. Indicates whether the EC2 Fleet only requests the target capacity, or also attempts to maintain it. If you request a certain target capacity, EC2 Fleet only places the required requests; it does not attempt to replenish instances if capacity is diminished, and it does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default: maintain.

          Possible values include:
          • "request"
          • "maintain"
          • "instant"
        • ValidFrom — (Date)

          The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.

        • ValidUntil — (Date)

          The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new instance requests are placed or able to fulfill the request. The default end date is 7 days from the current date.

        • ReplaceUnhealthyInstances — (Boolean)

          Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide.

        • SpotOptions — (map)

          The configuration of Spot Instances in an EC2 Fleet.

          • AllocationStrategy — (String)

            Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.

            If the allocation strategy is lowest-price, EC2 Fleet launches instances from the Spot Instance pools with the lowest price. This is the default allocation strategy.

            If the allocation strategy is diversified, EC2 Fleet launches instances from all of the Spot Instance pools that you specify.

            If the allocation strategy is capacity-optimized (recommended), EC2 Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacity-optimized-prioritized. Set a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides. You can assign the same priority to different LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacity-optimized-prioritized is supported only if your fleet uses a launch template. Note that if the On-Demand AllocationStrategy is set to prioritized, the same priority is applied when fulfilling On-Demand capacity.

            Possible values include:
            • "lowest-price"
            • "diversified"
            • "capacity-optimized"
            • "capacity-optimized-prioritized"
          • MaintenanceStrategies — (map)

            The strategies for managing your workloads on your Spot Instances that will be interrupted. Currently only the capacity rebalance strategy is available.

            • CapacityRebalance — (map)

              The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.

              • ReplacementStrategy — (String)

                The replacement strategy to use. Only available for fleets of type maintain.

                launch - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.

                launch-before-terminate - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in TerminationDelay), terminates the instances that received a rebalance notification.

                Possible values include:
                • "launch"
                • "launch-before-terminate"
              • TerminationDelay — (Integer)

                The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.

          • InstanceInterruptionBehavior — (String)

            The behavior when a Spot Instance is interrupted. The default is terminate.

            Possible values include:
            • "hibernate"
            • "stop"
            • "terminate"
          • InstancePoolsToUseCount — (Integer)

            The number of Spot pools across which to allocate your target Spot capacity. Valid only when AllocationStrategy is set to lowest-price. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

            Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.

          • SingleInstanceType — (Boolean)

            Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet. Supported only for fleets of type instant.

          • SingleAvailabilityZone — (Boolean)

            Indicates that the fleet launches all Spot Instances into a single Availability Zone. Supported only for fleets of type instant.

          • MinTargetCapacity — (Integer)

            The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.

          • MaxTotalPrice — (String)

            The maximum amount per hour for Spot Instances that you're willing to pay.

        • OnDemandOptions — (map)

          The allocation strategy of On-Demand Instances in an EC2 Fleet.

          • AllocationStrategy — (String)

            The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify lowest-price, EC2 Fleet uses price to determine the order, launching the lowest price first. If you specify prioritized, EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first. If you do not specify a value, EC2 Fleet defaults to lowest-price.

            Possible values include:
            • "lowest-price"
            • "prioritized"
          • CapacityReservationOptions — (map)

            The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity. Supported only for fleets of type instant.

            • UsageStrategy — (String)

              Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

              If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (lowest-price or prioritized) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (lowest-price or prioritized).

              If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.

              Possible values include:
              • "use-capacity-reservations-first"
          • SingleInstanceType — (Boolean)

            Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet. Supported only for fleets of type instant.

          • SingleAvailabilityZone — (Boolean)

            Indicates that the fleet launches all On-Demand Instances into a single Availability Zone. Supported only for fleets of type instant.

          • MinTargetCapacity — (Integer)

            The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.

          • MaxTotalPrice — (String)

            The maximum amount per hour for On-Demand Instances that you're willing to pay.

        • Tags — (Array<map>)

          The tags for an EC2 Fleet 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.

        • Errors — (Array<map>)

          Information about the instances that could not be launched by the fleet. Valid only when Type is set to instant.

          • LaunchTemplateAndOverrides — (map)

            The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.

            • LaunchTemplateSpecification — (map)

              The launch template.

              • LaunchTemplateId — (String)

                The ID of the launch template. If you specify the template ID, you can't specify the template name.

              • LaunchTemplateName — (String)

                The name of the launch template. If you specify the template name, you can't specify the template ID.

              • Version — (String)

                The launch template version number, $Latest, or $Default. You must specify a value, otherwise the request fails.

                If the value is $Latest, Amazon EC2 uses the latest version of the launch template.

                If the value is $Default, Amazon EC2 uses the default version of the launch template.

            • Overrides — (map)

              Any parameters that you specify override the same parameters in the launch template.

              • InstanceType — (String)

                The instance type.

                Note: If you specify InstanceTypes, you can't specify InstanceRequirements.
                Possible values include:
                • "t1.micro"
                • "t2.nano"
                • "t2.micro"
                • "t2.small"
                • "t2.medium"
                • "t2.large"
                • "t2.xlarge"
                • "t2.2xlarge"
                • "t3.nano"
                • "t3.micro"
                • "t3.small"
                • "t3.medium"
                • "t3.large"
                • "t3.xlarge"
                • "t3.2xlarge"
                • "t3a.nano"
                • "t3a.micro"
                • "t3a.small"
                • "t3a.medium"
                • "t3a.large"
                • "t3a.xlarge"
                • "t3a.2xlarge"
                • "t4g.nano"
                • "t4g.micro"
                • "t4g.small"
                • "t4g.medium"
                • "t4g.large"
                • "t4g.xlarge"
                • "t4g.2xlarge"
                • "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"
                • "m4.16xlarge"
                • "m2.xlarge"
                • "m2.2xlarge"
                • "m2.4xlarge"
                • "cr1.8xlarge"
                • "r3.large"
                • "r3.xlarge"
                • "r3.2xlarge"
                • "r3.4xlarge"
                • "r3.8xlarge"
                • "r4.large"
                • "r4.xlarge"
                • "r4.2xlarge"
                • "r4.4xlarge"
                • "r4.8xlarge"
                • "r4.16xlarge"
                • "r5.large"
                • "r5.xlarge"
                • "r5.2xlarge"
                • "r5.4xlarge"
                • "r5.8xlarge"
                • "r5.12xlarge"
                • "r5.16xlarge"
                • "r5.24xlarge"
                • "r5.metal"
                • "r5a.large"
                • "r5a.xlarge"
                • "r5a.2xlarge"
                • "r5a.4xlarge"
                • "r5a.8xlarge"
                • "r5a.12xlarge"
                • "r5a.16xlarge"
                • "r5a.24xlarge"
                • "r5b.large"
                • "r5b.xlarge"
                • "r5b.2xlarge"
                • "r5b.4xlarge"
                • "r5b.8xlarge"
                • "r5b.12xlarge"
                • "r5b.16xlarge"
                • "r5b.24xlarge"
                • "r5b.metal"
                • "r5d.large"
                • "r5d.xlarge"
                • "r5d.2xlarge"
                • "r5d.4xlarge"
                • "r5d.8xlarge"
                • "r5d.12xlarge"
                • "r5d.16xlarge"
                • "r5d.24xlarge"
                • "r5d.metal"
                • "r5ad.large"
                • "r5ad.xlarge"
                • "r5ad.2xlarge"
                • "r5ad.4xlarge"
                • "r5ad.8xlarge"
                • "r5ad.12xlarge"
                • "r5ad.16xlarge"
                • "r5ad.24xlarge"
                • "r6g.metal"
                • "r6g.medium"
                • "r6g.large"
                • "r6g.xlarge"
                • "r6g.2xlarge"
                • "r6g.4xlarge"
                • "r6g.8xlarge"
                • "r6g.12xlarge"
                • "r6g.16xlarge"
                • "r6gd.metal"
                • "r6gd.medium"
                • "r6gd.large"
                • "r6gd.xlarge"
                • "r6gd.2xlarge"
                • "r6gd.4xlarge"
                • "r6gd.8xlarge"
                • "r6gd.12xlarge"
                • "r6gd.16xlarge"
                • "x1.16xlarge"
                • "x1.32xlarge"
                • "x1e.xlarge"
                • "x1e.2xlarge"
                • "x1e.4xlarge"
                • "x1e.8xlarge"
                • "x1e.16xlarge"
                • "x1e.32xlarge"
                • "i2.xlarge"
                • "i2.2xlarge"
                • "i2.4xlarge"
                • "i2.8xlarge"
                • "i3.large"
                • "i3.xlarge"
                • "i3.2xlarge"
                • "i3.4xlarge"
                • "i3.8xlarge"
                • "i3.16xlarge"
                • "i3.metal"
                • "i3en.large"
                • "i3en.xlarge"
                • "i3en.2xlarge"
                • "i3en.3xlarge"
                • "i3en.6xlarge"
                • "i3en.12xlarge"
                • "i3en.24xlarge"
                • "i3en.metal"
                • "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"
                • "c5.large"
                • "c5.xlarge"
                • "c5.2xlarge"
                • "c5.4xlarge"
                • "c5.9xlarge"
                • "c5.12xlarge"
                • "c5.18xlarge"
                • "c5.24xlarge"
                • "c5.metal"
                • "c5a.large"
                • "c5a.xlarge"
                • "c5a.2xlarge"
                • "c5a.4xlarge"
                • "c5a.8xlarge"
                • "c5a.12xlarge"
                • "c5a.16xlarge"
                • "c5a.24xlarge"
                • "c5ad.large"
                • "c5ad.xlarge"
                • "c5ad.2xlarge"
                • "c5ad.4xlarge"
                • "c5ad.8xlarge"
                • "c5ad.12xlarge"
                • "c5ad.16xlarge"
                • "c5ad.24xlarge"
                • "c5d.large"
                • "c5d.xlarge"
                • "c5d.2xlarge"
                • "c5d.4xlarge"
                • "c5d.9xlarge"
                • "c5d.12xlarge"
                • "c5d.18xlarge"
                • "c5d.24xlarge"
                • "c5d.metal"
                • "c5n.large"
                • "c5n.xlarge"
                • "c5n.2xlarge"
                • "c5n.4xlarge"
                • "c5n.9xlarge"
                • "c5n.18xlarge"
                • "c5n.metal"
                • "c6g.metal"
                • "c6g.medium"
                • "c6g.large"
                • "c6g.xlarge"
                • "c6g.2xlarge"
                • "c6g.4xlarge"
                • "c6g.8xlarge"
                • "c6g.12xlarge"
                • "c6g.16xlarge"
                • "c6gd.metal"
                • "c6gd.medium"
                • "c6gd.large"
                • "c6gd.xlarge"
                • "c6gd.2xlarge"
                • "c6gd.4xlarge"
                • "c6gd.8xlarge"
                • "c6gd.12xlarge"
                • "c6gd.16xlarge"
                • "c6gn.medium"
                • "c6gn.large"
                • "c6gn.xlarge"
                • "c6gn.2xlarge"
                • "c6gn.4xlarge"
                • "c6gn.8xlarge"
                • "c6gn.12xlarge"
                • "c6gn.16xlarge"
                • "cc1.4xlarge"
                • "cc2.8xlarge"
                • "g2.2xlarge"
                • "g2.8xlarge"
                • "g3.4xlarge"
                • "g3.8xlarge"
                • "g3.16xlarge"
                • "g3s.xlarge"
                • "g4ad.xlarge"
                • "g4ad.2xlarge"
                • "g4ad.4xlarge"
                • "g4ad.8xlarge"
                • "g4ad.16xlarge"
                • "g4dn.xlarge"
                • "g4dn.2xlarge"
                • "g4dn.4xlarge"
                • "g4dn.8xlarge"
                • "g4dn.12xlarge"
                • "g4dn.16xlarge"
                • "g4dn.metal"
                • "cg1.4xlarge"
                • "p2.xlarge"
                • "p2.8xlarge"
                • "p2.16xlarge"
                • "p3.2xlarge"
                • "p3.8xlarge"
                • "p3.16xlarge"
                • "p3dn.24xlarge"
                • "p4d.24xlarge"
                • "d2.xlarge"
                • "d2.2xlarge"
                • "d2.4xlarge"
                • "d2.8xlarge"
                • "d3.xlarge"
                • "d3.2xlarge"
                • "d3.4xlarge"
                • "d3.8xlarge"
                • "d3en.xlarge"
                • "d3en.2xlarge"
                • "d3en.4xlarge"
                • "d3en.6xlarge"
                • "d3en.8xlarge"
                • "d3en.12xlarge"
                • "dl1.24xlarge"
                • "f1.2xlarge"
                • "f1.4xlarge"
                • "f1.16xlarge"
                • "m5.large"
                • "m5.xlarge"
                • "m5.2xlarge"
                • "m5.4xlarge"
                • "m5.8xlarge"
                • "m5.12xlarge"
                • "m5.16xlarge"
                • "m5.24xlarge"
                • "m5.metal"
                • "m5a.large"
                • "m5a.xlarge"
                • "m5a.2xlarge"
                • "m5a.4xlarge"
                • "m5a.8xlarge"
                • "m5a.12xlarge"
                • "m5a.16xlarge"
                • "m5a.24xlarge"
                • "m5d.large"
                • "m5d.xlarge"
                • "m5d.2xlarge"
                • "m5d.4xlarge"
                • "m5d.8xlarge"
                • "m5d.12xlarge"
                • "m5d.16xlarge"
                • "m5d.24xlarge"
                • "m5d.metal"
                • "m5ad.large"
                • "m5ad.xlarge"
                • "m5ad.2xlarge"
                • "m5ad.4xlarge"
                • "m5ad.8xlarge"
                • "m5ad.12xlarge"
                • "m5ad.16xlarge"
                • "m5ad.24xlarge"
                • "m5zn.large"
                • "m5zn.xlarge"
                • "m5zn.2xlarge"
                • "m5zn.3xlarge"
                • "m5zn.6xlarge"
                • "m5zn.12xlarge"
                • "m5zn.metal"
                • "h1.2xlarge"
                • "h1.4xlarge"
                • "h1.8xlarge"
                • "h1.16xlarge"
                • "z1d.large"
                • "z1d.xlarge"
                • "z1d.2xlarge"
                • "z1d.3xlarge"
                • "z1d.6xlarge"
                • "z1d.12xlarge"
                • "z1d.metal"
                • "u-6tb1.56xlarge"
                • "u-6tb1.112xlarge"
                • "u-9tb1.112xlarge"
                • "u-12tb1.112xlarge"
                • "u-6tb1.metal"
                • "u-9tb1.metal"
                • "u-12tb1.metal"
                • "u-18tb1.metal"
                • "u-24tb1.metal"
                • "a1.medium"
                • "a1.large"
                • "a1.xlarge"
                • "a1.2xlarge"
                • "a1.4xlarge"
                • "a1.metal"
                • "m5dn.large"
                • "m5dn.xlarge"
                • "m5dn.2xlarge"
                • "m5dn.4xlarge"
                • "m5dn.8xlarge"
                • "m5dn.12xlarge"
                • "m5dn.16xlarge"
                • "m5dn.24xlarge"
                • "m5dn.metal"
                • "m5n.large"
                • "m5n.xlarge"
                • "m5n.2xlarge"
                • "m5n.4xlarge"
                • "m5n.8xlarge"
                • "m5n.12xlarge"
                • "m5n.16xlarge"
                • "m5n.24xlarge"
                • "m5n.metal"
                • "r5dn.large"
                • "r5dn.xlarge"
                • "r5dn.2xlarge"
                • "r5dn.4xlarge"
                • "r5dn.8xlarge"
                • "r5dn.12xlarge"
                • "r5dn.16xlarge"
                • "r5dn.24xlarge"
                • "r5dn.metal"
                • "r5n.large"
                • "r5n.xlarge"
                • "r5n.2xlarge"
                • "r5n.4xlarge"
                • "r5n.8xlarge"
                • "r5n.12xlarge"
                • "r5n.16xlarge"
                • "r5n.24xlarge"
                • "r5n.metal"
                • "inf1.xlarge"
                • "inf1.2xlarge"
                • "inf1.6xlarge"
                • "inf1.24xlarge"
                • "m6g.metal"
                • "m6g.medium"
                • "m6g.large"
                • "m6g.xlarge"
                • "m6g.2xlarge"
                • "m6g.4xlarge"
                • "m6g.8xlarge"
                • "m6g.12xlarge"
                • "m6g.16xlarge"
                • "m6gd.metal"
                • "m6gd.medium"
                • "m6gd.large"
                • "m6gd.xlarge"
                • "m6gd.2xlarge"
                • "m6gd.4xlarge"
                • "m6gd.8xlarge"
                • "m6gd.12xlarge"
                • "m6gd.16xlarge"
                • "m6i.large"
                • "m6i.xlarge"
                • "m6i.2xlarge"
                • "m6i.4xlarge"
                • "m6i.8xlarge"
                • "m6i.12xlarge"
                • "m6i.16xlarge"
                • "m6i.24xlarge"
                • "m6i.32xlarge"
                • "mac1.metal"
                • "x2gd.medium"
                • "x2gd.large"
                • "x2gd.xlarge"
                • "x2gd.2xlarge"
                • "x2gd.4xlarge"
                • "x2gd.8xlarge"
                • "x2gd.12xlarge"
                • "x2gd.16xlarge"
                • "x2gd.metal"
                • "vt1.3xlarge"
                • "vt1.6xlarge"
                • "vt1.24xlarge"
              • MaxPrice — (String)

                The maximum price per unit hour that you are willing to pay for a Spot Instance.

              • SubnetId — (String)

                The ID of the subnet in which to launch the instances.

              • AvailabilityZone — (String)

                The Availability Zone in which to launch the instances.

              • WeightedCapacity — (Float)

                The number of units provided by the specified instance type.

              • Priority — (Float)

                The priority for the launch template override. The highest priority is launched first.

                If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

                If the Spot AllocationStrategy is set to capacity-optimized-prioritized, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

                Valid values are whole numbers starting at 0. The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

              • Placement — (map)

                The location where the instance launched, if applicable.

                • GroupName — (String)

                  The name of the placement group that the instance is in.

              • InstanceRequirements — (map)

                The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

                Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
                • VCpuCount — (map)

                  The minimum and maximum number of vCPUs.

                  • Min — (Integer)

                    The minimum number of vCPUs. If the value is 0, there is no minimum limit.

                  • Max — (Integer)

                    The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                • MemoryMiB — (map)

                  The minimum and maximum amount of memory, in MiB.

                  • Min — (Integer)

                    The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                • CpuManufacturers — (Array<String>)

                  The CPU manufacturers to include.

                  • For instance types with Intel CPUs, specify intel.

                  • For instance types with AMD CPUs, specify amd.

                  • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

                  Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                  Default: Any manufacturer

                • MemoryGiBPerVCpu — (map)

                  The minimum and maximum amount of memory per vCPU, in GiB.

                  Default: No minimum or maximum limits

                  • Min — (Float)

                    The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Float)

                    The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                • ExcludedInstanceTypes — (Array<String>)

                  The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

                  For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                  Default: No excluded instance types

                • InstanceGenerations — (Array<String>)

                  Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

                  For current generation instance types, specify current.

                  For previous generation instance types, specify previous.

                  Default: Current and previous generation instance types

                • SpotMaxPricePercentageOverLowestPrice — (Integer)

                  The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                  The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                  To turn off price protection, specify a high value, such as 999999.

                  This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                  Default: 100

                • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

                  The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                  The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                  To turn off price protection, specify a high value, such as 999999.

                  This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                  Default: 20

                • BareMetal — (String)

                  Indicates whether bare metal instance types must be included, excluded, or required.

                  • To include bare metal instance types, specify included.

                  • To require only bare metal instance types, specify required.

                  • To exclude bare metal instance types, specify excluded.

                  Default: excluded

                  Possible values include:
                  • "included"
                  • "required"
                  • "excluded"
                • BurstablePerformance — (String)

                  Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

                  • To include burstable performance instance types, specify included.

                  • To require only burstable performance instance types, specify required.

                  • To exclude burstable performance instance types, specify excluded.

                  Default: excluded

                  Possible values include:
                  • "included"
                  • "required"
                  • "excluded"
                • RequireHibernateSupport — (Boolean)

                  Indicates whether instance types must support hibernation for On-Demand Instances.

                  This parameter is not supported for GetSpotPlacementScores.

                  Default: false

                • NetworkInterfaceCount — (map)

                  The minimum and maximum number of network interfaces.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                • LocalStorage — (String)

                  Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

                  • To include instance types with instance store volumes, specify included.

                  • To require only instance types with instance store volumes, specify required.

                  • To exclude instance types with instance store volumes, specify excluded.

                  Default: included

                  Possible values include:
                  • "included"
                  • "required"
                  • "excluded"
                • LocalStorageTypes — (Array<String>)

                  The type of local storage that is required.

                  • For instance types with hard disk drive (HDD) storage, specify hdd.

                  • For instance types with solid state drive (SDD) storage, specify sdd.

                  Default: hdd and sdd

                • TotalLocalStorageGB — (map)

                  The minimum and maximum amount of total local storage, in GB.

                  Default: No minimum or maximum limits

                  • Min — (Float)

                    The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Float)

                    The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                • BaselineEbsBandwidthMbps — (map)

                  The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                • AcceleratorTypes — (Array<String>)

                  The accelerator types that must be on the instance type.

                  • For instance types with GPU accelerators, specify gpu.

                  • For instance types with FPGA accelerators, specify fpga.

                  • For instance types with inference accelerators, specify inference.

                  Default: Any accelerator type

                • AcceleratorCount — (map)

                  The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                  To exclude accelerator-enabled instance types, set Max to 0.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                • AcceleratorManufacturers — (Array<String>)

                  Indicates whether instance types must have accelerators by specific manufacturers.

                  • For instance types with NVIDIA devices, specify nvidia.

                  • For instance types with AMD devices, specify amd.

                  • For instance types with Amazon Web Services devices, specify amazon-web-services.

                  • For instance types with Xilinx devices, specify xilinx.

                  Default: Any manufacturer

                • AcceleratorNames — (Array<String>)

                  The accelerators that must be on the instance type.

                  • For instance types with NVIDIA A100 GPUs, specify a100.

                  • For instance types with NVIDIA V100 GPUs, specify v100.

                  • For instance types with NVIDIA K80 GPUs, specify k80.

                  • For instance types with NVIDIA T4 GPUs, specify t4.

                  • For instance types with NVIDIA M60 GPUs, specify m60.

                  • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

                  • For instance types with Xilinx VU9P FPGAs, specify vu9p.

                  Default: Any accelerator

                • AcceleratorTotalMemoryMiB — (map)

                  The minimum and maximum amount of total accelerator memory, in MiB.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • Lifecycle — (String)

            Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.

            Possible values include:
            • "spot"
            • "on-demand"
          • ErrorCode — (String)

            The error code that indicates why the instance could not be launched. For more information about error codes, see Error Codes.

          • ErrorMessage — (String)

            The error message that describes why the instance could not be launched. For more information about error messages, see Error Codes.

        • Instances — (Array<map>)

          Information about the instances that were launched by the fleet. Valid only when Type is set to instant.

          • LaunchTemplateAndOverrides — (map)

            The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.

            • LaunchTemplateSpecification — (map)

              The launch template.

              • LaunchTemplateId — (String)

                The ID of the launch template. If you specify the template ID, you can't specify the template name.

              • LaunchTemplateName — (String)

                The name of the launch template. If you specify the template name, you can't specify the template ID.

              • Version — (String)

                The launch template version number, $Latest, or $Default. You must specify a value, otherwise the request fails.

                If the value is $Latest, Amazon EC2 uses the latest version of the launch template.

                If the value is $Default, Amazon EC2 uses the default version of the launch template.

            • Overrides — (map)

              Any parameters that you specify override the same parameters in the launch template.

              • InstanceType — (String)

                The instance type.

                Note: If you specify InstanceTypes, you can't specify InstanceRequirements.
                Possible values include:
                • "t1.micro"
                • "t2.nano"
                • "t2.micro"
                • "t2.small"
                • "t2.medium"
                • "t2.large"
                • "t2.xlarge"
                • "t2.2xlarge"
                • "t3.nano"
                • "t3.micro"
                • "t3.small"
                • "t3.medium"
                • "t3.large"
                • "t3.xlarge"
                • "t3.2xlarge"
                • "t3a.nano"
                • "t3a.micro"
                • "t3a.small"
                • "t3a.medium"
                • "t3a.large"
                • "t3a.xlarge"
                • "t3a.2xlarge"
                • "t4g.nano"
                • "t4g.micro"
                • "t4g.small"
                • "t4g.medium"
                • "t4g.large"
                • "t4g.xlarge"
                • "t4g.2xlarge"
                • "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"
                • "m4.16xlarge"
                • "m2.xlarge"
                • "m2.2xlarge"
                • "m2.4xlarge"
                • "cr1.8xlarge"
                • "r3.large"
                • "r3.xlarge"
                • "r3.2xlarge"
                • "r3.4xlarge"
                • "r3.8xlarge"
                • "r4.large"
                • "r4.xlarge"
                • "r4.2xlarge"
                • "r4.4xlarge"
                • "r4.8xlarge"
                • "r4.16xlarge"
                • "r5.large"
                • "r5.xlarge"
                • "r5.2xlarge"
                • "r5.4xlarge"
                • "r5.8xlarge"
                • "r5.12xlarge"
                • "r5.16xlarge"
                • "r5.24xlarge"
                • "r5.metal"
                • "r5a.large"
                • "r5a.xlarge"
                • "r5a.2xlarge"
                • "r5a.4xlarge"
                • "r5a.8xlarge"
                • "r5a.12xlarge"
                • "r5a.16xlarge"
                • "r5a.24xlarge"
                • "r5b.large"
                • "r5b.xlarge"
                • "r5b.2xlarge"
                • "r5b.4xlarge"
                • "r5b.8xlarge"
                • "r5b.12xlarge"
                • "r5b.16xlarge"
                • "r5b.24xlarge"
                • "r5b.metal"
                • "r5d.large"
                • "r5d.xlarge"
                • "r5d.2xlarge"
                • "r5d.4xlarge"
                • "r5d.8xlarge"
                • "r5d.12xlarge"
                • "r5d.16xlarge"
                • "r5d.24xlarge"
                • "r5d.metal"
                • "r5ad.large"
                • "r5ad.xlarge"
                • "r5ad.2xlarge"
                • "r5ad.4xlarge"
                • "r5ad.8xlarge"
                • "r5ad.12xlarge"
                • "r5ad.16xlarge"
                • "r5ad.24xlarge"
                • "r6g.metal"
                • "r6g.medium"
                • "r6g.large"
                • "r6g.xlarge"
                • "r6g.2xlarge"
                • "r6g.4xlarge"
                • "r6g.8xlarge"
                • "r6g.12xlarge"
                • "r6g.16xlarge"
                • "r6gd.metal"
                • "r6gd.medium"
                • "r6gd.large"
                • "r6gd.xlarge"
                • "r6gd.2xlarge"
                • "r6gd.4xlarge"
                • "r6gd.8xlarge"
                • "r6gd.12xlarge"
                • "r6gd.16xlarge"
                • "x1.16xlarge"
                • "x1.32xlarge"
                • "x1e.xlarge"
                • "x1e.2xlarge"
                • "x1e.4xlarge"
                • "x1e.8xlarge"
                • "x1e.16xlarge"
                • "x1e.32xlarge"
                • "i2.xlarge"
                • "i2.2xlarge"
                • "i2.4xlarge"
                • "i2.8xlarge"
                • "i3.large"
                • "i3.xlarge"
                • "i3.2xlarge"
                • "i3.4xlarge"
                • "i3.8xlarge"
                • "i3.16xlarge"
                • "i3.metal"
                • "i3en.large"
                • "i3en.xlarge"
                • "i3en.2xlarge"
                • "i3en.3xlarge"
                • "i3en.6xlarge"
                • "i3en.12xlarge"
                • "i3en.24xlarge"
                • "i3en.metal"
                • "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"
                • "c5.large"
                • "c5.xlarge"
                • "c5.2xlarge"
                • "c5.4xlarge"
                • "c5.9xlarge"
                • "c5.12xlarge"
                • "c5.18xlarge"
                • "c5.24xlarge"
                • "c5.metal"
                • "c5a.large"
                • "c5a.xlarge"
                • "c5a.2xlarge"
                • "c5a.4xlarge"
                • "c5a.8xlarge"
                • "c5a.12xlarge"
                • "c5a.16xlarge"
                • "c5a.24xlarge"
                • "c5ad.large"
                • "c5ad.xlarge"
                • "c5ad.2xlarge"
                • "c5ad.4xlarge"
                • "c5ad.8xlarge"
                • "c5ad.12xlarge"
                • "c5ad.16xlarge"
                • "c5ad.24xlarge"
                • "c5d.large"
                • "c5d.xlarge"
                • "c5d.2xlarge"
                • "c5d.4xlarge"
                • "c5d.9xlarge"
                • "c5d.12xlarge"
                • "c5d.18xlarge"
                • "c5d.24xlarge"
                • "c5d.metal"
                • "c5n.large"
                • "c5n.xlarge"
                • "c5n.2xlarge"
                • "c5n.4xlarge"
                • "c5n.9xlarge"
                • "c5n.18xlarge"
                • "c5n.metal"
                • "c6g.metal"
                • "c6g.medium"
                • "c6g.large"
                • "c6g.xlarge"
                • "c6g.2xlarge"
                • "c6g.4xlarge"
                • "c6g.8xlarge"
                • "c6g.12xlarge"
                • "c6g.16xlarge"
                • "c6gd.metal"
                • "c6gd.medium"
                • "c6gd.large"
                • "c6gd.xlarge"
                • "c6gd.2xlarge"
                • "c6gd.4xlarge"
                • "c6gd.8xlarge"
                • "c6gd.12xlarge"
                • "c6gd.16xlarge"
                • "c6gn.medium"
                • "c6gn.large"
                • "c6gn.xlarge"
                • "c6gn.2xlarge"
                • "c6gn.4xlarge"
                • "c6gn.8xlarge"
                • "c6gn.12xlarge"
                • "c6gn.16xlarge"
                • "cc1.4xlarge"
                • "cc2.8xlarge"
                • "g2.2xlarge"
                • "g2.8xlarge"
                • "g3.4xlarge"
                • "g3.8xlarge"
                • "g3.16xlarge"
                • "g3s.xlarge"
                • "g4ad.xlarge"
                • "g4ad.2xlarge"
                • "g4ad.4xlarge"
                • "g4ad.8xlarge"
                • "g4ad.16xlarge"
                • "g4dn.xlarge"
                • "g4dn.2xlarge"
                • "g4dn.4xlarge"
                • "g4dn.8xlarge"
                • "g4dn.12xlarge"
                • "g4dn.16xlarge"
                • "g4dn.metal"
                • "cg1.4xlarge"
                • "p2.xlarge"
                • "p2.8xlarge"
                • "p2.16xlarge"
                • "p3.2xlarge"
                • "p3.8xlarge"
                • "p3.16xlarge"
                • "p3dn.24xlarge"
                • "p4d.24xlarge"
                • "d2.xlarge"
                • "d2.2xlarge"
                • "d2.4xlarge"
                • "d2.8xlarge"
                • "d3.xlarge"
                • "d3.2xlarge"
                • "d3.4xlarge"
                • "d3.8xlarge"
                • "d3en.xlarge"
                • "d3en.2xlarge"
                • "d3en.4xlarge"
                • "d3en.6xlarge"
                • "d3en.8xlarge"
                • "d3en.12xlarge"
                • "dl1.24xlarge"
                • "f1.2xlarge"
                • "f1.4xlarge"
                • "f1.16xlarge"
                • "m5.large"
                • "m5.xlarge"
                • "m5.2xlarge"
                • "m5.4xlarge"
                • "m5.8xlarge"
                • "m5.12xlarge"
                • "m5.16xlarge"
                • "m5.24xlarge"
                • "m5.metal"
                • "m5a.large"
                • "m5a.xlarge"
                • "m5a.2xlarge"
                • "m5a.4xlarge"
                • "m5a.8xlarge"
                • "m5a.12xlarge"
                • "m5a.16xlarge"
                • "m5a.24xlarge"
                • "m5d.large"
                • "m5d.xlarge"
                • "m5d.2xlarge"
                • "m5d.4xlarge"
                • "m5d.8xlarge"
                • "m5d.12xlarge"
                • "m5d.16xlarge"
                • "m5d.24xlarge"
                • "m5d.metal"
                • "m5ad.large"
                • "m5ad.xlarge"
                • "m5ad.2xlarge"
                • "m5ad.4xlarge"
                • "m5ad.8xlarge"
                • "m5ad.12xlarge"
                • "m5ad.16xlarge"
                • "m5ad.24xlarge"
                • "m5zn.large"
                • "m5zn.xlarge"
                • "m5zn.2xlarge"
                • "m5zn.3xlarge"
                • "m5zn.6xlarge"
                • "m5zn.12xlarge"
                • "m5zn.metal"
                • "h1.2xlarge"
                • "h1.4xlarge"
                • "h1.8xlarge"
                • "h1.16xlarge"
                • "z1d.large"
                • "z1d.xlarge"
                • "z1d.2xlarge"
                • "z1d.3xlarge"
                • "z1d.6xlarge"
                • "z1d.12xlarge"
                • "z1d.metal"
                • "u-6tb1.56xlarge"
                • "u-6tb1.112xlarge"
                • "u-9tb1.112xlarge"
                • "u-12tb1.112xlarge"
                • "u-6tb1.metal"
                • "u-9tb1.metal"
                • "u-12tb1.metal"
                • "u-18tb1.metal"
                • "u-24tb1.metal"
                • "a1.medium"
                • "a1.large"
                • "a1.xlarge"
                • "a1.2xlarge"
                • "a1.4xlarge"
                • "a1.metal"
                • "m5dn.large"
                • "m5dn.xlarge"
                • "m5dn.2xlarge"
                • "m5dn.4xlarge"
                • "m5dn.8xlarge"
                • "m5dn.12xlarge"
                • "m5dn.16xlarge"
                • "m5dn.24xlarge"
                • "m5dn.metal"
                • "m5n.large"
                • "m5n.xlarge"
                • "m5n.2xlarge"
                • "m5n.4xlarge"
                • "m5n.8xlarge"
                • "m5n.12xlarge"
                • "m5n.16xlarge"
                • "m5n.24xlarge"
                • "m5n.metal"
                • "r5dn.large"
                • "r5dn.xlarge"
                • "r5dn.2xlarge"
                • "r5dn.4xlarge"
                • "r5dn.8xlarge"
                • "r5dn.12xlarge"
                • "r5dn.16xlarge"
                • "r5dn.24xlarge"
                • "r5dn.metal"
                • "r5n.large"
                • "r5n.xlarge"
                • "r5n.2xlarge"
                • "r5n.4xlarge"
                • "r5n.8xlarge"
                • "r5n.12xlarge"
                • "r5n.16xlarge"
                • "r5n.24xlarge"
                • "r5n.metal"
                • "inf1.xlarge"
                • "inf1.2xlarge"
                • "inf1.6xlarge"
                • "inf1.24xlarge"
                • "m6g.metal"
                • "m6g.medium"
                • "m6g.large"
                • "m6g.xlarge"
                • "m6g.2xlarge"
                • "m6g.4xlarge"
                • "m6g.8xlarge"
                • "m6g.12xlarge"
                • "m6g.16xlarge"
                • "m6gd.metal"
                • "m6gd.medium"
                • "m6gd.large"
                • "m6gd.xlarge"
                • "m6gd.2xlarge"
                • "m6gd.4xlarge"
                • "m6gd.8xlarge"
                • "m6gd.12xlarge"
                • "m6gd.16xlarge"
                • "m6i.large"
                • "m6i.xlarge"
                • "m6i.2xlarge"
                • "m6i.4xlarge"
                • "m6i.8xlarge"
                • "m6i.12xlarge"
                • "m6i.16xlarge"
                • "m6i.24xlarge"
                • "m6i.32xlarge"
                • "mac1.metal"
                • "x2gd.medium"
                • "x2gd.large"
                • "x2gd.xlarge"
                • "x2gd.2xlarge"
                • "x2gd.4xlarge"
                • "x2gd.8xlarge"
                • "x2gd.12xlarge"
                • "x2gd.16xlarge"
                • "x2gd.metal"
                • "vt1.3xlarge"
                • "vt1.6xlarge"
                • "vt1.24xlarge"
              • MaxPrice — (String)

                The maximum price per unit hour that you are willing to pay for a Spot Instance.

              • SubnetId — (String)

                The ID of the subnet in which to launch the instances.

              • AvailabilityZone — (String)

                The Availability Zone in which to launch the instances.

              • WeightedCapacity — (Float)

                The number of units provided by the specified instance type.

              • Priority — (Float)

                The priority for the launch template override. The highest priority is launched first.

                If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

                If the Spot AllocationStrategy is set to capacity-optimized-prioritized, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

                Valid values are whole numbers starting at 0. The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

              • Placement — (map)

                The location where the instance launched, if applicable.

                • GroupName — (String)

                  The name of the placement group that the instance is in.

              • InstanceRequirements — (map)

                The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

                Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
                • VCpuCount — (map)

                  The minimum and maximum number of vCPUs.

                  • Min — (Integer)

                    The minimum number of vCPUs. If the value is 0, there is no minimum limit.

                  • Max — (Integer)

                    The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                • MemoryMiB — (map)

                  The minimum and maximum amount of memory, in MiB.

                  • Min — (Integer)

                    The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                • CpuManufacturers — (Array<String>)

                  The CPU manufacturers to include.

                  • For instance types with Intel CPUs, specify intel.

                  • For instance types with AMD CPUs, specify amd.

                  • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

                  Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                  Default: Any manufacturer

                • MemoryGiBPerVCpu — (map)

                  The minimum and maximum amount of memory per vCPU, in GiB.

                  Default: No minimum or maximum limits

                  • Min — (Float)

                    The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Float)

                    The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                • ExcludedInstanceTypes — (Array<String>)

                  The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

                  For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                  Default: No excluded instance types

                • InstanceGenerations — (Array<String>)

                  Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

                  For current generation instance types, specify current.

                  For previous generation instance types, specify previous.

                  Default: Current and previous generation instance types

                • SpotMaxPricePercentageOverLowestPrice — (Integer)

                  The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                  The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                  To turn off price protection, specify a high value, such as 999999.

                  This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                  Default: 100

                • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

                  The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                  The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                  To turn off price protection, specify a high value, such as 999999.

                  This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                  Default: 20

                • BareMetal — (String)

                  Indicates whether bare metal instance types must be included, excluded, or required.

                  • To include bare metal instance types, specify included.

                  • To require only bare metal instance types, specify required.

                  • To exclude bare metal instance types, specify excluded.

                  Default: excluded

                  Possible values include:
                  • "included"
                  • "required"
                  • "excluded"
                • BurstablePerformance — (String)

                  Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

                  • To include burstable performance instance types, specify included.

                  • To require only burstable performance instance types, specify required.

                  • To exclude burstable performance instance types, specify excluded.

                  Default: excluded

                  Possible values include:
                  • "included"
                  • "required"
                  • "excluded"
                • RequireHibernateSupport — (Boolean)

                  Indicates whether instance types must support hibernation for On-Demand Instances.

                  This parameter is not supported for GetSpotPlacementScores.

                  Default: false

                • NetworkInterfaceCount — (map)

                  The minimum and maximum number of network interfaces.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                • LocalStorage — (String)

                  Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

                  • To include instance types with instance store volumes, specify included.

                  • To require only instance types with instance store volumes, specify required.

                  • To exclude instance types with instance store volumes, specify excluded.

                  Default: included

                  Possible values include:
                  • "included"
                  • "required"
                  • "excluded"
                • LocalStorageTypes — (Array<String>)

                  The type of local storage that is required.

                  • For instance types with hard disk drive (HDD) storage, specify hdd.

                  • For instance types with solid state drive (SDD) storage, specify sdd.

                  Default: hdd and sdd

                • TotalLocalStorageGB — (map)

                  The minimum and maximum amount of total local storage, in GB.

                  Default: No minimum or maximum limits

                  • Min — (Float)

                    The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Float)

                    The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                • BaselineEbsBandwidthMbps — (map)

                  The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                • AcceleratorTypes — (Array<String>)

                  The accelerator types that must be on the instance type.

                  • For instance types with GPU accelerators, specify gpu.

                  • For instance types with FPGA accelerators, specify fpga.

                  • For instance types with inference accelerators, specify inference.

                  Default: Any accelerator type

                • AcceleratorCount — (map)

                  The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                  To exclude accelerator-enabled instance types, set Max to 0.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                • AcceleratorManufacturers — (Array<String>)

                  Indicates whether instance types must have accelerators by specific manufacturers.

                  • For instance types with NVIDIA devices, specify nvidia.

                  • For instance types with AMD devices, specify amd.

                  • For instance types with Amazon Web Services devices, specify amazon-web-services.

                  • For instance types with Xilinx devices, specify xilinx.

                  Default: Any manufacturer

                • AcceleratorNames — (Array<String>)

                  The accelerators that must be on the instance type.

                  • For instance types with NVIDIA A100 GPUs, specify a100.

                  • For instance types with NVIDIA V100 GPUs, specify v100.

                  • For instance types with NVIDIA K80 GPUs, specify k80.

                  • For instance types with NVIDIA T4 GPUs, specify t4.

                  • For instance types with NVIDIA M60 GPUs, specify m60.

                  • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

                  • For instance types with Xilinx VU9P FPGAs, specify vu9p.

                  Default: Any accelerator

                • AcceleratorTotalMemoryMiB — (map)

                  The minimum and maximum amount of total accelerator memory, in MiB.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • Lifecycle — (String)

            Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.

            Possible values include:
            • "spot"
            • "on-demand"
          • InstanceIds — (Array<String>)

            The IDs of the instances.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • Platform — (String)

            The value is Windows for Windows instances. Otherwise, the value is blank.

            Possible values include:
            • "Windows"
        • Context — (String)

          Reserved.

Returns:

  • (AWS.Request)

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

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.

Service Reference:

Examples:

Calling the describeFlowLogs operation

var params = {
  DryRun: true || false,
  Filter: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  FlowLogIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  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: {})
    • 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.

    • Filter — (Array<map>)

      One or more filters.

      • deliver-log-status - The status of the logs delivery (SUCCESS | FAILED).

      • log-destination-type - The type of destination to which the flow log publishes data. Possible destination types include cloud-watch-logs and s3.

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

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • FlowLogIds — (Array<String>)

      One or more flow log IDs.

      Constraint: Maximum of 1000 flow log IDs.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for 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:

      • FlowLogs — (Array<map>)

        Information about the flow logs.

        • CreationTime — (Date)

          The date and time the flow log was created.

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

        • DeliverLogsStatus — (String)

          The status of the logs delivery (SUCCESS | FAILED).

        • FlowLogId — (String)

          The flow log ID.

        • FlowLogStatus — (String)

          The status of the flow log (ACTIVE).

        • LogGroupName — (String)

          The name of the flow log group.

        • 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"
        • LogDestinationType — (String)

          The type of destination to which the flow log data is published. Flow log data can be published to CloudWatch Logs or Amazon S3.

          Possible values include:
          • "cloud-watch-logs"
          • "s3"
        • LogDestination — (String)

          The destination to which the flow log data is published. Flow log data can be published to an CloudWatch Logs log group or an Amazon S3 bucket. If the flow log publishes to CloudWatch Logs, this element indicates the Amazon Resource Name (ARN) of the CloudWatch Logs log group to which the data is published. If the flow log publishes to Amazon S3, this element indicates the ARN of the Amazon S3 bucket to which the data is published.

        • LogFormat — (String)

          The format of the flow log record.

        • Tags — (Array<map>)

          The tags for the flow log.

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

        • MaxAggregationInterval — (Integer)

          The maximum interval of time, in seconds, during which a flow of packets is captured and aggregated into a flow log record.

          When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds (1 minute) or less, regardless of the specified value.

          Valid Values: 60 | 600

        • DestinationOptions — (map)

          The destination options.

          • FileFormat — (String)

            The format for the flow log.

            Possible values include:
            • "plain-text"
            • "parquet"
          • HiveCompatiblePartitions — (Boolean)

            Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3.

          • PerHourPartition — (Boolean)

            Indicates whether to partition the flow log per hour.

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

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

Describes the specified attribute of the specified Amazon FPGA Image (AFI).

Service Reference:

Examples:

Calling the describeFpgaImageAttribute operation

var params = {
  Attribute: description | name | loadPermission | productCodes, /* required */
  FpgaImageId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.describeFpgaImageAttribute(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.

    • FpgaImageId — (String)

      The ID of the AFI.

    • Attribute — (String)

      The AFI attribute.

      Possible values include:
      • "description"
      • "name"
      • "loadPermission"
      • "productCodes"

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:

      • FpgaImageAttribute — (map)

        Information about the attribute.

        • FpgaImageId — (String)

          The ID of the AFI.

        • Name — (String)

          The name of the AFI.

        • Description — (String)

          The description of the AFI.

        • LoadPermissions — (Array<map>)

          The load permissions.

          • UserId — (String)

            The Amazon Web Services account ID.

          • Group — (String)

            The name of the group.

            Possible values include:
            • "all"
        • ProductCodes — (Array<map>)

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

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

Describes the Amazon FPGA Images (AFIs) available to you. These include public AFIs, private AFIs that you own, and AFIs owned by other Amazon Web Services accounts for which you have load permissions.

Service Reference:

Examples:

Calling the describeFpgaImages operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  FpgaImageIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  Owners: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeFpgaImages(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.

    • FpgaImageIds — (Array<String>)

      The AFI IDs.

    • Owners — (Array<String>)

      Filters the AFI by owner. Specify an Amazon Web Services account ID, self (owner is the sender of the request), or an Amazon Web Services owner alias (valid values are amazon | aws-marketplace).

    • Filters — (Array<map>)

      The filters.

      • create-time - The creation time of the AFI.

      • fpga-image-id - The FPGA image identifier (AFI ID).

      • fpga-image-global-id - The global FPGA image identifier (AGFI ID).

      • name - The name of the AFI.

      • owner-id - The Amazon Web Services account ID of the AFI owner.

      • product-code - The product code.

      • shell-version - The version of the Amazon Web Services Shell that was used to create the bitstream.

      • state - The state of the AFI (pending | failed | available | unavailable).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • update-time - The time of the most recent update.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

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

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:

      • FpgaImages — (Array<map>)

        Information about the FPGA images.

        • FpgaImageId — (String)

          The FPGA image identifier (AFI ID).

        • FpgaImageGlobalId — (String)

          The global FPGA image identifier (AGFI ID).

        • Name — (String)

          The name of the AFI.

        • Description — (String)

          The description of the AFI.

        • ShellVersion — (String)

          The version of the Amazon Web Services Shell that was used to create the bitstream.

        • PciId — (map)

          Information about the PCI bus.

          • DeviceId — (String)

            The ID of the device.

          • VendorId — (String)

            The ID of the vendor.

          • SubsystemId — (String)

            The ID of the subsystem.

          • SubsystemVendorId — (String)

            The ID of the vendor for the subsystem.

        • State — (map)

          Information about the state of the AFI.

          • Code — (String)

            The state. The following are the possible values:

            • pending - AFI bitstream generation is in progress.

            • available - The AFI is available for use.

            • failed - AFI bitstream generation failed.

            • unavailable - The AFI is no longer available for use.

            Possible values include:
            • "pending"
            • "failed"
            • "available"
            • "unavailable"
          • Message — (String)

            If the state is failed, this is the error message.

        • CreateTime — (Date)

          The date and time the AFI was created.

        • UpdateTime — (Date)

          The time of the most recent update to the AFI.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the AFI.

        • OwnerAlias — (String)

          The alias of the AFI owner. Possible values include self, amazon, and aws-marketplace.

        • ProductCodes — (Array<map>)

          The product codes for the AFI.

          • ProductCodeId — (String)

            The product code.

          • ProductCodeType — (String)

            The type of product code.

            Possible values include:
            • "devpay"
            • "marketplace"
        • Tags — (Array<map>)

          Any tags assigned to the AFI.

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

        • Public — (Boolean)

          Indicates whether the AFI is public.

        • DataRetentionSupport — (Boolean)

          Indicates whether data retention support is enabled for the AFI.

      • 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 of the Dedicated Host reservation offerings, including offerings that might not match the instance family and Region of your Dedicated Hosts. When purchasing an offering, ensure that the instance family and Region of the offering matches that of the Dedicated Hosts with which it is to be associated. For more information about supported instance types, see Dedicated Hosts in the Amazon EC2 User Guide.

Examples:

Calling the describeHostReservationOfferings operation

var params = {
  Filter: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxDuration: 'NUMBER_VALUE',
  MaxResults: 'NUMBER_VALUE',
  MinDuration: 'NUMBER_VALUE',
  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: {})
    • Filter — (Array<map>)

      The filters.

      • instance-family - The instance family of the offering (for example, m4).

      • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxDuration — (Integer)

      This is the maximum duration of the reservation to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 94608000 for three years.

    • 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 receive an error.

    • MinDuration — (Integer)

      This is the minimum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 31536000 for one year.

    • NextToken — (String)

      The token to use to retrieve the next page of results.

    • OfferingId — (String)

      The ID of the reservation offering.

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 to use to retrieve the next page of results. This value is null when there are no more results to return.

      • OfferingSet — (Array<map>)

        Information about the offerings.

        • CurrencyCode — (String)

          The currency of the offering.

          Possible values include:
          • "USD"
        • Duration — (Integer)

          The duration of the offering (in seconds).

        • HourlyPrice — (String)

          The hourly price of the offering.

        • InstanceFamily — (String)

          The instance family of the offering.

        • OfferingId — (String)

          The ID of the offering.

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

Returns:

  • (AWS.Request)

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

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

Describes reservations that are associated with Dedicated Hosts in your account.

Service Reference:

Examples:

Calling the describeHostReservations operation

var params = {
  Filter: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  HostReservationIdSet: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  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: {})
    • Filter — (Array<map>)

      The filters.

      • instance-family - The instance family (for example, m4).

      • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront).

      • state - The state of the reservation (payment-pending | payment-failed | active | retired).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • HostReservationIdSet — (Array<String>)

      The host reservation IDs.

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

        • Count — (Integer)

          The number of Dedicated Hosts the reservation is associated with.

        • 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"
        • Duration — (Integer)

          The length of the reservation's term, specified in seconds. Can be 31536000 (1 year) | 94608000 (3 years).

        • End — (Date)

          The date and time that the reservation ends.

        • HostIdSet — (Array<String>)

          The IDs of the Dedicated Hosts associated with the reservation.

        • HostReservationId — (String)

          The ID of the reservation that specifies the associated Dedicated Hosts.

        • HourlyPrice — (String)

          The hourly price of the reservation.

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

        • OfferingId — (String)

          The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.

        • PaymentOption — (String)

          The payment option selected for this reservation.

          Possible values include:
          • "AllUpfront"
          • "PartialUpfront"
          • "NoUpfront"
        • 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"
        • UpfrontPrice — (String)

          The upfront price of the reservation.

        • Tags — (Array<map>)

          Any tags assigned to the Dedicated Host Reservation.

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

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

Describes the specified Dedicated Hosts or all 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 are listed with the state released.

Service Reference:

Examples:

Calling the describeHosts operation

var params = {
  Filter: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  HostIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  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: {})
    • Filter — (Array<map>)

      The filters.

      • auto-placement - Whether auto-placement is enabled or disabled (on | off).

      • availability-zone - The Availability Zone of the host.

      • client-token - The idempotency token that you provided when you allocated the host.

      • host-reservation-id - The ID of the reservation assigned to this host.

      • instance-type - The instance type size that the Dedicated Host is configured to support.

      • state - The allocation state of the Dedicated Host (available | under-assessment | permanent-failure | released | released-permanent-failure).

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • HostIds — (Array<String>)

      The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches.

    • 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 receive an error.

      You cannot specify this parameter and the host IDs parameter in the same request.

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

      • Hosts — (Array<map>)

        Information about the Dedicated Hosts.

        • AutoPlacement — (String)

          Whether auto-placement is on or off.

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

          The Availability Zone of the Dedicated Host.

        • AvailableCapacity — (map)

          Information about the instances running on the Dedicated Host.

          • AvailableInstanceCapacity — (Array<map>)

            The number of instances that can be launched onto the Dedicated Host depending on the host's available capacity. For Dedicated Hosts that support multiple instance types, this parameter represents the number of instances for each instance size that is supported on the host.

            • AvailableCapacity — (Integer)

              The number of instances that can be launched onto the Dedicated Host based on the host's available capacity.

            • InstanceType — (String)

              The instance type supported by the Dedicated Host.

            • TotalCapacity — (Integer)

              The total number of instances that can be launched onto the Dedicated Host if there are no instances running on it.

          • AvailableVCpus — (Integer)

            The number of vCPUs available for launching instances onto the Dedicated Host.

        • ClientToken — (String)

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

        • HostId — (String)

          The ID of the Dedicated Host.

        • HostProperties — (map)

          The hardware specifications of the Dedicated Host.

          • Cores — (Integer)

            The number of cores on the Dedicated Host.

          • InstanceType — (String)

            The instance type supported by the Dedicated Host. For example, m5.large. If the host supports multiple instance types, no instanceType is returned.

          • InstanceFamily — (String)

            The instance family supported by the Dedicated Host. For example, m5.

          • Sockets — (Integer)

            The number of sockets on the Dedicated Host.

          • TotalVCpus — (Integer)

            The total number of vCPUs on the Dedicated Host.

        • HostReservationId — (String)

          The reservation ID of the Dedicated Host. This returns a null response if the Dedicated Host doesn't have an associated reservation.

        • Instances — (Array<map>)

          The IDs and instance type that are currently running on the Dedicated Host.

          • InstanceId — (String)

            The ID of instance that is running on the Dedicated Host.

          • InstanceType — (String)

            The instance type (for example, m3.medium) of the running instance.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the instance.

        • State — (String)

          The Dedicated Host's state.

          Possible values include:
          • "available"
          • "under-assessment"
          • "permanent-failure"
          • "released"
          • "released-permanent-failure"
          • "pending"
        • AllocationTime — (Date)

          The time that the Dedicated Host was allocated.

        • ReleaseTime — (Date)

          The time that the Dedicated Host was released.

        • Tags — (Array<map>)

          Any tags assigned to the Dedicated Host.

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

        • HostRecovery — (String)

          Indicates whether host recovery is enabled or disabled for the Dedicated Host.

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

          Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is on, the Dedicated Host supports multiple instance types in the instance family. If the value is off, the Dedicated Host supports a single instance type only.

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

          The ID of the Amazon Web Services account that owns the Dedicated Host.

        • AvailabilityZoneId — (String)

          The ID of the Availability Zone in which the Dedicated Host is allocated.

        • MemberOfServiceLinkedResourceGroup — (Boolean)

          Indicates whether the Dedicated Host is in a host resource group. If memberOfServiceLinkedResourceGroup is true, the host is in a host resource group; otherwise, it is not.

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

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

Describes your IAM instance profile associations.

Examples:

To describe an IAM instance profile association


/* This example describes the specified IAM instance profile association. */

 var params = {
  AssociationIds: [
     "iip-assoc-0db249b1f25fa24b8"
  ]
 };
 ec2.describeIamInstanceProfileAssociations(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    IamInstanceProfileAssociations: [
       {
      AssociationId: "iip-assoc-0db249b1f25fa24b8", 
      IamInstanceProfile: {
       Arn: "arn:aws:iam::123456789012:instance-profile/admin-role", 
       Id: "AIPAJVQN4F5WVLGCJDRGM"
      }, 
      InstanceId: "i-09eb09efa73ec1dee", 
      State: "associated"
     }
    ]
   }
   */
 });

Calling the describeIamInstanceProfileAssociations operation

var params = {
  AssociationIds: [
    'STRING_VALUE',
    /* more items */
  ],
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeIamInstanceProfileAssociations(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: {})
    • AssociationIds — (Array<String>)

      The IAM instance profile associations.

    • Filters — (Array<map>)

      The filters.

      • instance-id - The ID of the instance.

      • state - The state of the association (associating | associated | disassociating).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

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

    • NextToken — (String)

      The token to request 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:

      • IamInstanceProfileAssociations — (Array<map>)

        Information about the IAM instance profile associations.

        • AssociationId — (String)

          The ID of the association.

        • InstanceId — (String)

          The ID of the instance.

        • IamInstanceProfile — (map)

          The IAM instance profile.

          • Arn — (String)

            The Amazon Resource Name (ARN) of the instance profile.

          • Id — (String)

            The ID of the instance profile.

        • State — (String)

          The state of the association.

          Possible values include:
          • "associating"
          • "associated"
          • "disassociating"
          • "disassociated"
        • Timestamp — (Date)

          The time the IAM instance profile was associated with the instance.

      • 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: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

These settings apply to the principal specified in the request. They do not apply to the principal that makes the request.

Service Reference:

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: {})
    • PrincipalArn — (String)

      The ARN of the principal, which can be an IAM role, IAM user, or the root user.

    • Resource — (String)

      The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-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:

      • Statuses — (Array<map>)

        Information about the ID format for the resources.

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

        • Resource — (String)

          The type of resource.

        • UseLongIds — (Boolean)

          Indicates whether longer IDs (17-character IDs) are enabled for the resource.

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: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

These settings apply to the IAM user who makes the request; they do not apply to the entire Amazon Web Services 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.

Service Reference:

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: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-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:

      • Statuses — (Array<map>)

        Information about the ID format 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.

        • Resource — (String)

          The type of resource.

        • UseLongIds — (Boolean)

          Indicates whether longer IDs (17-character IDs) are enabled for the resource.

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.

Service Reference:

Examples:

To describe the launch permissions for an AMI


/* This example describes the launch permissions for the specified AMI. */

 var params = {
  Attribute: "launchPermission", 
  ImageId: "ami-5731123e"
 };
 ec2.describeImageAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ImageId: "ami-5731123e", 
    LaunchPermissions: [
       {
      UserId: "123456789012"
     }
    ]
   }
   */
 });

Calling the describeImageAttribute operation

var params = {
  Attribute: description | kernel | ramdisk | launchPermission | productCodes | blockDeviceMapping | sriovNetSupport | bootMode, /* 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: {})
    • Attribute — (String)

      The AMI attribute.

      Note: The blockDeviceMapping attribute is deprecated. Using this attribute returns the Client.AuthFailure error. To get information about the block device mappings for an AMI, use the DescribeImages action.

      Possible values include:
      • "description"
      • "kernel"
      • "ramdisk"
      • "launchPermission"
      • "productCodes"
      • "blockDeviceMapping"
      • "sriovNetSupport"
      • "bootMode"
    • ImageId — (String)

      The ID of the AMI.

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

      • BlockDeviceMappings — (Array<map>)

        The block device mapping entries.

        • DeviceName — (String)

          The device name (for example, /dev/sdh or xvdh).

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

          NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

          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.

        • Ebs — (map)

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

          • DeleteOnTermination — (Boolean)

            Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

          • Iops — (Integer)

            The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

            The following are the supported values for each volume type:

            • gp3: 3,000-16,000 IOPS

            • io1: 100-64,000 IOPS

            • io2: 100-64,000 IOPS

            For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

            This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

          • SnapshotId — (String)

            The ID of the snapshot.

          • VolumeSize — (Integer)

            The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

            The following are the supported volumes sizes for each volume type:

            • gp2 and gp3:1-16,384

            • io1 and io2: 4-16,384

            • st1 and sc1: 125-16,384

            • standard: 1-1,024

          • VolumeType — (String)

            The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

            Possible values include:
            • "standard"
            • "io1"
            • "io2"
            • "gp2"
            • "sc1"
            • "st1"
            • "gp3"
          • KmsKeyId — (String)

            Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

            This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

          • Throughput — (Integer)

            The throughput that the volume supports, in MiB/s.

            This parameter is valid only for gp3 volumes.

            Valid Range: Minimum value of 125. Maximum value of 1000.

          • OutpostArn — (String)

            The ARN of the Outpost on which the snapshot is stored.

          • Encrypted — (Boolean)

            Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

            In no case can you remove encryption from an encrypted volume.

            Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

            This parameter is not returned by .

        • NoDevice — (String)

          To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

      • ImageId — (String)

        The ID of the AMI.

      • LaunchPermissions — (Array<map>)

        The launch permissions.

        • Group — (String)

          The name of the group.

          Possible values include:
          • "all"
        • UserId — (String)

          The Amazon Web Services account ID.

          Constraints: Up to 10 000 account IDs can be specified in a single request.

        • OrganizationArn — (String)

          The Amazon Resource Name (ARN) of an organization.

        • OrganizationalUnitArn — (String)

          The Amazon Resource Name (ARN) of an organizational unit (OU).

      • ProductCodes — (Array<map>)

        The product codes.

        • ProductCodeId — (String)

          The product code.

        • ProductCodeType — (String)

          The type of product code.

          Possible values include:
          • "devpay"
          • "marketplace"
      • Description — (map)

        A description for the AMI.

        • Value — (String)

          The attribute value. The value is case-sensitive.

      • KernelId — (map)

        The kernel ID.

        • Value — (String)

          The attribute value. The value is case-sensitive.

      • RamdiskId — (map)

        The RAM disk ID.

        • Value — (String)

          The attribute value. 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. The value is case-sensitive.

      • BootMode — (map)

        Describes a value for a resource attribute that is a String.

        • Value — (String)

          The attribute value. The value is case-sensitive.

Returns:

  • (AWS.Request)

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

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

Describes the specified images (AMIs, AKIs, and ARIs) available to you or all of the images available to you.

The images available to you include public images, private images that you own, and private images owned by other Amazon Web Services accounts for which you have explicit launch permissions.

Recently deregistered images appear in the returned results for a short interval and then return empty results. After all instances that reference a deregistered AMI are terminated, specifying the ID of the image will eventually return an error indicating that the AMI ID cannot be found.

Service Reference:

Examples:

To describe an AMI


/* This example describes the specified AMI. */

 var params = {
  ImageIds: [
     "ami-5731123e"
  ]
 };
 ec2.describeImages(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Images: [
       {
      Architecture: "x86_64", 
      BlockDeviceMappings: [
         {
        DeviceName: "/dev/sda1", 
        Ebs: {
         DeleteOnTermination: true, 
         SnapshotId: "snap-1234567890abcdef0", 
         VolumeSize: 8, 
         VolumeType: "standard"
        }
       }
      ], 
      Description: "An AMI for my server", 
      Hypervisor: "xen", 
      ImageId: "ami-5731123e", 
      ImageLocation: "123456789012/My server", 
      ImageType: "machine", 
      KernelId: "aki-88aa75e1", 
      Name: "My server", 
      OwnerId: "123456789012", 
      Public: false, 
      RootDeviceName: "/dev/sda1", 
      RootDeviceType: "ebs", 
      State: "available", 
      VirtualizationType: "paravirtual"
     }
    ]
   }
   */
 });

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 */
  ],
  IncludeDeprecated: true || false,
  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: {})
    • ExecutableUsers — (Array<String>)

      Scopes the images by users with explicit launch permissions. Specify an Amazon Web Services account ID, self (the sender of the request), or all (public AMIs).

      • If you specify an Amazon Web Services account ID that is not your own, only AMIs shared with that specific Amazon Web Services account ID are returned. However, AMIs that are shared with the account’s organization or organizational unit (OU) are not returned.

      • If you specify self or your own Amazon Web Services account ID, AMIs shared with your account are returned. In addition, AMIs that are shared with the organization or OU of which you are member are also returned.

      • If you specify all, all public AMIs are returned.

    • Filters — (Array<map>)

      The filters.

      • architecture - The image architecture (i386 | x86_64 | arm64).

      • 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 specified in the block device mapping (for example, /dev/sdh or xvdh).

      • block-device-mapping.snapshot-id - The ID of the snapshot used for the Amazon EBS volume.

      • block-device-mapping.volume-size - The volume size of the Amazon EBS volume, in GiB.

      • block-device-mapping.volume-type - The volume type of the Amazon EBS volume (io1 | io2 | gp2 | gp3 | sc1 | st1 | standard).

      • block-device-mapping.encrypted - A Boolean that indicates whether the Amazon EBS volume is encrypted.

      • description - The description of the image (provided during image creation).

      • ena-support - A Boolean that indicates whether enhanced networking with ENA is enabled.

      • 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 - The owner alias (amazon | aws-marketplace). The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be set using the IAM console. We recommend that you use the Owner request parameter instead of this filter.

      • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the Owner request parameter instead of this filter.

      • 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 (marketplace).

      • ramdisk-id - The RAM disk ID.

      • root-device-name - The device 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.

      • sriov-net-support - A value of simple indicates that enhanced networking with the Intel 82599 VF interface is enabled.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • virtualization-type - The virtualization type (paravirtual | hvm).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • ImageIds — (Array<String>)

      The image IDs.

      Default: Describes all images available to you.

    • Owners — (Array<String>)

      Scopes the results to images with the specified owners. You can specify a combination of Amazon Web Services account IDs, self, amazon, and aws-marketplace. If you omit this parameter, the results include all images for which you have launch permissions, regardless of ownership.

    • IncludeDeprecated — (Boolean)

      If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.

      Note: If you are the AMI owner, all deprecated AMIs appear in the response regardless of the value (true or false) that you set for this parameter.
    • 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:

      • Images — (Array<map>)

        Information about the images.

        • Architecture — (String)

          The architecture of the image.

          Possible values include:
          • "i386"
          • "x86_64"
          • "arm64"
          • "x86_64_mac"
        • CreationDate — (String)

          The date and time the image was created.

        • ImageId — (String)

          The ID of the AMI.

        • ImageLocation — (String)

          The location of the AMI.

        • ImageType — (String)

          The type of image.

          Possible values include:
          • "machine"
          • "kernel"
          • "ramdisk"
        • 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.

        • KernelId — (String)

          The kernel associated with the image, if any. Only applicable for machine images.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the image.

        • Platform — (String)

          This value is set to windows for Windows AMIs; otherwise, it is blank.

          Possible values include:
          • "Windows"
        • PlatformDetails — (String)

          The platform details associated with the billing code of the AMI. For more information, see Understanding AMI billing in the Amazon Elastic Compute Cloud User Guide.

        • UsageOperation — (String)

          The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price List API. You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, or in the responses that are returned by the DescribeImages command in the Amazon EC2 API, or the describe-images command in the CLI.

        • 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"
        • RamdiskId — (String)

          The RAM disk associated with the image, if any. Only applicable for machine images.

        • 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"
        • BlockDeviceMappings — (Array<map>)

          Any block device mapping entries.

          • DeviceName — (String)

            The device name (for example, /dev/sdh or xvdh).

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

            NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

            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.

          • Ebs — (map)

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

            • DeleteOnTermination — (Boolean)

              Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

              The following are the supported values for each volume type:

              • gp3: 3,000-16,000 IOPS

              • io1: 100-64,000 IOPS

              • io2: 100-64,000 IOPS

              For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

              This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

            • SnapshotId — (String)

              The ID of the snapshot.

            • VolumeSize — (Integer)

              The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

              The following are the supported volumes sizes for each volume type:

              • gp2 and gp3:1-16,384

              • io1 and io2: 4-16,384

              • st1 and sc1: 125-16,384

              • standard: 1-1,024

            • VolumeType — (String)

              The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

              Possible values include:
              • "standard"
              • "io1"
              • "io2"
              • "gp2"
              • "sc1"
              • "st1"
              • "gp3"
            • KmsKeyId — (String)

              Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

              This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

            • Throughput — (Integer)

              The throughput that the volume supports, in MiB/s.

              This parameter is valid only for gp3 volumes.

              Valid Range: Minimum value of 125. Maximum value of 1000.

            • OutpostArn — (String)

              The ARN of the Outpost on which the snapshot is stored.

            • Encrypted — (Boolean)

              Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

              In no case can you remove encryption from an encrypted volume.

              Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

              This parameter is not returned by .

          • NoDevice — (String)

            To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

        • Description — (String)

          The description of the AMI that was provided during image creation.

        • EnaSupport — (Boolean)

          Specifies whether enhanced networking with ENA is enabled.

        • Hypervisor — (String)

          The hypervisor type of the image.

          Possible values include:
          • "ovm"
          • "xen"
        • ImageOwnerAlias — (String)

          The Amazon Web Services account alias (for example, amazon, self) or the Amazon Web Services account ID of the AMI owner.

        • Name — (String)

          The name of the AMI that was provided during image creation.

        • RootDeviceName — (String)

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

        • RootDeviceType — (String)

          The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.

          Possible values include:
          • "ebs"
          • "instance-store"
        • SriovNetSupport — (String)

          Specifies whether enhanced networking with the Intel 82599 Virtual Function interface 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.InsufficientInstanceCapacity: There was insufficient capacity available to satisfy the launch request.

            • Server.InternalError: An internal error caused the instance to terminate during launch.

            • Server.ScheduledStop: The instance was stopped due to a scheduled retirement.

            • Server.SpotInstanceShutdown: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

            • Server.SpotInstanceTermination: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

            • Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.

            • Client.InstanceTerminated: The instance was terminated or rebooted during AMI creation.

            • Client.InternalError: A client error caused the instance to terminate during launch.

            • Client.InvalidSnapshot.NotFound: The specified snapshot was not found.

            • Client.UserInitiatedHibernate: Hibernation was initiated on 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 account limits.

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

        • VirtualizationType — (String)

          The type of virtualization of the AMI.

          Possible values include:
          • "hvm"
          • "paravirtual"
        • BootMode — (String)

          The boot mode of the image. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.

          Possible values include:
          • "legacy-bios"
          • "uefi"
        • DeprecationTime — (String)

          The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.

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.

Service Reference:

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: 'NUMBER_VALUE',
  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.

    • Filters — (Array<map>)

      Filter tasks using the task-state filter and one of the following values: active, completed, deleting, or deleted.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • ImportTaskIds — (Array<String>)

      The IDs of the import image tasks.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call.

    • NextToken — (String)

      A token that indicates 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:

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

        • Architecture — (String)

          The architecture of the virtual machine.

          Valid values: i386 | x86_64 | arm64

        • Description — (String)

          A description of the import task.

        • Encrypted — (Boolean)

          Indicates whether the image is encrypted.

        • Hypervisor — (String)

          The target hypervisor for the import task.

          Valid values: xen

        • ImageId — (String)

          The ID of the Amazon Machine Image (AMI) of the imported virtual machine.

        • ImportTaskId — (String)

          The ID of the import image task.

        • KmsKeyId — (String)

          The identifier for the KMS key that was used to create the encrypted image.

        • LicenseType — (String)

          The license type of the virtual machine.

        • Platform — (String)

          The description string for the import image task.

        • Progress — (String)

          The percentage of progress of the import image task.

        • SnapshotDetails — (Array<map>)

          Information about the snapshots.

          • Description — (String)

            A description for the snapshot.

          • DeviceName — (String)

            The block device mapping for the snapshot.

          • DiskImageSize — (Float)

            The size of the disk in the snapshot, in GiB.

          • Format — (String)

            The format of the disk image from which the snapshot is created.

          • Progress — (String)

            The percentage of progress for the task.

          • SnapshotId — (String)

            The snapshot ID of the disk being imported.

          • Status — (String)

            A brief status of the snapshot creation.

          • StatusMessage — (String)

            A detailed status message for the snapshot creation.

          • Url — (String)

            The URL used to access the disk image.

          • UserBucket — (map)

            The Amazon S3 bucket for the disk image.

            • S3Bucket — (String)

              The Amazon S3 bucket from which the disk image was created.

            • S3Key — (String)

              The file name of the disk image.

        • Status — (String)

          A brief status for the import image task.

        • StatusMessage — (String)

          A descriptive status message for the import image task.

        • Tags — (Array<map>)

          The tags for the import image 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.

        • LicenseSpecifications — (Array<map>)

          The ARNs of the license configurations that are associated with the import image task.

          • LicenseConfigurationArn — (String)

            The ARN of a license configuration.

        • UsageOperation — (String)

          The usage operation value.

        • BootMode — (String)

          The boot mode of the virtual machine.

          Possible values include:
          • "legacy-bios"
          • "uefi"
      • 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.

Service Reference:

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: 'NUMBER_VALUE',
  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.

    • Filters — (Array<map>)

      The filters.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • ImportTaskIds — (Array<String>)

      A list of import snapshot task IDs.

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

    • NextToken — (String)

      A token that indicates 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:

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

        • Description — (String)

          A description of the import snapshot task.

        • ImportTaskId — (String)

          The ID of the import snapshot task.

        • SnapshotTaskDetail — (map)

          Describes an import snapshot task.

          • Description — (String)

            The description of the snapshot.

          • DiskImageSize — (Float)

            The size of the disk in the snapshot, in GiB.

          • Encrypted — (Boolean)

            Indicates whether the snapshot is encrypted.

          • Format — (String)

            The format of the disk image from which the snapshot is created.

          • KmsKeyId — (String)

            The identifier for the KMS key that was used to create the encrypted snapshot.

          • Progress — (String)

            The percentage of completion for the import snapshot task.

          • SnapshotId — (String)

            The snapshot ID of the disk being imported.

          • Status — (String)

            A brief status for the import snapshot task.

          • StatusMessage — (String)

            A detailed status message for the import snapshot task.

          • Url — (String)

            The URL of the disk image from which the snapshot is created.

          • UserBucket — (map)

            The Amazon S3 bucket for the disk image.

            • S3Bucket — (String)

              The Amazon S3 bucket from which the disk image was created.

            • S3Key — (String)

              The file name of the disk image.

        • Tags — (Array<map>)

          The tags for the import snapshot 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.

      • 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

Service Reference:

Examples:

To describe the instance type


/* This example describes the instance type of the specified instance.
*/

 var params = {
  Attribute: "instanceType", 
  InstanceId: "i-1234567890abcdef0"
 };
 ec2.describeInstanceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    InstanceId: "i-1234567890abcdef0", 
    InstanceType: {
     Value: "t1.micro"
    }
   }
   */
 });

To describe the disableApiTermination attribute


/* This example describes the ``disableApiTermination`` attribute of the specified instance.
*/

 var params = {
  Attribute: "disableApiTermination", 
  InstanceId: "i-1234567890abcdef0"
 };
 ec2.describeInstanceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    DisableApiTermination: {
     Value: false
    }, 
    InstanceId: "i-1234567890abcdef0"
   }
   */
 });

To describe the block device mapping for an instance


/* This example describes the ``blockDeviceMapping`` attribute of the specified instance.
*/

 var params = {
  Attribute: "blockDeviceMapping", 
  InstanceId: "i-1234567890abcdef0"
 };
 ec2.describeInstanceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    BlockDeviceMappings: [
       {
      DeviceName: "/dev/sda1", 
      Ebs: {
       AttachTime: <Date Representation>, 
       DeleteOnTermination: true, 
       Status: "attached", 
       VolumeId: "vol-049df61146c4d7901"
      }
     }, 
       {
      DeviceName: "/dev/sdf", 
      Ebs: {
       AttachTime: <Date Representation>, 
       DeleteOnTermination: false, 
       Status: "attached", 
       VolumeId: "vol-049df61146c4d7901"
      }
     }
    ], 
    InstanceId: "i-1234567890abcdef0"
   }
   */
 });

Calling the describeInstanceAttribute operation

var params = {
  Attribute: instanceType | kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport | enaSupport | enclaveOptions, /* 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: {})
    • 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"
      • "enclaveOptions"
    • 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.

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:

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

      • BlockDeviceMappings — (Array<map>)

        The block device mapping of the instance.

        • DeviceName — (String)

          The device name (for example, /dev/sdh or xvdh).

        • Ebs — (map)

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

          • AttachTime — (Date)

            The time stamp when the attachment initiated.

          • DeleteOnTermination — (Boolean)

            Indicates whether the volume is deleted on instance termination.

          • Status — (String)

            The attachment state.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
          • VolumeId — (String)

            The ID of the EBS volume.

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

      • EnaSupport — (map)

        Indicates whether enhanced networking with ENA is enabled.

        • Value — (Boolean)

          The attribute value. The valid values are true or false.

      • EnclaveOptions — (map)

        To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true; otherwise, set it to false.

        • Enabled — (Boolean)

          If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

      • EbsOptimized — (map)

        Indicates whether the instance is optimized for Amazon EBS I/O.

        • Value — (Boolean)

          The attribute value. The valid values are true or false.

      • InstanceId — (String)

        The ID of the instance.

      • 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. The value is case-sensitive.

      • InstanceType — (map)

        The instance type.

        • Value — (String)

          The attribute value. The value is case-sensitive.

      • KernelId — (map)

        The kernel ID.

        • Value — (String)

          The attribute value. The value is case-sensitive.

      • 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"
      • RamdiskId — (map)

        The RAM disk ID.

        • Value — (String)

          The attribute value. The value is case-sensitive.

      • RootDeviceName — (map)

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

        • Value — (String)

          The attribute value. The value is case-sensitive.

      • SourceDestCheck — (map)

        Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is true, source/destination checks are enabled; otherwise, they are disabled. The default value is true. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.

        • 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. The value is case-sensitive.

      • UserData — (map)

        The user data.

        • Value — (String)

          The attribute value. The value is case-sensitive.

Returns:

  • (AWS.Request)

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

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

Describes the credit option for CPU usage of the specified burstable performance instances. The credit options are standard and unlimited.

If you do not specify an instance ID, Amazon EC2 returns burstable performance instances with the unlimited credit option, as well as instances that were previously configured as T2, T3, and T3a with the unlimited credit option. For example, if you resize a T2 instance, while it is configured as unlimited, to an M4 instance, Amazon EC2 returns the M4 instance.

If you specify one or more instance IDs, Amazon EC2 returns the credit option (standard or unlimited) of those instances. If you specify an instance ID that is not valid, such as an instance that is not a burstable performance instance, an error is returned.

Recently terminated instances might appear in the returned results. This interval is usually less than one hour.

If an Availability Zone is experiencing a service disruption and you specify instance IDs in the affected zone, or do not specify any instance IDs at all, the call fails. If you specify only instance IDs in an unaffected zone, the call works normally.

For more information, see Burstable performance instances in the Amazon EC2 User Guide.

Examples:

Calling the describeInstanceCreditSpecifications operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  InstanceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeInstanceCreditSpecifications(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>)

      The filters.

      • instance-id - The ID of the instance.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • InstanceIds — (Array<String>)

      The instance IDs.

      Default: Describes all your instances.

      Constraints: Maximum 1000 explicitly specified instance IDs.

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

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

      • InstanceCreditSpecifications — (Array<map>)

        Information about the credit option for CPU usage of an instance.

        • InstanceId — (String)

          The ID of the instance.

        • CpuCredits — (String)

          The credit option for CPU usage of the instance. Valid values are standard and unlimited.

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

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

Describes the tag keys that are registered to appear in scheduled event notifications for resources in the current Region.

Examples:

Calling the describeInstanceEventNotificationAttributes operation

var params = {
  DryRun: true || false
};
ec2.describeInstanceEventNotificationAttributes(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:

      • InstanceTagAttribute — (map)

        Information about the registered tag keys.

        • InstanceTagKeys — (Array<String>)

          The registered tag keys.

        • IncludeAllTagsOfInstance — (Boolean)

          Indicates wheter all tag keys in the current Region are registered to appear in scheduled event notifications. true indicates that all tag keys in the current Region are registered.

Returns:

  • (AWS.Request)

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

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

Describes the specified event windows or all event windows.

If you specify event window IDs, the output includes information for only the specified event windows. If you specify filters, the output includes information for only those event windows that meet the filter criteria. If you do not specify event windows IDs or filters, the output includes information for all event windows, which can affect performance. We recommend that you use pagination to ensure that the operation returns quickly and successfully.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the describeInstanceEventWindows operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  InstanceEventWindowIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeInstanceEventWindows(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.

    • InstanceEventWindowIds — (Array<String>)

      The IDs of the event windows.

    • Filters — (Array<map>)

      One or more filters.

      • dedicated-host-id - The event windows associated with the specified Dedicated Host ID.

      • event-window-name - The event windows associated with the specified names.

      • instance-id - The event windows associated with the specified instance ID.

      • instance-tag - The event windows associated with the specified tag and value.

      • instance-tag-key - The event windows associated with the specified tag key, regardless of the value.

      • instance-tag-value - The event windows associated with the specified tag value, regardless of the key.

      • tag:<key> - The key/value combination of a tag assigned to the event window. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value CMX, specify tag:Owner for the filter name and CMX for the filter value.

      • tag-key - The key of a tag assigned to the event window. Use this filter to find all event windows that have a tag with a specific key, regardless of the tag value.

      • tag-value - The value of a tag assigned to the event window. Use this filter to find all event windows that have a tag with a specific value, regardless of the tag key.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • 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 20 and 500. You cannot specify this parameter and the event window IDs parameter in the same call.

    • NextToken — (String)

      The token to request 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:

      • InstanceEventWindows — (Array<map>)

        Information about the event windows.

        • InstanceEventWindowId — (String)

          The ID of the event window.

        • TimeRanges — (Array<map>)

          One or more time ranges defined for the event window.

          • StartWeekDay — (String)

            The day on which the time range begins.

            Possible values include:
            • "sunday"
            • "monday"
            • "tuesday"
            • "wednesday"
            • "thursday"
            • "friday"
            • "saturday"
          • StartHour — (Integer)

            The hour when the time range begins.

          • EndWeekDay — (String)

            The day on which the time range ends.

            Possible values include:
            • "sunday"
            • "monday"
            • "tuesday"
            • "wednesday"
            • "thursday"
            • "friday"
            • "saturday"
          • EndHour — (Integer)

            The hour when the time range ends.

        • Name — (String)

          The name of the event window.

        • CronExpression — (String)

          The cron expression defined for the event window.

        • AssociationTarget — (map)

          One or more targets associated with the event window.

          • InstanceIds — (Array<String>)

            The IDs of the instances associated with the event window.

          • Tags — (Array<map>)

            The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.

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

          • DedicatedHostIds — (Array<String>)

            The IDs of the Dedicated Hosts associated with the event window.

        • State — (String)

          The current state of the event window.

          Possible values include:
          • "creating"
          • "deleting"
          • "active"
          • "deleted"
        • Tags — (Array<map>)

          The instance tags associated with the event window.

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

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

Describes the specified instances or all instances.

If you specify instance IDs, the output includes information for only the specified instances. If you specify filters, the output includes information for only those instances that meet the filter criteria. If you do not specify instance IDs or filters, the output includes information for all instances, which can affect performance. We recommend that you use pagination to ensure that the operation returns quickly and successfully.

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

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.

Service Reference:

Examples:

To describe an Amazon EC2 instance


/* This example describes the specified instance. */

 var params = {
  InstanceIds: [
     "i-1234567890abcdef0"
  ]
 };
 ec2.describeInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

To describe the instances with a specific instance type


/* This example describes the instances with the t2.micro instance type. */

 var params = {
  Filters: [
     {
    Name: "instance-type", 
    Values: [
       "t2.micro"
    ]
   }
  ]
 };
 ec2.describeInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

To describe the instances with a specific tag


/* This example describes the instances with the Purpose=test tag. */

 var params = {
  Filters: [
     {
    Name: "tag:Purpose", 
    Values: [
       "test"
    ]
   }
  ]
 };
 ec2.describeInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

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: 'NUMBER_VALUE',
  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: {})
    • Filters — (Array<map>)

      The filters.

      • affinity - The affinity setting for an instance running on a Dedicated Host (default | host).

      • architecture - The instance architecture (i386 | x86_64 | arm64).

      • 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 specified in the block device mapping (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.

      • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.

      • 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). The value xen is used for both Xen and Nitro hypervisors.

      • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z. You can use a wildcard (*), for example, 2021-09-29T*, which matches an entire day.

      • metadata-options.http-tokens - The metadata request authorization state (optional | required)

      • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64)

      • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled)

      • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled).

      • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.

      • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.

      • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.

      • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.

      • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.

      • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.

      • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.

      • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.

      • 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.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.availability-zone - The Availability Zone for the network interface.

      • network-interface.description - The description of the network interface.

      • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.

      • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.

      • network-interface.status - The status of the network interface (available) | in-use).

      • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.

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

      • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

      • owner-id - The Amazon Web Services account ID of the instance owner.

      • placement-group-name - The name of the placement group for the instance.

      • placement-partition-number - The partition in which the instance is located.

      • platform - The platform. To list only Windows instances, use windows.

      • private-dns-name - The private IPv4 DNS name of the instance.

      • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.

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

      • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.

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

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • InstanceIds — (Array<String>)

      The instance IDs.

      Default: Describes all your instances.

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

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

    • NextToken — (String)

      The token to request 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:

      • Reservations — (Array<map>)

        Information about the reservations.

        • Groups — (Array<map>)

          [EC2-Classic only] The security groups.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • Instances — (Array<map>)

          The instances.

          • AmiLaunchIndex — (Integer)

            The AMI launch index, which can be used to find this instance in the launch group.

          • ImageId — (String)

            The ID of the AMI used to launch the instance.

          • InstanceId — (String)

            The ID of the instance.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • KernelId — (String)

            The kernel associated with this instance, if applicable.

          • KeyName — (String)

            The name of the key pair, if this instance was launched with an associated key pair.

          • LaunchTime — (Date)

            The time the instance was launched.

          • Monitoring — (map)

            The monitoring for the instance.

            • State — (String)

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

              Possible values include:
              • "disabled"
              • "disabling"
              • "enabled"
              • "pending"
          • Placement — (map)

            The location where the instance launched, if applicable.

            • AvailabilityZone — (String)

              The Availability Zone of the instance.

              If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

              This parameter is not supported by CreateFleet.

            • Affinity — (String)

              The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet.

            • GroupName — (String)

              The name of the placement group the instance is in.

            • PartitionNumber — (Integer)

              The number of the partition the instance is in. Valid only if the placement group strategy is set to partition.

              This parameter is not supported by CreateFleet.

            • HostId — (String)

              The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet.

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

              This parameter is not supported by CreateFleet.

              T3 instances that use the unlimited CPU credit option do not support host tenancy.

              Possible values include:
              • "default"
              • "dedicated"
              • "host"
            • SpreadDomain — (String)

              Reserved for future use.

              This parameter is not supported by CreateFleet.

            • HostResourceGroupArn — (String)

              The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

              This parameter is not supported by CreateFleet.

          • Platform — (String)

            The value is Windows for Windows instances; otherwise blank.

            Possible values include:
            • "Windows"
          • PrivateDnsName — (String)

            (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

            [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

          • PrivateIpAddress — (String)

            The private IPv4 address assigned to the instance.

          • 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"
          • PublicDnsName — (String)

            (IPv4 only) 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.

          • PublicIpAddress — (String)

            The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.

            A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

          • RamdiskId — (String)

            The RAM disk associated with this instance, if applicable.

          • State — (map)

            The current state of the instance.

            • Code — (Integer)

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

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

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

              The valid values for instance-state-code will all be in the range of the low byte and they are:

              • 0 : pending

              • 16 : running

              • 32 : shutting-down

              • 48 : terminated

              • 64 : stopping

              • 80 : stopped

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

            • Name — (String)

              The current state of the instance.

              Possible values include:
              • "pending"
              • "running"
              • "shutting-down"
              • "terminated"
              • "stopping"
              • "stopped"
          • StateTransitionReason — (String)

            The reason for the most recent state transition. This might be an empty string.

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

          • Architecture — (String)

            The architecture of the image.

            Possible values include:
            • "i386"
            • "x86_64"
            • "arm64"
            • "x86_64_mac"
          • BlockDeviceMappings — (Array<map>)

            Any block device mapping entries for the instance.

            • DeviceName — (String)

              The device name (for example, /dev/sdh or xvdh).

            • Ebs — (map)

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

              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • DeleteOnTermination — (Boolean)

                Indicates whether the volume is deleted on instance termination.

              • Status — (String)

                The attachment state.

                Possible values include:
                • "attaching"
                • "attached"
                • "detaching"
                • "detached"
              • VolumeId — (String)

                The ID of the EBS volume.

          • ClientToken — (String)

            The idempotency token you provided when you launched the instance, if applicable.

          • EbsOptimized — (Boolean)

            Indicates whether the instance is optimized for Amazon 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.

          • EnaSupport — (Boolean)

            Specifies whether enhanced networking with ENA is enabled.

          • Hypervisor — (String)

            The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

            Possible values include:
            • "ovm"
            • "xen"
          • 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.

          • InstanceLifecycle — (String)

            Indicates whether this is a Spot Instance or a Scheduled Instance.

            Possible values include:
            • "spot"
            • "scheduled"
          • ElasticGpuAssociations — (Array<map>)

            The Elastic GPU associated with the instance.

            • ElasticGpuId — (String)

              The ID of the Elastic Graphics accelerator.

            • ElasticGpuAssociationId — (String)

              The ID of the association.

            • ElasticGpuAssociationState — (String)

              The state of the association between the instance and the Elastic Graphics accelerator.

            • ElasticGpuAssociationTime — (String)

              The time the Elastic Graphics accelerator was associated with the instance.

          • ElasticInferenceAcceleratorAssociations — (Array<map>)

            The elastic inference accelerator associated with the instance.

            • ElasticInferenceAcceleratorArn — (String)

              The Amazon Resource Name (ARN) of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationId — (String)

              The ID of the association.

            • ElasticInferenceAcceleratorAssociationState — (String)

              The state of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationTime — (Date)

              The time at which the elastic inference accelerator is associated with an instance.

          • NetworkInterfaces — (Array<map>)

            [EC2-VPC] The network interfaces for the instance.

            • Association — (map)

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

              • CarrierIp — (String)

                The carrier IP address associated with the network interface.

              • CustomerOwnedIp — (String)

                The customer-owned IP address associated with the network interface.

              • IpOwnerId — (String)

                The ID of the owner of the Elastic IP address.

              • PublicDnsName — (String)

                The public DNS name.

              • PublicIp — (String)

                The public IP address or Elastic IP address bound to the network interface.

            • Attachment — (map)

              The network interface attachment.

              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • AttachmentId — (String)

                The ID of the network interface attachment.

              • DeleteOnTermination — (Boolean)

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

              • 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"
              • NetworkCardIndex — (Integer)

                The index of the network card.

            • Description — (String)

              The description.

            • Groups — (Array<map>)

              One or more security groups.

              • GroupName — (String)

                The name of the security group.

              • GroupId — (String)

                The ID of the security group.

            • Ipv6Addresses — (Array<map>)

              One or more IPv6 addresses associated with the network interface.

              • Ipv6Address — (String)

                The IPv6 address.

            • MacAddress — (String)

              The MAC address.

            • NetworkInterfaceId — (String)

              The ID of the network interface.

            • OwnerId — (String)

              The ID of the Amazon Web Services account that created the network interface.

            • PrivateDnsName — (String)

              The private DNS name.

            • PrivateIpAddress — (String)

              The IPv4 address of the network interface within the subnet.

            • PrivateIpAddresses — (Array<map>)

              One or more private IPv4 addresses associated with the network interface.

              • Association — (map)

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

                • CarrierIp — (String)

                  The carrier IP address associated with the network interface.

                • CustomerOwnedIp — (String)

                  The customer-owned IP address associated with the network interface.

                • IpOwnerId — (String)

                  The ID of the owner of the Elastic IP address.

                • PublicDnsName — (String)

                  The public DNS name.

                • PublicIp — (String)

                  The public IP address or Elastic IP address bound to the network interface.

              • Primary — (Boolean)

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

              • PrivateDnsName — (String)

                The private IPv4 DNS name.

              • PrivateIpAddress — (String)

                The private IPv4 address of the network interface.

            • SourceDestCheck — (Boolean)

              Indicates whether source/destination checking is enabled.

            • Status — (String)

              The status of the network interface.

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

              The ID of the subnet.

            • VpcId — (String)

              The ID of the VPC.

            • InterfaceType — (String)

              Describes the type of network interface.

              Valid values: interface | efa | trunk

            • Ipv4Prefixes — (Array<map>)

              The IPv4 delegated prefixes that are assigned to the network interface.

              • Ipv4Prefix — (String)

                One or more IPv4 prefixes assigned to the network interface.

            • Ipv6Prefixes — (Array<map>)

              The IPv6 delegated prefixes that are assigned to the network interface.

              • Ipv6Prefix — (String)

                One or more IPv6 prefixes assigned to the network interface.

          • OutpostArn — (String)

            The Amazon Resource Name (ARN) of the Outpost.

          • RootDeviceName — (String)

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

          • 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"
          • SecurityGroups — (Array<map>)

            The security groups for the instance.

            • GroupName — (String)

              The name of the security group.

            • GroupId — (String)

              The ID of the security group.

          • SourceDestCheck — (Boolean)

            Indicates whether source/destination checking is enabled.

          • SpotInstanceRequestId — (String)

            If the request is a Spot Instance request, the ID of the request.

          • SriovNetSupport — (String)

            Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

          • 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.InsufficientInstanceCapacity: There was insufficient capacity available to satisfy the launch request.

              • Server.InternalError: An internal error caused the instance to terminate during launch.

              • Server.ScheduledStop: The instance was stopped due to a scheduled retirement.

              • Server.SpotInstanceShutdown: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

              • Server.SpotInstanceTermination: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

              • Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.

              • Client.InstanceTerminated: The instance was terminated or rebooted during AMI creation.

              • Client.InternalError: A client error caused the instance to terminate during launch.

              • Client.InvalidSnapshot.NotFound: The specified snapshot was not found.

              • Client.UserInitiatedHibernate: Hibernation was initiated on 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 account limits.

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

          • VirtualizationType — (String)

            The virtualization type of the instance.

            Possible values include:
            • "hvm"
            • "paravirtual"
          • CpuOptions — (map)

            The CPU options for the instance.

            • CoreCount — (Integer)

              The number of CPU cores for the instance.

            • ThreadsPerCore — (Integer)

              The number of threads per CPU core.

          • CapacityReservationId — (String)

            The ID of the Capacity Reservation.

          • CapacityReservationSpecification — (map)

            Information about the Capacity Reservation targeting option.

            • CapacityReservationPreference — (String)

              Describes the instance's Capacity Reservation preferences. Possible preferences include:

              • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

              • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

              Possible values include:
              • "open"
              • "none"
            • CapacityReservationTarget — (map)

              Information about the targeted Capacity Reservation or Capacity Reservation group.

              • CapacityReservationId — (String)

                The ID of the targeted Capacity Reservation.

              • CapacityReservationResourceGroupArn — (String)

                The ARN of the targeted Capacity Reservation group.

          • HibernationOptions — (map)

            Indicates whether the instance is enabled for hibernation.

            • Configured — (Boolean)

              If this parameter is set to true, your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

          • Licenses — (Array<map>)

            The license configurations for the instance.

            • LicenseConfigurationArn — (String)

              The Amazon Resource Name (ARN) of the license configuration.

          • MetadataOptions — (map)

            The metadata options for the instance.

            • State — (String)

              The state of the metadata option changes.

              pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

              applied - The metadata options have been successfully applied on the instance.

              Possible values include:
              • "pending"
              • "applied"
            • HttpTokens — (String)

              The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

              If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

              If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

              Possible values include:
              • "optional"
              • "required"
            • HttpPutResponseHopLimit — (Integer)

              The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

              Default: 1

              Possible values: Integers from 1 to 64

            • HttpEndpoint — (String)

              Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

              Possible values include:
              • "disabled"
              • "enabled"
            • HttpProtocolIpv6 — (String)

              Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

              Possible values include:
              • "disabled"
              • "enabled"
          • EnclaveOptions — (map)

            Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

            • Enabled — (Boolean)

              If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

          • BootMode — (String)

            The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide.

            Possible values include:
            • "legacy-bios"
            • "uefi"
          • PlatformDetails — (String)

            The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

          • UsageOperation — (String)

            The usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

          • UsageOperationUpdateTime — (Date)

            The time that the usage operation was last updated.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the reservation.

        • RequesterId — (String)

          The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).

        • ReservationId — (String)

          The ID of the reservation.

      • 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 the specified instances or all of your instances. By default, only running instances are described, unless you specifically indicate to return the status of all instances.

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 EC2 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 EC2 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 EC2 User Guide.

Service Reference:

Examples:

To describe the status of an instance


/* This example describes the current status of the specified instance. */

 var params = {
  InstanceIds: [
     "i-1234567890abcdef0"
  ]
 };
 ec2.describeInstanceStatus(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    InstanceStatuses: [
       {
      AvailabilityZone: "us-east-1d", 
      InstanceId: "i-1234567890abcdef0", 
      InstanceState: {
       Code: 16, 
       Name: "running"
      }, 
      InstanceStatus: {
       Details: [
          {
         Name: "reachability", 
         Status: "passed"
        }
       ], 
       Status: "ok"
      }, 
      SystemStatus: {
       Details: [
          {
         Name: "reachability", 
         Status: "passed"
        }
       ], 
       Status: "ok"
      }
     }
    ]
   }
   */
 });

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: 'NUMBER_VALUE',
  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: {})
    • Filters — (Array<map>)

      The 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.instance-event-id - The ID of the event whose date and time you are modifying.

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

      • event.not-before-deadline - The deadline for starting the 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 used for internal purposes 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>)

        The filter values. Filter values are case-sensitive.

    • InstanceIds — (Array<String>)

      The instance IDs.

      Default: Describes all your instances.

      Constraints: Maximum 100 explicitly specified instance IDs.

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

    • NextToken — (String)

      The token to retrieve the next page of results.

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

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

        Information about the status of the instances.

        • AvailabilityZone — (String)

          The Availability Zone of the instance.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • Events — (Array<map>)

          Any scheduled events associated with the instance.

          • InstanceEventId — (String)

            The ID of the event.

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

          • NotAfter — (Date)

            The latest scheduled end time for the event.

          • NotBefore — (Date)

            The earliest scheduled start time for the event.

          • NotBeforeDeadline — (Date)

            The deadline for starting the event.

        • InstanceId — (String)

          The ID of the instance.

        • InstanceState — (map)

          The intended state of the instance. DescribeInstanceStatus requires that an instance be in the running state.

          • Code — (Integer)

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

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

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

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

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

          • Name — (String)

            The current state of the instance.

            Possible values include:
            • "pending"
            • "running"
            • "shutting-down"
            • "terminated"
            • "stopping"
            • "stopped"
        • InstanceStatus — (map)

          Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.

          • Details — (Array<map>)

            The system instance health or application instance health.

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

            • Name — (String)

              The type of instance status.

              Possible values include:
              • "reachability"
            • Status — (String)

              The status.

              Possible values include:
              • "passed"
              • "failed"
              • "insufficient-data"
              • "initializing"
          • Status — (String)

            The status.

            Possible values include:
            • "ok"
            • "impaired"
            • "insufficient-data"
            • "not-applicable"
            • "initializing"
        • 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.

          • Details — (Array<map>)

            The system instance health or application instance health.

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

            • Name — (String)

              The type of instance status.

              Possible values include:
              • "reachability"
            • Status — (String)

              The status.

              Possible values include:
              • "passed"
              • "failed"
              • "insufficient-data"
              • "initializing"
          • Status — (String)

            The status.

            Possible values include:
            • "ok"
            • "impaired"
            • "insufficient-data"
            • "not-applicable"
            • "initializing"
      • 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:

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

Returns a list of all instance types offered. The results can be filtered by location (Region or Availability Zone). If no location is specified, the instance types offered in the current Region are returned.

Service Reference:

Examples:

Calling the describeInstanceTypeOfferings operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  LocationType: region | availability-zone | availability-zone-id,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeInstanceTypeOfferings(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.

    • LocationType — (String)

      The location type.

      Possible values include:
      • "region"
      • "availability-zone"
      • "availability-zone-id"
    • Filters — (Array<map>)

      One or more filters. Filter names and values are case-sensitive.

      • location - This depends on the location type. For example, if the location type is region (default), the location is the Region code (for example, us-east-2.)

      • instance-type - The instance type. For example, c5.2xlarge.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 next token value.

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

      • InstanceTypeOfferings — (Array<map>)

        The instance types offered.

        • InstanceType — (String)

          The instance type. For more information, see Instance types in the Amazon EC2 User Guide.

          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • LocationType — (String)

          The location type.

          Possible values include:
          • "region"
          • "availability-zone"
          • "availability-zone-id"
        • Location — (String)

          The identifier for the location. This depends on the location type. For example, if the location type is region, the location is the Region code (for example, us-east-2.)

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

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

Describes the details of the instance types that are offered in a location. The results can be filtered by the attributes of the instance types.

Service Reference:

Examples:

Calling the describeInstanceTypes operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  InstanceTypes: [
    t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeInstanceTypes(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.

    • InstanceTypes — (Array<String>)

      The instance types. For more information, see Instance types in the Amazon EC2 User Guide.

    • Filters — (Array<map>)

      One or more filters. Filter names and values are case-sensitive.

      • auto-recovery-supported - Indicates whether auto recovery is supported (true | false).

      • bare-metal - Indicates whether it is a bare metal instance type (true | false).

      • burstable-performance-supported - Indicates whether it is a burstable performance instance type (true | false).

      • current-generation - Indicates whether this instance type is the latest generation instance type of an instance family (true | false).

      • ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps - The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.

      • ebs-info.ebs-optimized-info.baseline-iops - The baseline input/output storage operations per second for an EBS-optimized instance type.

      • ebs-info.ebs-optimized-info.baseline-throughput-in-mbps - The baseline throughput performance for an EBS-optimized instance type, in MB/s.

      • ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps - The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.

      • ebs-info.ebs-optimized-info.maximum-iops - The maximum input/output storage operations per second for an EBS-optimized instance type.

      • ebs-info.ebs-optimized-info.maximum-throughput-in-mbps - The maximum throughput performance for an EBS-optimized instance type, in MB/s.

      • ebs-info.ebs-optimized-support - Indicates whether the instance type is EBS-optimized (supported | unsupported | default).

      • ebs-info.encryption-support - Indicates whether EBS encryption is supported (supported | unsupported).

      • ebs-info.nvme-support - Indicates whether non-volatile memory express (NVMe) is supported for EBS volumes (required | supported | unsupported).

      • free-tier-eligible - Indicates whether the instance type is eligible to use in the free tier (true | false).

      • hibernation-supported - Indicates whether On-Demand hibernation is supported (true | false).

      • hypervisor - The hypervisor (nitro | xen).

      • instance-storage-info.disk.count - The number of local disks.

      • instance-storage-info.disk.size-in-gb - The storage size of each instance storage disk, in GB.

      • instance-storage-info.disk.type - The storage technology for the local instance storage disks (hdd | ssd).

      • instance-storage-info.encryption-supported - Indicates whether data is encrypted at rest (required | unsupported).

      • instance-storage-info.nvme-support - Indicates whether non-volatile memory express (NVMe) is supported for instance store (required | supported | unsupported).

      • instance-storage-info.total-size-in-gb - The total amount of storage available from all local instance storage, in GB.

      • instance-storage-supported - Indicates whether the instance type has local instance storage (true | false).

      • instance-type - The instance type (for example c5.2xlarge or c5*).

      • memory-info.size-in-mib - The memory size.

      • network-info.efa-info.maximum-efa-interfaces - The maximum number of Elastic Fabric Adapters (EFAs) per instance.

      • network-info.efa-supported - Indicates whether the instance type supports Elastic Fabric Adapter (EFA) (true | false).

      • network-info.ena-support - Indicates whether Elastic Network Adapter (ENA) is supported or required (required | supported | unsupported).

      • network-info.encryption-in-transit-supported - Indicates whether the instance type automatically encrypts in-transit traffic between instances (true | false).

      • network-info.ipv4-addresses-per-interface - The maximum number of private IPv4 addresses per network interface.

      • network-info.ipv6-addresses-per-interface - The maximum number of private IPv6 addresses per network interface.

      • network-info.ipv6-supported - Indicates whether the instance type supports IPv6 (true | false).

      • network-info.maximum-network-interfaces - The maximum number of network interfaces per instance.

      • network-info.network-performance - The network performance (for example, "25 Gigabit").

      • processor-info.supported-architecture - The CPU architecture (arm64 | i386 | x86_64).

      • processor-info.sustained-clock-speed-in-ghz - The CPU clock speed, in GHz.

      • supported-boot-mode - The boot mode (legacy-bios | uefi).

      • supported-root-device-type - The root device type (ebs | instance-store).

      • supported-usage-class - The usage class (on-demand | spot).

      • supported-virtualization-type - The virtualization type (hvm | paravirtual).

      • vcpu-info.default-cores - The default number of cores for the instance type.

      • vcpu-info.default-threads-per-core - The default number of threads per core for the instance type.

      • vcpu-info.default-vcpus - The default number of vCPUs for the instance type.

      • vcpu-info.valid-cores - The number of cores that can be configured for the instance type.

      • vcpu-info.valid-threads-per-core - The number of threads per core that can be configured for the instance type. For example, "1" or "1,2".

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 next token value.

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

      • InstanceTypes — (Array<map>)

        The instance type. For more information, see Instance types in the Amazon EC2 User Guide.

        • InstanceType — (String)

          The instance type. For more information, see Instance types in the Amazon EC2 User Guide.

          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • CurrentGeneration — (Boolean)

          Indicates whether the instance type is current generation.

        • FreeTierEligible — (Boolean)

          Indicates whether the instance type is eligible for the free tier.

        • SupportedUsageClasses — (Array<String>)

          Indicates whether the instance type is offered for spot or On-Demand.

        • SupportedRootDeviceTypes — (Array<String>)

          The supported root device types.

        • SupportedVirtualizationTypes — (Array<String>)

          The supported virtualization types.

        • BareMetal — (Boolean)

          Indicates whether the instance is a bare metal instance type.

        • Hypervisor — (String)

          The hypervisor for the instance type.

          Possible values include:
          • "nitro"
          • "xen"
        • ProcessorInfo — (map)

          Describes the processor.

          • SupportedArchitectures — (Array<String>)

            The architectures supported by the instance type.

          • SustainedClockSpeedInGhz — (Float)

            The speed of the processor, in GHz.

        • VCpuInfo — (map)

          Describes the vCPU configurations for the instance type.

          • DefaultVCpus — (Integer)

            The default number of vCPUs for the instance type.

          • DefaultCores — (Integer)

            The default number of cores for the instance type.

          • DefaultThreadsPerCore — (Integer)

            The default number of threads per core for the instance type.

          • ValidCores — (Array<Integer>)

            The valid number of cores that can be configured for the instance type.

          • ValidThreadsPerCore — (Array<Integer>)

            The valid number of threads per core that can be configured for the instance type.

        • MemoryInfo — (map)

          Describes the memory for the instance type.

          • SizeInMiB — (Integer)

            The size of the memory, in MiB.

        • InstanceStorageSupported — (Boolean)

          Indicates whether instance storage is supported.

        • InstanceStorageInfo — (map)

          Describes the instance storage for the instance type.

          • TotalSizeInGB — (Integer)

            The total size of the disks, in GB.

          • Disks — (Array<map>)

            Describes the disks that are available for the instance type.

            • SizeInGB — (Integer)

              The size of the disk in GB.

            • Count — (Integer)

              The number of disks with this configuration.

            • Type — (String)

              The type of disk.

              Possible values include:
              • "hdd"
              • "ssd"
          • NvmeSupport — (String)

            Indicates whether non-volatile memory express (NVMe) is supported.

            Possible values include:
            • "unsupported"
            • "supported"
            • "required"
          • EncryptionSupport — (String)

            Indicates whether data is encrypted at rest.

            Possible values include:
            • "unsupported"
            • "required"
        • EbsInfo — (map)

          Describes the Amazon EBS settings for the instance type.

          • EbsOptimizedSupport — (String)

            Indicates whether the instance type is Amazon EBS-optimized. For more information, see Amazon EBS-optimized instances in Amazon EC2 User Guide.

            Possible values include:
            • "unsupported"
            • "supported"
            • "default"
          • EncryptionSupport — (String)

            Indicates whether Amazon EBS encryption is supported.

            Possible values include:
            • "unsupported"
            • "supported"
          • EbsOptimizedInfo — (map)

            Describes the optimized EBS performance for the instance type.

            • BaselineBandwidthInMbps — (Integer)

              The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.

            • BaselineThroughputInMBps — (Float)

              The baseline throughput performance for an EBS-optimized instance type, in MB/s.

            • BaselineIops — (Integer)

              The baseline input/output storage operations per seconds for an EBS-optimized instance type.

            • MaximumBandwidthInMbps — (Integer)

              The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.

            • MaximumThroughputInMBps — (Float)

              The maximum throughput performance for an EBS-optimized instance type, in MB/s.

            • MaximumIops — (Integer)

              The maximum input/output storage operations per second for an EBS-optimized instance type.

          • NvmeSupport — (String)

            Indicates whether non-volatile memory express (NVMe) is supported.

            Possible values include:
            • "unsupported"
            • "supported"
            • "required"
        • NetworkInfo — (map)

          Describes the network settings for the instance type.

          • NetworkPerformance — (String)

            The network performance.

          • MaximumNetworkInterfaces — (Integer)

            The maximum number of network interfaces for the instance type.

          • MaximumNetworkCards — (Integer)

            The maximum number of physical network cards that can be allocated to the instance.

          • DefaultNetworkCardIndex — (Integer)

            The index of the default network card, starting at 0.

          • NetworkCards — (Array<map>)

            Describes the network cards for the instance type.

            • NetworkCardIndex — (Integer)

              The index of the network card.

            • NetworkPerformance — (String)

              The network performance of the network card.

            • MaximumNetworkInterfaces — (Integer)

              The maximum number of network interfaces for the network card.

          • Ipv4AddressesPerInterface — (Integer)

            The maximum number of IPv4 addresses per network interface.

          • Ipv6AddressesPerInterface — (Integer)

            The maximum number of IPv6 addresses per network interface.

          • Ipv6Supported — (Boolean)

            Indicates whether IPv6 is supported.

          • EnaSupport — (String)

            Indicates whether Elastic Network Adapter (ENA) is supported.

            Possible values include:
            • "unsupported"
            • "supported"
            • "required"
          • EfaSupported — (Boolean)

            Indicates whether Elastic Fabric Adapter (EFA) is supported.

          • EfaInfo — (map)

            Describes the Elastic Fabric Adapters for the instance type.

            • MaximumEfaInterfaces — (Integer)

              The maximum number of Elastic Fabric Adapters for the instance type.

          • EncryptionInTransitSupported — (Boolean)

            Indicates whether the instance type automatically encrypts in-transit traffic between instances.

        • GpuInfo — (map)

          Describes the GPU accelerator settings for the instance type.

          • Gpus — (Array<map>)

            Describes the GPU accelerators for the instance type.

            • Name — (String)

              The name of the GPU accelerator.

            • Manufacturer — (String)

              The manufacturer of the GPU accelerator.

            • Count — (Integer)

              The number of GPUs for the instance type.

            • MemoryInfo — (map)

              Describes the memory available to the GPU accelerator.

              • SizeInMiB — (Integer)

                The size of the memory available to the GPU accelerator, in MiB.

          • TotalGpuMemoryInMiB — (Integer)

            The total size of the memory for the GPU accelerators for the instance type, in MiB.

        • FpgaInfo — (map)

          Describes the FPGA accelerator settings for the instance type.

          • Fpgas — (Array<map>)

            Describes the FPGAs for the instance type.

            • Name — (String)

              The name of the FPGA accelerator.

            • Manufacturer — (String)

              The manufacturer of the FPGA accelerator.

            • Count — (Integer)

              The count of FPGA accelerators for the instance type.

            • MemoryInfo — (map)

              Describes the memory for the FPGA accelerator for the instance type.

              • SizeInMiB — (Integer)

                The size of the memory available to the FPGA accelerator, in MiB.

          • TotalFpgaMemoryInMiB — (Integer)

            The total memory of all FPGA accelerators for the instance type.

        • PlacementGroupInfo — (map)

          Describes the placement group settings for the instance type.

          • SupportedStrategies — (Array<String>)

            The supported placement group types.

        • InferenceAcceleratorInfo — (map)

          Describes the Inference accelerator settings for the instance type.

          • Accelerators — (Array<map>)

            Describes the Inference accelerators for the instance type.

            • Count — (Integer)

              The number of Inference accelerators for the instance type.

            • Name — (String)

              The name of the Inference accelerator.

            • Manufacturer — (String)

              The manufacturer of the Inference accelerator.

        • HibernationSupported — (Boolean)

          Indicates whether On-Demand hibernation is supported.

        • BurstablePerformanceSupported — (Boolean)

          Indicates whether the instance type is a burstable performance instance type.

        • DedicatedHostsSupported — (Boolean)

          Indicates whether Dedicated Hosts are supported on the instance type.

        • AutoRecoverySupported — (Boolean)

          Indicates whether auto recovery is supported.

        • SupportedBootModes — (Array<String>)

          The supported boot modes. For more information, see Boot modes in the Amazon EC2 User Guide.

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

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

Describes one or more of your internet gateways.

Service Reference:

Examples:

To describe the Internet gateway for a VPC


/* This example describes the Internet gateway for the specified VPC. */

 var params = {
  Filters: [
     {
    Name: "attachment.vpc-id", 
    Values: [
       "vpc-a01106c2"
    ]
   }
  ]
 };
 ec2.describeInternetGateways(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    InternetGateways: [
       {
      Attachments: [
         {
        State: "available", 
        VpcId: "vpc-a01106c2"
       }
      ], 
      InternetGatewayId: "igw-c0a643a9", 
      Tags: [
      ]
     }
    ]
   }
   */
 });

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 */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
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: {})
    • 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.

      • owner-id - The ID of the Amazon Web Services account that owns the internet gateway.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

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

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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.

        • Attachments — (Array<map>)

          Any VPCs attached to the internet gateway.

          • State — (String)

            The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
          • VpcId — (String)

            The ID of the VPC.

        • InternetGatewayId — (String)

          The ID of the internet gateway.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the internet gateway.

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

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

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

Describes your IPv6 address pools.

Service Reference:

Examples:

Calling the describeIpv6Pools operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  PoolIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeIpv6Pools(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: {})
    • PoolIds — (Array<String>)

      The IDs of the IPv6 address pools.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

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

      • Ipv6Pools — (Array<map>)

        Information about the IPv6 address pools.

        • PoolId — (String)

          The ID of the address pool.

        • Description — (String)

          The description for the address pool.

        • PoolCidrBlocks — (Array<map>)

          The CIDR blocks for the address pool.

          • Cidr — (String)

            The CIDR block.

        • Tags — (Array<map>)

          Any tags for the address pool.

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

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

Describes the specified key pairs or all of your key pairs.

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

Service Reference:

Examples:

To display a key pair


/* This example displays the fingerprint for the specified key. */

 var params = {
  KeyNames: [
     "my-key-pair"
  ]
 };
 ec2.describeKeyPairs(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    KeyPairs: [
       {
      KeyFingerprint: "1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f", 
      KeyName: "my-key-pair"
     }
    ]
   }
   */
 });

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 */
  ],
  KeyPairIds: [
    '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: {})
    • Filters — (Array<map>)

      The filters.

      • key-pair-id - The ID of the key pair.

      • fingerprint - The fingerprint of the key pair.

      • key-name - The name of the key pair.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • KeyNames — (Array<String>)

      The key pair names.

      Default: Describes all of your key pairs.

    • KeyPairIds — (Array<String>)

      The IDs of the key pairs.

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

      • KeyPairs — (Array<map>)

        Information about the key pairs.

        • KeyPairId — (String)

          The ID of the key pair.

        • KeyFingerprint — (String)

          If you used CreateKeyPair to create the key pair:

          • For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.

          • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.

          If you used ImportKeyPair to provide Amazon Web Services the public key:

          • For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC4716.

          • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.

        • KeyName — (String)

          The name of the key pair.

        • KeyType — (String)

          The type of key pair.

          Possible values include:
          • "rsa"
          • "ed25519"
        • Tags — (Array<map>)

          Any tags applied to the key pair.

          • 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:

describeLaunchTemplates(params = {}, callback) ⇒ AWS.Request

Describes one or more launch templates.

Service Reference:

Examples:

To describe a launch template


/* This example describes the specified launch template. */

 var params = {
  LaunchTemplateIds: [
     "lt-01238c059e3466abc"
  ]
 };
 ec2.describeLaunchTemplates(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    LaunchTemplates: [
       {
      CreateTime: <Date Representation>, 
      CreatedBy: "arn:aws:iam::123456789012:root", 
      DefaultVersionNumber: 1, 
      LatestVersionNumber: 1, 
      LaunchTemplateId: "lt-01238c059e3466abc", 
      LaunchTemplateName: "my-template"
     }
    ]
   }
   */
 });

Calling the describeLaunchTemplates operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  LaunchTemplateIds: [
    'STRING_VALUE',
    /* more items */
  ],
  LaunchTemplateNames: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeLaunchTemplates(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.

    • LaunchTemplateIds — (Array<String>)

      One or more launch template IDs.

    • LaunchTemplateNames — (Array<String>)

      One or more launch template names.

    • Filters — (Array<map>)

      One or more filters.

      • create-time - The time the launch template was created.

      • launch-template-name - The name of the launch template.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 1 and 200.

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:

      • LaunchTemplates — (Array<map>)

        Information about the launch templates.

        • LaunchTemplateId — (String)

          The ID of the launch template.

        • LaunchTemplateName — (String)

          The name of the launch template.

        • CreateTime — (Date)

          The time launch template was created.

        • CreatedBy — (String)

          The principal that created the launch template.

        • DefaultVersionNumber — (Integer)

          The version number of the default version of the launch template.

        • LatestVersionNumber — (Integer)

          The version number of the latest version of the launch template.

        • Tags — (Array<map>)

          The tags for the launch template.

          • 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.

describeLaunchTemplateVersions(params = {}, callback) ⇒ AWS.Request

Describes one or more versions of a specified launch template. You can describe all versions, individual versions, or a range of versions. You can also describe all the latest versions or all the default versions of all the launch templates in your account.

Service Reference:

Examples:

To describe the versions for a launch template


/* This example describes the versions for the specified launch template. */

 var params = {
  LaunchTemplateId: "068f72b72934aff71"
 };
 ec2.describeLaunchTemplateVersions(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    LaunchTemplateVersions: [
       {
      CreateTime: <Date Representation>, 
      CreatedBy: "arn:aws:iam::123456789102:root", 
      DefaultVersion: false, 
      LaunchTemplateData: {
       ImageId: "ami-6057e21a", 
       InstanceType: "t2.medium", 
       KeyName: "kp-us-east", 
       NetworkInterfaces: [
          {
         DeviceIndex: 0, 
         Groups: [
            "sg-7c227019"
         ], 
         SubnetId: "subnet-1a2b3c4d"
        }
       ]
      }, 
      LaunchTemplateId: "lt-068f72b72934aff71", 
      LaunchTemplateName: "Webservers", 
      VersionNumber: 2
     }, 
       {
      CreateTime: <Date Representation>, 
      CreatedBy: "arn:aws:iam::123456789102:root", 
      DefaultVersion: true, 
      LaunchTemplateData: {
       ImageId: "ami-aabbcc11", 
       InstanceType: "t2.medium", 
       KeyName: "kp-us-east", 
       NetworkInterfaces: [
          {
         AssociatePublicIpAddress: true, 
         DeleteOnTermination: false, 
         DeviceIndex: 0, 
         Groups: [
            "sg-7c227019"
         ], 
         SubnetId: "subnet-7b16de0c"
        }
       ], 
       UserData: ""
      }, 
      LaunchTemplateId: "lt-068f72b72934aff71", 
      LaunchTemplateName: "Webservers", 
      VersionNumber: 1
     }
    ]
   }
   */
 });

Calling the describeLaunchTemplateVersions operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  LaunchTemplateId: 'STRING_VALUE',
  LaunchTemplateName: 'STRING_VALUE',
  MaxResults: 'NUMBER_VALUE',
  MaxVersion: 'STRING_VALUE',
  MinVersion: 'STRING_VALUE',
  NextToken: 'STRING_VALUE',
  Versions: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeLaunchTemplateVersions(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.

    • LaunchTemplateId — (String)

      The ID of the launch template. To describe one or more versions of a specified launch template, you must specify either the launch template ID or the launch template name in the request. To describe all the latest or default launch template versions in your account, you must omit this parameter.

    • LaunchTemplateName — (String)

      The name of the launch template. To describe one or more versions of a specified launch template, you must specify either the launch template ID or the launch template name in the request. To describe all the latest or default launch template versions in your account, you must omit this parameter.

    • Versions — (Array<String>)

      One or more versions of the launch template. Valid values depend on whether you are describing a specified launch template (by ID or name) or all launch templates in your account.

      To describe one or more versions of a specified launch template, valid values are $Latest, $Default, and numbers.

      To describe all launch templates in your account that are defined as the latest version, the valid value is $Latest. To describe all launch templates in your account that are defined as the default version, the valid value is $Default. You can specify $Latest and $Default in the same call. You cannot specify numbers.

    • MinVersion — (String)

      The version number after which to describe launch template versions.

    • MaxVersion — (String)

      The version number up to which to describe launch template versions.

    • 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 1 and 200.

    • Filters — (Array<map>)

      One or more filters.

      • create-time - The time the launch template version was created.

      • ebs-optimized - A boolean that indicates whether the instance is optimized for Amazon EBS I/O.

      • iam-instance-profile - The ARN of the IAM instance profile.

      • image-id - The ID of the AMI.

      • instance-type - The instance type.

      • is-default-version - A boolean that indicates whether the launch template version is the default version.

      • kernel-id - The kernel ID.

      • ram-disk-id - The RAM disk ID.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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:

      • LaunchTemplateVersions — (Array<map>)

        Information about the launch template versions.

        • LaunchTemplateId — (String)

          The ID of the launch template.

        • LaunchTemplateName — (String)

          The name of the launch template.

        • VersionNumber — (Integer)

          The version number.

        • VersionDescription — (String)

          The description for the version.

        • CreateTime — (Date)

          The time the version was created.

        • CreatedBy — (String)

          The principal that created the version.

        • DefaultVersion — (Boolean)

          Indicates whether the version is the default version.

        • LaunchTemplateData — (map)

          Information about the launch template.

          • KernelId — (String)

            The ID of the kernel, if applicable.

          • EbsOptimized — (Boolean)

            Indicates whether the instance is optimized for Amazon EBS I/O.

          • IamInstanceProfile — (map)

            The IAM instance profile.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the instance profile.

            • Name — (String)

              The name of the instance profile.

          • BlockDeviceMappings — (Array<map>)

            The block device mappings.

            • DeviceName — (String)

              The device name.

            • VirtualName — (String)

              The virtual device name (ephemeralN).

            • Ebs — (map)

              Information about the block device for an EBS volume.

              • Encrypted — (Boolean)

                Indicates whether the EBS volume is encrypted.

              • DeleteOnTermination — (Boolean)

                Indicates whether the EBS volume is deleted on instance termination.

              • Iops — (Integer)

                The number of I/O operations per second (IOPS) that the volume supports.

              • KmsKeyId — (String)

                The ARN of the Key Management Service (KMS) CMK used for encryption.

              • SnapshotId — (String)

                The ID of the snapshot.

              • VolumeSize — (Integer)

                The size of the volume, in GiB.

              • VolumeType — (String)

                The volume type.

                Possible values include:
                • "standard"
                • "io1"
                • "io2"
                • "gp2"
                • "sc1"
                • "st1"
                • "gp3"
              • Throughput — (Integer)

                The throughput that the volume supports, in MiB/s.

            • NoDevice — (String)

              To omit the device from the block device mapping, specify an empty string.

          • NetworkInterfaces — (Array<map>)

            The network interfaces.

            • AssociateCarrierIpAddress — (Boolean)

              Indicates whether to associate a Carrier IP address with eth0 for a new network interface.

              Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Wavelength Developer Guide.

            • AssociatePublicIpAddress — (Boolean)

              Indicates whether to associate a public IPv4 address with eth0 for a new network interface.

            • DeleteOnTermination — (Boolean)

              Indicates whether the network interface is deleted when the instance is terminated.

            • Description — (String)

              A description for the network interface.

            • DeviceIndex — (Integer)

              The device index for the network interface attachment.

            • Groups — (Array<String>)

              The IDs of one or more security groups.

            • InterfaceType — (String)

              The type of network interface.

            • Ipv6AddressCount — (Integer)

              The number of IPv6 addresses for the network interface.

            • Ipv6Addresses — (Array<map>)

              The IPv6 addresses for the network interface.

              • Ipv6Address — (String)

                The IPv6 address.

            • NetworkInterfaceId — (String)

              The ID of the network interface.

            • PrivateIpAddress — (String)

              The primary private IPv4 address of the network interface.

            • PrivateIpAddresses — (Array<map>)

              One or more private IPv4 addresses.

              • Primary — (Boolean)

                Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

              • PrivateIpAddress — (String)

                The private IPv4 addresses.

            • SecondaryPrivateIpAddressCount — (Integer)

              The number of secondary private IPv4 addresses for the network interface.

            • SubnetId — (String)

              The ID of the subnet for the network interface.

            • NetworkCardIndex — (Integer)

              The index of the network card.

            • Ipv4Prefixes — (Array<map>)

              One or more IPv4 prefixes assigned to the network interface.

              • Ipv4Prefix — (String)

                One or more IPv4 delegated prefixes assigned to the network interface.

            • Ipv4PrefixCount — (Integer)

              The number of IPv4 prefixes that Amazon Web Services automatically assigned to the network interface.

            • Ipv6Prefixes — (Array<map>)

              One or more IPv6 prefixes assigned to the network interface.

              • Ipv6Prefix — (String)

                One or more IPv6 delegated prefixes assigned to the network interface.

            • Ipv6PrefixCount — (Integer)

              The number of IPv6 prefixes that Amazon Web Services automatically assigned to the network interface.

          • ImageId — (String)

            The ID of the AMI that was used to launch the instance.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • KeyName — (String)

            The name of the key pair.

          • Monitoring — (map)

            The monitoring for the instance.

            • Enabled — (Boolean)

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

          • Placement — (map)

            The placement of the instance.

            • AvailabilityZone — (String)

              The Availability Zone of the instance.

            • Affinity — (String)

              The affinity setting for the instance on the Dedicated Host.

            • GroupName — (String)

              The name of the placement group for the instance.

            • HostId — (String)

              The ID of the Dedicated Host for the instance.

            • 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.

              Possible values include:
              • "default"
              • "dedicated"
              • "host"
            • SpreadDomain — (String)

              Reserved for future use.

            • HostResourceGroupArn — (String)

              The ARN of the host resource group in which to launch the instances.

            • PartitionNumber — (Integer)

              The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.

          • RamDiskId — (String)

            The ID of the RAM disk, if applicable.

          • DisableApiTermination — (Boolean)

            If set to true, indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.

          • InstanceInitiatedShutdownBehavior — (String)

            Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

            Possible values include:
            • "stop"
            • "terminate"
          • UserData — (String)

            The user data for the instance.

          • TagSpecifications — (Array<map>)

            The tags.

            • ResourceType — (String)

              The type of resource.

              Possible values include:
              • "capacity-reservation"
              • "client-vpn-endpoint"
              • "customer-gateway"
              • "carrier-gateway"
              • "dedicated-host"
              • "dhcp-options"
              • "egress-only-internet-gateway"
              • "elastic-ip"
              • "elastic-gpu"
              • "export-image-task"
              • "export-instance-task"
              • "fleet"
              • "fpga-image"
              • "host-reservation"
              • "image"
              • "import-image-task"
              • "import-snapshot-task"
              • "instance"
              • "instance-event-window"
              • "internet-gateway"
              • "ipv4pool-ec2"
              • "ipv6pool-ec2"
              • "key-pair"
              • "launch-template"
              • "local-gateway"
              • "local-gateway-route-table"
              • "local-gateway-virtual-interface"
              • "local-gateway-virtual-interface-group"
              • "local-gateway-route-table-vpc-association"
              • "local-gateway-route-table-virtual-interface-group-association"
              • "natgateway"
              • "network-acl"
              • "network-interface"
              • "network-insights-analysis"
              • "network-insights-path"
              • "placement-group"
              • "prefix-list"
              • "replace-root-volume-task"
              • "reserved-instances"
              • "route-table"
              • "security-group"
              • "security-group-rule"
              • "snapshot"
              • "spot-fleet-request"
              • "spot-instances-request"
              • "subnet"
              • "traffic-mirror-filter"
              • "traffic-mirror-session"
              • "traffic-mirror-target"
              • "transit-gateway"
              • "transit-gateway-attachment"
              • "transit-gateway-connect-peer"
              • "transit-gateway-multicast-domain"
              • "transit-gateway-route-table"
              • "volume"
              • "vpc"
              • "vpc-endpoint"
              • "vpc-endpoint-service"
              • "vpc-peering-connection"
              • "vpn-connection"
              • "vpn-gateway"
              • "vpc-flow-log"
            • Tags — (Array<map>)

              The tags for 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.

          • ElasticGpuSpecifications — (Array<map>)

            The elastic GPU specification.

            • Type — (String)

              The elastic GPU type.

          • ElasticInferenceAccelerators — (Array<map>)

            The elastic inference accelerator for the instance.

            • Type — (String)

              The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

            • Count — (Integer)

              The number of elastic inference accelerators to attach to the instance.

              Default: 1

          • SecurityGroupIds — (Array<String>)

            The security group IDs.

          • SecurityGroups — (Array<String>)

            The security group names.

          • InstanceMarketOptions — (map)

            The market (purchasing) option for the instances.

            • MarketType — (String)

              The market type.

              Possible values include:
              • "spot"
            • SpotOptions — (map)

              The options for Spot Instances.

              • MaxPrice — (String)

                The maximum hourly price you're willing to pay for the Spot Instances.

              • SpotInstanceType — (String)

                The Spot Instance request type.

                Possible values include:
                • "one-time"
                • "persistent"
              • BlockDurationMinutes — (Integer)

                The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).

              • ValidUntil — (Date)

                The end date of the request. For a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

              • InstanceInterruptionBehavior — (String)

                The behavior when a Spot Instance is interrupted.

                Possible values include:
                • "hibernate"
                • "stop"
                • "terminate"
          • CreditSpecification — (map)

            The credit option for CPU usage of the instance.

            • CpuCredits — (String)

              The credit option for CPU usage of a T2, T3, or T3a instance. Valid values are standard and unlimited.

          • CpuOptions — (map)

            The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon Elastic Compute Cloud User Guide.

            • CoreCount — (Integer)

              The number of CPU cores for the instance.

            • ThreadsPerCore — (Integer)

              The number of threads per CPU core.

          • CapacityReservationSpecification — (map)

            Information about the Capacity Reservation targeting option.

            • CapacityReservationPreference — (String)

              Indicates the instance's Capacity Reservation preferences. Possible preferences include:

              • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

              • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

              Possible values include:
              • "open"
              • "none"
            • CapacityReservationTarget — (map)

              Information about the target Capacity Reservation or Capacity Reservation group.

              • CapacityReservationId — (String)

                The ID of the targeted Capacity Reservation.

              • CapacityReservationResourceGroupArn — (String)

                The ARN of the targeted Capacity Reservation group.

          • LicenseSpecifications — (Array<map>)

            The license configurations.

            • LicenseConfigurationArn — (String)

              The Amazon Resource Name (ARN) of the license configuration.

          • HibernationOptions — (map)

            Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide.

            • Configured — (Boolean)

              If this parameter is set to true, the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

          • MetadataOptions — (map)

            The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide.

            • State — (String)

              The state of the metadata option changes.

              pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

              applied - The metadata options have been successfully applied on the instance.

              Possible values include:
              • "pending"
              • "applied"
            • HttpTokens — (String)

              The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

              If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

              If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

              Possible values include:
              • "optional"
              • "required"
            • HttpPutResponseHopLimit — (Integer)

              The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

              Default: 1

              Possible values: Integers from 1 to 64

            • HttpEndpoint — (String)

              This parameter enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled.

              Note: If you specify a value of disabled, you will not be able to access your instance metadata.
              Possible values include:
              • "disabled"
              • "enabled"
            • HttpProtocolIpv6 — (String)

              Enables or disables the IPv6 endpoint for the instance metadata service.

              Default: disabled

              Possible values include:
              • "disabled"
              • "enabled"
          • EnclaveOptions — (map)

            Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

            • Enabled — (Boolean)

              If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

          • InstanceRequirements — (map)

            The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.

            If you specify InstanceRequirements, you can't specify InstanceTypes.

            • VCpuCount — (map)

              The minimum and maximum number of vCPUs.

              • Min — (Integer)

                The minimum number of vCPUs. If the value is 0, there is no minimum limit.

              • Max — (Integer)

                The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

            • MemoryMiB — (map)

              The minimum and maximum amount of memory, in MiB.

              • Min — (Integer)

                The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

            • CpuManufacturers — (Array<String>)

              The CPU manufacturers to include.

              • For instance types with Intel CPUs, specify intel.

              • For instance types with AMD CPUs, specify amd.

              • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

              Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

              Default: Any manufacturer

            • MemoryGiBPerVCpu — (map)

              The minimum and maximum amount of memory per vCPU, in GiB.

              Default: No minimum or maximum limits

              • Min — (Float)

                The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

              • Max — (Float)

                The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

            • ExcludedInstanceTypes — (Array<String>)

              The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

              For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

              Default: No excluded instance types

            • InstanceGenerations — (Array<String>)

              Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

              For current generation instance types, specify current.

              For previous generation instance types, specify previous.

              Default: Current and previous generation instance types

            • SpotMaxPricePercentageOverLowestPrice — (Integer)

              The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999.

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

              Default: 100

            • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

              The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999.

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

              Default: 20

            • BareMetal — (String)

              Indicates whether bare metal instance types must be included, excluded, or required.

              • To include bare metal instance types, specify included.

              • To require only bare metal instance types, specify required.

              • To exclude bare metal instance types, specify excluded.

              Default: excluded

              Possible values include:
              • "included"
              • "required"
              • "excluded"
            • BurstablePerformance — (String)

              Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

              • To include burstable performance instance types, specify included.

              • To require only burstable performance instance types, specify required.

              • To exclude burstable performance instance types, specify excluded.

              Default: excluded

              Possible values include:
              • "included"
              • "required"
              • "excluded"
            • RequireHibernateSupport — (Boolean)

              Indicates whether instance types must support hibernation for On-Demand Instances.

              This parameter is not supported for GetSpotPlacementScores.

              Default: false

            • NetworkInterfaceCount — (map)

              The minimum and maximum number of network interfaces.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

            • LocalStorage — (String)

              Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

              • To include instance types with instance store volumes, specify included.

              • To require only instance types with instance store volumes, specify required.

              • To exclude instance types with instance store volumes, specify excluded.

              Default: included

              Possible values include:
              • "included"
              • "required"
              • "excluded"
            • LocalStorageTypes — (Array<String>)

              The type of local storage that is required.

              • For instance types with hard disk drive (HDD) storage, specify hdd.

              • For instance types with solid state drive (SDD) storage, specify sdd.

              Default: hdd and sdd

            • TotalLocalStorageGB — (map)

              The minimum and maximum amount of total local storage, in GB.

              Default: No minimum or maximum limits

              • Min — (Float)

                The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

              • Max — (Float)

                The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

            • BaselineEbsBandwidthMbps — (map)

              The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

            • AcceleratorTypes — (Array<String>)

              The accelerator types that must be on the instance type.

              • For instance types with GPU accelerators, specify gpu.

              • For instance types with FPGA accelerators, specify fpga.

              • For instance types with inference accelerators, specify inference.

              Default: Any accelerator type

            • AcceleratorCount — (map)

              The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

              To exclude accelerator-enabled instance types, set Max to 0.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

            • AcceleratorManufacturers — (Array<String>)

              Indicates whether instance types must have accelerators by specific manufacturers.

              • For instance types with NVIDIA devices, specify nvidia.

              • For instance types with AMD devices, specify amd.

              • For instance types with Amazon Web Services devices, specify amazon-web-services.

              • For instance types with Xilinx devices, specify xilinx.

              Default: Any manufacturer

            • AcceleratorNames — (Array<String>)

              The accelerators that must be on the instance type.

              • For instance types with NVIDIA A100 GPUs, specify a100.

              • For instance types with NVIDIA V100 GPUs, specify v100.

              • For instance types with NVIDIA K80 GPUs, specify k80.

              • For instance types with NVIDIA T4 GPUs, specify t4.

              • For instance types with NVIDIA M60 GPUs, specify m60.

              • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

              • For instance types with Xilinx VU9P FPGAs, specify vu9p.

              Default: Any accelerator

            • AcceleratorTotalMemoryMiB — (map)

              The minimum and maximum amount of total accelerator memory, in MiB.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

      • 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.

describeLocalGatewayRouteTables(params = {}, callback) ⇒ AWS.Request

Describes one or more local gateway route tables. By default, all local gateway route tables are described. Alternatively, you can filter the results.

Service Reference:

Examples:

Calling the describeLocalGatewayRouteTables operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  LocalGatewayRouteTableIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeLocalGatewayRouteTables(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: {})
    • LocalGatewayRouteTableIds — (Array<String>)

      The IDs of the local gateway route tables.

    • Filters — (Array<map>)

      One or more filters.

      • local-gateway-id - The ID of a local gateway.

      • local-gateway-route-table-id - The ID of a local gateway route table.

      • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

      • state - The state of the local gateway route table.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • LocalGatewayRouteTables — (Array<map>)

        Information about the local gateway route tables.

        • LocalGatewayRouteTableId — (String)

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn — (String)

          The Amazon Resource Name (ARN) of the local gateway route table.

        • LocalGatewayId — (String)

          The ID of the local gateway.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the local gateway route table.

        • State — (String)

          The state of the local gateway route table.

        • Tags — (Array<map>)

          The tags assigned to the local gateway 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.

      • 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.

describeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(params = {}, callback) ⇒ AWS.Request

Describes the associations between virtual interface groups and local gateway route tables.

Examples:

Calling the describeLocalGatewayRouteTableVirtualInterfaceGroupAssociations operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(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: {})
    • LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds — (Array<String>)

      The IDs of the associations.

    • Filters — (Array<map>)

      One or more filters.

      • local-gateway-id - The ID of a local gateway.

      • local-gateway-route-table-id - The ID of the local gateway route table.

      • local-gateway-route-table-virtual-interface-group-association-id - The ID of the association.

      • local-gateway-route-table-virtual-interface-group-id - The ID of the virtual interface group.

      • state - The state of the association.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • LocalGatewayRouteTableVirtualInterfaceGroupAssociations — (Array<map>)

        Information about the associations.

        • LocalGatewayRouteTableVirtualInterfaceGroupAssociationId — (String)

          The ID of the association.

        • LocalGatewayVirtualInterfaceGroupId — (String)

          The ID of the virtual interface group.

        • LocalGatewayId — (String)

          The ID of the local gateway.

        • LocalGatewayRouteTableId — (String)

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn — (String)

          The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.

        • State — (String)

          The state of the association.

        • Tags — (Array<map>)

          The tags assigned to the association.

          • 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.

describeLocalGatewayRouteTableVpcAssociations(params = {}, callback) ⇒ AWS.Request

Describes the specified associations between VPCs and local gateway route tables.

Examples:

Calling the describeLocalGatewayRouteTableVpcAssociations operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  LocalGatewayRouteTableVpcAssociationIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeLocalGatewayRouteTableVpcAssociations(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: {})
    • LocalGatewayRouteTableVpcAssociationIds — (Array<String>)

      The IDs of the associations.

    • Filters — (Array<map>)

      One or more filters.

      • local-gateway-id - The ID of a local gateway.

      • local-gateway-route-table-id - The ID of the local gateway route table.

      • local-gateway-route-table-vpc-association-id - The ID of the association.

      • state - The state of the association.

      • vpc-id - The ID of the VPC.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • LocalGatewayRouteTableVpcAssociations — (Array<map>)

        Information about the associations.

        • LocalGatewayRouteTableVpcAssociationId — (String)

          The ID of the association.

        • LocalGatewayRouteTableId — (String)

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn — (String)

          The Amazon Resource Name (ARN) of the local gateway route table for the association.

        • LocalGatewayId — (String)

          The ID of the local gateway.

        • VpcId — (String)

          The ID of the VPC.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the local gateway route table for the association.

        • State — (String)

          The state of the association.

        • Tags — (Array<map>)

          The tags assigned to the association.

          • 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.

describeLocalGateways(params = {}, callback) ⇒ AWS.Request

Describes one or more local gateways. By default, all local gateways are described. Alternatively, you can filter the results.

Service Reference:

Examples:

Calling the describeLocalGateways operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  LocalGatewayIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeLocalGateways(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: {})
    • LocalGatewayIds — (Array<String>)

      One or more filters.

      • local-gateway-id - The ID of a local gateway.

      • local-gateway-route-table-id - The ID of the local gateway route table.

      • local-gateway-route-table-virtual-interface-group-association-id - The ID of the association.

      • local-gateway-route-table-virtual-interface-group-id - The ID of the virtual interface group.

      • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

      • state - The state of the association.

    • Filters — (Array<map>)

      One or more filters.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • LocalGateways — (Array<map>)

        Information about the local gateways.

        • LocalGatewayId — (String)

          The ID of the local gateway.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the local gateway.

        • State — (String)

          The state of the local gateway.

        • Tags — (Array<map>)

          The tags assigned to the local 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.

      • 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.

describeLocalGatewayVirtualInterfaceGroups(params = {}, callback) ⇒ AWS.Request

Describes the specified local gateway virtual interface groups.

Examples:

Calling the describeLocalGatewayVirtualInterfaceGroups operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  LocalGatewayVirtualInterfaceGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeLocalGatewayVirtualInterfaceGroups(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: {})
    • LocalGatewayVirtualInterfaceGroupIds — (Array<String>)

      The IDs of the virtual interface groups.

    • Filters — (Array<map>)

      One or more filters.

      • local-gateway-id - The ID of a local gateway.

      • local-gateway-virtual-interface-id - The ID of the virtual interface.

      • local-gateway-virtual-interface-group-id - The ID of the virtual interface group.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • LocalGatewayVirtualInterfaceGroups — (Array<map>)

        The virtual interface groups.

        • LocalGatewayVirtualInterfaceGroupId — (String)

          The ID of the virtual interface group.

        • LocalGatewayVirtualInterfaceIds — (Array<String>)

          The IDs of the virtual interfaces.

        • LocalGatewayId — (String)

          The ID of the local gateway.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the local gateway virtual interface group.

        • Tags — (Array<map>)

          The tags assigned to the virtual interface 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.

      • 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.

describeLocalGatewayVirtualInterfaces(params = {}, callback) ⇒ AWS.Request

Describes the specified local gateway virtual interfaces.

Examples:

Calling the describeLocalGatewayVirtualInterfaces operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  LocalGatewayVirtualInterfaceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeLocalGatewayVirtualInterfaces(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: {})
    • LocalGatewayVirtualInterfaceIds — (Array<String>)

      The IDs of the virtual interfaces.

    • Filters — (Array<map>)

      One or more filters.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • LocalGatewayVirtualInterfaces — (Array<map>)

        Information about the virtual interfaces.

        • LocalGatewayVirtualInterfaceId — (String)

          The ID of the virtual interface.

        • LocalGatewayId — (String)

          The ID of the local gateway.

        • Vlan — (Integer)

          The ID of the VLAN.

        • LocalAddress — (String)

          The local address.

        • PeerAddress — (String)

          The peer address.

        • LocalBgpAsn — (Integer)

          The Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the local gateway.

        • PeerBgpAsn — (Integer)

          The peer BGP ASN.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the local gateway virtual interface.

        • Tags — (Array<map>)

          The tags assigned to the virtual 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.

      • 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.

describeManagedPrefixLists(params = {}, callback) ⇒ AWS.Request

Describes your managed prefix lists and any Amazon Web Services-managed prefix lists.

To view the entries for your prefix list, use GetManagedPrefixListEntries.

Service Reference:

Examples:

Calling the describeManagedPrefixLists operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  PrefixListIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeManagedPrefixLists(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.

      • owner-id - The ID of the prefix list owner.

      • prefix-list-id - The ID of the prefix list.

      • prefix-list-name - The name of the prefix list.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • PrefixListIds — (Array<String>)

      One or more prefix list 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:

      • 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.

      • PrefixLists — (Array<map>)

        Information about the prefix lists.

        • PrefixListId — (String)

          The ID of the prefix list.

        • AddressFamily — (String)

          The IP address version.

        • State — (String)

          The current state of the prefix list.

          Possible values include:
          • "create-in-progress"
          • "create-complete"
          • "create-failed"
          • "modify-in-progress"
          • "modify-complete"
          • "modify-failed"
          • "restore-in-progress"
          • "restore-complete"
          • "restore-failed"
          • "delete-in-progress"
          • "delete-complete"
          • "delete-failed"
        • StateMessage — (String)

          The state message.

        • PrefixListArn — (String)

          The Amazon Resource Name (ARN) for the prefix list.

        • PrefixListName — (String)

          The name of the prefix list.

        • MaxEntries — (Integer)

          The maximum number of entries for the prefix list.

        • Version — (Integer)

          The version of the prefix list.

        • Tags — (Array<map>)

          The tags for the prefix list.

          • 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.

        • OwnerId — (String)

          The ID of the owner of the prefix list.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Service Reference:

Examples:

To describe your moving addresses


/* This example describes all of your moving Elastic IP addresses. */

 var params = {
 };
 ec2.describeMovingAddresses(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    MovingAddressStatuses: [
       {
      MoveStatus: "MovingToVpc", 
      PublicIp: "198.51.100.0"
     }
    ]
   }
   */
 });

Calling the describeMovingAddresses operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  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: {})
    • 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>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • 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.

    • NextToken — (String)

      The token for the next page of results.

    • PublicIps — (Array<String>)

      One or more 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:

      • MovingAddressStatuses — (Array<map>)

        The status for each 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"
        • PublicIp — (String)

          The Elastic IP address.

      • 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 your NAT gateways.

Service Reference:

Examples:

To describe a NAT gateway


/* This example describes the NAT gateway for the specified VPC. */

 var params = {
  Filter: [
     {
    Name: "vpc-id", 
    Values: [
       "vpc-1a2b3c4d"
    ]
   }
  ]
 };
 ec2.describeNatGateways(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NatGateways: [
       {
      CreateTime: <Date Representation>, 
      NatGatewayAddresses: [
         {
        AllocationId: "eipalloc-89c620ec", 
        NetworkInterfaceId: "eni-9dec76cd", 
        PrivateIp: "10.0.0.149", 
        PublicIp: "198.11.222.333"
       }
      ], 
      NatGatewayId: "nat-05dba92075d71c408", 
      State: "available", 
      SubnetId: "subnet-847e4dc2", 
      VpcId: "vpc-1a2b3c4d"
     }
    ]
   }
   */
 });

Calling the describeNatGateways operation

var params = {
  DryRun: true || false,
  Filter: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  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: {})
    • 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.

    • 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.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • 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>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NatGatewayIds — (Array<String>)

      One or more NAT gateway IDs.

    • NextToken — (String)

      The token for 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.

        • CreateTime — (Date)

          The date and time the NAT gateway was created.

        • DeleteTime — (Date)

          The date and time the NAT gateway was deleted, if applicable.

        • 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."

        • NatGatewayAddresses — (Array<map>)

          Information about the IP addresses and network interface associated with the NAT gateway.

          • AllocationId — (String)

            [Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.

          • NetworkInterfaceId — (String)

            The ID of the network interface associated with the NAT gateway.

          • PrivateIp — (String)

            The private IP address associated with the NAT gateway.

          • PublicIp — (String)

            [Public NAT gateway only] The Elastic IP address associated with the NAT gateway.

        • NatGatewayId — (String)

          The ID of the NAT gateway.

        • ProvisionedBandwidth — (map)

          Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.

        • 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"
        • SubnetId — (String)

          The ID of the subnet in which the NAT gateway is located.

        • VpcId — (String)

          The ID of the VPC in which the NAT gateway is located.

        • Tags — (Array<map>)

          The tags for the NAT 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.

        • ConnectivityType — (String)

          Indicates whether the NAT gateway supports public or private connectivity.

          Possible values include:
          • "private"
          • "public"
      • 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, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

To describe a network ACL


/* This example describes the specified network ACL. */

 var params = {
  NetworkAclIds: [
     "acl-5fb85d36"
  ]
 };
 ec2.describeNetworkAcls(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NetworkAcls: [
       {
      Associations: [
         {
        NetworkAclAssociationId: "aclassoc-66ea5f0b", 
        NetworkAclId: "acl-9aeb5ef7", 
        SubnetId: "subnet-65ea5f08"
       }
      ], 
      Entries: [
         {
        CidrBlock: "0.0.0.0/0", 
        Egress: true, 
        Protocol: "-1", 
        RuleAction: "deny", 
        RuleNumber: 32767
       }, 
         {
        CidrBlock: "0.0.0.0/0", 
        Egress: false, 
        Protocol: "-1", 
        RuleAction: "deny", 
        RuleNumber: 32767
       }
      ], 
      IsDefault: false, 
      NetworkAclId: "acl-5fb85d36", 
      Tags: [
      ], 
      VpcId: "vpc-a01106c2"
     }
    ]
   }
   */
 });

Calling the describeNetworkAcls operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NetworkAclIds: [
    'STRING_VALUE',
    /* more items */
  ],
  NextToken: 'STRING_VALUE'
};
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: {})
    • 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 IPv4 CIDR range specified in the entry.

      • 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.ipv6-cidr - The IPv6 CIDR range specified in the entry.

      • 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 set of ACL entries.

      • network-acl-id - The ID of the network ACL.

      • owner-id - The ID of the Amazon Web Services account that owns the network ACL.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • 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>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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.

        • 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.

        • Entries — (Array<map>)

          One or more entries (rules) in the network ACL.

          • CidrBlock — (String)

            The IPv4 network range to allow or deny, in CIDR notation.

          • Egress — (Boolean)

            Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).

          • IcmpTypeCode — (map)

            ICMP protocol: The ICMP type and code.

            • Code — (Integer)

              The ICMP code. A value of -1 means all codes for the specified ICMP type.

            • Type — (Integer)

              The ICMP type. A value of -1 means all types.

          • Ipv6CidrBlock — (String)

            The IPv6 network range to allow or deny, in CIDR notation.

          • 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.

          • Protocol — (String)

            The protocol number. 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"
          • RuleNumber — (Integer)

            The rule number for the entry. ACL entries are processed in ascending order by rule number.

        • IsDefault — (Boolean)

          Indicates whether this is the default network ACL for the VPC.

        • NetworkAclId — (String)

          The ID of the network ACL.

        • 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.

        • VpcId — (String)

          The ID of the VPC for the network ACL.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the network ACL.

      • 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.

describeNetworkInsightsAnalyses(params = {}, callback) ⇒ AWS.Request

Describes one or more of your network insights analyses.

Service Reference:

Examples:

Calling the describeNetworkInsightsAnalyses operation

var params = {
  AnalysisEndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  AnalysisStartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NetworkInsightsAnalysisIds: [
    'STRING_VALUE',
    /* more items */
  ],
  NetworkInsightsPathId: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeNetworkInsightsAnalyses(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: {})
    • NetworkInsightsAnalysisIds — (Array<String>)

      The ID of the network insights analyses. You must specify either analysis IDs or a path ID.

    • NetworkInsightsPathId — (String)

      The ID of the path. You must specify either a path ID or analysis IDs.

    • AnalysisStartTime — (Date)

      The time when the network insights analyses started.

    • AnalysisEndTime — (Date)

      The time when the network insights analyses ended.

    • Filters — (Array<map>)

      The filters. The following are possible values:

      • PathFound - A Boolean value that indicates whether a feasible path is found.

      • Status - The status of the analysis (running | succeeded | failed).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • 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.

    • NextToken — (String)

      The token for 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:

      • NetworkInsightsAnalyses — (Array<map>)

        Information about the network insights analyses.

        • NetworkInsightsAnalysisId — (String)

          The ID of the network insights analysis.

        • NetworkInsightsAnalysisArn — (String)

          The Amazon Resource Name (ARN) of the network insights analysis.

        • NetworkInsightsPathId — (String)

          The ID of the path.

        • FilterInArns — (Array<String>)

          The Amazon Resource Names (ARN) of the Amazon Web Services resources that the path must traverse.

        • StartDate — (Date)

          The time the analysis started.

        • Status — (String)

          The status of the network insights analysis.

          Possible values include:
          • "running"
          • "succeeded"
          • "failed"
        • StatusMessage — (String)

          The status message, if the status is failed.

        • NetworkPathFound — (Boolean)

          Indicates whether the destination is reachable from the source.

        • ForwardPathComponents — (Array<map>)

          The components in the path from source to destination.

          • SequenceNumber — (Integer)

            The sequence number.

          • AclRule — (map)

            The network ACL rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Egress — (Boolean)

              Indicates whether the rule is an outbound rule.

            • PortRange — (map)

              The range of ports.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • RuleAction — (String)

              Indicates whether to allow or deny traffic that matches the rule.

            • RuleNumber — (Integer)

              The rule number.

          • Component — (map)

            The component.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • DestinationVpc — (map)

            The destination VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • OutboundHeader — (map)

            The outbound header.

            • DestinationAddresses — (Array<String>)

              The destination addresses.

            • DestinationPortRanges — (Array<map>)

              The destination port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • SourceAddresses — (Array<String>)

              The source addresses.

            • SourcePortRanges — (Array<map>)

              The source port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

          • InboundHeader — (map)

            The inbound header.

            • DestinationAddresses — (Array<String>)

              The destination addresses.

            • DestinationPortRanges — (Array<map>)

              The destination port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • SourceAddresses — (Array<String>)

              The source addresses.

            • SourcePortRanges — (Array<map>)

              The source port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

          • RouteTableRoute — (map)

            The route table route.

            • DestinationCidr — (String)

              The destination IPv4 address, in CIDR notation.

            • DestinationPrefixListId — (String)

              The prefix of the Amazon Web Service.

            • EgressOnlyInternetGatewayId — (String)

              The ID of an egress-only internet gateway.

            • GatewayId — (String)

              The ID of the gateway, such as an internet gateway or virtual private gateway.

            • InstanceId — (String)

              The ID of the instance, such as a NAT instance.

            • NatGatewayId — (String)

              The ID of a NAT gateway.

            • NetworkInterfaceId — (String)

              The ID of a network interface.

            • Origin — (String)

              Describes how the route was created. The following are possible values:

              • 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.

            • TransitGatewayId — (String)

              The ID of a transit gateway.

            • VpcPeeringConnectionId — (String)

              The ID of a VPC peering connection.

          • SecurityGroupRule — (map)

            The security group rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Direction — (String)

              The direction. The following are possible values:

              • egress

              • ingress

            • SecurityGroupId — (String)

              The security group ID.

            • PortRange — (map)

              The port range.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • PrefixListId — (String)

              The prefix list ID.

            • Protocol — (String)

              The protocol name.

          • SourceVpc — (map)

            The source VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Subnet — (map)

            The subnet.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Vpc — (map)

            The component VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

        • ReturnPathComponents — (Array<map>)

          The components in the path from destination to source.

          • SequenceNumber — (Integer)

            The sequence number.

          • AclRule — (map)

            The network ACL rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Egress — (Boolean)

              Indicates whether the rule is an outbound rule.

            • PortRange — (map)

              The range of ports.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • RuleAction — (String)

              Indicates whether to allow or deny traffic that matches the rule.

            • RuleNumber — (Integer)

              The rule number.

          • Component — (map)

            The component.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • DestinationVpc — (map)

            The destination VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • OutboundHeader — (map)

            The outbound header.

            • DestinationAddresses — (Array<String>)

              The destination addresses.

            • DestinationPortRanges — (Array<map>)

              The destination port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • SourceAddresses — (Array<String>)

              The source addresses.

            • SourcePortRanges — (Array<map>)

              The source port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

          • InboundHeader — (map)

            The inbound header.

            • DestinationAddresses — (Array<String>)

              The destination addresses.

            • DestinationPortRanges — (Array<map>)

              The destination port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • SourceAddresses — (Array<String>)

              The source addresses.

            • SourcePortRanges — (Array<map>)

              The source port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

          • RouteTableRoute — (map)

            The route table route.

            • DestinationCidr — (String)

              The destination IPv4 address, in CIDR notation.

            • DestinationPrefixListId — (String)

              The prefix of the Amazon Web Service.

            • EgressOnlyInternetGatewayId — (String)

              The ID of an egress-only internet gateway.

            • GatewayId — (String)

              The ID of the gateway, such as an internet gateway or virtual private gateway.

            • InstanceId — (String)

              The ID of the instance, such as a NAT instance.

            • NatGatewayId — (String)

              The ID of a NAT gateway.

            • NetworkInterfaceId — (String)

              The ID of a network interface.

            • Origin — (String)

              Describes how the route was created. The following are possible values:

              • 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.

            • TransitGatewayId — (String)

              The ID of a transit gateway.

            • VpcPeeringConnectionId — (String)

              The ID of a VPC peering connection.

          • SecurityGroupRule — (map)

            The security group rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Direction — (String)

              The direction. The following are possible values:

              • egress

              • ingress

            • SecurityGroupId — (String)

              The security group ID.

            • PortRange — (map)

              The port range.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • PrefixListId — (String)

              The prefix list ID.

            • Protocol — (String)

              The protocol name.

          • SourceVpc — (map)

            The source VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Subnet — (map)

            The subnet.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Vpc — (map)

            The component VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

        • Explanations — (Array<map>)

          The explanations. For more information, see Reachability Analyzer explanation codes.

          • Acl — (map)

            The network ACL.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • AclRule — (map)

            The network ACL rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Egress — (Boolean)

              Indicates whether the rule is an outbound rule.

            • PortRange — (map)

              The range of ports.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • RuleAction — (String)

              Indicates whether to allow or deny traffic that matches the rule.

            • RuleNumber — (Integer)

              The rule number.

          • Address — (String)

            The IPv4 address, in CIDR notation.

          • Addresses — (Array<String>)

            The IPv4 addresses, in CIDR notation.

          • AttachedTo — (map)

            The resource to which the component is attached.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • AvailabilityZones — (Array<String>)

            The Availability Zones.

          • Cidrs — (Array<String>)

            The CIDR ranges.

          • Component — (map)

            The component.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • CustomerGateway — (map)

            The customer gateway.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Destination — (map)

            The destination.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • DestinationVpc — (map)

            The destination VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Direction — (String)

            The direction. The following are possible values:

            • egress

            • ingress

          • ExplanationCode — (String)

            The explanation code.

          • IngressRouteTable — (map)

            The route table.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • InternetGateway — (map)

            The internet gateway.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • LoadBalancerArn — (String)

            The Amazon Resource Name (ARN) of the load balancer.

          • ClassicLoadBalancerListener — (map)

            The listener for a Classic Load Balancer.

            • LoadBalancerPort — (Integer)

              The port on which the load balancer is listening.

            • InstancePort — (Integer)

              [Classic Load Balancers] The back-end port for the listener.

          • LoadBalancerListenerPort — (Integer)

            The listener port of the load balancer.

          • LoadBalancerTarget — (map)

            The target.

            • Address — (String)

              The IP address.

            • AvailabilityZone — (String)

              The Availability Zone.

            • Instance — (map)

              Information about the instance.

              • Id — (String)

                The ID of the component.

              • Arn — (String)

                The Amazon Resource Name (ARN) of the component.

            • Port — (Integer)

              The port on which the target is listening.

          • LoadBalancerTargetGroup — (map)

            The target group.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • LoadBalancerTargetGroups — (Array<map>)

            The target groups.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • LoadBalancerTargetPort — (Integer)

            The target port.

          • ElasticLoadBalancerListener — (map)

            The load balancer listener.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • MissingComponent — (String)

            The missing component.

          • NatGateway — (map)

            The NAT gateway.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • NetworkInterface — (map)

            The network interface.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • PacketField — (String)

            The packet field.

          • VpcPeeringConnection — (map)

            The VPC peering connection.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Port — (Integer)

            The port.

          • PortRanges — (Array<map>)

            The port ranges.

            • From — (Integer)

              The first port in the range.

            • To — (Integer)

              The last port in the range.

          • PrefixList — (map)

            The prefix list.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Protocols — (Array<String>)

            The protocols.

          • RouteTableRoute — (map)

            The route table route.

            • DestinationCidr — (String)

              The destination IPv4 address, in CIDR notation.

            • DestinationPrefixListId — (String)

              The prefix of the Amazon Web Service.

            • EgressOnlyInternetGatewayId — (String)

              The ID of an egress-only internet gateway.

            • GatewayId — (String)

              The ID of the gateway, such as an internet gateway or virtual private gateway.

            • InstanceId — (String)

              The ID of the instance, such as a NAT instance.

            • NatGatewayId — (String)

              The ID of a NAT gateway.

            • NetworkInterfaceId — (String)

              The ID of a network interface.

            • Origin — (String)

              Describes how the route was created. The following are possible values:

              • 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.

            • TransitGatewayId — (String)

              The ID of a transit gateway.

            • VpcPeeringConnectionId — (String)

              The ID of a VPC peering connection.

          • RouteTable — (map)

            The route table.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • SecurityGroup — (map)

            The security group.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • SecurityGroupRule — (map)

            The security group rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Direction — (String)

              The direction. The following are possible values:

              • egress

              • ingress

            • SecurityGroupId — (String)

              The security group ID.

            • PortRange — (map)

              The port range.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • PrefixListId — (String)

              The prefix list ID.

            • Protocol — (String)

              The protocol name.

          • SecurityGroups — (Array<map>)

            The security groups.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • SourceVpc — (map)

            The source VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • State — (String)

            The state.

          • Subnet — (map)

            The subnet.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • SubnetRouteTable — (map)

            The route table for the subnet.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Vpc — (map)

            The component VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • VpcEndpoint — (map)

            The VPC endpoint.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • VpnConnection — (map)

            The VPN connection.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • VpnGateway — (map)

            The VPN gateway.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

        • AlternatePathHints — (Array<map>)

          Potential intermediate components.

          • ComponentId — (String)

            The ID of the component.

          • ComponentArn — (String)

            The Amazon Resource Name (ARN) of the component.

        • Tags — (Array<map>)

          The tags.

          • 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.

describeNetworkInsightsPaths(params = {}, callback) ⇒ AWS.Request

Describes one or more of your paths.

Service Reference:

Examples:

Calling the describeNetworkInsightsPaths operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NetworkInsightsPathIds: [
    'STRING_VALUE',
    /* more items */
  ],
  NextToken: 'STRING_VALUE'
};
ec2.describeNetworkInsightsPaths(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: {})
    • NetworkInsightsPathIds — (Array<String>)

      The IDs of the paths.

    • Filters — (Array<map>)

      The filters. The following are possible values:

      • Destination - The ID of the resource.

      • DestinationPort - The destination port.

      • Name - The path name.

      • Protocol - The protocol.

      • Source - The ID of the resource.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • 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.

    • NextToken — (String)

      The token for 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:

      • NetworkInsightsPaths — (Array<map>)

        Information about the paths.

        • NetworkInsightsPathId — (String)

          The ID of the path.

        • NetworkInsightsPathArn — (String)

          The Amazon Resource Name (ARN) of the path.

        • CreatedDate — (Date)

          The time stamp when the path was created.

        • Source — (String)

          The Amazon Web Services resource that is the source of the path.

        • Destination — (String)

          The Amazon Web Services resource that is the destination of the path.

        • SourceIp — (String)

          The IP address of the Amazon Web Services resource that is the source of the path.

        • DestinationIp — (String)

          The IP address of the Amazon Web Services resource that is the destination of the path.

        • Protocol — (String)

          The protocol.

          Possible values include:
          • "tcp"
          • "udp"
        • DestinationPort — (Integer)

          The destination port.

        • Tags — (Array<map>)

          The tags associated with the path.

          • 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.

describeNetworkInterfaceAttribute(params = {}, callback) ⇒ AWS.Request

Describes a network interface attribute. You can specify only one attribute at a time.

Examples:

To describe the attachment attribute of a network interface


/* This example describes the attachment attribute of the specified network interface. */

 var params = {
  Attribute: "attachment", 
  NetworkInterfaceId: "eni-686ea200"
 };
 ec2.describeNetworkInterfaceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Attachment: {
     AttachTime: <Date Representation>, 
     AttachmentId: "eni-attach-43348162", 
     DeleteOnTermination: true, 
     DeviceIndex: 0, 
     InstanceId: "i-1234567890abcdef0", 
     InstanceOwnerId: "123456789012", 
     Status: "attached"
    }, 
    NetworkInterfaceId: "eni-686ea200"
   }
   */
 });

To describe the description attribute of a network interface


/* This example describes the description attribute of the specified network interface. */

 var params = {
  Attribute: "description", 
  NetworkInterfaceId: "eni-686ea200"
 };
 ec2.describeNetworkInterfaceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Description: {
     Value: "My description"
    }, 
    NetworkInterfaceId: "eni-686ea200"
   }
   */
 });

To describe the groupSet attribute of a network interface


/* This example describes the groupSet attribute of the specified network interface. */

 var params = {
  Attribute: "groupSet", 
  NetworkInterfaceId: "eni-686ea200"
 };
 ec2.describeNetworkInterfaceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Groups: [
       {
      GroupId: "sg-903004f8", 
      GroupName: "my-security-group"
     }
    ], 
    NetworkInterfaceId: "eni-686ea200"
   }
   */
 });

To describe the sourceDestCheck attribute of a network interface


/* This example describes the sourceDestCheck attribute of the specified network interface. */

 var params = {
  Attribute: "sourceDestCheck", 
  NetworkInterfaceId: "eni-686ea200"
 };
 ec2.describeNetworkInterfaceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NetworkInterfaceId: "eni-686ea200", 
    SourceDestCheck: {
     Value: true
    }
   }
   */
 });

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: {})
    • Attribute — (String)

      The attribute of the network interface. This parameter is required.

      Possible values include:
      • "description"
      • "groupSet"
      • "sourceDestCheck"
      • "attachment"
    • 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. The data object has the following properties:

      • Attachment — (map)

        The attachment (if any) of the network interface.

        • AttachTime — (Date)

          The timestamp indicating when the attachment initiated.

        • AttachmentId — (String)

          The ID of the network interface attachment.

        • DeleteOnTermination — (Boolean)

          Indicates whether the network interface is deleted when the instance is terminated.

        • DeviceIndex — (Integer)

          The device index of the network interface attachment on the instance.

        • NetworkCardIndex — (Integer)

          The index of the network card.

        • InstanceId — (String)

          The ID of the instance.

        • InstanceOwnerId — (String)

          The Amazon Web Services account ID of the owner of the instance.

        • Status — (String)

          The attachment state.

          Possible values include:
          • "attaching"
          • "attached"
          • "detaching"
          • "detached"
      • Description — (map)

        The description of the network interface.

        • Value — (String)

          The attribute value. The value is case-sensitive.

      • 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.

      • NetworkInterfaceId — (String)

        The ID of the network interface.

      • SourceDestCheck — (map)

        Indicates whether source/destination checking is enabled.

        • Value — (Boolean)

          The attribute value. The valid values are true or false.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeNetworkInterfacePermissions(params = {}, callback) ⇒ AWS.Request

Describes the permissions for your network interfaces.

Examples:

Calling the describeNetworkInterfacePermissions operation

var params = {
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NetworkInterfacePermissionIds: [
    'STRING_VALUE',
    /* more items */
  ],
  NextToken: 'STRING_VALUE'
};
ec2.describeNetworkInterfacePermissions(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: {})
    • NetworkInterfacePermissionIds — (Array<String>)

      One or more network interface permission IDs.

    • Filters — (Array<map>)

      One or more filters.

      • network-interface-permission.network-interface-permission-id - The ID of the permission.

      • network-interface-permission.network-interface-id - The ID of the network interface.

      • network-interface-permission.aws-account-id - The Amazon Web Services account ID.

      • network-interface-permission.aws-service - The Amazon Web Service.

      • network-interface-permission.permission - The type of permission (INSTANCE-ATTACH | EIP-ASSOCIATE).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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. If this parameter is not specified, up to 50 results are returned by default.

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:

      • NetworkInterfacePermissions — (Array<map>)

        The network interface permissions.

        • NetworkInterfacePermissionId — (String)

          The ID of the network interface permission.

        • NetworkInterfaceId — (String)

          The ID of the network interface.

        • AwsAccountId — (String)

          The Amazon Web Services account ID.

        • AwsService — (String)

          The Amazon Web Service.

        • Permission — (String)

          The type of permission.

          Possible values include:
          • "INSTANCE-ATTACH"
          • "EIP-ASSOCIATE"
        • PermissionState — (map)

          Information about the state of the permission.

          • State — (String)

            The state of the permission.

            Possible values include:
            • "pending"
            • "granted"
            • "revoking"
            • "revoked"
          • StatusMessage — (String)

            A status message, if applicable.

      • NextToken — (String)

        The token to use to retrieve the next page of results.

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.

Service Reference:

Examples:

To describe a network interface


/*  */

 var params = {
  NetworkInterfaceIds: [
     "eni-e5aa89a3"
  ]
 };
 ec2.describeNetworkInterfaces(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NetworkInterfaces: [
       {
      Association: {
       AssociationId: "eipassoc-0fbb766a", 
       IpOwnerId: "123456789012", 
       PublicDnsName: "ec2-203-0-113-12.compute-1.amazonaws.com", 
       PublicIp: "203.0.113.12"
      }, 
      Attachment: {
       AttachTime: <Date Representation>, 
       AttachmentId: "eni-attach-66c4350a", 
       DeleteOnTermination: false, 
       DeviceIndex: 1, 
       InstanceId: "i-1234567890abcdef0", 
       InstanceOwnerId: "123456789012", 
       Status: "attached"
      }, 
      AvailabilityZone: "us-east-1d", 
      Description: "my network interface", 
      Groups: [
         {
        GroupId: "sg-8637d3e3", 
        GroupName: "default"
       }
      ], 
      MacAddress: "02:2f:8f:b0:cf:75", 
      NetworkInterfaceId: "eni-e5aa89a3", 
      OwnerId: "123456789012", 
      PrivateDnsName: "ip-10-0-1-17.ec2.internal", 
      PrivateIpAddress: "10.0.1.17", 
      PrivateIpAddresses: [
         {
        Association: {
         AssociationId: "eipassoc-0fbb766a", 
         IpOwnerId: "123456789012", 
         PublicDnsName: "ec2-203-0-113-12.compute-1.amazonaws.com", 
         PublicIp: "203.0.113.12"
        }, 
        Primary: true, 
        PrivateDnsName: "ip-10-0-1-17.ec2.internal", 
        PrivateIpAddress: "10.0.1.17"
       }
      ], 
      RequesterManaged: false, 
      SourceDestCheck: true, 
      Status: "in-use", 
      SubnetId: "subnet-b61f49f0", 
      TagSet: [
      ], 
      VpcId: "vpc-a01106c2"
     }
    ]
   }
   */
 });

Calling the describeNetworkInterfaces operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NetworkInterfaceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  NextToken: 'STRING_VALUE'
};
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: {})
    • Filters — (Array<map>)

      One or more filters.

      • addresses.private-ip-address - The private IPv4 addresses associated with the network interface.

      • addresses.primary - Whether the private IPv4 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 (IPv4).

      • 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 IPv4 address.

      • association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.

      • association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.

      • association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.

      • association.public-dns-name - The public DNS name for the network interface (IPv4).

      • 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.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.

      • ipv6-addresses.ipv6-address - An IPv6 address 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 Amazon Web Services account ID of the network interface owner.

      • private-ip-address - The private IPv4 address or addresses of the network interface.

      • private-dns-name - The private DNS name of the network interface (IPv4).

      • requester-id - The alias or Amazon Web Services account ID of the principal or service that created the network interface.

      • requester-managed - Indicates whether the network interface is being managed by an Amazon Web Service (for example, Amazon Web Services Management Console, Auto Scaling, and so on).

      • source-dest-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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • 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>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • NextToken — (String)

      The token to retrieve the next page of results.

    • 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. You cannot specify this parameter and the network interface 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:

      • NetworkInterfaces — (Array<map>)

        Information about one or more network interfaces.

        • Association — (map)

          The association information for an Elastic IP address (IPv4) associated with the network interface.

          • AllocationId — (String)

            The allocation ID.

          • AssociationId — (String)

            The association ID.

          • IpOwnerId — (String)

            The ID of the Elastic IP address owner.

          • PublicDnsName — (String)

            The public DNS name.

          • PublicIp — (String)

            The address of the Elastic IP address bound to the network interface.

          • CustomerOwnedIp — (String)

            The customer-owned IP address associated with the network interface.

          • CarrierIp — (String)

            The carrier IP address associated with the network interface.

            This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

        • Attachment — (map)

          The network interface attachment.

          • AttachTime — (Date)

            The timestamp indicating when the attachment initiated.

          • AttachmentId — (String)

            The ID of the network interface attachment.

          • DeleteOnTermination — (Boolean)

            Indicates whether the network interface is deleted when the instance is terminated.

          • DeviceIndex — (Integer)

            The device index of the network interface attachment on the instance.

          • NetworkCardIndex — (Integer)

            The index of the network card.

          • InstanceId — (String)

            The ID of the instance.

          • InstanceOwnerId — (String)

            The Amazon Web Services account ID of the owner of the instance.

          • Status — (String)

            The attachment state.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
        • AvailabilityZone — (String)

          The Availability Zone.

        • Description — (String)

          A description.

        • 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.

        • InterfaceType — (String)

          The type of network interface.

          Possible values include:
          • "interface"
          • "natGateway"
          • "efa"
          • "trunk"
        • Ipv6Addresses — (Array<map>)

          The IPv6 addresses associated with the network interface.

          • Ipv6Address — (String)

            The IPv6 address.

        • MacAddress — (String)

          The MAC address.

        • NetworkInterfaceId — (String)

          The ID of the network interface.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • OwnerId — (String)

          The Amazon Web Services account ID of the owner of the network interface.

        • PrivateDnsName — (String)

          The private DNS name.

        • PrivateIpAddress — (String)

          The IPv4 address of the network interface within the subnet.

        • PrivateIpAddresses — (Array<map>)

          The private IPv4 addresses associated with the network interface.

          • Association — (map)

            The association information for an Elastic IP address (IPv4) associated with the network interface.

            • AllocationId — (String)

              The allocation ID.

            • AssociationId — (String)

              The association ID.

            • IpOwnerId — (String)

              The ID of the Elastic IP address owner.

            • PublicDnsName — (String)

              The public DNS name.

            • PublicIp — (String)

              The address of the Elastic IP address bound to the network interface.

            • CustomerOwnedIp — (String)

              The customer-owned IP address associated with the network interface.

            • CarrierIp — (String)

              The carrier IP address associated with the network interface.

              This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

          • Primary — (Boolean)

            Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.

          • PrivateDnsName — (String)

            The private DNS name.

          • PrivateIpAddress — (String)

            The private IPv4 address.

        • Ipv4Prefixes — (Array<map>)

          The IPv4 prefixes that are assigned to the network interface.

        • Ipv6Prefixes — (Array<map>)

          The IPv6 prefixes that are assigned to the network interface.

          • Ipv6Prefix — (String)

            The IPv6 prefix.

        • RequesterId — (String)

          The alias or Amazon Web Services account ID of the principal or service that created the network interface.

        • RequesterManaged — (Boolean)

          Indicates whether the network interface is being managed by Amazon Web Services.

        • SourceDestCheck — (Boolean)

          Indicates whether source/destination checking is enabled.

        • Status — (String)

          The status of the network interface.

          Possible values include:
          • "available"
          • "associated"
          • "attaching"
          • "in-use"
          • "detaching"
        • SubnetId — (String)

          The ID of the subnet.

        • 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.

        • VpcId — (String)

          The ID of the VPC.

        • DenyAllIgwTraffic — (Boolean)

          Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is true, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.

      • 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:

describePlacementGroups(params = {}, callback) ⇒ AWS.Request

Describes the specified placement groups or all of your placement groups. For more information, see Placement groups in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the describePlacementGroups 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.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: {})
    • Filters — (Array<map>)

      The 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 | spread | partition).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • 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>)

      The names of the placement groups.

      Default: Describes all your placement groups, or only those otherwise specified.

    • GroupIds — (Array<String>)

      The IDs of the placement groups.

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>)

        Information about the placement groups.

        • GroupName — (String)

          The name of the placement group.

        • State — (String)

          The state of the placement group.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • Strategy — (String)

          The placement strategy.

          Possible values include:
          • "cluster"
          • "spread"
          • "partition"
        • PartitionCount — (Integer)

          The number of partitions. Valid only if strategy is set to partition.

        • GroupId — (String)

          The ID of the placement group.

        • Tags — (Array<map>)

          Any tags applied to the placement 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.

describePrefixLists(params = {}, callback) ⇒ AWS.Request

Describes available Amazon Web Services 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.

We recommend that you use DescribeManagedPrefixLists instead.

Service Reference:

Examples:

Calling the describePrefixLists operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  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.

    • 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>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • PrefixListIds — (Array<String>)

      One or more prefix list 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:

      • 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.

      • PrefixLists — (Array<map>)

        All available prefix lists.

        • Cidrs — (Array<String>)

          The IP address range of the Amazon Web Service.

        • PrefixListId — (String)

          The ID of the prefix.

        • PrefixListName — (String)

          The name of the prefix.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describePrincipalIdFormat(params = {}, callback) ⇒ AWS.Request

Describes the ID format settings for the root user and all IAM roles and IAM users that have explicitly specified a longer ID (17-character ID) preference.

By default, all IAM roles and IAM users default to the same ID settings as the root user, unless they explicitly override the settings. This request is useful for identifying those IAM users and IAM roles that have overridden the default ID settings.

The following resource types support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

Service Reference:

Examples:

Calling the describePrincipalIdFormat operation

var params = {
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  Resources: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describePrincipalIdFormat(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 type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway

    • 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.

    • NextToken — (String)

      The token to request 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:

      • Principals — (Array<map>)

        Information about the ID format settings for the ARN.

        • Arn — (String)

          PrincipalIdFormatARN description

        • Statuses — (Array<map>)

          PrincipalIdFormatStatuses description

          • 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.

          • Resource — (String)

            The type of resource.

          • UseLongIds — (Boolean)

            Indicates whether longer IDs (17-character IDs) are enabled for the resource.

      • 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.

describePublicIpv4Pools(params = {}, callback) ⇒ AWS.Request

Describes the specified IPv4 address pools.

Service Reference:

Examples:

Calling the describePublicIpv4Pools operation

var params = {
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  PoolIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describePublicIpv4Pools(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: {})
    • PoolIds — (Array<String>)

      The IDs of the address pools.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • Filters — (Array<map>)

      One or more filters.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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:

      • PublicIpv4Pools — (Array<map>)

        Information about the address pools.

        • PoolId — (String)

          The ID of the address pool.

        • Description — (String)

          A description of the address pool.

        • PoolAddressRanges — (Array<map>)

          The address ranges.

          • FirstAddress — (String)

            The first IP address in the range.

          • LastAddress — (String)

            The last IP address in the range.

          • AddressCount — (Integer)

            The number of addresses in the range.

          • AvailableAddressCount — (Integer)

            The number of available addresses in the range.

        • TotalAddressCount — (Integer)

          The total number of addresses.

        • TotalAvailableAddressCount — (Integer)

          The total number of available addresses.

        • NetworkBorderGroup — (String)

          The name of the location from which the address pool is advertised. A network border group is a unique set of Availability Zones or Local Zones from where Amazon Web Services advertises public IP addresses.

        • Tags — (Array<map>)

          Any tags for the address pool.

          • 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.

describeRegions(params = {}, callback) ⇒ AWS.Request

Describes the Regions that are enabled for your account, or all Regions.

For a list of the Regions supported by Amazon EC2, see Amazon Elastic Compute Cloud endpoints and quotas.

For information about enabling and disabling Regions for your account, see Managing Amazon Web Services Regions in the Amazon Web Services General Reference.

Service Reference:

Examples:

To describe your regions


/* This example describes all the regions that are available to you. */

 var params = {
 };
 ec2.describeRegions(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Regions: [
       {
      Endpoint: "ec2.ap-south-1.amazonaws.com", 
      RegionName: "ap-south-1"
     }, 
       {
      Endpoint: "ec2.eu-west-1.amazonaws.com", 
      RegionName: "eu-west-1"
     }, 
       {
      Endpoint: "ec2.ap-southeast-1.amazonaws.com", 
      RegionName: "ap-southeast-1"
     }, 
       {
      Endpoint: "ec2.ap-southeast-2.amazonaws.com", 
      RegionName: "ap-southeast-2"
     }, 
       {
      Endpoint: "ec2.eu-central-1.amazonaws.com", 
      RegionName: "eu-central-1"
     }, 
       {
      Endpoint: "ec2.ap-northeast-2.amazonaws.com", 
      RegionName: "ap-northeast-2"
     }, 
       {
      Endpoint: "ec2.ap-northeast-1.amazonaws.com", 
      RegionName: "ap-northeast-1"
     }, 
       {
      Endpoint: "ec2.us-east-1.amazonaws.com", 
      RegionName: "us-east-1"
     }, 
       {
      Endpoint: "ec2.sa-east-1.amazonaws.com", 
      RegionName: "sa-east-1"
     }, 
       {
      Endpoint: "ec2.us-west-1.amazonaws.com", 
      RegionName: "us-west-1"
     }, 
       {
      Endpoint: "ec2.us-west-2.amazonaws.com", 
      RegionName: "us-west-2"
     }
    ]
   }
   */
 });

Calling the describeRegions operation

var params = {
  AllRegions: true || false,
  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: {})
    • Filters — (Array<map>)

      The filters.

      • endpoint - The endpoint of the Region (for example, ec2.us-east-1.amazonaws.com).

      • opt-in-status - The opt-in status of the Region (opt-in-not-required | opted-in | not-opted-in).

      • 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>)

        The filter values. Filter values are case-sensitive.

    • RegionNames — (Array<String>)

      The names of the Regions. You can specify any Regions, whether they are enabled and disabled for your account.

    • 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.

    • AllRegions — (Boolean)

      Indicates whether to display all Regions, including Regions that are disabled for 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:

      • Regions — (Array<map>)

        Information about the Regions.

        • Endpoint — (String)

          The Region service endpoint.

        • RegionName — (String)

          The name of the Region.

        • OptInStatus — (String)

          The Region opt-in status. The possible values are opt-in-not-required, opted-in, and not-opted-in.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeReplaceRootVolumeTasks(params = {}, callback) ⇒ AWS.Request

Describes a root volume replacement task. For more information, see Replace a root volume in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the describeReplaceRootVolumeTasks operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  ReplaceRootVolumeTaskIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeReplaceRootVolumeTasks(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: {})
    • ReplaceRootVolumeTaskIds — (Array<String>)

      The ID of the root volume replacement task to view.

    • Filters — (Array<map>)

      Filter to use:

      • instance-id - The ID of the instance for which the root volume replacement task was created.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • ReplaceRootVolumeTasks — (Array<map>)

        Information about the root volume replacement task.

        • ReplaceRootVolumeTaskId — (String)

          The ID of the root volume replacement task.

        • InstanceId — (String)

          The ID of the instance for which the root volume replacement task was created.

        • TaskState — (String)

          The state of the task. The task can be in one of the following states:

          • pending - the replacement volume is being created.

          • in-progress - the original volume is being detached and the replacement volume is being attached.

          • succeeded - the replacement volume has been successfully attached to the instance and the instance is available.

          • failing - the replacement task is in the process of failing.

          • failed - the replacement task has failed but the original root volume is still attached.

          • failing-detached - the replacement task is in the process of failing. The instance might have no root volume attached.

          • failed-detached - the replacement task has failed and the instance has no root volume attached.

          Possible values include:
          • "pending"
          • "in-progress"
          • "failing"
          • "succeeded"
          • "failed"
          • "failed-detached"
        • StartTime — (String)

          The time the task was started.

        • CompleteTime — (String)

          The time the task completed.

        • Tags — (Array<map>)

          The 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.

      • 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.

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 EC2 User Guide.

Service Reference:

Examples:

Calling the describeReservedInstances operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  OfferingClass: standard | convertible,
  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: {})
    • 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.

      • scope - The scope of the Reserved Instance (Region or Availability Zone).

      • 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) | Red Hat Enterprise Linux with HA (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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • 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>)

        The filter values. Filter values are case-sensitive.

    • OfferingClass — (String)

      Describes whether the Reserved Instance is Standard or Convertible.

      Possible values include:
      • "standard"
      • "convertible"
    • ReservedInstancesIds — (Array<String>)

      One or more Reserved Instance IDs.

      Default: Describes all your Reserved Instances, or only those otherwise specified.

    • 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.

    • 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.

        • AvailabilityZone — (String)

          The Availability Zone in which the Reserved Instance can be used.

        • Duration — (Integer)

          The duration of the Reserved Instance, in seconds.

        • End — (Date)

          The time when the Reserved Instance expires.

        • FixedPrice — (Float)

          The purchase price of the Reserved Instance.

        • InstanceCount — (Integer)

          The number of reservations purchased.

        • 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"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • ProductDescription — (String)

          The Reserved Instance product platform description.

          Possible values include:
          • "Linux/UNIX"
          • "Linux/UNIX (Amazon VPC)"
          • "Windows"
          • "Windows (Amazon VPC)"
        • ReservedInstancesId — (String)

          The ID of the Reserved Instance.

        • Start — (Date)

          The date and time the Reserved Instance started.

        • State — (String)

          The state of the Reserved Instance purchase.

          Possible values include:
          • "payment-pending"
          • "active"
          • "payment-failed"
          • "retired"
          • "queued"
          • "queued-deleted"
        • UsagePrice — (Float)

          The usage price of the Reserved Instance, per hour.

        • 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"
        • InstanceTenancy — (String)

          The tenancy of the instance.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • OfferingClass — (String)

          The offering class of the Reserved Instance.

          Possible values include:
          • "standard"
          • "convertible"
        • 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.

          • Amount — (Float)

            The amount of the recurring charge.

          • Frequency — (String)

            The frequency of the recurring charge.

            Possible values include:
            • "Hourly"
        • Scope — (String)

          The scope of the Reserved Instance.

          Possible values include:
          • "Availability Zone"
          • "Region"
        • 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.

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 EC2 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: {})
    • 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>)

        The filter values. Filter values are case-sensitive.

    • ReservedInstancesId — (String)

      One or more Reserved Instance IDs.

    • ReservedInstancesListingId — (String)

      One or more Reserved Instance listing 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:

      • ReservedInstancesListings — (Array<map>)

        Information about the Reserved Instance listing.

        • ClientToken — (String)

          A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency.

        • CreateDate — (Date)

          The time the listing was created.

        • InstanceCounts — (Array<map>)

          The number of instances in this state.

          • InstanceCount — (Integer)

            The number of listed Reserved Instances in the state specified by the state.

          • State — (String)

            The states of the listed Reserved Instances.

            Possible values include:
            • "available"
            • "sold"
            • "cancelled"
            • "pending"
        • PriceSchedules — (Array<map>)

          The price of the Reserved Instance listing.

          • 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.

          • CurrencyCode — (String)

            The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD.

            Possible values include:
            • "USD"
          • Price — (Float)

            The fixed price for the 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.

        • ReservedInstancesId — (String)

          The ID of the Reserved Instance.

        • ReservedInstancesListingId — (String)

          The ID of the Reserved Instance 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.

        • 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.

        • UpdateDate — (Date)

          The last modified timestamp of the listing.

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 EC2 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: {})
    • 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>)

        The filter values. Filter values are case-sensitive.

    • ReservedInstancesModificationIds — (Array<String>)

      IDs for the submitted modification request.

    • 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:

      • 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.

      • ReservedInstancesModifications — (Array<map>)

        The Reserved Instance modification information.

        • ClientToken — (String)

          A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency.

        • CreateDate — (Date)

          The time when the modification request was created.

        • EffectiveDate — (Date)

          The time for the modification to become effective.

        • 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.

            • InstanceCount — (Integer)

              The number of modified Reserved Instances.

              Note: This is a required field for a request.
            • 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"
              • "t2.xlarge"
              • "t2.2xlarge"
              • "t3.nano"
              • "t3.micro"
              • "t3.small"
              • "t3.medium"
              • "t3.large"
              • "t3.xlarge"
              • "t3.2xlarge"
              • "t3a.nano"
              • "t3a.micro"
              • "t3a.small"
              • "t3a.medium"
              • "t3a.large"
              • "t3a.xlarge"
              • "t3a.2xlarge"
              • "t4g.nano"
              • "t4g.micro"
              • "t4g.small"
              • "t4g.medium"
              • "t4g.large"
              • "t4g.xlarge"
              • "t4g.2xlarge"
              • "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"
              • "m4.16xlarge"
              • "m2.xlarge"
              • "m2.2xlarge"
              • "m2.4xlarge"
              • "cr1.8xlarge"
              • "r3.large"
              • "r3.xlarge"
              • "r3.2xlarge"
              • "r3.4xlarge"
              • "r3.8xlarge"
              • "r4.large"
              • "r4.xlarge"
              • "r4.2xlarge"
              • "r4.4xlarge"
              • "r4.8xlarge"
              • "r4.16xlarge"
              • "r5.large"
              • "r5.xlarge"
              • "r5.2xlarge"
              • "r5.4xlarge"
              • "r5.8xlarge"
              • "r5.12xlarge"
              • "r5.16xlarge"
              • "r5.24xlarge"
              • "r5.metal"
              • "r5a.large"
              • "r5a.xlarge"
              • "r5a.2xlarge"
              • "r5a.4xlarge"
              • "r5a.8xlarge"
              • "r5a.12xlarge"
              • "r5a.16xlarge"
              • "r5a.24xlarge"
              • "r5b.large"
              • "r5b.xlarge"
              • "r5b.2xlarge"
              • "r5b.4xlarge"
              • "r5b.8xlarge"
              • "r5b.12xlarge"
              • "r5b.16xlarge"
              • "r5b.24xlarge"
              • "r5b.metal"
              • "r5d.large"
              • "r5d.xlarge"
              • "r5d.2xlarge"
              • "r5d.4xlarge"
              • "r5d.8xlarge"
              • "r5d.12xlarge"
              • "r5d.16xlarge"
              • "r5d.24xlarge"
              • "r5d.metal"
              • "r5ad.large"
              • "r5ad.xlarge"
              • "r5ad.2xlarge"
              • "r5ad.4xlarge"
              • "r5ad.8xlarge"
              • "r5ad.12xlarge"
              • "r5ad.16xlarge"
              • "r5ad.24xlarge"
              • "r6g.metal"
              • "r6g.medium"
              • "r6g.large"
              • "r6g.xlarge"
              • "r6g.2xlarge"
              • "r6g.4xlarge"
              • "r6g.8xlarge"
              • "r6g.12xlarge"
              • "r6g.16xlarge"
              • "r6gd.metal"
              • "r6gd.medium"
              • "r6gd.large"
              • "r6gd.xlarge"
              • "r6gd.2xlarge"
              • "r6gd.4xlarge"
              • "r6gd.8xlarge"
              • "r6gd.12xlarge"
              • "r6gd.16xlarge"
              • "x1.16xlarge"
              • "x1.32xlarge"
              • "x1e.xlarge"
              • "x1e.2xlarge"
              • "x1e.4xlarge"
              • "x1e.8xlarge"
              • "x1e.16xlarge"
              • "x1e.32xlarge"
              • "i2.xlarge"
              • "i2.2xlarge"
              • "i2.4xlarge"
              • "i2.8xlarge"
              • "i3.large"
              • "i3.xlarge"
              • "i3.2xlarge"
              • "i3.4xlarge"
              • "i3.8xlarge"
              • "i3.16xlarge"
              • "i3.metal"
              • "i3en.large"
              • "i3en.xlarge"
              • "i3en.2xlarge"
              • "i3en.3xlarge"
              • "i3en.6xlarge"
              • "i3en.12xlarge"
              • "i3en.24xlarge"
              • "i3en.metal"
              • "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"
              • "c5.large"
              • "c5.xlarge"
              • "c5.2xlarge"
              • "c5.4xlarge"
              • "c5.9xlarge"
              • "c5.12xlarge"
              • "c5.18xlarge"
              • "c5.24xlarge"
              • "c5.metal"
              • "c5a.large"
              • "c5a.xlarge"
              • "c5a.2xlarge"
              • "c5a.4xlarge"
              • "c5a.8xlarge"
              • "c5a.12xlarge"
              • "c5a.16xlarge"
              • "c5a.24xlarge"
              • "c5ad.large"
              • "c5ad.xlarge"
              • "c5ad.2xlarge"
              • "c5ad.4xlarge"
              • "c5ad.8xlarge"
              • "c5ad.12xlarge"
              • "c5ad.16xlarge"
              • "c5ad.24xlarge"
              • "c5d.large"
              • "c5d.xlarge"
              • "c5d.2xlarge"
              • "c5d.4xlarge"
              • "c5d.9xlarge"
              • "c5d.12xlarge"
              • "c5d.18xlarge"
              • "c5d.24xlarge"
              • "c5d.metal"
              • "c5n.large"
              • "c5n.xlarge"
              • "c5n.2xlarge"
              • "c5n.4xlarge"
              • "c5n.9xlarge"
              • "c5n.18xlarge"
              • "c5n.metal"
              • "c6g.metal"
              • "c6g.medium"
              • "c6g.large"
              • "c6g.xlarge"
              • "c6g.2xlarge"
              • "c6g.4xlarge"
              • "c6g.8xlarge"
              • "c6g.12xlarge"
              • "c6g.16xlarge"
              • "c6gd.metal"
              • "c6gd.medium"
              • "c6gd.large"
              • "c6gd.xlarge"
              • "c6gd.2xlarge"
              • "c6gd.4xlarge"
              • "c6gd.8xlarge"
              • "c6gd.12xlarge"
              • "c6gd.16xlarge"
              • "c6gn.medium"
              • "c6gn.large"
              • "c6gn.xlarge"
              • "c6gn.2xlarge"
              • "c6gn.4xlarge"
              • "c6gn.8xlarge"
              • "c6gn.12xlarge"
              • "c6gn.16xlarge"
              • "cc1.4xlarge"
              • "cc2.8xlarge"
              • "g2.2xlarge"
              • "g2.8xlarge"
              • "g3.4xlarge"
              • "g3.8xlarge"
              • "g3.16xlarge"
              • "g3s.xlarge"
              • "g4ad.xlarge"
              • "g4ad.2xlarge"
              • "g4ad.4xlarge"
              • "g4ad.8xlarge"
              • "g4ad.16xlarge"
              • "g4dn.xlarge"
              • "g4dn.2xlarge"
              • "g4dn.4xlarge"
              • "g4dn.8xlarge"
              • "g4dn.12xlarge"
              • "g4dn.16xlarge"
              • "g4dn.metal"
              • "cg1.4xlarge"
              • "p2.xlarge"
              • "p2.8xlarge"
              • "p2.16xlarge"
              • "p3.2xlarge"
              • "p3.8xlarge"
              • "p3.16xlarge"
              • "p3dn.24xlarge"
              • "p4d.24xlarge"
              • "d2.xlarge"
              • "d2.2xlarge"
              • "d2.4xlarge"
              • "d2.8xlarge"
              • "d3.xlarge"
              • "d3.2xlarge"
              • "d3.4xlarge"
              • "d3.8xlarge"
              • "d3en.xlarge"
              • "d3en.2xlarge"
              • "d3en.4xlarge"
              • "d3en.6xlarge"
              • "d3en.8xlarge"
              • "d3en.12xlarge"
              • "dl1.24xlarge"
              • "f1.2xlarge"
              • "f1.4xlarge"
              • "f1.16xlarge"
              • "m5.large"
              • "m5.xlarge"
              • "m5.2xlarge"
              • "m5.4xlarge"
              • "m5.8xlarge"
              • "m5.12xlarge"
              • "m5.16xlarge"
              • "m5.24xlarge"
              • "m5.metal"
              • "m5a.large"
              • "m5a.xlarge"
              • "m5a.2xlarge"
              • "m5a.4xlarge"
              • "m5a.8xlarge"
              • "m5a.12xlarge"
              • "m5a.16xlarge"
              • "m5a.24xlarge"
              • "m5d.large"
              • "m5d.xlarge"
              • "m5d.2xlarge"
              • "m5d.4xlarge"
              • "m5d.8xlarge"
              • "m5d.12xlarge"
              • "m5d.16xlarge"
              • "m5d.24xlarge"
              • "m5d.metal"
              • "m5ad.large"
              • "m5ad.xlarge"
              • "m5ad.2xlarge"
              • "m5ad.4xlarge"
              • "m5ad.8xlarge"
              • "m5ad.12xlarge"
              • "m5ad.16xlarge"
              • "m5ad.24xlarge"
              • "m5zn.large"
              • "m5zn.xlarge"
              • "m5zn.2xlarge"
              • "m5zn.3xlarge"
              • "m5zn.6xlarge"
              • "m5zn.12xlarge"
              • "m5zn.metal"
              • "h1.2xlarge"
              • "h1.4xlarge"
              • "h1.8xlarge"
              • "h1.16xlarge"
              • "z1d.large"
              • "z1d.xlarge"
              • "z1d.2xlarge"
              • "z1d.3xlarge"
              • "z1d.6xlarge"
              • "z1d.12xlarge"
              • "z1d.metal"
              • "u-6tb1.56xlarge"
              • "u-6tb1.112xlarge"
              • "u-9tb1.112xlarge"
              • "u-12tb1.112xlarge"
              • "u-6tb1.metal"
              • "u-9tb1.metal"
              • "u-12tb1.metal"
              • "u-18tb1.metal"
              • "u-24tb1.metal"
              • "a1.medium"
              • "a1.large"
              • "a1.xlarge"
              • "a1.2xlarge"
              • "a1.4xlarge"
              • "a1.metal"
              • "m5dn.large"
              • "m5dn.xlarge"
              • "m5dn.2xlarge"
              • "m5dn.4xlarge"
              • "m5dn.8xlarge"
              • "m5dn.12xlarge"
              • "m5dn.16xlarge"
              • "m5dn.24xlarge"
              • "m5dn.metal"
              • "m5n.large"
              • "m5n.xlarge"
              • "m5n.2xlarge"
              • "m5n.4xlarge"
              • "m5n.8xlarge"
              • "m5n.12xlarge"
              • "m5n.16xlarge"
              • "m5n.24xlarge"
              • "m5n.metal"
              • "r5dn.large"
              • "r5dn.xlarge"
              • "r5dn.2xlarge"
              • "r5dn.4xlarge"
              • "r5dn.8xlarge"
              • "r5dn.12xlarge"
              • "r5dn.16xlarge"
              • "r5dn.24xlarge"
              • "r5dn.metal"
              • "r5n.large"
              • "r5n.xlarge"
              • "r5n.2xlarge"
              • "r5n.4xlarge"
              • "r5n.8xlarge"
              • "r5n.12xlarge"
              • "r5n.16xlarge"
              • "r5n.24xlarge"
              • "r5n.metal"
              • "inf1.xlarge"
              • "inf1.2xlarge"
              • "inf1.6xlarge"
              • "inf1.24xlarge"
              • "m6g.metal"
              • "m6g.medium"
              • "m6g.large"
              • "m6g.xlarge"
              • "m6g.2xlarge"
              • "m6g.4xlarge"
              • "m6g.8xlarge"
              • "m6g.12xlarge"
              • "m6g.16xlarge"
              • "m6gd.metal"
              • "m6gd.medium"
              • "m6gd.large"
              • "m6gd.xlarge"
              • "m6gd.2xlarge"
              • "m6gd.4xlarge"
              • "m6gd.8xlarge"
              • "m6gd.12xlarge"
              • "m6gd.16xlarge"
              • "m6i.large"
              • "m6i.xlarge"
              • "m6i.2xlarge"
              • "m6i.4xlarge"
              • "m6i.8xlarge"
              • "m6i.12xlarge"
              • "m6i.16xlarge"
              • "m6i.24xlarge"
              • "m6i.32xlarge"
              • "mac1.metal"
              • "x2gd.medium"
              • "x2gd.large"
              • "x2gd.xlarge"
              • "x2gd.2xlarge"
              • "x2gd.4xlarge"
              • "x2gd.8xlarge"
              • "x2gd.12xlarge"
              • "x2gd.16xlarge"
              • "x2gd.metal"
              • "vt1.3xlarge"
              • "vt1.6xlarge"
              • "vt1.24xlarge"
            • Platform — (String)

              The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.

            • Scope — (String)

              Whether the Reserved Instance is applied to instances in a Region or instances in a specific Availability Zone.

              Possible values include:
              • "Availability Zone"
              • "Region"
        • ReservedInstancesIds — (Array<map>)

          The IDs of one or more Reserved Instances.

          • ReservedInstancesId — (String)

            The ID of the Reserved Instance.

        • ReservedInstancesModificationId — (String)

          A unique ID for the Reserved Instance modification.

        • Status — (String)

          The status of the Reserved Instances modification request.

        • StatusMessage — (String)

          The reason for the status.

        • UpdateDate — (Date)

          The time when the modification request was last updated.

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 EC2 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 | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
  MaxDuration: 'NUMBER_VALUE',
  MaxInstanceCount: 'NUMBER_VALUE',
  MaxResults: 'NUMBER_VALUE',
  MinDuration: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  OfferingClass: standard | convertible,
  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: {})
    • AvailabilityZone — (String)

      The Availability Zone in which the Reserved Instance can be used.

    • 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 Amazon Web Services 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) | Red Hat Enterprise Linux with HA (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.

      • scope - The scope of the Reserved Instance (Availability Zone or Region).

      • 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>)

        The filter values. Filter values are case-sensitive.

    • IncludeMarketplace — (Boolean)

      Include Reserved Instance Marketplace offerings in the response.

    • InstanceType — (String)

      The instance type that the reservation will cover (for example, m1.small). For more information, see Instance types in the Amazon EC2 User Guide.

      Possible values include:
      • "t1.micro"
      • "t2.nano"
      • "t2.micro"
      • "t2.small"
      • "t2.medium"
      • "t2.large"
      • "t2.xlarge"
      • "t2.2xlarge"
      • "t3.nano"
      • "t3.micro"
      • "t3.small"
      • "t3.medium"
      • "t3.large"
      • "t3.xlarge"
      • "t3.2xlarge"
      • "t3a.nano"
      • "t3a.micro"
      • "t3a.small"
      • "t3a.medium"
      • "t3a.large"
      • "t3a.xlarge"
      • "t3a.2xlarge"
      • "t4g.nano"
      • "t4g.micro"
      • "t4g.small"
      • "t4g.medium"
      • "t4g.large"
      • "t4g.xlarge"
      • "t4g.2xlarge"
      • "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"
      • "m4.16xlarge"
      • "m2.xlarge"
      • "m2.2xlarge"
      • "m2.4xlarge"
      • "cr1.8xlarge"
      • "r3.large"
      • "r3.xlarge"
      • "r3.2xlarge"
      • "r3.4xlarge"
      • "r3.8xlarge"
      • "r4.large"
      • "r4.xlarge"
      • "r4.2xlarge"
      • "r4.4xlarge"
      • "r4.8xlarge"
      • "r4.16xlarge"
      • "r5.large"
      • "r5.xlarge"
      • "r5.2xlarge"
      • "r5.4xlarge"
      • "r5.8xlarge"
      • "r5.12xlarge"
      • "r5.16xlarge"
      • "r5.24xlarge"
      • "r5.metal"
      • "r5a.large"
      • "r5a.xlarge"
      • "r5a.2xlarge"
      • "r5a.4xlarge"
      • "r5a.8xlarge"
      • "r5a.12xlarge"
      • "r5a.16xlarge"
      • "r5a.24xlarge"
      • "r5b.large"
      • "r5b.xlarge"
      • "r5b.2xlarge"
      • "r5b.4xlarge"
      • "r5b.8xlarge"
      • "r5b.12xlarge"
      • "r5b.16xlarge"
      • "r5b.24xlarge"
      • "r5b.metal"
      • "r5d.large"
      • "r5d.xlarge"
      • "r5d.2xlarge"
      • "r5d.4xlarge"
      • "r5d.8xlarge"
      • "r5d.12xlarge"
      • "r5d.16xlarge"
      • "r5d.24xlarge"
      • "r5d.metal"
      • "r5ad.large"
      • "r5ad.xlarge"
      • "r5ad.2xlarge"
      • "r5ad.4xlarge"
      • "r5ad.8xlarge"
      • "r5ad.12xlarge"
      • "r5ad.16xlarge"
      • "r5ad.24xlarge"
      • "r6g.metal"
      • "r6g.medium"
      • "r6g.large"
      • "r6g.xlarge"
      • "r6g.2xlarge"
      • "r6g.4xlarge"
      • "r6g.8xlarge"
      • "r6g.12xlarge"
      • "r6g.16xlarge"
      • "r6gd.metal"
      • "r6gd.medium"
      • "r6gd.large"
      • "r6gd.xlarge"
      • "r6gd.2xlarge"
      • "r6gd.4xlarge"
      • "r6gd.8xlarge"
      • "r6gd.12xlarge"
      • "r6gd.16xlarge"
      • "x1.16xlarge"
      • "x1.32xlarge"
      • "x1e.xlarge"
      • "x1e.2xlarge"
      • "x1e.4xlarge"
      • "x1e.8xlarge"
      • "x1e.16xlarge"
      • "x1e.32xlarge"
      • "i2.xlarge"
      • "i2.2xlarge"
      • "i2.4xlarge"
      • "i2.8xlarge"
      • "i3.large"
      • "i3.xlarge"
      • "i3.2xlarge"
      • "i3.4xlarge"
      • "i3.8xlarge"
      • "i3.16xlarge"
      • "i3.metal"
      • "i3en.large"
      • "i3en.xlarge"
      • "i3en.2xlarge"
      • "i3en.3xlarge"
      • "i3en.6xlarge"
      • "i3en.12xlarge"
      • "i3en.24xlarge"
      • "i3en.metal"
      • "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"
      • "c5.large"
      • "c5.xlarge"
      • "c5.2xlarge"
      • "c5.4xlarge"
      • "c5.9xlarge"
      • "c5.12xlarge"
      • "c5.18xlarge"
      • "c5.24xlarge"
      • "c5.metal"
      • "c5a.large"
      • "c5a.xlarge"
      • "c5a.2xlarge"
      • "c5a.4xlarge"
      • "c5a.8xlarge"
      • "c5a.12xlarge"
      • "c5a.16xlarge"
      • "c5a.24xlarge"
      • "c5ad.large"
      • "c5ad.xlarge"
      • "c5ad.2xlarge"
      • "c5ad.4xlarge"
      • "c5ad.8xlarge"
      • "c5ad.12xlarge"
      • "c5ad.16xlarge"
      • "c5ad.24xlarge"
      • "c5d.large"
      • "c5d.xlarge"
      • "c5d.2xlarge"
      • "c5d.4xlarge"
      • "c5d.9xlarge"
      • "c5d.12xlarge"
      • "c5d.18xlarge"
      • "c5d.24xlarge"
      • "c5d.metal"
      • "c5n.large"
      • "c5n.xlarge"
      • "c5n.2xlarge"
      • "c5n.4xlarge"
      • "c5n.9xlarge"
      • "c5n.18xlarge"
      • "c5n.metal"
      • "c6g.metal"
      • "c6g.medium"
      • "c6g.large"
      • "c6g.xlarge"
      • "c6g.2xlarge"
      • "c6g.4xlarge"
      • "c6g.8xlarge"
      • "c6g.12xlarge"
      • "c6g.16xlarge"
      • "c6gd.metal"
      • "c6gd.medium"
      • "c6gd.large"
      • "c6gd.xlarge"
      • "c6gd.2xlarge"
      • "c6gd.4xlarge"
      • "c6gd.8xlarge"
      • "c6gd.12xlarge"
      • "c6gd.16xlarge"
      • "c6gn.medium"
      • "c6gn.large"
      • "c6gn.xlarge"
      • "c6gn.2xlarge"
      • "c6gn.4xlarge"
      • "c6gn.8xlarge"
      • "c6gn.12xlarge"
      • "c6gn.16xlarge"
      • "cc1.4xlarge"
      • "cc2.8xlarge"
      • "g2.2xlarge"
      • "g2.8xlarge"
      • "g3.4xlarge"
      • "g3.8xlarge"
      • "g3.16xlarge"
      • "g3s.xlarge"
      • "g4ad.xlarge"
      • "g4ad.2xlarge"
      • "g4ad.4xlarge"
      • "g4ad.8xlarge"
      • "g4ad.16xlarge"
      • "g4dn.xlarge"
      • "g4dn.2xlarge"
      • "g4dn.4xlarge"
      • "g4dn.8xlarge"
      • "g4dn.12xlarge"
      • "g4dn.16xlarge"
      • "g4dn.metal"
      • "cg1.4xlarge"
      • "p2.xlarge"
      • "p2.8xlarge"
      • "p2.16xlarge"
      • "p3.2xlarge"
      • "p3.8xlarge"
      • "p3.16xlarge"
      • "p3dn.24xlarge"
      • "p4d.24xlarge"
      • "d2.xlarge"
      • "d2.2xlarge"
      • "d2.4xlarge"
      • "d2.8xlarge"
      • "d3.xlarge"
      • "d3.2xlarge"
      • "d3.4xlarge"
      • "d3.8xlarge"
      • "d3en.xlarge"
      • "d3en.2xlarge"
      • "d3en.4xlarge"
      • "d3en.6xlarge"
      • "d3en.8xlarge"
      • "d3en.12xlarge"
      • "dl1.24xlarge"
      • "f1.2xlarge"
      • "f1.4xlarge"
      • "f1.16xlarge"
      • "m5.large"
      • "m5.xlarge"
      • "m5.2xlarge"
      • "m5.4xlarge"
      • "m5.8xlarge"
      • "m5.12xlarge"
      • "m5.16xlarge"
      • "m5.24xlarge"
      • "m5.metal"
      • "m5a.large"
      • "m5a.xlarge"
      • "m5a.2xlarge"
      • "m5a.4xlarge"
      • "m5a.8xlarge"
      • "m5a.12xlarge"
      • "m5a.16xlarge"
      • "m5a.24xlarge"
      • "m5d.large"
      • "m5d.xlarge"
      • "m5d.2xlarge"
      • "m5d.4xlarge"
      • "m5d.8xlarge"
      • "m5d.12xlarge"
      • "m5d.16xlarge"
      • "m5d.24xlarge"
      • "m5d.metal"
      • "m5ad.large"
      • "m5ad.xlarge"
      • "m5ad.2xlarge"
      • "m5ad.4xlarge"
      • "m5ad.8xlarge"
      • "m5ad.12xlarge"
      • "m5ad.16xlarge"
      • "m5ad.24xlarge"
      • "m5zn.large"
      • "m5zn.xlarge"
      • "m5zn.2xlarge"
      • "m5zn.3xlarge"
      • "m5zn.6xlarge"
      • "m5zn.12xlarge"
      • "m5zn.metal"
      • "h1.2xlarge"
      • "h1.4xlarge"
      • "h1.8xlarge"
      • "h1.16xlarge"
      • "z1d.large"
      • "z1d.xlarge"
      • "z1d.2xlarge"
      • "z1d.3xlarge"
      • "z1d.6xlarge"
      • "z1d.12xlarge"
      • "z1d.metal"
      • "u-6tb1.56xlarge"
      • "u-6tb1.112xlarge"
      • "u-9tb1.112xlarge"
      • "u-12tb1.112xlarge"
      • "u-6tb1.metal"
      • "u-9tb1.metal"
      • "u-12tb1.metal"
      • "u-18tb1.metal"
      • "u-24tb1.metal"
      • "a1.medium"
      • "a1.large"
      • "a1.xlarge"
      • "a1.2xlarge"
      • "a1.4xlarge"
      • "a1.metal"
      • "m5dn.large"
      • "m5dn.xlarge"
      • "m5dn.2xlarge"
      • "m5dn.4xlarge"
      • "m5dn.8xlarge"
      • "m5dn.12xlarge"
      • "m5dn.16xlarge"
      • "m5dn.24xlarge"
      • "m5dn.metal"
      • "m5n.large"
      • "m5n.xlarge"
      • "m5n.2xlarge"
      • "m5n.4xlarge"
      • "m5n.8xlarge"
      • "m5n.12xlarge"
      • "m5n.16xlarge"
      • "m5n.24xlarge"
      • "m5n.metal"
      • "r5dn.large"
      • "r5dn.xlarge"
      • "r5dn.2xlarge"
      • "r5dn.4xlarge"
      • "r5dn.8xlarge"
      • "r5dn.12xlarge"
      • "r5dn.16xlarge"
      • "r5dn.24xlarge"
      • "r5dn.metal"
      • "r5n.large"
      • "r5n.xlarge"
      • "r5n.2xlarge"
      • "r5n.4xlarge"
      • "r5n.8xlarge"
      • "r5n.12xlarge"
      • "r5n.16xlarge"
      • "r5n.24xlarge"
      • "r5n.metal"
      • "inf1.xlarge"
      • "inf1.2xlarge"
      • "inf1.6xlarge"
      • "inf1.24xlarge"
      • "m6g.metal"
      • "m6g.medium"
      • "m6g.large"
      • "m6g.xlarge"
      • "m6g.2xlarge"
      • "m6g.4xlarge"
      • "m6g.8xlarge"
      • "m6g.12xlarge"
      • "m6g.16xlarge"
      • "m6gd.metal"
      • "m6gd.medium"
      • "m6gd.large"
      • "m6gd.xlarge"
      • "m6gd.2xlarge"
      • "m6gd.4xlarge"
      • "m6gd.8xlarge"
      • "m6gd.12xlarge"
      • "m6gd.16xlarge"
      • "m6i.large"
      • "m6i.xlarge"
      • "m6i.2xlarge"
      • "m6i.4xlarge"
      • "m6i.8xlarge"
      • "m6i.12xlarge"
      • "m6i.16xlarge"
      • "m6i.24xlarge"
      • "m6i.32xlarge"
      • "mac1.metal"
      • "x2gd.medium"
      • "x2gd.large"
      • "x2gd.xlarge"
      • "x2gd.2xlarge"
      • "x2gd.4xlarge"
      • "x2gd.8xlarge"
      • "x2gd.12xlarge"
      • "x2gd.16xlarge"
      • "x2gd.metal"
      • "vt1.3xlarge"
      • "vt1.6xlarge"
      • "vt1.24xlarge"
    • 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

    • MinDuration — (Integer)

      The minimum duration (in seconds) to filter when searching for offerings.

      Default: 2592000 (1 month)

    • OfferingClass — (String)

      The offering class of the Reserved Instance. Can be standard or convertible.

      Possible values include:
      • "standard"
      • "convertible"
    • 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)"
    • ReservedInstancesOfferingIds — (Array<String>)

      One or more Reserved Instances offering IDs.

    • 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.

    • 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).

      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"
    • 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

    • NextToken — (String)

      The token to retrieve the next page of results.

    • 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:

      • ReservedInstancesOfferings — (Array<map>)

        A list of Reserved Instances offerings.

        • AvailabilityZone — (String)

          The Availability Zone in which the Reserved Instance can be used.

        • Duration — (Integer)

          The duration of the Reserved Instance, in seconds.

        • FixedPrice — (Float)

          The purchase price 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"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • ProductDescription — (String)

          The Reserved Instance product platform description.

          Possible values include:
          • "Linux/UNIX"
          • "Linux/UNIX (Amazon VPC)"
          • "Windows"
          • "Windows (Amazon VPC)"
        • ReservedInstancesOfferingId — (String)

          The ID of the Reserved Instance offering. This is the offering ID used in GetReservedInstancesExchangeQuote to confirm that an exchange can be made.

        • UsagePrice — (Float)

          The usage price of the Reserved Instance, per hour.

        • 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"
        • InstanceTenancy — (String)

          The tenancy of the instance.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • Marketplace — (Boolean)

          Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or Amazon Web Services. If it's a Reserved Instance Marketplace offering, this is true.

        • OfferingClass — (String)

          If convertible it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If standard, it is not possible to perform an exchange.

          Possible values include:
          • "standard"
          • "convertible"
        • OfferingType — (String)

          The Reserved Instance offering type.

          Possible values include:
          • "Heavy Utilization"
          • "Medium Utilization"
          • "Light Utilization"
          • "No Upfront"
          • "Partial Upfront"
          • "All Upfront"
        • PricingDetails — (Array<map>)

          The pricing details of the Reserved Instance offering.

          • Count — (Integer)

            The number of reservations available for the price.

          • Price — (Float)

            The price per instance.

        • RecurringCharges — (Array<map>)

          The recurring charge tag assigned to the resource.

          • Amount — (Float)

            The amount of the recurring charge.

          • Frequency — (String)

            The frequency of the recurring charge.

            Possible values include:
            • "Hourly"
        • Scope — (String)

          Whether the Reserved Instance is applied to instances in a Region or an Availability Zone.

          Possible values include:
          • "Availability Zone"
          • "Region"
      • 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, see Route tables in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

To describe a route table


/* This example describes the specified route table. */

 var params = {
  RouteTableIds: [
     "rtb-1f382e7d"
  ]
 };
 ec2.describeRouteTables(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    RouteTables: [
       {
      Associations: [
         {
        Main: true, 
        RouteTableAssociationId: "rtbassoc-d8ccddba", 
        RouteTableId: "rtb-1f382e7d"
       }
      ], 
      PropagatingVgws: [
      ], 
      RouteTableId: "rtb-1f382e7d", 
      Routes: [
         {
        DestinationCidrBlock: "10.0.0.0/16", 
        GatewayId: "local", 
        State: "active"
       }
      ], 
      Tags: [
      ], 
      VpcId: "vpc-a01106c2"
     }
    ]
   }
   */
 });

Calling the describeRouteTables operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  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: {})
    • 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 tables that do not have an association ID are not returned in the response.

      • owner-id - The ID of the Amazon Web Services account that owns the route table.

      • route-table-id - The ID of the route table.

      • route.destination-cidr-block - The IPv4 CIDR range specified in a route in the table.

      • route.destination-ipv6-cidr-block - The IPv6 CIDR range specified in a route in the route table.

      • route.destination-prefix-list-id - The ID (prefix) of the Amazon Web Service specified in a route in the table.

      • route.egress-only-internet-gateway-id - The ID of an egress-only Internet gateway specified in a route in the route 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.transit-gateway-id - The ID of a transit 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • 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>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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.

        • Associations — (Array<map>)

          The associations between the route table and one or more subnets or a gateway.

          • Main — (Boolean)

            Indicates whether this is the main route table.

          • RouteTableAssociationId — (String)

            The ID of the association.

          • 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.

          • GatewayId — (String)

            The ID of the internet gateway or virtual private gateway.

          • AssociationState — (map)

            The state of the association.

            • State — (String)

              The state of the association.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failed"
            • StatusMessage — (String)

              The status message, if applicable.

        • PropagatingVgws — (Array<map>)

          Any virtual private gateway (VGW) propagating routes.

          • GatewayId — (String)

            The ID of the virtual private gateway.

        • RouteTableId — (String)

          The ID of the route table.

        • Routes — (Array<map>)

          The routes in the route table.

          • DestinationCidrBlock — (String)

            The IPv4 CIDR block used for the destination match.

          • DestinationIpv6CidrBlock — (String)

            The IPv6 CIDR block used for the destination match.

          • DestinationPrefixListId — (String)

            The prefix of the Amazon Web Service.

          • EgressOnlyInternetGatewayId — (String)

            The ID of the egress-only internet gateway.

          • 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 ID of Amazon Web Services account that owns the instance.

          • NatGatewayId — (String)

            The ID of a NAT gateway.

          • TransitGatewayId — (String)

            The ID of a transit gateway.

          • LocalGatewayId — (String)

            The ID of the local gateway.

          • CarrierGatewayId — (String)

            The ID of the carrier gateway.

          • NetworkInterfaceId — (String)

            The ID of the network interface.

          • 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"
          • 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"
          • VpcPeeringConnectionId — (String)

            The ID of a VPC peering connection.

        • 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.

        • VpcId — (String)

          The ID of the VPC.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the route table.

      • 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.

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:

To describe an available schedule


/* This example describes a schedule that occurs every week on Sunday, starting on the specified date. Note that the output contains a single schedule as an example. */

 var params = {
  FirstSlotStartTimeRange: {
   EarliestTime: <Date Representation>, 
   LatestTime: <Date Representation>
  }, 
  Recurrence: {
   Frequency: "Weekly", 
   Interval: 1, 
   OccurrenceDays: [
      1
   ]
  }
 };
 ec2.describeScheduledInstanceAvailability(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ScheduledInstanceAvailabilitySet: [
       {
      AvailabilityZone: "us-west-2b", 
      AvailableInstanceCount: 20, 
      FirstSlotStartTime: <Date Representation>, 
      HourlyPrice: "0.095", 
      InstanceType: "c4.large", 
      MaxTermDurationInDays: 366, 
      MinTermDurationInDays: 366, 
      NetworkPlatform: "EC2-VPC", 
      Platform: "Linux/UNIX", 
      PurchaseToken: "eyJ2IjoiMSIsInMiOjEsImMiOi...", 
      Recurrence: {
       Frequency: "Weekly", 
       Interval: 1, 
       OccurrenceDaySet: [
          1
       ], 
       OccurrenceRelativeToEnd: false
      }, 
      SlotDurationInHours: 23, 
      TotalScheduledInstanceHours: 1219
     }
    ]
   }
   */
 });

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: 'NUMBER_VALUE',
    OccurrenceDays: [
      'NUMBER_VALUE',
      /* more items */
    ],
    OccurrenceRelativeToEnd: true || false,
    OccurrenceUnit: 'STRING_VALUE'
  },
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  MaxSlotDurationInHours: 'NUMBER_VALUE',
  MinSlotDurationInHours: 'NUMBER_VALUE',
  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.

    • Filters — (Array<map>)

      The 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>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • 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.

    • MaxSlotDurationInHours — (Integer)

      The maximum available duration, in hours. This value must be greater than MinSlotDurationInHours and less than 1,720.

    • 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.

    • NextToken — (String)

      The token for the next set of results.

    • 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.

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.

        • AvailabilityZone — (String)

          The Availability Zone.

        • AvailableInstanceCount — (Integer)

          The number of available instances.

        • FirstSlotStartTime — (Date)

          The time period for the first schedule to start.

        • HourlyPrice — (String)

          The hourly price for a single instance.

        • InstanceType — (String)

          The instance type. You can specify one of the C3, C4, M4, or R3 instance types.

        • MaxTermDurationInDays — (Integer)

          The maximum term. The only possible value is 365 days.

        • MinTermDurationInDays — (Integer)

          The minimum term. The only possible value is 365 days.

        • NetworkPlatform — (String)

          The network platform (EC2-Classic or EC2-VPC).

        • Platform — (String)

          The platform (Linux/UNIX or Windows).

        • PurchaseToken — (String)

          The purchase token. This token expires in two hours.

        • 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).

        • SlotDurationInHours — (Integer)

          The number of hours in the schedule.

        • TotalScheduledInstanceHours — (Integer)

          The total number of hours for a single instance for the entire term.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeScheduledInstances(params = {}, callback) ⇒ AWS.Request

Describes the specified Scheduled Instances or all your Scheduled Instances.

Service Reference:

Examples:

To describe your Scheduled Instances


/* This example describes the specified Scheduled Instance. */

 var params = {
  ScheduledInstanceIds: [
     "sci-1234-1234-1234-1234-123456789012"
  ]
 };
 ec2.describeScheduledInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ScheduledInstanceSet: [
       {
      AvailabilityZone: "us-west-2b", 
      CreateDate: <Date Representation>, 
      HourlyPrice: "0.095", 
      InstanceCount: 1, 
      InstanceType: "c4.large", 
      NetworkPlatform: "EC2-VPC", 
      NextSlotStartTime: <Date Representation>, 
      Platform: "Linux/UNIX", 
      Recurrence: {
       Frequency: "Weekly", 
       Interval: 1, 
       OccurrenceDaySet: [
          1
       ], 
       OccurrenceRelativeToEnd: false, 
       OccurrenceUnit: ""
      }, 
      ScheduledInstanceId: "sci-1234-1234-1234-1234-123456789012", 
      SlotDurationInHours: 32, 
      TermEndDate: <Date Representation>, 
      TermStartDate: <Date Representation>, 
      TotalScheduledInstanceHours: 1696
     }
    ]
   }
   */
 });

Calling the describeScheduledInstances operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  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.

    • Filters — (Array<map>)

      The 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>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • NextToken — (String)

      The token for the next set of results.

    • ScheduledInstanceIds — (Array<String>)

      The 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.

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.

        • AvailabilityZone — (String)

          The Availability Zone.

        • CreateDate — (Date)

          The date when the Scheduled Instance was purchased.

        • HourlyPrice — (String)

          The hourly price for a single instance.

        • InstanceCount — (Integer)

          The number of instances.

        • InstanceType — (String)

          The instance type.

        • NetworkPlatform — (String)

          The network platform (EC2-Classic or EC2-VPC).

        • NextSlotStartTime — (Date)

          The time for the next schedule to start.

        • Platform — (String)

          The platform (Linux/UNIX or Windows).

        • PreviousSlotEndTime — (Date)

          The time that the previous schedule ended or will end.

        • 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).

        • ScheduledInstanceId — (String)

          The Scheduled Instance ID.

        • SlotDurationInHours — (Integer)

          The number of hours in the schedule.

        • TermEndDate — (Date)

          The end date for the Scheduled Instance.

        • TermStartDate — (Date)

          The start date for the Scheduled Instance.

        • TotalScheduledInstanceHours — (Integer)

          The total number of hours for a single instance for the entire term.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSecurityGroupReferences(params = {}, callback) ⇒ AWS.Request

[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.

Service Reference:

Examples:

To describe security group references


/* This example describes the security group references for the specified security group. */

 var params = {
  GroupId: [
     "sg-903004f8"
  ]
 };
 ec2.describeSecurityGroupReferences(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SecurityGroupReferenceSet: [
       {
      GroupId: "sg-903004f8", 
      ReferencingVpcId: "vpc-1a2b3c4d", 
      VpcPeeringConnectionId: "pcx-b04deed9"
     }
    ]
   }
   */
 });

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 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 — (Array<String>)

      The IDs of the security groups 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.

        • GroupId — (String)

          The ID of your security group.

        • ReferencingVpcId — (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.

describeSecurityGroupRules(params = {}, callback) ⇒ AWS.Request

Describes one or more of your security group rules.

Service Reference:

Examples:

Calling the describeSecurityGroupRules operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  SecurityGroupRuleIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeSecurityGroupRules(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: {})
    • Filters — (Array<map>)

      One or more filters.

      • group-id - The ID of the security group.

      • security-group-rule-id - The ID of the security group rule.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • SecurityGroupRuleIds — (Array<String>)

      The IDs of the security group rules.

    • 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.

    • NextToken — (String)

      The token for 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 request with the returned NextToken value. This value can be between 5 and 1000. If this parameter is not specified, then all results are returned.

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:

      • SecurityGroupRules — (Array<map>)

        Information about security group rules.

        • SecurityGroupRuleId — (String)

          The ID of the security group rule.

        • GroupId — (String)

          The ID of the security group.

        • GroupOwnerId — (String)

          The ID of the Amazon Web Services account that owns the security group.

        • IsEgress — (Boolean)

          Indicates whether the security group rule is an outbound rule.

        • IpProtocol — (String)

          The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

          Use -1 to specify all protocols.

        • FromPort — (Integer)

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • ToPort — (Integer)

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • CidrIpv4 — (String)

          The IPv4 CIDR range.

        • CidrIpv6 — (String)

          The IPv6 CIDR range.

        • PrefixListId — (String)

          The ID of the prefix list.

        • ReferencedGroupInfo — (map)

          Describes the security group that is referenced in the rule.

          • GroupId — (String)

            The ID of the security group.

          • PeeringStatus — (String)

            The status of a VPC peering connection, if applicable.

          • UserId — (String)

            The Amazon Web Services account ID.

          • VpcId — (String)

            The ID of the VPC.

          • VpcPeeringConnectionId — (String)

            The ID of the VPC peering connection.

        • Description — (String)

          The security group rule description.

        • Tags — (Array<map>)

          The tags applied to the security group rule.

          • 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.

describeSecurityGroups(params = {}, callback) ⇒ AWS.Request

Describes the specified security groups or all 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.

Service Reference:

Examples:

To describe a security group


/* This example describes the specified security group. */

 var params = {
  GroupIds: [
     "sg-903004f8"
  ]
 };
 ec2.describeSecurityGroups(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

To describe a tagged security group


/* This example describes the security groups that include the specified tag (Purpose=test). */

 var params = {
  Filters: [
     {
    Name: "tag:Purpose", 
    Values: [
       "test"
    ]
   }
  ]
 };
 ec2.describeSecurityGroups(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

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 */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
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: {})
    • Filters — (Array<map>)

      The 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.cidr - An IPv4 CIDR block for an outbound security group rule.

      • egress.ip-permission.from-port - For an outbound rule, the start of port range for the TCP and UDP protocols, or an ICMP type number.

      • egress.ip-permission.group-id - The ID of a security group that has been referenced in an outbound security group rule.

      • egress.ip-permission.group-name - The name of a security group that is referenced in an outbound security group rule.

      • egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound security group rule.

      • egress.ip-permission.prefix-list-id - The ID of a prefix list to which a security group rule allows outbound access.

      • egress.ip-permission.protocol - The IP protocol for an outbound security group rule (tcp | udp | icmp, a protocol number, or -1 for all protocols).

      • egress.ip-permission.to-port - For an outbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.

      • egress.ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an outbound security group rule.

      • group-id - The ID of the security group.

      • group-name - The name of the security group.

      • ip-permission.cidr - An IPv4 CIDR block for an inbound security group rule.

      • ip-permission.from-port - For an inbound rule, 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 referenced in an inbound security group rule.

      • ip-permission.group-name - The name of a security group that is referenced in an inbound security group rule.

      • ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security group rule.

      • ip-permission.prefix-list-id - The ID of a prefix list from which a security group rule allows inbound access.

      • ip-permission.protocol - The IP protocol for an inbound security group rule (tcp | udp | icmp, a protocol number, or -1 for all protocols).

      • ip-permission.to-port - For an inbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.

      • ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an inbound security group rule.

      • owner-id - The Amazon Web Services account ID of the owner of the security group.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • 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>)

        The filter values. Filter values are case-sensitive.

    • GroupIds — (Array<String>)

      The IDs of the security groups. Required for security groups in a nondefault VPC.

      Default: Describes all of your security groups.

    • GroupNames — (Array<String>)

      [EC2-Classic and default VPC only] The names of the security groups. 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 of your security groups.

    • 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.

    • 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 request with the returned NextToken value. This value can be between 5 and 1000. If this parameter is not specified, then all results are returned.

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 the security groups.

        • Description — (String)

          A description of the security group.

        • GroupName — (String)

          The name of the security group.

        • IpPermissions — (Array<map>)

          The inbound rules associated with the security group.

          • FromPort — (Integer)

            The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

          • IpProtocol — (String)

            The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

            [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

          • IpRanges — (Array<map>)

            The IPv4 ranges.

            • CidrIp — (String)

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

            • Description — (String)

              A description for the security group rule that references this IPv4 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

          • Ipv6Ranges — (Array<map>)

            [VPC only] The IPv6 ranges.

            • CidrIpv6 — (String)

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

            • Description — (String)

              A description for the security group rule that references this IPv6 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

          • PrefixListIds — (Array<map>)

            [VPC only] The prefix list IDs.

            • Description — (String)

              A description for the security group rule that references this prefix list ID.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • PrefixListId — (String)

              The ID of the prefix.

          • ToPort — (Integer)

            The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

          • UserIdGroupPairs — (Array<map>)

            The security group and Amazon Web Services account ID pairs.

            • Description — (String)

              A description for the security group rule that references this user ID group pair.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • GroupId — (String)

              The ID of the security group.

            • 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.

              For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

            • PeeringStatus — (String)

              The status of a VPC peering connection, if applicable.

            • UserId — (String)

              The ID of an Amazon Web Services account.

              For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

            • 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.

        • OwnerId — (String)

          The Amazon Web Services account ID of the owner of the security group.

        • GroupId — (String)

          The ID of the security group.

        • IpPermissionsEgress — (Array<map>)

          [VPC only] The outbound rules associated with the security group.

          • FromPort — (Integer)

            The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

          • IpProtocol — (String)

            The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

            [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

          • IpRanges — (Array<map>)

            The IPv4 ranges.

            • CidrIp — (String)

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

            • Description — (String)

              A description for the security group rule that references this IPv4 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

          • Ipv6Ranges — (Array<map>)

            [VPC only] The IPv6 ranges.

            • CidrIpv6 — (String)

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

            • Description — (String)

              A description for the security group rule that references this IPv6 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

          • PrefixListIds — (Array<map>)

            [VPC only] The prefix list IDs.

            • Description — (String)

              A description for the security group rule that references this prefix list ID.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • PrefixListId — (String)

              The ID of the prefix.

          • ToPort — (Integer)

            The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

          • UserIdGroupPairs — (Array<map>)

            The security group and Amazon Web Services account ID pairs.

            • Description — (String)

              A description for the security group rule that references this user ID group pair.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • GroupId — (String)

              The ID of the security group.

            • 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.

              For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

            • PeeringStatus — (String)

              The status of a VPC peering connection, if applicable.

            • UserId — (String)

              The ID of an Amazon Web Services account.

              For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

            • 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.

        • 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.

        • VpcId — (String)

          [VPC only] The ID of the VPC for the security group.

      • 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:

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.

Service Reference:

Examples:

To describe snapshot attributes


/* This example describes the ``createVolumePermission`` attribute on a snapshot with the snapshot ID of ``snap-066877671789bd71b``. */

 var params = {
  Attribute: "createVolumePermission", 
  SnapshotId: "snap-066877671789bd71b"
 };
 ec2.describeSnapshotAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    CreateVolumePermissions: [
    ], 
    SnapshotId: "snap-066877671789bd71b"
   }
   */
 });

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: {})
    • Attribute — (String)

      The snapshot attribute you would like to view.

      Possible values include:
      • "productCodes"
      • "createVolumePermission"
    • SnapshotId — (String)

      The ID of the EBS snapshot.

    • 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:

      • CreateVolumePermissions — (Array<map>)

        The users and groups that have the permissions for creating volumes from the snapshot.

        • Group — (String)

          The group to be added or removed. The possible value is all.

          Possible values include:
          • "all"
        • UserId — (String)

          The ID of the Amazon Web Services account to be added or removed.

      • ProductCodes — (Array<map>)

        The product codes.

        • ProductCodeId — (String)

          The product code.

        • ProductCodeType — (String)

          The type of product code.

          Possible values include:
          • "devpay"
          • "marketplace"
      • SnapshotId — (String)

        The ID of the EBS snapshot.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSnapshots(params = {}, callback) ⇒ AWS.Request

Describes the specified EBS snapshots available to you or all of the EBS snapshots available to you.

The snapshots available to you include public snapshots, private snapshots that you own, and private snapshots owned by other Amazon Web Services accounts for which you have 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 Amazon Web Services accounts have create volume permissions for these snapshots.

  • explicit: The owner of the snapshot granted create volume permissions to a specific Amazon Web Services account.

  • implicit: An Amazon Web Services account has implicit create volume permissions for all snapshots it owns.

The list of snapshots returned can be filtered by specifying snapshot IDs, snapshot owners, or Amazon Web Services 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 Amazon Web Services 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 Amazon Web Services 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, we recommend that you 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.

To get the state of fast snapshot restores for a snapshot, use DescribeFastSnapshotRestores.

For more information about EBS snapshots, see Amazon EBS snapshots in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To describe a snapshot


/* This example describes a snapshot with the snapshot ID of ``snap-1234567890abcdef0``. */

 var params = {
  SnapshotIds: [
     "snap-1234567890abcdef0"
  ]
 };
 ec2.describeSnapshots(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NextToken: "", 
    Snapshots: [
       {
      Description: "This is my snapshot.", 
      OwnerId: "012345678910", 
      Progress: "100%", 
      SnapshotId: "snap-1234567890abcdef0", 
      StartTime: <Date Representation>, 
      State: "completed", 
      VolumeId: "vol-049df61146c4d7901", 
      VolumeSize: 8
     }
    ]
   }
   */
 });

To describe snapshots using filters


/* This example describes all snapshots owned by the ID 012345678910 that are in the ``pending`` status. */

 var params = {
  Filters: [
     {
    Name: "status", 
    Values: [
       "pending"
    ]
   }
  ], 
  OwnerIds: [
     "012345678910"
  ]
 };
 ec2.describeSnapshots(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NextToken: "", 
    Snapshots: [
       {
      Description: "This is my copied snapshot.", 
      OwnerId: "012345678910", 
      Progress: "87%", 
      SnapshotId: "snap-066877671789bd71b", 
      StartTime: <Date Representation>, 
      State: "pending", 
      VolumeId: "vol-1234567890abcdef0", 
      VolumeSize: 8
     }
    ]
   }
   */
 });

Calling the describeSnapshots operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  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: {})
    • Filters — (Array<map>)

      The filters.

      • description - A description of the snapshot.

      • encrypted - Indicates whether the snapshot is encrypted (true | false)

      • owner-alias - The owner alias, from an Amazon-maintained list (amazon). This is not the user-configured Amazon Web Services account alias set using the IAM console. We recommend that you use the related parameter instead of this filter.

      • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the related parameter instead of this filter.

      • progress - The progress of the snapshot, as a percentage (for example, 80%).

      • snapshot-id - The snapshot ID.

      • start-time - The time stamp when the snapshot was initiated.

      • status - The status of the snapshot (pending | completed | error).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • volume-id - The ID of the volume the snapshot is for.

      • volume-size - The size of the volume, in GiB.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.

    • NextToken — (String)

      The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

    • OwnerIds — (Array<String>)

      Scopes the results to snapshots with the specified owners. You can specify a combination of Amazon Web Services account IDs, self, and amazon.

    • RestorableByUserIds — (Array<String>)

      The IDs of the Amazon Web Services accounts that can create volumes from the snapshot.

    • SnapshotIds — (Array<String>)

      The snapshot IDs.

      Default: Describes the snapshots for which you have create volume permissions.

    • 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:

      • Snapshots — (Array<map>)

        Information about the snapshots.

        • 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 DescribeSnapshots.

        • Description — (String)

          The description for the snapshot.

        • Encrypted — (Boolean)

          Indicates whether the snapshot is encrypted.

        • KmsKeyId — (String)

          The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the parent volume.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the EBS snapshot.

        • Progress — (String)

          The progress of the snapshot, as a percentage.

        • SnapshotId — (String)

          The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

        • StartTime — (Date)

          The time stamp when the snapshot was initiated.

        • 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 Key Management Service (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 DescribeSnapshots.

        • 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.

        • VolumeSize — (Integer)

          The size of the volume, in GiB.

        • OwnerAlias — (String)

          The Amazon Web Services owner alias, from an Amazon-maintained list (amazon). This is not the user-configured Amazon Web Services account alias set using the IAM console.

        • OutpostArn — (String)

          The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide.

        • 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.

      • NextToken — (String)

        The NextToken value to include in a future DescribeSnapshots request. When the results of a DescribeSnapshots request exceed MaxResults, this value can be used 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:

describeSpotDatafeedSubscription(params = {}, callback) ⇒ AWS.Request

Describes the data feed for Spot Instances. For more information, see Spot Instance data feed in the Amazon EC2 User Guide for Linux Instances.

Examples:

To describe the datafeed for your AWS account


/* This example describes the Spot Instance datafeed subscription for your AWS account. */

 var params = {
 };
 ec2.describeSpotDatafeedSubscription(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SpotDatafeedSubscription: {
     Bucket: "my-s3-bucket", 
     OwnerId: "123456789012", 
     Prefix: "spotdata", 
     State: "Active"
    }
   }
   */
 });

Calling the describeSpotDatafeedSubscription operation

var params = {
  DryRun: true || false
};
ec2.describeSpotDatafeedSubscription(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:

      • SpotDatafeedSubscription — (map)

        The Spot Instance data feed subscription.

        • Bucket — (String)

          The name of the Amazon S3 bucket where the Spot Instance data feed is located.

        • 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.

        • OwnerId — (String)

          The Amazon Web Services account ID of the account.

        • Prefix — (String)

          The prefix for the data feed files.

        • State — (String)

          The state of the Spot Instance data feed subscription.

          Possible values include:
          • "Active"
          • "Inactive"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSpotFleetInstances(params = {}, callback) ⇒ AWS.Request

Describes the running instances for the specified Spot Fleet.

Service Reference:

Examples:

To describe the Spot Instances associated with a Spot fleet


/* This example lists the Spot Instances associated with the specified Spot fleet. */

 var params = {
  SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
 };
 ec2.describeSpotFleetInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ActiveInstances: [
       {
      InstanceId: "i-1234567890abcdef0", 
      InstanceType: "m3.medium", 
      SpotInstanceRequestId: "sir-08b93456"
     }
    ], 
    SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
   }
   */
 });

Calling the describeSpotFleetInstances operation

var params = {
  SpotFleetRequestId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeSpotFleetInstances(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.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

    • NextToken — (String)

      The token for the next set of results.

    • SpotFleetRequestId — (String)

      The ID of the Spot Fleet 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:

      • ActiveInstances — (Array<map>)

        The running instances. This list is refreshed periodically and might be out of date.

        • InstanceId — (String)

          The ID of the instance.

        • InstanceType — (String)

          The instance type.

        • SpotInstanceRequestId — (String)

          The ID of the Spot Instance request.

        • InstanceHealth — (String)

          The health status of the instance. If the status of either the instance status check or the system status check is impaired, the health status of the instance is unhealthy. Otherwise, the health status is healthy.

          Possible values include:
          • "healthy"
          • "unhealthy"
      • NextToken — (String)

        The token required to retrieve the next set of results. This value is null when there are no more results to return.

      • SpotFleetRequestId — (String)

        The ID of the Spot Fleet request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSpotFleetRequestHistory(params = {}, callback) ⇒ AWS.Request

Describes the events for the specified Spot Fleet request during the specified time.

Spot Fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event. Spot Fleet events are available for 48 hours.

For more information, see Monitor fleet events using Amazon EventBridge in the Amazon EC2 User Guide for Linux Instances.

Service Reference:

Examples:

To describe Spot fleet history


/* This example returns the history for the specified Spot fleet starting at the specified time. */

 var params = {
  SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
  StartTime: <Date Representation>
 };
 ec2.describeSpotFleetRequestHistory(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    HistoryRecords: [
       {
      EventInformation: {
       EventSubType: "submitted"
      }, 
      EventType: "fleetRequestChange", 
      Timestamp: <Date Representation>
     }, 
       {
      EventInformation: {
       EventSubType: "active"
      }, 
      EventType: "fleetRequestChange", 
      Timestamp: <Date Representation>
     }, 
       {
      EventInformation: {
       EventSubType: "launched", 
       InstanceId: "i-1234567890abcdef0"
      }, 
      EventType: "instanceChange", 
      Timestamp: <Date Representation>
     }, 
       {
      EventInformation: {
       EventSubType: "launched", 
       InstanceId: "i-1234567890abcdef1"
      }, 
      EventType: "instanceChange", 
      Timestamp: <Date Representation>
     }
    ], 
    NextToken: "CpHNsscimcV5oH7bSbub03CI2Qms5+ypNpNm+53MNlR0YcXAkp0xFlfKf91yVxSExmbtma3awYxMFzNA663ZskT0AHtJ6TCb2Z8bQC2EnZgyELbymtWPfpZ1ZbauVg+P+TfGlWxWWB/Vr5dk5d4LfdgA/DRAHUrYgxzrEXAMPLE=", 
    SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
    StartTime: <Date Representation>
   }
   */
 });

Calling the describeSpotFleetRequestHistory operation

var params = {
  SpotFleetRequestId: 'STRING_VALUE', /* required */
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  DryRun: true || false,
  EventType: instanceChange | fleetRequestChange | error | information,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeSpotFleetRequestHistory(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.

    • EventType — (String)

      The type of events to describe. By default, all events are described.

      Possible values include:
      • "instanceChange"
      • "fleetRequestChange"
      • "error"
      • "information"
    • MaxResults — (Integer)

      The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

    • NextToken — (String)

      The token for the next set of results.

    • SpotFleetRequestId — (String)

      The ID of the Spot Fleet request.

    • StartTime — (Date)

      The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

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:

      • HistoryRecords — (Array<map>)

        Information about the events in the history of the Spot Fleet request.

        • EventInformation — (map)

          Information about the event.

          • EventDescription — (String)

            The description of the event.

          • EventSubType — (String)

            The event.

            error events:

            • iamFleetRoleInvalid - The EC2 Fleet or Spot Fleet does not have the required permissions either to launch or terminate an instance.

            • allLaunchSpecsTemporarilyBlacklisted - None of the configurations are valid, and several attempts to launch instances have failed. For more information, see the description of the event.

            • spotInstanceCountLimitExceeded - You've reached the limit on the number of Spot Instances that you can launch.

            • spotFleetRequestConfigurationInvalid - The configuration is not valid. For more information, see the description of the event.

            fleetRequestChange events:

            • active - The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to maintain the target number of running instances.

            • cancelled - The EC2 Fleet or Spot Fleet request is canceled and has no running instances. The EC2 Fleet or Spot Fleet will be deleted two days after its instances are terminated.

            • cancelled_running - The EC2 Fleet or Spot Fleet request is canceled and does not launch additional instances. Its existing instances continue to run until they are interrupted or terminated. The request remains in this state until all instances are interrupted or terminated.

            • cancelled_terminating - The EC2 Fleet or Spot Fleet request is canceled and its instances are terminating. The request remains in this state until all instances are terminated.

            • expired - The EC2 Fleet or Spot Fleet request has expired. If the request was created with TerminateInstancesWithExpiration set, a subsequent terminated event indicates that the instances are terminated.

            • modify_in_progress - The EC2 Fleet or Spot Fleet request is being modified. The request remains in this state until the modification is fully processed.

            • modify_succeeded - The EC2 Fleet or Spot Fleet request was modified.

            • submitted - The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to launch the target number of instances.

            • progress - The EC2 Fleet or Spot Fleet request is in the process of being fulfilled.

            instanceChange events:

            • launched - A new instance was launched.

            • terminated - An instance was terminated by the user.

            • termination_notified - An instance termination notification was sent when a Spot Instance was terminated by Amazon EC2 during scale-down, when the target capacity of the fleet was modified down, for example, from a target capacity of 4 to a target capacity of 3.

            Information events:

            • fleetProgressHalted - The price in every launch specification is not valid because it is below the Spot price (all the launch specifications have produced launchSpecUnusable events). A launch specification might become valid if the Spot price changes.

            • launchSpecTemporarilyBlacklisted - The configuration is not valid and several attempts to launch instances have failed. For more information, see the description of the event.

            • launchSpecUnusable - The price in a launch specification is not valid because it is below the Spot price.

            • registerWithLoadBalancersFailed - An attempt to register instances with load balancers failed. For more information, see the description of the event.

          • InstanceId — (String)

            The ID of the instance. This information is available only for instanceChange events.

        • EventType — (String)

          The event type.

          • error - An error with the Spot Fleet request.

          • fleetRequestChange - A change in the status or configuration of the Spot Fleet request.

          • instanceChange - An instance was launched or terminated.

          • Information - An informational event.

          Possible values include:
          • "instanceChange"
          • "fleetRequestChange"
          • "error"
          • "information"
        • Timestamp — (Date)

          The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

      • LastEvaluatedTime — (Date)

        The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). All records up to this time were retrieved.

        If nextToken indicates that there are more results, this value is not present.

      • NextToken — (String)

        The token required to retrieve the next set of results. This value is null when there are no more results to return.

      • SpotFleetRequestId — (String)

        The ID of the Spot Fleet request.

      • StartTime — (Date)

        The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSpotFleetRequests(params = {}, callback) ⇒ AWS.Request

Describes your Spot Fleet requests.

Spot Fleet requests are deleted 48 hours after they are canceled and their instances are terminated.

Service Reference:

Examples:

To describe a Spot fleet request


/* This example describes the specified Spot fleet request. */

 var params = {
  SpotFleetRequestIds: [
     "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
  ]
 };
 ec2.describeSpotFleetRequests(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SpotFleetRequestConfigs: [
       {
      SpotFleetRequestConfig: {
       IamFleetRole: "arn:aws:iam::123456789012:role/my-spot-fleet-role", 
       LaunchSpecifications: [
          {
         EbsOptimized: false, 
         ImageId: "ami-1a2b3c4d", 
         InstanceType: "cc2.8xlarge", 
         NetworkInterfaces: [
            {
           AssociatePublicIpAddress: true, 
           DeleteOnTermination: false, 
           DeviceIndex: 0, 
           SecondaryPrivateIpAddressCount: 0, 
           SubnetId: "subnet-a61dafcf"
          }
         ]
        }, 
          {
         EbsOptimized: false, 
         ImageId: "ami-1a2b3c4d", 
         InstanceType: "r3.8xlarge", 
         NetworkInterfaces: [
            {
           AssociatePublicIpAddress: true, 
           DeleteOnTermination: false, 
           DeviceIndex: 0, 
           SecondaryPrivateIpAddressCount: 0, 
           SubnetId: "subnet-a61dafcf"
          }
         ]
        }
       ], 
       SpotPrice: "0.05", 
       TargetCapacity: 20
      }, 
      SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
      SpotFleetRequestState: "active"
     }
    ]
   }
   */
 });

Calling the describeSpotFleetRequests operation

var params = {
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  SpotFleetRequestIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeSpotFleetRequests(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.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

    • NextToken — (String)

      The token for the next set of results.

    • SpotFleetRequestIds — (Array<String>)

      The IDs of the Spot Fleet requests.

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.

      • SpotFleetRequestConfigs — (Array<map>)

        Information about the configuration of your Spot Fleet.

        • ActivityStatus — (String)

          The progress of the Spot Fleet request. If there is an error, the status is error. After all requests are placed, the status is pending_fulfillment. If the size of the fleet is equal to or greater than its target capacity, the status is fulfilled. If the size of the fleet is decreased, the status is pending_termination while Spot Instances are terminating.

          Possible values include:
          • "error"
          • "pending_fulfillment"
          • "pending_termination"
          • "fulfilled"
        • CreateTime — (Date)

          The creation date and time of the request.

        • SpotFleetRequestConfig — (map)

          The configuration of the Spot Fleet request.

          • AllocationStrategy — (String)

            Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet request.

            If the allocation strategy is lowestPrice, Spot Fleet launches instances from the Spot Instance pools with the lowest price. This is the default allocation strategy.

            If the allocation strategy is diversified, Spot Fleet launches instances from all the Spot Instance pools that you specify.

            If the allocation strategy is capacityOptimized (recommended), Spot Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacityOptimizedPrioritized. Set a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides. You can assign the same priority to different LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacityOptimizedPrioritized is supported only if your Spot Fleet uses a launch template. Note that if the OnDemandAllocationStrategy is set to prioritized, the same priority is applied when fulfilling On-Demand capacity.

            Possible values include:
            • "lowestPrice"
            • "diversified"
            • "capacityOptimized"
            • "capacityOptimizedPrioritized"
          • OnDemandAllocationStrategy — (String)

            The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify lowestPrice, Spot Fleet uses price to determine the order, launching the lowest price first. If you specify prioritized, Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to lowestPrice.

            Possible values include:
            • "lowestPrice"
            • "prioritized"
          • SpotMaintenanceStrategies — (map)

            The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.

            • CapacityRebalance — (map)

              The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.

              • ReplacementStrategy — (String)

                The replacement strategy to use. Only available for fleets of type maintain.

                launch - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. Spot Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.

                launch-before-terminate - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in TerminationDelay), terminates the instances that received a rebalance notification.

                Possible values include:
                • "launch"
                • "launch-before-terminate"
              • TerminationDelay — (Integer)

                The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.

          • ClientToken — (String)

            A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see Ensuring Idempotency.

          • ExcessCapacityTerminationPolicy — (String)

            Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.

            Possible values include:
            • "noTermination"
            • "default"
          • FulfilledCapacity — (Float)

            The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.

          • OnDemandFulfilledCapacity — (Float)

            The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.

          • IamFleetRolerequired — (String)

            The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see Spot Fleet prerequisites in the Amazon EC2 User Guide for Linux Instances. Spot Fleet can terminate Spot Instances on your behalf when you cancel its Spot Fleet request using CancelSpotFleetRequests or when the Spot Fleet request expires, if you set TerminateInstancesWithExpiration.

          • LaunchSpecifications — (Array<map>)

            The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications, you can't specify LaunchTemplateConfigs. If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs.

            • SecurityGroups — (Array<map>)

              One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

              • GroupName — (String)

                The name of the security group.

              • GroupId — (String)

                The ID of the security group.

            • AddressingType — (String)

              Deprecated.

            • BlockDeviceMappings — (Array<map>)

              One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.

              • DeviceName — (String)

                The device name (for example, /dev/sdh or xvdh).

              • 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.

                NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

                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.

              • Ebs — (map)

                Parameters used to automatically set up EBS volumes when the instance is launched.

                • DeleteOnTermination — (Boolean)

                  Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

                • Iops — (Integer)

                  The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

                  The following are the supported values for each volume type:

                  • gp3: 3,000-16,000 IOPS

                  • io1: 100-64,000 IOPS

                  • io2: 100-64,000 IOPS

                  For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

                  This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

                • SnapshotId — (String)

                  The ID of the snapshot.

                • VolumeSize — (Integer)

                  The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

                  The following are the supported volumes sizes for each volume type:

                  • gp2 and gp3:1-16,384

                  • io1 and io2: 4-16,384

                  • st1 and sc1: 125-16,384

                  • standard: 1-1,024

                • VolumeType — (String)

                  The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

                  Possible values include:
                  • "standard"
                  • "io1"
                  • "io2"
                  • "gp2"
                  • "sc1"
                  • "st1"
                  • "gp3"
                • KmsKeyId — (String)

                  Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

                  This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

                • Throughput — (Integer)

                  The throughput that the volume supports, in MiB/s.

                  This parameter is valid only for gp3 volumes.

                  Valid Range: Minimum value of 125. Maximum value of 1000.

                • OutpostArn — (String)

                  The ARN of the Outpost on which the snapshot is stored.

                • Encrypted — (Boolean)

                  Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

                  In no case can you remove encryption from an encrypted volume.

                  Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

                  This parameter is not returned by .

              • NoDevice — (String)

                To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

            • EbsOptimized — (Boolean)

              Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

              Default: false

            • IamInstanceProfile — (map)

              The IAM instance profile.

              • Arn — (String)

                The Amazon Resource Name (ARN) of the instance profile.

              • Name — (String)

                The name of the instance profile.

            • ImageId — (String)

              The ID of the AMI.

            • InstanceType — (String)

              The instance type.

              Possible values include:
              • "t1.micro"
              • "t2.nano"
              • "t2.micro"
              • "t2.small"
              • "t2.medium"
              • "t2.large"
              • "t2.xlarge"
              • "t2.2xlarge"
              • "t3.nano"
              • "t3.micro"
              • "t3.small"
              • "t3.medium"
              • "t3.large"
              • "t3.xlarge"
              • "t3.2xlarge"
              • "t3a.nano"
              • "t3a.micro"
              • "t3a.small"
              • "t3a.medium"
              • "t3a.large"
              • "t3a.xlarge"
              • "t3a.2xlarge"
              • "t4g.nano"
              • "t4g.micro"
              • "t4g.small"
              • "t4g.medium"
              • "t4g.large"
              • "t4g.xlarge"
              • "t4g.2xlarge"
              • "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"
              • "m4.16xlarge"
              • "m2.xlarge"
              • "m2.2xlarge"
              • "m2.4xlarge"
              • "cr1.8xlarge"
              • "r3.large"
              • "r3.xlarge"
              • "r3.2xlarge"
              • "r3.4xlarge"
              • "r3.8xlarge"
              • "r4.large"
              • "r4.xlarge"
              • "r4.2xlarge"
              • "r4.4xlarge"
              • "r4.8xlarge"
              • "r4.16xlarge"
              • "r5.large"
              • "r5.xlarge"
              • "r5.2xlarge"
              • "r5.4xlarge"
              • "r5.8xlarge"
              • "r5.12xlarge"
              • "r5.16xlarge"
              • "r5.24xlarge"
              • "r5.metal"
              • "r5a.large"
              • "r5a.xlarge"
              • "r5a.2xlarge"
              • "r5a.4xlarge"
              • "r5a.8xlarge"
              • "r5a.12xlarge"
              • "r5a.16xlarge"
              • "r5a.24xlarge"
              • "r5b.large"
              • "r5b.xlarge"
              • "r5b.2xlarge"
              • "r5b.4xlarge"
              • "r5b.8xlarge"
              • "r5b.12xlarge"
              • "r5b.16xlarge"
              • "r5b.24xlarge"
              • "r5b.metal"
              • "r5d.large"
              • "r5d.xlarge"
              • "r5d.2xlarge"
              • "r5d.4xlarge"
              • "r5d.8xlarge"
              • "r5d.12xlarge"
              • "r5d.16xlarge"
              • "r5d.24xlarge"
              • "r5d.metal"
              • "r5ad.large"
              • "r5ad.xlarge"
              • "r5ad.2xlarge"
              • "r5ad.4xlarge"
              • "r5ad.8xlarge"
              • "r5ad.12xlarge"
              • "r5ad.16xlarge"
              • "r5ad.24xlarge"
              • "r6g.metal"
              • "r6g.medium"
              • "r6g.large"
              • "r6g.xlarge"
              • "r6g.2xlarge"
              • "r6g.4xlarge"
              • "r6g.8xlarge"
              • "r6g.12xlarge"
              • "r6g.16xlarge"
              • "r6gd.metal"
              • "r6gd.medium"
              • "r6gd.large"
              • "r6gd.xlarge"
              • "r6gd.2xlarge"
              • "r6gd.4xlarge"
              • "r6gd.8xlarge"
              • "r6gd.12xlarge"
              • "r6gd.16xlarge"
              • "x1.16xlarge"
              • "x1.32xlarge"
              • "x1e.xlarge"
              • "x1e.2xlarge"
              • "x1e.4xlarge"
              • "x1e.8xlarge"
              • "x1e.16xlarge"
              • "x1e.32xlarge"
              • "i2.xlarge"
              • "i2.2xlarge"
              • "i2.4xlarge"
              • "i2.8xlarge"
              • "i3.large"
              • "i3.xlarge"
              • "i3.2xlarge"
              • "i3.4xlarge"
              • "i3.8xlarge"
              • "i3.16xlarge"
              • "i3.metal"
              • "i3en.large"
              • "i3en.xlarge"
              • "i3en.2xlarge"
              • "i3en.3xlarge"
              • "i3en.6xlarge"
              • "i3en.12xlarge"
              • "i3en.24xlarge"
              • "i3en.metal"
              • "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"
              • "c5.large"
              • "c5.xlarge"
              • "c5.2xlarge"
              • "c5.4xlarge"
              • "c5.9xlarge"
              • "c5.12xlarge"
              • "c5.18xlarge"
              • "c5.24xlarge"
              • "c5.metal"
              • "c5a.large"
              • "c5a.xlarge"
              • "c5a.2xlarge"
              • "c5a.4xlarge"
              • "c5a.8xlarge"
              • "c5a.12xlarge"
              • "c5a.16xlarge"
              • "c5a.24xlarge"
              • "c5ad.large"
              • "c5ad.xlarge"
              • "c5ad.2xlarge"
              • "c5ad.4xlarge"
              • "c5ad.8xlarge"
              • "c5ad.12xlarge"
              • "c5ad.16xlarge"
              • "c5ad.24xlarge"
              • "c5d.large"
              • "c5d.xlarge"
              • "c5d.2xlarge"
              • "c5d.4xlarge"
              • "c5d.9xlarge"
              • "c5d.12xlarge"
              • "c5d.18xlarge"
              • "c5d.24xlarge"
              • "c5d.metal"
              • "c5n.large"
              • "c5n.xlarge"
              • "c5n.2xlarge"
              • "c5n.4xlarge"
              • "c5n.9xlarge"
              • "c5n.18xlarge"
              • "c5n.metal"
              • "c6g.metal"
              • "c6g.medium"
              • "c6g.large"
              • "c6g.xlarge"
              • "c6g.2xlarge"
              • "c6g.4xlarge"
              • "c6g.8xlarge"
              • "c6g.12xlarge"
              • "c6g.16xlarge"
              • "c6gd.metal"
              • "c6gd.medium"
              • "c6gd.large"
              • "c6gd.xlarge"
              • "c6gd.2xlarge"
              • "c6gd.4xlarge"
              • "c6gd.8xlarge"
              • "c6gd.12xlarge"
              • "c6gd.16xlarge"
              • "c6gn.medium"
              • "c6gn.large"
              • "c6gn.xlarge"
              • "c6gn.2xlarge"
              • "c6gn.4xlarge"
              • "c6gn.8xlarge"
              • "c6gn.12xlarge"
              • "c6gn.16xlarge"
              • "cc1.4xlarge"
              • "cc2.8xlarge"
              • "g2.2xlarge"
              • "g2.8xlarge"
              • "g3.4xlarge"
              • "g3.8xlarge"
              • "g3.16xlarge"
              • "g3s.xlarge"
              • "g4ad.xlarge"
              • "g4ad.2xlarge"
              • "g4ad.4xlarge"
              • "g4ad.8xlarge"
              • "g4ad.16xlarge"
              • "g4dn.xlarge"
              • "g4dn.2xlarge"
              • "g4dn.4xlarge"
              • "g4dn.8xlarge"
              • "g4dn.12xlarge"
              • "g4dn.16xlarge"
              • "g4dn.metal"
              • "cg1.4xlarge"
              • "p2.xlarge"
              • "p2.8xlarge"
              • "p2.16xlarge"
              • "p3.2xlarge"
              • "p3.8xlarge"
              • "p3.16xlarge"
              • "p3dn.24xlarge"
              • "p4d.24xlarge"
              • "d2.xlarge"
              • "d2.2xlarge"
              • "d2.4xlarge"
              • "d2.8xlarge"
              • "d3.xlarge"
              • "d3.2xlarge"
              • "d3.4xlarge"
              • "d3.8xlarge"
              • "d3en.xlarge"
              • "d3en.2xlarge"
              • "d3en.4xlarge"
              • "d3en.6xlarge"
              • "d3en.8xlarge"
              • "d3en.12xlarge"
              • "dl1.24xlarge"
              • "f1.2xlarge"
              • "f1.4xlarge"
              • "f1.16xlarge"
              • "m5.large"
              • "m5.xlarge"
              • "m5.2xlarge"
              • "m5.4xlarge"
              • "m5.8xlarge"
              • "m5.12xlarge"
              • "m5.16xlarge"
              • "m5.24xlarge"
              • "m5.metal"
              • "m5a.large"
              • "m5a.xlarge"
              • "m5a.2xlarge"
              • "m5a.4xlarge"
              • "m5a.8xlarge"
              • "m5a.12xlarge"
              • "m5a.16xlarge"
              • "m5a.24xlarge"
              • "m5d.large"
              • "m5d.xlarge"
              • "m5d.2xlarge"
              • "m5d.4xlarge"
              • "m5d.8xlarge"
              • "m5d.12xlarge"
              • "m5d.16xlarge"
              • "m5d.24xlarge"
              • "m5d.metal"
              • "m5ad.large"
              • "m5ad.xlarge"
              • "m5ad.2xlarge"
              • "m5ad.4xlarge"
              • "m5ad.8xlarge"
              • "m5ad.12xlarge"
              • "m5ad.16xlarge"
              • "m5ad.24xlarge"
              • "m5zn.large"
              • "m5zn.xlarge"
              • "m5zn.2xlarge"
              • "m5zn.3xlarge"
              • "m5zn.6xlarge"
              • "m5zn.12xlarge"
              • "m5zn.metal"
              • "h1.2xlarge"
              • "h1.4xlarge"
              • "h1.8xlarge"
              • "h1.16xlarge"
              • "z1d.large"
              • "z1d.xlarge"
              • "z1d.2xlarge"
              • "z1d.3xlarge"
              • "z1d.6xlarge"
              • "z1d.12xlarge"
              • "z1d.metal"
              • "u-6tb1.56xlarge"
              • "u-6tb1.112xlarge"
              • "u-9tb1.112xlarge"
              • "u-12tb1.112xlarge"
              • "u-6tb1.metal"
              • "u-9tb1.metal"
              • "u-12tb1.metal"
              • "u-18tb1.metal"
              • "u-24tb1.metal"
              • "a1.medium"
              • "a1.large"
              • "a1.xlarge"
              • "a1.2xlarge"
              • "a1.4xlarge"
              • "a1.metal"
              • "m5dn.large"
              • "m5dn.xlarge"
              • "m5dn.2xlarge"
              • "m5dn.4xlarge"
              • "m5dn.8xlarge"
              • "m5dn.12xlarge"
              • "m5dn.16xlarge"
              • "m5dn.24xlarge"
              • "m5dn.metal"
              • "m5n.large"
              • "m5n.xlarge"
              • "m5n.2xlarge"
              • "m5n.4xlarge"
              • "m5n.8xlarge"
              • "m5n.12xlarge"
              • "m5n.16xlarge"
              • "m5n.24xlarge"
              • "m5n.metal"
              • "r5dn.large"
              • "r5dn.xlarge"
              • "r5dn.2xlarge"
              • "r5dn.4xlarge"
              • "r5dn.8xlarge"
              • "r5dn.12xlarge"
              • "r5dn.16xlarge"
              • "r5dn.24xlarge"
              • "r5dn.metal"
              • "r5n.large"
              • "r5n.xlarge"
              • "r5n.2xlarge"
              • "r5n.4xlarge"
              • "r5n.8xlarge"
              • "r5n.12xlarge"
              • "r5n.16xlarge"
              • "r5n.24xlarge"
              • "r5n.metal"
              • "inf1.xlarge"
              • "inf1.2xlarge"
              • "inf1.6xlarge"
              • "inf1.24xlarge"
              • "m6g.metal"
              • "m6g.medium"
              • "m6g.large"
              • "m6g.xlarge"
              • "m6g.2xlarge"
              • "m6g.4xlarge"
              • "m6g.8xlarge"
              • "m6g.12xlarge"
              • "m6g.16xlarge"
              • "m6gd.metal"
              • "m6gd.medium"
              • "m6gd.large"
              • "m6gd.xlarge"
              • "m6gd.2xlarge"
              • "m6gd.4xlarge"
              • "m6gd.8xlarge"
              • "m6gd.12xlarge"
              • "m6gd.16xlarge"
              • "m6i.large"
              • "m6i.xlarge"
              • "m6i.2xlarge"
              • "m6i.4xlarge"
              • "m6i.8xlarge"
              • "m6i.12xlarge"
              • "m6i.16xlarge"
              • "m6i.24xlarge"
              • "m6i.32xlarge"
              • "mac1.metal"
              • "x2gd.medium"
              • "x2gd.large"
              • "x2gd.xlarge"
              • "x2gd.2xlarge"
              • "x2gd.4xlarge"
              • "x2gd.8xlarge"
              • "x2gd.12xlarge"
              • "x2gd.16xlarge"
              • "x2gd.metal"
              • "vt1.3xlarge"
              • "vt1.6xlarge"
              • "vt1.24xlarge"
            • KernelId — (String)

              The ID of the kernel.

            • KeyName — (String)

              The name of the key pair.

            • Monitoring — (map)

              Enable or disable monitoring for the instances.

              • Enabled — (Boolean)

                Enables monitoring for the instance.

                Default: false

            • NetworkInterfaces — (Array<map>)

              One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

              Note: SpotFleetLaunchSpecification currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use LaunchTemplateConfig.
              • AssociatePublicIpAddress — (Boolean)

                Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true.

              • DeleteOnTermination — (Boolean)

                If set to true, the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.

              • Description — (String)

                The description of the network interface. Applies only if creating a network interface when launching an instance.

              • DeviceIndex — (Integer)

                The position of the network interface in the attachment order. A primary network interface has a device index of 0.

                If you specify a network interface when launching an instance, you must specify the device index.

              • Groups — (Array<String>)

                The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

              • Ipv6AddressCount — (Integer)

                A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

              • Ipv6Addresses — (Array<map>)

                One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

                • Ipv6Address — (String)

                  The IPv6 address.

              • NetworkInterfaceId — (String)

                The ID of the network interface.

                If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

              • PrivateIpAddress — (String)

                The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • PrivateIpAddresses — (Array<map>)

                One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

                • Primary — (Boolean)

                  Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                • PrivateIpAddress — (String)

                  The private IPv4 addresses.

              • SecondaryPrivateIpAddressCount — (Integer)

                The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • SubnetId — (String)

                The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

              • AssociateCarrierIpAddress — (Boolean)

                Indicates whether to assign a carrier IP address to the network interface.

                You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP addresses in the Amazon Web Services Wavelength Developer Guide.

              • InterfaceType — (String)

                The type of network interface.

                To create an Elastic Fabric Adapter (EFA), specify efa. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide.

                Valid values: interface | efa

              • NetworkCardIndex — (Integer)

                The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

                If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances.

              • Ipv4Prefixes — (Array<map>)

                One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

              • Ipv4PrefixCount — (Integer)

                The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

              • Ipv6Prefixes — (Array<map>)

                One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

                • Ipv6Prefix — (String)

                  The IPv6 prefix.

              • Ipv6PrefixCount — (Integer)

                The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

            • Placement — (map)

              The placement information.

              • AvailabilityZone — (String)

                The Availability Zone.

                [Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

              • GroupName — (String)

                The name of the placement group.

              • 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 Spot Instances.

                Possible values include:
                • "default"
                • "dedicated"
                • "host"
            • RamdiskId — (String)

              The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.

            • SpotPrice — (String)

              The maximum price per unit hour that you are willing to pay for a Spot Instance. If this value is not specified, the default is the Spot price specified for the fleet. To determine the Spot price per unit hour, divide the Spot price by the value of WeightedCapacity.

            • SubnetId — (String)

              The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".

            • UserData — (String)

              The Base64-encoded user data that instances use when starting up.

            • WeightedCapacity — (Float)

              The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.

              If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.

            • TagSpecifications — (Array<map>)

              The tags to apply during creation.

              • ResourceType — (String)

                The type of resource. Currently, the only resource type that is supported is instance. To tag the Spot Fleet request on creation, use the TagSpecifications parameter in SpotFleetRequestConfigData .

                Possible values include:
                • "capacity-reservation"
                • "client-vpn-endpoint"
                • "customer-gateway"
                • "carrier-gateway"
                • "dedicated-host"
                • "dhcp-options"
                • "egress-only-internet-gateway"
                • "elastic-ip"
                • "elastic-gpu"
                • "export-image-task"
                • "export-instance-task"
                • "fleet"
                • "fpga-image"
                • "host-reservation"
                • "image"
                • "import-image-task"
                • "import-snapshot-task"
                • "instance"
                • "instance-event-window"
                • "internet-gateway"
                • "ipv4pool-ec2"
                • "ipv6pool-ec2"
                • "key-pair"
                • "launch-template"
                • "local-gateway"
                • "local-gateway-route-table"
                • "local-gateway-virtual-interface"
                • "local-gateway-virtual-interface-group"
                • "local-gateway-route-table-vpc-association"
                • "local-gateway-route-table-virtual-interface-group-association"
                • "natgateway"
                • "network-acl"
                • "network-interface"
                • "network-insights-analysis"
                • "network-insights-path"
                • "placement-group"
                • "prefix-list"
                • "replace-root-volume-task"
                • "reserved-instances"
                • "route-table"
                • "security-group"
                • "security-group-rule"
                • "snapshot"
                • "spot-fleet-request"
                • "spot-instances-request"
                • "subnet"
                • "traffic-mirror-filter"
                • "traffic-mirror-session"
                • "traffic-mirror-target"
                • "transit-gateway"
                • "transit-gateway-attachment"
                • "transit-gateway-connect-peer"
                • "transit-gateway-multicast-domain"
                • "transit-gateway-route-table"
                • "volume"
                • "vpc"
                • "vpc-endpoint"
                • "vpc-endpoint-service"
                • "vpc-peering-connection"
                • "vpn-connection"
                • "vpn-gateway"
                • "vpc-flow-log"
              • Tags — (Array<map>)

                The tags.

                • 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.

            • InstanceRequirements — (map)

              The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

              Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
              • VCpuCount — (map)

                The minimum and maximum number of vCPUs.

                • Min — (Integer)

                  The minimum number of vCPUs. If the value is 0, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

              • MemoryMiB — (map)

                The minimum and maximum amount of memory, in MiB.

                • Min — (Integer)

                  The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

              • CpuManufacturers — (Array<String>)

                The CPU manufacturers to include.

                • For instance types with Intel CPUs, specify intel.

                • For instance types with AMD CPUs, specify amd.

                • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

                Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                Default: Any manufacturer

              • MemoryGiBPerVCpu — (map)

                The minimum and maximum amount of memory per vCPU, in GiB.

                Default: No minimum or maximum limits

                • Min — (Float)

                  The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Float)

                  The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

              • ExcludedInstanceTypes — (Array<String>)

                The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

                For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                Default: No excluded instance types

              • InstanceGenerations — (Array<String>)

                Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

                For current generation instance types, specify current.

                For previous generation instance types, specify previous.

                Default: Current and previous generation instance types

              • SpotMaxPricePercentageOverLowestPrice — (Integer)

                The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999.

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                Default: 100

              • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

                The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999.

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                Default: 20

              • BareMetal — (String)

                Indicates whether bare metal instance types must be included, excluded, or required.

                • To include bare metal instance types, specify included.

                • To require only bare metal instance types, specify required.

                • To exclude bare metal instance types, specify excluded.

                Default: excluded

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • BurstablePerformance — (String)

                Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

                • To include burstable performance instance types, specify included.

                • To require only burstable performance instance types, specify required.

                • To exclude burstable performance instance types, specify excluded.

                Default: excluded

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • RequireHibernateSupport — (Boolean)

                Indicates whether instance types must support hibernation for On-Demand Instances.

                This parameter is not supported for GetSpotPlacementScores.

                Default: false

              • NetworkInterfaceCount — (map)

                The minimum and maximum number of network interfaces.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

              • LocalStorage — (String)

                Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

                • To include instance types with instance store volumes, specify included.

                • To require only instance types with instance store volumes, specify required.

                • To exclude instance types with instance store volumes, specify excluded.

                Default: included

                Possible values include:
                • "included"
                • "required"
                • "excluded"
              • LocalStorageTypes — (Array<String>)

                The type of local storage that is required.

                • For instance types with hard disk drive (HDD) storage, specify hdd.

                • For instance types with solid state drive (SDD) storage, specify sdd.

                Default: hdd and sdd

              • TotalLocalStorageGB — (map)

                The minimum and maximum amount of total local storage, in GB.

                Default: No minimum or maximum limits

                • Min — (Float)

                  The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                • Max — (Float)

                  The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

              • BaselineEbsBandwidthMbps — (map)

                The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

              • AcceleratorTypes — (Array<String>)

                The accelerator types that must be on the instance type.

                • For instance types with GPU accelerators, specify gpu.

                • For instance types with FPGA accelerators, specify fpga.

                • For instance types with inference accelerators, specify inference.

                Default: Any accelerator type

              • AcceleratorCount — (map)

                The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                To exclude accelerator-enabled instance types, set Max to 0.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

              • AcceleratorManufacturers — (Array<String>)

                Indicates whether instance types must have accelerators by specific manufacturers.

                • For instance types with NVIDIA devices, specify nvidia.

                • For instance types with AMD devices, specify amd.

                • For instance types with Amazon Web Services devices, specify amazon-web-services.

                • For instance types with Xilinx devices, specify xilinx.

                Default: Any manufacturer

              • AcceleratorNames — (Array<String>)

                The accelerators that must be on the instance type.

                • For instance types with NVIDIA A100 GPUs, specify a100.

                • For instance types with NVIDIA V100 GPUs, specify v100.

                • For instance types with NVIDIA K80 GPUs, specify k80.

                • For instance types with NVIDIA T4 GPUs, specify t4.

                • For instance types with NVIDIA M60 GPUs, specify m60.

                • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

                • For instance types with Xilinx VU9P FPGAs, specify vu9p.

                Default: Any accelerator

              • AcceleratorTotalMemoryMiB — (map)

                The minimum and maximum amount of total accelerator memory, in MiB.

                Default: No minimum or maximum limits

                • Min — (Integer)

                  The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max — (Integer)

                  The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • LaunchTemplateConfigs — (Array<map>)

            The launch template and overrides. If you specify LaunchTemplateConfigs, you can't specify LaunchSpecifications. If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs.

            • LaunchTemplateSpecification — (map)

              The launch template.

              • LaunchTemplateId — (String)

                The ID of the launch template. If you specify the template ID, you can't specify the template name.

              • LaunchTemplateName — (String)

                The name of the launch template. If you specify the template name, you can't specify the template ID.

              • Version — (String)

                The launch template version number, $Latest, or $Default. You must specify a value, otherwise the request fails.

                If the value is $Latest, Amazon EC2 uses the latest version of the launch template.

                If the value is $Default, Amazon EC2 uses the default version of the launch template.

            • Overrides — (Array<map>)

              Any parameters that you specify override the same parameters in the launch template.

              • InstanceType — (String)

                The instance type.

                Possible values include:
                • "t1.micro"
                • "t2.nano"
                • "t2.micro"
                • "t2.small"
                • "t2.medium"
                • "t2.large"
                • "t2.xlarge"
                • "t2.2xlarge"
                • "t3.nano"
                • "t3.micro"
                • "t3.small"
                • "t3.medium"
                • "t3.large"
                • "t3.xlarge"
                • "t3.2xlarge"
                • "t3a.nano"
                • "t3a.micro"
                • "t3a.small"
                • "t3a.medium"
                • "t3a.large"
                • "t3a.xlarge"
                • "t3a.2xlarge"
                • "t4g.nano"
                • "t4g.micro"
                • "t4g.small"
                • "t4g.medium"
                • "t4g.large"
                • "t4g.xlarge"
                • "t4g.2xlarge"
                • "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"
                • "m4.16xlarge"
                • "m2.xlarge"
                • "m2.2xlarge"
                • "m2.4xlarge"
                • "cr1.8xlarge"
                • "r3.large"
                • "r3.xlarge"
                • "r3.2xlarge"
                • "r3.4xlarge"
                • "r3.8xlarge"
                • "r4.large"
                • "r4.xlarge"
                • "r4.2xlarge"
                • "r4.4xlarge"
                • "r4.8xlarge"
                • "r4.16xlarge"
                • "r5.large"
                • "r5.xlarge"
                • "r5.2xlarge"
                • "r5.4xlarge"
                • "r5.8xlarge"
                • "r5.12xlarge"
                • "r5.16xlarge"
                • "r5.24xlarge"
                • "r5.metal"
                • "r5a.large"
                • "r5a.xlarge"
                • "r5a.2xlarge"
                • "r5a.4xlarge"
                • "r5a.8xlarge"
                • "r5a.12xlarge"
                • "r5a.16xlarge"
                • "r5a.24xlarge"
                • "r5b.large"
                • "r5b.xlarge"
                • "r5b.2xlarge"
                • "r5b.4xlarge"
                • "r5b.8xlarge"
                • "r5b.12xlarge"
                • "r5b.16xlarge"
                • "r5b.24xlarge"
                • "r5b.metal"
                • "r5d.large"
                • "r5d.xlarge"
                • "r5d.2xlarge"
                • "r5d.4xlarge"
                • "r5d.8xlarge"
                • "r5d.12xlarge"
                • "r5d.16xlarge"
                • "r5d.24xlarge"
                • "r5d.metal"
                • "r5ad.large"
                • "r5ad.xlarge"
                • "r5ad.2xlarge"
                • "r5ad.4xlarge"
                • "r5ad.8xlarge"
                • "r5ad.12xlarge"
                • "r5ad.16xlarge"
                • "r5ad.24xlarge"
                • "r6g.metal"
                • "r6g.medium"
                • "r6g.large"
                • "r6g.xlarge"
                • "r6g.2xlarge"
                • "r6g.4xlarge"
                • "r6g.8xlarge"
                • "r6g.12xlarge"
                • "r6g.16xlarge"
                • "r6gd.metal"
                • "r6gd.medium"
                • "r6gd.large"
                • "r6gd.xlarge"
                • "r6gd.2xlarge"
                • "r6gd.4xlarge"
                • "r6gd.8xlarge"
                • "r6gd.12xlarge"
                • "r6gd.16xlarge"
                • "x1.16xlarge"
                • "x1.32xlarge"
                • "x1e.xlarge"
                • "x1e.2xlarge"
                • "x1e.4xlarge"
                • "x1e.8xlarge"
                • "x1e.16xlarge"
                • "x1e.32xlarge"
                • "i2.xlarge"
                • "i2.2xlarge"
                • "i2.4xlarge"
                • "i2.8xlarge"
                • "i3.large"
                • "i3.xlarge"
                • "i3.2xlarge"
                • "i3.4xlarge"
                • "i3.8xlarge"
                • "i3.16xlarge"
                • "i3.metal"
                • "i3en.large"
                • "i3en.xlarge"
                • "i3en.2xlarge"
                • "i3en.3xlarge"
                • "i3en.6xlarge"
                • "i3en.12xlarge"
                • "i3en.24xlarge"
                • "i3en.metal"
                • "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"
                • "c5.large"
                • "c5.xlarge"
                • "c5.2xlarge"
                • "c5.4xlarge"
                • "c5.9xlarge"
                • "c5.12xlarge"
                • "c5.18xlarge"
                • "c5.24xlarge"
                • "c5.metal"
                • "c5a.large"
                • "c5a.xlarge"
                • "c5a.2xlarge"
                • "c5a.4xlarge"
                • "c5a.8xlarge"
                • "c5a.12xlarge"
                • "c5a.16xlarge"
                • "c5a.24xlarge"
                • "c5ad.large"
                • "c5ad.xlarge"
                • "c5ad.2xlarge"
                • "c5ad.4xlarge"
                • "c5ad.8xlarge"
                • "c5ad.12xlarge"
                • "c5ad.16xlarge"
                • "c5ad.24xlarge"
                • "c5d.large"
                • "c5d.xlarge"
                • "c5d.2xlarge"
                • "c5d.4xlarge"
                • "c5d.9xlarge"
                • "c5d.12xlarge"
                • "c5d.18xlarge"
                • "c5d.24xlarge"
                • "c5d.metal"
                • "c5n.large"
                • "c5n.xlarge"
                • "c5n.2xlarge"
                • "c5n.4xlarge"
                • "c5n.9xlarge"
                • "c5n.18xlarge"
                • "c5n.metal"
                • "c6g.metal"
                • "c6g.medium"
                • "c6g.large"
                • "c6g.xlarge"
                • "c6g.2xlarge"
                • "c6g.4xlarge"
                • "c6g.8xlarge"
                • "c6g.12xlarge"
                • "c6g.16xlarge"
                • "c6gd.metal"
                • "c6gd.medium"
                • "c6gd.large"
                • "c6gd.xlarge"
                • "c6gd.2xlarge"
                • "c6gd.4xlarge"
                • "c6gd.8xlarge"
                • "c6gd.12xlarge"
                • "c6gd.16xlarge"
                • "c6gn.medium"
                • "c6gn.large"
                • "c6gn.xlarge"
                • "c6gn.2xlarge"
                • "c6gn.4xlarge"
                • "c6gn.8xlarge"
                • "c6gn.12xlarge"
                • "c6gn.16xlarge"
                • "cc1.4xlarge"
                • "cc2.8xlarge"
                • "g2.2xlarge"
                • "g2.8xlarge"
                • "g3.4xlarge"
                • "g3.8xlarge"
                • "g3.16xlarge"
                • "g3s.xlarge"
                • "g4ad.xlarge"
                • "g4ad.2xlarge"
                • "g4ad.4xlarge"
                • "g4ad.8xlarge"
                • "g4ad.16xlarge"
                • "g4dn.xlarge"
                • "g4dn.2xlarge"
                • "g4dn.4xlarge"
                • "g4dn.8xlarge"
                • "g4dn.12xlarge"
                • "g4dn.16xlarge"
                • "g4dn.metal"
                • "cg1.4xlarge"
                • "p2.xlarge"
                • "p2.8xlarge"
                • "p2.16xlarge"
                • "p3.2xlarge"
                • "p3.8xlarge"
                • "p3.16xlarge"
                • "p3dn.24xlarge"
                • "p4d.24xlarge"
                • "d2.xlarge"
                • "d2.2xlarge"
                • "d2.4xlarge"
                • "d2.8xlarge"
                • "d3.xlarge"
                • "d3.2xlarge"
                • "d3.4xlarge"
                • "d3.8xlarge"
                • "d3en.xlarge"
                • "d3en.2xlarge"
                • "d3en.4xlarge"
                • "d3en.6xlarge"
                • "d3en.8xlarge"
                • "d3en.12xlarge"
                • "dl1.24xlarge"
                • "f1.2xlarge"
                • "f1.4xlarge"
                • "f1.16xlarge"
                • "m5.large"
                • "m5.xlarge"
                • "m5.2xlarge"
                • "m5.4xlarge"
                • "m5.8xlarge"
                • "m5.12xlarge"
                • "m5.16xlarge"
                • "m5.24xlarge"
                • "m5.metal"
                • "m5a.large"
                • "m5a.xlarge"
                • "m5a.2xlarge"
                • "m5a.4xlarge"
                • "m5a.8xlarge"
                • "m5a.12xlarge"
                • "m5a.16xlarge"
                • "m5a.24xlarge"
                • "m5d.large"
                • "m5d.xlarge"
                • "m5d.2xlarge"
                • "m5d.4xlarge"
                • "m5d.8xlarge"
                • "m5d.12xlarge"
                • "m5d.16xlarge"
                • "m5d.24xlarge"
                • "m5d.metal"
                • "m5ad.large"
                • "m5ad.xlarge"
                • "m5ad.2xlarge"
                • "m5ad.4xlarge"
                • "m5ad.8xlarge"
                • "m5ad.12xlarge"
                • "m5ad.16xlarge"
                • "m5ad.24xlarge"
                • "m5zn.large"
                • "m5zn.xlarge"
                • "m5zn.2xlarge"
                • "m5zn.3xlarge"
                • "m5zn.6xlarge"
                • "m5zn.12xlarge"
                • "m5zn.metal"
                • "h1.2xlarge"
                • "h1.4xlarge"
                • "h1.8xlarge"
                • "h1.16xlarge"
                • "z1d.large"
                • "z1d.xlarge"
                • "z1d.2xlarge"
                • "z1d.3xlarge"
                • "z1d.6xlarge"
                • "z1d.12xlarge"
                • "z1d.metal"
                • "u-6tb1.56xlarge"
                • "u-6tb1.112xlarge"
                • "u-9tb1.112xlarge"
                • "u-12tb1.112xlarge"
                • "u-6tb1.metal"
                • "u-9tb1.metal"
                • "u-12tb1.metal"
                • "u-18tb1.metal"
                • "u-24tb1.metal"
                • "a1.medium"
                • "a1.large"
                • "a1.xlarge"
                • "a1.2xlarge"
                • "a1.4xlarge"
                • "a1.metal"
                • "m5dn.large"
                • "m5dn.xlarge"
                • "m5dn.2xlarge"
                • "m5dn.4xlarge"
                • "m5dn.8xlarge"
                • "m5dn.12xlarge"
                • "m5dn.16xlarge"
                • "m5dn.24xlarge"
                • "m5dn.metal"
                • "m5n.large"
                • "m5n.xlarge"
                • "m5n.2xlarge"
                • "m5n.4xlarge"
                • "m5n.8xlarge"
                • "m5n.12xlarge"
                • "m5n.16xlarge"
                • "m5n.24xlarge"
                • "m5n.metal"
                • "r5dn.large"
                • "r5dn.xlarge"
                • "r5dn.2xlarge"
                • "r5dn.4xlarge"
                • "r5dn.8xlarge"
                • "r5dn.12xlarge"
                • "r5dn.16xlarge"
                • "r5dn.24xlarge"
                • "r5dn.metal"
                • "r5n.large"
                • "r5n.xlarge"
                • "r5n.2xlarge"
                • "r5n.4xlarge"
                • "r5n.8xlarge"
                • "r5n.12xlarge"
                • "r5n.16xlarge"
                • "r5n.24xlarge"
                • "r5n.metal"
                • "inf1.xlarge"
                • "inf1.2xlarge"
                • "inf1.6xlarge"
                • "inf1.24xlarge"
                • "m6g.metal"
                • "m6g.medium"
                • "m6g.large"
                • "m6g.xlarge"
                • "m6g.2xlarge"
                • "m6g.4xlarge"
                • "m6g.8xlarge"
                • "m6g.12xlarge"
                • "m6g.16xlarge"
                • "m6gd.metal"
                • "m6gd.medium"
                • "m6gd.large"
                • "m6gd.xlarge"
                • "m6gd.2xlarge"
                • "m6gd.4xlarge"
                • "m6gd.8xlarge"
                • "m6gd.12xlarge"
                • "m6gd.16xlarge"
                • "m6i.large"
                • "m6i.xlarge"
                • "m6i.2xlarge"
                • "m6i.4xlarge"
                • "m6i.8xlarge"
                • "m6i.12xlarge"
                • "m6i.16xlarge"
                • "m6i.24xlarge"
                • "m6i.32xlarge"
                • "mac1.metal"
                • "x2gd.medium"
                • "x2gd.large"
                • "x2gd.xlarge"
                • "x2gd.2xlarge"
                • "x2gd.4xlarge"
                • "x2gd.8xlarge"
                • "x2gd.12xlarge"
                • "x2gd.16xlarge"
                • "x2gd.metal"
                • "vt1.3xlarge"
                • "vt1.6xlarge"
                • "vt1.24xlarge"
              • SpotPrice — (String)

                The maximum price per unit hour that you are willing to pay for a Spot Instance.

              • SubnetId — (String)

                The ID of the subnet in which to launch the instances.

              • AvailabilityZone — (String)

                The Availability Zone in which to launch the instances.

              • WeightedCapacity — (Float)

                The number of units provided by the specified instance type.

              • Priority — (Float)

                The priority for the launch template override. The highest priority is launched first.

                If OnDemandAllocationStrategy is set to prioritized, Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

                If the Spot AllocationStrategy is set to capacityOptimizedPrioritized, Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

                Valid values are whole numbers starting at 0. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.

              • InstanceRequirements — (map)

                The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.

                Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
                • VCpuCount — (map)

                  The minimum and maximum number of vCPUs.

                  • Min — (Integer)

                    The minimum number of vCPUs. If the value is 0, there is no minimum limit.

                  • Max — (Integer)

                    The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                • MemoryMiB — (map)

                  The minimum and maximum amount of memory, in MiB.

                  • Min — (Integer)

                    The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                • CpuManufacturers — (Array<String>)

                  The CPU manufacturers to include.

                  • For instance types with Intel CPUs, specify intel.

                  • For instance types with AMD CPUs, specify amd.

                  • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

                  Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                  Default: Any manufacturer

                • MemoryGiBPerVCpu — (map)

                  The minimum and maximum amount of memory per vCPU, in GiB.

                  Default: No minimum or maximum limits

                  • Min — (Float)

                    The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Float)

                    The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                • ExcludedInstanceTypes — (Array<String>)

                  The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

                  For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                  Default: No excluded instance types

                • InstanceGenerations — (Array<String>)

                  Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

                  For current generation instance types, specify current.

                  For previous generation instance types, specify previous.

                  Default: Current and previous generation instance types

                • SpotMaxPricePercentageOverLowestPrice — (Integer)

                  The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                  The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                  To turn off price protection, specify a high value, such as 999999.

                  This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                  Default: 100

                • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

                  The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                  The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                  To turn off price protection, specify a high value, such as 999999.

                  This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

                  Default: 20

                • BareMetal — (String)

                  Indicates whether bare metal instance types must be included, excluded, or required.

                  • To include bare metal instance types, specify included.

                  • To require only bare metal instance types, specify required.

                  • To exclude bare metal instance types, specify excluded.

                  Default: excluded

                  Possible values include:
                  • "included"
                  • "required"
                  • "excluded"
                • BurstablePerformance — (String)

                  Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

                  • To include burstable performance instance types, specify included.

                  • To require only burstable performance instance types, specify required.

                  • To exclude burstable performance instance types, specify excluded.

                  Default: excluded

                  Possible values include:
                  • "included"
                  • "required"
                  • "excluded"
                • RequireHibernateSupport — (Boolean)

                  Indicates whether instance types must support hibernation for On-Demand Instances.

                  This parameter is not supported for GetSpotPlacementScores.

                  Default: false

                • NetworkInterfaceCount — (map)

                  The minimum and maximum number of network interfaces.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                • LocalStorage — (String)

                  Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

                  • To include instance types with instance store volumes, specify included.

                  • To require only instance types with instance store volumes, specify required.

                  • To exclude instance types with instance store volumes, specify excluded.

                  Default: included

                  Possible values include:
                  • "included"
                  • "required"
                  • "excluded"
                • LocalStorageTypes — (Array<String>)

                  The type of local storage that is required.

                  • For instance types with hard disk drive (HDD) storage, specify hdd.

                  • For instance types with solid state drive (SDD) storage, specify sdd.

                  Default: hdd and sdd

                • TotalLocalStorageGB — (map)

                  The minimum and maximum amount of total local storage, in GB.

                  Default: No minimum or maximum limits

                  • Min — (Float)

                    The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Float)

                    The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                • BaselineEbsBandwidthMbps — (map)

                  The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                • AcceleratorTypes — (Array<String>)

                  The accelerator types that must be on the instance type.

                  • For instance types with GPU accelerators, specify gpu.

                  • For instance types with FPGA accelerators, specify fpga.

                  • For instance types with inference accelerators, specify inference.

                  Default: Any accelerator type

                • AcceleratorCount — (map)

                  The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                  To exclude accelerator-enabled instance types, set Max to 0.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                • AcceleratorManufacturers — (Array<String>)

                  Indicates whether instance types must have accelerators by specific manufacturers.

                  • For instance types with NVIDIA devices, specify nvidia.

                  • For instance types with AMD devices, specify amd.

                  • For instance types with Amazon Web Services devices, specify amazon-web-services.

                  • For instance types with Xilinx devices, specify xilinx.

                  Default: Any manufacturer

                • AcceleratorNames — (Array<String>)

                  The accelerators that must be on the instance type.

                  • For instance types with NVIDIA A100 GPUs, specify a100.

                  • For instance types with NVIDIA V100 GPUs, specify v100.

                  • For instance types with NVIDIA K80 GPUs, specify k80.

                  • For instance types with NVIDIA T4 GPUs, specify t4.

                  • For instance types with NVIDIA M60 GPUs, specify m60.

                  • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

                  • For instance types with Xilinx VU9P FPGAs, specify vu9p.

                  Default: Any accelerator

                • AcceleratorTotalMemoryMiB — (map)

                  The minimum and maximum amount of total accelerator memory, in MiB.

                  Default: No minimum or maximum limits

                  • Min — (Integer)

                    The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                  • Max — (Integer)

                    The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • SpotPrice — (String)

            The maximum price per unit hour that you are willing to pay for a Spot Instance. The default is the On-Demand price.

          • TargetCapacityrequired — (Integer)

            The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.

          • OnDemandTargetCapacity — (Integer)

            The number of On-Demand units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.

          • OnDemandMaxTotalPrice — (String)

            The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the onDemandMaxTotalPrice parameter, the spotMaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.

          • SpotMaxTotalPrice — (String)

            The maximum amount per hour for Spot Instances that you're willing to pay. You can use the spotdMaxTotalPrice parameter, the onDemandMaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.

          • TerminateInstancesWithExpiration — (Boolean)

            Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.

          • Type — (String)

            The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is request, the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is maintain, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: maintain. instant is listed but is not used by Spot Fleet.

            Possible values include:
            • "request"
            • "maintain"
            • "instant"
          • ValidFrom — (Date)

            The start date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). By default, Amazon EC2 starts fulfilling the request immediately.

          • ValidUntil — (Date)

            The end date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.

          • ReplaceUnhealthyInstances — (Boolean)

            Indicates whether Spot Fleet should replace unhealthy instances.

          • InstanceInterruptionBehavior — (String)

            The behavior when a Spot Instance is interrupted. The default is terminate.

            Possible values include:
            • "hibernate"
            • "stop"
            • "terminate"
          • LoadBalancersConfig — (map)

            One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.

            With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.

            • ClassicLoadBalancersConfig — (map)

              The Classic Load Balancers.

              • ClassicLoadBalancers — (Array<map>)

                One or more Classic Load Balancers.

                • Name — (String)

                  The name of the load balancer.

            • TargetGroupsConfig — (map)

              The target groups.

              • TargetGroups — (Array<map>)

                One or more target groups.

                • Arn — (String)

                  The Amazon Resource Name (ARN) of the target group.

          • InstancePoolsToUseCount — (Integer)

            The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot AllocationStrategy is set to lowest-price. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

            Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.

          • Context — (String)

            Reserved.

          • TargetCapacityUnitType — (String)

            The unit for the target capacity.

            Default: units (translates to number of instances)

            Possible values include:
            • "vcpu"
            • "memory-mib"
            • "units"
          • TagSpecifications — (Array<map>)

            The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType must be spot-fleet-request, otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the launch template (valid only if you use LaunchTemplateConfigs) or in the SpotFleetTagSpecification (valid only if you use LaunchSpecifications). For information about tagging after launch, see Tagging Your Resources.

            • ResourceType — (String)

              The type of resource to tag on creation.

              Possible values include:
              • "capacity-reservation"
              • "client-vpn-endpoint"
              • "customer-gateway"
              • "carrier-gateway"
              • "dedicated-host"
              • "dhcp-options"
              • "egress-only-internet-gateway"
              • "elastic-ip"
              • "elastic-gpu"
              • "export-image-task"
              • "export-instance-task"
              • "fleet"
              • "fpga-image"
              • "host-reservation"
              • "image"
              • "import-image-task"
              • "import-snapshot-task"
              • "instance"
              • "instance-event-window"
              • "internet-gateway"
              • "ipv4pool-ec2"
              • "ipv6pool-ec2"
              • "key-pair"
              • "launch-template"
              • "local-gateway"
              • "local-gateway-route-table"
              • "local-gateway-virtual-interface"
              • "local-gateway-virtual-interface-group"
              • "local-gateway-route-table-vpc-association"
              • "local-gateway-route-table-virtual-interface-group-association"
              • "natgateway"
              • "network-acl"
              • "network-interface"
              • "network-insights-analysis"
              • "network-insights-path"
              • "placement-group"
              • "prefix-list"
              • "replace-root-volume-task"
              • "reserved-instances"
              • "route-table"
              • "security-group"
              • "security-group-rule"
              • "snapshot"
              • "spot-fleet-request"
              • "spot-instances-request"
              • "subnet"
              • "traffic-mirror-filter"
              • "traffic-mirror-session"
              • "traffic-mirror-target"
              • "transit-gateway"
              • "transit-gateway-attachment"
              • "transit-gateway-connect-peer"
              • "transit-gateway-multicast-domain"
              • "transit-gateway-route-table"
              • "volume"
              • "vpc"
              • "vpc-endpoint"
              • "vpc-endpoint-service"
              • "vpc-peering-connection"
              • "vpn-connection"
              • "vpn-gateway"
              • "vpc-flow-log"
            • Tags — (Array<map>)

              The tags to apply 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.

        • SpotFleetRequestId — (String)

          The ID of the Spot Fleet request.

        • SpotFleetRequestState — (String)

          The state of the Spot Fleet request.

          Possible values include:
          • "submitted"
          • "active"
          • "cancelled"
          • "failed"
          • "cancelled_running"
          • "cancelled_terminating"
          • "modifying"
        • Tags — (Array<map>)

          The tags for a Spot Fleet 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSpotInstanceRequests(params = {}, callback) ⇒ AWS.Request

Describes the specified Spot Instance requests.

You can use DescribeSpotInstanceRequests to find a running Spot Instance by examining the response. If the status of the Spot Instance is fulfilled, the instance ID appears in the response and contains the identifier of the instance. Alternatively, you can use DescribeInstances with a filter to look for instances where the instance lifecycle is spot.

We recommend that you set MaxResults to a value between 5 and 1000 to limit the number of results returned. This paginates the output, which makes the list more manageable and returns the results faster. 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 DescribeSpotInstanceRequests request to retrieve the remaining results.

Spot Instance requests are deleted four hours after they are canceled and their instances are terminated.

Service Reference:

Examples:

To describe a Spot Instance request


/* This example describes the specified Spot Instance request. */

 var params = {
  SpotInstanceRequestIds: [
     "sir-08b93456"
  ]
 };
 ec2.describeSpotInstanceRequests(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SpotInstanceRequests: [
       {
      CreateTime: <Date Representation>, 
      InstanceId: "i-1234567890abcdef0", 
      LaunchSpecification: {
       BlockDeviceMappings: [
          {
         DeviceName: "/dev/sda1", 
         Ebs: {
          DeleteOnTermination: true, 
          VolumeSize: 8, 
          VolumeType: "standard"
         }
        }
       ], 
       EbsOptimized: false, 
       ImageId: "ami-7aba833f", 
       InstanceType: "m1.small", 
       KeyName: "my-key-pair", 
       SecurityGroups: [
          {
         GroupId: "sg-e38f24a7", 
         GroupName: "my-security-group"
        }
       ]
      }, 
      LaunchedAvailabilityZone: "us-west-1b", 
      ProductDescription: "Linux/UNIX", 
      SpotInstanceRequestId: "sir-08b93456", 
      SpotPrice: "0.010000", 
      State: "active", 
      Status: {
       Code: "fulfilled", 
       Message: "Your Spot request is fulfilled.", 
       UpdateTime: <Date Representation>
      }, 
      Type: "one-time"
     }
    ]
   }
   */
 });

Calling the describeSpotInstanceRequests operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  SpotInstanceRequestIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeSpotInstanceRequests(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: {})
    • Filters — (Array<map>)

      One or more filters.

      • availability-zone-group - The Availability Zone group.

      • create-time - The time stamp when the Spot Instance request was created.

      • fault-code - The fault code related to the request.

      • fault-message - The fault message related to the request.

      • instance-id - The ID of the instance that fulfilled the request.

      • launch-group - The Spot Instance launch group.

      • launch.block-device-mapping.delete-on-termination - Indicates whether the EBS volume is deleted on instance termination.

      • launch.block-device-mapping.device-name - The device name for the volume in the block device mapping (for example, /dev/sdh or xvdh).

      • launch.block-device-mapping.snapshot-id - The ID of the snapshot for the EBS volume.

      • launch.block-device-mapping.volume-size - The size of the EBS volume, in GiB.

      • launch.block-device-mapping.volume-type - The type of EBS volume: gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1for Cold HDD, or standard for Magnetic.

      • launch.group-id - The ID of the security group for the instance.

      • launch.group-name - The name of the security group for the instance.

      • launch.image-id - The ID of the AMI.

      • launch.instance-type - The type of instance (for example, m3.medium).

      • launch.kernel-id - The kernel ID.

      • launch.key-name - The name of the key pair the instance launched with.

      • launch.monitoring-enabled - Whether detailed monitoring is enabled for the Spot Instance.

      • launch.ramdisk-id - The RAM disk ID.

      • launched-availability-zone - The Availability Zone in which the request is launched.

      • network-interface.addresses.primary - Indicates whether the IP address is the primary private IP address.

      • network-interface.delete-on-termination - Indicates whether the network interface is deleted when the instance is terminated.

      • network-interface.description - A description of the network interface.

      • network-interface.device-index - The index of the device for the network interface attachment on the instance.

      • network-interface.group-id - The ID of the security group associated with the network interface.

      • network-interface.network-interface-id - The ID of the network interface.

      • network-interface.private-ip-address - The primary private IP address of the network interface.

      • network-interface.subnet-id - The ID of the subnet for the instance.

      • product-description - The product description associated with the instance (Linux/UNIX | Windows).

      • spot-instance-request-id - The Spot Instance request ID.

      • spot-price - The maximum hourly price for any Spot Instance launched to fulfill the request.

      • state - The state of the Spot Instance request (open | active | closed | cancelled | failed). Spot request status information can help you track your Amazon EC2 Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances.

      • status-code - The short code describing the most recent evaluation of your Spot Instance request.

      • status-message - The message explaining the status of the Spot Instance request.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • type - The type of Spot Instance request (one-time | persistent).

      • valid-from - The start date of the request.

      • valid-until - The end date of the request.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • NextToken — (String)

      The token to request the next set of results. This value is null when there are no more results to return.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. Specify a value between 5 and 1000. To retrieve the remaining results, make another call with the returned NextToken value.

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:

      • SpotInstanceRequests — (Array<map>)

        One or more Spot Instance requests.

        • ActualBlockHourlyPrice — (String)

          Deprecated.

        • AvailabilityZoneGroup — (String)

          The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

        • BlockDurationMinutes — (Integer)

          Deprecated.

        • CreateTime — (Date)

          The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

        • 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.

        • InstanceId — (String)

          The instance ID, if an instance has been launched to fulfill the Spot Instance request.

        • LaunchGroup — (String)

          The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

        • LaunchSpecification — (map)

          Additional information for launching instances.

          • UserData — (String)

            The Base64-encoded user data for the instance.

          • SecurityGroups — (Array<map>)

            One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

            • GroupName — (String)

              The name of the security group.

            • GroupId — (String)

              The ID of the security group.

          • AddressingType — (String)

            Deprecated.

          • BlockDeviceMappings — (Array<map>)

            One or more block device mapping entries.

            • DeviceName — (String)

              The device name (for example, /dev/sdh or xvdh).

            • 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.

              NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

              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.

            • Ebs — (map)

              Parameters used to automatically set up EBS volumes when the instance is launched.

              • DeleteOnTermination — (Boolean)

                Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

              • Iops — (Integer)

                The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

                The following are the supported values for each volume type:

                • gp3: 3,000-16,000 IOPS

                • io1: 100-64,000 IOPS

                • io2: 100-64,000 IOPS

                For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

                This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

              • SnapshotId — (String)

                The ID of the snapshot.

              • VolumeSize — (Integer)

                The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

                The following are the supported volumes sizes for each volume type:

                • gp2 and gp3:1-16,384

                • io1 and io2: 4-16,384

                • st1 and sc1: 125-16,384

                • standard: 1-1,024

              • VolumeType — (String)

                The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

                Possible values include:
                • "standard"
                • "io1"
                • "io2"
                • "gp2"
                • "sc1"
                • "st1"
                • "gp3"
              • KmsKeyId — (String)

                Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

                This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

              • Throughput — (Integer)

                The throughput that the volume supports, in MiB/s.

                This parameter is valid only for gp3 volumes.

                Valid Range: Minimum value of 125. Maximum value of 1000.

              • OutpostArn — (String)

                The ARN of the Outpost on which the snapshot is stored.

              • Encrypted — (Boolean)

                Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

                In no case can you remove encryption from an encrypted volume.

                Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

                This parameter is not returned by .

            • NoDevice — (String)

              To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

          • 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 EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

            Default: false

          • IamInstanceProfile — (map)

            The IAM instance profile.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the instance profile.

            • Name — (String)

              The name of the instance profile.

          • ImageId — (String)

            The ID of the AMI.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • KernelId — (String)

            The ID of the kernel.

          • KeyName — (String)

            The name of the key pair.

          • NetworkInterfaces — (Array<map>)

            One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

            • AssociatePublicIpAddress — (Boolean)

              Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true.

            • DeleteOnTermination — (Boolean)

              If set to true, the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.

            • Description — (String)

              The description of the network interface. Applies only if creating a network interface when launching an instance.

            • DeviceIndex — (Integer)

              The position of the network interface in the attachment order. A primary network interface has a device index of 0.

              If you specify a network interface when launching an instance, you must specify the device index.

            • Groups — (Array<String>)

              The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

            • Ipv6AddressCount — (Integer)

              A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

            • Ipv6Addresses — (Array<map>)

              One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

              • Ipv6Address — (String)

                The IPv6 address.

            • NetworkInterfaceId — (String)

              The ID of the network interface.

              If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

            • PrivateIpAddress — (String)

              The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

            • PrivateIpAddresses — (Array<map>)

              One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • Primary — (Boolean)

                Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

              • PrivateIpAddress — (String)

                The private IPv4 addresses.

            • SecondaryPrivateIpAddressCount — (Integer)

              The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

            • SubnetId — (String)

              The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

            • AssociateCarrierIpAddress — (Boolean)

              Indicates whether to assign a carrier IP address to the network interface.

              You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP addresses in the Amazon Web Services Wavelength Developer Guide.

            • InterfaceType — (String)

              The type of network interface.

              To create an Elastic Fabric Adapter (EFA), specify efa. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide.

              Valid values: interface | efa

            • NetworkCardIndex — (Integer)

              The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

              If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances.

            • Ipv4Prefixes — (Array<map>)

              One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

            • Ipv4PrefixCount — (Integer)

              The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

            • Ipv6Prefixes — (Array<map>)

              One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

              • Ipv6Prefix — (String)

                The IPv6 prefix.

            • Ipv6PrefixCount — (Integer)

              The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

          • Placement — (map)

            The placement information for the instance.

            • AvailabilityZone — (String)

              The Availability Zone.

              [Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

            • GroupName — (String)

              The name of the placement group.

            • 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 Spot Instances.

              Possible values include:
              • "default"
              • "dedicated"
              • "host"
          • RamdiskId — (String)

            The ID of the RAM disk.

          • SubnetId — (String)

            The ID of the subnet in which to launch the instance.

          • Monitoring — (map)

            Describes the monitoring of an instance.

            • Enabledrequired — (Boolean)

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        • LaunchedAvailabilityZone — (String)

          The Availability Zone in which the request is launched.

        • ProductDescription — (String)

          The product description associated with the Spot Instance.

          Possible values include:
          • "Linux/UNIX"
          • "Linux/UNIX (Amazon VPC)"
          • "Windows"
          • "Windows (Amazon VPC)"
        • SpotInstanceRequestId — (String)

          The ID of the Spot Instance request.

        • SpotPrice — (String)

          The maximum price per hour that you are willing to pay for a Spot Instance.

        • State — (String)

          The state of the Spot Instance request. Spot status information helps track your Spot Instance requests. For more information, see Spot status in the Amazon EC2 User Guide for Linux Instances.

          Possible values include:
          • "open"
          • "active"
          • "closed"
          • "cancelled"
          • "failed"
        • Status — (map)

          The status code and status message describing the Spot Instance request.

          • Code — (String)

            The status code. For a list of status codes, see Spot status codes in the Amazon EC2 User Guide for Linux Instances.

          • Message — (String)

            The description for the status code.

          • UpdateTime — (Date)

            The date and time of the most recent status update, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

        • 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.

        • Type — (String)

          The Spot Instance request type.

          Possible values include:
          • "one-time"
          • "persistent"
        • ValidFrom — (Date)

          The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.

        • ValidUntil — (Date)

          The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

          • For a persistent request, the request remains active until the validUntil date and time is reached. Otherwise, the request remains active until you cancel it.

          • For a one-time request, the request remains active until all instances launch, the request is canceled, or the validUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.

        • InstanceInterruptionBehavior — (String)

          The behavior when a Spot Instance is interrupted.

          Possible values include:
          • "hibernate"
          • "stop"
          • "terminate"
      • NextToken — (String)

        The token to use to retrieve the next set 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:

describeSpotPriceHistory(params = {}, callback) ⇒ AWS.Request

Describes the Spot price history. For more information, see Spot Instance pricing history in the Amazon EC2 User Guide for Linux Instances.

When you specify a start and end time, the operation returns the prices of the instance types within that time range. It also returns the last price change before the start time, which is the effective price as of the start time.

Service Reference:

Examples:

To describe Spot price history for Linux/UNIX (Amazon VPC)


/* This example returns the Spot Price history for m1.xlarge, Linux/UNIX (Amazon VPC) instances for a particular day in January. */

 var params = {
  EndTime: <Date Representation>, 
  InstanceTypes: [
     "m1.xlarge"
  ], 
  ProductDescriptions: [
     "Linux/UNIX (Amazon VPC)"
  ], 
  StartTime: <Date Representation>
 };
 ec2.describeSpotPriceHistory(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SpotPriceHistory: [
       {
      AvailabilityZone: "us-west-1a", 
      InstanceType: "m1.xlarge", 
      ProductDescription: "Linux/UNIX (Amazon VPC)", 
      SpotPrice: "0.080000", 
      Timestamp: <Date Representation>
     }, 
       {
      AvailabilityZone: "us-west-1c", 
      InstanceType: "m1.xlarge", 
      ProductDescription: "Linux/UNIX (Amazon VPC)", 
      SpotPrice: "0.080000", 
      Timestamp: <Date Representation>
     }
    ]
   }
   */
 });

Calling the describeSpotPriceHistory operation

var params = {
  AvailabilityZone: 'STRING_VALUE',
  DryRun: true || false,
  EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  InstanceTypes: [
    t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  ProductDescriptions: [
    'STRING_VALUE',
    /* more items */
  ],
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
ec2.describeSpotPriceHistory(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: {})
    • Filters — (Array<map>)

      One or more filters.

      • availability-zone - The Availability Zone for which prices should be returned.

      • instance-type - The type of instance (for example, m3.medium).

      • product-description - The product description for the Spot price (Linux/UNIX | Red Hat Enterprise Linux | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC)).

      • spot-price - The Spot price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).

      • timestamp - The time stamp of the Spot price history, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). Greater than or less than comparison is not supported.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • AvailabilityZone — (String)

      Filters the results by the specified Availability Zone.

    • 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.

    • EndTime — (Date)

      The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

    • InstanceTypes — (Array<String>)

      Filters the results by the specified instance types.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

    • NextToken — (String)

      The token for the next set of results.

    • ProductDescriptions — (Array<String>)

      Filters the results by the specified basic product descriptions.

    • StartTime — (Date)

      The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

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 or an empty string when there are no more results to return.

      • SpotPriceHistory — (Array<map>)

        The historical Spot prices.

        • AvailabilityZone — (String)

          The Availability Zone.

        • InstanceType — (String)

          The instance type.

          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • ProductDescription — (String)

          A general description of the AMI.

          Possible values include:
          • "Linux/UNIX"
          • "Linux/UNIX (Amazon VPC)"
          • "Windows"
          • "Windows (Amazon VPC)"
        • SpotPrice — (String)

          The maximum price per hour that you are willing to pay for a Spot Instance.

        • Timestamp — (Date)

          The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeStaleSecurityGroups(params = {}, callback) ⇒ AWS.Request

[VPC only] Describes the stale security group rules for security groups in a specified VPC. Rules are stale when they reference a deleted security group in a peer VPC, or a security group in a peer VPC for which the VPC peering connection has been deleted.

Service Reference:

Examples:

Calling the describeStaleSecurityGroups operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeStaleSecurityGroups(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.

    • 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.

    • NextToken — (String)

      The token for the next set of items to return. (You received this token from a prior call.)

    • 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:

      • 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.

      • StaleSecurityGroupSet — (Array<map>)

        Information about the stale security groups.

        • Description — (String)

          The description of the security group.

        • GroupId — (String)

          The ID of the security group.

        • GroupName — (String)

          The name of the security group.

        • StaleIpPermissions — (Array<map>)

          Information about the stale inbound rules in the security group.

          • FromPort — (Integer)

            The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

          • IpProtocol — (String)

            The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).

          • IpRanges — (Array<String>)

            The IP ranges. Not applicable for stale security group rules.

          • PrefixListIds — (Array<String>)

            The prefix list IDs. Not applicable for stale security group rules.

          • ToPort — (Integer)

            The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

          • UserIdGroupPairs — (Array<map>)

            The security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.

            • Description — (String)

              A description for the security group rule that references this user ID group pair.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • GroupId — (String)

              The ID of the security group.

            • 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.

              For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

            • PeeringStatus — (String)

              The status of a VPC peering connection, if applicable.

            • UserId — (String)

              The ID of an Amazon Web Services account.

              For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

            • 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.

        • StaleIpPermissionsEgress — (Array<map>)

          Information about the stale outbound rules in the security group.

          • FromPort — (Integer)

            The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

          • IpProtocol — (String)

            The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).

          • IpRanges — (Array<String>)

            The IP ranges. Not applicable for stale security group rules.

          • PrefixListIds — (Array<String>)

            The prefix list IDs. Not applicable for stale security group rules.

          • ToPort — (Integer)

            The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

          • UserIdGroupPairs — (Array<map>)

            The security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.

            • Description — (String)

              A description for the security group rule that references this user ID group pair.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • GroupId — (String)

              The ID of the security group.

            • 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.

              For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

            • PeeringStatus — (String)

              The status of a VPC peering connection, if applicable.

            • UserId — (String)

              The ID of an Amazon Web Services account.

              For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

            • 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.

        • VpcId — (String)

          The ID of the VPC for the security group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeStoreImageTasks(params = {}, callback) ⇒ AWS.Request

Describes the progress of the AMI store tasks. You can describe the store tasks for specified AMIs. If you don't specify the AMIs, you get a paginated list of store tasks from the last 31 days.

For each AMI task, the response indicates if the task is InProgress, Completed, or Failed. For tasks InProgress, the response shows the estimated progress as a percentage.

Tasks are listed in reverse chronological order. Currently, only tasks from the past 31 days can be viewed.

To use this API, you must have the required permissions. For more information, see Permissions for storing and restoring AMIs using Amazon S3 in the Amazon Elastic Compute Cloud User Guide.

For more information, see Store and restore an AMI using Amazon S3 in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the describeStoreImageTasks operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  ImageIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeStoreImageTasks(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: {})
    • ImageIds — (Array<String>)

      The AMI IDs for which to show progress. Up to 20 AMI IDs can be included in a request.

    • 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>)

      The filters.

      • task-state - Returns tasks in a certain state (InProgress | Completed | Failed)

      • bucket - Returns task information for tasks that targeted a specific bucket. For the filter value, specify the bucket name.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • NextToken — (String)

      The token for 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 1 and 200. You cannot specify this parameter and the ImageIDs parameter 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:

      • StoreImageTaskResults — (Array<map>)

        The information about the AMI store tasks.

        • AmiId — (String)

          The ID of the AMI that is being stored.

        • TaskStartTime — (Date)

          The time the task started.

        • Bucket — (String)

          The name of the Amazon S3 bucket that contains the stored AMI object.

        • S3objectKey — (String)

          The name of the stored AMI object in the bucket.

        • ProgressPercentage — (Integer)

          The progress of the task as a percentage.

        • StoreTaskState — (String)

          The state of the store task (InProgress, Completed, or Failed).

        • StoreTaskFailureReason — (String)

          If the tasks fails, the reason for the failure is returned. If the task succeeds, null is returned.

      • 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.

describeSubnets(params = {}, callback) ⇒ AWS.Request

Describes one or more of your subnets.

For more information, see Your VPC and subnets in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

To describe the subnets for a VPC


/* This example describes the subnets for the specified VPC. */

 var params = {
  Filters: [
     {
    Name: "vpc-id", 
    Values: [
       "vpc-a01106c2"
    ]
   }
  ]
 };
 ec2.describeSubnets(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Subnets: [
       {
      AvailabilityZone: "us-east-1c", 
      AvailableIpAddressCount: 251, 
      CidrBlock: "10.0.1.0/24", 
      DefaultForAz: false, 
      MapPublicIpOnLaunch: false, 
      State: "available", 
      SubnetId: "subnet-9d4a7b6c", 
      VpcId: "vpc-a01106c2"
     }
    ]
   }
   */
 });

Calling the describeSubnets operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  SubnetIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeSubnets(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: {})
    • Filters — (Array<map>)

      One or more filters.

      • availability-zone - The Availability Zone for the subnet. You can also use availabilityZone as the filter name.

      • availability-zone-id - The ID of the Availability Zone for the subnet. You can also use availabilityZoneId as the filter name.

      • available-ip-address-count - The number of IPv4 addresses in the subnet that are available.

      • cidr-block - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use cidr or cidrBlock as the filter names.

      • default-for-az - Indicates whether this is the default subnet for the Availability Zone. You can also use defaultForAz as the filter name.

      • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the subnet.

      • ipv6-cidr-block-association.association-id - An association ID for an IPv6 CIDR block associated with the subnet.

      • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the subnet.

      • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

      • owner-id - The ID of the Amazon Web Services account that owns the subnet.

      • state - The state of the subnet (pending | available).

      • subnet-arn - The Amazon Resource Name (ARN) of the subnet.

      • subnet-id - The ID of the subnet.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • vpc-id - The ID of the VPC for the subnet.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • SubnetIds — (Array<String>)

      One or more subnet IDs.

      Default: Describes all your subnets.

    • 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.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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:

      • Subnets — (Array<map>)

        Information about one or more subnets.

        • AvailabilityZone — (String)

          The Availability Zone of the subnet.

        • AvailabilityZoneId — (String)

          The AZ ID of the subnet.

        • AvailableIpAddressCount — (Integer)

          The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.

        • CidrBlock — (String)

          The IPv4 CIDR block assigned to 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 IPv4 address.

        • MapCustomerOwnedIpOnLaunch — (Boolean)

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives a customer-owned IPv4 address.

        • CustomerOwnedIpv4Pool — (String)

          The customer-owned IPv4 address pool associated with the subnet.

        • State — (String)

          The current state of the subnet.

          Possible values include:
          • "pending"
          • "available"
        • SubnetId — (String)

          The ID of the subnet.

        • VpcId — (String)

          The ID of the VPC the subnet is in.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the subnet.

        • AssignIpv6AddressOnCreation — (Boolean)

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives an IPv6 address.

        • Ipv6CidrBlockAssociationSet — (Array<map>)

          Information about the IPv6 CIDR blocks associated with the subnet.

          • AssociationId — (String)

            The association ID for the CIDR block.

          • Ipv6CidrBlock — (String)

            The IPv6 CIDR block.

          • Ipv6CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of a CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

        • 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.

        • SubnetArn — (String)

          The Amazon Resource Name (ARN) of the subnet.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

      • 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:

describeTags(params = {}, callback) ⇒ AWS.Request

Describes the specified tags for your EC2 resources.

For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To describe the tags for a single resource


/* This example describes the tags for the specified instance. */

 var params = {
  Filters: [
     {
    Name: "resource-id", 
    Values: [
       "i-1234567890abcdef8"
    ]
   }
  ]
 };
 ec2.describeTags(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Tags: [
       {
      Key: "Stack", 
      ResourceId: "i-1234567890abcdef8", 
      ResourceType: "instance", 
      Value: "test"
     }, 
       {
      Key: "Name", 
      ResourceId: "i-1234567890abcdef8", 
      ResourceType: "instance", 
      Value: "Beta Server"
     }
    ]
   }
   */
 });

Calling the describeTags operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeTags(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>)

      The filters.

      • key - The tag key.

      • resource-id - The ID of the resource.

      • resource-type - The resource type (customer-gateway | dedicated-host | dhcp-options | elastic-ip | fleet | fpga-image | host-reservation | image | instance | internet-gateway | key-pair | launch-template | natgateway | network-acl | network-interface | placement-group | reserved-instances | route-table | security-group | snapshot | spot-instances-request | subnet | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway).

      • tag:<key> - The key/value combination of the tag. For example, specify "tag:Owner" for the filter name and "TeamA" for the filter value to find resources with the tag "Owner=TeamA".

      • value - The tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. This value can be between 5 and 1000. To retrieve the remaining results, make another call with the returned NextToken value.

    • 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:

      • 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.

      • Tags — (Array<map>)

        The tags.

        • Key — (String)

          The tag key.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The resource type.

          Possible values include:
          • "capacity-reservation"
          • "client-vpn-endpoint"
          • "customer-gateway"
          • "carrier-gateway"
          • "dedicated-host"
          • "dhcp-options"
          • "egress-only-internet-gateway"
          • "elastic-ip"
          • "elastic-gpu"
          • "export-image-task"
          • "export-instance-task"
          • "fleet"
          • "fpga-image"
          • "host-reservation"
          • "image"
          • "import-image-task"
          • "import-snapshot-task"
          • "instance"
          • "instance-event-window"
          • "internet-gateway"
          • "ipv4pool-ec2"
          • "ipv6pool-ec2"
          • "key-pair"
          • "launch-template"
          • "local-gateway"
          • "local-gateway-route-table"
          • "local-gateway-virtual-interface"
          • "local-gateway-virtual-interface-group"
          • "local-gateway-route-table-vpc-association"
          • "local-gateway-route-table-virtual-interface-group-association"
          • "natgateway"
          • "network-acl"
          • "network-interface"
          • "network-insights-analysis"
          • "network-insights-path"
          • "placement-group"
          • "prefix-list"
          • "replace-root-volume-task"
          • "reserved-instances"
          • "route-table"
          • "security-group"
          • "security-group-rule"
          • "snapshot"
          • "spot-fleet-request"
          • "spot-instances-request"
          • "subnet"
          • "traffic-mirror-filter"
          • "traffic-mirror-session"
          • "traffic-mirror-target"
          • "transit-gateway"
          • "transit-gateway-attachment"
          • "transit-gateway-connect-peer"
          • "transit-gateway-multicast-domain"
          • "transit-gateway-route-table"
          • "volume"
          • "vpc"
          • "vpc-endpoint"
          • "vpc-endpoint-service"
          • "vpc-peering-connection"
          • "vpn-connection"
          • "vpn-gateway"
          • "vpc-flow-log"
        • Value — (String)

          The tag value.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeTrafficMirrorFilters(params = {}, callback) ⇒ AWS.Request

Describes one or more Traffic Mirror filters.

Service Reference:

Examples:

Calling the describeTrafficMirrorFilters operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TrafficMirrorFilterIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeTrafficMirrorFilters(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: {})
    • TrafficMirrorFilterIds — (Array<String>)

      The ID of the Traffic Mirror filter.

    • 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. The possible values are:

      • description: The Traffic Mirror filter description.

      • traffic-mirror-filter-id: The ID of the Traffic Mirror filter.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for 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:

      • TrafficMirrorFilters — (Array<map>)

        Information about one or more Traffic Mirror filters.

        • TrafficMirrorFilterId — (String)

          The ID of the Traffic Mirror filter.

        • IngressFilterRules — (Array<map>)

          Information about the ingress rules that are associated with the Traffic Mirror filter.

          • TrafficMirrorFilterRuleId — (String)

            The ID of the Traffic Mirror rule.

          • TrafficMirrorFilterId — (String)

            The ID of the Traffic Mirror filter that the rule is associated with.

          • TrafficDirection — (String)

            The traffic direction assigned to the Traffic Mirror rule.

            Possible values include:
            • "ingress"
            • "egress"
          • RuleNumber — (Integer)

            The rule number of the Traffic Mirror rule.

          • RuleAction — (String)

            The action assigned to the Traffic Mirror rule.

            Possible values include:
            • "accept"
            • "reject"
          • Protocol — (Integer)

            The protocol assigned to the Traffic Mirror rule.

          • DestinationPortRange — (map)

            The destination port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • SourcePortRange — (map)

            The source port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • DestinationCidrBlock — (String)

            The destination CIDR block assigned to the Traffic Mirror rule.

          • SourceCidrBlock — (String)

            The source CIDR block assigned to the Traffic Mirror rule.

          • Description — (String)

            The description of the Traffic Mirror rule.

        • EgressFilterRules — (Array<map>)

          Information about the egress rules that are associated with the Traffic Mirror filter.

          • TrafficMirrorFilterRuleId — (String)

            The ID of the Traffic Mirror rule.

          • TrafficMirrorFilterId — (String)

            The ID of the Traffic Mirror filter that the rule is associated with.

          • TrafficDirection — (String)

            The traffic direction assigned to the Traffic Mirror rule.

            Possible values include:
            • "ingress"
            • "egress"
          • RuleNumber — (Integer)

            The rule number of the Traffic Mirror rule.

          • RuleAction — (String)

            The action assigned to the Traffic Mirror rule.

            Possible values include:
            • "accept"
            • "reject"
          • Protocol — (Integer)

            The protocol assigned to the Traffic Mirror rule.

          • DestinationPortRange — (map)

            The destination port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • SourcePortRange — (map)

            The source port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • DestinationCidrBlock — (String)

            The destination CIDR block assigned to the Traffic Mirror rule.

          • SourceCidrBlock — (String)

            The source CIDR block assigned to the Traffic Mirror rule.

          • Description — (String)

            The description of the Traffic Mirror rule.

        • NetworkServices — (Array<String>)

          The network service traffic that is associated with the Traffic Mirror filter.

        • Description — (String)

          The description of the Traffic Mirror filter.

        • Tags — (Array<map>)

          The tags assigned to the Traffic Mirror filter.

          • 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. The 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.

describeTrafficMirrorSessions(params = {}, callback) ⇒ AWS.Request

Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror sessions are described. Alternatively, you can filter the results.

Service Reference:

Examples:

Calling the describeTrafficMirrorSessions operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TrafficMirrorSessionIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeTrafficMirrorSessions(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: {})
    • TrafficMirrorSessionIds — (Array<String>)

      The ID of the Traffic Mirror session.

    • 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. The possible values are:

      • description: The Traffic Mirror session description.

      • network-interface-id: The ID of the Traffic Mirror session network interface.

      • owner-id: The ID of the account that owns the Traffic Mirror session.

      • packet-length: The assigned number of packets to mirror.

      • session-number: The assigned session number.

      • traffic-mirror-filter-id: The ID of the Traffic Mirror filter.

      • traffic-mirror-session-id: The ID of the Traffic Mirror session.

      • traffic-mirror-target-id: The ID of the Traffic Mirror target.

      • virtual-network-id: The virtual network ID of the Traffic Mirror session.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for 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:

      • TrafficMirrorSessions — (Array<map>)

        Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror sessions are described. Alternatively, you can filter the results.

        • TrafficMirrorSessionId — (String)

          The ID for the Traffic Mirror session.

        • TrafficMirrorTargetId — (String)

          The ID of the Traffic Mirror target.

        • TrafficMirrorFilterId — (String)

          The ID of the Traffic Mirror filter.

        • NetworkInterfaceId — (String)

          The ID of the Traffic Mirror session's network interface.

        • OwnerId — (String)

          The ID of the account that owns the Traffic Mirror session.

        • PacketLength — (Integer)

          The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet

        • SessionNumber — (Integer)

          The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

          Valid values are 1-32766.

        • VirtualNetworkId — (Integer)

          The virtual network ID associated with the Traffic Mirror session.

        • Description — (String)

          The description of the Traffic Mirror session.

        • Tags — (Array<map>)

          The tags assigned to the Traffic Mirror session.

          • 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. The 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.

describeTrafficMirrorTargets(params = {}, callback) ⇒ AWS.Request

Information about one or more Traffic Mirror targets.

Service Reference:

Examples:

Calling the describeTrafficMirrorTargets operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TrafficMirrorTargetIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeTrafficMirrorTargets(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: {})
    • TrafficMirrorTargetIds — (Array<String>)

      The ID of the Traffic Mirror targets.

    • 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. The possible values are:

      • description: The Traffic Mirror target description.

      • network-interface-id: The ID of the Traffic Mirror session network interface.

      • network-load-balancer-arn: The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the session.

      • owner-id: The ID of the account that owns the Traffic Mirror session.

      • traffic-mirror-target-id: The ID of the Traffic Mirror target.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for 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:

      • TrafficMirrorTargets — (Array<map>)

        Information about one or more Traffic Mirror targets.

        • TrafficMirrorTargetId — (String)

          The ID of the Traffic Mirror target.

        • NetworkInterfaceId — (String)

          The network interface ID that is attached to the target.

        • NetworkLoadBalancerArn — (String)

          The Amazon Resource Name (ARN) of the Network Load Balancer.

        • Type — (String)

          The type of Traffic Mirror target.

          Possible values include:
          • "network-interface"
          • "network-load-balancer"
        • Description — (String)

          Information about the Traffic Mirror target.

        • OwnerId — (String)

          The ID of the account that owns the Traffic Mirror target.

        • Tags — (Array<map>)

          The tags assigned to the Traffic Mirror target.

          • 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. The 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.

describeTransitGatewayAttachments(params = {}, callback) ⇒ AWS.Request

Describes one or more attachments between resources and transit gateways. By default, all attachments are described. Alternatively, you can filter the results by attachment ID, attachment state, resource ID, or resource owner.

Examples:

Calling the describeTransitGatewayAttachments operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TransitGatewayAttachmentIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeTransitGatewayAttachments(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: {})
    • TransitGatewayAttachmentIds — (Array<String>)

      The IDs of the attachments.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • association.state - The state of the association (associating | associated | disassociating).

      • association.transit-gateway-route-table-id - The ID of the route table for the transit gateway.

      • resource-id - The ID of the resource.

      • resource-owner-id - The ID of the Amazon Web Services account that owns the resource.

      • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect.

      • state - The state of the attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting.

      • transit-gateway-attachment-id - The ID of the attachment.

      • transit-gateway-id - The ID of the transit gateway.

      • transit-gateway-owner-id - The ID of the Amazon Web Services account that owns the transit gateway.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • TransitGatewayAttachments — (Array<map>)

        Information about the attachments.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • TransitGatewayOwnerId — (String)

          The ID of the Amazon Web Services account that owns the transit gateway.

        • ResourceOwnerId — (String)

          The ID of the Amazon Web Services account that owns the resource.

        • ResourceType — (String)

          The resource type. Note that the tgw-peering resource type has been deprecated.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • ResourceId — (String)

          The ID of the resource.

        • State — (String)

          The attachment state. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • Association — (map)

          The association.

          • TransitGatewayRouteTableId — (String)

            The ID of the route table for the transit gateway.

          • State — (String)

            The state of the association.

            Possible values include:
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
        • CreationTime — (Date)

          The creation time.

        • Tags — (Array<map>)

          The tags for the attachment.

          • 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.

describeTransitGatewayConnectPeers(params = {}, callback) ⇒ AWS.Request

Describes one or more Connect peers.

Examples:

Calling the describeTransitGatewayConnectPeers operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TransitGatewayConnectPeerIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeTransitGatewayConnectPeers(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: {})
    • TransitGatewayConnectPeerIds — (Array<String>)

      The IDs of the Connect peers.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • state - The state of the Connect peer (pending | available | deleting | deleted).

      • transit-gateway-attachment-id - The ID of the attachment.

      • transit-gateway-connect-peer-id - The ID of the Connect peer.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • TransitGatewayConnectPeers — (Array<map>)

        Information about the Connect peers.

        • TransitGatewayAttachmentId — (String)

          The ID of the Connect attachment.

        • TransitGatewayConnectPeerId — (String)

          The ID of the Connect peer.

        • State — (String)

          The state of the Connect peer.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • CreationTime — (Date)

          The creation time.

        • ConnectPeerConfiguration — (map)

          The Connect peer details.

          • TransitGatewayAddress — (String)

            The Connect peer IP address on the transit gateway side of the tunnel.

          • PeerAddress — (String)

            The Connect peer IP address on the appliance side of the tunnel.

          • InsideCidrBlocks — (Array<String>)

            The range of interior BGP peer IP addresses.

          • Protocol — (String)

            The tunnel protocol.

            Possible values include:
            • "gre"
          • BgpConfigurations — (Array<map>)

            The BGP configuration details.

            • TransitGatewayAsn — (Integer)

              The transit gateway Autonomous System Number (ASN).

            • PeerAsn — (Integer)

              The peer Autonomous System Number (ASN).

            • TransitGatewayAddress — (String)

              The interior BGP peer IP address for the transit gateway.

            • PeerAddress — (String)

              The interior BGP peer IP address for the appliance.

            • BgpStatus — (String)

              The BGP status.

              Possible values include:
              • "up"
              • "down"
        • Tags — (Array<map>)

          The tags for the Connect peer.

          • 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.

describeTransitGatewayConnects(params = {}, callback) ⇒ AWS.Request

Describes one or more Connect attachments.

Service Reference:

Examples:

Calling the describeTransitGatewayConnects operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TransitGatewayAttachmentIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeTransitGatewayConnects(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: {})
    • TransitGatewayAttachmentIds — (Array<String>)

      The IDs of the attachments.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • options.protocol - The tunnel protocol (gre).

      • state - The state of the attachment (initiating | initiatingRequest | pendingAcceptance | rollingBack | pending | available | modifying | deleting | deleted | failed | rejected | rejecting | failing).

      • transit-gateway-attachment-id - The ID of the Connect attachment.

      • transit-gateway-id - The ID of the transit gateway.

      • transport-transit-gateway-attachment-id - The ID of the transit gateway attachment from which the Connect attachment was created.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • TransitGatewayConnects — (Array<map>)

        Information about the Connect attachments.

        • TransitGatewayAttachmentId — (String)

          The ID of the Connect attachment.

        • TransportTransitGatewayAttachmentId — (String)

          The ID of the attachment from which the Connect attachment was created.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • State — (String)

          The state of the attachment.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The Connect attachment options.

          • Protocol — (String)

            The tunnel protocol.

            Possible values include:
            • "gre"
        • Tags — (Array<map>)

          The tags for the attachment.

          • 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.

describeTransitGatewayMulticastDomains(params = {}, callback) ⇒ AWS.Request

Describes one or more transit gateway multicast domains.

Examples:

Calling the describeTransitGatewayMulticastDomains operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TransitGatewayMulticastDomainIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeTransitGatewayMulticastDomains(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: {})
    • TransitGatewayMulticastDomainIds — (Array<String>)

      The ID of the transit gateway multicast domain.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • state - The state of the transit gateway multicast domain. Valid values are pending | available | deleting | deleted.

      • transit-gateway-id - The ID of the transit gateway.

      • transit-gateway-multicast-domain-id - The ID of the transit gateway multicast domain.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • TransitGatewayMulticastDomains — (Array<map>)

        Information about the transit gateway multicast domains.

        • TransitGatewayMulticastDomainId — (String)

          The ID of the transit gateway multicast domain.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • TransitGatewayMulticastDomainArn — (String)

          The Amazon Resource Name (ARN) of the transit gateway multicast domain.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the transit gateway multicast domain.

        • Options — (map)

          The options for the transit gateway multicast domain.

          • Igmpv2Support — (String)

            Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned on for the transit gateway multicast domain.

            Possible values include:
            • "enable"
            • "disable"
          • StaticSourcesSupport — (String)

            Indicates whether support for statically configuring transit gateway multicast group sources is turned on.

            Possible values include:
            • "enable"
            • "disable"
          • AutoAcceptSharedAssociations — (String)

            Indicates whether to automatically cross-account subnet associations that are associated with the transit gateway multicast domain.

            Possible values include:
            • "enable"
            • "disable"
        • State — (String)

          The state of the transit gateway multicast domain.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • CreationTime — (Date)

          The time the transit gateway multicast domain was created.

        • Tags — (Array<map>)

          The tags for the transit gateway multicast domain.

          • 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.

describeTransitGatewayPeeringAttachments(params = {}, callback) ⇒ AWS.Request

Describes your transit gateway peering attachments.

Examples:

Calling the describeTransitGatewayPeeringAttachments operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TransitGatewayAttachmentIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeTransitGatewayPeeringAttachments(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: {})
    • TransitGatewayAttachmentIds — (Array<String>)

      One or more IDs of the transit gateway peering attachments.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • transit-gateway-attachment-id - The ID of the transit gateway attachment.

      • local-owner-id - The ID of your Amazon Web Services account.

      • remote-owner-id - The ID of the Amazon Web Services account in the remote Region that owns the transit gateway.

      • state - The state of the peering attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.

      • transit-gateway-id - The ID of the transit gateway.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • TransitGatewayPeeringAttachments — (Array<map>)

        The transit gateway peering attachments.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway peering attachment.

        • RequesterTgwInfo — (map)

          Information about the requester transit gateway.

          • TransitGatewayId — (String)

            The ID of the transit gateway.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region — (String)

            The Region of the transit gateway.

        • AccepterTgwInfo — (map)

          Information about the accepter transit gateway.

          • TransitGatewayId — (String)

            The ID of the transit gateway.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region — (String)

            The Region of the transit gateway.

        • Status — (map)

          The status of the transit gateway peering attachment.

          • Code — (String)

            The status code.

          • Message — (String)

            The status message, if applicable.

        • State — (String)

          The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • CreationTime — (Date)

          The time the transit gateway peering attachment was created.

        • Tags — (Array<map>)

          The tags for the transit gateway peering attachment.

          • 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.

describeTransitGatewayRouteTables(params = {}, callback) ⇒ AWS.Request

Describes one or more transit gateway route tables. By default, all transit gateway route tables are described. Alternatively, you can filter the results.

Examples:

Calling the describeTransitGatewayRouteTables operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TransitGatewayRouteTableIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeTransitGatewayRouteTables(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: {})
    • TransitGatewayRouteTableIds — (Array<String>)

      The IDs of the transit gateway route tables.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • default-association-route-table - Indicates whether this is the default association route table for the transit gateway (true | false).

      • default-propagation-route-table - Indicates whether this is the default propagation route table for the transit gateway (true | false).

      • state - The state of the route table (available | deleting | deleted | pending).

      • transit-gateway-id - The ID of the transit gateway.

      • transit-gateway-route-table-id - The ID of the transit gateway route table.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • TransitGatewayRouteTables — (Array<map>)

        Information about the transit gateway route tables.

        • TransitGatewayRouteTableId — (String)

          The ID of the transit gateway route table.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • State — (String)

          The state of the transit gateway route table.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • DefaultAssociationRouteTable — (Boolean)

          Indicates whether this is the default association route table for the transit gateway.

        • DefaultPropagationRouteTable — (Boolean)

          Indicates whether this is the default propagation route table for the transit gateway.

        • CreationTime — (Date)

          The creation time.

        • 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.

      • 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.

describeTransitGateways(params = {}, callback) ⇒ AWS.Request

Describes one or more transit gateways. By default, all transit gateways are described. Alternatively, you can filter the results.

Service Reference:

Examples:

Calling the describeTransitGateways operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TransitGatewayIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeTransitGateways(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: {})
    • TransitGatewayIds — (Array<String>)

      The IDs of the transit gateways.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • options.propagation-default-route-table-id - The ID of the default propagation route table.

      • options.amazon-side-asn - The private ASN for the Amazon side of a BGP session.

      • options.association-default-route-table-id - The ID of the default association route table.

      • options.auto-accept-shared-attachments - Indicates whether there is automatic acceptance of attachment requests (enable | disable).

      • options.default-route-table-association - Indicates whether resource attachments are automatically associated with the default association route table (enable | disable).

      • options.default-route-table-propagation - Indicates whether resource attachments automatically propagate routes to the default propagation route table (enable | disable).

      • options.dns-support - Indicates whether DNS support is enabled (enable | disable).

      • options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol support is enabled (enable | disable).

      • owner-id - The ID of the Amazon Web Services account that owns the transit gateway.

      • state - The state of the transit gateway (available | deleted | deleting | modifying | pending).

      • transit-gateway-id - The ID of the transit gateway.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • TransitGateways — (Array<map>)

        Information about the transit gateways.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • TransitGatewayArn — (String)

          The Amazon Resource Name (ARN) of the transit gateway.

        • State — (String)

          The state of the transit gateway.

          Possible values include:
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Description — (String)

          The description of the transit gateway.

        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The transit gateway options.

          • AmazonSideAsn — (Integer)

            A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.

          • TransitGatewayCidrBlocks — (Array<String>)

            The transit gateway CIDR blocks.

          • AutoAcceptSharedAttachments — (String)

            Indicates whether attachment requests are automatically accepted.

            Possible values include:
            • "enable"
            • "disable"
          • DefaultRouteTableAssociation — (String)

            Indicates whether resource attachments are automatically associated with the default association route table.

            Possible values include:
            • "enable"
            • "disable"
          • AssociationDefaultRouteTableId — (String)

            The ID of the default association route table.

          • DefaultRouteTablePropagation — (String)

            Indicates whether resource attachments automatically propagate routes to the default propagation route table.

            Possible values include:
            • "enable"
            • "disable"
          • PropagationDefaultRouteTableId — (String)

            The ID of the default propagation route table.

          • VpnEcmpSupport — (String)

            Indicates whether Equal Cost Multipath Protocol support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • DnsSupport — (String)

            Indicates whether DNS support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • MulticastSupport — (String)

            Indicates whether multicast is enabled on the transit gateway

            Possible values include:
            • "enable"
            • "disable"
        • Tags — (Array<map>)

          The tags for the transit 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.

      • 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.

describeTransitGatewayVpcAttachments(params = {}, callback) ⇒ AWS.Request

Describes one or more VPC attachments. By default, all VPC attachments are described. Alternatively, you can filter the results.

Examples:

Calling the describeTransitGatewayVpcAttachments operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TransitGatewayAttachmentIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeTransitGatewayVpcAttachments(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: {})
    • TransitGatewayAttachmentIds — (Array<String>)

      The IDs of the attachments.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • state - The state of the attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting.

      • transit-gateway-attachment-id - The ID of the attachment.

      • transit-gateway-id - The ID of the transit gateway.

      • vpc-id - The ID of the VPC.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • TransitGatewayVpcAttachments — (Array<map>)

        Information about the VPC attachments.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • VpcId — (String)

          The ID of the VPC.

        • VpcOwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC.

        • State — (String)

          The state of the VPC attachment. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • SubnetIds — (Array<String>)

          The IDs of the subnets.

        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The VPC attachment options.

          • DnsSupport — (String)

            Indicates whether DNS support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • Ipv6Support — (String)

            Indicates whether IPv6 support is disabled.

            Possible values include:
            • "enable"
            • "disable"
          • ApplianceModeSupport — (String)

            Indicates whether appliance mode support is enabled.

            Possible values include:
            • "enable"
            • "disable"
        • Tags — (Array<map>)

          The tags for the VPC attachment.

          • 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.

describeTrunkInterfaceAssociations(params = {}, callback) ⇒ AWS.Request

Note: This API action is currently in limited preview only. If you are interested in using this feature, contact your account manager.

Describes one or more network interface trunk associations.

Examples:

Calling the describeTrunkInterfaceAssociations operation

var params = {
  AssociationIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeTrunkInterfaceAssociations(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: {})
    • AssociationIds — (Array<String>)

      The IDs of the associations.

    • 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.

      • gre-key - The ID of a trunk interface association.

      • interface-protocol - The interface protocol. Valid values are VLAN and GRE.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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:

      • InterfaceAssociations — (Array<map>)

        Information about the trunk associations.

        • AssociationId — (String)

          The ID of the association.

        • BranchInterfaceId — (String)

          The ID of the branch network interface.

        • TrunkInterfaceId — (String)

          The ID of the trunk network interface.

        • InterfaceProtocol — (String)

          The interface protocol. Valid values are VLAN and GRE.

          Possible values include:
          • "VLAN"
          • "GRE"
        • VlanId — (Integer)

          The ID of the VLAN when you use the VLAN protocol.

        • GreKey — (Integer)

          The application key when you use the GRE protocol.

        • Tags — (Array<map>)

          The tags for the trunk interface association.

          • 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.

describeVolumeAttribute(params = {}, callback) ⇒ AWS.Request

Describes the specified attribute of the specified volume. You can specify only one attribute at a time.

For more information about EBS volumes, see Amazon EBS volumes in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To describe a volume attribute


/* This example describes the ``autoEnableIo`` attribute of the volume with the ID ``vol-049df61146c4d7901``. */

 var params = {
  Attribute: "autoEnableIO", 
  VolumeId: "vol-049df61146c4d7901"
 };
 ec2.describeVolumeAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AutoEnableIO: {
     Value: false
    }, 
    VolumeId: "vol-049df61146c4d7901"
   }
   */
 });

Calling the describeVolumeAttribute operation

var params = {
  Attribute: autoEnableIO | productCodes, /* required */
  VolumeId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.describeVolumeAttribute(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: {})
    • Attribute — (String)

      The attribute of the volume. This parameter is required.

      Possible values include:
      • "autoEnableIO"
      • "productCodes"
    • VolumeId — (String)

      The ID of the volume.

    • 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:

      • AutoEnableIO — (map)

        The state of autoEnableIO attribute.

        • Value — (Boolean)

          The attribute value. The valid values are true or false.

      • 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"
      • VolumeId — (String)

        The ID of the volume.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeVolumes(params = {}, callback) ⇒ AWS.Request

Describes the specified EBS volumes or all of your EBS volumes.

If you are describing a long list of volumes, we recommend that you 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 DescribeVolumes request to retrieve the remaining results.

For more information about EBS volumes, see Amazon EBS volumes in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To describe all volumes


/* This example describes all of your volumes in the default region. */

 var params = {
 };
 ec2.describeVolumes(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NextToken: "", 
    Volumes: [
       {
      Attachments: [
         {
        AttachTime: <Date Representation>, 
        DeleteOnTermination: true, 
        Device: "/dev/sda1", 
        InstanceId: "i-1234567890abcdef0", 
        State: "attached", 
        VolumeId: "vol-049df61146c4d7901"
       }
      ], 
      AvailabilityZone: "us-east-1a", 
      CreateTime: <Date Representation>, 
      Size: 8, 
      SnapshotId: "snap-1234567890abcdef0", 
      State: "in-use", 
      VolumeId: "vol-049df61146c4d7901", 
      VolumeType: "standard"
     }
    ]
   }
   */
 });

To describe volumes that are attached to a specific instance


/* This example describes all volumes that are both attached to the instance with the ID i-1234567890abcdef0 and set to delete when the instance terminates. */

 var params = {
  Filters: [
     {
    Name: "attachment.instance-id", 
    Values: [
       "i-1234567890abcdef0"
    ]
   }, 
     {
    Name: "attachment.delete-on-termination", 
    Values: [
       "true"
    ]
   }
  ]
 };
 ec2.describeVolumes(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Volumes: [
       {
      Attachments: [
         {
        AttachTime: <Date Representation>, 
        DeleteOnTermination: true, 
        Device: "/dev/sda1", 
        InstanceId: "i-1234567890abcdef0", 
        State: "attached", 
        VolumeId: "vol-049df61146c4d7901"
       }
      ], 
      AvailabilityZone: "us-east-1a", 
      CreateTime: <Date Representation>, 
      Size: 8, 
      SnapshotId: "snap-1234567890abcdef0", 
      State: "in-use", 
      VolumeId: "vol-049df61146c4d7901", 
      VolumeType: "standard"
     }
    ]
   }
   */
 });

Calling the describeVolumes operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  VolumeIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVolumes(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: {})
    • Filters — (Array<map>)

      The filters.

      • attachment.attach-time - The time stamp when the attachment initiated.

      • attachment.delete-on-termination - Whether the volume is deleted on instance termination.

      • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1).

      • attachment.instance-id - The ID of the instance the volume is attached to.

      • attachment.status - The attachment state (attaching | attached | detaching).

      • availability-zone - The Availability Zone in which the volume was created.

      • create-time - The time stamp when the volume was created.

      • encrypted - Indicates whether the volume is encrypted (true | false)

      • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false)

      • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false).

      • size - The size of the volume, in GiB.

      • snapshot-id - The snapshot from which the volume was created.

      • status - The state of the volume (creating | available | in-use | deleting | deleted | error).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • volume-id - The volume ID.

      • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1| standard)

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • VolumeIds — (Array<String>)

      The volume IDs.

    • 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.

    • MaxResults — (Integer)

      The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

    • NextToken — (String)

      The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

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:

      • Volumes — (Array<map>)

        Information about the volumes.

        • Attachments — (Array<map>)

          Information about the volume attachments.

          • AttachTime — (Date)

            The time stamp when the attachment initiated.

          • Device — (String)

            The device name.

          • InstanceId — (String)

            The ID of the instance.

          • State — (String)

            The attachment state of the volume.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
            • "busy"
          • VolumeId — (String)

            The ID of the volume.

          • DeleteOnTermination — (Boolean)

            Indicates whether the EBS volume is deleted on instance termination.

        • AvailabilityZone — (String)

          The Availability Zone for the volume.

        • CreateTime — (Date)

          The time stamp when volume creation was initiated.

        • Encrypted — (Boolean)

          Indicates whether the volume is encrypted.

        • KmsKeyId — (String)

          The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • Size — (Integer)

          The size of the volume, in GiBs.

        • SnapshotId — (String)

          The snapshot from which the volume was created, if applicable.

        • State — (String)

          The volume state.

          Possible values include:
          • "creating"
          • "available"
          • "in-use"
          • "deleting"
          • "deleted"
          • "error"
        • VolumeId — (String)

          The ID of the volume.

        • Iops — (Integer)

          The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

        • 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.

          Possible values include:
          • "standard"
          • "io1"
          • "io2"
          • "gp2"
          • "sc1"
          • "st1"
          • "gp3"
        • FastRestored — (Boolean)

          Indicates whether the volume was created using fast snapshot restore.

        • MultiAttachEnabled — (Boolean)

          Indicates whether Amazon EBS Multi-Attach is enabled.

        • Throughput — (Integer)

          The throughput that the volume supports, in MiB/s.

      • NextToken — (String)

        The NextToken value to include in a future DescribeVolumes request. When the results of a DescribeVolumes request exceed MaxResults, this value can be used 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:

describeVolumesModifications(params = {}, callback) ⇒ AWS.Request

Describes the most recent volume modification request for the specified EBS volumes.

If a volume has never been modified, some information in the output will be null. If a volume has been modified more than once, the output includes only the most recent modification request.

You can also use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the Amazon CloudWatch Events User Guide. For more information, see Monitor the progress of volume modifications in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the describeVolumesModifications operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  VolumeIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVolumesModifications(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.

    • VolumeIds — (Array<String>)

      The IDs of the volumes.

    • Filters — (Array<map>)

      The filters.

      • modification-state - The current modification state (modifying | optimizing | completed | failed).

      • original-iops - The original IOPS rate of the volume.

      • original-size - The original size of the volume, in GiB.

      • original-volume-type - The original volume type of the volume (standard | io1 | io2 | gp2 | sc1 | st1).

      • originalMultiAttachEnabled - Indicates whether Multi-Attach support was enabled (true | false).

      • start-time - The modification start time.

      • target-iops - The target IOPS rate of the volume.

      • target-size - The target size of the volume, in GiB.

      • target-volume-type - The target volume type of the volume (standard | io1 | io2 | gp2 | sc1 | st1).

      • targetMultiAttachEnabled - Indicates whether Multi-Attach support is to be enabled (true | false).

      • volume-id - The ID of the volume.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • NextToken — (String)

      The nextToken value returned by a previous paginated request.

    • MaxResults — (Integer)

      The maximum number of results (up to a limit of 500) to be returned in a paginated 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:

      • VolumesModifications — (Array<map>)

        Information about the volume modifications.

        • VolumeId — (String)

          The ID of the volume.

        • ModificationState — (String)

          The current modification state. The modification state is null for unmodified volumes.

          Possible values include:
          • "modifying"
          • "optimizing"
          • "completed"
          • "failed"
        • StatusMessage — (String)

          A status message about the modification progress or failure.

        • TargetSize — (Integer)

          The target size of the volume, in GiB.

        • TargetIops — (Integer)

          The target IOPS rate of the volume.

        • TargetVolumeType — (String)

          The target EBS volume type of the volume.

          Possible values include:
          • "standard"
          • "io1"
          • "io2"
          • "gp2"
          • "sc1"
          • "st1"
          • "gp3"
        • TargetThroughput — (Integer)

          The target throughput of the volume, in MiB/s.

        • TargetMultiAttachEnabled — (Boolean)

          The target setting for Amazon EBS Multi-Attach.

        • OriginalSize — (Integer)

          The original size of the volume, in GiB.

        • OriginalIops — (Integer)

          The original IOPS rate of the volume.

        • OriginalVolumeType — (String)

          The original EBS volume type of the volume.

          Possible values include:
          • "standard"
          • "io1"
          • "io2"
          • "gp2"
          • "sc1"
          • "st1"
          • "gp3"
        • OriginalThroughput — (Integer)

          The original throughput of the volume, in MiB/s.

        • OriginalMultiAttachEnabled — (Boolean)

          The original setting for Amazon EBS Multi-Attach.

        • Progress — (Integer)

          The modification progress, from 0 to 100 percent complete.

        • StartTime — (Date)

          The modification start time.

        • EndTime — (Date)

          The modification completion or failure time.

      • NextToken — (String)

        Token for pagination, null if there are no more results

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeVolumeStatus(params = {}, callback) ⇒ AWS.Request

Describes the status of the specified volumes. Volume status provides the result of the checks performed on your volumes to determine events that can impair the performance of your volumes. The performance of a volume can be affected if an issue occurs on the volume's underlying host. If the volume's underlying host experiences a power outage or system issue, after the system is restored, there could be data inconsistencies on the volume. Volume events notify you if this occurs. Volume actions notify you if any action needs to be taken in response to the event.

The DescribeVolumeStatus operation provides the following information about the specified volumes:

Status: Reflects the current status of the volume. The possible values are ok, impaired , warning, or insufficient-data. If all checks pass, the overall status of the volume is ok. If the check fails, the overall status is impaired. If the status is insufficient-data, then the checks might still be taking place on your volume at the time. We recommend that you retry the request. For more information about volume status, see Monitor the status of your volumes in the Amazon Elastic Compute Cloud User Guide.

Events: Reflect the cause of a volume status and might require you to take action. For example, if your volume returns an impaired status, then the volume event might be potential-data-inconsistency. This means that your volume has been affected by an issue with the underlying host, has all I/O operations disabled, and might have inconsistent data.

Actions: Reflect the actions you might have to take in response to an event. For example, if the status of the volume is impaired and the volume event shows potential-data-inconsistency, then the action shows enable-volume-io. This means that you may want to enable the I/O operations for the volume by calling the EnableVolumeIO action and then check the volume for data consistency.

Volume status is based on the volume status checks, and does not reflect the volume state. Therefore, volume status does not indicate volumes in the error state (for example, when a volume is incapable of accepting I/O.)

Service Reference:

Examples:

To describe the status of a single volume


/* This example describes the status for the volume ``vol-1234567890abcdef0``. */

 var params = {
  VolumeIds: [
     "vol-1234567890abcdef0"
  ]
 };
 ec2.describeVolumeStatus(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    VolumeStatuses: [
       {
      Actions: [
      ], 
      AvailabilityZone: "us-east-1a", 
      Events: [
      ], 
      VolumeId: "vol-1234567890abcdef0", 
      VolumeStatus: {
       Details: [
          {
         Name: "io-enabled", 
         Status: "passed"
        }, 
          {
         Name: "io-performance", 
         Status: "not-applicable"
        }
       ], 
       Status: "ok"
      }
     }
    ]
   }
   */
 });

To describe the status of impaired volumes


/* This example describes the status for all volumes that are impaired. In this example output, there are no impaired volumes. */

 var params = {
  Filters: [
     {
    Name: "volume-status.status", 
    Values: [
       "impaired"
    ]
   }
  ]
 };
 ec2.describeVolumeStatus(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    VolumeStatuses: [
    ]
   }
   */
 });

Calling the describeVolumeStatus operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  VolumeIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVolumeStatus(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: {})
    • Filters — (Array<map>)

      The filters.

      • action.code - The action code for the event (for example, enable-volume-io).

      • action.description - A description of the action.

      • action.event-id - The event ID associated with the action.

      • availability-zone - The Availability Zone of the instance.

      • event.description - A description of the event.

      • event.event-id - The event ID.

      • event.event-type - The event type (for io-enabled: passed | failed; for io-performance: io-performance:degraded | io-performance:severely-degraded | io-performance:stalled).

      • event.not-after - The latest end time for the event.

      • event.not-before - The earliest start time for the event.

      • volume-status.details-name - The cause for volume-status.status (io-enabled | io-performance).

      • volume-status.details-status - The status of volume-status.details-name (for io-enabled: passed | failed; for io-performance: normal | degraded | severely-degraded | stalled).

      • volume-status.status - The status of the volume (ok | impaired | warning | insufficient-data).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of volume results returned by DescribeVolumeStatus in paginated output. When this parameter is used, the request only returns MaxResults results in a single page along with a NextToken response element. 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 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeVolumeStatus returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

    • NextToken — (String)

      The NextToken value to include in a future DescribeVolumeStatus request. When the results of the request exceed MaxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

    • VolumeIds — (Array<String>)

      The IDs of the volumes.

      Default: Describes all your volumes.

    • 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:

      • 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.

      • VolumeStatuses — (Array<map>)

        Information about the status of the volumes.

        • Actions — (Array<map>)

          The details of the operation.

          • Code — (String)

            The code identifying the operation, for example, enable-volume-io.

          • Description — (String)

            A description of the operation.

          • EventId — (String)

            The ID of the event associated with this operation.

          • EventType — (String)

            The event type associated with this operation.

        • AvailabilityZone — (String)

          The Availability Zone of the volume.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • Events — (Array<map>)

          A list of events associated with the volume.

          • Description — (String)

            A description of the event.

          • EventId — (String)

            The ID of this event.

          • EventType — (String)

            The type of this event.

          • NotAfter — (Date)

            The latest end time of the event.

          • NotBefore — (Date)

            The earliest start time of the event.

          • InstanceId — (String)

            The ID of the instance associated with the event.

        • VolumeId — (String)

          The volume ID.

        • VolumeStatus — (map)

          The volume status.

          • Details — (Array<map>)

            The details of the volume status.

            • Name — (String)

              The name of the volume status.

              Possible values include:
              • "io-enabled"
              • "io-performance"
            • Status — (String)

              The intended status of the volume status.

          • Status — (String)

            The status of the volume.

            Possible values include:
            • "ok"
            • "impaired"
            • "insufficient-data"
        • AttachmentStatuses — (Array<map>)

          Information about the instances to which the volume is attached.

          • IoPerformance — (String)

            The maximum IOPS supported by the attached instance.

          • InstanceId — (String)

            The ID of the attached instance.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeVpcAttribute(params = {}, callback) ⇒ AWS.Request

Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.

Service Reference:

Examples:

To describe the enableDnsSupport attribute


/* This example describes the enableDnsSupport attribute. This attribute indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not. */

 var params = {
  Attribute: "enableDnsSupport", 
  VpcId: "vpc-a01106c2"
 };
 ec2.describeVpcAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    EnableDnsSupport: {
     Value: true
    }, 
    VpcId: "vpc-a01106c2"
   }
   */
 });

To describe the enableDnsHostnames attribute


/* This example describes the enableDnsHostnames attribute. This attribute indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not. */

 var params = {
  Attribute: "enableDnsHostnames", 
  VpcId: "vpc-a01106c2"
 };
 ec2.describeVpcAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    EnableDnsHostnames: {
     Value: true
    }, 
    VpcId: "vpc-a01106c2"
   }
   */
 });

Calling the describeVpcAttribute operation

var params = {
  Attribute: enableDnsSupport | enableDnsHostnames, /* required */
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.describeVpcAttribute(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: {})
    • Attribute — (String)

      The VPC attribute.

      Possible values include:
      • "enableDnsSupport"
      • "enableDnsHostnames"
    • VpcId — (String)

      The ID of the VPC.

    • 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:

      • VpcId — (String)

        The ID of the VPC.

      • EnableDnsHostnames — (map)

        Indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not.

        • Value — (Boolean)

          The attribute value. The valid values are true or false.

      • EnableDnsSupport — (map)

        Indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.

        • Value — (Boolean)

          The attribute value. The valid values are true or false.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Describes the ClassicLink status of one or more VPCs.

Service Reference:

Examples:

Calling the describeVpcClassicLink operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  VpcIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVpcClassicLink(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: {})
    • Filters — (Array<map>)

      One or more filters.

      • is-classic-link-enabled - Whether the VPC is enabled for ClassicLink (true | false).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • VpcIds — (Array<String>)

      One or more VPCs for which you want to describe the ClassicLink status.

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:

      • Vpcs — (Array<map>)

        The ClassicLink status of one or more VPCs.

        • ClassicLinkEnabled — (Boolean)

          Indicates whether the VPC is enabled for ClassicLink.

        • 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.

        • VpcId — (String)

          The ID of the VPC.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeVpcClassicLinkDnsSupport(params = {}, callback) ⇒ AWS.Request

Describes the ClassicLink DNS support status of one or more VPCs. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.

Examples:

Calling the describeVpcClassicLinkDnsSupport operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  VpcIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVpcClassicLinkDnsSupport(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • VpcIds — (Array<String>)

      One or more VPC 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:

      • 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.

      • Vpcs — (Array<map>)

        Information about the ClassicLink DNS support status of the VPCs.

        • ClassicLinkDnsSupported — (Boolean)

          Indicates whether ClassicLink DNS support is enabled for the VPC.

        • VpcId — (String)

          The ID of the VPC.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeVpcEndpointConnectionNotifications(params = {}, callback) ⇒ AWS.Request

Describes the connection notifications for VPC endpoints and VPC endpoint services.

Examples:

Calling the describeVpcEndpointConnectionNotifications operation

var params = {
  ConnectionNotificationId: 'STRING_VALUE',
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeVpcEndpointConnectionNotifications(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.

    • ConnectionNotificationId — (String)

      The ID of the notification.

    • Filters — (Array<map>)

      One or more filters.

      • connection-notification-arn - The ARN of the SNS topic for the notification.

      • connection-notification-id - The ID of the notification.

      • connection-notification-state - The state of the notification (Enabled | Disabled).

      • connection-notification-type - The type of notification (Topic).

      • service-id - The ID of the endpoint service.

      • vpc-endpoint-id - The ID of the VPC endpoint.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the returned NextToken value.

    • NextToken — (String)

      The token to request 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:

      • ConnectionNotificationSet — (Array<map>)

        One or more notifications.

        • ConnectionNotificationId — (String)

          The ID of the notification.

        • ServiceId — (String)

          The ID of the endpoint service.

        • VpcEndpointId — (String)

          The ID of the VPC endpoint.

        • ConnectionNotificationType — (String)

          The type of notification.

          Possible values include:
          • "Topic"
        • ConnectionNotificationArn — (String)

          The ARN of the SNS topic for the notification.

        • ConnectionEvents — (Array<String>)

          The events for the notification. Valid values are Accept, Connect, Delete, and Reject.

        • ConnectionNotificationState — (String)

          The state of the notification.

          Possible values include:
          • "Enabled"
          • "Disabled"
      • 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.

describeVpcEndpointConnections(params = {}, callback) ⇒ AWS.Request

Describes the VPC endpoint connections to your VPC endpoint services, including any endpoints that are pending your acceptance.

Service Reference:

Examples:

Calling the describeVpcEndpointConnections operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeVpcEndpointConnections(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.

      • service-id - The ID of the service.

      • vpc-endpoint-owner - The ID of the Amazon Web Services account ID that owns the endpoint.

      • vpc-endpoint-state - The state of the endpoint (pendingAcceptance | pending | available | deleting | deleted | rejected | failed).

      • vpc-endpoint-id - The ID of the endpoint.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned.

    • 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:

      • VpcEndpointConnections — (Array<map>)

        Information about one or more VPC endpoint connections.

        • ServiceId — (String)

          The ID of the service to which the endpoint is connected.

        • VpcEndpointId — (String)

          The ID of the VPC endpoint.

        • VpcEndpointOwner — (String)

          The ID of the Amazon Web Services account that owns the VPC endpoint.

        • VpcEndpointState — (String)

          The state of the VPC endpoint.

          Possible values include:
          • "PendingAcceptance"
          • "Pending"
          • "Available"
          • "Deleting"
          • "Deleted"
          • "Rejected"
          • "Failed"
          • "Expired"
        • CreationTimestamp — (Date)

          The date and time that the VPC endpoint was created.

        • DnsEntries — (Array<map>)

          The DNS entries for the VPC endpoint.

          • DnsName — (String)

            The DNS name.

          • HostedZoneId — (String)

            The ID of the private hosted zone.

        • NetworkLoadBalancerArns — (Array<String>)

          The Amazon Resource Names (ARNs) of the network load balancers for the service.

        • GatewayLoadBalancerArns — (Array<String>)

          The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.

      • 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.

describeVpcEndpoints(params = {}, callback) ⇒ AWS.Request

Describes one or more of your VPC endpoints.

Service Reference:

Examples:

Calling the describeVpcEndpoints operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  VpcEndpointIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVpcEndpoints(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.

    • Filters — (Array<map>)

      One or more filters.

      • service-name - The name of the service.

      • vpc-id - The ID of the VPC in which the endpoint resides.

      • vpc-endpoint-id - The ID of the endpoint.

      • vpc-endpoint-state - The state of the endpoint (pendingAcceptance | pending | available | deleting | deleted | rejected | failed).

      • vpc-endpoint-type - The type of VPC endpoint (Interface | Gateway | GatewayLoadBalancer).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 is greater than 1,000, we return only 1,000 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:

      • VpcEndpoints — (Array<map>)

        Information about the endpoints.

        • VpcEndpointId — (String)

          The ID of the VPC endpoint.

        • VpcEndpointType — (String)

          The type of endpoint.

          Possible values include:
          • "Interface"
          • "Gateway"
          • "GatewayLoadBalancer"
        • VpcId — (String)

          The ID of the VPC to which the endpoint is associated.

        • ServiceName — (String)

          The name of the service to which the endpoint is associated.

        • State — (String)

          The state of the VPC endpoint.

          Possible values include:
          • "PendingAcceptance"
          • "Pending"
          • "Available"
          • "Deleting"
          • "Deleted"
          • "Rejected"
          • "Failed"
          • "Expired"
        • PolicyDocument — (String)

          The policy document associated with the endpoint, if applicable.

        • RouteTableIds — (Array<String>)

          (Gateway endpoint) One or more route tables associated with the endpoint.

        • SubnetIds — (Array<String>)

          (Interface endpoint) One or more subnets in which the endpoint is located.

        • Groups — (Array<map>)

          (Interface endpoint) Information about the security groups that are associated with the network interface.

          • GroupId — (String)

            The ID of the security group.

          • GroupName — (String)

            The name of the security group.

        • PrivateDnsEnabled — (Boolean)

          (Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.

        • RequesterManaged — (Boolean)

          Indicates whether the VPC endpoint is being managed by its service.

        • NetworkInterfaceIds — (Array<String>)

          (Interface endpoint) One or more network interfaces for the endpoint.

        • DnsEntries — (Array<map>)

          (Interface endpoint) The DNS entries for the endpoint.

          • DnsName — (String)

            The DNS name.

          • HostedZoneId — (String)

            The ID of the private hosted zone.

        • CreationTimestamp — (Date)

          The date and time that the VPC endpoint was created.

        • Tags — (Array<map>)

          Any tags assigned to the VPC endpoint.

          • 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.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC endpoint.

        • LastError — (map)

          The last error that occurred for VPC endpoint.

          • Message — (String)

            The error message for the VPC endpoint error.

          • Code — (String)

            The error code for the VPC endpoint error.

      • 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.

describeVpcEndpointServiceConfigurations(params = {}, callback) ⇒ AWS.Request

Describes the VPC endpoint service configurations in your account (your services).

Examples:

Calling the describeVpcEndpointServiceConfigurations operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  ServiceIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVpcEndpointServiceConfigurations(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.

    • ServiceIds — (Array<String>)

      The IDs of one or more services.

    • Filters — (Array<map>)

      One or more filters.

      • service-name - The name of the service.

      • service-id - The ID of the service.

      • service-state - The state of the service (Pending | Available | Deleting | Deleted | Failed).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned.

    • 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:

      • ServiceConfigurations — (Array<map>)

        Information about one or more services.

        • ServiceType — (Array<map>)

          The type of service.

          • ServiceType — (String)

            The type of service.

            Possible values include:
            • "Interface"
            • "Gateway"
            • "GatewayLoadBalancer"
        • ServiceId — (String)

          The ID of the service.

        • ServiceName — (String)

          The name of the service.

        • ServiceState — (String)

          The service state.

          Possible values include:
          • "Pending"
          • "Available"
          • "Deleting"
          • "Deleted"
          • "Failed"
        • AvailabilityZones — (Array<String>)

          The Availability Zones in which the service is available.

        • AcceptanceRequired — (Boolean)

          Indicates whether requests from other Amazon Web Services accounts to create an endpoint to the service must first be accepted.

        • ManagesVpcEndpoints — (Boolean)

          Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.

        • NetworkLoadBalancerArns — (Array<String>)

          The Amazon Resource Names (ARNs) of the Network Load Balancers for the service.

        • GatewayLoadBalancerArns — (Array<String>)

          The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.

        • BaseEndpointDnsNames — (Array<String>)

          The DNS names for the service.

        • PrivateDnsName — (String)

          The private DNS name for the service.

        • PrivateDnsNameConfiguration — (map)

          Information about the endpoint service private DNS name configuration.

          • State — (String)

            The verification state of the VPC endpoint service.

            >Consumers of the endpoint service can use the private name only when the state is verified.

            Possible values include:
            • "pendingVerification"
            • "verified"
            • "failed"
          • Type — (String)

            The endpoint service verification type, for example TXT.

          • Value — (String)

            The value the service provider adds to the private DNS name domain record before verification.

          • Name — (String)

            The name of the record subdomain the service provider needs to create. The service provider adds the value text to the name.

        • Tags — (Array<map>)

          Any tags assigned to the service.

          • 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.

describeVpcEndpointServicePermissions(params = {}, callback) ⇒ AWS.Request

Describes the principals (service consumers) that are permitted to discover your VPC endpoint service.

Examples:

Calling the describeVpcEndpointServicePermissions operation

var params = {
  ServiceId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.describeVpcEndpointServicePermissions(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.

    • ServiceId — (String)

      The ID of the service.

    • Filters — (Array<map>)

      One or more filters.

      • principal - The ARN of the principal.

      • principal-type - The principal type (All | Service | OrganizationUnit | Account | User | Role).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned.

    • 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:

      • AllowedPrincipals — (Array<map>)

        Information about one or more allowed principals.

        • PrincipalType — (String)

          The type of principal.

          Possible values include:
          • "All"
          • "Service"
          • "OrganizationUnit"
          • "Account"
          • "User"
          • "Role"
        • Principal — (String)

          The Amazon Resource Name (ARN) of the principal.

      • 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.

describeVpcEndpointServices(params = {}, callback) ⇒ AWS.Request

Describes available services to which you can create a VPC endpoint.

When the service provider and the consumer have different accounts in multiple Availability Zones, and the consumer views the VPC endpoint service information, the response only includes the common Availability Zones. For example, when the service provider account uses us-east-1a and us-east-1c and the consumer uses us-east-1a and us-east-1b, the response includes the VPC endpoint services in the common Availability Zone, us-east-1a.

Service Reference:

Examples:

Calling the describeVpcEndpointServices operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  ServiceNames: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVpcEndpointServices(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.

    • ServiceNames — (Array<String>)

      One or more service names.

    • Filters — (Array<map>)

      One or more filters.

      • service-name - The name of the service.

      • service-type - The type of service (Interface | Gateway).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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 is greater than 1,000, we return only 1,000 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:

      • ServiceNames — (Array<String>)

        A list of supported services.

      • ServiceDetails — (Array<map>)

        Information about the service.

        • ServiceName — (String)

          The Amazon Resource Name (ARN) of the service.

        • ServiceId — (String)

          The ID of the endpoint service.

        • ServiceType — (Array<map>)

          The type of service.

          • ServiceType — (String)

            The type of service.

            Possible values include:
            • "Interface"
            • "Gateway"
            • "GatewayLoadBalancer"
        • AvailabilityZones — (Array<String>)

          The Availability Zones in which the service is available.

        • Owner — (String)

          The Amazon Web Services account ID of the service owner.

        • BaseEndpointDnsNames — (Array<String>)

          The DNS names for the service.

        • PrivateDnsName — (String)

          The private DNS name for the service.

        • PrivateDnsNames — (Array<map>)

          The private DNS names assigned to the VPC endpoint service.

          • PrivateDnsName — (String)

            The private DNS name assigned to the VPC endpoint service.

        • VpcEndpointPolicySupported — (Boolean)

          Indicates whether the service supports endpoint policies.

        • AcceptanceRequired — (Boolean)

          Indicates whether VPC endpoint connection requests to the service must be accepted by the service owner.

        • ManagesVpcEndpoints — (Boolean)

          Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.

        • Tags — (Array<map>)

          Any tags assigned to the service.

          • 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.

        • PrivateDnsNameVerificationState — (String)

          The verification state of the VPC endpoint service.

          Consumers of the endpoint service cannot use the private name when the state is not verified.

          Possible values include:
          • "pendingVerification"
          • "verified"
          • "failed"
      • 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.

describeVpcPeeringConnections(params = {}, callback) ⇒ AWS.Request

Describes one or more of your VPC peering connections.

Service Reference:

Examples:

Calling the describeVpcPeeringConnections operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  VpcPeeringConnectionIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVpcPeeringConnections(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: {})
    • Filters — (Array<map>)

      One or more filters.

      • accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC.

      • accepter-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the accepter VPC.

      • accepter-vpc-info.vpc-id - The ID of the accepter VPC.

      • expiration-time - The expiration date and time for the VPC peering connection.

      • requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC.

      • requester-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the requester VPC.

      • requester-vpc-info.vpc-id - The ID of the requester VPC.

      • status-code - The status of the VPC peering connection (pending-acceptance | failed | expired | provisioning | active | deleting | deleted | rejected).

      • status-message - A message that provides more information about the status of the VPC peering connection, if applicable.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • vpc-peering-connection-id - The ID of the VPC peering connection.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • VpcPeeringConnectionIds — (Array<String>)

      One or more VPC peering connection IDs.

      Default: Describes all your VPC peering connections.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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:

      • VpcPeeringConnections — (Array<map>)

        Information about the VPC peering connections.

        • AccepterVpcInfo — (map)

          Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock — (String)

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet — (Array<map>)

            The IPv6 CIDR block for the VPC.

            • Ipv6CidrBlock — (String)

              The IPv6 CIDR block.

          • CidrBlockSet — (Array<map>)

            Information about the IPv4 CIDR blocks for the VPC.

            • CidrBlock — (String)

              The IPv4 CIDR block.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions — (map)

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer 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.

          • VpcId — (String)

            The ID of the VPC.

          • Region — (String)

            The Region in which the VPC is located.

        • ExpirationTime — (Date)

          The time that an unaccepted VPC peering connection will expire.

        • RequesterVpcInfo — (map)

          Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock — (String)

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet — (Array<map>)

            The IPv6 CIDR block for the VPC.

            • Ipv6CidrBlock — (String)

              The IPv6 CIDR block.

          • CidrBlockSet — (Array<map>)

            Information about the IPv4 CIDR blocks for the VPC.

            • CidrBlock — (String)

              The IPv4 CIDR block.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions — (map)

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer 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.

          • VpcId — (String)

            The ID of the VPC.

          • Region — (String)

            The Region in which the VPC is located.

        • 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.

      • 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:

describeVpcs(params = {}, callback) ⇒ AWS.Request

Describes one or more of your VPCs.

Service Reference:

Examples:

To describe a VPC


/* This example describes the specified VPC. */

 var params = {
  VpcIds: [
     "vpc-a01106c2"
  ]
 };
 ec2.describeVpcs(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Vpcs: [
       {
      CidrBlock: "10.0.0.0/16", 
      DhcpOptionsId: "dopt-7a8b9c2d", 
      InstanceTenancy: "default", 
      IsDefault: false, 
      State: "available", 
      Tags: [
         {
        Key: "Name", 
        Value: "MyVPC"
       }
      ], 
      VpcId: "vpc-a01106c2"
     }
    ]
   }
   */
 });

Calling the describeVpcs operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  VpcIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVpcs(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: {})
    • Filters — (Array<map>)

      One or more filters.

      • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28).

      • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.

      • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.

      • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.

      • dhcp-options-id - The ID of a set of DHCP options.

      • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.

      • ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

      • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.

      • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.

      • is-default - Indicates whether the VPC is the default VPC.

      • owner-id - The ID of the Amazon Web Services account that owns the VPC.

      • state - The state of the VPC (pending | available).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • vpc-id - The ID of the VPC.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • VpcIds — (Array<String>)

      One or more VPC IDs.

      Default: Describes all your VPCs.

    • 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.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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:

      • Vpcs — (Array<map>)

        Information about one or more VPCs.

        • CidrBlock — (String)

          The primary IPv4 CIDR block for the VPC.

        • DhcpOptionsId — (String)

          The ID of the set of DHCP options you've associated with the VPC.

        • State — (String)

          The current state of the VPC.

          Possible values include:
          • "pending"
          • "available"
        • VpcId — (String)

          The ID of the VPC.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC.

        • InstanceTenancy — (String)

          The allowed tenancy of instances launched into the VPC.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • Ipv6CidrBlockAssociationSet — (Array<map>)

          Information about the IPv6 CIDR blocks associated with the VPC.

          • AssociationId — (String)

            The association ID for the IPv6 CIDR block.

          • Ipv6CidrBlock — (String)

            The IPv6 CIDR block.

          • Ipv6CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of the CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

          • NetworkBorderGroup — (String)

            The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1.

          • Ipv6Pool — (String)

            The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

        • CidrBlockAssociationSet — (Array<map>)

          Information about the IPv4 CIDR blocks associated with the VPC.

          • AssociationId — (String)

            The association ID for the IPv4 CIDR block.

          • CidrBlock — (String)

            The IPv4 CIDR block.

          • CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of the CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

        • IsDefault — (Boolean)

          Indicates whether the VPC is the default 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.

      • 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:

describeVpnConnections(params = {}, callback) ⇒ AWS.Request

Describes one or more of your VPN connections.

For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.

Service Reference:

Examples:

Calling the describeVpnConnections operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  VpnConnectionIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVpnConnections(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: {})
    • Filters — (Array<map>)

      One or more filters.

      • customer-gateway-configuration - The configuration information for the customer gateway.

      • customer-gateway-id - The ID of a customer gateway associated with the VPN connection.

      • state - The state of the VPN connection (pending | available | deleting | deleted).

      • option.static-routes-only - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP).

      • route.destination-cidr-block - The destination CIDR block. This corresponds to the subnet used in a customer data center.

      • bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP device.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • type - The type of VPN connection. Currently the only supported type is ipsec.1.

      • vpn-connection-id - The ID of the VPN connection.

      • vpn-gateway-id - The ID of a virtual private gateway associated with the VPN connection.

      • transit-gateway-id - The ID of a transit gateway associated with the VPN connection.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • VpnConnectionIds — (Array<String>)

      One or more VPN connection IDs.

      Default: Describes your VPN connections.

    • 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:

      • VpnConnections — (Array<map>)

        Information about one or more VPN connections.

        • 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.

        • CustomerGatewayId — (String)

          The ID of the customer gateway at your end of the VPN connection.

        • Category — (String)

          The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

        • State — (String)

          The current state of the VPN connection.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • Type — (String)

          The type of VPN connection.

          Possible values include:
          • "ipsec.1"
        • VpnConnectionId — (String)

          The ID of the VPN connection.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

        • TransitGatewayId — (String)

          The ID of the transit gateway associated with the VPN connection.

        • CoreNetworkArn — (String)

          The ARN of the core network.

        • CoreNetworkAttachmentArn — (String)

          The ARN of the core network attachment.

        • GatewayAssociationState — (String)

          The current state of the gateway association.

          Possible values include:
          • "associated"
          • "not-associated"
          • "associating"
          • "disassociating"
        • Options — (map)

          The VPN connection options.

          • EnableAcceleration — (Boolean)

            Indicates whether acceleration is enabled for the VPN connection.

          • StaticRoutesOnly — (Boolean)

            Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

          • LocalIpv4NetworkCidr — (String)

            The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv4NetworkCidr — (String)

            The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

          • LocalIpv6NetworkCidr — (String)

            The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv6NetworkCidr — (String)

            The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

          • TunnelInsideIpVersion — (String)

            Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

            Possible values include:
            • "ipv4"
            • "ipv6"
          • TunnelOptions — (Array<map>)

            Indicates the VPN tunnel options.

            • OutsideIpAddress — (String)

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr — (String)

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr — (String)

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey — (String)

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds — (Integer)

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds — (Integer)

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds — (Integer)

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage — (Integer)

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize — (Integer)

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds — (Integer)

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction — (String)

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The encryption algorithm.

            • Phase1IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The integrity algorithm.

            • Phase1DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • IkeVersions — (Array<map>)

              The IKE versions that are permitted for the VPN tunnel.

              • Value — (String)

                The IKE version.

            • StartupAction — (String)

              The action to take when the establishing the VPN tunnels for a VPN connection.

        • 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"
        • 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.

          • AcceptedRouteCount — (Integer)

            The number of accepted routes.

          • LastStatusChange — (Date)

            The date and time of the last change in status.

          • 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"
          • StatusMessage — (String)

            If an error occurs, a description of the error.

          • CertificateArn — (String)

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

describeVpnGateways(params = {}, callback) ⇒ AWS.Request

Describes one or more of your virtual private gateways.

For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.

Service Reference:

Examples:

Calling the describeVpnGateways operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  VpnGatewayIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.describeVpnGateways(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: {})
    • Filters — (Array<map>)

      One or more filters.

      • amazon-side-asn - The Autonomous System Number (ASN) for the Amazon side of the gateway.

      • attachment.state - The current state of the attachment between the gateway and the VPC (attaching | attached | detaching | detached).

      • attachment.vpc-id - The ID of an attached VPC.

      • availability-zone - The Availability Zone for the virtual private gateway (if applicable).

      • state - The state of the virtual private gateway (pending | available | deleting | deleted).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • type - The type of virtual private gateway. Currently the only supported type is ipsec.1.

      • vpn-gateway-id - The ID of the virtual private gateway.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • VpnGatewayIds — (Array<String>)

      One or more virtual private gateway IDs.

      Default: Describes all your virtual private gateways.

    • 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:

      • VpnGateways — (Array<map>)

        Information about one or more virtual private gateways.

        • AvailabilityZone — (String)

          The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.

        • 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"
        • VpcAttachments — (Array<map>)

          Any VPCs attached to the virtual private gateway.

          • State — (String)

            The current state of the attachment.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
          • VpcId — (String)

            The ID of the VPC.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway.

        • AmazonSideAsn — (Integer)

          The private Autonomous System Number (ASN) for the Amazon side of a BGP session.

        • 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.

detachClassicLinkVpc(params = {}, callback) ⇒ AWS.Request

Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.

Service Reference:

Examples:

Calling the detachClassicLinkVpc operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.detachClassicLinkVpc(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 unlink from the VPC.

    • VpcId — (String)

      The ID of the VPC to which the instance is linked.

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.

detachInternetGateway(params = {}, callback) ⇒ AWS.Request

Detaches an internet gateway from a VPC, disabling connectivity between the internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses or public IPv4 addresses.

Service Reference:

Examples:

To detach an Internet gateway from a VPC


/* This example detaches the specified Internet gateway from the specified VPC. */

 var params = {
  InternetGatewayId: "igw-c0a643a9", 
  VpcId: "vpc-a01106c2"
 };
 ec2.detachInternetGateway(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the detachInternetGateway operation

var params = {
  InternetGatewayId: 'STRING_VALUE', /* required */
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.detachInternetGateway(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.

detachNetworkInterface(params = {}, callback) ⇒ AWS.Request

Detaches a network interface from an instance.

Service Reference:

Examples:

To detach a network interface from an instance


/* This example detaches the specified network interface from its attached instance. */

 var params = {
  AttachmentId: "eni-attach-66c4350a"
 };
 ec2.detachNetworkInterface(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the detachNetworkInterface operation

var params = {
  AttachmentId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Force: true || false
};
ec2.detachNetworkInterface(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: {})
    • AttachmentId — (String)

      The ID of the attachment.

    • 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.

    • Force — (Boolean)

      Specifies whether to force a detachment.

      Note:
      • Use the Force parameter only as a last resort to detach a network interface from a failed instance.
      • If you use the Force parameter to detach a network interface, you might not be able to attach a different network interface to the same index on the instance without first stopping and starting the instance.
      • If you force the detachment of a network interface, the instance metadata might not get updated. This means that the attributes associated with the detached network interface might still be visible. The instance metadata will get updated when you stop and start 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

detachVolume(params = {}, callback) ⇒ AWS.Request

Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the busy state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.

When a volume with an Amazon Web Services Marketplace product code is detached from an instance, the product code is no longer associated with the instance.

For more information, see Detach an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To detach a volume from an instance


/* This example detaches the volume (``vol-049df61146c4d7901``) from the instance it is attached to. */

 var params = {
  VolumeId: "vol-1234567890abcdef0"
 };
 ec2.detachVolume(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    AttachTime: <Date Representation>, 
    Device: "/dev/sdb", 
    InstanceId: "i-1234567890abcdef0", 
    State: "detaching", 
    VolumeId: "vol-049df61146c4d7901"
   }
   */
 });

Calling the detachVolume operation

var params = {
  VolumeId: 'STRING_VALUE', /* required */
  Device: 'STRING_VALUE',
  DryRun: true || false,
  Force: true || false,
  InstanceId: 'STRING_VALUE'
};
ec2.detachVolume(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: {})
    • Device — (String)

      The device name.

    • Force — (Boolean)

      Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.

    • InstanceId — (String)

      The ID of the instance. If you are detaching a Multi-Attach enabled volume, you must specify an instance ID.

    • VolumeId — (String)

      The ID of the volume.

    • 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:

      • AttachTime — (Date)

        The time stamp when the attachment initiated.

      • Device — (String)

        The device name.

      • InstanceId — (String)

        The ID of the instance.

      • State — (String)

        The attachment state of the volume.

        Possible values include:
        • "attaching"
        • "attached"
        • "detaching"
        • "detached"
        • "busy"
      • VolumeId — (String)

        The ID of the volume.

      • 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.

detachVpnGateway(params = {}, callback) ⇒ AWS.Request

Detaches a virtual private gateway from a VPC. You do this if you're planning to turn off the VPC and not use it anymore. You can confirm a virtual private gateway has been completely detached from a VPC by describing the virtual private gateway (any attachments to the virtual private gateway are also described).

You must wait for the attachment's state to switch to detached before you can delete the VPC or attach a different VPC to the virtual private gateway.

Service Reference:

Examples:

Calling the detachVpnGateway operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  VpnGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.detachVpnGateway(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: {})
    • VpcId — (String)

      The ID of the VPC.

    • VpnGatewayId — (String)

      The ID of the virtual private gateway.

    • 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.

disableEbsEncryptionByDefault(params = {}, callback) ⇒ AWS.Request

Disables EBS encryption by default for your account in the current Region.

After you disable encryption by default, you can still create encrypted volumes by enabling encryption when you create each volume.

Disabling encryption by default does not change the encryption status of your existing volumes.

For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the disableEbsEncryptionByDefault operation

var params = {
  DryRun: true || false
};
ec2.disableEbsEncryptionByDefault(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:

      • EbsEncryptionByDefault — (Boolean)

        The updated status of encryption by default.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disableFastSnapshotRestores(params = {}, callback) ⇒ AWS.Request

Disables fast snapshot restores for the specified snapshots in the specified Availability Zones.

Service Reference:

Examples:

Calling the disableFastSnapshotRestores operation

var params = {
  AvailabilityZones: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  SourceSnapshotIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.disableFastSnapshotRestores(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: {})
    • AvailabilityZones — (Array<String>)

      One or more Availability Zones. For example, us-east-2a.

    • SourceSnapshotIds — (Array<String>)

      The IDs of one or more snapshots. For example, snap-1234567890abcdef0.

    • 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:

      • Successful — (Array<map>)

        Information about the snapshots for which fast snapshot restores were successfully disabled.

        • SnapshotId — (String)

          The ID of the snapshot.

        • AvailabilityZone — (String)

          The Availability Zone.

        • State — (String)

          The state of fast snapshot restores for the snapshot.

          Possible values include:
          • "enabling"
          • "optimizing"
          • "enabled"
          • "disabling"
          • "disabled"
        • StateTransitionReason — (String)

          The reason for the state transition. The possible values are as follows:

          • Client.UserInitiated - The state successfully transitioned to enabling or disabling.

          • Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to optimizing, enabled, or disabled.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.

        • OwnerAlias — (String)

          The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.

        • EnablingTime — (Date)

          The time at which fast snapshot restores entered the enabling state.

        • OptimizingTime — (Date)

          The time at which fast snapshot restores entered the optimizing state.

        • EnabledTime — (Date)

          The time at which fast snapshot restores entered the enabled state.

        • DisablingTime — (Date)

          The time at which fast snapshot restores entered the disabling state.

        • DisabledTime — (Date)

          The time at which fast snapshot restores entered the disabled state.

      • Unsuccessful — (Array<map>)

        Information about the snapshots for which fast snapshot restores could not be disabled.

        • SnapshotId — (String)

          The ID of the snapshot.

        • FastSnapshotRestoreStateErrors — (Array<map>)

          The errors.

          • AvailabilityZone — (String)

            The Availability Zone.

          • Error — (map)

            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.

disableImageDeprecation(params = {}, callback) ⇒ AWS.Request

Cancels the deprecation of the specified AMI.

For more information, see Deprecate an AMI in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the disableImageDeprecation operation

var params = {
  ImageId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.disableImageDeprecation(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: {})
    • ImageId — (String)

      The ID of the AMI.

    • 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:

      • 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.

disableSerialConsoleAccess(params = {}, callback) ⇒ AWS.Request

Disables access to the EC2 serial console of all instances for your account. By default, access to the EC2 serial console is disabled for your account. For more information, see Manage account access to the EC2 serial console in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the disableSerialConsoleAccess operation

var params = {
  DryRun: true || false
};
ec2.disableSerialConsoleAccess(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:

      • SerialConsoleAccessEnabled — (Boolean)

        If true, access to the EC2 serial console of all instances is enabled for your account. If false, access to the EC2 serial console of all instances is disabled for your account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disableTransitGatewayRouteTablePropagation(params = {}, callback) ⇒ AWS.Request

Disables the specified resource attachment from propagating routes to the specified propagation route table.

Examples:

Calling the disableTransitGatewayRouteTablePropagation operation

var params = {
  TransitGatewayAttachmentId: 'STRING_VALUE', /* required */
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.disableTransitGatewayRouteTablePropagation(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: {})
    • TransitGatewayRouteTableId — (String)

      The ID of the propagation route table.

    • TransitGatewayAttachmentId — (String)

      The ID of the attachment.

    • 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:

      • Propagation — (map)

        Information about route propagation.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The resource type. Note that the tgw-peering resource type has been deprecated.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • TransitGatewayRouteTableId — (String)

          The ID of the transit gateway route table.

        • State — (String)

          The state.

          Possible values include:
          • "enabling"
          • "enabled"
          • "disabling"
          • "disabled"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disableVgwRoutePropagation(params = {}, callback) ⇒ AWS.Request

Disables a virtual private gateway (VGW) from propagating routes to a specified route table of a VPC.

Service Reference:

Examples:

To disable route propagation


/* This example disables the specified virtual private gateway from propagating static routes to the specified route table. */

 var params = {
  GatewayId: "vgw-9a4cacf3", 
  RouteTableId: "rtb-22574640"
 };
 ec2.disableVgwRoutePropagation(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the disableVgwRoutePropagation operation

var params = {
  GatewayId: 'STRING_VALUE', /* required */
  RouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.disableVgwRoutePropagation(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: {})
    • GatewayId — (String)

      The ID of the virtual private gateway.

    • RouteTableId — (String)

      The ID of the route table.

    • 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.

Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it.

Service Reference:

Examples:

Calling the disableVpcClassicLink operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.disableVpcClassicLink(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:

      • 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.

disableVpcClassicLinkDnsSupport(params = {}, callback) ⇒ AWS.Request

Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to public IP addresses when addressed between a linked EC2-Classic instance and instances in the VPC to which it's linked. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.

You must specify a VPC ID in the request.

Service Reference:

Examples:

Calling the disableVpcClassicLinkDnsSupport operation

var params = {
  VpcId: 'STRING_VALUE'
};
ec2.disableVpcClassicLinkDnsSupport(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: {})
    • 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:

      • 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.

disassociateAddress(params = {}, callback) ⇒ AWS.Request

Disassociates an Elastic IP address from the instance or network interface it's associated with.

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.

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

Service Reference:

Examples:

To disassociate an Elastic IP address in EC2-VPC


/* This example disassociates an Elastic IP address from an instance in a VPC. */

 var params = {
  AssociationId: "eipassoc-2bebb745"
 };
 ec2.disassociateAddress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

To disassociate an Elastic IP addresses in EC2-Classic


/* This example disassociates an Elastic IP address from an instance in EC2-Classic. */

 var params = {
  PublicIp: "198.51.100.0"
 };
 ec2.disassociateAddress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the disassociateAddress operation

var params = {
  AssociationId: 'STRING_VALUE',
  DryRun: true || false,
  PublicIp: 'STRING_VALUE'
};
ec2.disassociateAddress(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: {})
    • AssociationId — (String)

      [EC2-VPC] The association ID. Required for EC2-VPC.

    • PublicIp — (String)

      [EC2-Classic] The Elastic IP address. Required for EC2-Classic.

    • 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.

disassociateClientVpnTargetNetwork(params = {}, callback) ⇒ AWS.Request

Disassociates a target network from the specified Client VPN endpoint. When you disassociate the last target network from a Client VPN, the following happens:

  • The route that was automatically added for the VPC is deleted

  • All active client connections are terminated

  • New client connections are disallowed

  • The Client VPN endpoint's status changes to pending-associate

Examples:

Calling the disassociateClientVpnTargetNetwork operation

var params = {
  AssociationId: 'STRING_VALUE', /* required */
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.disassociateClientVpnTargetNetwork(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint from which to disassociate the target network.

    • AssociationId — (String)

      The ID of the target network association.

    • 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:

      • AssociationId — (String)

        The ID of the target network association.

      • Status — (map)

        The current state of the target network association.

        • Code — (String)

          The state of the target network association.

          Possible values include:
          • "associating"
          • "associated"
          • "association-failed"
          • "disassociating"
          • "disassociated"
        • Message — (String)

          A message about the status of the target network association, if applicable.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateEnclaveCertificateIamRole(params = {}, callback) ⇒ AWS.Request

Disassociates an IAM role from an Certificate Manager (ACM) certificate. Disassociating an IAM role from an ACM certificate removes the Amazon S3 object that contains the certificate, certificate chain, and encrypted private key from the Amazon S3 bucket. It also revokes the IAM role's permission to use the KMS key used to encrypt the private key. This effectively revokes the role's permission to use the certificate.

Examples:

Calling the disassociateEnclaveCertificateIamRole operation

var params = {
  CertificateArn: 'STRING_VALUE',
  DryRun: true || false,
  RoleArn: 'STRING_VALUE'
};
ec2.disassociateEnclaveCertificateIamRole(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: {})
    • CertificateArn — (String)

      The ARN of the ACM certificate from which to disassociate the IAM role.

    • RoleArn — (String)

      The ARN of the IAM role to disassociate.

    • 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:

      • 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.

disassociateIamInstanceProfile(params = {}, callback) ⇒ AWS.Request

Disassociates an IAM instance profile from a running or stopped instance.

Use DescribeIamInstanceProfileAssociations to get the association ID.

Service Reference:

Examples:

To disassociate an IAM instance profile


/* This example disassociates the specified IAM instance profile from an instance. */

 var params = {
  AssociationId: "iip-assoc-05020b59952902f5f"
 };
 ec2.disassociateIamInstanceProfile(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    IamInstanceProfileAssociation: {
     AssociationId: "iip-assoc-05020b59952902f5f", 
     IamInstanceProfile: {
      Arn: "arn:aws:iam::123456789012:instance-profile/admin-role", 
      Id: "AIPAI5IVIHMFFYY2DKV5Y"
     }, 
     InstanceId: "i-123456789abcde123", 
     State: "disassociating"
    }
   }
   */
 });

Calling the disassociateIamInstanceProfile operation

var params = {
  AssociationId: 'STRING_VALUE' /* required */
};
ec2.disassociateIamInstanceProfile(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: {})
    • AssociationId — (String)

      The ID of the IAM instance profile association.

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:

      • IamInstanceProfileAssociation — (map)

        Information about the IAM instance profile association.

        • AssociationId — (String)

          The ID of the association.

        • InstanceId — (String)

          The ID of the instance.

        • IamInstanceProfile — (map)

          The IAM instance profile.

          • Arn — (String)

            The Amazon Resource Name (ARN) of the instance profile.

          • Id — (String)

            The ID of the instance profile.

        • State — (String)

          The state of the association.

          Possible values include:
          • "associating"
          • "associated"
          • "disassociating"
          • "disassociated"
        • Timestamp — (Date)

          The time the IAM instance profile was associated with the instance.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateInstanceEventWindow(params = {}, callback) ⇒ AWS.Request

Disassociates one or more targets from an event window.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the disassociateInstanceEventWindow operation

var params = {
  AssociationTarget: { /* required */
    DedicatedHostIds: [
      'STRING_VALUE',
      /* more items */
    ],
    InstanceIds: [
      'STRING_VALUE',
      /* more items */
    ],
    InstanceTags: [
      {
        Key: 'STRING_VALUE',
        Value: 'STRING_VALUE'
      },
      /* more items */
    ]
  },
  InstanceEventWindowId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.disassociateInstanceEventWindow(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.

    • InstanceEventWindowId — (String)

      The ID of the event window.

    • AssociationTarget — (map)

      One or more targets to disassociate from the specified event window.

      • InstanceIds — (Array<String>)

        The IDs of the instances to disassociate from the event window.

      • InstanceTags — (Array<map>)

        The instance tags to disassociate from the event window. Any instances associated with the tags will be disassociated from the event window.

        • 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.

      • DedicatedHostIds — (Array<String>)

        The IDs of the Dedicated Hosts to disassociate from the event window.

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:

      • InstanceEventWindow — (map)

        Information about the event window.

        • InstanceEventWindowId — (String)

          The ID of the event window.

        • TimeRanges — (Array<map>)

          One or more time ranges defined for the event window.

          • StartWeekDay — (String)

            The day on which the time range begins.

            Possible values include:
            • "sunday"
            • "monday"
            • "tuesday"
            • "wednesday"
            • "thursday"
            • "friday"
            • "saturday"
          • StartHour — (Integer)

            The hour when the time range begins.

          • EndWeekDay — (String)

            The day on which the time range ends.

            Possible values include:
            • "sunday"
            • "monday"
            • "tuesday"
            • "wednesday"
            • "thursday"
            • "friday"
            • "saturday"
          • EndHour — (Integer)

            The hour when the time range ends.

        • Name — (String)

          The name of the event window.

        • CronExpression — (String)

          The cron expression defined for the event window.

        • AssociationTarget — (map)

          One or more targets associated with the event window.

          • InstanceIds — (Array<String>)

            The IDs of the instances associated with the event window.

          • Tags — (Array<map>)

            The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.

            • 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.

          • DedicatedHostIds — (Array<String>)

            The IDs of the Dedicated Hosts associated with the event window.

        • State — (String)

          The current state of the event window.

          Possible values include:
          • "creating"
          • "deleting"
          • "active"
          • "deleted"
        • Tags — (Array<map>)

          The instance tags associated with the event window.

          • 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.

disassociateRouteTable(params = {}, callback) ⇒ AWS.Request

Disassociates a subnet or gateway from a route table.

After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see Route tables in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

To disassociate a route table


/* This example disassociates the specified route table from its associated subnet. */

 var params = {
  AssociationId: "rtbassoc-781d0d1a"
 };
 ec2.disassociateRouteTable(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the disassociateRouteTable operation

var params = {
  AssociationId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.disassociateRouteTable(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: {})
    • AssociationId — (String)

      The association ID representing the current association between the route table and subnet or gateway.

    • 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.

disassociateSubnetCidrBlock(params = {}, callback) ⇒ AWS.Request

Disassociates a CIDR block from a subnet. Currently, you can disassociate an IPv6 CIDR block only. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it.

Service Reference:

Examples:

Calling the disassociateSubnetCidrBlock operation

var params = {
  AssociationId: 'STRING_VALUE' /* required */
};
ec2.disassociateSubnetCidrBlock(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: {})
    • AssociationId — (String)

      The association ID for the CIDR block.

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:

      • Ipv6CidrBlockAssociation — (map)

        Information about the IPv6 CIDR block association.

        • AssociationId — (String)

          The association ID for the CIDR block.

        • Ipv6CidrBlock — (String)

          The IPv6 CIDR block.

        • Ipv6CidrBlockState — (map)

          Information about the state of the CIDR block.

          • State — (String)

            The state of a CIDR block.

            Possible values include:
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
            • "failing"
            • "failed"
          • StatusMessage — (String)

            A message about the status of the CIDR block, if applicable.

      • SubnetId — (String)

        The ID of the subnet.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateTransitGatewayMulticastDomain(params = {}, callback) ⇒ AWS.Request

Disassociates the specified subnets from the transit gateway multicast domain.

Examples:

Calling the disassociateTransitGatewayMulticastDomain operation

var params = {
  DryRun: true || false,
  SubnetIds: [
    'STRING_VALUE',
    /* more items */
  ],
  TransitGatewayAttachmentId: 'STRING_VALUE',
  TransitGatewayMulticastDomainId: 'STRING_VALUE'
};
ec2.disassociateTransitGatewayMulticastDomain(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: {})
    • TransitGatewayMulticastDomainId — (String)

      The ID of the transit gateway multicast domain.

    • TransitGatewayAttachmentId — (String)

      The ID of the attachment.

    • SubnetIds — (Array<String>)

      The IDs of the subnets;

    • 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:

      • Associations — (map)

        Information about the association.

        • TransitGatewayMulticastDomainId — (String)

          The ID of the transit gateway multicast domain.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway attachment.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The type of resource, for example a VPC attachment.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • ResourceOwnerId — (String)

          The ID of the Amazon Web Services account that owns the resource.

        • Subnets — (Array<map>)

          The subnets associated with the multicast domain.

          • SubnetId — (String)

            The ID of the subnet.

          • State — (String)

            The state of the subnet association.

            Possible values include:
            • "pendingAcceptance"
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
            • "rejected"
            • "failed"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateTransitGatewayRouteTable(params = {}, callback) ⇒ AWS.Request

Disassociates a resource attachment from a transit gateway route table.

Examples:

Calling the disassociateTransitGatewayRouteTable operation

var params = {
  TransitGatewayAttachmentId: 'STRING_VALUE', /* required */
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.disassociateTransitGatewayRouteTable(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: {})
    • TransitGatewayRouteTableId — (String)

      The ID of the transit gateway route table.

    • TransitGatewayAttachmentId — (String)

      The ID of the attachment.

    • 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:

      • Association — (map)

        Information about the association.

        • TransitGatewayRouteTableId — (String)

          The ID of the transit gateway route table.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The resource type. Note that the tgw-peering resource type has been deprecated.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • State — (String)

          The state of the association.

          Possible values include:
          • "associating"
          • "associated"
          • "disassociating"
          • "disassociated"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateTrunkInterface(params = {}, callback) ⇒ AWS.Request

Note: This API action is currently in limited preview only. If you are interested in using this feature, contact your account manager.

Removes an association between a branch network interface with a trunk network interface.

Service Reference:

Examples:

Calling the disassociateTrunkInterface operation

var params = {
  AssociationId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false
};
ec2.disassociateTrunkInterface(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: {})
    • AssociationId — (String)

      The ID of the association

    • ClientToken — (String)

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

      If a token is not provided, the SDK will use a version 4 UUID.
    • 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:

      • Return — (Boolean)

        Returns true if the request succeeds; otherwise, it returns an error.

      • ClientToken — (String)

        Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateVpcCidrBlock(params = {}, callback) ⇒ AWS.Request

Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you must specify its association ID. You can get the association ID by using DescribeVpcs. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it.

You cannot disassociate the CIDR block with which you originally created the VPC (the primary CIDR block).

Service Reference:

Examples:

Calling the disassociateVpcCidrBlock operation

var params = {
  AssociationId: 'STRING_VALUE' /* required */
};
ec2.disassociateVpcCidrBlock(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: {})
    • AssociationId — (String)

      The association ID for the CIDR block.

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:

      • Ipv6CidrBlockAssociation — (map)

        Information about the IPv6 CIDR block association.

        • AssociationId — (String)

          The association ID for the IPv6 CIDR block.

        • Ipv6CidrBlock — (String)

          The IPv6 CIDR block.

        • Ipv6CidrBlockState — (map)

          Information about the state of the CIDR block.

          • State — (String)

            The state of the CIDR block.

            Possible values include:
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
            • "failing"
            • "failed"
          • StatusMessage — (String)

            A message about the status of the CIDR block, if applicable.

        • NetworkBorderGroup — (String)

          The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1.

        • Ipv6Pool — (String)

          The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

      • CidrBlockAssociation — (map)

        Information about the IPv4 CIDR block association.

        • AssociationId — (String)

          The association ID for the IPv4 CIDR block.

        • CidrBlock — (String)

          The IPv4 CIDR block.

        • CidrBlockState — (map)

          Information about the state of the CIDR block.

          • State — (String)

            The state of the CIDR block.

            Possible values include:
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
            • "failing"
            • "failed"
          • StatusMessage — (String)

            A message about the status of the CIDR block, if applicable.

      • VpcId — (String)

        The ID of the VPC.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

enableEbsEncryptionByDefault(params = {}, callback) ⇒ AWS.Request

Enables EBS encryption by default for your account in the current Region.

After you enable encryption by default, the EBS volumes that you create are always encrypted, either using the default KMS key or the KMS key that you specified when you created each volume. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide.

You can specify the default KMS key for encryption by default using ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId.

Enabling encryption by default has no effect on the encryption status of your existing volumes.

After you enable encryption by default, you can no longer launch instances using instance types that do not support encryption. For more information, see Supported instance types.

Service Reference:

Examples:

Calling the enableEbsEncryptionByDefault operation

var params = {
  DryRun: true || false
};
ec2.enableEbsEncryptionByDefault(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:

      • EbsEncryptionByDefault — (Boolean)

        The updated status of encryption by default.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

enableFastSnapshotRestores(params = {}, callback) ⇒ AWS.Request

Enables fast snapshot restores for the specified snapshots in the specified Availability Zones.

You get the full benefit of fast snapshot restores after they enter the enabled state. To get the current state of fast snapshot restores, use DescribeFastSnapshotRestores. To disable fast snapshot restores, use DisableFastSnapshotRestores.

For more information, see Amazon EBS fast snapshot restore in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the enableFastSnapshotRestores operation

var params = {
  AvailabilityZones: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  SourceSnapshotIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.enableFastSnapshotRestores(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: {})
    • AvailabilityZones — (Array<String>)

      One or more Availability Zones. For example, us-east-2a.

    • SourceSnapshotIds — (Array<String>)

      The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a snapshot that was shared with you from another Amazon Web Services account.

    • 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:

      • Successful — (Array<map>)

        Information about the snapshots for which fast snapshot restores were successfully enabled.

        • SnapshotId — (String)

          The ID of the snapshot.

        • AvailabilityZone — (String)

          The Availability Zone.

        • State — (String)

          The state of fast snapshot restores.

          Possible values include:
          • "enabling"
          • "optimizing"
          • "enabled"
          • "disabling"
          • "disabled"
        • StateTransitionReason — (String)

          The reason for the state transition. The possible values are as follows:

          • Client.UserInitiated - The state successfully transitioned to enabling or disabling.

          • Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to optimizing, enabled, or disabled.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.

        • OwnerAlias — (String)

          The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.

        • EnablingTime — (Date)

          The time at which fast snapshot restores entered the enabling state.

        • OptimizingTime — (Date)

          The time at which fast snapshot restores entered the optimizing state.

        • EnabledTime — (Date)

          The time at which fast snapshot restores entered the enabled state.

        • DisablingTime — (Date)

          The time at which fast snapshot restores entered the disabling state.

        • DisabledTime — (Date)

          The time at which fast snapshot restores entered the disabled state.

      • Unsuccessful — (Array<map>)

        Information about the snapshots for which fast snapshot restores could not be enabled.

        • SnapshotId — (String)

          The ID of the snapshot.

        • FastSnapshotRestoreStateErrors — (Array<map>)

          The errors.

          • AvailabilityZone — (String)

            The Availability Zone.

          • Error — (map)

            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.

enableImageDeprecation(params = {}, callback) ⇒ AWS.Request

Enables deprecation of the specified AMI at the specified date and time.

For more information, see Deprecate an AMI in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the enableImageDeprecation operation

var params = {
  DeprecateAt: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  ImageId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.enableImageDeprecation(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: {})
    • ImageId — (String)

      The ID of the AMI.

    • DeprecateAt — (Date)

      The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ. If you specify a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.

      You can’t specify a date in the past. The upper limit for DeprecateAt is 10 years from now.

    • 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:

      • 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.

enableSerialConsoleAccess(params = {}, callback) ⇒ AWS.Request

Enables access to the EC2 serial console of all instances for your account. By default, access to the EC2 serial console is disabled for your account. For more information, see Manage account access to the EC2 serial console in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the enableSerialConsoleAccess operation

var params = {
  DryRun: true || false
};
ec2.enableSerialConsoleAccess(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:

      • SerialConsoleAccessEnabled — (Boolean)

        If true, access to the EC2 serial console of all instances is enabled for your account. If false, access to the EC2 serial console of all instances is disabled for your account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

enableTransitGatewayRouteTablePropagation(params = {}, callback) ⇒ AWS.Request

Enables the specified attachment to propagate routes to the specified propagation route table.

Examples:

Calling the enableTransitGatewayRouteTablePropagation operation

var params = {
  TransitGatewayAttachmentId: 'STRING_VALUE', /* required */
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.enableTransitGatewayRouteTablePropagation(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: {})
    • TransitGatewayRouteTableId — (String)

      The ID of the propagation route table.

    • TransitGatewayAttachmentId — (String)

      The ID of the attachment.

    • 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:

      • Propagation — (map)

        Information about route propagation.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The resource type. Note that the tgw-peering resource type has been deprecated.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • TransitGatewayRouteTableId — (String)

          The ID of the transit gateway route table.

        • State — (String)

          The state.

          Possible values include:
          • "enabling"
          • "enabled"
          • "disabling"
          • "disabled"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

enableVgwRoutePropagation(params = {}, callback) ⇒ AWS.Request

Enables a virtual private gateway (VGW) to propagate routes to the specified route table of a VPC.

Service Reference:

Examples:

To enable route propagation


/* This example enables the specified virtual private gateway to propagate static routes to the specified route table. */

 var params = {
  GatewayId: "vgw-9a4cacf3", 
  RouteTableId: "rtb-22574640"
 };
 ec2.enableVgwRoutePropagation(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the enableVgwRoutePropagation operation

var params = {
  GatewayId: 'STRING_VALUE', /* required */
  RouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.enableVgwRoutePropagation(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: {})
    • GatewayId — (String)

      The ID of the virtual private gateway that is attached to a VPC. The virtual private gateway must be attached to the same VPC that the routing tables are associated with.

    • RouteTableId — (String)

      The ID of the route table. The routing table must be associated with the same VPC that the virtual private gateway is attached 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.

enableVolumeIO(params = {}, callback) ⇒ AWS.Request

Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.

Service Reference:

Examples:

To enable I/O for a volume


/* This example enables I/O on volume ``vol-1234567890abcdef0``. */

 var params = {
  VolumeId: "vol-1234567890abcdef0"
 };
 ec2.enableVolumeIO(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the enableVolumeIO operation

var params = {
  VolumeId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.enableVolumeIO(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.

Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot enable your VPC for ClassicLink if any of your VPC route tables have existing routes for address ranges within the 10.0.0.0/8 IP address range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16 IP address ranges. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the enableVpcClassicLink operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.enableVpcClassicLink(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:

      • 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.

enableVpcClassicLinkDnsSupport(params = {}, callback) ⇒ AWS.Request

Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.

You must specify a VPC ID in the request.

Service Reference:

Examples:

Calling the enableVpcClassicLinkDnsSupport operation

var params = {
  VpcId: 'STRING_VALUE'
};
ec2.enableVpcClassicLinkDnsSupport(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: {})
    • 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:

      • 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.

exportClientVpnClientCertificateRevocationList(params = {}, callback) ⇒ AWS.Request

Downloads the client certificate revocation list for the specified Client VPN endpoint.

Examples:

Calling the exportClientVpnClientCertificateRevocationList operation

var params = {
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.exportClientVpnClientCertificateRevocationList(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint.

    • 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:

      • CertificateRevocationList — (String)

        Information about the client certificate revocation list.

      • Status — (map)

        The current state of the client certificate revocation list.

        • Code — (String)

          The state of the client certificate revocation list.

          Possible values include:
          • "pending"
          • "active"
        • Message — (String)

          A message about the status of the client certificate revocation list, if applicable.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

exportClientVpnClientConfiguration(params = {}, callback) ⇒ AWS.Request

Downloads the contents of the Client VPN endpoint configuration file for the specified Client VPN endpoint. The Client VPN endpoint configuration file includes the Client VPN endpoint and certificate information clients need to establish a connection with the Client VPN endpoint.

Examples:

Calling the exportClientVpnClientConfiguration operation

var params = {
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.exportClientVpnClientConfiguration(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint.

    • 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:

      • ClientConfiguration — (String)

        The contents of the Client VPN endpoint configuration file.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

exportImage(params = {}, callback) ⇒ AWS.Request

Exports an Amazon Machine Image (AMI) to a VM file. For more information, see Exporting a VM directly from an Amazon Machine Image (AMI) in the VM Import/Export User Guide.

Service Reference:

Examples:

Calling the exportImage operation

var params = {
  DiskImageFormat: VMDK | RAW | VHD, /* required */
  ImageId: 'STRING_VALUE', /* required */
  S3ExportLocation: { /* required */
    S3Bucket: 'STRING_VALUE', /* required */
    S3Prefix: 'STRING_VALUE'
  },
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DryRun: true || false,
  RoleName: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.exportImage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClientToken — (String)

      Token to enable idempotency for export image requests.

      If a token is not provided, the SDK will use a version 4 UUID.
    • Description — (String)

      A description of the image being exported. The maximum length is 255 characters.

    • DiskImageFormat — (String)

      The disk image format.

      Possible values include:
      • "VMDK"
      • "RAW"
      • "VHD"
    • 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 image.

    • S3ExportLocation — (map)

      Information about the destination Amazon S3 bucket. The bucket must exist and grant WRITE and READ_ACP permissions to the Amazon Web Services account vm-import-export@amazon.com.

      • S3Bucketrequired — (String)

        The destination Amazon S3 bucket.

      • S3Prefix — (String)

        The prefix (logical hierarchy) in the bucket.

    • RoleName — (String)

      The name of the role that grants VM Import/Export permission to export images to your Amazon S3 bucket. If this parameter is not specified, the default role is named 'vmimport'.

    • TagSpecifications — (Array<map>)

      The tags to apply to the export image task during creation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • Description — (String)

        A description of the image being exported.

      • DiskImageFormat — (String)

        The disk image format for the exported image.

        Possible values include:
        • "VMDK"
        • "RAW"
        • "VHD"
      • ExportImageTaskId — (String)

        The ID of the export image task.

      • ImageId — (String)

        The ID of the image.

      • RoleName — (String)

        The name of the role that grants VM Import/Export permission to export images to your Amazon S3 bucket.

      • Progress — (String)

        The percent complete of the export image task.

      • S3ExportLocation — (map)

        Information about the destination Amazon S3 bucket.

        • S3Bucket — (String)

          The destination Amazon S3 bucket.

        • S3Prefix — (String)

          The prefix (logical hierarchy) in the bucket.

      • Status — (String)

        The status of the export image task. The possible values are active, completed, deleting, and deleted.

      • StatusMessage — (String)

        The status message for the export image task.

      • Tags — (Array<map>)

        Any tags assigned to the export image 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.

exportTransitGatewayRoutes(params = {}, callback) ⇒ AWS.Request

Exports routes from the specified transit gateway route table to the specified S3 bucket. By default, all routes are exported. Alternatively, you can filter by CIDR range.

The routes are saved to the specified bucket in a JSON file. For more information, see Export Route Tables to Amazon S3 in Transit Gateways.

Service Reference:

Examples:

Calling the exportTransitGatewayRoutes operation

var params = {
  S3Bucket: 'STRING_VALUE', /* required */
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.exportTransitGatewayRoutes(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: {})
    • TransitGatewayRouteTableId — (String)

      The ID of the route table.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • attachment.transit-gateway-attachment-id - The id of the transit gateway attachment.

      • attachment.resource-id - The resource id of the transit gateway attachment.

      • route-search.exact-match - The exact match of the specified filter.

      • route-search.longest-prefix-match - The longest prefix that matches the route.

      • route-search.subnet-of-match - The routes with a subnet that match the specified CIDR filter.

      • route-search.supernet-of-match - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.

      • state - The state of the route (active | blackhole).

      • transit-gateway-route-destination-cidr-block - The CIDR range.

      • type - The type of route (propagated | static).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • S3Bucket — (String)

      The name of the S3 bucket.

    • 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:

      • S3Location — (String)

        The URL of the exported file in Amazon S3. For example, s3://bucket_name/VPCTransitGateway/TransitGatewayRouteTables/file_name.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAssociatedEnclaveCertificateIamRoles(params = {}, callback) ⇒ AWS.Request

Returns the IAM roles that are associated with the specified ACM (ACM) certificate. It also returns the name of the Amazon S3 bucket and the Amazon S3 object key where the certificate, certificate chain, and encrypted private key bundle are stored, and the ARN of the KMS key that's used to encrypt the private key.

Examples:

Calling the getAssociatedEnclaveCertificateIamRoles operation

var params = {
  CertificateArn: 'STRING_VALUE',
  DryRun: true || false
};
ec2.getAssociatedEnclaveCertificateIamRoles(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: {})
    • CertificateArn — (String)

      The ARN of the ACM certificate for which to view the associated IAM roles, encryption keys, and Amazon S3 object information.

    • 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:

      • AssociatedRoles — (Array<map>)

        Information about the associated IAM roles.

        • AssociatedRoleArn — (String)

          The ARN of the associated IAM role.

        • CertificateS3BucketName — (String)

          The name of the Amazon S3 bucket in which the Amazon S3 object is stored.

        • CertificateS3ObjectKey — (String)

          The key of the Amazon S3 object ey where the certificate, certificate chain, and encrypted private key bundle is stored. The object key is formated as follows: role_arn/certificate_arn.

        • EncryptionKmsKeyId — (String)

          The ID of the KMS customer master key (CMK) used to encrypt the private key.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAssociatedIpv6PoolCidrs(params = {}, callback) ⇒ AWS.Request

Gets information about the IPv6 CIDR block associations for a specified IPv6 address pool.

Service Reference:

Examples:

Calling the getAssociatedIpv6PoolCidrs operation

var params = {
  PoolId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getAssociatedIpv6PoolCidrs(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: {})
    • PoolId — (String)

      The ID of the IPv6 address pool.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • 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:

      • Ipv6CidrAssociations — (Array<map>)

        Information about the IPv6 CIDR block associations.

        • Ipv6Cidr — (String)

          The IPv6 CIDR block.

        • AssociatedResource — (String)

          The resource that's associated with the IPv6 CIDR block.

      • 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.

getCapacityReservationUsage(params = {}, callback) ⇒ AWS.Request

Gets usage information about a Capacity Reservation. If the Capacity Reservation is shared, it shows usage information for the Capacity Reservation owner and each Amazon Web Services account that is currently using the shared capacity. If the Capacity Reservation is not shared, it shows only the Capacity Reservation owner's usage.

Service Reference:

Examples:

Calling the getCapacityReservationUsage operation

var params = {
  CapacityReservationId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getCapacityReservationUsage(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: {})
    • CapacityReservationId — (String)

      The ID of the Capacity Reservation.

    • NextToken — (String)

      The token to use 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 receive an error.

      Valid range: Minimum value of 1. Maximum value of 1000.

    • 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:

      • 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.

      • CapacityReservationId — (String)

        The ID of the Capacity Reservation.

      • InstanceType — (String)

        The type of instance for which the Capacity Reservation reserves capacity.

      • TotalInstanceCount — (Integer)

        The number of instances for which the Capacity Reservation reserves capacity.

      • AvailableInstanceCount — (Integer)

        The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

      • State — (String)

        The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

        • active - The Capacity Reservation is active and the capacity is available for your use.

        • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.

        • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.

        • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.

        • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.

        Possible values include:
        • "active"
        • "expired"
        • "cancelled"
        • "pending"
        • "failed"
      • InstanceUsages — (Array<map>)

        Information about the Capacity Reservation usage.

        • AccountId — (String)

          The ID of the Amazon Web Services account that is making use of the Capacity Reservation.

        • UsedInstanceCount — (Integer)

          The number of instances the Amazon Web Services account currently has in the Capacity Reservation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCoipPoolUsage(params = {}, callback) ⇒ AWS.Request

Describes the allocations from the specified customer-owned address pool.

Service Reference:

Examples:

Calling the getCoipPoolUsage operation

var params = {
  PoolId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getCoipPoolUsage(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: {})
    • PoolId — (String)

      The ID of the address pool.

    • Filters — (Array<map>)

      The filters. The following are the possible values:

      • coip-address-usage.allocation-id

      • coip-address-usage.aws-account-id

      • coip-address-usage.aws-service

      • coip-address-usage.co-ip

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • CoipPoolId — (String)

        The ID of the customer-owned address pool.

      • CoipAddressUsages — (Array<map>)

        Information about the address usage.

        • AllocationId — (String)

          The allocation ID of the address.

        • AwsAccountId — (String)

          The Amazon Web Services account ID.

        • AwsService — (String)

          The Amazon Web Services service.

        • CoIp — (String)

          The customer-owned IP address.

      • LocalGatewayRouteTableId — (String)

        The ID of the local gateway route table.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getConsoleOutput(params = {}, callback) ⇒ AWS.Request

Gets the console output for the specified instance. For Linux instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a computer. For Windows instances, the instance console output includes the last three system event log errors.

By default, the console output returns buffered information that was posted shortly after an instance transition state (start, stop, reboot, or terminate). This information is available for at least one hour after the most recent post. Only the most recent 64 KB of console output is available.

You can optionally retrieve the latest serial console output at any time during the instance lifecycle. This option is supported on instance types that use the Nitro hypervisor.

For more information, see Instance console output in the Amazon EC2 User Guide.

Service Reference:

Examples:

To get the console output


/* This example gets the console output for the specified instance. */

 var params = {
  InstanceId: "i-1234567890abcdef0"
 };
 ec2.getConsoleOutput(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    InstanceId: "i-1234567890abcdef0", 
    Output: "...", 
    Timestamp: <Date Representation>
   }
   */
 });

Calling the getConsoleOutput operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Latest: true || false
};
ec2.getConsoleOutput(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: {})
    • InstanceId — (String)

      The ID of the instance.

    • 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.

    • Latest — (Boolean)

      When enabled, retrieves the latest console output for the instance.

      Default: disabled (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:

      • InstanceId — (String)

        The ID of the instance.

      • Output — (String)

        The console output, base64-encoded. If you are using a command line tool, the tool decodes the output for you.

      • Timestamp — (Date)

        The time at which the output was last updated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getConsoleScreenshot(params = {}, callback) ⇒ AWS.Request

Retrieve a JPG-format screenshot of a running instance to help with troubleshooting.

The returned content is Base64-encoded.

Service Reference:

Examples:

Calling the getConsoleScreenshot operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  WakeUp: true || false
};
ec2.getConsoleScreenshot(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.

    • WakeUp — (Boolean)

      When set to true, acts as keystroke input and wakes up an instance that's in standby or "sleep" mode.

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:

      • ImageData — (String)

        The data that comprises the image.

      • InstanceId — (String)

        The ID of the instance.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDefaultCreditSpecification(params = {}, callback) ⇒ AWS.Request

Describes the default credit option for CPU usage of a burstable performance instance family.

For more information, see Burstable performance instances in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the getDefaultCreditSpecification operation

var params = {
  InstanceFamily: t2 | t3 | t3a | t4g, /* required */
  DryRun: true || false
};
ec2.getDefaultCreditSpecification(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.

    • InstanceFamily — (String)

      The instance family.

      Possible values include:
      • "t2"
      • "t3"
      • "t3a"
      • "t4g"

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:

      • InstanceFamilyCreditSpecification — (map)

        The default credit option for CPU usage of the instance family.

        • InstanceFamily — (String)

          The instance family.

          Possible values include:
          • "t2"
          • "t3"
          • "t3a"
          • "t4g"
        • CpuCredits — (String)

          The default credit option for CPU usage of the instance family. Valid values are standard and unlimited.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getEbsDefaultKmsKeyId(params = {}, callback) ⇒ AWS.Request

Describes the default KMS key for EBS encryption by default for your account in this Region. You can change the default KMS key for encryption by default using ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId.

For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the getEbsDefaultKmsKeyId operation

var params = {
  DryRun: true || false
};
ec2.getEbsDefaultKmsKeyId(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:

      • KmsKeyId — (String)

        The Amazon Resource Name (ARN) of the default KMS key for encryption by default.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getEbsEncryptionByDefault(params = {}, callback) ⇒ AWS.Request

Describes whether EBS encryption by default is enabled for your account in the current Region.

For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the getEbsEncryptionByDefault operation

var params = {
  DryRun: true || false
};
ec2.getEbsEncryptionByDefault(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:

      • EbsEncryptionByDefault — (Boolean)

        Indicates whether encryption by default is enabled.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getFlowLogsIntegrationTemplate(params = {}, callback) ⇒ AWS.Request

Generates a CloudFormation template that streamlines and automates the integration of VPC flow logs with Amazon Athena. This make it easier for you to query and gain insights from VPC flow logs data. Based on the information that you provide, we configure resources in the template to do the following:

  • Create a table in Athena that maps fields to a custom log format

  • Create a Lambda function that updates the table with new partitions on a daily, weekly, or monthly basis

  • Create a table partitioned between two timestamps in the past

  • Create a set of named queries in Athena that you can use to get started quickly

Service Reference:

Examples:

Calling the getFlowLogsIntegrationTemplate operation

var params = {
  ConfigDeliveryS3DestinationArn: 'STRING_VALUE', /* required */
  FlowLogId: 'STRING_VALUE', /* required */
  IntegrateServices: { /* required */
    AthenaIntegrations: [
      {
        IntegrationResultS3DestinationArn: 'STRING_VALUE', /* required */
        PartitionLoadFrequency: none | daily | weekly | monthly, /* required */
        PartitionEndDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
        PartitionStartDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
      },
      /* more items */
    ]
  },
  DryRun: true || false
};
ec2.getFlowLogsIntegrationTemplate(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.

    • FlowLogId — (String)

      The ID of the flow log.

    • ConfigDeliveryS3DestinationArn — (String)

      To store the CloudFormation template in Amazon S3, specify the location in Amazon S3.

    • IntegrateServices — (map)

      Information about the service integration.

      • AthenaIntegrations — (Array<map>)

        Information about the integration with Amazon Athena.

        • IntegrationResultS3DestinationArnrequired — (String)

          The location in Amazon S3 to store the generated CloudFormation template.

        • PartitionLoadFrequencyrequired — (String)

          The schedule for adding new partitions to the table.

          Possible values include:
          • "none"
          • "daily"
          • "weekly"
          • "monthly"
        • PartitionStartDate — (Date)

          The start date for the partition.

        • PartitionEndDate — (Date)

          The end date for the partition.

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:

      • Result — (String)

        The generated CloudFormation template.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGroupsForCapacityReservation(params = {}, callback) ⇒ AWS.Request

Lists the resource groups to which a Capacity Reservation has been added.

Service Reference:

Examples:

Calling the getGroupsForCapacityReservation operation

var params = {
  CapacityReservationId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getGroupsForCapacityReservation(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: {})
    • CapacityReservationId — (String)

      The ID of the Capacity Reservation.

    • NextToken — (String)

      The token to use 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 receive an error.

    • 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:

      • 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.

      • CapacityReservationGroups — (Array<map>)

        Information about the resource groups to which the Capacity Reservation has been added.

        • GroupArn — (String)

          The ARN of the resource group.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the resource group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getHostReservationPurchasePreview(params = {}, callback) ⇒ AWS.Request

Preview a reservation purchase with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation.

This is a preview of the PurchaseHostReservation action and does not result in the offering being purchased.

Examples:

Calling the getHostReservationPurchasePreview operation

var params = {
  HostIdSet: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  OfferingId: 'STRING_VALUE' /* required */
};
ec2.getHostReservationPurchasePreview(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: {})
    • HostIdSet — (Array<String>)

      The IDs of the Dedicated Hosts with which the reservation is associated.

    • OfferingId — (String)

      The offering ID of the reservation.

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:

      • CurrencyCode — (String)

        The currency in which the totalUpfrontPrice and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD.

        Possible values include:
        • "USD"
      • Purchase — (Array<map>)

        The purchase information of the Dedicated Host reservation and the Dedicated Hosts associated with it.

        • 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"
        • Duration — (Integer)

          The duration of the reservation's term in seconds.

        • HostIdSet — (Array<String>)

          The IDs of the Dedicated Hosts associated with the reservation.

        • HostReservationId — (String)

          The ID of the reservation.

        • HourlyPrice — (String)

          The hourly price of the reservation per hour.

        • InstanceFamily — (String)

          The instance family on the Dedicated Host that the reservation can be associated with.

        • PaymentOption — (String)

          The payment option for the reservation.

          Possible values include:
          • "AllUpfront"
          • "PartialUpfront"
          • "NoUpfront"
        • UpfrontPrice — (String)

          The upfront price of the reservation.

      • TotalHourlyPrice — (String)

        The potential total hourly price of the reservation per hour.

      • TotalUpfrontPrice — (String)

        The potential total upfront price. This is billed immediately.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getInstanceTypesFromInstanceRequirements(params = {}, callback) ⇒ AWS.Request

Returns a list of instance types with the specified instance attributes. You can use the response to preview the instance types without launching instances. Note that the response does not consider capacity.

When you specify multiple parameters, you get instance types that satisfy all of the specified parameters. If you specify multiple values for a parameter, you get instance types that satisfy any of the specified values.

For more information, see Preview instance types with specified attributes, Attribute-based instance type selection for EC2 Fleet, Attribute-based instance type selection for Spot Fleet, and Spot placement score in the Amazon EC2 User Guide, and Creating an Auto Scaling group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide.

Examples:

Calling the getInstanceTypesFromInstanceRequirements operation

var params = {
  ArchitectureTypes: [ /* required */
    i386 | x86_64 | arm64 | x86_64_mac,
    /* more items */
  ],
  InstanceRequirements: { /* required */
    MemoryMiB: { /* required */
      Min: 'NUMBER_VALUE', /* required */
      Max: 'NUMBER_VALUE'
    },
    VCpuCount: { /* required */
      Min: 'NUMBER_VALUE', /* required */
      Max: 'NUMBER_VALUE'
    },
    AcceleratorCount: {
      Max: 'NUMBER_VALUE',
      Min: 'NUMBER_VALUE'
    },
    AcceleratorManufacturers: [
      nvidia | amd | amazon-web-services | xilinx,
      /* more items */
    ],
    AcceleratorNames: [
      a100 | v100 | k80 | t4 | m60 | radeon-pro-v520 | vu9p,
      /* more items */
    ],
    AcceleratorTotalMemoryMiB: {
      Max: 'NUMBER_VALUE',
      Min: 'NUMBER_VALUE'
    },
    AcceleratorTypes: [
      gpu | fpga | inference,
      /* more items */
    ],
    BareMetal: included | required | excluded,
    BaselineEbsBandwidthMbps: {
      Max: 'NUMBER_VALUE',
      Min: 'NUMBER_VALUE'
    },
    BurstablePerformance: included | required | excluded,
    CpuManufacturers: [
      intel | amd | amazon-web-services,
      /* more items */
    ],
    ExcludedInstanceTypes: [
      'STRING_VALUE',
      /* more items */
    ],
    InstanceGenerations: [
      current | previous,
      /* more items */
    ],
    LocalStorage: included | required | excluded,
    LocalStorageTypes: [
      hdd | ssd,
      /* more items */
    ],
    MemoryGiBPerVCpu: {
      Max: 'NUMBER_VALUE',
      Min: 'NUMBER_VALUE'
    },
    NetworkInterfaceCount: {
      Max: 'NUMBER_VALUE',
      Min: 'NUMBER_VALUE'
    },
    OnDemandMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
    RequireHibernateSupport: true || false,
    SpotMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
    TotalLocalStorageGB: {
      Max: 'NUMBER_VALUE',
      Min: 'NUMBER_VALUE'
    }
  },
  VirtualizationTypes: [ /* required */
    hvm | paravirtual,
    /* more items */
  ],
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getInstanceTypesFromInstanceRequirements(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.

    • ArchitectureTypes — (Array<String>)

      The processor architecture type.

    • VirtualizationTypes — (Array<String>)

      The virtualization type.

    • InstanceRequirements — (map)

      The attributes required for the instance types.

      • VCpuCountrequired — (map)

        The minimum and maximum number of vCPUs.

        • Minrequired — (Integer)

          The minimum number of vCPUs. To specify no minimum limit, specify 0.

        • Max — (Integer)

          The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

      • MemoryMiBrequired — (map)

        The minimum and maximum amount of memory, in MiB.

        • Minrequired — (Integer)

          The minimum amount of memory, in MiB. To specify no minimum limit, specify 0.

        • Max — (Integer)

          The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

      • CpuManufacturers — (Array<String>)

        The CPU manufacturers to include.

        • For instance types with Intel CPUs, specify intel.

        • For instance types with AMD CPUs, specify amd.

        • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

        Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

        Default: Any manufacturer

      • MemoryGiBPerVCpu — (map)

        The minimum and maximum amount of memory per vCPU, in GiB.

        Default: No minimum or maximum limits

        • Min — (Float)

          The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

        • Max — (Float)

          The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

      • ExcludedInstanceTypes — (Array<String>)

        The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

        For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

        Default: No excluded instance types

      • InstanceGenerations — (Array<String>)

        Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

        For current generation instance types, specify current.

        For previous generation instance types, specify previous.

        Default: Current and previous generation instance types

      • SpotMaxPricePercentageOverLowestPrice — (Integer)

        The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

        The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

        To turn off price protection, specify a high value, such as 999999.

        This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

        Default: 100

      • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

        The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

        The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

        To turn off price protection, specify a high value, such as 999999.

        This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

        Default: 20

      • BareMetal — (String)

        Indicates whether bare metal instance types must be included, excluded, or required.

        • To include bare metal instance types, specify included.

        • To require only bare metal instance types, specify required.

        • To exclude bare metal instance types, specify excluded.

        Default: excluded

        Possible values include:
        • "included"
        • "required"
        • "excluded"
      • BurstablePerformance — (String)

        Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

        • To include burstable performance instance types, specify included.

        • To require only burstable performance instance types, specify required.

        • To exclude burstable performance instance types, specify excluded.

        Default: excluded

        Possible values include:
        • "included"
        • "required"
        • "excluded"
      • RequireHibernateSupport — (Boolean)

        Indicates whether instance types must support hibernation for On-Demand Instances.

        This parameter is not supported for GetSpotPlacementScores.

        Default: false

      • NetworkInterfaceCount — (map)

        The minimum and maximum number of network interfaces.

        Default: No minimum or maximum limits

        • Min — (Integer)

          The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

        • Max — (Integer)

          The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

      • LocalStorage — (String)

        Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

        • To include instance types with instance store volumes, specify included.

        • To require only instance types with instance store volumes, specify required.

        • To exclude instance types with instance store volumes, specify excluded.

        Default: included

        Possible values include:
        • "included"
        • "required"
        • "excluded"
      • LocalStorageTypes — (Array<String>)

        The type of local storage that is required.

        • For instance types with hard disk drive (HDD) storage, specify hdd.

        • For instance types with solid state drive (SDD) storage, specify sdd.

        Default: hdd and sdd

      • TotalLocalStorageGB — (map)

        The minimum and maximum amount of total local storage, in GB.

        Default: No minimum or maximum limits

        • Min — (Float)

          The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

        • Max — (Float)

          The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

      • BaselineEbsBandwidthMbps — (map)

        The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

        Default: No minimum or maximum limits

        • Min — (Integer)

          The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

        • Max — (Integer)

          The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

      • AcceleratorTypes — (Array<String>)

        The accelerator types that must be on the instance type.

        • To include instance types with GPU hardware, specify gpu.

        • To include instance types with FPGA hardware, specify fpga.

        • To include instance types with inference hardware, specify inference.

        Default: Any accelerator type

      • AcceleratorCount — (map)

        The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

        To exclude accelerator-enabled instance types, set Max to 0.

        Default: No minimum or maximum limits

        • Min — (Integer)

          The minimum number of accelerators. To specify no minimum limit, omit this parameter.

        • Max — (Integer)

          The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0.

      • AcceleratorManufacturers — (Array<String>)

        Indicates whether instance types must have accelerators by specific manufacturers.

        • For instance types with NVIDIA devices, specify nvidia.

        • For instance types with AMD devices, specify amd.

        • For instance types with Amazon Web Services devices, specify amazon-web-services.

        • For instance types with Xilinx devices, specify xilinx.

        Default: Any manufacturer

      • AcceleratorNames — (Array<String>)

        The accelerators that must be on the instance type.

        • For instance types with NVIDIA A100 GPUs, specify a100.

        • For instance types with NVIDIA V100 GPUs, specify v100.

        • For instance types with NVIDIA K80 GPUs, specify k80.

        • For instance types with NVIDIA T4 GPUs, specify t4.

        • For instance types with NVIDIA M60 GPUs, specify m60.

        • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

        • For instance types with Xilinx VU9P FPGAs, specify vu9p.

        Default: Any accelerator

      • AcceleratorTotalMemoryMiB — (map)

        The minimum and maximum amount of total accelerator memory, in MiB.

        Default: No minimum or maximum limits

        • Min — (Integer)

          The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

        • Max — (Integer)

          The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. Specify a value between 1 and
 1000. The default value is 1000. To retrieve the remaining results, make another call with
 the returned NextToken value.

    • NextToken — (String)

      The token for the next set 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:

      • InstanceTypes — (Array<map>)

        The instance types with the specified instance attributes.

        • InstanceType — (String)

          The matching instance type.

      • NextToken — (String)

        The token for the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getLaunchTemplateData(params = {}, callback) ⇒ AWS.Request

Retrieves the configuration data of the specified instance. You can use this data to create a launch template.

This action calls on other describe actions to get instance information. Depending on your instance configuration, you may need to allow the following actions in your IAM policy: DescribeSpotInstanceRequests, DescribeInstanceCreditSpecifications, DescribeVolumes, DescribeInstanceAttribute, and DescribeElasticGpus. Or, you can allow describe* depending on your instance requirements.

Service Reference:

Examples:

To get the launch template data for an instance


/* This example gets the launch template data for the specified instance. */

 var params = {
  InstanceId: "0123d646e8048babc"
 };
 ec2.getLaunchTemplateData(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    LaunchTemplateData: {
     BlockDeviceMappings: [
        {
       DeviceName: "/dev/xvda", 
       Ebs: {
        DeleteOnTermination: true, 
        Encrypted: false, 
        Iops: 100, 
        SnapshotId: "snap-02594938353ef77d3", 
        VolumeSize: 8, 
        VolumeType: "gp2"
       }
      }
     ], 
     EbsOptimized: false, 
     ImageId: "ami-32cf7b4a", 
     InstanceType: "t2.medium", 
     KeyName: "my-key-pair", 
     Monitoring: {
      Enabled: false
     }, 
     NetworkInterfaces: [
        {
       AssociatePublicIpAddress: false, 
       DeleteOnTermination: true, 
       Description: "", 
       DeviceIndex: 0, 
       Groups: [
          "sg-d14e1bb4"
       ], 
       Ipv6Addresses: [
       ], 
       NetworkInterfaceId: "eni-4338b5a9", 
       PrivateIpAddress: "10.0.3.233", 
       PrivateIpAddresses: [
          {
         Primary: true, 
         PrivateIpAddress: "10.0.3.233"
        }
       ], 
       SubnetId: "subnet-5264e837"
      }
     ], 
     Placement: {
      AvailabilityZone: "us-east-2b", 
      GroupName: "", 
      Tenancy: "default"
     }
    }
   }
   */
 });

Calling the getLaunchTemplateData operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.getLaunchTemplateData(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.

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:

      • LaunchTemplateData — (map)

        The instance data.

        • KernelId — (String)

          The ID of the kernel, if applicable.

        • EbsOptimized — (Boolean)

          Indicates whether the instance is optimized for Amazon EBS I/O.

        • IamInstanceProfile — (map)

          The IAM instance profile.

          • Arn — (String)

            The Amazon Resource Name (ARN) of the instance profile.

          • Name — (String)

            The name of the instance profile.

        • BlockDeviceMappings — (Array<map>)

          The block device mappings.

          • DeviceName — (String)

            The device name.

          • VirtualName — (String)

            The virtual device name (ephemeralN).

          • Ebs — (map)

            Information about the block device for an EBS volume.

            • Encrypted — (Boolean)

              Indicates whether the EBS volume is encrypted.

            • DeleteOnTermination — (Boolean)

              Indicates whether the EBS volume is deleted on instance termination.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS) that the volume supports.

            • KmsKeyId — (String)

              The ARN of the Key Management Service (KMS) CMK used for encryption.

            • SnapshotId — (String)

              The ID of the snapshot.

            • VolumeSize — (Integer)

              The size of the volume, in GiB.

            • VolumeType — (String)

              The volume type.

              Possible values include:
              • "standard"
              • "io1"
              • "io2"
              • "gp2"
              • "sc1"
              • "st1"
              • "gp3"
            • Throughput — (Integer)

              The throughput that the volume supports, in MiB/s.

          • NoDevice — (String)

            To omit the device from the block device mapping, specify an empty string.

        • NetworkInterfaces — (Array<map>)

          The network interfaces.

          • AssociateCarrierIpAddress — (Boolean)

            Indicates whether to associate a Carrier IP address with eth0 for a new network interface.

            Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Wavelength Developer Guide.

          • AssociatePublicIpAddress — (Boolean)

            Indicates whether to associate a public IPv4 address with eth0 for a new network interface.

          • DeleteOnTermination — (Boolean)

            Indicates whether the network interface is deleted when the instance is terminated.

          • Description — (String)

            A description for the network interface.

          • DeviceIndex — (Integer)

            The device index for the network interface attachment.

          • Groups — (Array<String>)

            The IDs of one or more security groups.

          • InterfaceType — (String)

            The type of network interface.

          • Ipv6AddressCount — (Integer)

            The number of IPv6 addresses for the network interface.

          • Ipv6Addresses — (Array<map>)

            The IPv6 addresses for the network interface.

            • Ipv6Address — (String)

              The IPv6 address.

          • NetworkInterfaceId — (String)

            The ID of the network interface.

          • PrivateIpAddress — (String)

            The primary private IPv4 address of the network interface.

          • PrivateIpAddresses — (Array<map>)

            One or more private IPv4 addresses.

            • Primary — (Boolean)

              Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

            • PrivateIpAddress — (String)

              The private IPv4 addresses.

          • SecondaryPrivateIpAddressCount — (Integer)

            The number of secondary private IPv4 addresses for the network interface.

          • SubnetId — (String)

            The ID of the subnet for the network interface.

          • NetworkCardIndex — (Integer)

            The index of the network card.

          • Ipv4Prefixes — (Array<map>)

            One or more IPv4 prefixes assigned to the network interface.

            • Ipv4Prefix — (String)

              One or more IPv4 delegated prefixes assigned to the network interface.

          • Ipv4PrefixCount — (Integer)

            The number of IPv4 prefixes that Amazon Web Services automatically assigned to the network interface.

          • Ipv6Prefixes — (Array<map>)

            One or more IPv6 prefixes assigned to the network interface.

            • Ipv6Prefix — (String)

              One or more IPv6 delegated prefixes assigned to the network interface.

          • Ipv6PrefixCount — (Integer)

            The number of IPv6 prefixes that Amazon Web Services automatically assigned to the network interface.

        • ImageId — (String)

          The ID of the AMI that was used to launch the instance.

        • InstanceType — (String)

          The instance type.

          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • KeyName — (String)

          The name of the key pair.

        • Monitoring — (map)

          The monitoring for the instance.

          • Enabled — (Boolean)

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        • Placement — (map)

          The placement of the instance.

          • AvailabilityZone — (String)

            The Availability Zone of the instance.

          • Affinity — (String)

            The affinity setting for the instance on the Dedicated Host.

          • GroupName — (String)

            The name of the placement group for the instance.

          • HostId — (String)

            The ID of the Dedicated Host for the instance.

          • 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.

            Possible values include:
            • "default"
            • "dedicated"
            • "host"
          • SpreadDomain — (String)

            Reserved for future use.

          • HostResourceGroupArn — (String)

            The ARN of the host resource group in which to launch the instances.

          • PartitionNumber — (Integer)

            The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.

        • RamDiskId — (String)

          The ID of the RAM disk, if applicable.

        • DisableApiTermination — (Boolean)

          If set to true, indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.

        • InstanceInitiatedShutdownBehavior — (String)

          Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

          Possible values include:
          • "stop"
          • "terminate"
        • UserData — (String)

          The user data for the instance.

        • TagSpecifications — (Array<map>)

          The tags.

          • ResourceType — (String)

            The type of resource.

            Possible values include:
            • "capacity-reservation"
            • "client-vpn-endpoint"
            • "customer-gateway"
            • "carrier-gateway"
            • "dedicated-host"
            • "dhcp-options"
            • "egress-only-internet-gateway"
            • "elastic-ip"
            • "elastic-gpu"
            • "export-image-task"
            • "export-instance-task"
            • "fleet"
            • "fpga-image"
            • "host-reservation"
            • "image"
            • "import-image-task"
            • "import-snapshot-task"
            • "instance"
            • "instance-event-window"
            • "internet-gateway"
            • "ipv4pool-ec2"
            • "ipv6pool-ec2"
            • "key-pair"
            • "launch-template"
            • "local-gateway"
            • "local-gateway-route-table"
            • "local-gateway-virtual-interface"
            • "local-gateway-virtual-interface-group"
            • "local-gateway-route-table-vpc-association"
            • "local-gateway-route-table-virtual-interface-group-association"
            • "natgateway"
            • "network-acl"
            • "network-interface"
            • "network-insights-analysis"
            • "network-insights-path"
            • "placement-group"
            • "prefix-list"
            • "replace-root-volume-task"
            • "reserved-instances"
            • "route-table"
            • "security-group"
            • "security-group-rule"
            • "snapshot"
            • "spot-fleet-request"
            • "spot-instances-request"
            • "subnet"
            • "traffic-mirror-filter"
            • "traffic-mirror-session"
            • "traffic-mirror-target"
            • "transit-gateway"
            • "transit-gateway-attachment"
            • "transit-gateway-connect-peer"
            • "transit-gateway-multicast-domain"
            • "transit-gateway-route-table"
            • "volume"
            • "vpc"
            • "vpc-endpoint"
            • "vpc-endpoint-service"
            • "vpc-peering-connection"
            • "vpn-connection"
            • "vpn-gateway"
            • "vpc-flow-log"
          • Tags — (Array<map>)

            The tags for 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.

        • ElasticGpuSpecifications — (Array<map>)

          The elastic GPU specification.

          • Type — (String)

            The elastic GPU type.

        • ElasticInferenceAccelerators — (Array<map>)

          The elastic inference accelerator for the instance.

          • Type — (String)

            The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

          • Count — (Integer)

            The number of elastic inference accelerators to attach to the instance.

            Default: 1

        • SecurityGroupIds — (Array<String>)

          The security group IDs.

        • SecurityGroups — (Array<String>)

          The security group names.

        • InstanceMarketOptions — (map)

          The market (purchasing) option for the instances.

          • MarketType — (String)

            The market type.

            Possible values include:
            • "spot"
          • SpotOptions — (map)

            The options for Spot Instances.

            • MaxPrice — (String)

              The maximum hourly price you're willing to pay for the Spot Instances.

            • SpotInstanceType — (String)

              The Spot Instance request type.

              Possible values include:
              • "one-time"
              • "persistent"
            • BlockDurationMinutes — (Integer)

              The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).

            • ValidUntil — (Date)

              The end date of the request. For a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

            • InstanceInterruptionBehavior — (String)

              The behavior when a Spot Instance is interrupted.

              Possible values include:
              • "hibernate"
              • "stop"
              • "terminate"
        • CreditSpecification — (map)

          The credit option for CPU usage of the instance.

          • CpuCredits — (String)

            The credit option for CPU usage of a T2, T3, or T3a instance. Valid values are standard and unlimited.

        • CpuOptions — (map)

          The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon Elastic Compute Cloud User Guide.

          • CoreCount — (Integer)

            The number of CPU cores for the instance.

          • ThreadsPerCore — (Integer)

            The number of threads per CPU core.

        • CapacityReservationSpecification — (map)

          Information about the Capacity Reservation targeting option.

          • CapacityReservationPreference — (String)

            Indicates the instance's Capacity Reservation preferences. Possible preferences include:

            • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

            • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

            Possible values include:
            • "open"
            • "none"
          • CapacityReservationTarget — (map)

            Information about the target Capacity Reservation or Capacity Reservation group.

            • CapacityReservationId — (String)

              The ID of the targeted Capacity Reservation.

            • CapacityReservationResourceGroupArn — (String)

              The ARN of the targeted Capacity Reservation group.

        • LicenseSpecifications — (Array<map>)

          The license configurations.

          • LicenseConfigurationArn — (String)

            The Amazon Resource Name (ARN) of the license configuration.

        • HibernationOptions — (map)

          Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide.

          • Configured — (Boolean)

            If this parameter is set to true, the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

        • MetadataOptions — (map)

          The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide.

          • State — (String)

            The state of the metadata option changes.

            pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

            applied - The metadata options have been successfully applied on the instance.

            Possible values include:
            • "pending"
            • "applied"
          • HttpTokens — (String)

            The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

            If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

            If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

            Possible values include:
            • "optional"
            • "required"
          • HttpPutResponseHopLimit — (Integer)

            The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

            Default: 1

            Possible values: Integers from 1 to 64

          • HttpEndpoint — (String)

            This parameter enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled.

            Note: If you specify a value of disabled, you will not be able to access your instance metadata.
            Possible values include:
            • "disabled"
            • "enabled"
          • HttpProtocolIpv6 — (String)

            Enables or disables the IPv6 endpoint for the instance metadata service.

            Default: disabled

            Possible values include:
            • "disabled"
            • "enabled"
        • EnclaveOptions — (map)

          Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

          • Enabled — (Boolean)

            If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

        • InstanceRequirements — (map)

          The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.

          If you specify InstanceRequirements, you can't specify InstanceTypes.

          • VCpuCount — (map)

            The minimum and maximum number of vCPUs.

            • Min — (Integer)

              The minimum number of vCPUs. If the value is 0, there is no minimum limit.

            • Max — (Integer)

              The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

          • MemoryMiB — (map)

            The minimum and maximum amount of memory, in MiB.

            • Min — (Integer)

              The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • CpuManufacturers — (Array<String>)

            The CPU manufacturers to include.

            • For instance types with Intel CPUs, specify intel.

            • For instance types with AMD CPUs, specify amd.

            • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

            Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

            Default: Any manufacturer

          • MemoryGiBPerVCpu — (map)

            The minimum and maximum amount of memory per vCPU, in GiB.

            Default: No minimum or maximum limits

            • Min — (Float)

              The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

            • Max — (Float)

              The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

          • ExcludedInstanceTypes — (Array<String>)

            The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

            For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

            Default: No excluded instance types

          • InstanceGenerations — (Array<String>)

            Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

            For current generation instance types, specify current.

            For previous generation instance types, specify previous.

            Default: Current and previous generation instance types

          • SpotMaxPricePercentageOverLowestPrice — (Integer)

            The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999.

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

            Default: 100

          • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

            The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999.

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

            Default: 20

          • BareMetal — (String)

            Indicates whether bare metal instance types must be included, excluded, or required.

            • To include bare metal instance types, specify included.

            • To require only bare metal instance types, specify required.

            • To exclude bare metal instance types, specify excluded.

            Default: excluded

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • BurstablePerformance — (String)

            Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

            • To include burstable performance instance types, specify included.

            • To require only burstable performance instance types, specify required.

            • To exclude burstable performance instance types, specify excluded.

            Default: excluded

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • RequireHibernateSupport — (Boolean)

            Indicates whether instance types must support hibernation for On-Demand Instances.

            This parameter is not supported for GetSpotPlacementScores.

            Default: false

          • NetworkInterfaceCount — (map)

            The minimum and maximum number of network interfaces.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

          • LocalStorage — (String)

            Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

            • To include instance types with instance store volumes, specify included.

            • To require only instance types with instance store volumes, specify required.

            • To exclude instance types with instance store volumes, specify excluded.

            Default: included

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • LocalStorageTypes — (Array<String>)

            The type of local storage that is required.

            • For instance types with hard disk drive (HDD) storage, specify hdd.

            • For instance types with solid state drive (SDD) storage, specify sdd.

            Default: hdd and sdd

          • TotalLocalStorageGB — (map)

            The minimum and maximum amount of total local storage, in GB.

            Default: No minimum or maximum limits

            • Min — (Float)

              The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

            • Max — (Float)

              The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

          • BaselineEbsBandwidthMbps — (map)

            The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

          • AcceleratorTypes — (Array<String>)

            The accelerator types that must be on the instance type.

            • For instance types with GPU accelerators, specify gpu.

            • For instance types with FPGA accelerators, specify fpga.

            • For instance types with inference accelerators, specify inference.

            Default: Any accelerator type

          • AcceleratorCount — (map)

            The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

            To exclude accelerator-enabled instance types, set Max to 0.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

          • AcceleratorManufacturers — (Array<String>)

            Indicates whether instance types must have accelerators by specific manufacturers.

            • For instance types with NVIDIA devices, specify nvidia.

            • For instance types with AMD devices, specify amd.

            • For instance types with Amazon Web Services devices, specify amazon-web-services.

            • For instance types with Xilinx devices, specify xilinx.

            Default: Any manufacturer

          • AcceleratorNames — (Array<String>)

            The accelerators that must be on the instance type.

            • For instance types with NVIDIA A100 GPUs, specify a100.

            • For instance types with NVIDIA V100 GPUs, specify v100.

            • For instance types with NVIDIA K80 GPUs, specify k80.

            • For instance types with NVIDIA T4 GPUs, specify t4.

            • For instance types with NVIDIA M60 GPUs, specify m60.

            • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

            • For instance types with Xilinx VU9P FPGAs, specify vu9p.

            Default: Any accelerator

          • AcceleratorTotalMemoryMiB — (map)

            The minimum and maximum amount of total accelerator memory, in MiB.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getManagedPrefixListAssociations(params = {}, callback) ⇒ AWS.Request

Gets information about the resources that are associated with the specified managed prefix list.

Examples:

Calling the getManagedPrefixListAssociations operation

var params = {
  PrefixListId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getManagedPrefixListAssociations(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.

    • PrefixListId — (String)

      The ID of the prefix list.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for 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:

      • PrefixListAssociations — (Array<map>)

        Information about the associations.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceOwner — (String)

          The owner of the resource.

      • 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.

getManagedPrefixListEntries(params = {}, callback) ⇒ AWS.Request

Gets information about the entries for a specified managed prefix list.

Service Reference:

Examples:

Calling the getManagedPrefixListEntries operation

var params = {
  PrefixListId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TargetVersion: 'NUMBER_VALUE'
};
ec2.getManagedPrefixListEntries(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.

    • PrefixListId — (String)

      The ID of the prefix list.

    • TargetVersion — (Integer)

      The version of the prefix list for which to return the entries. The default is the current version.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for 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:

      • Entries — (Array<map>)

        Information about the prefix list entries.

        • Cidr — (String)

          The CIDR block.

        • Description — (String)

          The description.

      • 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.

getPasswordData(params = {}, callback) ⇒ AWS.Request

Retrieves the encrypted administrator password for a running Windows instance.

The Windows password is generated at boot by the EC2Config service or EC2Launch scripts (Windows Server 2016 and later). This usually only happens the first time an instance is launched. For more information, see EC2Config and EC2Launch in the Amazon EC2 User Guide.

For the EC2Config service, the password is not generated for rebundled AMIs unless Ec2SetPassword is enabled before bundling.

The password is encrypted using the key pair that you specified when you launched the instance. You must provide the corresponding key pair file.

When you launch an instance, password generation and encryption may take a few minutes. If you try to retrieve the password before it's available, the output returns an empty string. We recommend that you wait up to 15 minutes after launching an instance before trying to retrieve the generated password.

Service Reference:

Examples:

Calling the getPasswordData operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.getPasswordData(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: {})
    • InstanceId — (String)

      The ID of the Windows instance.

    • 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:

      • InstanceId — (String)

        The ID of the Windows instance.

      • PasswordData — (String)

        The password of the instance. Returns an empty string if the password is not available.

      • Timestamp — (Date)

        The time the data was last updated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

getReservedInstancesExchangeQuote(params = {}, callback) ⇒ AWS.Request

Returns a quote and exchange information for exchanging one or more specified Convertible Reserved Instances for a new Convertible Reserved Instance. If the exchange cannot be performed, the reason is returned in the response. Use AcceptReservedInstancesExchangeQuote to perform the exchange.

Examples:

Calling the getReservedInstancesExchangeQuote operation

var params = {
  ReservedInstanceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  TargetConfigurations: [
    {
      OfferingId: 'STRING_VALUE', /* required */
      InstanceCount: 'NUMBER_VALUE'
    },
    /* more items */
  ]
};
ec2.getReservedInstancesExchangeQuote(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.

    • ReservedInstanceIds — (Array<String>)

      The IDs of the Convertible Reserved Instances to exchange.

    • TargetConfigurations — (Array<map>)

      The configuration of the target Convertible Reserved Instance to exchange for your current Convertible Reserved Instances.

      • InstanceCount — (Integer)

        The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request

      • OfferingIdrequired — (String)

        The Convertible Reserved Instance offering 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:

      • CurrencyCode — (String)

        The currency of the transaction.

      • IsValidExchange — (Boolean)

        If true, the exchange is valid. If false, the exchange cannot be completed.

      • OutputReservedInstancesWillExpireAt — (Date)

        The new end date of the reservation term.

      • PaymentDue — (String)

        The total true upfront charge for the exchange.

      • ReservedInstanceValueRollup — (map)

        The cost associated with the Reserved Instance.

        • HourlyPrice — (String)

          The hourly rate of the reservation.

        • RemainingTotalValue — (String)

          The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

        • RemainingUpfrontValue — (String)

          The remaining upfront cost of the reservation.

      • ReservedInstanceValueSet — (Array<map>)

        The configuration of your Convertible Reserved Instances.

        • ReservationValue — (map)

          The total value of the Convertible Reserved Instance that you are exchanging.

          • HourlyPrice — (String)

            The hourly rate of the reservation.

          • RemainingTotalValue — (String)

            The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

          • RemainingUpfrontValue — (String)

            The remaining upfront cost of the reservation.

        • ReservedInstanceId — (String)

          The ID of the Convertible Reserved Instance that you are exchanging.

      • TargetConfigurationValueRollup — (map)

        The cost associated with the Reserved Instance.

        • HourlyPrice — (String)

          The hourly rate of the reservation.

        • RemainingTotalValue — (String)

          The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

        • RemainingUpfrontValue — (String)

          The remaining upfront cost of the reservation.

      • TargetConfigurationValueSet — (Array<map>)

        The values of the target Convertible Reserved Instances.

        • ReservationValue — (map)

          The total value of the Convertible Reserved Instances that make up the exchange. This is the sum of the list value, remaining upfront price, and additional upfront cost of the exchange.

          • HourlyPrice — (String)

            The hourly rate of the reservation.

          • RemainingTotalValue — (String)

            The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

          • RemainingUpfrontValue — (String)

            The remaining upfront cost of the reservation.

        • TargetConfiguration — (map)

          The configuration of the Convertible Reserved Instances that make up the exchange.

          • InstanceCount — (Integer)

            The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request

          • OfferingId — (String)

            The ID of the Convertible Reserved Instance offering.

      • ValidationFailureReason — (String)

        Describes the reason why the exchange cannot be completed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSerialConsoleAccessStatus(params = {}, callback) ⇒ AWS.Request

Retrieves the access status of your account to the EC2 serial console of all instances. By default, access to the EC2 serial console is disabled for your account. For more information, see Manage account access to the EC2 serial console in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the getSerialConsoleAccessStatus operation

var params = {
  DryRun: true || false
};
ec2.getSerialConsoleAccessStatus(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:

      • SerialConsoleAccessEnabled — (Boolean)

        If true, access to the EC2 serial console of all instances is enabled for your account. If false, access to the EC2 serial console of all instances is disabled for your account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSpotPlacementScores(params = {}, callback) ⇒ AWS.Request

Calculates the Spot placement score for a Region or Availability Zone based on the specified target capacity and compute requirements.

You can specify your compute requirements either by using InstanceRequirementsWithMetadata and letting Amazon EC2 choose the optimal instance types to fulfill your Spot request, or you can specify the instance types by using InstanceTypes.

For more information, see Spot placement score in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the getSpotPlacementScores operation

var params = {
  TargetCapacity: 'NUMBER_VALUE', /* required */
  DryRun: true || false,
  InstanceRequirementsWithMetadata: {
    ArchitectureTypes: [
      i386 | x86_64 | arm64 | x86_64_mac,
      /* more items */
    ],
    InstanceRequirements: {
      MemoryMiB: { /* required */
        Min: 'NUMBER_VALUE', /* required */
        Max: 'NUMBER_VALUE'
      },
      VCpuCount: { /* required */
        Min: 'NUMBER_VALUE', /* required */
        Max: 'NUMBER_VALUE'
      },
      AcceleratorCount: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      AcceleratorManufacturers: [
        nvidia | amd | amazon-web-services | xilinx,
        /* more items */
      ],
      AcceleratorNames: [
        a100 | v100 | k80 | t4 | m60 | radeon-pro-v520 | vu9p,
        /* more items */
      ],
      AcceleratorTotalMemoryMiB: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      AcceleratorTypes: [
        gpu | fpga | inference,
        /* more items */
      ],
      BareMetal: included | required | excluded,
      BaselineEbsBandwidthMbps: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      BurstablePerformance: included | required | excluded,
      CpuManufacturers: [
        intel | amd | amazon-web-services,
        /* more items */
      ],
      ExcludedInstanceTypes: [
        'STRING_VALUE',
        /* more items */
      ],
      InstanceGenerations: [
        current | previous,
        /* more items */
      ],
      LocalStorage: included | required | excluded,
      LocalStorageTypes: [
        hdd | ssd,
        /* more items */
      ],
      MemoryGiBPerVCpu: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      NetworkInterfaceCount: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      },
      OnDemandMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
      RequireHibernateSupport: true || false,
      SpotMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
      TotalLocalStorageGB: {
        Max: 'NUMBER_VALUE',
        Min: 'NUMBER_VALUE'
      }
    },
    VirtualizationTypes: [
      hvm | paravirtual,
      /* more items */
    ]
  },
  InstanceTypes: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  RegionNames: [
    'STRING_VALUE',
    /* more items */
  ],
  SingleAvailabilityZone: true || false,
  TargetCapacityUnitType: vcpu | memory-mib | units
};
ec2.getSpotPlacementScores(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: {})
    • InstanceTypes — (Array<String>)

      The instance types. We recommend that you specify at least three instance types. If you specify one or two instance types, or specify variations of a single instance type (for example, an m3.xlarge with and without instance storage), the returned placement score will always be low.

      If you specify InstanceTypes, you can't specify InstanceRequirementsWithMetadata.

    • TargetCapacity — (Integer)

      The target capacity.

    • TargetCapacityUnitType — (String)

      The unit for the target capacity.

      Default: units (translates to number of instances)

      Possible values include:
      • "vcpu"
      • "memory-mib"
      • "units"
    • SingleAvailabilityZone — (Boolean)

      Specify true so that the response returns a list of scored Availability Zones. Otherwise, the response returns a list of scored Regions.

      A list of scored Availability Zones is useful if you want to launch all of your Spot capacity into a single Availability Zone.

    • RegionNames — (Array<String>)

      The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example, us-east-1.

    • InstanceRequirementsWithMetadata — (map)

      The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

      If you specify InstanceRequirementsWithMetadata, you can't specify InstanceTypes.

      • ArchitectureTypes — (Array<String>)

        The architecture type.

      • VirtualizationTypes — (Array<String>)

        The virtualization type.

      • InstanceRequirements — (map)

        The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

        • VCpuCountrequired — (map)

          The minimum and maximum number of vCPUs.

          • Minrequired — (Integer)

            The minimum number of vCPUs. To specify no minimum limit, specify 0.

          • Max — (Integer)

            The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

        • MemoryMiBrequired — (map)

          The minimum and maximum amount of memory, in MiB.

          • Minrequired — (Integer)

            The minimum amount of memory, in MiB. To specify no minimum limit, specify 0.

          • Max — (Integer)

            The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

        • CpuManufacturers — (Array<String>)

          The CPU manufacturers to include.

          • For instance types with Intel CPUs, specify intel.

          • For instance types with AMD CPUs, specify amd.

          • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

          Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

          Default: Any manufacturer

        • MemoryGiBPerVCpu — (map)

          The minimum and maximum amount of memory per vCPU, in GiB.

          Default: No minimum or maximum limits

          • Min — (Float)

            The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

          • Max — (Float)

            The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

        • ExcludedInstanceTypes — (Array<String>)

          The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

          For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

          Default: No excluded instance types

        • InstanceGenerations — (Array<String>)

          Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

          For current generation instance types, specify current.

          For previous generation instance types, specify previous.

          Default: Current and previous generation instance types

        • SpotMaxPricePercentageOverLowestPrice — (Integer)

          The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

          The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

          To turn off price protection, specify a high value, such as 999999.

          This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

          Default: 100

        • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

          The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

          The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

          To turn off price protection, specify a high value, such as 999999.

          This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

          Default: 20

        • BareMetal — (String)

          Indicates whether bare metal instance types must be included, excluded, or required.

          • To include bare metal instance types, specify included.

          • To require only bare metal instance types, specify required.

          • To exclude bare metal instance types, specify excluded.

          Default: excluded

          Possible values include:
          • "included"
          • "required"
          • "excluded"
        • BurstablePerformance — (String)

          Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

          • To include burstable performance instance types, specify included.

          • To require only burstable performance instance types, specify required.

          • To exclude burstable performance instance types, specify excluded.

          Default: excluded

          Possible values include:
          • "included"
          • "required"
          • "excluded"
        • RequireHibernateSupport — (Boolean)

          Indicates whether instance types must support hibernation for On-Demand Instances.

          This parameter is not supported for GetSpotPlacementScores.

          Default: false

        • NetworkInterfaceCount — (map)

          The minimum and maximum number of network interfaces.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

        • LocalStorage — (String)

          Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

          • To include instance types with instance store volumes, specify included.

          • To require only instance types with instance store volumes, specify required.

          • To exclude instance types with instance store volumes, specify excluded.

          Default: included

          Possible values include:
          • "included"
          • "required"
          • "excluded"
        • LocalStorageTypes — (Array<String>)

          The type of local storage that is required.

          • For instance types with hard disk drive (HDD) storage, specify hdd.

          • For instance types with solid state drive (SDD) storage, specify sdd.

          Default: hdd and sdd

        • TotalLocalStorageGB — (map)

          The minimum and maximum amount of total local storage, in GB.

          Default: No minimum or maximum limits

          • Min — (Float)

            The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

          • Max — (Float)

            The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

        • BaselineEbsBandwidthMbps — (map)

          The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

        • AcceleratorTypes — (Array<String>)

          The accelerator types that must be on the instance type.

          • To include instance types with GPU hardware, specify gpu.

          • To include instance types with FPGA hardware, specify fpga.

          • To include instance types with inference hardware, specify inference.

          Default: Any accelerator type

        • AcceleratorCount — (map)

          The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

          To exclude accelerator-enabled instance types, set Max to 0.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum number of accelerators. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0.

        • AcceleratorManufacturers — (Array<String>)

          Indicates whether instance types must have accelerators by specific manufacturers.

          • For instance types with NVIDIA devices, specify nvidia.

          • For instance types with AMD devices, specify amd.

          • For instance types with Amazon Web Services devices, specify amazon-web-services.

          • For instance types with Xilinx devices, specify xilinx.

          Default: Any manufacturer

        • AcceleratorNames — (Array<String>)

          The accelerators that must be on the instance type.

          • For instance types with NVIDIA A100 GPUs, specify a100.

          • For instance types with NVIDIA V100 GPUs, specify v100.

          • For instance types with NVIDIA K80 GPUs, specify k80.

          • For instance types with NVIDIA T4 GPUs, specify t4.

          • For instance types with NVIDIA M60 GPUs, specify m60.

          • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

          • For instance types with Xilinx VU9P FPGAs, specify vu9p.

          Default: Any accelerator

        • AcceleratorTotalMemoryMiB — (map)

          The minimum and maximum amount of total accelerator memory, in MiB.

          Default: No minimum or maximum limits

          • Min — (Integer)

            The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

          • Max — (Integer)

            The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

    • 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.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. Specify a value between 1 and
 1000. The default value is 1000. To retrieve the remaining results, make another call with
 the returned NextToken value.

    • NextToken — (String)

      The token for the next set 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:

      • SpotPlacementScores — (Array<map>)

        The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale from 1 to 10. Each score
 reflects how likely it is that each Region or Availability Zone will succeed at fulfilling the specified target capacity
 at the time of the Spot placement score request. A score of 10 means that your Spot capacity request is highly likely to succeed in that Region or Availability Zone.

        If you request a Spot placement score for Regions, a high score assumes that your fleet request will be configured to use all Availability Zones and the capacity-optimized allocation strategy. If you request a Spot placement score for Availability Zones, a high score assumes that your fleet request will be configured to use a single Availability Zone and the capacity-optimized allocation strategy.

        Different
 Regions or Availability Zones might return the same score.

        Note: The Spot placement score serves as a recommendation only. No score guarantees that your Spot request will be fully or partially fulfilled.
        • Region — (String)

          The Region.

        • AvailabilityZoneId — (String)

          The Availability Zone.

        • Score — (Integer)

          The placement score, on a scale from 1 to 10. A score of 10 indicates that your Spot request is highly likely to succeed in this Region or Availability Zone. A score of 1 indicates that your Spot request is not likely to succeed.

      • NextToken — (String)

        The token for the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSubnetCidrReservations(params = {}, callback) ⇒ AWS.Request

Gets information about the subnet CIDR reservations.

Service Reference:

Examples:

Calling the getSubnetCidrReservations operation

var params = {
  SubnetId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getSubnetCidrReservations(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: {})
    • Filters — (Array<map>)

      One or more filters.

      • reservationType - The type of reservation (prefix | explicit).

      • subnet-id - The ID of the subnet.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • SubnetId — (String)

      The ID of the subnet.

    • 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.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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:

      • SubnetIpv4CidrReservations — (Array<map>)

        Information about the IPv4 subnet CIDR reservations.

        • SubnetCidrReservationId — (String)

          The ID of the subnet CIDR reservation.

        • SubnetId — (String)

          The ID of the subnet.

        • Cidr — (String)

          The CIDR that has been reserved.

        • ReservationType — (String)

          The type of reservation.

          Possible values include:
          • "prefix"
          • "explicit"
        • OwnerId — (String)

          The ID of the account that owns the subnet CIDR reservation.

        • Description — (String)

          The description assigned to the subnet CIDR reservation.

        • Tags — (Array<map>)

          The tags assigned to the subnet CIDR reservation.

          • 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.

      • SubnetIpv6CidrReservations — (Array<map>)

        Information about the IPv6 subnet CIDR reservations.

        • SubnetCidrReservationId — (String)

          The ID of the subnet CIDR reservation.

        • SubnetId — (String)

          The ID of the subnet.

        • Cidr — (String)

          The CIDR that has been reserved.

        • ReservationType — (String)

          The type of reservation.

          Possible values include:
          • "prefix"
          • "explicit"
        • OwnerId — (String)

          The ID of the account that owns the subnet CIDR reservation.

        • Description — (String)

          The description assigned to the subnet CIDR reservation.

        • Tags — (Array<map>)

          The tags assigned to the subnet CIDR reservation.

          • 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.

getTransitGatewayAttachmentPropagations(params = {}, callback) ⇒ AWS.Request

Lists the route tables to which the specified resource attachment propagates routes.

Examples:

Calling the getTransitGatewayAttachmentPropagations operation

var params = {
  TransitGatewayAttachmentId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getTransitGatewayAttachmentPropagations(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: {})
    • TransitGatewayAttachmentId — (String)

      The ID of the attachment.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • transit-gateway-route-table-id - The ID of the transit gateway route table.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • TransitGatewayAttachmentPropagations — (Array<map>)

        Information about the propagation route tables.

        • TransitGatewayRouteTableId — (String)

          The ID of the propagation route table.

        • State — (String)

          The state of the propagation route table.

          Possible values include:
          • "enabling"
          • "enabled"
          • "disabling"
          • "disabled"
      • 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.

getTransitGatewayMulticastDomainAssociations(params = {}, callback) ⇒ AWS.Request

Gets information about the associations for the transit gateway multicast domain.

Examples:

Calling the getTransitGatewayMulticastDomainAssociations operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TransitGatewayMulticastDomainId: 'STRING_VALUE'
};
ec2.getTransitGatewayMulticastDomainAssociations(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: {})
    • TransitGatewayMulticastDomainId — (String)

      The ID of the transit gateway multicast domain.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • resource-id - The ID of the resource.

      • resource-type - The type of resource. The valid value is: vpc.

      • state - The state of the subnet association. Valid values are associated | associating | disassociated | disassociating.

      • subnet-id - The ID of the subnet.

      • transit-gateway-attachment-id - The id of the transit gateway attachment.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • MulticastDomainAssociations — (Array<map>)

        Information about the multicast domain associations.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway attachment.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The type of resource, for example a VPC attachment.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • ResourceOwnerId — (String)

          The ID of the Amazon Web Services account that owns the transit gateway multicast domain association resource.

        • Subnet — (map)

          The subnet associated with the transit gateway multicast domain.

          • SubnetId — (String)

            The ID of the subnet.

          • State — (String)

            The state of the subnet association.

            Possible values include:
            • "pendingAcceptance"
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
            • "rejected"
            • "failed"
      • 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.

getTransitGatewayPrefixListReferences(params = {}, callback) ⇒ AWS.Request

Gets information about the prefix list references in a specified transit gateway route table.

Examples:

Calling the getTransitGatewayPrefixListReferences operation

var params = {
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getTransitGatewayPrefixListReferences(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: {})
    • TransitGatewayRouteTableId — (String)

      The ID of the transit gateway route table.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • attachment.resource-id - The ID of the resource for the attachment.

      • attachment.resource-type - The type of resource for the attachment. Valid values are vpc | vpn | direct-connect-gateway | peering.

      • attachment.transit-gateway-attachment-id - The ID of the attachment.

      • is-blackhole - Whether traffic matching the route is blocked (true | false).

      • prefix-list-id - The ID of the prefix list.

      • prefix-list-owner-id - The ID of the owner of the prefix list.

      • state - The state of the prefix list reference (pending | available | modifying | deleting).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • TransitGatewayPrefixListReferences — (Array<map>)

        Information about the prefix list references.

        • TransitGatewayRouteTableId — (String)

          The ID of the transit gateway route table.

        • PrefixListId — (String)

          The ID of the prefix list.

        • PrefixListOwnerId — (String)

          The ID of the prefix list owner.

        • State — (String)

          The state of the prefix list reference.

          Possible values include:
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
        • Blackhole — (Boolean)

          Indicates whether traffic that matches this route is dropped.

        • TransitGatewayAttachment — (map)

          Information about the transit gateway attachment.

          • TransitGatewayAttachmentId — (String)

            The ID of the attachment.

          • ResourceType — (String)

            The resource type. Note that the tgw-peering resource type has been deprecated.

            Possible values include:
            • "vpc"
            • "vpn"
            • "direct-connect-gateway"
            • "connect"
            • "peering"
            • "tgw-peering"
          • ResourceId — (String)

            The ID of the resource.

      • 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.

getTransitGatewayRouteTableAssociations(params = {}, callback) ⇒ AWS.Request

Gets information about the associations for the specified transit gateway route table.

Examples:

Calling the getTransitGatewayRouteTableAssociations operation

var params = {
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getTransitGatewayRouteTableAssociations(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: {})
    • TransitGatewayRouteTableId — (String)

      The ID of the transit gateway route table.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • resource-id - The ID of the resource.

      • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect.

      • transit-gateway-attachment-id - The ID of the attachment.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • Associations — (Array<map>)

        Information about the associations.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The resource type. Note that the tgw-peering resource type has been deprecated.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • State — (String)

          The state of the association.

          Possible values include:
          • "associating"
          • "associated"
          • "disassociating"
          • "disassociated"
      • 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.

getTransitGatewayRouteTablePropagations(params = {}, callback) ⇒ AWS.Request

Gets information about the route table propagations for the specified transit gateway route table.

Examples:

Calling the getTransitGatewayRouteTablePropagations operation

var params = {
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getTransitGatewayRouteTablePropagations(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: {})
    • TransitGatewayRouteTableId — (String)

      The ID of the transit gateway route table.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • resource-id - The ID of the resource.

      • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect.

      • transit-gateway-attachment-id - The ID of the attachment.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • TransitGatewayRouteTablePropagations — (Array<map>)

        Information about the route table propagations.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The type of resource. Note that the tgw-peering resource type has been deprecated.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • State — (String)

          The state of the resource.

          Possible values include:
          • "enabling"
          • "enabled"
          • "disabling"
          • "disabled"
      • 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.

getVpnConnectionDeviceSampleConfiguration(params = {}, callback) ⇒ AWS.Request

Download an Amazon Web Services-provided sample configuration file to be used with the customer gateway device specified for your Site-to-Site VPN connection.

Examples:

Calling the getVpnConnectionDeviceSampleConfiguration operation

var params = {
  VpnConnectionDeviceTypeId: 'STRING_VALUE', /* required */
  VpnConnectionId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  InternetKeyExchangeVersion: 'STRING_VALUE'
};
ec2.getVpnConnectionDeviceSampleConfiguration(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 VpnConnectionId specifies the Site-to-Site VPN connection used for the sample configuration.

    • VpnConnectionDeviceTypeId — (String)

      Device identifier provided by the GetVpnConnectionDeviceTypes API.

    • InternetKeyExchangeVersion — (String)

      The IKE version to be used in the sample configuration file for your customer gateway device. You can specify one of the following versions: ikev1 or ikev2.

    • 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:

      • VpnConnectionDeviceSampleConfiguration — (String)

        Sample configuration file for the specified customer gateway device.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getVpnConnectionDeviceTypes(params = {}, callback) ⇒ AWS.Request

Obtain a list of customer gateway devices for which sample configuration files can be provided. The request has no additional parameters. You can also see the list of device types with sample configuration files available under Your customer gateway device in the Amazon Web Services Site-to-Site VPN User Guide.

Service Reference:

Examples:

Calling the getVpnConnectionDeviceTypes operation

var params = {
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.getVpnConnectionDeviceTypes(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      The maximum number of results returned by GetVpnConnectionDeviceTypes in paginated output. When this parameter is used, GetVpnConnectionDeviceTypes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another GetVpnConnectionDeviceTypes request with the returned NextToken value. This value can be between 200 and 1000. If this parameter is not used, then GetVpnConnectionDeviceTypes returns all results.

    • NextToken — (String)

      The NextToken value returned from a previous paginated GetVpnConnectionDeviceTypes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

    • 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:

      • VpnConnectionDeviceTypes — (Array<map>)

        List of customer gateway devices that have a sample configuration file available for use.

        • VpnConnectionDeviceTypeId — (String)

          Customer gateway device identifier.

        • Vendor — (String)

          Customer gateway device vendor.

        • Platform — (String)

          Customer gateway device platform.

        • Software — (String)

          Customer gateway device software version.

      • NextToken — (String)

        The NextToken value to include in a future GetVpnConnectionDeviceTypes request. When the results of a GetVpnConnectionDeviceTypes request exceed MaxResults, this value can be used 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.

importClientVpnClientCertificateRevocationList(params = {}, callback) ⇒ AWS.Request

Uploads a client certificate revocation list to the specified Client VPN endpoint. Uploading a client certificate revocation list overwrites the existing client certificate revocation list.

Uploading a client certificate revocation list resets existing client connections.

Examples:

Calling the importClientVpnClientCertificateRevocationList operation

var params = {
  CertificateRevocationList: 'STRING_VALUE', /* required */
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.importClientVpnClientCertificateRevocationList(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint to which the client certificate revocation list applies.

    • CertificateRevocationList — (String)

      The client certificate revocation list file. For more information, see Generate a Client Certificate Revocation List in the Client VPN Administrator 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:

      • 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.

importImage(params = {}, callback) ⇒ AWS.Request

Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI).

For more information, see Importing a VM as an image using VM Import/Export in the VM Import/Export User Guide.

Service Reference:

Examples:

Calling the importImage operation

var params = {
  Architecture: 'STRING_VALUE',
  BootMode: legacy-bios | uefi,
  ClientData: {
    Comment: 'STRING_VALUE',
    UploadEnd: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
    UploadSize: 'NUMBER_VALUE',
    UploadStart: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
  },
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DiskContainers: [
    {
      Description: 'STRING_VALUE',
      DeviceName: 'STRING_VALUE',
      Format: 'STRING_VALUE',
      SnapshotId: 'STRING_VALUE',
      Url: 'STRING_VALUE',
      UserBucket: {
        S3Bucket: 'STRING_VALUE',
        S3Key: 'STRING_VALUE'
      }
    },
    /* more items */
  ],
  DryRun: true || false,
  Encrypted: true || false,
  Hypervisor: 'STRING_VALUE',
  KmsKeyId: 'STRING_VALUE',
  LicenseSpecifications: [
    {
      LicenseConfigurationArn: 'STRING_VALUE'
    },
    /* more items */
  ],
  LicenseType: 'STRING_VALUE',
  Platform: 'STRING_VALUE',
  RoleName: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  UsageOperation: 'STRING_VALUE'
};
ec2.importImage(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: {})
    • Architecture — (String)

      The architecture of the virtual machine.

      Valid values: i386 | x86_64 | arm64

    • ClientData — (map)

      The client-specific data.

      • Comment — (String)

        A user-defined comment about the disk upload.

      • UploadEnd — (Date)

        The time that the disk upload ends.

      • UploadSize — (Float)

        The size of the uploaded disk image, in GiB.

      • UploadStart — (Date)

        The time that the disk upload starts.

    • ClientToken — (String)

      The token to enable idempotency for VM import requests.

    • Description — (String)

      A description string for the import image task.

    • DiskContainers — (Array<map>)

      Information about the disk containers.

      • Description — (String)

        The description of the disk image.

      • DeviceName — (String)

        The block device mapping for the disk.

      • Format — (String)

        The format of the disk image being imported.

        Valid values: OVA | VHD | VHDX | VMDK | RAW

      • SnapshotId — (String)

        The ID of the EBS snapshot to be used for importing the snapshot.

      • Url — (String)

        The URL to the Amazon S3-based disk image being imported. The URL can either be a https URL (https://..) or an Amazon S3 URL (s3://..)

      • UserBucket — (map)

        The S3 bucket for the disk image.

        • S3Bucket — (String)

          The name of the Amazon S3 bucket where the disk image is located.

        • S3Key — (String)

          The file name of the disk image.

    • 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.

    • Encrypted — (Boolean)

      Specifies whether the destination AMI of the imported image should be encrypted. The default KMS key for EBS is used unless you specify a non-default KMS key using KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

    • Hypervisor — (String)

      The target hypervisor platform.

      Valid values: xen

    • KmsKeyId — (String)

      An identifier for the symmetric KMS key to use when creating the encrypted AMI. This parameter is only required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

      The KMS key identifier may be provided in any of the following formats:

      • Key ID

      • Key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

      • ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the key namespace, and then the key ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.

      • ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

      Amazon Web Services parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

      The specified KMS key must exist in the Region that the AMI is being copied to.

      Amazon EBS does not support asymmetric KMS keys.

    • LicenseType — (String)

      The license type to be used for the Amazon Machine Image (AMI) after importing.

      By default, we detect the source-system operating system (OS) and apply the appropriate license. Specify AWS to replace the source-system license with an Amazon Web Services license, if appropriate. Specify BYOL to retain the source-system license, if appropriate.

      To use BYOL, you must have existing licenses with rights to use these licenses in a third party cloud, such as Amazon Web Services. For more information, see Prerequisites in the VM Import/Export User Guide.

    • Platform — (String)

      The operating system of the virtual machine.

      Valid values: Windows | Linux

    • RoleName — (String)

      The name of the role to use when not using the default role, 'vmimport'.

    • LicenseSpecifications — (Array<map>)

      The ARNs of the license configurations.

      • LicenseConfigurationArn — (String)

        The ARN of a license configuration.

    • TagSpecifications — (Array<map>)

      The tags to apply to the import image task during creation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • UsageOperation — (String)

      The usage operation value. For more information, see Licensing options in the VM Import/Export User Guide.

    • BootMode — (String)

      The boot mode of the virtual machine.

      Possible values include:
      • "legacy-bios"
      • "uefi"

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:

      • Architecture — (String)

        The architecture of the virtual machine.

      • Description — (String)

        A description of the import task.

      • Encrypted — (Boolean)

        Indicates whether the AMI is encrypted.

      • Hypervisor — (String)

        The target hypervisor of the import task.

      • ImageId — (String)

        The ID of the Amazon Machine Image (AMI) created by the import task.

      • ImportTaskId — (String)

        The task ID of the import image task.

      • KmsKeyId — (String)

        The identifier for the symmetric KMS key that was used to create the encrypted AMI.

      • LicenseType — (String)

        The license type of the virtual machine.

      • Platform — (String)

        The operating system of the virtual machine.

      • Progress — (String)

        The progress of the task.

      • SnapshotDetails — (Array<map>)

        Information about the snapshots.

        • Description — (String)

          A description for the snapshot.

        • DeviceName — (String)

          The block device mapping for the snapshot.

        • DiskImageSize — (Float)

          The size of the disk in the snapshot, in GiB.

        • Format — (String)

          The format of the disk image from which the snapshot is created.

        • Progress — (String)

          The percentage of progress for the task.

        • SnapshotId — (String)

          The snapshot ID of the disk being imported.

        • Status — (String)

          A brief status of the snapshot creation.

        • StatusMessage — (String)

          A detailed status message for the snapshot creation.

        • Url — (String)

          The URL used to access the disk image.

        • UserBucket — (map)

          The Amazon S3 bucket for the disk image.

          • S3Bucket — (String)

            The Amazon S3 bucket from which the disk image was created.

          • S3Key — (String)

            The file name of the disk image.

      • Status — (String)

        A brief status of the task.

      • StatusMessage — (String)

        A detailed status message of the import task.

      • LicenseSpecifications — (Array<map>)

        The ARNs of the license configurations.

        • LicenseConfigurationArn — (String)

          The ARN of a license configuration.

      • Tags — (Array<map>)

        Any tags assigned to the import image 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.

      • UsageOperation — (String)

        The usage operation value.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

importInstance(params = {}, callback) ⇒ AWS.Request

Creates an import instance task using metadata from the specified disk image.

This API action supports only single-volume VMs. To import multi-volume VMs, use ImportImage instead.

This API action is not supported by the Command Line Interface (CLI). For information about using the Amazon EC2 CLI, which is deprecated, see Importing a VM to Amazon EC2 in the Amazon EC2 CLI Reference PDF file.

For information about the import manifest referenced by this API action, see VM Import Manifest.

Service Reference:

Examples:

Calling the importInstance operation

var params = {
  Platform: Windows, /* required */
  Description: 'STRING_VALUE',
  DiskImages: [
    {
      Description: 'STRING_VALUE',
      Image: {
        Bytes: 'NUMBER_VALUE', /* required */
        Format: VMDK | RAW | VHD, /* required */
        ImportManifestUrl: 'STRING_VALUE' /* required */
      },
      Volume: {
        Size: 'NUMBER_VALUE' /* required */
      }
    },
    /* more items */
  ],
  DryRun: true || false,
  LaunchSpecification: {
    AdditionalInfo: 'STRING_VALUE',
    Architecture: i386 | x86_64 | arm64 | x86_64_mac,
    GroupIds: [
      'STRING_VALUE',
      /* more items */
    ],
    GroupNames: [
      'STRING_VALUE',
      /* more items */
    ],
    InstanceInitiatedShutdownBehavior: stop | terminate,
    InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
    Monitoring: true || false,
    Placement: {
      Affinity: 'STRING_VALUE',
      AvailabilityZone: 'STRING_VALUE',
      GroupName: 'STRING_VALUE',
      HostId: 'STRING_VALUE',
      HostResourceGroupArn: 'STRING_VALUE',
      PartitionNumber: 'NUMBER_VALUE',
      SpreadDomain: 'STRING_VALUE',
      Tenancy: default | dedicated | host
    },
    PrivateIpAddress: 'STRING_VALUE',
    SubnetId: 'STRING_VALUE',
    UserData: {
      Data: 'STRING_VALUE'
    }
  }
};
ec2.importInstance(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 instance being imported.

    • DiskImages — (Array<map>)

      The disk image.

      • Description — (String)

        A description of the disk image.

      • Image — (map)

        Information about the disk image.

        • Bytesrequired — (Integer)

          The size of the disk image, in GiB.

        • Formatrequired — (String)

          The disk image format.

          Possible values include:
          • "VMDK"
          • "RAW"
          • "VHD"
        • ImportManifestUrlrequired — (String)

          A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. 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.

      • Volume — (map)

        Information about the volume.

        • Sizerequired — (Integer)

          The size of the volume, in GiB.

    • 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.

    • LaunchSpecification — (map)

      The launch specification.

      • AdditionalInfo — (String)

        Reserved.

      • Architecture — (String)

        The architecture of the instance.

        Possible values include:
        • "i386"
        • "x86_64"
        • "arm64"
        • "x86_64_mac"
      • GroupIds — (Array<String>)

        The security group IDs.

      • GroupNames — (Array<String>)

        The security group names.

      • InstanceInitiatedShutdownBehavior — (String)

        Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

        Possible values include:
        • "stop"
        • "terminate"
      • InstanceType — (String)

        The instance type. For more information about the instance types that you can import, see Instance Types in the VM Import/Export User Guide.

        Possible values include:
        • "t1.micro"
        • "t2.nano"
        • "t2.micro"
        • "t2.small"
        • "t2.medium"
        • "t2.large"
        • "t2.xlarge"
        • "t2.2xlarge"
        • "t3.nano"
        • "t3.micro"
        • "t3.small"
        • "t3.medium"
        • "t3.large"
        • "t3.xlarge"
        • "t3.2xlarge"
        • "t3a.nano"
        • "t3a.micro"
        • "t3a.small"
        • "t3a.medium"
        • "t3a.large"
        • "t3a.xlarge"
        • "t3a.2xlarge"
        • "t4g.nano"
        • "t4g.micro"
        • "t4g.small"
        • "t4g.medium"
        • "t4g.large"
        • "t4g.xlarge"
        • "t4g.2xlarge"
        • "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"
        • "m4.16xlarge"
        • "m2.xlarge"
        • "m2.2xlarge"
        • "m2.4xlarge"
        • "cr1.8xlarge"
        • "r3.large"
        • "r3.xlarge"
        • "r3.2xlarge"
        • "r3.4xlarge"
        • "r3.8xlarge"
        • "r4.large"
        • "r4.xlarge"
        • "r4.2xlarge"
        • "r4.4xlarge"
        • "r4.8xlarge"
        • "r4.16xlarge"
        • "r5.large"
        • "r5.xlarge"
        • "r5.2xlarge"
        • "r5.4xlarge"
        • "r5.8xlarge"
        • "r5.12xlarge"
        • "r5.16xlarge"
        • "r5.24xlarge"
        • "r5.metal"
        • "r5a.large"
        • "r5a.xlarge"
        • "r5a.2xlarge"
        • "r5a.4xlarge"
        • "r5a.8xlarge"
        • "r5a.12xlarge"
        • "r5a.16xlarge"
        • "r5a.24xlarge"
        • "r5b.large"
        • "r5b.xlarge"
        • "r5b.2xlarge"
        • "r5b.4xlarge"
        • "r5b.8xlarge"
        • "r5b.12xlarge"
        • "r5b.16xlarge"
        • "r5b.24xlarge"
        • "r5b.metal"
        • "r5d.large"
        • "r5d.xlarge"
        • "r5d.2xlarge"
        • "r5d.4xlarge"
        • "r5d.8xlarge"
        • "r5d.12xlarge"
        • "r5d.16xlarge"
        • "r5d.24xlarge"
        • "r5d.metal"
        • "r5ad.large"
        • "r5ad.xlarge"
        • "r5ad.2xlarge"
        • "r5ad.4xlarge"
        • "r5ad.8xlarge"
        • "r5ad.12xlarge"
        • "r5ad.16xlarge"
        • "r5ad.24xlarge"
        • "r6g.metal"
        • "r6g.medium"
        • "r6g.large"
        • "r6g.xlarge"
        • "r6g.2xlarge"
        • "r6g.4xlarge"
        • "r6g.8xlarge"
        • "r6g.12xlarge"
        • "r6g.16xlarge"
        • "r6gd.metal"
        • "r6gd.medium"
        • "r6gd.large"
        • "r6gd.xlarge"
        • "r6gd.2xlarge"
        • "r6gd.4xlarge"
        • "r6gd.8xlarge"
        • "r6gd.12xlarge"
        • "r6gd.16xlarge"
        • "x1.16xlarge"
        • "x1.32xlarge"
        • "x1e.xlarge"
        • "x1e.2xlarge"
        • "x1e.4xlarge"
        • "x1e.8xlarge"
        • "x1e.16xlarge"
        • "x1e.32xlarge"
        • "i2.xlarge"
        • "i2.2xlarge"
        • "i2.4xlarge"
        • "i2.8xlarge"
        • "i3.large"
        • "i3.xlarge"
        • "i3.2xlarge"
        • "i3.4xlarge"
        • "i3.8xlarge"
        • "i3.16xlarge"
        • "i3.metal"
        • "i3en.large"
        • "i3en.xlarge"
        • "i3en.2xlarge"
        • "i3en.3xlarge"
        • "i3en.6xlarge"
        • "i3en.12xlarge"
        • "i3en.24xlarge"
        • "i3en.metal"
        • "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"
        • "c5.large"
        • "c5.xlarge"
        • "c5.2xlarge"
        • "c5.4xlarge"
        • "c5.9xlarge"
        • "c5.12xlarge"
        • "c5.18xlarge"
        • "c5.24xlarge"
        • "c5.metal"
        • "c5a.large"
        • "c5a.xlarge"
        • "c5a.2xlarge"
        • "c5a.4xlarge"
        • "c5a.8xlarge"
        • "c5a.12xlarge"
        • "c5a.16xlarge"
        • "c5a.24xlarge"
        • "c5ad.large"
        • "c5ad.xlarge"
        • "c5ad.2xlarge"
        • "c5ad.4xlarge"
        • "c5ad.8xlarge"
        • "c5ad.12xlarge"
        • "c5ad.16xlarge"
        • "c5ad.24xlarge"
        • "c5d.large"
        • "c5d.xlarge"
        • "c5d.2xlarge"
        • "c5d.4xlarge"
        • "c5d.9xlarge"
        • "c5d.12xlarge"
        • "c5d.18xlarge"
        • "c5d.24xlarge"
        • "c5d.metal"
        • "c5n.large"
        • "c5n.xlarge"
        • "c5n.2xlarge"
        • "c5n.4xlarge"
        • "c5n.9xlarge"
        • "c5n.18xlarge"
        • "c5n.metal"
        • "c6g.metal"
        • "c6g.medium"
        • "c6g.large"
        • "c6g.xlarge"
        • "c6g.2xlarge"
        • "c6g.4xlarge"
        • "c6g.8xlarge"
        • "c6g.12xlarge"
        • "c6g.16xlarge"
        • "c6gd.metal"
        • "c6gd.medium"
        • "c6gd.large"
        • "c6gd.xlarge"
        • "c6gd.2xlarge"
        • "c6gd.4xlarge"
        • "c6gd.8xlarge"
        • "c6gd.12xlarge"
        • "c6gd.16xlarge"
        • "c6gn.medium"
        • "c6gn.large"
        • "c6gn.xlarge"
        • "c6gn.2xlarge"
        • "c6gn.4xlarge"
        • "c6gn.8xlarge"
        • "c6gn.12xlarge"
        • "c6gn.16xlarge"
        • "cc1.4xlarge"
        • "cc2.8xlarge"
        • "g2.2xlarge"
        • "g2.8xlarge"
        • "g3.4xlarge"
        • "g3.8xlarge"
        • "g3.16xlarge"
        • "g3s.xlarge"
        • "g4ad.xlarge"
        • "g4ad.2xlarge"
        • "g4ad.4xlarge"
        • "g4ad.8xlarge"
        • "g4ad.16xlarge"
        • "g4dn.xlarge"
        • "g4dn.2xlarge"
        • "g4dn.4xlarge"
        • "g4dn.8xlarge"
        • "g4dn.12xlarge"
        • "g4dn.16xlarge"
        • "g4dn.metal"
        • "cg1.4xlarge"
        • "p2.xlarge"
        • "p2.8xlarge"
        • "p2.16xlarge"
        • "p3.2xlarge"
        • "p3.8xlarge"
        • "p3.16xlarge"
        • "p3dn.24xlarge"
        • "p4d.24xlarge"
        • "d2.xlarge"
        • "d2.2xlarge"
        • "d2.4xlarge"
        • "d2.8xlarge"
        • "d3.xlarge"
        • "d3.2xlarge"
        • "d3.4xlarge"
        • "d3.8xlarge"
        • "d3en.xlarge"
        • "d3en.2xlarge"
        • "d3en.4xlarge"
        • "d3en.6xlarge"
        • "d3en.8xlarge"
        • "d3en.12xlarge"
        • "dl1.24xlarge"
        • "f1.2xlarge"
        • "f1.4xlarge"
        • "f1.16xlarge"
        • "m5.large"
        • "m5.xlarge"
        • "m5.2xlarge"
        • "m5.4xlarge"
        • "m5.8xlarge"
        • "m5.12xlarge"
        • "m5.16xlarge"
        • "m5.24xlarge"
        • "m5.metal"
        • "m5a.large"
        • "m5a.xlarge"
        • "m5a.2xlarge"
        • "m5a.4xlarge"
        • "m5a.8xlarge"
        • "m5a.12xlarge"
        • "m5a.16xlarge"
        • "m5a.24xlarge"
        • "m5d.large"
        • "m5d.xlarge"
        • "m5d.2xlarge"
        • "m5d.4xlarge"
        • "m5d.8xlarge"
        • "m5d.12xlarge"
        • "m5d.16xlarge"
        • "m5d.24xlarge"
        • "m5d.metal"
        • "m5ad.large"
        • "m5ad.xlarge"
        • "m5ad.2xlarge"
        • "m5ad.4xlarge"
        • "m5ad.8xlarge"
        • "m5ad.12xlarge"
        • "m5ad.16xlarge"
        • "m5ad.24xlarge"
        • "m5zn.large"
        • "m5zn.xlarge"
        • "m5zn.2xlarge"
        • "m5zn.3xlarge"
        • "m5zn.6xlarge"
        • "m5zn.12xlarge"
        • "m5zn.metal"
        • "h1.2xlarge"
        • "h1.4xlarge"
        • "h1.8xlarge"
        • "h1.16xlarge"
        • "z1d.large"
        • "z1d.xlarge"
        • "z1d.2xlarge"
        • "z1d.3xlarge"
        • "z1d.6xlarge"
        • "z1d.12xlarge"
        • "z1d.metal"
        • "u-6tb1.56xlarge"
        • "u-6tb1.112xlarge"
        • "u-9tb1.112xlarge"
        • "u-12tb1.112xlarge"
        • "u-6tb1.metal"
        • "u-9tb1.metal"
        • "u-12tb1.metal"
        • "u-18tb1.metal"
        • "u-24tb1.metal"
        • "a1.medium"
        • "a1.large"
        • "a1.xlarge"
        • "a1.2xlarge"
        • "a1.4xlarge"
        • "a1.metal"
        • "m5dn.large"
        • "m5dn.xlarge"
        • "m5dn.2xlarge"
        • "m5dn.4xlarge"
        • "m5dn.8xlarge"
        • "m5dn.12xlarge"
        • "m5dn.16xlarge"
        • "m5dn.24xlarge"
        • "m5dn.metal"
        • "m5n.large"
        • "m5n.xlarge"
        • "m5n.2xlarge"
        • "m5n.4xlarge"
        • "m5n.8xlarge"
        • "m5n.12xlarge"
        • "m5n.16xlarge"
        • "m5n.24xlarge"
        • "m5n.metal"
        • "r5dn.large"
        • "r5dn.xlarge"
        • "r5dn.2xlarge"
        • "r5dn.4xlarge"
        • "r5dn.8xlarge"
        • "r5dn.12xlarge"
        • "r5dn.16xlarge"
        • "r5dn.24xlarge"
        • "r5dn.metal"
        • "r5n.large"
        • "r5n.xlarge"
        • "r5n.2xlarge"
        • "r5n.4xlarge"
        • "r5n.8xlarge"
        • "r5n.12xlarge"
        • "r5n.16xlarge"
        • "r5n.24xlarge"
        • "r5n.metal"
        • "inf1.xlarge"
        • "inf1.2xlarge"
        • "inf1.6xlarge"
        • "inf1.24xlarge"
        • "m6g.metal"
        • "m6g.medium"
        • "m6g.large"
        • "m6g.xlarge"
        • "m6g.2xlarge"
        • "m6g.4xlarge"
        • "m6g.8xlarge"
        • "m6g.12xlarge"
        • "m6g.16xlarge"
        • "m6gd.metal"
        • "m6gd.medium"
        • "m6gd.large"
        • "m6gd.xlarge"
        • "m6gd.2xlarge"
        • "m6gd.4xlarge"
        • "m6gd.8xlarge"
        • "m6gd.12xlarge"
        • "m6gd.16xlarge"
        • "m6i.large"
        • "m6i.xlarge"
        • "m6i.2xlarge"
        • "m6i.4xlarge"
        • "m6i.8xlarge"
        • "m6i.12xlarge"
        • "m6i.16xlarge"
        • "m6i.24xlarge"
        • "m6i.32xlarge"
        • "mac1.metal"
        • "x2gd.medium"
        • "x2gd.large"
        • "x2gd.xlarge"
        • "x2gd.2xlarge"
        • "x2gd.4xlarge"
        • "x2gd.8xlarge"
        • "x2gd.12xlarge"
        • "x2gd.16xlarge"
        • "x2gd.metal"
        • "vt1.3xlarge"
        • "vt1.6xlarge"
        • "vt1.24xlarge"
      • Monitoring — (Boolean)

        Indicates whether monitoring is enabled.

      • Placement — (map)

        The placement information for the instance.

        • AvailabilityZone — (String)

          The Availability Zone of the instance.

          If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

          This parameter is not supported by CreateFleet.

        • Affinity — (String)

          The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

          This parameter is not supported by CreateFleet.

        • GroupName — (String)

          The name of the placement group the instance is in.

        • PartitionNumber — (Integer)

          The number of the partition the instance is in. Valid only if the placement group strategy is set to partition.

          This parameter is not supported by CreateFleet.

        • HostId — (String)

          The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

          This parameter is not supported by CreateFleet.

        • 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.

          This parameter is not supported by CreateFleet.

          T3 instances that use the unlimited CPU credit option do not support host tenancy.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • SpreadDomain — (String)

          Reserved for future use.

          This parameter is not supported by CreateFleet.

        • HostResourceGroupArn — (String)

          The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

          This parameter is not supported by CreateFleet.

      • PrivateIpAddress — (String)

        [EC2-VPC] An available IP address from the IP address range of the subnet.

      • SubnetId — (String)

        [EC2-VPC] The ID of the subnet in which to launch the instance.

      • UserData — (map)

        The Base64-encoded user data to make available to the instance.

        • Data — (String)

          The user data. If you are using an Amazon Web Services SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

    • Platform — (String)

      The instance operating system.

      Possible values include:
      • "Windows"

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:

      • ConversionTask — (map)

        Information about the conversion task.

        • ConversionTaskId — (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.

          • Description — (String)

            A description of the task.

          • InstanceId — (String)

            The ID of the instance.

          • Platform — (String)

            The instance operating system.

            Possible values include:
            • "Windows"
          • Volumes — (Array<map>)

            The volumes.

            • AvailabilityZone — (String)

              The Availability Zone where the resulting instance will reside.

            • BytesConverted — (Integer)

              The number of bytes converted so far.

            • Description — (String)

              A description of the task.

            • Image — (map)

              The image.

              • Checksum — (String)

                The checksum computed for the disk image.

              • Format — (String)

                The disk image format.

                Possible values include:
                • "VMDK"
                • "RAW"
                • "VHD"
              • ImportManifestUrl — (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.

              • Size — (Integer)

                The size of the disk image, in GiB.

            • Status — (String)

              The status of the import of this particular disk image.

            • StatusMessage — (String)

              The status information or errors related to the disk image.

            • Volume — (map)

              The volume.

              • Id — (String)

                The volume identifier.

              • Size — (Integer)

                The size of the volume, in GiB.

        • ImportVolume — (map)

          If the task is for importing a volume, this contains information about the import volume task.

          • AvailabilityZone — (String)

            The Availability Zone where the resulting volume will reside.

          • BytesConverted — (Integer)

            The number of bytes converted so far.

          • Description — (String)

            The description you provided when starting the import volume task.

          • Image — (map)

            The image.

            • Checksum — (String)

              The checksum computed for the disk image.

            • Format — (String)

              The disk image format.

              Possible values include:
              • "VMDK"
              • "RAW"
              • "VHD"
            • ImportManifestUrl — (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.

            • Size — (Integer)

              The size of the disk image, in GiB.

          • Volume — (map)

            The volume.

            • Id — (String)

              The volume identifier.

            • Size — (Integer)

              The size of the volume, in GiB.

        • State — (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.

importKeyPair(params = {}, callback) ⇒ AWS.Request

Imports the public key from an RSA or ED25519 key pair that you created with a third-party tool. Compare this with CreateKeyPair, in which Amazon Web Services creates the key pair and gives the keys to you (Amazon Web Services keeps a copy of the public key). With ImportKeyPair, you create the key pair and give Amazon Web Services just the public key. The private key is never transferred between you and Amazon Web Services.

For more information about key pairs, see Amazon EC2 key pairs in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the importKeyPair operation

var params = {
  KeyName: 'STRING_VALUE', /* required */
  PublicKeyMaterial: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */, /* required */
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.importKeyPair(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

    • PublicKeyMaterial — (Buffer, Typed Array, Blob, String)

      The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.

    • TagSpecifications — (Array<map>)

      The tags to apply to the imported key pair.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • KeyFingerprint — (String)

        The MD5 public key fingerprint as specified in section 4 of RFC 4716.

      • KeyName — (String)

        The key pair name that you provided.

      • KeyPairId — (String)

        The ID of the resulting key pair.

      • Tags — (Array<map>)

        The tags applied to the imported key pair.

        • 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.

importSnapshot(params = {}, callback) ⇒ AWS.Request

Imports a disk into an EBS snapshot.

For more information, see Importing a disk as a snapshot using VM Import/Export in the VM Import/Export User Guide.

Service Reference:

Examples:

Calling the importSnapshot operation

var params = {
  ClientData: {
    Comment: 'STRING_VALUE',
    UploadEnd: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
    UploadSize: 'NUMBER_VALUE',
    UploadStart: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
  },
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DiskContainer: {
    Description: 'STRING_VALUE',
    Format: 'STRING_VALUE',
    Url: 'STRING_VALUE',
    UserBucket: {
      S3Bucket: 'STRING_VALUE',
      S3Key: 'STRING_VALUE'
    }
  },
  DryRun: true || false,
  Encrypted: true || false,
  KmsKeyId: 'STRING_VALUE',
  RoleName: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.importSnapshot(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: {})
    • ClientData — (map)

      The client-specific data.

      • Comment — (String)

        A user-defined comment about the disk upload.

      • UploadEnd — (Date)

        The time that the disk upload ends.

      • UploadSize — (Float)

        The size of the uploaded disk image, in GiB.

      • UploadStart — (Date)

        The time that the disk upload starts.

    • ClientToken — (String)

      Token to enable idempotency for VM import requests.

    • Description — (String)

      The description string for the import snapshot task.

    • DiskContainer — (map)

      Information about the disk container.

      • Description — (String)

        The description of the disk image being imported.

      • Format — (String)

        The format of the disk image being imported.

        Valid values: VHD | VMDK | RAW

      • Url — (String)

        The URL to the Amazon S3-based disk image being imported. It can either be a https URL (https://..) or an Amazon S3 URL (s3://..).

      • UserBucket — (map)

        The Amazon S3 bucket for the disk image.

        • S3Bucket — (String)

          The name of the Amazon S3 bucket where the disk image is located.

        • S3Key — (String)

          The file name of the disk image.

    • 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.

    • Encrypted — (Boolean)

      Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS is used unless you specify a non-default KMS key using KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

    • KmsKeyId — (String)

      An identifier for the symmetric KMS key to use when creating the encrypted snapshot. This parameter is only required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

      The KMS key identifier may be provided in any of the following formats:

      • Key ID

      • Key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

      • ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the key namespace, and then the key ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.

      • ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

      Amazon Web Services parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

      The specified KMS key must exist in the Region that the snapshot is being copied to.

      Amazon EBS does not support asymmetric KMS keys.

    • RoleName — (String)

      The name of the role to use when not using the default role, 'vmimport'.

    • TagSpecifications — (Array<map>)

      The tags to apply to the import snapshot task during creation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • Description — (String)

        A description of the import snapshot task.

      • ImportTaskId — (String)

        The ID of the import snapshot task.

      • SnapshotTaskDetail — (map)

        Information about the import snapshot task.

        • Description — (String)

          The description of the snapshot.

        • DiskImageSize — (Float)

          The size of the disk in the snapshot, in GiB.

        • Encrypted — (Boolean)

          Indicates whether the snapshot is encrypted.

        • Format — (String)

          The format of the disk image from which the snapshot is created.

        • KmsKeyId — (String)

          The identifier for the KMS key that was used to create the encrypted snapshot.

        • Progress — (String)

          The percentage of completion for the import snapshot task.

        • SnapshotId — (String)

          The snapshot ID of the disk being imported.

        • Status — (String)

          A brief status for the import snapshot task.

        • StatusMessage — (String)

          A detailed status message for the import snapshot task.

        • Url — (String)

          The URL of the disk image from which the snapshot is created.

        • UserBucket — (map)

          The Amazon S3 bucket for the disk image.

          • S3Bucket — (String)

            The Amazon S3 bucket from which the disk image was created.

          • S3Key — (String)

            The file name of the disk image.

      • Tags — (Array<map>)

        Any tags assigned to the import snapshot 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.

importVolume(params = {}, callback) ⇒ AWS.Request

Creates an import volume task using metadata from the specified disk image.

This API action supports only single-volume VMs. To import multi-volume VMs, use ImportImage instead. To import a disk to a snapshot, use ImportSnapshot instead.

This API action is not supported by the Command Line Interface (CLI). For information about using the Amazon EC2 CLI, which is deprecated, see Importing Disks to Amazon EBS in the Amazon EC2 CLI Reference PDF file.

For information about the import manifest referenced by this API action, see VM Import Manifest.

Service Reference:

Examples:

Calling the importVolume operation

var params = {
  AvailabilityZone: 'STRING_VALUE', /* required */
  Image: { /* required */
    Bytes: 'NUMBER_VALUE', /* required */
    Format: VMDK | RAW | VHD, /* required */
    ImportManifestUrl: 'STRING_VALUE' /* required */
  },
  Volume: { /* required */
    Size: 'NUMBER_VALUE' /* required */
  },
  Description: 'STRING_VALUE',
  DryRun: true || false
};
ec2.importVolume(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: {})
    • AvailabilityZone — (String)

      The Availability Zone for the resulting EBS volume.

    • Description — (String)

      A description of the volume.

    • 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.

    • Image — (map)

      The disk image.

      • Bytesrequired — (Integer)

        The size of the disk image, in GiB.

      • Formatrequired — (String)

        The disk image format.

        Possible values include:
        • "VMDK"
        • "RAW"
        • "VHD"
      • ImportManifestUrlrequired — (String)

        A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. 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.

    • Volume — (map)

      The volume size.

      • Sizerequired — (Integer)

        The size of the volume, in GiB.

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:

      • ConversionTask — (map)

        Information about the conversion task.

        • ConversionTaskId — (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.

          • Description — (String)

            A description of the task.

          • InstanceId — (String)

            The ID of the instance.

          • Platform — (String)

            The instance operating system.

            Possible values include:
            • "Windows"
          • Volumes — (Array<map>)

            The volumes.

            • AvailabilityZone — (String)

              The Availability Zone where the resulting instance will reside.

            • BytesConverted — (Integer)

              The number of bytes converted so far.

            • Description — (String)

              A description of the task.

            • Image — (map)

              The image.

              • Checksum — (String)

                The checksum computed for the disk image.

              • Format — (String)

                The disk image format.

                Possible values include:
                • "VMDK"
                • "RAW"
                • "VHD"
              • ImportManifestUrl — (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.

              • Size — (Integer)

                The size of the disk image, in GiB.

            • Status — (String)

              The status of the import of this particular disk image.

            • StatusMessage — (String)

              The status information or errors related to the disk image.

            • Volume — (map)

              The volume.

              • Id — (String)

                The volume identifier.

              • Size — (Integer)

                The size of the volume, in GiB.

        • ImportVolume — (map)

          If the task is for importing a volume, this contains information about the import volume task.

          • AvailabilityZone — (String)

            The Availability Zone where the resulting volume will reside.

          • BytesConverted — (Integer)

            The number of bytes converted so far.

          • Description — (String)

            The description you provided when starting the import volume task.

          • Image — (map)

            The image.

            • Checksum — (String)

              The checksum computed for the disk image.

            • Format — (String)

              The disk image format.

              Possible values include:
              • "VMDK"
              • "RAW"
              • "VHD"
            • ImportManifestUrl — (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.

            • Size — (Integer)

              The size of the disk image, in GiB.

          • Volume — (map)

            The volume.

            • Id — (String)

              The volume identifier.

            • Size — (Integer)

              The size of the volume, in GiB.

        • State — (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.

modifyAddressAttribute(params = {}, callback) ⇒ AWS.Request

Modifies an attribute of the specified Elastic IP address. For requirements, see Using reverse DNS for email applications.

Service Reference:

Examples:

Calling the modifyAddressAttribute operation

var params = {
  AllocationId: 'STRING_VALUE', /* required */
  DomainName: 'STRING_VALUE',
  DryRun: true || false
};
ec2.modifyAddressAttribute(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: {})
    • AllocationId — (String)

      [EC2-VPC] The allocation ID.

    • DomainName — (String)

      The domain name to modify for the IP address.

    • 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:

      • Address — (map)

        Information about the Elastic IP address.

        • PublicIp — (String)

          The public IP address.

        • AllocationId — (String)

          [EC2-VPC] The allocation ID.

        • PtrRecord — (String)

          The pointer (PTR) record for the IP address.

        • PtrRecordUpdate — (map)

          The updated PTR record for the IP address.

          • Value — (String)

            The value for the PTR record update.

          • Status — (String)

            The status of the PTR record update.

          • Reason — (String)

            The reason for the PTR record update.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyAvailabilityZoneGroup(params = {}, callback) ⇒ AWS.Request

Changes the opt-in status of the Local Zone and Wavelength Zone group for your account.

Use DescribeAvailabilityZones to view the value for GroupName.

Service Reference:

Examples:

Calling the modifyAvailabilityZoneGroup operation

var params = {
  GroupName: 'STRING_VALUE', /* required */
  OptInStatus: opted-in | not-opted-in, /* required */
  DryRun: true || false
};
ec2.modifyAvailabilityZoneGroup(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: {})
    • GroupName — (String)

      The name of the Availability Zone group, Local Zone group, or Wavelength Zone group.

    • OptInStatus — (String)

      Indicates whether you are opted in to the Local Zone group or Wavelength Zone group. The only valid value is opted-in. You must contact Amazon Web Services Support to opt out of a Local Zone or Wavelength Zone group.

      Possible values include:
      • "opted-in"
      • "not-opted-in"
    • 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:

      • Return — (Boolean)

        Is true if the request succeeds, and an error otherwise.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyCapacityReservation(params = {}, callback) ⇒ AWS.Request

Modifies a Capacity Reservation's capacity and the conditions under which it is to be released. You cannot change a Capacity Reservation's instance type, EBS optimization, instance store settings, platform, Availability Zone, or instance eligibility. If you need to modify any of these attributes, we recommend that you cancel the Capacity Reservation, and then create a new one with the required attributes.

Service Reference:

Examples:

Calling the modifyCapacityReservation operation

var params = {
  CapacityReservationId: 'STRING_VALUE', /* required */
  Accept: true || false,
  AdditionalInfo: 'STRING_VALUE',
  DryRun: true || false,
  EndDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  EndDateType: unlimited | limited,
  InstanceCount: 'NUMBER_VALUE'
};
ec2.modifyCapacityReservation(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: {})
    • CapacityReservationId — (String)

      The ID of the Capacity Reservation.

    • InstanceCount — (Integer)

      The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by more than 1000 in a single request.

    • EndDate — (Date)

      The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

      The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.

      You must provide an EndDate value if EndDateType is limited. Omit EndDate if EndDateType is unlimited.

    • EndDateType — (String)

      Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

      • unlimited - The Capacity Reservation remains active until you explicitly cancel it. Do not provide an EndDate value if EndDateType is unlimited.

      • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if EndDateType is limited.

      Possible values include:
      • "unlimited"
      • "limited"
    • Accept — (Boolean)

      Reserved. Capacity Reservations you have created are accepted by default.

    • 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.

    • AdditionalInfo — (String)

      Reserved for future use.

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.

modifyCapacityReservationFleet(params = {}, callback) ⇒ AWS.Request

Modifies a Capacity Reservation Fleet.

When you modify the total target capacity of a Capacity Reservation Fleet, the Fleet automatically creates new Capacity Reservations, or modifies or cancels existing Capacity Reservations in the Fleet to meet the new total target capacity. When you modify the end date for the Fleet, the end dates for all of the individual Capacity Reservations in the Fleet are updated accordingly.

Service Reference:

Examples:

Calling the modifyCapacityReservationFleet operation

var params = {
  CapacityReservationFleetId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  EndDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  RemoveEndDate: true || false,
  TotalTargetCapacity: 'NUMBER_VALUE'
};
ec2.modifyCapacityReservationFleet(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: {})
    • CapacityReservationFleetId — (String)

      The ID of the Capacity Reservation Fleet to modify.

    • TotalTargetCapacity — (Integer)

      The total number of capacity units to be reserved by the Capacity Reservation Fleet. This value, together with the instance type weights that you assign to each instance type used by the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see Total target capacity in the Amazon EC2 User Guide.

    • EndDate — (Date)

      The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation Fleet expires, its state changes to expired and all of the Capacity Reservations in the Fleet expire.

      The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation Fleet is guaranteed to expire between 13:30:55 and 14:30:55 on 5/31/2019.

      You can't specify EndDate and RemoveEndDate in the same request.

    • 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.

    • RemoveEndDate — (Boolean)

      Indicates whether to remove the end date from the Capacity Reservation Fleet. If you remove the end date, the Capacity Reservation Fleet does not expire and it remains active until you explicitly cancel it using the CancelCapacityReservationFleet action.

      You can't specify RemoveEndDate and EndDate 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:

      • 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.

modifyClientVpnEndpoint(params = {}, callback) ⇒ AWS.Request

Modifies the specified Client VPN endpoint. Modifying the DNS server resets existing client connections.

Service Reference:

Examples:

Calling the modifyClientVpnEndpoint operation

var params = {
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  ClientConnectOptions: {
    Enabled: true || false,
    LambdaFunctionArn: 'STRING_VALUE'
  },
  ConnectionLogOptions: {
    CloudwatchLogGroup: 'STRING_VALUE',
    CloudwatchLogStream: 'STRING_VALUE',
    Enabled: true || false
  },
  Description: 'STRING_VALUE',
  DnsServers: {
    CustomDnsServers: [
      'STRING_VALUE',
      /* more items */
    ],
    Enabled: true || false
  },
  DryRun: true || false,
  SecurityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  SelfServicePortal: enabled | disabled,
  ServerCertificateArn: 'STRING_VALUE',
  SplitTunnel: true || false,
  VpcId: 'STRING_VALUE',
  VpnPort: 'NUMBER_VALUE'
};
ec2.modifyClientVpnEndpoint(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint to modify.

    • ServerCertificateArn — (String)

      The ARN of the server certificate to be used. The server certificate must be provisioned in Certificate Manager (ACM).

    • ConnectionLogOptions — (map)

      Information about the client connection logging options.

      If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:

      • Client connection requests

      • Client connection results (successful and unsuccessful)

      • Reasons for unsuccessful client connection requests

      • Client connection termination time

      • Enabled — (Boolean)

        Indicates whether connection logging is enabled.

      • CloudwatchLogGroup — (String)

        The name of the CloudWatch Logs log group. Required if connection logging is enabled.

      • CloudwatchLogStream — (String)

        The name of the CloudWatch Logs log stream to which the connection data is published.

    • DnsServers — (map)

      Information about the DNS servers to be used by Client VPN connections. A Client VPN endpoint can have up to two DNS servers.

      • CustomDnsServers — (Array<String>)

        The IPv4 address range, in CIDR notation, of the DNS servers to be used. You can specify up to two DNS servers. Ensure that the DNS servers can be reached by the clients. The specified values overwrite the existing values.

      • Enabled — (Boolean)

        Indicates whether DNS servers should be used. Specify False to delete the existing DNS servers.

    • VpnPort — (Integer)

      The port number to assign to the Client VPN endpoint for TCP and UDP traffic.

      Valid Values: 443 | 1194

      Default Value: 443

    • Description — (String)

      A brief description of the Client VPN endpoint.

    • SplitTunnel — (Boolean)

      Indicates whether the VPN is split-tunnel.

      For information about split-tunnel VPN endpoints, see Split-tunnel Client VPN endpoint in the Client VPN Administrator 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.

    • SecurityGroupIds — (Array<String>)

      The IDs of one or more security groups to apply to the target network.

    • VpcId — (String)

      The ID of the VPC to associate with the Client VPN endpoint.

    • SelfServicePortal — (String)

      Specify whether to enable the self-service portal for the Client VPN endpoint.

      Possible values include:
      • "enabled"
      • "disabled"
    • ClientConnectOptions — (map)

      The options for managing connection authorization for new client connections.

      • Enabled — (Boolean)

        Indicates whether client connect options are enabled. The default is false (not enabled).

      • LambdaFunctionArn — (String)

        The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.

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.

modifyDefaultCreditSpecification(params = {}, callback) ⇒ AWS.Request

Modifies the default credit option for CPU usage of burstable performance instances. The default credit option is set at the account level per Amazon Web Services Region, and is specified per instance family. All new burstable performance instances in the account launch using the default credit option.

ModifyDefaultCreditSpecification is an asynchronous operation, which works at an Amazon Web Services Region level and modifies the credit option for each Availability Zone. All zones in a Region are updated within five minutes. But if instances are launched during this operation, they might not get the new credit option until the zone is updated. To verify whether the update has occurred, you can call GetDefaultCreditSpecification and check DefaultCreditSpecification for updates.

For more information, see Burstable performance instances in the Amazon EC2 User Guide.

Examples:

Calling the modifyDefaultCreditSpecification operation

var params = {
  CpuCredits: 'STRING_VALUE', /* required */
  InstanceFamily: t2 | t3 | t3a | t4g, /* required */
  DryRun: true || false
};
ec2.modifyDefaultCreditSpecification(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.

    • InstanceFamily — (String)

      The instance family.

      Possible values include:
      • "t2"
      • "t3"
      • "t3a"
      • "t4g"
    • CpuCredits — (String)

      The credit option for CPU usage of the instance family.

      Valid Values: standard | unlimited

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:

      • InstanceFamilyCreditSpecification — (map)

        The default credit option for CPU usage of the instance family.

        • InstanceFamily — (String)

          The instance family.

          Possible values include:
          • "t2"
          • "t3"
          • "t3a"
          • "t4g"
        • CpuCredits — (String)

          The default credit option for CPU usage of the instance family. Valid values are standard and unlimited.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyEbsDefaultKmsKeyId(params = {}, callback) ⇒ AWS.Request

Changes the default KMS key for EBS encryption by default for your account in this Region.

Amazon Web Services creates a unique Amazon Web Services managed KMS key in each Region for use with encryption by default. If you change the default KMS key to a symmetric customer managed KMS key, it is used instead of the Amazon Web Services managed KMS key. To reset the default KMS key to the Amazon Web Services managed KMS key for EBS, use ResetEbsDefaultKmsKeyId. Amazon EBS does not support asymmetric KMS keys.

If you delete or disable the customer managed KMS key that you specified for use with encryption by default, your instances will fail to launch.

For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the modifyEbsDefaultKmsKeyId operation

var params = {
  KmsKeyId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.modifyEbsDefaultKmsKeyId(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: {})
    • KmsKeyId — (String)

      The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If KmsKeyId is specified, the encrypted state must be true.

      You can specify the KMS key using any of the following:

      • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.

      • Key alias. For example, alias/ExampleAlias.

      • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.

      • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

      Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

      Amazon EBS does not support asymmetric KMS keys.

    • 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:

      • KmsKeyId — (String)

        The Amazon Resource Name (ARN) of the default KMS key for encryption by default.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyFleet(params = {}, callback) ⇒ AWS.Request

Modifies the specified EC2 Fleet.

You can only modify an EC2 Fleet request of type maintain.

While the EC2 Fleet is being modified, it is in the modifying state.

To scale up your EC2 Fleet, increase its target capacity. The EC2 Fleet launches the additional Spot Instances according to the allocation strategy for the EC2 Fleet request. If the allocation strategy is lowest-price, the EC2 Fleet launches instances using the Spot Instance pool with the lowest price. If the allocation strategy is diversified, the EC2 Fleet distributes the instances across the Spot Instance pools. If the allocation strategy is capacity-optimized, EC2 Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.

To scale down your EC2 Fleet, decrease its target capacity. First, the EC2 Fleet cancels any open requests that exceed the new target capacity. You can request that the EC2 Fleet terminate Spot Instances until the size of the fleet no longer exceeds the new target capacity. If the allocation strategy is lowest-price, the EC2 Fleet terminates the instances with the highest price per unit. If the allocation strategy is capacity-optimized, the EC2 Fleet terminates the instances in the Spot Instance pools that have the least available Spot Instance capacity. If the allocation strategy is diversified, the EC2 Fleet terminates instances across the Spot Instance pools. Alternatively, you can request that the EC2 Fleet keep the fleet at its current size, but not replace any Spot Instances that are interrupted or that you terminate manually.

If you are finished with your EC2 Fleet for now, but will use it again later, you can set the target capacity to 0.

Service Reference:

Examples:

Calling the modifyFleet operation

var params = {
  FleetId: 'STRING_VALUE', /* required */
  Context: 'STRING_VALUE',
  DryRun: true || false,
  ExcessCapacityTerminationPolicy: no-termination | termination,
  LaunchTemplateConfigs: [
    {
      LaunchTemplateSpecification: {
        LaunchTemplateId: 'STRING_VALUE',
        LaunchTemplateName: 'STRING_VALUE',
        Version: 'STRING_VALUE'
      },
      Overrides: [
        {
          AvailabilityZone: 'STRING_VALUE',
          InstanceRequirements: {
            MemoryMiB: { /* required */
              Min: 'NUMBER_VALUE', /* required */
              Max: 'NUMBER_VALUE'
            },
            VCpuCount: { /* required */
              Min: 'NUMBER_VALUE', /* required */
              Max: 'NUMBER_VALUE'
            },
            AcceleratorCount: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            AcceleratorManufacturers: [
              nvidia | amd | amazon-web-services | xilinx,
              /* more items */
            ],
            AcceleratorNames: [
              a100 | v100 | k80 | t4 | m60 | radeon-pro-v520 | vu9p,
              /* more items */
            ],
            AcceleratorTotalMemoryMiB: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            AcceleratorTypes: [
              gpu | fpga | inference,
              /* more items */
            ],
            BareMetal: included | required | excluded,
            BaselineEbsBandwidthMbps: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            BurstablePerformance: included | required | excluded,
            CpuManufacturers: [
              intel | amd | amazon-web-services,
              /* more items */
            ],
            ExcludedInstanceTypes: [
              'STRING_VALUE',
              /* more items */
            ],
            InstanceGenerations: [
              current | previous,
              /* more items */
            ],
            LocalStorage: included | required | excluded,
            LocalStorageTypes: [
              hdd | ssd,
              /* more items */
            ],
            MemoryGiBPerVCpu: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            NetworkInterfaceCount: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            OnDemandMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
            RequireHibernateSupport: true || false,
            SpotMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
            TotalLocalStorageGB: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            }
          },
          InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
          MaxPrice: 'STRING_VALUE',
          Placement: {
            Affinity: 'STRING_VALUE',
            AvailabilityZone: 'STRING_VALUE',
            GroupName: 'STRING_VALUE',
            HostId: 'STRING_VALUE',
            HostResourceGroupArn: 'STRING_VALUE',
            PartitionNumber: 'NUMBER_VALUE',
            SpreadDomain: 'STRING_VALUE',
            Tenancy: default | dedicated | host
          },
          Priority: 'NUMBER_VALUE',
          SubnetId: 'STRING_VALUE',
          WeightedCapacity: 'NUMBER_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  TargetCapacitySpecification: {
    TotalTargetCapacity: 'NUMBER_VALUE', /* required */
    DefaultTargetCapacityType: spot | on-demand,
    OnDemandTargetCapacity: 'NUMBER_VALUE',
    SpotTargetCapacity: 'NUMBER_VALUE',
    TargetCapacityUnitType: vcpu | memory-mib | units
  }
};
ec2.modifyFleet(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.

    • ExcessCapacityTerminationPolicy — (String)

      Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.

      Possible values include:
      • "no-termination"
      • "termination"
    • LaunchTemplateConfigs — (Array<map>)

      The launch template and overrides.

      • LaunchTemplateSpecification — (map)

        The launch template to use. You must specify either the launch template ID or launch template name in the request.

        • LaunchTemplateId — (String)

          The ID of the launch template. If you specify the template ID, you can't specify the template name.

        • LaunchTemplateName — (String)

          The name of the launch template. If you specify the template name, you can't specify the template ID.

        • Version — (String)

          The launch template version number, $Latest, or $Default. You must specify a value, otherwise the request fails.

          If the value is $Latest, Amazon EC2 uses the latest version of the launch template.

          If the value is $Default, Amazon EC2 uses the default version of the launch template.

      • Overrides — (Array<map>)

        Any parameters that you specify override the same parameters in the launch template.

        For fleets of type request and maintain, a maximum of 300 items is allowed across all launch templates.

        • InstanceType — (String)

          The instance type.

          Note: If you specify InstanceTypes, you can't specify InstanceRequirements.
          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • MaxPrice — (String)

          The maximum price per unit hour that you are willing to pay for a Spot Instance.

        • SubnetId — (String)

          The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, subnet-1234abcdeexample1, subnet-0987cdef6example2). A request of type instant can have only one subnet ID.

        • AvailabilityZone — (String)

          The Availability Zone in which to launch the instances.

        • WeightedCapacity — (Float)

          The number of units provided by the specified instance type.

        • Priority — (Float)

          The priority for the launch template override. The highest priority is launched first.

          If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

          If the Spot AllocationStrategy is set to capacity-optimized-prioritized, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

          Valid values are whole numbers starting at 0. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.

        • Placement — (map)

          The location where the instance launched, if applicable.

          • AvailabilityZone — (String)

            The Availability Zone of the instance.

            If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

            This parameter is not supported by CreateFleet.

          • Affinity — (String)

            The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

            This parameter is not supported by CreateFleet.

          • GroupName — (String)

            The name of the placement group the instance is in.

          • PartitionNumber — (Integer)

            The number of the partition the instance is in. Valid only if the placement group strategy is set to partition.

            This parameter is not supported by CreateFleet.

          • HostId — (String)

            The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

            This parameter is not supported by CreateFleet.

          • 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.

            This parameter is not supported by CreateFleet.

            T3 instances that use the unlimited CPU credit option do not support host tenancy.

            Possible values include:
            • "default"
            • "dedicated"
            • "host"
          • SpreadDomain — (String)

            Reserved for future use.

            This parameter is not supported by CreateFleet.

          • HostResourceGroupArn — (String)

            The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

            This parameter is not supported by CreateFleet.

        • InstanceRequirements — (map)

          The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

          Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
          • VCpuCountrequired — (map)

            The minimum and maximum number of vCPUs.

            • Minrequired — (Integer)

              The minimum number of vCPUs. To specify no minimum limit, specify 0.

            • Max — (Integer)

              The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

          • MemoryMiBrequired — (map)

            The minimum and maximum amount of memory, in MiB.

            • Minrequired — (Integer)

              The minimum amount of memory, in MiB. To specify no minimum limit, specify 0.

            • Max — (Integer)

              The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

          • CpuManufacturers — (Array<String>)

            The CPU manufacturers to include.

            • For instance types with Intel CPUs, specify intel.

            • For instance types with AMD CPUs, specify amd.

            • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

            Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

            Default: Any manufacturer

          • MemoryGiBPerVCpu — (map)

            The minimum and maximum amount of memory per vCPU, in GiB.

            Default: No minimum or maximum limits

            • Min — (Float)

              The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

            • Max — (Float)

              The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

          • ExcludedInstanceTypes — (Array<String>)

            The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

            For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

            Default: No excluded instance types

          • InstanceGenerations — (Array<String>)

            Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

            For current generation instance types, specify current.

            For previous generation instance types, specify previous.

            Default: Current and previous generation instance types

          • SpotMaxPricePercentageOverLowestPrice — (Integer)

            The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999.

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

            Default: 100

          • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

            The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999.

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

            Default: 20

          • BareMetal — (String)

            Indicates whether bare metal instance types must be included, excluded, or required.

            • To include bare metal instance types, specify included.

            • To require only bare metal instance types, specify required.

            • To exclude bare metal instance types, specify excluded.

            Default: excluded

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • BurstablePerformance — (String)

            Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

            • To include burstable performance instance types, specify included.

            • To require only burstable performance instance types, specify required.

            • To exclude burstable performance instance types, specify excluded.

            Default: excluded

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • RequireHibernateSupport — (Boolean)

            Indicates whether instance types must support hibernation for On-Demand Instances.

            This parameter is not supported for GetSpotPlacementScores.

            Default: false

          • NetworkInterfaceCount — (map)

            The minimum and maximum number of network interfaces.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

            • Max — (Integer)

              The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

          • LocalStorage — (String)

            Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

            • To include instance types with instance store volumes, specify included.

            • To require only instance types with instance store volumes, specify required.

            • To exclude instance types with instance store volumes, specify excluded.

            Default: included

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • LocalStorageTypes — (Array<String>)

            The type of local storage that is required.

            • For instance types with hard disk drive (HDD) storage, specify hdd.

            • For instance types with solid state drive (SDD) storage, specify sdd.

            Default: hdd and sdd

          • TotalLocalStorageGB — (map)

            The minimum and maximum amount of total local storage, in GB.

            Default: No minimum or maximum limits

            • Min — (Float)

              The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

            • Max — (Float)

              The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

          • BaselineEbsBandwidthMbps — (map)

            The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

            • Max — (Integer)

              The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

          • AcceleratorTypes — (Array<String>)

            The accelerator types that must be on the instance type.

            • To include instance types with GPU hardware, specify gpu.

            • To include instance types with FPGA hardware, specify fpga.

            • To include instance types with inference hardware, specify inference.

            Default: Any accelerator type

          • AcceleratorCount — (map)

            The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

            To exclude accelerator-enabled instance types, set Max to 0.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum number of accelerators. To specify no minimum limit, omit this parameter.

            • Max — (Integer)

              The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0.

          • AcceleratorManufacturers — (Array<String>)

            Indicates whether instance types must have accelerators by specific manufacturers.

            • For instance types with NVIDIA devices, specify nvidia.

            • For instance types with AMD devices, specify amd.

            • For instance types with Amazon Web Services devices, specify amazon-web-services.

            • For instance types with Xilinx devices, specify xilinx.

            Default: Any manufacturer

          • AcceleratorNames — (Array<String>)

            The accelerators that must be on the instance type.

            • For instance types with NVIDIA A100 GPUs, specify a100.

            • For instance types with NVIDIA V100 GPUs, specify v100.

            • For instance types with NVIDIA K80 GPUs, specify k80.

            • For instance types with NVIDIA T4 GPUs, specify t4.

            • For instance types with NVIDIA M60 GPUs, specify m60.

            • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

            • For instance types with Xilinx VU9P FPGAs, specify vu9p.

            Default: Any accelerator

          • AcceleratorTotalMemoryMiB — (map)

            The minimum and maximum amount of total accelerator memory, in MiB.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

            • Max — (Integer)

              The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

    • FleetId — (String)

      The ID of the EC2 Fleet.

    • TargetCapacitySpecification — (map)

      The size of the EC2 Fleet.

      • TotalTargetCapacityrequired — (Integer)

        The number of units to request, filled using DefaultTargetCapacityType.

      • OnDemandTargetCapacity — (Integer)

        The number of On-Demand units to request.

      • SpotTargetCapacity — (Integer)

        The number of Spot units to request.

      • DefaultTargetCapacityType — (String)

        The default TotalTargetCapacity, which is either Spot or On-Demand.

        Possible values include:
        • "spot"
        • "on-demand"
      • TargetCapacityUnitType — (String)

        The unit for the target capacity.

        Default: units (translates to number of instances)

        Possible values include:
        • "vcpu"
        • "memory-mib"
        • "units"
    • Context — (String)

      Reserved.

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)

        Is true if the request succeeds, and an error otherwise.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyFpgaImageAttribute(params = {}, callback) ⇒ AWS.Request

Modifies the specified attribute of the specified Amazon FPGA Image (AFI).

Service Reference:

Examples:

Calling the modifyFpgaImageAttribute operation

var params = {
  FpgaImageId: 'STRING_VALUE', /* required */
  Attribute: description | name | loadPermission | productCodes,
  Description: 'STRING_VALUE',
  DryRun: true || false,
  LoadPermission: {
    Add: [
      {
        Group: all,
        UserId: 'STRING_VALUE'
      },
      /* more items */
    ],
    Remove: [
      {
        Group: all,
        UserId: 'STRING_VALUE'
      },
      /* more items */
    ]
  },
  Name: 'STRING_VALUE',
  OperationType: add | remove,
  ProductCodes: [
    'STRING_VALUE',
    /* more items */
  ],
  UserGroups: [
    'STRING_VALUE',
    /* more items */
  ],
  UserIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.modifyFpgaImageAttribute(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.

    • FpgaImageId — (String)

      The ID of the AFI.

    • Attribute — (String)

      The name of the attribute.

      Possible values include:
      • "description"
      • "name"
      • "loadPermission"
      • "productCodes"
    • OperationType — (String)

      The operation type.

      Possible values include:
      • "add"
      • "remove"
    • UserIds — (Array<String>)

      The Amazon Web Services account IDs. This parameter is valid only when modifying the loadPermission attribute.

    • UserGroups — (Array<String>)

      The user groups. This parameter is valid only when modifying the loadPermission attribute.

    • ProductCodes — (Array<String>)

      The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid only when modifying the productCodes attribute.

    • LoadPermission — (map)

      The load permission for the AFI.

      • Add — (Array<map>)

        The load permissions to add.

        • Group — (String)

          The name of the group.

          Possible values include:
          • "all"
        • UserId — (String)

          The Amazon Web Services account ID.

      • Remove — (Array<map>)

        The load permissions to remove.

        • Group — (String)

          The name of the group.

          Possible values include:
          • "all"
        • UserId — (String)

          The Amazon Web Services account ID.

    • Description — (String)

      A description for the AFI.

    • Name — (String)

      A name for the AFI.

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:

      • FpgaImageAttribute — (map)

        Information about the attribute.

        • FpgaImageId — (String)

          The ID of the AFI.

        • Name — (String)

          The name of the AFI.

        • Description — (String)

          The description of the AFI.

        • LoadPermissions — (Array<map>)

          The load permissions.

          • UserId — (String)

            The Amazon Web Services account ID.

          • Group — (String)

            The name of the group.

            Possible values include:
            • "all"
        • ProductCodes — (Array<map>)

          The 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.

modifyHosts(params = {}, callback) ⇒ AWS.Request

Modify the auto-placement setting of a Dedicated Host. When auto-placement is enabled, any instances that you launch with a tenancy of host but without a specific host ID are placed onto any available Dedicated Host in your account that has auto-placement enabled. When auto-placement is disabled, you need to provide a host ID to have the instance launch onto a specific host. If no host ID is provided, the instance is launched onto a suitable host with auto-placement enabled.

You can also use this API action to modify a Dedicated Host to support either multiple instance types in an instance family, or to support a specific instance type only.

Service Reference:

Examples:

Calling the modifyHosts operation

var params = {
  HostIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  AutoPlacement: on | off,
  HostRecovery: on | off,
  InstanceFamily: 'STRING_VALUE',
  InstanceType: 'STRING_VALUE'
};
ec2.modifyHosts(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)

      Specify whether to enable or disable auto-placement.

      Possible values include:
      • "on"
      • "off"
    • HostIds — (Array<String>)

      The IDs of the Dedicated Hosts to modify.

    • HostRecovery — (String)

      Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see Host recovery in the Amazon EC2 User Guide.

      Possible values include:
      • "on"
      • "off"
    • InstanceType — (String)

      Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.

      If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.

    • InstanceFamily — (String)

      Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.

      If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType 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:

      • Successful — (Array<String>)

        The IDs of the Dedicated Hosts that were successfully modified.

      • Unsuccessful — (Array<map>)

        The IDs of the Dedicated Hosts that could not be modified. Check whether the setting you requested can be used.

        • Error — (map)

          Information about the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message accompanying the error code.

        • ResourceId — (String)

          The ID of the resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyIdentityIdFormat(params = {}, callback) ⇒ AWS.Request

Modifies the ID format of a resource for a specified IAM user, IAM role, or the root user for an account; or all IAM users, IAM roles, and the root user for an account. You can specify that resources should receive longer IDs (17-character IDs) when they are created.

This request can only be used to modify longer ID settings for resource types that are within the opt-in period. Resources currently in their opt-in period include: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide.

This setting applies to the principal specified in the request; it does not apply to the principal that makes the request.

Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant Describe command for the resource type.

Service Reference:

Examples:

Calling the modifyIdentityIdFormat operation

var params = {
  PrincipalArn: 'STRING_VALUE', /* required */
  Resource: 'STRING_VALUE', /* required */
  UseLongIds: true || false /* required */
};
ec2.modifyIdentityIdFormat(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: {})
    • PrincipalArn — (String)

      The ARN of the principal, which can be an IAM user, IAM role, or the root user. Specify all to modify the ID format for all IAM users, IAM roles, and the root user of the account.

    • Resource — (String)

      The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

      Alternatively, use the all-current option to include all resource types that are currently within their opt-in period for longer IDs.

    • UseLongIds — (Boolean)

      Indicates whether the resource should use longer IDs (17-character 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyIdFormat(params = {}, callback) ⇒ AWS.Request

Modifies the ID format for the specified resource on a per-Region basis. You can specify that resources should receive longer IDs (17-character IDs) when they are created.

This request can only be used to modify longer ID settings for resource types that are within the opt-in period. Resources currently in their opt-in period include: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

This setting applies to the IAM user who makes the request; it does not apply to the entire Amazon Web Services account. By default, an IAM user defaults to the same settings as the root user. If you're using this action as the root user, then these settings apply to the entire account, unless an IAM user explicitly overrides these settings for themselves. For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide.

Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant Describe command for the resource type.

Service Reference:

Examples:

Calling the modifyIdFormat operation

var params = {
  Resource: 'STRING_VALUE', /* required */
  UseLongIds: true || false /* required */
};
ec2.modifyIdFormat(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: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

      Alternatively, use the all-current option to include all resource types that are currently within their opt-in period for longer IDs.

    • UseLongIds — (Boolean)

      Indicate whether the resource should use longer IDs (17-character 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyImageAttribute(params = {}, callback) ⇒ AWS.Request

Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time. You can use the Attribute parameter to specify the attribute or one of the following parameters: Description or LaunchPermission.

Images with an Amazon Web Services Marketplace product code cannot be made public.

To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport on an instance and create an AMI from the instance.

Service Reference:

Examples:

To make an AMI public


/* This example makes the specified AMI public. */

 var params = {
  ImageId: "ami-5731123e", 
  LaunchPermission: {
   Add: [
      {
     Group: "all"
    }
   ]
  }
 };
 ec2.modifyImageAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

To grant launch permissions


/* This example grants launch permissions for the specified AMI to the specified AWS account. */

 var params = {
  ImageId: "ami-5731123e", 
  LaunchPermission: {
   Add: [
      {
     UserId: "123456789012"
    }
   ]
  }
 };
 ec2.modifyImageAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the modifyImageAttribute operation

var params = {
  ImageId: 'STRING_VALUE', /* required */
  Attribute: 'STRING_VALUE',
  Description: {
    Value: 'STRING_VALUE'
  },
  DryRun: true || false,
  LaunchPermission: {
    Add: [
      {
        Group: all,
        OrganizationArn: 'STRING_VALUE',
        OrganizationalUnitArn: 'STRING_VALUE',
        UserId: 'STRING_VALUE'
      },
      /* more items */
    ],
    Remove: [
      {
        Group: all,
        OrganizationArn: 'STRING_VALUE',
        OrganizationalUnitArn: 'STRING_VALUE',
        UserId: 'STRING_VALUE'
      },
      /* more items */
    ]
  },
  OperationType: add | remove,
  OrganizationArns: [
    'STRING_VALUE',
    /* more items */
  ],
  OrganizationalUnitArns: [
    'STRING_VALUE',
    /* more items */
  ],
  ProductCodes: [
    'STRING_VALUE',
    /* more items */
  ],
  UserGroups: [
    'STRING_VALUE',
    /* more items */
  ],
  UserIds: [
    'STRING_VALUE',
    /* more items */
  ],
  Value: 'STRING_VALUE'
};
ec2.modifyImageAttribute(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: {})
    • Attribute — (String)

      The name of the attribute to modify.

      Valid values: description | launchPermission

    • Description — (map)

      A new description for the AMI.

      • Value — (String)

        The attribute value. The value is case-sensitive.

    • ImageId — (String)

      The ID of the AMI.

    • LaunchPermission — (map)

      A new launch permission for the AMI.

      • Add — (Array<map>)

        The Amazon Web Services account ID to add to the list of launch permissions for the AMI.

        • Group — (String)

          The name of the group.

          Possible values include:
          • "all"
        • UserId — (String)

          The Amazon Web Services account ID.

          Constraints: Up to 10 000 account IDs can be specified in a single request.

        • OrganizationArn — (String)

          The Amazon Resource Name (ARN) of an organization.

        • OrganizationalUnitArn — (String)

          The Amazon Resource Name (ARN) of an organizational unit (OU).

      • Remove — (Array<map>)

        The Amazon Web Services account ID to remove from the list of launch permissions for the AMI.

        • Group — (String)

          The name of the group.

          Possible values include:
          • "all"
        • UserId — (String)

          The Amazon Web Services account ID.

          Constraints: Up to 10 000 account IDs can be specified in a single request.

        • OrganizationArn — (String)

          The Amazon Resource Name (ARN) of an organization.

        • OrganizationalUnitArn — (String)

          The Amazon Resource Name (ARN) of an organizational unit (OU).

    • OperationType — (String)

      The operation type. This parameter can be used only when the Attribute parameter is launchPermission.

      Possible values include:
      • "add"
      • "remove"
    • ProductCodes — (Array<String>)

      Not supported.

    • UserGroups — (Array<String>)

      The user groups. This parameter can be used only when the Attribute parameter is launchPermission.

    • UserIds — (Array<String>)

      The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is launchPermission.

    • Value — (String)

      The value of the attribute being modified. This parameter can be used only when the Attribute parameter is description.

    • 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.

    • OrganizationArns — (Array<String>)

      The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission.

    • OrganizationalUnitArns — (Array<String>)

      The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission.

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.

modifyInstanceAttribute(params = {}, callback) ⇒ AWS.Request

Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.

Note: Using this action to change the security groups associated with an elastic network interface (ENI) attached to an instance in a VPC can result in an error if the instance has more than one ENI. To change the security groups associated with an ENI attached to an instance that has multiple ENIs, we recommend that you use the ModifyNetworkInterfaceAttribute action.

To modify some attributes, the instance must be stopped. For more information, see Modifying attributes of a stopped instance in the Amazon EC2 User Guide.

Service Reference:

Examples:

To modify the instance type


/* This example modifies the instance type of the specified stopped instance. */

 var params = {
  InstanceId: "i-1234567890abcdef0", 
  InstanceType: {
   Value: "m5.large"
  }
 };
 ec2.modifyInstanceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

To enable enhanced networking


/* This example enables enhanced networking for the specified stopped instance. */

 var params = {
  EnaSupport: {
   Value: true
  }, 
  InstanceId: "i-1234567890abcdef0"
 };
 ec2.modifyInstanceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the modifyInstanceAttribute operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  Attribute: instanceType | kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport | enaSupport | enclaveOptions,
  BlockDeviceMappings: [
    {
      DeviceName: 'STRING_VALUE',
      Ebs: {
        DeleteOnTermination: true || false,
        VolumeId: 'STRING_VALUE'
      },
      NoDevice: 'STRING_VALUE',
      VirtualName: 'STRING_VALUE'
    },
    /* more items */
  ],
  DisableApiTermination: {
    Value: true || false
  },
  DryRun: true || false,
  EbsOptimized: {
    Value: true || false
  },
  EnaSupport: {
    Value: true || false
  },
  Groups: [
    'STRING_VALUE',
    /* more items */
  ],
  InstanceInitiatedShutdownBehavior: {
    Value: 'STRING_VALUE'
  },
  InstanceType: {
    Value: 'STRING_VALUE'
  },
  Kernel: {
    Value: 'STRING_VALUE'
  },
  Ramdisk: {
    Value: 'STRING_VALUE'
  },
  SourceDestCheck: {
    Value: true || false
  },
  SriovNetSupport: {
    Value: 'STRING_VALUE'
  },
  UserData: {
    Value: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */
  },
  Value: 'STRING_VALUE'
};
ec2.modifyInstanceAttribute(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: {})
    • SourceDestCheck — (map)

      Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is true, source/destination checks are enabled; otherwise, they are disabled. The default value is true. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.

      • Value — (Boolean)

        The attribute value. The valid values are true or false.

    • Attribute — (String)

      The name of the attribute.

      Possible values include:
      • "instanceType"
      • "kernel"
      • "ramdisk"
      • "userData"
      • "disableApiTermination"
      • "instanceInitiatedShutdownBehavior"
      • "rootDeviceName"
      • "blockDeviceMapping"
      • "productCodes"
      • "sourceDestCheck"
      • "groupSet"
      • "ebsOptimized"
      • "sriovNetSupport"
      • "enaSupport"
      • "enclaveOptions"
    • BlockDeviceMappings — (Array<map>)

      Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

      To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the block device mapping when launching an instance in the Amazon EC2 User Guide.

      • DeviceName — (String)

        The device name (for example, /dev/sdh or xvdh).

      • Ebs — (map)

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination — (Boolean)

          Indicates whether the volume is deleted on instance termination.

        • VolumeId — (String)

          The ID of the EBS volume.

      • NoDevice — (String)

        suppress the specified device included in the block device mapping.

      • VirtualName — (String)

        The virtual device name.

    • DisableApiTermination — (map)

      If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot Instances.

      • Value — (Boolean)

        The attribute value. The valid values are true or false.

    • 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.

    • EbsOptimized — (map)

      Specifies whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

      • Value — (Boolean)

        The attribute value. The valid values are true or false.

    • EnaSupport — (map)

      Set to true to enable enhanced networking with ENA for the instance.

      This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

      • Value — (Boolean)

        The attribute value. The valid values are true or false.

    • Groups — (Array<String>)

      [EC2-VPC] Replaces the security groups of the instance with the specified security groups. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

    • InstanceId — (String)

      The ID of the instance.

    • InstanceInitiatedShutdownBehavior — (map)

      Specifies 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. The value is case-sensitive.

    • InstanceType — (map)

      Changes the instance type to the specified value. For more information, see Instance types in the Amazon EC2 User Guide. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.

      • Value — (String)

        The attribute value. The value is case-sensitive.

    • Kernel — (map)

      Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.

      • Value — (String)

        The attribute value. The value is case-sensitive.

    • Ramdisk — (map)

      Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.

      • Value — (String)

        The attribute value. The value is case-sensitive.

    • SriovNetSupport — (map)

      Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.

      There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.

      This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

      • Value — (String)

        The attribute value. The value is case-sensitive.

    • UserData — (map)

      Changes the instance's user data to the specified value. If you are using an Amazon Web Services SDK or command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text.

      • Value — (Buffer, Typed Array, Blob, String)
    • Value — (String)

      A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or instanceInitiatedShutdownBehavior attribute.

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.

modifyInstanceCapacityReservationAttributes(params = {}, callback) ⇒ AWS.Request

Modifies the Capacity Reservation settings for a stopped instance. Use this action to configure an instance to target a specific Capacity Reservation, run in any open Capacity Reservation with matching attributes, or run On-Demand Instance capacity.

Examples:

Calling the modifyInstanceCapacityReservationAttributes operation

var params = {
  CapacityReservationSpecification: { /* required */
    CapacityReservationPreference: open | none,
    CapacityReservationTarget: {
      CapacityReservationId: 'STRING_VALUE',
      CapacityReservationResourceGroupArn: 'STRING_VALUE'
    }
  },
  InstanceId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.modifyInstanceCapacityReservationAttributes(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: {})
    • InstanceId — (String)

      The ID of the instance to be modified.

    • CapacityReservationSpecification — (map)

      Information about the Capacity Reservation targeting option.

      • CapacityReservationPreference — (String)

        Indicates the instance's Capacity Reservation preferences. Possible preferences include:

        • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

        • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.

        Possible values include:
        • "open"
        • "none"
      • CapacityReservationTarget — (map)

        Information about the target Capacity Reservation or Capacity Reservation group.

        • CapacityReservationId — (String)

          The ID of the Capacity Reservation in which to run the instance.

        • CapacityReservationResourceGroupArn — (String)

          The ARN of the Capacity Reservation resource group in which to run the instance.

    • 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:

      • 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.

modifyInstanceCreditSpecification(params = {}, callback) ⇒ AWS.Request

Modifies the credit option for CPU usage on a running or stopped burstable performance instance. The credit options are standard and unlimited.

For more information, see Burstable performance instances in the Amazon EC2 User Guide.

Examples:

Calling the modifyInstanceCreditSpecification operation

var params = {
  InstanceCreditSpecifications: [ /* required */
    {
      CpuCredits: 'STRING_VALUE',
      InstanceId: 'STRING_VALUE'
    },
    /* more items */
  ],
  ClientToken: 'STRING_VALUE',
  DryRun: true || false
};
ec2.modifyInstanceCreditSpecification(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.

    • ClientToken — (String)

      A unique, case-sensitive token that you provide to ensure idempotency of your modification request. For more information, see Ensuring Idempotency.

    • InstanceCreditSpecifications — (Array<map>)

      Information about the credit option for CPU usage.

      • InstanceId — (String)

        The ID of the instance.

      • CpuCredits — (String)

        The credit option for CPU usage of the instance. Valid values are standard and unlimited.

        T3 instances with host tenancy do not support the unlimited CPU credit option.

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:

      • SuccessfulInstanceCreditSpecifications — (Array<map>)

        Information about the instances whose credit option for CPU usage was successfully modified.

        • InstanceId — (String)

          The ID of the instance.

      • UnsuccessfulInstanceCreditSpecifications — (Array<map>)

        Information about the instances whose credit option for CPU usage was not modified.

        • InstanceId — (String)

          The ID of the instance.

        • Error — (map)

          The applicable error for the burstable performance instance whose credit option for CPU usage was not modified.

          • Code — (String)

            The error code.

            Possible values include:
            • "InvalidInstanceID.Malformed"
            • "InvalidInstanceID.NotFound"
            • "IncorrectInstanceState"
            • "InstanceCreditSpecification.NotSupported"
          • Message — (String)

            The applicable error message.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyInstanceEventStartTime(params = {}, callback) ⇒ AWS.Request

Modifies the start time for a scheduled Amazon EC2 instance event.

Service Reference:

Examples:

Calling the modifyInstanceEventStartTime operation

var params = {
  InstanceEventId: 'STRING_VALUE', /* required */
  InstanceId: 'STRING_VALUE', /* required */
  NotBefore: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  DryRun: true || false
};
ec2.modifyInstanceEventStartTime(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 with the scheduled event.

    • InstanceEventId — (String)

      The ID of the event whose date and time you are modifying.

    • NotBefore — (Date)

      The new date and time when the event will take place.

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:

      • Event — (map)

        Describes a scheduled event for an instance.

        • InstanceEventId — (String)

          The ID of the event.

        • 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].

        • NotAfter — (Date)

          The latest scheduled end time for the event.

        • NotBefore — (Date)

          The earliest scheduled start time for the event.

        • NotBeforeDeadline — (Date)

          The deadline for starting the event.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyInstanceEventWindow(params = {}, callback) ⇒ AWS.Request

Modifies the specified event window.

You can define either a set of time ranges or a cron expression when modifying the event window, but not both.

To modify the targets associated with the event window, use the AssociateInstanceEventWindow and DisassociateInstanceEventWindow API.

If Amazon Web Services has already scheduled an event, modifying an event window won't change the time of the scheduled event.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the modifyInstanceEventWindow operation

var params = {
  InstanceEventWindowId: 'STRING_VALUE', /* required */
  CronExpression: 'STRING_VALUE',
  DryRun: true || false,
  Name: 'STRING_VALUE',
  TimeRanges: [
    {
      EndHour: 'NUMBER_VALUE',
      EndWeekDay: sunday | monday | tuesday | wednesday | thursday | friday | saturday,
      StartHour: 'NUMBER_VALUE',
      StartWeekDay: sunday | monday | tuesday | wednesday | thursday | friday | saturday
    },
    /* more items */
  ]
};
ec2.modifyInstanceEventWindow(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.

    • Name — (String)

      The name of the event window.

    • InstanceEventWindowId — (String)

      The ID of the event window.

    • TimeRanges — (Array<map>)

      The time ranges of the event window.

      • StartWeekDay — (String)

        The day on which the time range begins.

        Possible values include:
        • "sunday"
        • "monday"
        • "tuesday"
        • "wednesday"
        • "thursday"
        • "friday"
        • "saturday"
      • StartHour — (Integer)

        The hour when the time range begins.

      • EndWeekDay — (String)

        The day on which the time range ends.

        Possible values include:
        • "sunday"
        • "monday"
        • "tuesday"
        • "wednesday"
        • "thursday"
        • "friday"
        • "saturday"
      • EndHour — (Integer)

        The hour when the time range ends.

    • CronExpression — (String)

      The cron expression of the event window, for example, * 0-4,20-23 * * 1,5.

      Constraints:

      • Only hour and day of the week values are supported.

      • For day of the week values, you can specify either integers 0 through 6, or alternative single values SUN through SAT.

      • The minute, month, and year must be specified by *.

      • The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23.

      • Each hour range must be >= 2 hours, for example, 0-2 or 20-23.

      • The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours.

      For more information about cron expressions, see cron on the Wikipedia website.

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:

      • InstanceEventWindow — (map)

        Information about the event window.

        • InstanceEventWindowId — (String)

          The ID of the event window.

        • TimeRanges — (Array<map>)

          One or more time ranges defined for the event window.

          • StartWeekDay — (String)

            The day on which the time range begins.

            Possible values include:
            • "sunday"
            • "monday"
            • "tuesday"
            • "wednesday"
            • "thursday"
            • "friday"
            • "saturday"
          • StartHour — (Integer)

            The hour when the time range begins.

          • EndWeekDay — (String)

            The day on which the time range ends.

            Possible values include:
            • "sunday"
            • "monday"
            • "tuesday"
            • "wednesday"
            • "thursday"
            • "friday"
            • "saturday"
          • EndHour — (Integer)

            The hour when the time range ends.

        • Name — (String)

          The name of the event window.

        • CronExpression — (String)

          The cron expression defined for the event window.

        • AssociationTarget — (map)

          One or more targets associated with the event window.

          • InstanceIds — (Array<String>)

            The IDs of the instances associated with the event window.

          • Tags — (Array<map>)

            The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.

            • 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.

          • DedicatedHostIds — (Array<String>)

            The IDs of the Dedicated Hosts associated with the event window.

        • State — (String)

          The current state of the event window.

          Possible values include:
          • "creating"
          • "deleting"
          • "active"
          • "deleted"
        • Tags — (Array<map>)

          The instance tags associated with the event window.

          • 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.

modifyInstanceMetadataOptions(params = {}, callback) ⇒ AWS.Request

Modify the instance metadata parameters on a running or stopped instance. When you modify the parameters on a stopped instance, they are applied when the instance is started. When you modify the parameters on a running instance, the API responds with a state of “pending”. After the parameter modifications are successfully applied to the instance, the state of the modifications changes from “pending” to “applied” in subsequent describe-instances API calls. For more information, see Instance metadata and user data in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the modifyInstanceMetadataOptions operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  HttpEndpoint: disabled | enabled,
  HttpProtocolIpv6: disabled | enabled,
  HttpPutResponseHopLimit: 'NUMBER_VALUE',
  HttpTokens: optional | required
};
ec2.modifyInstanceMetadataOptions(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: {})
    • InstanceId — (String)

      The ID of the instance.

    • HttpTokens — (String)

      The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

      If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

      If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

      Possible values include:
      • "optional"
      • "required"
    • HttpPutResponseHopLimit — (Integer)

      The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. If no parameter is specified, the existing state is maintained.

      Possible values: Integers from 1 to 64

    • HttpEndpoint — (String)

      This parameter enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the existing state is maintained.

      Note: If you specify a value of disabled, you will not be able to access your instance metadata.
      Possible values include:
      • "disabled"
      • "enabled"
    • 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.

    • HttpProtocolIpv6 — (String)

      Enables or disables the IPv6 endpoint for the instance metadata service.

      Possible values include:
      • "disabled"
      • "enabled"

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.

      • InstanceMetadataOptions — (map)

        The metadata options for the instance.

        • State — (String)

          The state of the metadata option changes.

          pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

          applied - The metadata options have been successfully applied on the instance.

          Possible values include:
          • "pending"
          • "applied"
        • HttpTokens — (String)

          The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

          If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

          If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

          Possible values include:
          • "optional"
          • "required"
        • HttpPutResponseHopLimit — (Integer)

          The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

          Default: 1

          Possible values: Integers from 1 to 64

        • HttpEndpoint — (String)

          Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

          Possible values include:
          • "disabled"
          • "enabled"
        • HttpProtocolIpv6 — (String)

          Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

          Possible values include:
          • "disabled"
          • "enabled"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyInstancePlacement(params = {}, callback) ⇒ AWS.Request

Modifies the placement attributes for a specified instance. You can do the following:

  • Modify the affinity between an instance and a Dedicated Host. When affinity is set to host and the instance is not associated with a specific Dedicated Host, the next time the instance is launched, it is automatically associated with the host on which it lands. If the instance is restarted or rebooted, this relationship persists.

  • Change the Dedicated Host with which an instance is associated.

  • Change the instance tenancy of an instance.

  • Move an instance to or from a placement group.

At least one attribute for affinity, host ID, tenancy, or placement group name must be specified in the request. Affinity and tenancy can be modified in the same request.

To modify the host ID, tenancy, placement group, or partition for an instance, the instance must be in the stopped state.

Service Reference:

Examples:

Calling the modifyInstancePlacement operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  Affinity: default | host,
  GroupName: 'STRING_VALUE',
  HostId: 'STRING_VALUE',
  HostResourceGroupArn: 'STRING_VALUE',
  PartitionNumber: 'NUMBER_VALUE',
  Tenancy: dedicated | host
};
ec2.modifyInstancePlacement(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: {})
    • Affinity — (String)

      The affinity setting for the instance.

      Possible values include:
      • "default"
      • "host"
    • GroupName — (String)

      The name of the placement group in which to place the instance. For spread placement groups, the instance must have a tenancy of default. For cluster and partition placement groups, the instance must have a tenancy of default or dedicated.

      To remove an instance from a placement group, specify an empty string ("").

    • HostId — (String)

      The ID of the Dedicated Host with which to associate the instance.

    • InstanceId — (String)

      The ID of the instance that you are modifying.

    • Tenancy — (String)

      The tenancy for the instance.

      Note: For T3 instances, you can't change the tenancy from dedicated to host, or from host to dedicated. Attempting to make one of these unsupported tenancy changes results in the InvalidTenancy error code.
      Possible values include:
      • "dedicated"
      • "host"
    • PartitionNumber — (Integer)

      Reserved for future use.

    • HostResourceGroupArn — (String)

      The ARN of the host resource group in which to place 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:

      • Return — (Boolean)

        Is true if the request succeeds, and an error otherwise.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyLaunchTemplate(params = {}, callback) ⇒ AWS.Request

Modifies a launch template. You can specify which version of the launch template to set as the default version. When launching an instance, the default version applies when a launch template version is not specified.

Service Reference:

Examples:

To change the default version of a launch template


/* This example specifies version 2 as the default version of the specified launch template. */

 var params = {
  DefaultVersion: "2", 
  LaunchTemplateId: "lt-0abcd290751193123"
 };
 ec2.modifyLaunchTemplate(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    LaunchTemplate: {
     CreateTime: <Date Representation>, 
     CreatedBy: "arn:aws:iam::123456789012:root", 
     DefaultVersionNumber: 2, 
     LatestVersionNumber: 2, 
     LaunchTemplateId: "lt-0abcd290751193123", 
     LaunchTemplateName: "WebServers"
    }
   }
   */
 });

Calling the modifyLaunchTemplate operation

var params = {
  ClientToken: 'STRING_VALUE',
  DefaultVersion: 'STRING_VALUE',
  DryRun: true || false,
  LaunchTemplateId: 'STRING_VALUE',
  LaunchTemplateName: 'STRING_VALUE'
};
ec2.modifyLaunchTemplate(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.

    • ClientToken — (String)

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

      Constraint: Maximum 128 ASCII characters.

    • LaunchTemplateId — (String)

      The ID of the launch template. You must specify either the launch template ID or launch template name in the request.

    • LaunchTemplateName — (String)

      The name of the launch template. You must specify either the launch template ID or launch template name in the request.

    • DefaultVersion — (String)

      The version number of the launch template to set as the default version.

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:

      • LaunchTemplate — (map)

        Information about the launch template.

        • LaunchTemplateId — (String)

          The ID of the launch template.

        • LaunchTemplateName — (String)

          The name of the launch template.

        • CreateTime — (Date)

          The time launch template was created.

        • CreatedBy — (String)

          The principal that created the launch template.

        • DefaultVersionNumber — (Integer)

          The version number of the default version of the launch template.

        • LatestVersionNumber — (Integer)

          The version number of the latest version of the launch template.

        • Tags — (Array<map>)

          The tags for the launch template.

          • 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.

modifyManagedPrefixList(params = {}, callback) ⇒ AWS.Request

Modifies the specified managed prefix list.

Adding or removing entries in a prefix list creates a new version of the prefix list. Changing the name of the prefix list does not affect the version.

If you specify a current version number that does not match the true current version number, the request fails.

Service Reference:

Examples:

Calling the modifyManagedPrefixList operation

var params = {
  PrefixListId: 'STRING_VALUE', /* required */
  AddEntries: [
    {
      Cidr: 'STRING_VALUE', /* required */
      Description: 'STRING_VALUE'
    },
    /* more items */
  ],
  CurrentVersion: 'NUMBER_VALUE',
  DryRun: true || false,
  MaxEntries: 'NUMBER_VALUE',
  PrefixListName: 'STRING_VALUE',
  RemoveEntries: [
    {
      Cidr: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
ec2.modifyManagedPrefixList(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.

    • PrefixListId — (String)

      The ID of the prefix list.

    • CurrentVersion — (Integer)

      The current version of the prefix list.

    • PrefixListName — (String)

      A name for the prefix list.

    • AddEntries — (Array<map>)

      One or more entries to add to the prefix list.

      • Cidrrequired — (String)

        The CIDR block.

      • Description — (String)

        A description for the entry.

        Constraints: Up to 255 characters in length.

    • RemoveEntries — (Array<map>)

      One or more entries to remove from the prefix list.

      • Cidrrequired — (String)

        The CIDR block.

    • MaxEntries — (Integer)

      The maximum number of entries for the prefix list. You cannot modify the entries of a prefix list and modify the size of a prefix list at the same time.

      If any of the resources that reference the prefix list cannot support the new maximum size, the modify operation fails. Check the state message for the IDs of the first ten resources that do not support the new maximum size.

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:

      • PrefixList — (map)

        Information about the prefix list.

        • PrefixListId — (String)

          The ID of the prefix list.

        • AddressFamily — (String)

          The IP address version.

        • State — (String)

          The current state of the prefix list.

          Possible values include:
          • "create-in-progress"
          • "create-complete"
          • "create-failed"
          • "modify-in-progress"
          • "modify-complete"
          • "modify-failed"
          • "restore-in-progress"
          • "restore-complete"
          • "restore-failed"
          • "delete-in-progress"
          • "delete-complete"
          • "delete-failed"
        • StateMessage — (String)

          The state message.

        • PrefixListArn — (String)

          The Amazon Resource Name (ARN) for the prefix list.

        • PrefixListName — (String)

          The name of the prefix list.

        • MaxEntries — (Integer)

          The maximum number of entries for the prefix list.

        • Version — (Integer)

          The version of the prefix list.

        • Tags — (Array<map>)

          The tags for the prefix list.

          • 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.

        • OwnerId — (String)

          The ID of the owner of the prefix list.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyNetworkInterfaceAttribute(params = {}, callback) ⇒ AWS.Request

Modifies the specified network interface attribute. You can specify only one attribute at a time. You can use this action to attach and detach security groups from an existing EC2 instance.

Service Reference:

Examples:

To modify the attachment attribute of a network interface


/* This example modifies the attachment attribute of the specified network interface. */

 var params = {
  Attachment: {
   AttachmentId: "eni-attach-43348162", 
   DeleteOnTermination: false
  }, 
  NetworkInterfaceId: "eni-686ea200"
 };
 ec2.modifyNetworkInterfaceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

To modify the description attribute of a network interface


/* This example modifies the description attribute of the specified network interface. */

 var params = {
  Description: {
   Value: "My description"
  }, 
  NetworkInterfaceId: "eni-686ea200"
 };
 ec2.modifyNetworkInterfaceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

To modify the groupSet attribute of a network interface


/* This example command modifies the groupSet attribute of the specified network interface. */

 var params = {
  Groups: [
     "sg-903004f8", 
     "sg-1a2b3c4d"
  ], 
  NetworkInterfaceId: "eni-686ea200"
 };
 ec2.modifyNetworkInterfaceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

To modify the sourceDestCheck attribute of a network interface


/* This example command modifies the sourceDestCheck attribute of the specified network interface. */

 var params = {
  NetworkInterfaceId: "eni-686ea200", 
  SourceDestCheck: {
   Value: false
  }
 };
 ec2.modifyNetworkInterfaceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the modifyNetworkInterfaceAttribute operation

var params = {
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  Attachment: {
    AttachmentId: 'STRING_VALUE',
    DeleteOnTermination: true || false
  },
  Description: {
    Value: 'STRING_VALUE'
  },
  DryRun: true || false,
  Groups: [
    'STRING_VALUE',
    /* more items */
  ],
  SourceDestCheck: {
    Value: true || false
  }
};
ec2.modifyNetworkInterfaceAttribute(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: {})
    • Attachment — (map)

      Information about the interface attachment. If modifying the 'delete on termination' attribute, you must specify the ID of the interface attachment.

      • AttachmentId — (String)

        The ID of the network interface attachment.

      • DeleteOnTermination — (Boolean)

        Indicates whether the network interface is deleted when the instance is terminated.

    • Description — (map)

      A description for the network interface.

      • Value — (String)

        The attribute value. The value is case-sensitive.

    • 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.

    • Groups — (Array<String>)

      Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.

    • NetworkInterfaceId — (String)

      The ID of the network interface.

    • SourceDestCheck — (map)

      Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is true, source/destination checks are enabled; otherwise, they are disabled. The default value is true. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.

      • Value — (Boolean)

        The attribute value. The valid values are true or 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyReservedInstances(params = {}, callback) ⇒ AWS.Request

Modifies the Availability Zone, instance count, instance type, or network platform (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved Instances to be modified must be identical, except for Availability Zone, network platform, and instance type.

For more information, see Modifying Reserved Instances in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the modifyReservedInstances operation

var params = {
  ReservedInstancesIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  TargetConfigurations: [ /* required */
    {
      AvailabilityZone: 'STRING_VALUE',
      InstanceCount: 'NUMBER_VALUE',
      InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
      Platform: 'STRING_VALUE',
      Scope: Availability Zone | Region
    },
    /* more items */
  ],
  ClientToken: 'STRING_VALUE'
};
ec2.modifyReservedInstances(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: {})
    • ReservedInstancesIds — (Array<String>)

      The IDs of the Reserved Instances to modify.

    • ClientToken — (String)

      A unique, case-sensitive token you provide to ensure idempotency of your modification request. For more information, see Ensuring Idempotency.

    • TargetConfigurations — (Array<map>)

      The configuration settings for the Reserved Instances to modify.

      • AvailabilityZone — (String)

        The Availability Zone for the modified Reserved Instances.

      • InstanceCount — (Integer)

        The number of modified Reserved Instances.

        Note: This is a required field for a request.
      • 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"
        • "t2.xlarge"
        • "t2.2xlarge"
        • "t3.nano"
        • "t3.micro"
        • "t3.small"
        • "t3.medium"
        • "t3.large"
        • "t3.xlarge"
        • "t3.2xlarge"
        • "t3a.nano"
        • "t3a.micro"
        • "t3a.small"
        • "t3a.medium"
        • "t3a.large"
        • "t3a.xlarge"
        • "t3a.2xlarge"
        • "t4g.nano"
        • "t4g.micro"
        • "t4g.small"
        • "t4g.medium"
        • "t4g.large"
        • "t4g.xlarge"
        • "t4g.2xlarge"
        • "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"
        • "m4.16xlarge"
        • "m2.xlarge"
        • "m2.2xlarge"
        • "m2.4xlarge"
        • "cr1.8xlarge"
        • "r3.large"
        • "r3.xlarge"
        • "r3.2xlarge"
        • "r3.4xlarge"
        • "r3.8xlarge"
        • "r4.large"
        • "r4.xlarge"
        • "r4.2xlarge"
        • "r4.4xlarge"
        • "r4.8xlarge"
        • "r4.16xlarge"
        • "r5.large"
        • "r5.xlarge"
        • "r5.2xlarge"
        • "r5.4xlarge"
        • "r5.8xlarge"
        • "r5.12xlarge"
        • "r5.16xlarge"
        • "r5.24xlarge"
        • "r5.metal"
        • "r5a.large"
        • "r5a.xlarge"
        • "r5a.2xlarge"
        • "r5a.4xlarge"
        • "r5a.8xlarge"
        • "r5a.12xlarge"
        • "r5a.16xlarge"
        • "r5a.24xlarge"
        • "r5b.large"
        • "r5b.xlarge"
        • "r5b.2xlarge"
        • "r5b.4xlarge"
        • "r5b.8xlarge"
        • "r5b.12xlarge"
        • "r5b.16xlarge"
        • "r5b.24xlarge"
        • "r5b.metal"
        • "r5d.large"
        • "r5d.xlarge"
        • "r5d.2xlarge"
        • "r5d.4xlarge"
        • "r5d.8xlarge"
        • "r5d.12xlarge"
        • "r5d.16xlarge"
        • "r5d.24xlarge"
        • "r5d.metal"
        • "r5ad.large"
        • "r5ad.xlarge"
        • "r5ad.2xlarge"
        • "r5ad.4xlarge"
        • "r5ad.8xlarge"
        • "r5ad.12xlarge"
        • "r5ad.16xlarge"
        • "r5ad.24xlarge"
        • "r6g.metal"
        • "r6g.medium"
        • "r6g.large"
        • "r6g.xlarge"
        • "r6g.2xlarge"
        • "r6g.4xlarge"
        • "r6g.8xlarge"
        • "r6g.12xlarge"
        • "r6g.16xlarge"
        • "r6gd.metal"
        • "r6gd.medium"
        • "r6gd.large"
        • "r6gd.xlarge"
        • "r6gd.2xlarge"
        • "r6gd.4xlarge"
        • "r6gd.8xlarge"
        • "r6gd.12xlarge"
        • "r6gd.16xlarge"
        • "x1.16xlarge"
        • "x1.32xlarge"
        • "x1e.xlarge"
        • "x1e.2xlarge"
        • "x1e.4xlarge"
        • "x1e.8xlarge"
        • "x1e.16xlarge"
        • "x1e.32xlarge"
        • "i2.xlarge"
        • "i2.2xlarge"
        • "i2.4xlarge"
        • "i2.8xlarge"
        • "i3.large"
        • "i3.xlarge"
        • "i3.2xlarge"
        • "i3.4xlarge"
        • "i3.8xlarge"
        • "i3.16xlarge"
        • "i3.metal"
        • "i3en.large"
        • "i3en.xlarge"
        • "i3en.2xlarge"
        • "i3en.3xlarge"
        • "i3en.6xlarge"
        • "i3en.12xlarge"
        • "i3en.24xlarge"
        • "i3en.metal"
        • "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"
        • "c5.large"
        • "c5.xlarge"
        • "c5.2xlarge"
        • "c5.4xlarge"
        • "c5.9xlarge"
        • "c5.12xlarge"
        • "c5.18xlarge"
        • "c5.24xlarge"
        • "c5.metal"
        • "c5a.large"
        • "c5a.xlarge"
        • "c5a.2xlarge"
        • "c5a.4xlarge"
        • "c5a.8xlarge"
        • "c5a.12xlarge"
        • "c5a.16xlarge"
        • "c5a.24xlarge"
        • "c5ad.large"
        • "c5ad.xlarge"
        • "c5ad.2xlarge"
        • "c5ad.4xlarge"
        • "c5ad.8xlarge"
        • "c5ad.12xlarge"
        • "c5ad.16xlarge"
        • "c5ad.24xlarge"
        • "c5d.large"
        • "c5d.xlarge"
        • "c5d.2xlarge"
        • "c5d.4xlarge"
        • "c5d.9xlarge"
        • "c5d.12xlarge"
        • "c5d.18xlarge"
        • "c5d.24xlarge"
        • "c5d.metal"
        • "c5n.large"
        • "c5n.xlarge"
        • "c5n.2xlarge"
        • "c5n.4xlarge"
        • "c5n.9xlarge"
        • "c5n.18xlarge"
        • "c5n.metal"
        • "c6g.metal"
        • "c6g.medium"
        • "c6g.large"
        • "c6g.xlarge"
        • "c6g.2xlarge"
        • "c6g.4xlarge"
        • "c6g.8xlarge"
        • "c6g.12xlarge"
        • "c6g.16xlarge"
        • "c6gd.metal"
        • "c6gd.medium"
        • "c6gd.large"
        • "c6gd.xlarge"
        • "c6gd.2xlarge"
        • "c6gd.4xlarge"
        • "c6gd.8xlarge"
        • "c6gd.12xlarge"
        • "c6gd.16xlarge"
        • "c6gn.medium"
        • "c6gn.large"
        • "c6gn.xlarge"
        • "c6gn.2xlarge"
        • "c6gn.4xlarge"
        • "c6gn.8xlarge"
        • "c6gn.12xlarge"
        • "c6gn.16xlarge"
        • "cc1.4xlarge"
        • "cc2.8xlarge"
        • "g2.2xlarge"
        • "g2.8xlarge"
        • "g3.4xlarge"
        • "g3.8xlarge"
        • "g3.16xlarge"
        • "g3s.xlarge"
        • "g4ad.xlarge"
        • "g4ad.2xlarge"
        • "g4ad.4xlarge"
        • "g4ad.8xlarge"
        • "g4ad.16xlarge"
        • "g4dn.xlarge"
        • "g4dn.2xlarge"
        • "g4dn.4xlarge"
        • "g4dn.8xlarge"
        • "g4dn.12xlarge"
        • "g4dn.16xlarge"
        • "g4dn.metal"
        • "cg1.4xlarge"
        • "p2.xlarge"
        • "p2.8xlarge"
        • "p2.16xlarge"
        • "p3.2xlarge"
        • "p3.8xlarge"
        • "p3.16xlarge"
        • "p3dn.24xlarge"
        • "p4d.24xlarge"
        • "d2.xlarge"
        • "d2.2xlarge"
        • "d2.4xlarge"
        • "d2.8xlarge"
        • "d3.xlarge"
        • "d3.2xlarge"
        • "d3.4xlarge"
        • "d3.8xlarge"
        • "d3en.xlarge"
        • "d3en.2xlarge"
        • "d3en.4xlarge"
        • "d3en.6xlarge"
        • "d3en.8xlarge"
        • "d3en.12xlarge"
        • "dl1.24xlarge"
        • "f1.2xlarge"
        • "f1.4xlarge"
        • "f1.16xlarge"
        • "m5.large"
        • "m5.xlarge"
        • "m5.2xlarge"
        • "m5.4xlarge"
        • "m5.8xlarge"
        • "m5.12xlarge"
        • "m5.16xlarge"
        • "m5.24xlarge"
        • "m5.metal"
        • "m5a.large"
        • "m5a.xlarge"
        • "m5a.2xlarge"
        • "m5a.4xlarge"
        • "m5a.8xlarge"
        • "m5a.12xlarge"
        • "m5a.16xlarge"
        • "m5a.24xlarge"
        • "m5d.large"
        • "m5d.xlarge"
        • "m5d.2xlarge"
        • "m5d.4xlarge"
        • "m5d.8xlarge"
        • "m5d.12xlarge"
        • "m5d.16xlarge"
        • "m5d.24xlarge"
        • "m5d.metal"
        • "m5ad.large"
        • "m5ad.xlarge"
        • "m5ad.2xlarge"
        • "m5ad.4xlarge"
        • "m5ad.8xlarge"
        • "m5ad.12xlarge"
        • "m5ad.16xlarge"
        • "m5ad.24xlarge"
        • "m5zn.large"
        • "m5zn.xlarge"
        • "m5zn.2xlarge"
        • "m5zn.3xlarge"
        • "m5zn.6xlarge"
        • "m5zn.12xlarge"
        • "m5zn.metal"
        • "h1.2xlarge"
        • "h1.4xlarge"
        • "h1.8xlarge"
        • "h1.16xlarge"
        • "z1d.large"
        • "z1d.xlarge"
        • "z1d.2xlarge"
        • "z1d.3xlarge"
        • "z1d.6xlarge"
        • "z1d.12xlarge"
        • "z1d.metal"
        • "u-6tb1.56xlarge"
        • "u-6tb1.112xlarge"
        • "u-9tb1.112xlarge"
        • "u-12tb1.112xlarge"
        • "u-6tb1.metal"
        • "u-9tb1.metal"
        • "u-12tb1.metal"
        • "u-18tb1.metal"
        • "u-24tb1.metal"
        • "a1.medium"
        • "a1.large"
        • "a1.xlarge"
        • "a1.2xlarge"
        • "a1.4xlarge"
        • "a1.metal"
        • "m5dn.large"
        • "m5dn.xlarge"
        • "m5dn.2xlarge"
        • "m5dn.4xlarge"
        • "m5dn.8xlarge"
        • "m5dn.12xlarge"
        • "m5dn.16xlarge"
        • "m5dn.24xlarge"
        • "m5dn.metal"
        • "m5n.large"
        • "m5n.xlarge"
        • "m5n.2xlarge"
        • "m5n.4xlarge"
        • "m5n.8xlarge"
        • "m5n.12xlarge"
        • "m5n.16xlarge"
        • "m5n.24xlarge"
        • "m5n.metal"
        • "r5dn.large"
        • "r5dn.xlarge"
        • "r5dn.2xlarge"
        • "r5dn.4xlarge"
        • "r5dn.8xlarge"
        • "r5dn.12xlarge"
        • "r5dn.16xlarge"
        • "r5dn.24xlarge"
        • "r5dn.metal"
        • "r5n.large"
        • "r5n.xlarge"
        • "r5n.2xlarge"
        • "r5n.4xlarge"
        • "r5n.8xlarge"
        • "r5n.12xlarge"
        • "r5n.16xlarge"
        • "r5n.24xlarge"
        • "r5n.metal"
        • "inf1.xlarge"
        • "inf1.2xlarge"
        • "inf1.6xlarge"
        • "inf1.24xlarge"
        • "m6g.metal"
        • "m6g.medium"
        • "m6g.large"
        • "m6g.xlarge"
        • "m6g.2xlarge"
        • "m6g.4xlarge"
        • "m6g.8xlarge"
        • "m6g.12xlarge"
        • "m6g.16xlarge"
        • "m6gd.metal"
        • "m6gd.medium"
        • "m6gd.large"
        • "m6gd.xlarge"
        • "m6gd.2xlarge"
        • "m6gd.4xlarge"
        • "m6gd.8xlarge"
        • "m6gd.12xlarge"
        • "m6gd.16xlarge"
        • "m6i.large"
        • "m6i.xlarge"
        • "m6i.2xlarge"
        • "m6i.4xlarge"
        • "m6i.8xlarge"
        • "m6i.12xlarge"
        • "m6i.16xlarge"
        • "m6i.24xlarge"
        • "m6i.32xlarge"
        • "mac1.metal"
        • "x2gd.medium"
        • "x2gd.large"
        • "x2gd.xlarge"
        • "x2gd.2xlarge"
        • "x2gd.4xlarge"
        • "x2gd.8xlarge"
        • "x2gd.12xlarge"
        • "x2gd.16xlarge"
        • "x2gd.metal"
        • "vt1.3xlarge"
        • "vt1.6xlarge"
        • "vt1.24xlarge"
      • Platform — (String)

        The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.

      • Scope — (String)

        Whether the Reserved Instance is applied to instances in a Region or instances in a specific Availability Zone.

        Possible values include:
        • "Availability Zone"
        • "Region"

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:

      • ReservedInstancesModificationId — (String)

        The ID for the modification.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifySecurityGroupRules(params = {}, callback) ⇒ AWS.Request

Modifies the rules of a security group.

Service Reference:

Examples:

Calling the modifySecurityGroupRules operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  SecurityGroupRules: [ /* required */
    {
      SecurityGroupRule: {
        CidrIpv4: 'STRING_VALUE',
        CidrIpv6: 'STRING_VALUE',
        Description: 'STRING_VALUE',
        FromPort: 'NUMBER_VALUE',
        IpProtocol: 'STRING_VALUE',
        PrefixListId: 'STRING_VALUE',
        ReferencedGroupId: 'STRING_VALUE',
        ToPort: 'NUMBER_VALUE'
      },
      SecurityGroupRuleId: 'STRING_VALUE'
    },
    /* more items */
  ],
  DryRun: true || false
};
ec2.modifySecurityGroupRules(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: {})
    • GroupId — (String)

      The ID of the security group.

    • SecurityGroupRules — (Array<map>)

      Information about the security group properties to update.

      • SecurityGroupRuleId — (String)

        The ID of the security group rule.

      • SecurityGroupRule — (map)

        Information about the security group rule.

        • IpProtocol — (String)

          The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

          Use -1 to specify all protocols.

        • FromPort — (Integer)

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • ToPort — (Integer)

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • CidrIpv4 — (String)

          The IPv4 CIDR range. To specify a single IPv4 address, use the /32 prefix length.

        • CidrIpv6 — (String)

          The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix length.

        • PrefixListId — (String)

          The ID of the prefix list.

        • ReferencedGroupId — (String)

          The ID of the security group that is referenced in the security group rule.

        • Description — (String)

          The description of the security group rule.

    • 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:

      • Return — (Boolean)

        Returns true if the request succeeds; otherwise, returns an error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifySnapshotAttribute(params = {}, callback) ⇒ AWS.Request

Adds or removes permission settings for the specified snapshot. You may add or remove specified Amazon Web Services account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single operation. If you need to both add and remove account IDs for a snapshot, you must use multiple operations. You can make up to 500 modifications to a snapshot in a single operation.

Encrypted snapshots and snapshots with Amazon Web Services Marketplace product codes cannot be made public. Snapshots encrypted with your default KMS key cannot be shared with other accounts.

For more information about modifying snapshot permissions, see Share a snapshot in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To modify a snapshot attribute


/* This example modifies snapshot ``snap-1234567890abcdef0`` to remove the create volume permission for a user with the account ID ``123456789012``. If the command succeeds, no output is returned. */

 var params = {
  Attribute: "createVolumePermission", 
  OperationType: "remove", 
  SnapshotId: "snap-1234567890abcdef0", 
  UserIds: [
     "123456789012"
  ]
 };
 ec2.modifySnapshotAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

To make a snapshot public


/* This example makes the snapshot ``snap-1234567890abcdef0`` public. */

 var params = {
  Attribute: "createVolumePermission", 
  GroupNames: [
     "all"
  ], 
  OperationType: "add", 
  SnapshotId: "snap-1234567890abcdef0"
 };
 ec2.modifySnapshotAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the modifySnapshotAttribute operation

var params = {
  SnapshotId: 'STRING_VALUE', /* required */
  Attribute: productCodes | createVolumePermission,
  CreateVolumePermission: {
    Add: [
      {
        Group: all,
        UserId: 'STRING_VALUE'
      },
      /* more items */
    ],
    Remove: [
      {
        Group: all,
        UserId: 'STRING_VALUE'
      },
      /* more items */
    ]
  },
  DryRun: true || false,
  GroupNames: [
    'STRING_VALUE',
    /* more items */
  ],
  OperationType: add | remove,
  UserIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.modifySnapshotAttribute(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: {})
    • Attribute — (String)

      The snapshot attribute to modify. Only volume creation permissions can be modified.

      Possible values include:
      • "productCodes"
      • "createVolumePermission"
    • CreateVolumePermission — (map)

      A JSON representation of the snapshot attribute modification.

      • Add — (Array<map>)

        Adds the specified Amazon Web Services account ID or group to the list.

        • Group — (String)

          The group to be added or removed. The possible value is all.

          Possible values include:
          • "all"
        • UserId — (String)

          The ID of the Amazon Web Services account to be added or removed.

      • Remove — (Array<map>)

        Removes the specified Amazon Web Services account ID or group from the list.

        • Group — (String)

          The group to be added or removed. The possible value is all.

          Possible values include:
          • "all"
        • UserId — (String)

          The ID of the Amazon Web Services account to be added or removed.

    • GroupNames — (Array<String>)

      The group to modify for the snapshot.

    • OperationType — (String)

      The type of operation to perform to the attribute.

      Possible values include:
      • "add"
      • "remove"
    • SnapshotId — (String)

      The ID of the snapshot.

    • UserIds — (Array<String>)

      The account ID to modify for the snapshot.

    • 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.

modifySpotFleetRequest(params = {}, callback) ⇒ AWS.Request

Modifies the specified Spot Fleet request.

You can only modify a Spot Fleet request of type maintain.

While the Spot Fleet request is being modified, it is in the modifying state.

To scale up your Spot Fleet, increase its target capacity. The Spot Fleet launches the additional Spot Instances according to the allocation strategy for the Spot Fleet request. If the allocation strategy is lowestPrice, the Spot Fleet launches instances using the Spot Instance pool with the lowest price. If the allocation strategy is diversified, the Spot Fleet distributes the instances across the Spot Instance pools. If the allocation strategy is capacityOptimized, Spot Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.

To scale down your Spot Fleet, decrease its target capacity. First, the Spot Fleet cancels any open requests that exceed the new target capacity. You can request that the Spot Fleet terminate Spot Instances until the size of the fleet no longer exceeds the new target capacity. If the allocation strategy is lowestPrice, the Spot Fleet terminates the instances with the highest price per unit. If the allocation strategy is capacityOptimized, the Spot Fleet terminates the instances in the Spot Instance pools that have the least available Spot Instance capacity. If the allocation strategy is diversified, the Spot Fleet terminates instances across the Spot Instance pools. Alternatively, you can request that the Spot Fleet keep the fleet at its current size, but not replace any Spot Instances that are interrupted or that you terminate manually.

If you are finished with your Spot Fleet for now, but will use it again later, you can set the target capacity to 0.

Service Reference:

Examples:

To increase the target capacity of a Spot fleet request


/* This example increases the target capacity of the specified Spot fleet request. */

 var params = {
  SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
  TargetCapacity: 20
 };
 ec2.modifySpotFleetRequest(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Return: true
   }
   */
 });

To decrease the target capacity of a Spot fleet request


/* This example decreases the target capacity of the specified Spot fleet request without terminating any Spot Instances as a result. */

 var params = {
  ExcessCapacityTerminationPolicy: "NoTermination ", 
  SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
  TargetCapacity: 10
 };
 ec2.modifySpotFleetRequest(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Return: true
   }
   */
 });

Calling the modifySpotFleetRequest operation

var params = {
  SpotFleetRequestId: 'STRING_VALUE', /* required */
  Context: 'STRING_VALUE',
  ExcessCapacityTerminationPolicy: noTermination | default,
  LaunchTemplateConfigs: [
    {
      LaunchTemplateSpecification: {
        LaunchTemplateId: 'STRING_VALUE',
        LaunchTemplateName: 'STRING_VALUE',
        Version: 'STRING_VALUE'
      },
      Overrides: [
        {
          AvailabilityZone: 'STRING_VALUE',
          InstanceRequirements: {
            AcceleratorCount: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            AcceleratorManufacturers: [
              nvidia | amd | amazon-web-services | xilinx,
              /* more items */
            ],
            AcceleratorNames: [
              a100 | v100 | k80 | t4 | m60 | radeon-pro-v520 | vu9p,
              /* more items */
            ],
            AcceleratorTotalMemoryMiB: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            AcceleratorTypes: [
              gpu | fpga | inference,
              /* more items */
            ],
            BareMetal: included | required | excluded,
            BaselineEbsBandwidthMbps: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            BurstablePerformance: included | required | excluded,
            CpuManufacturers: [
              intel | amd | amazon-web-services,
              /* more items */
            ],
            ExcludedInstanceTypes: [
              'STRING_VALUE',
              /* more items */
            ],
            InstanceGenerations: [
              current | previous,
              /* more items */
            ],
            LocalStorage: included | required | excluded,
            LocalStorageTypes: [
              hdd | ssd,
              /* more items */
            ],
            MemoryGiBPerVCpu: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            MemoryMiB: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            NetworkInterfaceCount: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            OnDemandMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
            RequireHibernateSupport: true || false,
            SpotMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
            TotalLocalStorageGB: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            },
            VCpuCount: {
              Max: 'NUMBER_VALUE',
              Min: 'NUMBER_VALUE'
            }
          },
          InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
          Priority: 'NUMBER_VALUE',
          SpotPrice: 'STRING_VALUE',
          SubnetId: 'STRING_VALUE',
          WeightedCapacity: 'NUMBER_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  OnDemandTargetCapacity: 'NUMBER_VALUE',
  TargetCapacity: 'NUMBER_VALUE'
};
ec2.modifySpotFleetRequest(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: {})
    • ExcessCapacityTerminationPolicy — (String)

      Indicates whether running Spot Instances should be terminated if the target capacity of the Spot Fleet request is decreased below the current size of the Spot Fleet.

      Possible values include:
      • "noTermination"
      • "default"
    • LaunchTemplateConfigs — (Array<map>)

      The launch template and overrides. You can only use this parameter if you specified a launch template (LaunchTemplateConfigs) in your Spot Fleet request. If you specified LaunchSpecifications in your Spot Fleet request, then omit this parameter.

      • LaunchTemplateSpecification — (map)

        The launch template.

        • LaunchTemplateId — (String)

          The ID of the launch template. If you specify the template ID, you can't specify the template name.

        • LaunchTemplateName — (String)

          The name of the launch template. If you specify the template name, you can't specify the template ID.

        • Version — (String)

          The launch template version number, $Latest, or $Default. You must specify a value, otherwise the request fails.

          If the value is $Latest, Amazon EC2 uses the latest version of the launch template.

          If the value is $Default, Amazon EC2 uses the default version of the launch template.

      • Overrides — (Array<map>)

        Any parameters that you specify override the same parameters in the launch template.

        • InstanceType — (String)

          The instance type.

          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • SpotPrice — (String)

          The maximum price per unit hour that you are willing to pay for a Spot Instance.

        • SubnetId — (String)

          The ID of the subnet in which to launch the instances.

        • AvailabilityZone — (String)

          The Availability Zone in which to launch the instances.

        • WeightedCapacity — (Float)

          The number of units provided by the specified instance type.

        • Priority — (Float)

          The priority for the launch template override. The highest priority is launched first.

          If OnDemandAllocationStrategy is set to prioritized, Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

          If the Spot AllocationStrategy is set to capacityOptimizedPrioritized, Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

          Valid values are whole numbers starting at 0. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.

        • InstanceRequirements — (map)

          The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.

          Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
          • VCpuCount — (map)

            The minimum and maximum number of vCPUs.

            • Min — (Integer)

              The minimum number of vCPUs. If the value is 0, there is no minimum limit.

            • Max — (Integer)

              The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

          • MemoryMiB — (map)

            The minimum and maximum amount of memory, in MiB.

            • Min — (Integer)

              The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • CpuManufacturers — (Array<String>)

            The CPU manufacturers to include.

            • For instance types with Intel CPUs, specify intel.

            • For instance types with AMD CPUs, specify amd.

            • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

            Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

            Default: Any manufacturer

          • MemoryGiBPerVCpu — (map)

            The minimum and maximum amount of memory per vCPU, in GiB.

            Default: No minimum or maximum limits

            • Min — (Float)

              The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

            • Max — (Float)

              The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

          • ExcludedInstanceTypes — (Array<String>)

            The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

            For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

            Default: No excluded instance types

          • InstanceGenerations — (Array<String>)

            Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

            For current generation instance types, specify current.

            For previous generation instance types, specify previous.

            Default: Current and previous generation instance types

          • SpotMaxPricePercentageOverLowestPrice — (Integer)

            The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999.

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

            Default: 100

          • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

            The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999.

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

            Default: 20

          • BareMetal — (String)

            Indicates whether bare metal instance types must be included, excluded, or required.

            • To include bare metal instance types, specify included.

            • To require only bare metal instance types, specify required.

            • To exclude bare metal instance types, specify excluded.

            Default: excluded

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • BurstablePerformance — (String)

            Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

            • To include burstable performance instance types, specify included.

            • To require only burstable performance instance types, specify required.

            • To exclude burstable performance instance types, specify excluded.

            Default: excluded

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • RequireHibernateSupport — (Boolean)

            Indicates whether instance types must support hibernation for On-Demand Instances.

            This parameter is not supported for GetSpotPlacementScores.

            Default: false

          • NetworkInterfaceCount — (map)

            The minimum and maximum number of network interfaces.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

          • LocalStorage — (String)

            Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

            • To include instance types with instance store volumes, specify included.

            • To require only instance types with instance store volumes, specify required.

            • To exclude instance types with instance store volumes, specify excluded.

            Default: included

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • LocalStorageTypes — (Array<String>)

            The type of local storage that is required.

            • For instance types with hard disk drive (HDD) storage, specify hdd.

            • For instance types with solid state drive (SDD) storage, specify sdd.

            Default: hdd and sdd

          • TotalLocalStorageGB — (map)

            The minimum and maximum amount of total local storage, in GB.

            Default: No minimum or maximum limits

            • Min — (Float)

              The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

            • Max — (Float)

              The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

          • BaselineEbsBandwidthMbps — (map)

            The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

          • AcceleratorTypes — (Array<String>)

            The accelerator types that must be on the instance type.

            • For instance types with GPU accelerators, specify gpu.

            • For instance types with FPGA accelerators, specify fpga.

            • For instance types with inference accelerators, specify inference.

            Default: Any accelerator type

          • AcceleratorCount — (map)

            The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

            To exclude accelerator-enabled instance types, set Max to 0.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

          • AcceleratorManufacturers — (Array<String>)

            Indicates whether instance types must have accelerators by specific manufacturers.

            • For instance types with NVIDIA devices, specify nvidia.

            • For instance types with AMD devices, specify amd.

            • For instance types with Amazon Web Services devices, specify amazon-web-services.

            • For instance types with Xilinx devices, specify xilinx.

            Default: Any manufacturer

          • AcceleratorNames — (Array<String>)

            The accelerators that must be on the instance type.

            • For instance types with NVIDIA A100 GPUs, specify a100.

            • For instance types with NVIDIA V100 GPUs, specify v100.

            • For instance types with NVIDIA K80 GPUs, specify k80.

            • For instance types with NVIDIA T4 GPUs, specify t4.

            • For instance types with NVIDIA M60 GPUs, specify m60.

            • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

            • For instance types with Xilinx VU9P FPGAs, specify vu9p.

            Default: Any accelerator

          • AcceleratorTotalMemoryMiB — (map)

            The minimum and maximum amount of total accelerator memory, in MiB.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

    • SpotFleetRequestId — (String)

      The ID of the Spot Fleet request.

    • TargetCapacity — (Integer)

      The size of the fleet.

    • OnDemandTargetCapacity — (Integer)

      The number of On-Demand Instances in the fleet.

    • Context — (String)

      Reserved.

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)

        Is true if the request succeeds, and an error otherwise.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifySubnetAttribute(params = {}, callback) ⇒ AWS.Request

Modifies a subnet attribute. You can only modify one attribute at a time.

Service Reference:

Examples:

To change a subnet's public IP addressing behavior


/* This example modifies the specified subnet so that all instances launched into this subnet are assigned a public IP address. */

 var params = {
  MapPublicIpOnLaunch: {
   Value: true
  }, 
  SubnetId: "subnet-1a2b3c4d"
 };
 ec2.modifySubnetAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the modifySubnetAttribute operation

var params = {
  SubnetId: 'STRING_VALUE', /* required */
  AssignIpv6AddressOnCreation: {
    Value: true || false
  },
  CustomerOwnedIpv4Pool: 'STRING_VALUE',
  MapCustomerOwnedIpOnLaunch: {
    Value: true || false
  },
  MapPublicIpOnLaunch: {
    Value: true || false
  }
};
ec2.modifySubnetAttribute(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: {})
    • AssignIpv6AddressOnCreation — (map)

      Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address. This includes a network interface that's created when launching an instance into the subnet (the instance therefore receives an IPv6 address).

      If you enable the IPv6 addressing feature for your subnet, your network interface or instance only receives an IPv6 address if it's created using version 2016-11-15 or later of the Amazon EC2 API.

      • Value — (Boolean)

        The attribute value. The valid values are true or false.

    • MapPublicIpOnLaunch — (map)

      Specify true to indicate that network interfaces attached to instances created in the specified subnet should be assigned a public IPv4 address.

      • Value — (Boolean)

        The attribute value. The valid values are true or false.

    • SubnetId — (String)

      The ID of the subnet.

    • MapCustomerOwnedIpOnLaunch — (map)

      Specify true to indicate that network interfaces attached to instances created in the specified subnet should be assigned a customer-owned IPv4 address.

      When this value is true, you must specify the customer-owned IP pool using CustomerOwnedIpv4Pool.

      • Value — (Boolean)

        The attribute value. The valid values are true or false.

    • CustomerOwnedIpv4Pool — (String)

      The customer-owned IPv4 address pool associated with the subnet.

      You must set this value when you specify true for MapCustomerOwnedIpOnLaunch.

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.

modifyTrafficMirrorFilterNetworkServices(params = {}, callback) ⇒ AWS.Request

Allows or restricts mirroring network services.

By default, Amazon DNS network services are not eligible for Traffic Mirror. Use AddNetworkServices to add network services to a Traffic Mirror filter. When a network service is added to the Traffic Mirror filter, all traffic related to that network service will be mirrored. When you no longer want to mirror network services, use RemoveNetworkServices to remove the network services from the Traffic Mirror filter.

Examples:

Calling the modifyTrafficMirrorFilterNetworkServices operation

var params = {
  TrafficMirrorFilterId: 'STRING_VALUE', /* required */
  AddNetworkServices: [
    amazon-dns,
    /* more items */
  ],
  DryRun: true || false,
  RemoveNetworkServices: [
    amazon-dns,
    /* more items */
  ]
};
ec2.modifyTrafficMirrorFilterNetworkServices(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: {})
    • TrafficMirrorFilterId — (String)

      The ID of the Traffic Mirror filter.

    • AddNetworkServices — (Array<String>)

      The network service, for example Amazon DNS, that you want to mirror.

    • RemoveNetworkServices — (Array<String>)

      The network service, for example Amazon DNS, that you no longer want to mirror.

    • 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:

      • TrafficMirrorFilter — (map)

        The Traffic Mirror filter that the network service is associated with.

        • TrafficMirrorFilterId — (String)

          The ID of the Traffic Mirror filter.

        • IngressFilterRules — (Array<map>)

          Information about the ingress rules that are associated with the Traffic Mirror filter.

          • TrafficMirrorFilterRuleId — (String)

            The ID of the Traffic Mirror rule.

          • TrafficMirrorFilterId — (String)

            The ID of the Traffic Mirror filter that the rule is associated with.

          • TrafficDirection — (String)

            The traffic direction assigned to the Traffic Mirror rule.

            Possible values include:
            • "ingress"
            • "egress"
          • RuleNumber — (Integer)

            The rule number of the Traffic Mirror rule.

          • RuleAction — (String)

            The action assigned to the Traffic Mirror rule.

            Possible values include:
            • "accept"
            • "reject"
          • Protocol — (Integer)

            The protocol assigned to the Traffic Mirror rule.

          • DestinationPortRange — (map)

            The destination port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • SourcePortRange — (map)

            The source port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • DestinationCidrBlock — (String)

            The destination CIDR block assigned to the Traffic Mirror rule.

          • SourceCidrBlock — (String)

            The source CIDR block assigned to the Traffic Mirror rule.

          • Description — (String)

            The description of the Traffic Mirror rule.

        • EgressFilterRules — (Array<map>)

          Information about the egress rules that are associated with the Traffic Mirror filter.

          • TrafficMirrorFilterRuleId — (String)

            The ID of the Traffic Mirror rule.

          • TrafficMirrorFilterId — (String)

            The ID of the Traffic Mirror filter that the rule is associated with.

          • TrafficDirection — (String)

            The traffic direction assigned to the Traffic Mirror rule.

            Possible values include:
            • "ingress"
            • "egress"
          • RuleNumber — (Integer)

            The rule number of the Traffic Mirror rule.

          • RuleAction — (String)

            The action assigned to the Traffic Mirror rule.

            Possible values include:
            • "accept"
            • "reject"
          • Protocol — (Integer)

            The protocol assigned to the Traffic Mirror rule.

          • DestinationPortRange — (map)

            The destination port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • SourcePortRange — (map)

            The source port range assigned to the Traffic Mirror rule.

            • FromPort — (Integer)

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort — (Integer)

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • DestinationCidrBlock — (String)

            The destination CIDR block assigned to the Traffic Mirror rule.

          • SourceCidrBlock — (String)

            The source CIDR block assigned to the Traffic Mirror rule.

          • Description — (String)

            The description of the Traffic Mirror rule.

        • NetworkServices — (Array<String>)

          The network service traffic that is associated with the Traffic Mirror filter.

        • Description — (String)

          The description of the Traffic Mirror filter.

        • Tags — (Array<map>)

          The tags assigned to the Traffic Mirror filter.

          • 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.

modifyTrafficMirrorFilterRule(params = {}, callback) ⇒ AWS.Request

Modifies the specified Traffic Mirror rule.

DestinationCidrBlock and SourceCidrBlock must both be an IPv4 range or an IPv6 range.

Service Reference:

Examples:

Calling the modifyTrafficMirrorFilterRule operation

var params = {
  TrafficMirrorFilterRuleId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  DestinationCidrBlock: 'STRING_VALUE',
  DestinationPortRange: {
    FromPort: 'NUMBER_VALUE',
    ToPort: 'NUMBER_VALUE'
  },
  DryRun: true || false,
  Protocol: 'NUMBER_VALUE',
  RemoveFields: [
    destination-port-range | source-port-range | protocol | description,
    /* more items */
  ],
  RuleAction: accept | reject,
  RuleNumber: 'NUMBER_VALUE',
  SourceCidrBlock: 'STRING_VALUE',
  SourcePortRange: {
    FromPort: 'NUMBER_VALUE',
    ToPort: 'NUMBER_VALUE'
  },
  TrafficDirection: ingress | egress
};
ec2.modifyTrafficMirrorFilterRule(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: {})
    • TrafficMirrorFilterRuleId — (String)

      The ID of the Traffic Mirror rule.

    • TrafficDirection — (String)

      The type of traffic to assign to the rule.

      Possible values include:
      • "ingress"
      • "egress"
    • RuleNumber — (Integer)

      The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.

    • RuleAction — (String)

      The action to assign to the rule.

      Possible values include:
      • "accept"
      • "reject"
    • DestinationPortRange — (map)

      The destination ports that are associated with the Traffic Mirror rule.

      • FromPort — (Integer)

        The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

      • ToPort — (Integer)

        The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

    • SourcePortRange — (map)

      The port range to assign to the Traffic Mirror rule.

      • FromPort — (Integer)

        The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

      • ToPort — (Integer)

        The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

    • Protocol — (Integer)

      The protocol, for example TCP, to assign to the Traffic Mirror rule.

    • DestinationCidrBlock — (String)

      The destination CIDR block to assign to the Traffic Mirror rule.

    • SourceCidrBlock — (String)

      The source CIDR block to assign to the Traffic Mirror rule.

    • Description — (String)

      The description to assign to the Traffic Mirror rule.

    • RemoveFields — (Array<String>)

      The properties that you want to remove from the Traffic Mirror filter rule.

      When you remove a property from a Traffic Mirror filter rule, the property is set to the default.

    • 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:

      • TrafficMirrorFilterRule — (map)

        Modifies a Traffic Mirror rule.

        • TrafficMirrorFilterRuleId — (String)

          The ID of the Traffic Mirror rule.

        • TrafficMirrorFilterId — (String)

          The ID of the Traffic Mirror filter that the rule is associated with.

        • TrafficDirection — (String)

          The traffic direction assigned to the Traffic Mirror rule.

          Possible values include:
          • "ingress"
          • "egress"
        • RuleNumber — (Integer)

          The rule number of the Traffic Mirror rule.

        • RuleAction — (String)

          The action assigned to the Traffic Mirror rule.

          Possible values include:
          • "accept"
          • "reject"
        • Protocol — (Integer)

          The protocol assigned to the Traffic Mirror rule.

        • DestinationPortRange — (map)

          The destination port range assigned to the Traffic Mirror rule.

          • FromPort — (Integer)

            The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • ToPort — (Integer)

            The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

        • SourcePortRange — (map)

          The source port range assigned to the Traffic Mirror rule.

          • FromPort — (Integer)

            The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • ToPort — (Integer)

            The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

        • DestinationCidrBlock — (String)

          The destination CIDR block assigned to the Traffic Mirror rule.

        • SourceCidrBlock — (String)

          The source CIDR block assigned to the Traffic Mirror rule.

        • Description — (String)

          The description of the Traffic Mirror rule.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyTrafficMirrorSession(params = {}, callback) ⇒ AWS.Request

Modifies a Traffic Mirror session.

Service Reference:

Examples:

Calling the modifyTrafficMirrorSession operation

var params = {
  TrafficMirrorSessionId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  DryRun: true || false,
  PacketLength: 'NUMBER_VALUE',
  RemoveFields: [
    packet-length | description | virtual-network-id,
    /* more items */
  ],
  SessionNumber: 'NUMBER_VALUE',
  TrafficMirrorFilterId: 'STRING_VALUE',
  TrafficMirrorTargetId: 'STRING_VALUE',
  VirtualNetworkId: 'NUMBER_VALUE'
};
ec2.modifyTrafficMirrorSession(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: {})
    • TrafficMirrorSessionId — (String)

      The ID of the Traffic Mirror session.

    • TrafficMirrorTargetId — (String)

      The Traffic Mirror target. The target must be in the same VPC as the source, or have a VPC peering connection with the source.

    • TrafficMirrorFilterId — (String)

      The ID of the Traffic Mirror filter.

    • PacketLength — (Integer)

      The number of bytes in each packet to mirror. These are bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet.

    • SessionNumber — (Integer)

      The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

      Valid values are 1-32766.

    • VirtualNetworkId — (Integer)

      The virtual network ID of the Traffic Mirror session.

    • Description — (String)

      The description to assign to the Traffic Mirror session.

    • RemoveFields — (Array<String>)

      The properties that you want to remove from the Traffic Mirror session.

      When you remove a property from a Traffic Mirror session, the property is set to the default.

    • 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:

      • TrafficMirrorSession — (map)

        Information about the Traffic Mirror session.

        • TrafficMirrorSessionId — (String)

          The ID for the Traffic Mirror session.

        • TrafficMirrorTargetId — (String)

          The ID of the Traffic Mirror target.

        • TrafficMirrorFilterId — (String)

          The ID of the Traffic Mirror filter.

        • NetworkInterfaceId — (String)

          The ID of the Traffic Mirror session's network interface.

        • OwnerId — (String)

          The ID of the account that owns the Traffic Mirror session.

        • PacketLength — (Integer)

          The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet

        • SessionNumber — (Integer)

          The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

          Valid values are 1-32766.

        • VirtualNetworkId — (Integer)

          The virtual network ID associated with the Traffic Mirror session.

        • Description — (String)

          The description of the Traffic Mirror session.

        • Tags — (Array<map>)

          The tags assigned to the Traffic Mirror session.

          • 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.

modifyTransitGateway(params = {}, callback) ⇒ AWS.Request

Modifies the specified transit gateway. When you modify a transit gateway, the modified options are applied to new transit gateway attachments only. Your existing transit gateway attachments are not modified.

Service Reference:

Examples:

Calling the modifyTransitGateway operation

var params = {
  TransitGatewayId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  DryRun: true || false,
  Options: {
    AddTransitGatewayCidrBlocks: [
      'STRING_VALUE',
      /* more items */
    ],
    AssociationDefaultRouteTableId: 'STRING_VALUE',
    AutoAcceptSharedAttachments: enable | disable,
    DefaultRouteTableAssociation: enable | disable,
    DefaultRouteTablePropagation: enable | disable,
    DnsSupport: enable | disable,
    PropagationDefaultRouteTableId: 'STRING_VALUE',
    RemoveTransitGatewayCidrBlocks: [
      'STRING_VALUE',
      /* more items */
    ],
    VpnEcmpSupport: enable | disable
  }
};
ec2.modifyTransitGateway(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: {})
    • TransitGatewayId — (String)

      The ID of the transit gateway.

    • Description — (String)

      The description for the transit gateway.

    • Options — (map)

      The options to modify.

      • AddTransitGatewayCidrBlocks — (Array<String>)

        Adds IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.

      • RemoveTransitGatewayCidrBlocks — (Array<String>)

        Removes CIDR blocks for the transit gateway.

      • VpnEcmpSupport — (String)

        Enable or disable Equal Cost Multipath Protocol support.

        Possible values include:
        • "enable"
        • "disable"
      • DnsSupport — (String)

        Enable or disable DNS support.

        Possible values include:
        • "enable"
        • "disable"
      • AutoAcceptSharedAttachments — (String)

        Enable or disable automatic acceptance of attachment requests.

        Possible values include:
        • "enable"
        • "disable"
      • DefaultRouteTableAssociation — (String)

        Enable or disable automatic association with the default association route table.

        Possible values include:
        • "enable"
        • "disable"
      • AssociationDefaultRouteTableId — (String)

        The ID of the default association route table.

      • DefaultRouteTablePropagation — (String)

        Enable or disable automatic propagation of routes to the default propagation route table.

        Possible values include:
        • "enable"
        • "disable"
      • PropagationDefaultRouteTableId — (String)

        The ID of the default propagation route table.

    • 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:

      • TransitGateway — (map)

        Describes a transit gateway.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • TransitGatewayArn — (String)

          The Amazon Resource Name (ARN) of the transit gateway.

        • State — (String)

          The state of the transit gateway.

          Possible values include:
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Description — (String)

          The description of the transit gateway.

        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The transit gateway options.

          • AmazonSideAsn — (Integer)

            A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.

          • TransitGatewayCidrBlocks — (Array<String>)

            The transit gateway CIDR blocks.

          • AutoAcceptSharedAttachments — (String)

            Indicates whether attachment requests are automatically accepted.

            Possible values include:
            • "enable"
            • "disable"
          • DefaultRouteTableAssociation — (String)

            Indicates whether resource attachments are automatically associated with the default association route table.

            Possible values include:
            • "enable"
            • "disable"
          • AssociationDefaultRouteTableId — (String)

            The ID of the default association route table.

          • DefaultRouteTablePropagation — (String)

            Indicates whether resource attachments automatically propagate routes to the default propagation route table.

            Possible values include:
            • "enable"
            • "disable"
          • PropagationDefaultRouteTableId — (String)

            The ID of the default propagation route table.

          • VpnEcmpSupport — (String)

            Indicates whether Equal Cost Multipath Protocol support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • DnsSupport — (String)

            Indicates whether DNS support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • MulticastSupport — (String)

            Indicates whether multicast is enabled on the transit gateway

            Possible values include:
            • "enable"
            • "disable"
        • Tags — (Array<map>)

          The tags for the transit 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.

modifyTransitGatewayPrefixListReference(params = {}, callback) ⇒ AWS.Request

Modifies a reference (route) to a prefix list in a specified transit gateway route table.

Examples:

Calling the modifyTransitGatewayPrefixListReference operation

var params = {
  PrefixListId: 'STRING_VALUE', /* required */
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  Blackhole: true || false,
  DryRun: true || false,
  TransitGatewayAttachmentId: 'STRING_VALUE'
};
ec2.modifyTransitGatewayPrefixListReference(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: {})
    • TransitGatewayRouteTableId — (String)

      The ID of the transit gateway route table.

    • PrefixListId — (String)

      The ID of the prefix list.

    • TransitGatewayAttachmentId — (String)

      The ID of the attachment to which traffic is routed.

    • Blackhole — (Boolean)

      Indicates whether to drop traffic that matches this route.

    • 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:

      • TransitGatewayPrefixListReference — (map)

        Information about the prefix list reference.

        • TransitGatewayRouteTableId — (String)

          The ID of the transit gateway route table.

        • PrefixListId — (String)

          The ID of the prefix list.

        • PrefixListOwnerId — (String)

          The ID of the prefix list owner.

        • State — (String)

          The state of the prefix list reference.

          Possible values include:
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
        • Blackhole — (Boolean)

          Indicates whether traffic that matches this route is dropped.

        • TransitGatewayAttachment — (map)

          Information about the transit gateway attachment.

          • TransitGatewayAttachmentId — (String)

            The ID of the attachment.

          • ResourceType — (String)

            The resource type. Note that the tgw-peering resource type has been deprecated.

            Possible values include:
            • "vpc"
            • "vpn"
            • "direct-connect-gateway"
            • "connect"
            • "peering"
            • "tgw-peering"
          • ResourceId — (String)

            The ID of the resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyTransitGatewayVpcAttachment(params = {}, callback) ⇒ AWS.Request

Modifies the specified VPC attachment.

Examples:

Calling the modifyTransitGatewayVpcAttachment operation

var params = {
  TransitGatewayAttachmentId: 'STRING_VALUE', /* required */
  AddSubnetIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Options: {
    ApplianceModeSupport: enable | disable,
    DnsSupport: enable | disable,
    Ipv6Support: enable | disable
  },
  RemoveSubnetIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.modifyTransitGatewayVpcAttachment(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: {})
    • TransitGatewayAttachmentId — (String)

      The ID of the attachment.

    • AddSubnetIds — (Array<String>)

      The IDs of one or more subnets to add. You can specify at most one subnet per Availability Zone.

    • RemoveSubnetIds — (Array<String>)

      The IDs of one or more subnets to remove.

    • Options — (map)

      The new VPC attachment options.

      • DnsSupport — (String)

        Enable or disable DNS support. The default is enable.

        Possible values include:
        • "enable"
        • "disable"
      • Ipv6Support — (String)

        Enable or disable IPv6 support. The default is enable.

        Possible values include:
        • "enable"
        • "disable"
      • ApplianceModeSupport — (String)

        Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is disable.

        Possible values include:
        • "enable"
        • "disable"
    • 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:

      • TransitGatewayVpcAttachment — (map)

        Information about the modified attachment.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • VpcId — (String)

          The ID of the VPC.

        • VpcOwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC.

        • State — (String)

          The state of the VPC attachment. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • SubnetIds — (Array<String>)

          The IDs of the subnets.

        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The VPC attachment options.

          • DnsSupport — (String)

            Indicates whether DNS support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • Ipv6Support — (String)

            Indicates whether IPv6 support is disabled.

            Possible values include:
            • "enable"
            • "disable"
          • ApplianceModeSupport — (String)

            Indicates whether appliance mode support is enabled.

            Possible values include:
            • "enable"
            • "disable"
        • Tags — (Array<map>)

          The tags for the VPC attachment.

          • 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.

modifyVolume(params = {}, callback) ⇒ AWS.Request

You can modify several parameters of an existing EBS volume, including volume size, volume type, and IOPS capacity. If your EBS volume is attached to a current-generation EC2 instance type, you might be able to apply these changes without stopping the instance or detaching the volume from it. For more information about modifying EBS volumes, see Amazon EBS Elastic Volumes (Linux instances) or Amazon EBS Elastic Volumes (Windows instances).

When you complete a resize operation on your volume, you need to extend the volume's file-system size to take advantage of the new storage capacity. For more information, see Extend a Linux file system or Extend a Windows file system.

You can use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the Amazon CloudWatch Events User Guide. You can also track the status of a modification using DescribeVolumesModifications. For information about tracking status changes using either method, see Monitor the progress of volume modifications.

With previous-generation instance types, resizing an EBS volume might require detaching and reattaching the volume or stopping and restarting the instance.

If you reach the maximum volume modification rate per volume limit, you must wait at least six hours before applying further modifications to the affected EBS volume.

Service Reference:

Examples:

Calling the modifyVolume operation

var params = {
  VolumeId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Iops: 'NUMBER_VALUE',
  MultiAttachEnabled: true || false,
  Size: 'NUMBER_VALUE',
  Throughput: 'NUMBER_VALUE',
  VolumeType: standard | io1 | io2 | gp2 | sc1 | st1 | gp3
};
ec2.modifyVolume(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.

    • Size — (Integer)

      The target size of the volume, in GiB. The target volume size must be greater than or equal to the existing size of the volume.

      The following are the supported volumes sizes for each volume type:

      • gp2 and gp3: 1-16,384

      • io1 and io2: 4-16,384

      • st1 and sc1: 125-16,384

      • standard: 1-1,024

      Default: The existing size is retained.

    • VolumeType — (String)

      The target EBS volume type of the volume. For more information, see Amazon EBS volume types in the Amazon Elastic Compute Cloud User Guide.

      Default: The existing type is retained.

      Possible values include:
      • "standard"
      • "io1"
      • "io2"
      • "gp2"
      • "sc1"
      • "st1"
      • "gp3"
    • Iops — (Integer)

      The target IOPS rate of the volume. This parameter is valid only for gp3, io1, and io2 volumes.

      The following are the supported values for each volume type:

      • gp3: 3,000-16,000 IOPS

      • io1: 100-64,000 IOPS

      • io2: 100-64,000 IOPS

      Default: The existing value is retained if you keep the same volume type. If you change the volume type to io1, io2, or gp3, the default is 3,000.

    • Throughput — (Integer)

      The target throughput of the volume, in MiB/s. This parameter is valid only for gp3 volumes. The maximum value is 1,000.

      Default: The existing value is retained if the source and target volume type is gp3. Otherwise, the default value is 125.

      Valid Range: Minimum value of 125. Maximum value of 1000.

    • MultiAttachEnabled — (Boolean)

      Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up to 16 Nitro-based instances in the same Availability Zone. This parameter is supported with io1 and io2 volumes only. For more information, see Amazon EBS Multi-Attach in the Amazon Elastic Compute Cloud User Guide.

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:

      • VolumeModification — (map)

        Information about the volume modification.

        • VolumeId — (String)

          The ID of the volume.

        • ModificationState — (String)

          The current modification state. The modification state is null for unmodified volumes.

          Possible values include:
          • "modifying"
          • "optimizing"
          • "completed"
          • "failed"
        • StatusMessage — (String)

          A status message about the modification progress or failure.

        • TargetSize — (Integer)

          The target size of the volume, in GiB.

        • TargetIops — (Integer)

          The target IOPS rate of the volume.

        • TargetVolumeType — (String)

          The target EBS volume type of the volume.

          Possible values include:
          • "standard"
          • "io1"
          • "io2"
          • "gp2"
          • "sc1"
          • "st1"
          • "gp3"
        • TargetThroughput — (Integer)

          The target throughput of the volume, in MiB/s.

        • TargetMultiAttachEnabled — (Boolean)

          The target setting for Amazon EBS Multi-Attach.

        • OriginalSize — (Integer)

          The original size of the volume, in GiB.

        • OriginalIops — (Integer)

          The original IOPS rate of the volume.

        • OriginalVolumeType — (String)

          The original EBS volume type of the volume.

          Possible values include:
          • "standard"
          • "io1"
          • "io2"
          • "gp2"
          • "sc1"
          • "st1"
          • "gp3"
        • OriginalThroughput — (Integer)

          The original throughput of the volume, in MiB/s.

        • OriginalMultiAttachEnabled — (Boolean)

          The original setting for Amazon EBS Multi-Attach.

        • Progress — (Integer)

          The modification progress, from 0 to 100 percent complete.

        • StartTime — (Date)

          The modification start time.

        • EndTime — (Date)

          The modification completion or failure time.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyVolumeAttribute(params = {}, callback) ⇒ AWS.Request

Modifies a volume attribute.

By default, all I/O operations for the volume are suspended when the data on the volume is determined to be potentially inconsistent, to prevent undetectable, latent data corruption. The I/O access to the volume can be resumed by first enabling I/O access and then checking the data consistency on your volume.

You can change the default behavior to resume I/O operations. We recommend that you change this only for boot volumes or for volumes that are stateless or disposable.

Service Reference:

Examples:

To modify a volume attribute


/* This example sets the ``autoEnableIo`` attribute of the volume with the ID ``vol-1234567890abcdef0`` to ``true``. If the command succeeds, no output is returned. */

 var params = {
  AutoEnableIO: {
   Value: true
  }, 
  DryRun: true, 
  VolumeId: "vol-1234567890abcdef0"
 };
 ec2.modifyVolumeAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the modifyVolumeAttribute operation

var params = {
  VolumeId: 'STRING_VALUE', /* required */
  AutoEnableIO: {
    Value: true || false
  },
  DryRun: true || false
};
ec2.modifyVolumeAttribute(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: {})
    • AutoEnableIO — (map)

      Indicates whether the volume should be auto-enabled for I/O operations.

      • Value — (Boolean)

        The attribute value. The valid values are true or false.

    • VolumeId — (String)

      The ID of the volume.

    • 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.

modifyVpcAttribute(params = {}, callback) ⇒ AWS.Request

Modifies the specified attribute of the specified VPC.

Service Reference:

Examples:

To modify the enableDnsSupport attribute


/* This example modifies the enableDnsSupport attribute. This attribute indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for instances in the VPC to their corresponding IP addresses; otherwise, it does not. */

 var params = {
  EnableDnsSupport: {
   Value: false
  }, 
  VpcId: "vpc-a01106c2"
 };
 ec2.modifyVpcAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

To modify the enableDnsHostnames attribute


/* This example modifies the enableDnsHostnames attribute. This attribute indicates whether instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not. */

 var params = {
  EnableDnsHostnames: {
   Value: false
  }, 
  VpcId: "vpc-a01106c2"
 };
 ec2.modifyVpcAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the modifyVpcAttribute operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  EnableDnsHostnames: {
    Value: true || false
  },
  EnableDnsSupport: {
    Value: true || false
  }
};
ec2.modifyVpcAttribute(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: {})
    • EnableDnsHostnames — (map)

      Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.

      You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.

      • Value — (Boolean)

        The attribute value. The valid values are true or false.

    • EnableDnsSupport — (map)

      Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.

      You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.

      • Value — (Boolean)

        The attribute value. The valid values are true or false.

    • 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.

modifyVpcEndpoint(params = {}, callback) ⇒ AWS.Request

Modifies attributes of a specified VPC endpoint. The attributes that you can modify depend on the type of VPC endpoint (interface, gateway, or Gateway Load Balancer). For more information, see VPC Endpoints in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

Calling the modifyVpcEndpoint operation

var params = {
  VpcEndpointId: 'STRING_VALUE', /* required */
  AddRouteTableIds: [
    'STRING_VALUE',
    /* more items */
  ],
  AddSecurityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  AddSubnetIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  PolicyDocument: 'STRING_VALUE',
  PrivateDnsEnabled: true || false,
  RemoveRouteTableIds: [
    'STRING_VALUE',
    /* more items */
  ],
  RemoveSecurityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  RemoveSubnetIds: [
    'STRING_VALUE',
    /* more items */
  ],
  ResetPolicy: true || false
};
ec2.modifyVpcEndpoint(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.

    • VpcEndpointId — (String)

      The ID of the endpoint.

    • ResetPolicy — (Boolean)

      (Gateway endpoint) Specify true to reset the policy document to the default policy. The default policy allows full access to the service.

    • PolicyDocument — (String)

      (Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format.

    • AddRouteTableIds — (Array<String>)

      (Gateway endpoint) One or more route tables IDs to associate with the endpoint.

    • RemoveRouteTableIds — (Array<String>)

      (Gateway endpoint) One or more route table IDs to disassociate from the endpoint.

    • AddSubnetIds — (Array<String>)

      (Interface and Gateway Load Balancer endpoints) One or more subnet IDs in which to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.

    • RemoveSubnetIds — (Array<String>)

      (Interface endpoint) One or more subnets IDs in which to remove the endpoint.

    • AddSecurityGroupIds — (Array<String>)

      (Interface endpoint) One or more security group IDs to associate with the network interface.

    • RemoveSecurityGroupIds — (Array<String>)

      (Interface endpoint) One or more security group IDs to disassociate from the network interface.

    • PrivateDnsEnabled — (Boolean)

      (Interface endpoint) Indicates whether a private hosted zone is associated with 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:

      • 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.

modifyVpcEndpointConnectionNotification(params = {}, callback) ⇒ AWS.Request

Modifies a connection notification for VPC endpoint or VPC endpoint service. You can change the SNS topic for the notification, or the events for which to be notified.

Examples:

Calling the modifyVpcEndpointConnectionNotification operation

var params = {
  ConnectionNotificationId: 'STRING_VALUE', /* required */
  ConnectionEvents: [
    'STRING_VALUE',
    /* more items */
  ],
  ConnectionNotificationArn: 'STRING_VALUE',
  DryRun: true || false
};
ec2.modifyVpcEndpointConnectionNotification(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.

    • ConnectionNotificationId — (String)

      The ID of the notification.

    • ConnectionNotificationArn — (String)

      The ARN for the SNS topic for the notification.

    • ConnectionEvents — (Array<String>)

      One or more events for the endpoint. Valid values are Accept, Connect, Delete, and Reject.

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:

      • ReturnValue — (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.

modifyVpcEndpointServiceConfiguration(params = {}, callback) ⇒ AWS.Request

Modifies the attributes of your VPC endpoint service configuration. You can change the Network Load Balancers or Gateway Load Balancers for your service, and you can specify whether acceptance is required for requests to connect to your endpoint service through an interface VPC endpoint.

If you set or modify the private DNS name, you must prove that you own the private DNS domain name. For more information, see VPC Endpoint Service Private DNS Name Verification in the Amazon Virtual Private Cloud User Guide.

Examples:

Calling the modifyVpcEndpointServiceConfiguration operation

var params = {
  ServiceId: 'STRING_VALUE', /* required */
  AcceptanceRequired: true || false,
  AddGatewayLoadBalancerArns: [
    'STRING_VALUE',
    /* more items */
  ],
  AddNetworkLoadBalancerArns: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  PrivateDnsName: 'STRING_VALUE',
  RemoveGatewayLoadBalancerArns: [
    'STRING_VALUE',
    /* more items */
  ],
  RemoveNetworkLoadBalancerArns: [
    'STRING_VALUE',
    /* more items */
  ],
  RemovePrivateDnsName: true || false
};
ec2.modifyVpcEndpointServiceConfiguration(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.

    • ServiceId — (String)

      The ID of the service.

    • PrivateDnsName — (String)

      (Interface endpoint configuration) The private DNS name to assign to the endpoint service.

    • RemovePrivateDnsName — (Boolean)

      (Interface endpoint configuration) Removes the private DNS name of the endpoint service.

    • AcceptanceRequired — (Boolean)

      Indicates whether requests to create an endpoint to your service must be accepted.

    • AddNetworkLoadBalancerArns — (Array<String>)

      The Amazon Resource Names (ARNs) of Network Load Balancers to add to your service configuration.

    • RemoveNetworkLoadBalancerArns — (Array<String>)

      The Amazon Resource Names (ARNs) of Network Load Balancers to remove from your service configuration.

    • AddGatewayLoadBalancerArns — (Array<String>)

      The Amazon Resource Names (ARNs) of Gateway Load Balancers to add to your service configuration.

    • RemoveGatewayLoadBalancerArns — (Array<String>)

      The Amazon Resource Names (ARNs) of Gateway Load Balancers to remove from your service configuration.

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.

modifyVpcEndpointServicePermissions(params = {}, callback) ⇒ AWS.Request

Modifies the permissions for your VPC endpoint service. You can add or remove permissions for service consumers (IAM users, IAM roles, and Amazon Web Services accounts) to connect to your endpoint service.

If you grant permissions to all principals, the service is public. Any users who know the name of a public service can send a request to attach an endpoint. If the service does not require manual approval, attachments are automatically approved.

Examples:

Calling the modifyVpcEndpointServicePermissions operation

var params = {
  ServiceId: 'STRING_VALUE', /* required */
  AddAllowedPrincipals: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  RemoveAllowedPrincipals: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.modifyVpcEndpointServicePermissions(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.

    • ServiceId — (String)

      The ID of the service.

    • AddAllowedPrincipals — (Array<String>)

      The Amazon Resource Names (ARN) of one or more principals. Permissions are granted to the principals in this list. To grant permissions to all principals, specify an asterisk (*).

    • RemoveAllowedPrincipals — (Array<String>)

      The Amazon Resource Names (ARN) of one or more principals. Permissions are revoked for principals in this list.

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:

      • ReturnValue — (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.

modifyVpcPeeringConnectionOptions(params = {}, callback) ⇒ AWS.Request

Modifies the VPC peering connection options on one side of a VPC peering connection. You can do the following:

  • Enable/disable communication over the peering connection between an EC2-Classic instance that's linked to your VPC (using ClassicLink) and instances in the peer VPC.

  • Enable/disable communication over the peering connection between instances in your VPC and an EC2-Classic instance that's linked to the peer VPC.

  • Enable/disable the ability to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

If the peered VPCs are in the same Amazon Web Services account, you can enable DNS resolution for queries from the local VPC. This ensures that queries from the local VPC resolve to private IP addresses in the peer VPC. This option is not available if the peered VPCs are in different different Amazon Web Services accounts or different Regions. For peered VPCs in different Amazon Web Services accounts, each Amazon Web Services account owner must initiate a separate request to modify the peering connection options. For inter-region peering connections, you must use the Region for the requester VPC to modify the requester VPC peering options and the Region for the accepter VPC to modify the accepter VPC peering options. To verify which VPCs are the accepter and the requester for a VPC peering connection, use the DescribeVpcPeeringConnections command.

Examples:

Calling the modifyVpcPeeringConnectionOptions operation

var params = {
  VpcPeeringConnectionId: 'STRING_VALUE', /* required */
  AccepterPeeringConnectionOptions: {
    AllowDnsResolutionFromRemoteVpc: true || false,
    AllowEgressFromLocalClassicLinkToRemoteVpc: true || false,
    AllowEgressFromLocalVpcToRemoteClassicLink: true || false
  },
  DryRun: true || false,
  RequesterPeeringConnectionOptions: {
    AllowDnsResolutionFromRemoteVpc: true || false,
    AllowEgressFromLocalClassicLinkToRemoteVpc: true || false,
    AllowEgressFromLocalVpcToRemoteClassicLink: true || false
  }
};
ec2.modifyVpcPeeringConnectionOptions(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: {})
    • AccepterPeeringConnectionOptions — (map)

      The VPC peering connection options for the accepter VPC.

      • AllowDnsResolutionFromRemoteVpc — (Boolean)

        If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

      • AllowEgressFromLocalClassicLinkToRemoteVpc — (Boolean)

        If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.

      • AllowEgressFromLocalVpcToRemoteClassicLink — (Boolean)

        If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.

    • 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.

    • RequesterPeeringConnectionOptions — (map)

      The VPC peering connection options for the requester VPC.

      • AllowDnsResolutionFromRemoteVpc — (Boolean)

        If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

      • AllowEgressFromLocalClassicLinkToRemoteVpc — (Boolean)

        If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.

      • AllowEgressFromLocalVpcToRemoteClassicLink — (Boolean)

        If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.

    • 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:

      • AccepterPeeringConnectionOptions — (map)

        Information about the VPC peering connection options for the accepter VPC.

        • AllowDnsResolutionFromRemoteVpc — (Boolean)

          If true, the public DNS hostnames of instances in the specified VPC resolve to private IP addresses when queried from instances in the peer VPC.

        • AllowEgressFromLocalClassicLinkToRemoteVpc — (Boolean)

          If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.

        • AllowEgressFromLocalVpcToRemoteClassicLink — (Boolean)

          If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.

      • RequesterPeeringConnectionOptions — (map)

        Information about the VPC peering connection options for the requester VPC.

        • AllowDnsResolutionFromRemoteVpc — (Boolean)

          If true, the public DNS hostnames of instances in the specified VPC resolve to private IP addresses when queried from instances in the peer VPC.

        • AllowEgressFromLocalClassicLinkToRemoteVpc — (Boolean)

          If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.

        • AllowEgressFromLocalVpcToRemoteClassicLink — (Boolean)

          If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyVpcTenancy(params = {}, callback) ⇒ AWS.Request

Modifies the instance tenancy attribute of the specified VPC. You can change the instance tenancy attribute of a VPC to default only. You cannot change the instance tenancy attribute to dedicated.

After you modify the tenancy of the VPC, any new instances that you launch into the VPC have a tenancy of default, unless you specify otherwise during launch. The tenancy of any existing instances in the VPC is not affected.

For more information, see Dedicated Instances in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the modifyVpcTenancy operation

var params = {
  InstanceTenancy: default, /* required */
  VpcId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.modifyVpcTenancy(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: {})
    • VpcId — (String)

      The ID of the VPC.

    • InstanceTenancy — (String)

      The instance tenancy attribute for the VPC.

      Possible values include:
      • "default"
    • 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:

      • ReturnValue — (Boolean)

        Returns true if the request succeeds; otherwise, returns an error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyVpnConnection(params = {}, callback) ⇒ AWS.Request

Modifies the customer gateway or the target gateway of an Amazon Web Services Site-to-Site VPN connection. To modify the target gateway, the following migration options are available:

  • An existing virtual private gateway to a new virtual private gateway

  • An existing virtual private gateway to a transit gateway

  • An existing transit gateway to a new transit gateway

  • An existing transit gateway to a virtual private gateway

Before you perform the migration to the new gateway, you must configure the new gateway. Use CreateVpnGateway to create a virtual private gateway, or CreateTransitGateway to create a transit gateway.

This step is required when you migrate from a virtual private gateway with static routes to a transit gateway.

You must delete the static routes before you migrate to the new gateway.

Keep a copy of the static route before you delete it. You will need to add back these routes to the transit gateway after the VPN connection migration is complete.

After you migrate to the new gateway, you might need to modify your VPC route table. Use CreateRoute and DeleteRoute to make the changes described in Update VPC route tables in the Amazon Web Services Site-to-Site VPN User Guide.

When the new gateway is a transit gateway, modify the transit gateway route table to allow traffic between the VPC and the Amazon Web Services Site-to-Site VPN connection. Use CreateTransitGatewayRoute to add the routes.

If you deleted VPN static routes, you must add the static routes to the transit gateway route table.

After you perform this operation, the VPN endpoint's IP addresses on the Amazon Web Services side and the tunnel options remain intact. Your Amazon Web Services Site-to-Site VPN connection will be temporarily unavailable for a brief period while we provision the new endpoints.

Service Reference:

Examples:

Calling the modifyVpnConnection operation

var params = {
  VpnConnectionId: 'STRING_VALUE', /* required */
  CustomerGatewayId: 'STRING_VALUE',
  DryRun: true || false,
  TransitGatewayId: 'STRING_VALUE',
  VpnGatewayId: 'STRING_VALUE'
};
ec2.modifyVpnConnection(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.

    • TransitGatewayId — (String)

      The ID of the transit gateway.

    • 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 Amazon Web Services side of the VPN connection.

    • 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:

      • VpnConnection — (map)

        Describes a VPN connection.

        • 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.

        • CustomerGatewayId — (String)

          The ID of the customer gateway at your end of the VPN connection.

        • Category — (String)

          The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

        • State — (String)

          The current state of the VPN connection.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • Type — (String)

          The type of VPN connection.

          Possible values include:
          • "ipsec.1"
        • VpnConnectionId — (String)

          The ID of the VPN connection.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

        • TransitGatewayId — (String)

          The ID of the transit gateway associated with the VPN connection.

        • CoreNetworkArn — (String)

          The ARN of the core network.

        • CoreNetworkAttachmentArn — (String)

          The ARN of the core network attachment.

        • GatewayAssociationState — (String)

          The current state of the gateway association.

          Possible values include:
          • "associated"
          • "not-associated"
          • "associating"
          • "disassociating"
        • Options — (map)

          The VPN connection options.

          • EnableAcceleration — (Boolean)

            Indicates whether acceleration is enabled for the VPN connection.

          • StaticRoutesOnly — (Boolean)

            Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

          • LocalIpv4NetworkCidr — (String)

            The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv4NetworkCidr — (String)

            The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

          • LocalIpv6NetworkCidr — (String)

            The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv6NetworkCidr — (String)

            The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

          • TunnelInsideIpVersion — (String)

            Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

            Possible values include:
            • "ipv4"
            • "ipv6"
          • TunnelOptions — (Array<map>)

            Indicates the VPN tunnel options.

            • OutsideIpAddress — (String)

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr — (String)

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr — (String)

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey — (String)

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds — (Integer)

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds — (Integer)

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds — (Integer)

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage — (Integer)

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize — (Integer)

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds — (Integer)

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction — (String)

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The encryption algorithm.

            • Phase1IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The integrity algorithm.

            • Phase1DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • IkeVersions — (Array<map>)

              The IKE versions that are permitted for the VPN tunnel.

              • Value — (String)

                The IKE version.

            • StartupAction — (String)

              The action to take when the establishing the VPN tunnels for a VPN connection.

        • 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"
        • 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.

          • AcceptedRouteCount — (Integer)

            The number of accepted routes.

          • LastStatusChange — (Date)

            The date and time of the last change in status.

          • 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"
          • StatusMessage — (String)

            If an error occurs, a description of the error.

          • CertificateArn — (String)

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyVpnConnectionOptions(params = {}, callback) ⇒ AWS.Request

Modifies the connection options for your Site-to-Site VPN connection.

When you modify the VPN connection options, the VPN endpoint IP addresses on the Amazon Web Services side do not change, and the tunnel options do not change. Your VPN connection will be temporarily unavailable for a brief period while the VPN connection is updated.

Service Reference:

Examples:

Calling the modifyVpnConnectionOptions operation

var params = {
  VpnConnectionId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  LocalIpv4NetworkCidr: 'STRING_VALUE',
  LocalIpv6NetworkCidr: 'STRING_VALUE',
  RemoteIpv4NetworkCidr: 'STRING_VALUE',
  RemoteIpv6NetworkCidr: 'STRING_VALUE'
};
ec2.modifyVpnConnectionOptions(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 Site-to-Site VPN connection.

    • LocalIpv4NetworkCidr — (String)

      The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

      Default: 0.0.0.0/0

    • RemoteIpv4NetworkCidr — (String)

      The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

      Default: 0.0.0.0/0

    • LocalIpv6NetworkCidr — (String)

      The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

      Default: ::/0

    • RemoteIpv6NetworkCidr — (String)

      The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

      Default: ::/0

    • 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:

      • VpnConnection — (map)

        Describes a VPN connection.

        • 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.

        • CustomerGatewayId — (String)

          The ID of the customer gateway at your end of the VPN connection.

        • Category — (String)

          The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

        • State — (String)

          The current state of the VPN connection.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • Type — (String)

          The type of VPN connection.

          Possible values include:
          • "ipsec.1"
        • VpnConnectionId — (String)

          The ID of the VPN connection.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

        • TransitGatewayId — (String)

          The ID of the transit gateway associated with the VPN connection.

        • CoreNetworkArn — (String)

          The ARN of the core network.

        • CoreNetworkAttachmentArn — (String)

          The ARN of the core network attachment.

        • GatewayAssociationState — (String)

          The current state of the gateway association.

          Possible values include:
          • "associated"
          • "not-associated"
          • "associating"
          • "disassociating"
        • Options — (map)

          The VPN connection options.

          • EnableAcceleration — (Boolean)

            Indicates whether acceleration is enabled for the VPN connection.

          • StaticRoutesOnly — (Boolean)

            Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

          • LocalIpv4NetworkCidr — (String)

            The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv4NetworkCidr — (String)

            The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

          • LocalIpv6NetworkCidr — (String)

            The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv6NetworkCidr — (String)

            The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

          • TunnelInsideIpVersion — (String)

            Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

            Possible values include:
            • "ipv4"
            • "ipv6"
          • TunnelOptions — (Array<map>)

            Indicates the VPN tunnel options.

            • OutsideIpAddress — (String)

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr — (String)

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr — (String)

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey — (String)

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds — (Integer)

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds — (Integer)

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds — (Integer)

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage — (Integer)

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize — (Integer)

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds — (Integer)

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction — (String)

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The encryption algorithm.

            • Phase1IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The integrity algorithm.

            • Phase1DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • IkeVersions — (Array<map>)

              The IKE versions that are permitted for the VPN tunnel.

              • Value — (String)

                The IKE version.

            • StartupAction — (String)

              The action to take when the establishing the VPN tunnels for a VPN connection.

        • 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"
        • 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.

          • AcceptedRouteCount — (Integer)

            The number of accepted routes.

          • LastStatusChange — (Date)

            The date and time of the last change in status.

          • 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"
          • StatusMessage — (String)

            If an error occurs, a description of the error.

          • CertificateArn — (String)

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyVpnTunnelCertificate(params = {}, callback) ⇒ AWS.Request

Modifies the VPN tunnel endpoint certificate.

Service Reference:

Examples:

Calling the modifyVpnTunnelCertificate operation

var params = {
  VpnConnectionId: 'STRING_VALUE', /* required */
  VpnTunnelOutsideIpAddress: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.modifyVpnTunnelCertificate(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 Amazon Web Services Site-to-Site VPN connection.

    • VpnTunnelOutsideIpAddress — (String)

      The external IP address of the VPN tunnel.

    • 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:

      • VpnConnection — (map)

        Describes a VPN connection.

        • 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.

        • CustomerGatewayId — (String)

          The ID of the customer gateway at your end of the VPN connection.

        • Category — (String)

          The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

        • State — (String)

          The current state of the VPN connection.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • Type — (String)

          The type of VPN connection.

          Possible values include:
          • "ipsec.1"
        • VpnConnectionId — (String)

          The ID of the VPN connection.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

        • TransitGatewayId — (String)

          The ID of the transit gateway associated with the VPN connection.

        • CoreNetworkArn — (String)

          The ARN of the core network.

        • CoreNetworkAttachmentArn — (String)

          The ARN of the core network attachment.

        • GatewayAssociationState — (String)

          The current state of the gateway association.

          Possible values include:
          • "associated"
          • "not-associated"
          • "associating"
          • "disassociating"
        • Options — (map)

          The VPN connection options.

          • EnableAcceleration — (Boolean)

            Indicates whether acceleration is enabled for the VPN connection.

          • StaticRoutesOnly — (Boolean)

            Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

          • LocalIpv4NetworkCidr — (String)

            The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv4NetworkCidr — (String)

            The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

          • LocalIpv6NetworkCidr — (String)

            The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv6NetworkCidr — (String)

            The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

          • TunnelInsideIpVersion — (String)

            Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

            Possible values include:
            • "ipv4"
            • "ipv6"
          • TunnelOptions — (Array<map>)

            Indicates the VPN tunnel options.

            • OutsideIpAddress — (String)

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr — (String)

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr — (String)

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey — (String)

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds — (Integer)

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds — (Integer)

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds — (Integer)

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage — (Integer)

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize — (Integer)

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds — (Integer)

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction — (String)

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The encryption algorithm.

            • Phase1IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The integrity algorithm.

            • Phase1DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • IkeVersions — (Array<map>)

              The IKE versions that are permitted for the VPN tunnel.

              • Value — (String)

                The IKE version.

            • StartupAction — (String)

              The action to take when the establishing the VPN tunnels for a VPN connection.

        • 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"
        • 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.

          • AcceptedRouteCount — (Integer)

            The number of accepted routes.

          • LastStatusChange — (Date)

            The date and time of the last change in status.

          • 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"
          • StatusMessage — (String)

            If an error occurs, a description of the error.

          • CertificateArn — (String)

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyVpnTunnelOptions(params = {}, callback) ⇒ AWS.Request

Modifies the options for a VPN tunnel in an Amazon Web Services Site-to-Site VPN connection. You can modify multiple options for a tunnel in a single request, but you can only modify one tunnel at a time. For more information, see Site-to-Site VPN tunnel options for your Site-to-Site VPN connection in the Amazon Web Services Site-to-Site VPN User Guide.

Service Reference:

Examples:

Calling the modifyVpnTunnelOptions operation

var params = {
  TunnelOptions: { /* required */
    DPDTimeoutAction: 'STRING_VALUE',
    DPDTimeoutSeconds: 'NUMBER_VALUE',
    IKEVersions: [
      {
        Value: 'STRING_VALUE'
      },
      /* more items */
    ],
    Phase1DHGroupNumbers: [
      {
        Value: 'NUMBER_VALUE'
      },
      /* more items */
    ],
    Phase1EncryptionAlgorithms: [
      {
        Value: 'STRING_VALUE'
      },
      /* more items */
    ],
    Phase1IntegrityAlgorithms: [
      {
        Value: 'STRING_VALUE'
      },
      /* more items */
    ],
    Phase1LifetimeSeconds: 'NUMBER_VALUE',
    Phase2DHGroupNumbers: [
      {
        Value: 'NUMBER_VALUE'
      },
      /* more items */
    ],
    Phase2EncryptionAlgorithms: [
      {
        Value: 'STRING_VALUE'
      },
      /* more items */
    ],
    Phase2IntegrityAlgorithms: [
      {
        Value: 'STRING_VALUE'
      },
      /* more items */
    ],
    Phase2LifetimeSeconds: 'NUMBER_VALUE',
    PreSharedKey: 'STRING_VALUE',
    RekeyFuzzPercentage: 'NUMBER_VALUE',
    RekeyMarginTimeSeconds: 'NUMBER_VALUE',
    ReplayWindowSize: 'NUMBER_VALUE',
    StartupAction: 'STRING_VALUE',
    TunnelInsideCidr: 'STRING_VALUE',
    TunnelInsideIpv6Cidr: 'STRING_VALUE'
  },
  VpnConnectionId: 'STRING_VALUE', /* required */
  VpnTunnelOutsideIpAddress: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.modifyVpnTunnelOptions(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 Amazon Web Services Site-to-Site VPN connection.

    • VpnTunnelOutsideIpAddress — (String)

      The external IP address of the VPN tunnel.

    • TunnelOptions — (map)

      The tunnel options to modify.

      • TunnelInsideCidr — (String)

        The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.

        Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The following CIDR blocks are reserved and cannot be used:

        • 169.254.0.0/30

        • 169.254.1.0/30

        • 169.254.2.0/30

        • 169.254.3.0/30

        • 169.254.4.0/30

        • 169.254.5.0/30

        • 169.254.169.252/30

      • TunnelInsideIpv6Cidr — (String)

        The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.

        Constraints: A size /126 CIDR block from the local fd00::/8 range.

      • PreSharedKey — (String)

        The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

        Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).

      • Phase1LifetimeSeconds — (Integer)

        The lifetime for phase 1 of the IKE negotiation, in seconds.

        Constraints: A value between 900 and 28,800.

        Default: 28800

      • Phase2LifetimeSeconds — (Integer)

        The lifetime for phase 2 of the IKE negotiation, in seconds.

        Constraints: A value between 900 and 3,600. The value must be less than the value for Phase1LifetimeSeconds.

        Default: 3600

      • RekeyMarginTimeSeconds — (Integer)

        The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for RekeyFuzzPercentage.

        Constraints: A value between 60 and half of Phase2LifetimeSeconds.

        Default: 540

      • RekeyFuzzPercentage — (Integer)

        The percentage of the rekey window (determined by RekeyMarginTimeSeconds) during which the rekey time is randomly selected.

        Constraints: A value between 0 and 100.

        Default: 100

      • ReplayWindowSize — (Integer)

        The number of packets in an IKE replay window.

        Constraints: A value between 64 and 2048.

        Default: 1024

      • DPDTimeoutSeconds — (Integer)

        The number of seconds after which a DPD timeout occurs.

        Constraints: A value between 0 and 30.

        Default: 30

      • DPDTimeoutAction — (String)

        The action to take after DPD timeout occurs. Specify restart to restart the IKE initiation. Specify clear to end the IKE session.

        Valid Values: clear | none | restart

        Default: clear

      • Phase1EncryptionAlgorithms — (Array<map>)

        One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.

        Valid values: AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16

        • Value — (String)

          The value for the encryption algorithm.

      • Phase2EncryptionAlgorithms — (Array<map>)

        One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.

        Valid values: AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16

        • Value — (String)

          The encryption algorithm.

      • Phase1IntegrityAlgorithms — (Array<map>)

        One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.

        Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512

        • Value — (String)

          The value for the integrity algorithm.

      • Phase2IntegrityAlgorithms — (Array<map>)

        One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.

        Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512

        • Value — (String)

          The integrity algorithm.

      • Phase1DHGroupNumbers — (Array<map>)

        One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.

        Valid values: 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24

        • Value — (Integer)

          The Diffie-Hellmann group number.

      • Phase2DHGroupNumbers — (Array<map>)

        One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.

        Valid values: 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24

        • Value — (Integer)

          The Diffie-Hellmann group number.

      • IKEVersions — (Array<map>)

        The IKE versions that are permitted for the VPN tunnel.

        Valid values: ikev1 | ikev2

        • Value — (String)

          The IKE version.

      • StartupAction — (String)

        The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify start for Amazon Web Services to initiate the IKE negotiation.

        Valid Values: add | start

        Default: add

    • 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:

      • VpnConnection — (map)

        Describes a VPN connection.

        • 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.

        • CustomerGatewayId — (String)

          The ID of the customer gateway at your end of the VPN connection.

        • Category — (String)

          The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

        • State — (String)

          The current state of the VPN connection.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • Type — (String)

          The type of VPN connection.

          Possible values include:
          • "ipsec.1"
        • VpnConnectionId — (String)

          The ID of the VPN connection.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

        • TransitGatewayId — (String)

          The ID of the transit gateway associated with the VPN connection.

        • CoreNetworkArn — (String)

          The ARN of the core network.

        • CoreNetworkAttachmentArn — (String)

          The ARN of the core network attachment.

        • GatewayAssociationState — (String)

          The current state of the gateway association.

          Possible values include:
          • "associated"
          • "not-associated"
          • "associating"
          • "disassociating"
        • Options — (map)

          The VPN connection options.

          • EnableAcceleration — (Boolean)

            Indicates whether acceleration is enabled for the VPN connection.

          • StaticRoutesOnly — (Boolean)

            Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

          • LocalIpv4NetworkCidr — (String)

            The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv4NetworkCidr — (String)

            The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

          • LocalIpv6NetworkCidr — (String)

            The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv6NetworkCidr — (String)

            The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

          • TunnelInsideIpVersion — (String)

            Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

            Possible values include:
            • "ipv4"
            • "ipv6"
          • TunnelOptions — (Array<map>)

            Indicates the VPN tunnel options.

            • OutsideIpAddress — (String)

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr — (String)

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr — (String)

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey — (String)

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds — (Integer)

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds — (Integer)

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds — (Integer)

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage — (Integer)

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize — (Integer)

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds — (Integer)

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction — (String)

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The encryption algorithm.

            • Phase1IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The integrity algorithm.

            • Phase1DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • IkeVersions — (Array<map>)

              The IKE versions that are permitted for the VPN tunnel.

              • Value — (String)

                The IKE version.

            • StartupAction — (String)

              The action to take when the establishing the VPN tunnels for a VPN connection.

        • 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"
        • 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.

          • AcceptedRouteCount — (Integer)

            The number of accepted routes.

          • LastStatusChange — (Date)

            The date and time of the last change in status.

          • 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"
          • StatusMessage — (String)

            If an error occurs, a description of the error.

          • CertificateArn — (String)

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

monitorInstances(params = {}, callback) ⇒ AWS.Request

Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see Monitoring your instances and volumes in the Amazon EC2 User Guide.

To disable detailed monitoring, see .

Service Reference:

Examples:

Calling the monitorInstances operation

var params = {
  InstanceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.monitorInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceIds — (Array<String>)

      The IDs of the instances.

    • 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:

      • InstanceMonitorings — (Array<map>)

        The monitoring information.

        • InstanceId — (String)

          The ID of the instance.

        • Monitoring — (map)

          The monitoring for the instance.

          • State — (String)

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

            Possible values include:
            • "disabled"
            • "disabling"
            • "enabled"
            • "pending"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

moveAddressToVpc(params = {}, callback) ⇒ AWS.Request

Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC platform. The Elastic IP address must be allocated to your account for more than 24 hours, and it must not be associated with an instance. After the Elastic IP address is moved, it is no longer available for use in the EC2-Classic platform, unless you move it back using the RestoreAddressToClassic request. You cannot move an Elastic IP address that was originally allocated for use in the EC2-VPC platform to the EC2-Classic platform.

Service Reference:

Examples:

To move an address to EC2-VPC


/* This example moves the specified Elastic IP address to the EC2-VPC platform. */

 var params = {
  PublicIp: "54.123.4.56"
 };
 ec2.moveAddressToVpc(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Status: "MoveInProgress"
   }
   */
 });

Calling the moveAddressToVpc operation

var params = {
  PublicIp: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.moveAddressToVpc(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.

    • PublicIp — (String)

      The Elastic IP address.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AllocationId — (String)

        The allocation ID for the Elastic IP address.

      • Status — (String)

        The status of the move of the IP address.

        Possible values include:
        • "MoveInProgress"
        • "InVpc"
        • "InClassic"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

provisionByoipCidr(params = {}, callback) ⇒ AWS.Request

Provisions an IPv4 or IPv6 address range for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP) and creates a corresponding address pool. After the address range is provisioned, it is ready to be advertised using AdvertiseByoipCidr.

Amazon Web Services verifies that you own the address range and are authorized to advertise it. You must ensure that the address range is registered to you and that you created an RPKI ROA to authorize Amazon ASNs 16509 and 14618 to advertise the address range. For more information, see Bring your own IP addresses (BYOIP) in the Amazon Elastic Compute Cloud User Guide.

Provisioning an address range is an asynchronous operation, so the call returns immediately, but the address range is not ready to use until its status changes from pending-provision to provisioned. To monitor the status of an address range, use DescribeByoipCidrs. To allocate an Elastic IP address from your IPv4 address pool, use AllocateAddress with either the specific address from the address pool or the ID of the address pool.

Service Reference:

Examples:

Calling the provisionByoipCidr operation

var params = {
  Cidr: 'STRING_VALUE', /* required */
  CidrAuthorizationContext: {
    Message: 'STRING_VALUE', /* required */
    Signature: 'STRING_VALUE' /* required */
  },
  Description: 'STRING_VALUE',
  DryRun: true || false,
  MultiRegion: true || false,
  PoolTagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  PubliclyAdvertisable: true || false
};
ec2.provisionByoipCidr(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: {})
    • Cidr — (String)

      The public IPv4 or IPv6 address range, in CIDR notation. The most specific IPv4 prefix that you can specify is /24. The most specific IPv6 prefix you can specify is /56. The address range cannot overlap with another address range that you've brought to this or another Region.

    • CidrAuthorizationContext — (map)

      A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.

      • Messagerequired — (String)

        The plain-text authorization message for the prefix and account.

      • Signaturerequired — (String)

        The signed authorization message for the prefix and account.

    • PubliclyAdvertisable — (Boolean)

      (IPv6 only) Indicate whether the address range will be publicly advertised to the internet.

      Default: true

    • Description — (String)

      A description for the address range and the address pool.

    • 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.

    • PoolTagSpecifications — (Array<map>)

      The tags to apply to the address pool.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • MultiRegion — (Boolean) Reserved.

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:

      • ByoipCidr — (map)

        Information about the address range.

        • Cidr — (String)

          The address range, in CIDR notation.

        • Description — (String)

          The description of the address range.

        • StatusMessage — (String)

          Upon success, contains the ID of the address pool. Otherwise, contains an error message.

        • State — (String)

          The state of the address pool.

          Possible values include:
          • "advertised"
          • "deprovisioned"
          • "failed-deprovision"
          • "failed-provision"
          • "pending-deprovision"
          • "pending-provision"
          • "provisioned"
          • "provisioned-not-publicly-advertisable"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

purchaseHostReservation(params = {}, callback) ⇒ AWS.Request

Purchase a reservation with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation. This action results in the specified reservation being purchased and charged to your account.

Service Reference:

Examples:

Calling the purchaseHostReservation operation

var params = {
  HostIdSet: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  OfferingId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  CurrencyCode: USD,
  LimitPrice: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.purchaseHostReservation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClientToken — (String)

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

    • CurrencyCode — (String)

      The currency in which the totalUpfrontPrice, LimitPrice, and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD.

      Possible values include:
      • "USD"
    • HostIdSet — (Array<String>)

      The IDs of the Dedicated Hosts with which the reservation will be associated.

    • LimitPrice — (String)

      The specified limit is checked against the total upfront cost of the reservation (calculated as the offering's upfront cost multiplied by the host count). If the total upfront cost is greater than the specified price limit, the request fails. This is used to ensure that the purchase does not exceed the expected upfront cost of the purchase. At this time, the only supported currency is USD. For example, to indicate a limit price of USD 100, specify 100.00.

    • OfferingId — (String)

      The ID of the offering.

    • TagSpecifications — (Array<map>)

      The tags to apply to the Dedicated Host Reservation during purchase.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

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:

      • ClientToken — (String)

        Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

      • CurrencyCode — (String)

        The currency in which the totalUpfrontPrice and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD.

        Possible values include:
        • "USD"
      • Purchase — (Array<map>)

        Describes the details of the purchase.

        • 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"
        • Duration — (Integer)

          The duration of the reservation's term in seconds.

        • HostIdSet — (Array<String>)

          The IDs of the Dedicated Hosts associated with the reservation.

        • HostReservationId — (String)

          The ID of the reservation.

        • HourlyPrice — (String)

          The hourly price of the reservation per hour.

        • InstanceFamily — (String)

          The instance family on the Dedicated Host that the reservation can be associated with.

        • PaymentOption — (String)

          The payment option for the reservation.

          Possible values include:
          • "AllUpfront"
          • "PartialUpfront"
          • "NoUpfront"
        • UpfrontPrice — (String)

          The upfront price of the reservation.

      • TotalHourlyPrice — (String)

        The total hourly price of the reservation calculated per hour.

      • TotalUpfrontPrice — (String)

        The total amount charged to your account when you purchase the reservation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

purchaseReservedInstancesOffering(params = {}, callback) ⇒ AWS.Request

Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing.

Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with DescribeReservedInstances.

To queue a purchase for a future date and time, specify a purchase time. If you do not specify a purchase time, the default is the current time.

For more information, see Reserved Instances and Reserved Instance Marketplace in the Amazon EC2 User Guide.

Examples:

Calling the purchaseReservedInstancesOffering operation

var params = {
  InstanceCount: 'NUMBER_VALUE', /* required */
  ReservedInstancesOfferingId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  LimitPrice: {
    Amount: 'NUMBER_VALUE',
    CurrencyCode: USD
  },
  PurchaseTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
ec2.purchaseReservedInstancesOffering(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: {})
    • InstanceCount — (Integer)

      The number of Reserved Instances to purchase.

    • ReservedInstancesOfferingId — (String)

      The ID of the Reserved Instance offering to purchase.

    • 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.

    • LimitPrice — (map)

      Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.

      • Amount — (Float)

        Used for Reserved Instance Marketplace offerings. Specifies the limit price on the total order (instanceCount * price).

      • CurrencyCode — (String)

        The currency in which the limitPrice amount is specified. At this time, the only supported currency is USD.

        Possible values include:
        • "USD"
    • PurchaseTime — (Date)

      The time at which to purchase the Reserved Instance, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

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:

      • ReservedInstancesId — (String)

        The IDs of the purchased Reserved Instances. If your purchase crosses into a discounted pricing tier, the final Reserved Instances IDs might change. For more information, see Crossing pricing tiers in the Amazon Elastic Compute Cloud User Guide.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

purchaseScheduledInstances(params = {}, callback) ⇒ AWS.Request

Purchases the Scheduled Instances with the specified schedule.

Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you can purchase a Scheduled Instance, you must call DescribeScheduledInstanceAvailability to check for available schedules and obtain a purchase token. After you purchase a Scheduled Instance, you must call RunScheduledInstances during each scheduled time period.

After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.

Service Reference:

Examples:

To purchase a Scheduled Instance


/* This example purchases a Scheduled Instance. */

 var params = {
  PurchaseRequests: [
     {
    InstanceCount: 1, 
    PurchaseToken: "eyJ2IjoiMSIsInMiOjEsImMiOi..."
   }
  ]
 };
 ec2.purchaseScheduledInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ScheduledInstanceSet: [
       {
      AvailabilityZone: "us-west-2b", 
      CreateDate: <Date Representation>, 
      HourlyPrice: "0.095", 
      InstanceCount: 1, 
      InstanceType: "c4.large", 
      NetworkPlatform: "EC2-VPC", 
      NextSlotStartTime: <Date Representation>, 
      Platform: "Linux/UNIX", 
      Recurrence: {
       Frequency: "Weekly", 
       Interval: 1, 
       OccurrenceDaySet: [
          1
       ], 
       OccurrenceRelativeToEnd: false, 
       OccurrenceUnit: ""
      }, 
      ScheduledInstanceId: "sci-1234-1234-1234-1234-123456789012", 
      SlotDurationInHours: 32, 
      TermEndDate: <Date Representation>, 
      TermStartDate: <Date Representation>, 
      TotalScheduledInstanceHours: 1696
     }
    ]
   }
   */
 });

Calling the purchaseScheduledInstances operation

var params = {
  PurchaseRequests: [ /* required */
    {
      InstanceCount: 'NUMBER_VALUE', /* required */
      PurchaseToken: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  ClientToken: 'STRING_VALUE',
  DryRun: true || false
};
ec2.purchaseScheduledInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClientToken — (String)

      Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency.

      If a token is not provided, the SDK will use a version 4 UUID.
    • 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.

    • PurchaseRequests — (Array<map>)

      The purchase requests.

      • InstanceCountrequired — (Integer)

        The number of instances.

      • PurchaseTokenrequired — (String)

        The purchase token.

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:

      • ScheduledInstanceSet — (Array<map>)

        Information about the Scheduled Instances.

        • AvailabilityZone — (String)

          The Availability Zone.

        • CreateDate — (Date)

          The date when the Scheduled Instance was purchased.

        • HourlyPrice — (String)

          The hourly price for a single instance.

        • InstanceCount — (Integer)

          The number of instances.

        • InstanceType — (String)

          The instance type.

        • NetworkPlatform — (String)

          The network platform (EC2-Classic or EC2-VPC).

        • NextSlotStartTime — (Date)

          The time for the next schedule to start.

        • Platform — (String)

          The platform (Linux/UNIX or Windows).

        • PreviousSlotEndTime — (Date)

          The time that the previous schedule ended or will end.

        • 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).

        • ScheduledInstanceId — (String)

          The Scheduled Instance ID.

        • SlotDurationInHours — (Integer)

          The number of hours in the schedule.

        • TermEndDate — (Date)

          The end date for the Scheduled Instance.

        • TermStartDate — (Date)

          The start date for the Scheduled Instance.

        • TotalScheduledInstanceHours — (Integer)

          The total number of hours for a single instance for the entire term.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

rebootInstances(params = {}, callback) ⇒ AWS.Request

Requests a reboot of the specified instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

If an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a hard reboot.

For more information about troubleshooting, see Getting console output and rebooting instances in the Amazon EC2 User Guide.

Service Reference:

Examples:

To reboot an EC2 instance


/* This example reboots the specified EC2 instance. */

 var params = {
  InstanceIds: [
     "i-1234567890abcdef5"
  ]
 };
 ec2.rebootInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the rebootInstances operation

var params = {
  InstanceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.rebootInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceIds — (Array<String>)

      The instance IDs.

    • 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.

registerImage(params = {}, callback) ⇒ AWS.Request

Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see Creating your own AMIs in the Amazon Elastic Compute Cloud User Guide.

Note: For Amazon EBS-backed instances, CreateImage creates and registers the AMI in a single request, so you don't have to register the AMI yourself.

If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.

Register a snapshot of a root device volume

You can use RegisterImage to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using a block device mapping. You can't set the encryption state of the volume using the block device mapping. If the snapshot is encrypted, or encryption by default is enabled, the root volume of an instance launched from the AMI is encrypted.

For more information, see Create a Linux AMI from a snapshot and Use encryption with Amazon EBS-backed AMIs in the Amazon Elastic Compute Cloud User Guide.

Amazon Web Services Marketplace product codes

If any snapshots have Amazon Web Services Marketplace product codes, they are copied to the new AMI.

Windows and some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the Amazon EC2 billing product code associated with an AMI to verify the subscription status for package updates. To create a new AMI for operating systems that require a billing product code, instead of registering the AMI, do the following to preserve the billing product code association:

  1. Launch an instance from an existing AMI with that billing product code.

  2. Customize the instance.

  3. Create an AMI from the instance using CreateImage.

If you purchase a Reserved Instance to apply to an On-Demand Instance that was launched from an AMI with a billing product code, make sure that the Reserved Instance has the matching billing product code. If you purchase a Reserved Instance without the matching billing product code, the Reserved Instance will not be applied to the On-Demand Instance. For information about how to obtain the platform details and billing information of an AMI, see Understanding AMI billing in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the registerImage operation

var params = {
  Name: 'STRING_VALUE', /* required */
  Architecture: i386 | x86_64 | arm64 | x86_64_mac,
  BillingProducts: [
    'STRING_VALUE',
    /* more items */
  ],
  BlockDeviceMappings: [
    {
      DeviceName: 'STRING_VALUE',
      Ebs: {
        DeleteOnTermination: true || false,
        Encrypted: true || false,
        Iops: 'NUMBER_VALUE',
        KmsKeyId: 'STRING_VALUE',
        OutpostArn: 'STRING_VALUE',
        SnapshotId: 'STRING_VALUE',
        Throughput: 'NUMBER_VALUE',
        VolumeSize: 'NUMBER_VALUE',
        VolumeType: standard | io1 | io2 | gp2 | sc1 | st1 | gp3
      },
      NoDevice: 'STRING_VALUE',
      VirtualName: 'STRING_VALUE'
    },
    /* more items */
  ],
  BootMode: legacy-bios | uefi,
  Description: 'STRING_VALUE',
  DryRun: true || false,
  EnaSupport: true || false,
  ImageLocation: 'STRING_VALUE',
  KernelId: 'STRING_VALUE',
  RamdiskId: 'STRING_VALUE',
  RootDeviceName: 'STRING_VALUE',
  SriovNetSupport: 'STRING_VALUE',
  VirtualizationType: 'STRING_VALUE'
};
ec2.registerImage(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: {})
    • ImageLocation — (String)

      The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the aws-exec-read canned access control list (ACL) to ensure that it can be accessed by Amazon EC2. For more information, see Canned ACLs in the Amazon S3 Service Developer Guide.

    • Architecture — (String)

      The architecture of the AMI.

      Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs, the architecture specified in the manifest file.

      Possible values include:
      • "i386"
      • "x86_64"
      • "arm64"
      • "x86_64_mac"
    • BlockDeviceMappings — (Array<map>)

      The block device mapping entries.

      If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.

      If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost only. For more information, Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide.

      • DeviceName — (String)

        The device name (for example, /dev/sdh or xvdh).

      • 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.

        NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

        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.

      • Ebs — (map)

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination — (Boolean)

          Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

        • Iops — (Integer)

          The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

          The following are the supported values for each volume type:

          • gp3: 3,000-16,000 IOPS

          • io1: 100-64,000 IOPS

          • io2: 100-64,000 IOPS

          For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

          This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

        • SnapshotId — (String)

          The ID of the snapshot.

        • VolumeSize — (Integer)

          The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

          The following are the supported volumes sizes for each volume type:

          • gp2 and gp3:1-16,384

          • io1 and io2: 4-16,384

          • st1 and sc1: 125-16,384

          • standard: 1-1,024

        • VolumeType — (String)

          The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

          Possible values include:
          • "standard"
          • "io1"
          • "io2"
          • "gp2"
          • "sc1"
          • "st1"
          • "gp3"
        • KmsKeyId — (String)

          Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

          This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

        • Throughput — (Integer)

          The throughput that the volume supports, in MiB/s.

          This parameter is valid only for gp3 volumes.

          Valid Range: Minimum value of 125. Maximum value of 1000.

        • OutpostArn — (String)

          The ARN of the Outpost on which the snapshot is stored.

        • Encrypted — (Boolean)

          Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

          In no case can you remove encryption from an encrypted volume.

          Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

          This parameter is not returned by .

      • NoDevice — (String)

        To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

    • Description — (String)

      A description for your AMI.

    • 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.

    • EnaSupport — (Boolean)

      Set to true to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.

      This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

    • KernelId — (String)

      The ID of the kernel.

    • Name — (String)

      A name for your AMI.

      Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

    • BillingProducts — (Array<String>)

      The billing product codes. Your account must be authorized to specify billing product codes. Otherwise, you can use the Amazon Web Services Marketplace to bill for the use of an AMI.

    • RamdiskId — (String)

      The ID of the RAM disk.

    • RootDeviceName — (String)

      The device name of the root device volume (for example, /dev/sda1).

    • SriovNetSupport — (String)

      Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.

      There is no way to disable sriovNetSupport at this time.

      This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

    • VirtualizationType — (String)

      The type of virtualization (hvm | paravirtual).

      Default: paravirtual

    • BootMode — (String)

      The boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.

      Possible values include:
      • "legacy-bios"
      • "uefi"

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 newly registered AMI.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerInstanceEventNotificationAttributes(params = {}, callback) ⇒ AWS.Request

Registers a set of tag keys to include in scheduled event notifications for your resources.

To remove tags, use .

Examples:

Calling the registerInstanceEventNotificationAttributes operation

var params = {
  DryRun: true || false,
  InstanceTagAttribute: {
    IncludeAllTagsOfInstance: true || false,
    InstanceTagKeys: [
      'STRING_VALUE',
      /* more items */
    ]
  }
};
ec2.registerInstanceEventNotificationAttributes(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.

    • InstanceTagAttribute — (map)

      Information about the tag keys to register.

      • IncludeAllTagsOfInstance — (Boolean)

        Indicates whether to register all tag keys in the current Region. Specify true to register all tag keys.

      • InstanceTagKeys — (Array<String>)

        The tag keys to register.

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:

      • InstanceTagAttribute — (map)

        The resulting set of tag keys.

        • InstanceTagKeys — (Array<String>)

          The registered tag keys.

        • IncludeAllTagsOfInstance — (Boolean)

          Indicates wheter all tag keys in the current Region are registered to appear in scheduled event notifications. true indicates that all tag keys in the current Region are registered.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerTransitGatewayMulticastGroupMembers(params = {}, callback) ⇒ AWS.Request

Registers members (network interfaces) with the transit gateway multicast group. A member is a network interface associated with a supported EC2 instance that receives multicast traffic. For information about supported instances, see Multicast Consideration in Amazon VPC Transit Gateways.

After you add the members, use SearchTransitGatewayMulticastGroups to verify that the members were added to the transit gateway multicast group.

Examples:

Calling the registerTransitGatewayMulticastGroupMembers operation

var params = {
  DryRun: true || false,
  GroupIpAddress: 'STRING_VALUE',
  NetworkInterfaceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  TransitGatewayMulticastDomainId: 'STRING_VALUE'
};
ec2.registerTransitGatewayMulticastGroupMembers(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: {})
    • TransitGatewayMulticastDomainId — (String)

      The ID of the transit gateway multicast domain.

    • GroupIpAddress — (String)

      The IP address assigned to the transit gateway multicast group.

    • NetworkInterfaceIds — (Array<String>)

      The group members' network interface IDs to register with the transit gateway multicast group.

    • 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:

      • RegisteredMulticastGroupMembers — (map)

        Information about the registered transit gateway multicast group members.

        • TransitGatewayMulticastDomainId — (String)

          The ID of the transit gateway multicast domain.

        • RegisteredNetworkInterfaceIds — (Array<String>)

          The ID of the registered network interfaces.

        • GroupIpAddress — (String)

          The IP address assigned to the transit gateway multicast group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerTransitGatewayMulticastGroupSources(params = {}, callback) ⇒ AWS.Request

Registers sources (network interfaces) with the specified transit gateway multicast group.

A multicast source is a network interface attached to a supported instance that sends multicast traffic. For information about supported instances, see Multicast Considerations in Amazon VPC Transit Gateways.

After you add the source, use SearchTransitGatewayMulticastGroups to verify that the source was added to the multicast group.

Examples:

Calling the registerTransitGatewayMulticastGroupSources operation

var params = {
  DryRun: true || false,
  GroupIpAddress: 'STRING_VALUE',
  NetworkInterfaceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  TransitGatewayMulticastDomainId: 'STRING_VALUE'
};
ec2.registerTransitGatewayMulticastGroupSources(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: {})
    • TransitGatewayMulticastDomainId — (String)

      The ID of the transit gateway multicast domain.

    • GroupIpAddress — (String)

      The IP address assigned to the transit gateway multicast group.

    • NetworkInterfaceIds — (Array<String>)

      The group sources' network interface IDs to register with the transit gateway multicast group.

    • 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:

      • RegisteredMulticastGroupSources — (map)

        Information about the transit gateway multicast group sources.

        • TransitGatewayMulticastDomainId — (String)

          The ID of the transit gateway multicast domain.

        • RegisteredNetworkInterfaceIds — (Array<String>)

          The IDs of the network interfaces members registered with the transit gateway multicast group.

        • GroupIpAddress — (String)

          The IP address assigned to the transit gateway multicast group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

rejectTransitGatewayMulticastDomainAssociations(params = {}, callback) ⇒ AWS.Request

Rejects a request to associate cross-account subnets with a transit gateway multicast domain.

Examples:

Calling the rejectTransitGatewayMulticastDomainAssociations operation

var params = {
  DryRun: true || false,
  SubnetIds: [
    'STRING_VALUE',
    /* more items */
  ],
  TransitGatewayAttachmentId: 'STRING_VALUE',
  TransitGatewayMulticastDomainId: 'STRING_VALUE'
};
ec2.rejectTransitGatewayMulticastDomainAssociations(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: {})
    • TransitGatewayMulticastDomainId — (String)

      The ID of the transit gateway multicast domain.

    • TransitGatewayAttachmentId — (String)

      The ID of the transit gateway attachment.

    • SubnetIds — (Array<String>)

      The IDs of the subnets to associate with the transit gateway multicast domain.

    • 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:

      • Associations — (map)

        Describes the multicast domain associations.

        • TransitGatewayMulticastDomainId — (String)

          The ID of the transit gateway multicast domain.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway attachment.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The type of resource, for example a VPC attachment.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • ResourceOwnerId — (String)

          The ID of the Amazon Web Services account that owns the resource.

        • Subnets — (Array<map>)

          The subnets associated with the multicast domain.

          • SubnetId — (String)

            The ID of the subnet.

          • State — (String)

            The state of the subnet association.

            Possible values include:
            • "pendingAcceptance"
            • "associating"
            • "associated"
            • "disassociating"
            • "disassociated"
            • "rejected"
            • "failed"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

rejectTransitGatewayPeeringAttachment(params = {}, callback) ⇒ AWS.Request

Rejects a transit gateway peering attachment request.

Examples:

Calling the rejectTransitGatewayPeeringAttachment operation

var params = {
  TransitGatewayAttachmentId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.rejectTransitGatewayPeeringAttachment(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: {})
    • TransitGatewayAttachmentId — (String)

      The ID of the transit gateway peering attachment.

    • 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:

      • TransitGatewayPeeringAttachment — (map)

        The transit gateway peering attachment.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway peering attachment.

        • RequesterTgwInfo — (map)

          Information about the requester transit gateway.

          • TransitGatewayId — (String)

            The ID of the transit gateway.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region — (String)

            The Region of the transit gateway.

        • AccepterTgwInfo — (map)

          Information about the accepter transit gateway.

          • TransitGatewayId — (String)

            The ID of the transit gateway.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region — (String)

            The Region of the transit gateway.

        • Status — (map)

          The status of the transit gateway peering attachment.

          • Code — (String)

            The status code.

          • Message — (String)

            The status message, if applicable.

        • State — (String)

          The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • CreationTime — (Date)

          The time the transit gateway peering attachment was created.

        • Tags — (Array<map>)

          The tags for the transit gateway peering attachment.

          • 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.

rejectTransitGatewayVpcAttachment(params = {}, callback) ⇒ AWS.Request

Rejects a request to attach a VPC to a transit gateway.

The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to view your pending VPC attachment requests. Use AcceptTransitGatewayVpcAttachment to accept a VPC attachment request.

Examples:

Calling the rejectTransitGatewayVpcAttachment operation

var params = {
  TransitGatewayAttachmentId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.rejectTransitGatewayVpcAttachment(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: {})
    • TransitGatewayAttachmentId — (String)

      The ID of the attachment.

    • 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:

      • TransitGatewayVpcAttachment — (map)

        Information about the attachment.

        • TransitGatewayAttachmentId — (String)

          The ID of the attachment.

        • TransitGatewayId — (String)

          The ID of the transit gateway.

        • VpcId — (String)

          The ID of the VPC.

        • VpcOwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC.

        • State — (String)

          The state of the VPC attachment. Note that the initiating state has been deprecated.

          Possible values include:
          • "initiating"
          • "initiatingRequest"
          • "pendingAcceptance"
          • "rollingBack"
          • "pending"
          • "available"
          • "modifying"
          • "deleting"
          • "deleted"
          • "failed"
          • "rejected"
          • "rejecting"
          • "failing"
        • SubnetIds — (Array<String>)

          The IDs of the subnets.

        • CreationTime — (Date)

          The creation time.

        • Options — (map)

          The VPC attachment options.

          • DnsSupport — (String)

            Indicates whether DNS support is enabled.

            Possible values include:
            • "enable"
            • "disable"
          • Ipv6Support — (String)

            Indicates whether IPv6 support is disabled.

            Possible values include:
            • "enable"
            • "disable"
          • ApplianceModeSupport — (String)

            Indicates whether appliance mode support is enabled.

            Possible values include:
            • "enable"
            • "disable"
        • Tags — (Array<map>)

          The tags for the VPC attachment.

          • 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.

rejectVpcEndpointConnections(params = {}, callback) ⇒ AWS.Request

Rejects one or more VPC endpoint connection requests to your VPC endpoint service.

Service Reference:

Examples:

Calling the rejectVpcEndpointConnections operation

var params = {
  ServiceId: 'STRING_VALUE', /* required */
  VpcEndpointIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.rejectVpcEndpointConnections(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.

    • ServiceId — (String)

      The ID of the service.

    • VpcEndpointIds — (Array<String>)

      The IDs of one or more VPC endpoints.

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 rejected, if applicable.

        • Error — (map)

          Information about the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message accompanying the error code.

        • ResourceId — (String)

          The ID of the resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

rejectVpcPeeringConnection(params = {}, callback) ⇒ AWS.Request

Rejects a VPC peering connection request. The VPC peering connection must be in the pending-acceptance state. Use the DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests. To delete an active VPC peering connection, or to delete a VPC peering connection request that you initiated, use DeleteVpcPeeringConnection.

Service Reference:

Examples:

Calling the rejectVpcPeeringConnection operation

var params = {
  VpcPeeringConnectionId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.rejectVpcPeeringConnection(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.

releaseAddress(params = {}, callback) ⇒ AWS.Request

Releases the specified Elastic IP address.

[EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use DisassociateAddress.

[Nondefault VPC] You must use DisassociateAddress to disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (InvalidIPAddress.InUse).

After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an AuthFailure error if the address is already allocated to another Amazon Web Services account.

[EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able to recover it. For more information, see AllocateAddress.

Service Reference:

Examples:

To release an Elastic IP address for EC2-VPC


/* This example releases an Elastic IP address for use with instances in a VPC. */

 var params = {
  AllocationId: "eipalloc-64d5890a"
 };
 ec2.releaseAddress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

To release an Elastic IP addresses for EC2-Classic


/* This example releases an Elastic IP address for use with instances in EC2-Classic. */

 var params = {
  PublicIp: "198.51.100.0"
 };
 ec2.releaseAddress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the releaseAddress operation

var params = {
  AllocationId: 'STRING_VALUE',
  DryRun: true || false,
  NetworkBorderGroup: 'STRING_VALUE',
  PublicIp: 'STRING_VALUE'
};
ec2.releaseAddress(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: {})
    • AllocationId — (String)

      [EC2-VPC] The allocation ID. Required for EC2-VPC.

    • PublicIp — (String)

      [EC2-Classic] The Elastic IP address. Required for EC2-Classic.

    • NetworkBorderGroup — (String)

      The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.

      If you provide an incorrect network border group, you receive an InvalidAddress.NotFound error.

      You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 classic, you receive an InvalidParameterCombination error.

    • 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.

releaseHosts(params = {}, callback) ⇒ AWS.Request

When you no longer want to use an On-Demand Dedicated Host it can be released. On-Demand billing is stopped and the host goes into released state. The host ID of Dedicated Hosts that have been released can no longer be specified in another request, for example, to modify the host. You must stop or terminate all instances on a host before it can be released.

When Dedicated Hosts are released, it may take some time for them to stop counting toward your limit and you may receive capacity errors when trying to allocate new Dedicated Hosts. Wait a few minutes and then try again.

Released hosts still appear in a DescribeHosts response.

Service Reference:

Examples:

Calling the releaseHosts operation

var params = {
  HostIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.releaseHosts(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 to release.

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:

      • Successful — (Array<String>)

        The IDs of the Dedicated Hosts that were successfully released.

      • Unsuccessful — (Array<map>)

        The IDs of the Dedicated Hosts that could not be released, including an error message.

        • Error — (map)

          Information about the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message accompanying the error code.

        • ResourceId — (String)

          The ID of the resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

replaceIamInstanceProfileAssociation(params = {}, callback) ⇒ AWS.Request

Replaces an IAM instance profile for the specified running instance. You can use this action to change the IAM instance profile that's associated with an instance without having to disassociate the existing IAM instance profile first.

Use DescribeIamInstanceProfileAssociations to get the association ID.

Examples:

Calling the replaceIamInstanceProfileAssociation operation

var params = {
  AssociationId: 'STRING_VALUE', /* required */
  IamInstanceProfile: { /* required */
    Arn: 'STRING_VALUE',
    Name: 'STRING_VALUE'
  }
};
ec2.replaceIamInstanceProfileAssociation(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: {})
    • IamInstanceProfile — (map)

      The IAM instance profile.

      • Arn — (String)

        The Amazon Resource Name (ARN) of the instance profile.

      • Name — (String)

        The name of the instance profile.

    • AssociationId — (String)

      The ID of the existing IAM instance profile association.

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:

      • IamInstanceProfileAssociation — (map)

        Information about the IAM instance profile association.

        • AssociationId — (String)

          The ID of the association.

        • InstanceId — (String)

          The ID of the instance.

        • IamInstanceProfile — (map)

          The IAM instance profile.

          • Arn — (String)

            The Amazon Resource Name (ARN) of the instance profile.

          • Id — (String)

            The ID of the instance profile.

        • State — (String)

          The state of the association.

          Possible values include:
          • "associating"
          • "associated"
          • "disassociating"
          • "disassociated"
        • Timestamp — (Date)

          The time the IAM instance profile was associated with the instance.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

replaceNetworkAclAssociation(params = {}, callback) ⇒ AWS.Request

Changes which network ACL a subnet is associated with. By default when you create a subnet, it's automatically associated with the default network ACL. For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

This is an idempotent operation.

Service Reference:

Examples:

To replace the network ACL associated with a subnet


/* This example associates the specified network ACL with the subnet for the specified network ACL association. */

 var params = {
  AssociationId: "aclassoc-e5b95c8c", 
  NetworkAclId: "acl-5fb85d36"
 };
 ec2.replaceNetworkAclAssociation(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NewAssociationId: "aclassoc-3999875b"
   }
   */
 });

Calling the replaceNetworkAclAssociation operation

var params = {
  AssociationId: 'STRING_VALUE', /* required */
  NetworkAclId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.replaceNetworkAclAssociation(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: {})
    • AssociationId — (String)

      The ID of the current association between the original network ACL and the subnet.

    • 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 new network ACL to associate with 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. The data object has the following properties:

      • NewAssociationId — (String)

        The ID of the new association.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

replaceNetworkAclEntry(params = {}, callback) ⇒ AWS.Request

Replaces an entry (rule) in a network ACL. For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

To replace a network ACL entry


/* This example replaces an entry for the specified network ACL. The new rule 100 allows ingress traffic from 203.0.113.12/24 on UDP port 53 (DNS) into any associated subnet. */

 var params = {
  CidrBlock: "203.0.113.12/24", 
  Egress: false, 
  NetworkAclId: "acl-5fb85d36", 
  PortRange: {
   From: 53, 
   To: 53
  }, 
  Protocol: "17", 
  RuleAction: "allow", 
  RuleNumber: 100
 };
 ec2.replaceNetworkAclEntry(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the replaceNetworkAclEntry operation

var params = {
  Egress: true || false, /* required */
  NetworkAclId: 'STRING_VALUE', /* required */
  Protocol: 'STRING_VALUE', /* required */
  RuleAction: allow | deny, /* required */
  RuleNumber: 'NUMBER_VALUE', /* required */
  CidrBlock: 'STRING_VALUE',
  DryRun: true || false,
  IcmpTypeCode: {
    Code: 'NUMBER_VALUE',
    Type: 'NUMBER_VALUE'
  },
  Ipv6CidrBlock: 'STRING_VALUE',
  PortRange: {
    From: 'NUMBER_VALUE',
    To: 'NUMBER_VALUE'
  }
};
ec2.replaceNetworkAclEntry(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: {})
    • CidrBlock — (String)

      The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24).

    • 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.

    • Egress — (Boolean)

      Indicates whether to replace the egress rule.

      Default: If no value is specified, we replace the ingress rule.

    • IcmpTypeCode — (map)

      ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

      • Code — (Integer)

        The ICMP code. A value of -1 means all codes for the specified ICMP type.

      • Type — (Integer)

        The ICMP type. A value of -1 means all types.

    • Ipv6CidrBlock — (String)

      The IPv6 network range to allow or deny, in CIDR notation (for example 2001:bd8:1234:1a00::/64).

    • NetworkAclId — (String)

      The ID of the ACL.

    • PortRange — (map)

      TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17 (UDP).

      • From — (Integer)

        The first port in the range.

      • To — (Integer)

        The last port in the range.

    • Protocol — (String)

      The protocol number. A value of "-1" means all protocols. If you specify "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is allowed, regardless of any ports or ICMP types or codes that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

    • RuleAction — (String)

      Indicates whether to allow or deny the traffic that matches the rule.

      Possible values include:
      • "allow"
      • "deny"
    • RuleNumber — (Integer)

      The rule number of the entry to replace.

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.

replaceRoute(params = {}, callback) ⇒ AWS.Request

Replaces an existing route within a route table in a VPC. You must provide only one of the following: internet gateway, virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, egress-only internet gateway, or transit gateway.

For more information, see Route tables in the Amazon Virtual Private Cloud User Guide.

Service Reference:

Examples:

To replace a route


/* This example replaces the specified route in the specified table table. The new route matches the specified CIDR and sends the traffic to the specified virtual private gateway. */

 var params = {
  DestinationCidrBlock: "10.0.0.0/16", 
  GatewayId: "vgw-9a4cacf3", 
  RouteTableId: "rtb-22574640"
 };
 ec2.replaceRoute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the replaceRoute operation

var params = {
  RouteTableId: 'STRING_VALUE', /* required */
  CarrierGatewayId: 'STRING_VALUE',
  DestinationCidrBlock: 'STRING_VALUE',
  DestinationIpv6CidrBlock: 'STRING_VALUE',
  DestinationPrefixListId: 'STRING_VALUE',
  DryRun: true || false,
  EgressOnlyInternetGatewayId: 'STRING_VALUE',
  GatewayId: 'STRING_VALUE',
  InstanceId: 'STRING_VALUE',
  LocalGatewayId: 'STRING_VALUE',
  LocalTarget: true || false,
  NatGatewayId: 'STRING_VALUE',
  NetworkInterfaceId: 'STRING_VALUE',
  TransitGatewayId: 'STRING_VALUE',
  VpcEndpointId: 'STRING_VALUE',
  VpcPeeringConnectionId: 'STRING_VALUE'
};
ec2.replaceRoute(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: {})
    • DestinationCidrBlock — (String)

      The IPv4 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.

    • DestinationIpv6CidrBlock — (String)

      The IPv6 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.

    • DestinationPrefixListId — (String)

      The ID of the prefix list for the route.

    • 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.

    • VpcEndpointId — (String)

      The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.

    • EgressOnlyInternetGatewayId — (String)

      [IPv6 traffic only] The ID of an egress-only internet gateway.

    • GatewayId — (String)

      The ID of an internet gateway or virtual private gateway.

    • InstanceId — (String)

      The ID of a NAT instance in your VPC.

    • LocalTarget — (Boolean)

      Specifies whether to reset the local route to its default target (local).

    • NatGatewayId — (String)

      [IPv4 traffic only] The ID of a NAT gateway.

    • TransitGatewayId — (String)

      The ID of a transit gateway.

    • LocalGatewayId — (String)

      The ID of the local gateway.

    • CarrierGatewayId — (String)

      [IPv4 traffic only] The ID of a carrier gateway.

    • NetworkInterfaceId — (String)

      The ID of a network interface.

    • RouteTableId — (String)

      The ID of the route table.

    • VpcPeeringConnectionId — (String)

      The ID of a 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

replaceRouteTableAssociation(params = {}, callback) ⇒ AWS.Request

Changes the route table associated with a given subnet, internet gateway, or virtual private gateway in a VPC. After the operation completes, the subnet or gateway uses the routes in the new route table. For more information about route tables, see Route tables in the Amazon Virtual Private Cloud User Guide.

You can also use this operation to change which table is the main route table in the VPC. Specify the main route table's association ID and the route table ID of the new main route table.

Service Reference:

Examples:

To replace the route table associated with a subnet


/* This example associates the specified route table with the subnet for the specified route table association. */

 var params = {
  AssociationId: "rtbassoc-781d0d1a", 
  RouteTableId: "rtb-22574640"
 };
 ec2.replaceRouteTableAssociation(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    NewAssociationId: "rtbassoc-3a1f0f58"
   }
   */
 });

Calling the replaceRouteTableAssociation operation

var params = {
  AssociationId: 'STRING_VALUE', /* required */
  RouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.replaceRouteTableAssociation(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: {})
    • AssociationId — (String)

      The association ID.

    • 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 new route table to associate with 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. The data object has the following properties:

      • NewAssociationId — (String)

        The ID of the new association.

      • AssociationState — (map)

        The state of the association.

        • State — (String)

          The state of the association.

          Possible values include:
          • "associating"
          • "associated"
          • "disassociating"
          • "disassociated"
          • "failed"
        • StatusMessage — (String)

          The status message, if applicable.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

replaceTransitGatewayRoute(params = {}, callback) ⇒ AWS.Request

Replaces the specified route in the specified transit gateway route table.

Service Reference:

Examples:

Calling the replaceTransitGatewayRoute operation

var params = {
  DestinationCidrBlock: 'STRING_VALUE', /* required */
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  Blackhole: true || false,
  DryRun: true || false,
  TransitGatewayAttachmentId: 'STRING_VALUE'
};
ec2.replaceTransitGatewayRoute(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: {})
    • DestinationCidrBlock — (String)

      The CIDR range used for the destination match. Routing decisions are based on the most specific match.

    • TransitGatewayRouteTableId — (String)

      The ID of the route table.

    • TransitGatewayAttachmentId — (String)

      The ID of the attachment.

    • Blackhole — (Boolean)

      Indicates whether traffic matching this route is to be dropped.

    • 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:

      • Route — (map)

        Information about the modified route.

        • DestinationCidrBlock — (String)

          The CIDR block used for destination matches.

        • PrefixListId — (String)

          The ID of the prefix list used for destination matches.

        • TransitGatewayAttachments — (Array<map>)

          The attachments.

          • ResourceId — (String)

            The ID of the resource.

          • TransitGatewayAttachmentId — (String)

            The ID of the attachment.

          • ResourceType — (String)

            The resource type. Note that the tgw-peering resource type has been deprecated.

            Possible values include:
            • "vpc"
            • "vpn"
            • "direct-connect-gateway"
            • "connect"
            • "peering"
            • "tgw-peering"
        • Type — (String)

          The route type.

          Possible values include:
          • "static"
          • "propagated"
        • State — (String)

          The state of the route.

          Possible values include:
          • "pending"
          • "active"
          • "blackhole"
          • "deleting"
          • "deleted"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

reportInstanceStatus(params = {}, callback) ⇒ AWS.Request

Submits feedback about the status of an instance. The instance must be in the running state. If your experience with the instance differs from the instance status returned by DescribeInstanceStatus, use ReportInstanceStatus to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.

Use of this action does not change the value returned by DescribeInstanceStatus.

Service Reference:

Examples:

Calling the reportInstanceStatus operation

var params = {
  Instances: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  ReasonCodes: [ /* required */
    instance-stuck-in-state | unresponsive | not-accepting-credentials | password-not-available | performance-network | performance-instance-store | performance-ebs-volume | performance-other | other,
    /* more items */
  ],
  Status: ok | impaired, /* required */
  Description: 'STRING_VALUE',
  DryRun: true || false,
  EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
ec2.reportInstanceStatus(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)

      Descriptive text about the health state of your instance.

    • 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.

    • EndTime — (Date)

      The time at which the reported instance health state ended.

    • Instances — (Array<String>)

      The instances.

    • ReasonCodes — (Array<String>)

      The reason codes that describe the health state of your instance.

      • instance-stuck-in-state: My instance is stuck in a state.

      • unresponsive: My instance is unresponsive.

      • not-accepting-credentials: My instance is not accepting my credentials.

      • password-not-available: A password is not available for my instance.

      • performance-network: My instance is experiencing performance problems that I believe are network related.

      • performance-instance-store: My instance is experiencing performance problems that I believe are related to the instance stores.

      • performance-ebs-volume: My instance is experiencing performance problems that I believe are related to an EBS volume.

      • performance-other: My instance is experiencing performance problems.

      • other: [explain using the description parameter]

    • StartTime — (Date)

      The time at which the reported instance health state began.

    • Status — (String)

      The status of all instances listed.

      Possible values include:
      • "ok"
      • "impaired"

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.

requestSpotFleet(params = {}, callback) ⇒ AWS.Request

Creates a Spot Fleet request.

The Spot Fleet request specifies the total target capacity and the On-Demand target capacity. Amazon EC2 calculates the difference between the total capacity and On-Demand capacity, and launches the difference as Spot capacity.

You can submit a single request that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.

By default, the Spot Fleet requests Spot Instances in the Spot Instance pool where the price per unit is the lowest. Each launch specification can include its own instance weighting that reflects the value of the instance type to your application workload.

Alternatively, you can specify that the Spot Fleet distribute the target capacity across the Spot pools included in its launch specifications. By ensuring that the Spot Instances in your Spot Fleet are in different Spot pools, you can improve the availability of your fleet.

You can specify tags for the Spot Fleet request and instances launched by the fleet. You cannot tag other resource types in a Spot Fleet request because only the spot-fleet-request and instance resource types are supported.

For more information, see Spot Fleet requests in the Amazon EC2 User Guide for Linux Instances.

Service Reference:

Examples:

To request a Spot fleet in the subnet with the lowest price


/* This example creates a Spot fleet request with two launch specifications that differ only by subnet. The Spot fleet launches the instances in the specified subnet with the lowest price. If the instances are launched in a default VPC, they receive a public IP address by default. If the instances are launched in a nondefault VPC, they do not receive a public IP address by default. Note that you can't specify different subnets from the same Availability Zone in a Spot fleet request. */

 var params = {
  SpotFleetRequestConfig: {
   IamFleetRole: "arn:aws:iam::123456789012:role/my-spot-fleet-role", 
   LaunchSpecifications: [
      {
     IamInstanceProfile: {
      Arn: "arn:aws:iam::123456789012:instance-profile/my-iam-role"
     }, 
     ImageId: "ami-1a2b3c4d", 
     InstanceType: "m3.medium", 
     KeyName: "my-key-pair", 
     SecurityGroups: [
        {
       GroupId: "sg-1a2b3c4d"
      }
     ], 
     SubnetId: "subnet-1a2b3c4d, subnet-3c4d5e6f"
    }
   ], 
   SpotPrice: "0.04", 
   TargetCapacity: 2
  }
 };
 ec2.requestSpotFleet(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
   }
   */
 });

To request a Spot fleet in the Availability Zone with the lowest price


/* This example creates a Spot fleet request with two launch specifications that differ only by Availability Zone. The Spot fleet launches the instances in the specified Availability Zone with the lowest price. If your account supports EC2-VPC only, Amazon EC2 launches the Spot instances in the default subnet of the Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the Availability Zone. */

 var params = {
  SpotFleetRequestConfig: {
   IamFleetRole: "arn:aws:iam::123456789012:role/my-spot-fleet-role", 
   LaunchSpecifications: [
      {
     IamInstanceProfile: {
      Arn: "arn:aws:iam::123456789012:instance-profile/my-iam-role"
     }, 
     ImageId: "ami-1a2b3c4d", 
     InstanceType: "m3.medium", 
     KeyName: "my-key-pair", 
     Placement: {
      AvailabilityZone: "us-west-2a, us-west-2b"
     }, 
     SecurityGroups: [
        {
       GroupId: "sg-1a2b3c4d"
      }
     ]
    }
   ], 
   SpotPrice: "0.04", 
   TargetCapacity: 2
  }
 };
 ec2.requestSpotFleet(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
   }
   */
 });

To launch Spot instances in a subnet and assign them public IP addresses


/* This example assigns public addresses to instances launched in a nondefault VPC. Note that when you specify a network interface, you must include the subnet ID and security group ID using the network interface. */

 var params = {
  SpotFleetRequestConfig: {
   IamFleetRole: "arn:aws:iam::123456789012:role/my-spot-fleet-role", 
   LaunchSpecifications: [
      {
     IamInstanceProfile: {
      Arn: "arn:aws:iam::880185128111:instance-profile/my-iam-role"
     }, 
     ImageId: "ami-1a2b3c4d", 
     InstanceType: "m3.medium", 
     KeyName: "my-key-pair", 
     NetworkInterfaces: [
        {
       AssociatePublicIpAddress: true, 
       DeviceIndex: 0, 
       Groups: [
          "sg-1a2b3c4d"
       ], 
       SubnetId: "subnet-1a2b3c4d"
      }
     ]
    }
   ], 
   SpotPrice: "0.04", 
   TargetCapacity: 2
  }
 };
 ec2.requestSpotFleet(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
   }
   */
 });

To request a Spot fleet using the diversified allocation strategy


/* This example creates a Spot fleet request that launches 30 instances using the diversified allocation strategy. The launch specifications differ by instance type. The Spot fleet distributes the instances across the launch specifications such that there are 10 instances of each type. */

 var params = {
  SpotFleetRequestConfig: {
   AllocationStrategy: "diversified", 
   IamFleetRole: "arn:aws:iam::123456789012:role/my-spot-fleet-role", 
   LaunchSpecifications: [
      {
     ImageId: "ami-1a2b3c4d", 
     InstanceType: "c4.2xlarge", 
     SubnetId: "subnet-1a2b3c4d"
    }, 
      {
     ImageId: "ami-1a2b3c4d", 
     InstanceType: "m3.2xlarge", 
     SubnetId: "subnet-1a2b3c4d"
    }, 
      {
     ImageId: "ami-1a2b3c4d", 
     InstanceType: "r3.2xlarge", 
     SubnetId: "subnet-1a2b3c4d"
    }
   ], 
   SpotPrice: "0.70", 
   TargetCapacity: 30
  }
 };
 ec2.requestSpotFleet(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    SpotFleetRequestId: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
   }
   */
 });

Calling the requestSpotFleet operation

var params = {
  SpotFleetRequestConfig: { /* required */
    IamFleetRole: 'STRING_VALUE', /* required */
    TargetCapacity: 'NUMBER_VALUE', /* required */
    AllocationStrategy: lowestPrice | diversified | capacityOptimized | capacityOptimizedPrioritized,
    ClientToken: 'STRING_VALUE',
    Context: 'STRING_VALUE',
    ExcessCapacityTerminationPolicy: noTermination | default,
    FulfilledCapacity: 'NUMBER_VALUE',
    InstanceInterruptionBehavior: hibernate | stop | terminate,
    InstancePoolsToUseCount: 'NUMBER_VALUE',
    LaunchSpecifications: [
      {
        AddressingType: 'STRING_VALUE',
        BlockDeviceMappings: [
          {
            DeviceName: 'STRING_VALUE',
            Ebs: {
              DeleteOnTermination: true || false,
              Encrypted: true || false,
              Iops: 'NUMBER_VALUE',
              KmsKeyId: 'STRING_VALUE',
              OutpostArn: 'STRING_VALUE',
              SnapshotId: 'STRING_VALUE',
              Throughput: 'NUMBER_VALUE',
              VolumeSize: 'NUMBER_VALUE',
              VolumeType: standard | io1 | io2 | gp2 | sc1 | st1 | gp3
            },
            NoDevice: 'STRING_VALUE',
            VirtualName: 'STRING_VALUE'
          },
          /* more items */
        ],
        EbsOptimized: true || false,
        IamInstanceProfile: {
          Arn: 'STRING_VALUE',
          Name: 'STRING_VALUE'
        },
        ImageId: 'STRING_VALUE',
        InstanceRequirements: {
          AcceleratorCount: {
            Max: 'NUMBER_VALUE',
            Min: 'NUMBER_VALUE'
          },
          AcceleratorManufacturers: [
            nvidia | amd | amazon-web-services | xilinx,
            /* more items */
          ],
          AcceleratorNames: [
            a100 | v100 | k80 | t4 | m60 | radeon-pro-v520 | vu9p,
            /* more items */
          ],
          AcceleratorTotalMemoryMiB: {
            Max: 'NUMBER_VALUE',
            Min: 'NUMBER_VALUE'
          },
          AcceleratorTypes: [
            gpu | fpga | inference,
            /* more items */
          ],
          BareMetal: included | required | excluded,
          BaselineEbsBandwidthMbps: {
            Max: 'NUMBER_VALUE',
            Min: 'NUMBER_VALUE'
          },
          BurstablePerformance: included | required | excluded,
          CpuManufacturers: [
            intel | amd | amazon-web-services,
            /* more items */
          ],
          ExcludedInstanceTypes: [
            'STRING_VALUE',
            /* more items */
          ],
          InstanceGenerations: [
            current | previous,
            /* more items */
          ],
          LocalStorage: included | required | excluded,
          LocalStorageTypes: [
            hdd | ssd,
            /* more items */
          ],
          MemoryGiBPerVCpu: {
            Max: 'NUMBER_VALUE',
            Min: 'NUMBER_VALUE'
          },
          MemoryMiB: {
            Max: 'NUMBER_VALUE',
            Min: 'NUMBER_VALUE'
          },
          NetworkInterfaceCount: {
            Max: 'NUMBER_VALUE',
            Min: 'NUMBER_VALUE'
          },
          OnDemandMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
          RequireHibernateSupport: true || false,
          SpotMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
          TotalLocalStorageGB: {
            Max: 'NUMBER_VALUE',
            Min: 'NUMBER_VALUE'
          },
          VCpuCount: {
            Max: 'NUMBER_VALUE',
            Min: 'NUMBER_VALUE'
          }
        },
        InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
        KernelId: 'STRING_VALUE',
        KeyName: 'STRING_VALUE',
        Monitoring: {
          Enabled: true || false
        },
        NetworkInterfaces: [
          {
            AssociateCarrierIpAddress: true || false,
            AssociatePublicIpAddress: true || false,
            DeleteOnTermination: true || false,
            Description: 'STRING_VALUE',
            DeviceIndex: 'NUMBER_VALUE',
            Groups: [
              'STRING_VALUE',
              /* more items */
            ],
            InterfaceType: 'STRING_VALUE',
            Ipv4PrefixCount: 'NUMBER_VALUE',
            Ipv4Prefixes: [
              {
                Ipv4Prefix: 'STRING_VALUE'
              },
              /* more items */
            ],
            Ipv6AddressCount: 'NUMBER_VALUE',
            Ipv6Addresses: [
              {
                Ipv6Address: 'STRING_VALUE'
              },
              /* more items */
            ],
            Ipv6PrefixCount: 'NUMBER_VALUE',
            Ipv6Prefixes: [
              {
                Ipv6Prefix: 'STRING_VALUE'
              },
              /* more items */
            ],
            NetworkCardIndex: 'NUMBER_VALUE',
            NetworkInterfaceId: 'STRING_VALUE',
            PrivateIpAddress: 'STRING_VALUE',
            PrivateIpAddresses: [
              {
                Primary: true || false,
                PrivateIpAddress: 'STRING_VALUE'
              },
              /* more items */
            ],
            SecondaryPrivateIpAddressCount: 'NUMBER_VALUE',
            SubnetId: 'STRING_VALUE'
          },
          /* more items */
        ],
        Placement: {
          AvailabilityZone: 'STRING_VALUE',
          GroupName: 'STRING_VALUE',
          Tenancy: default | dedicated | host
        },
        RamdiskId: 'STRING_VALUE',
        SecurityGroups: [
          {
            GroupId: 'STRING_VALUE',
            GroupName: 'STRING_VALUE'
          },
          /* more items */
        ],
        SpotPrice: 'STRING_VALUE',
        SubnetId: 'STRING_VALUE',
        TagSpecifications: [
          {
            ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
            Tags: [
              {
                Key: 'STRING_VALUE',
                Value: 'STRING_VALUE'
              },
              /* more items */
            ]
          },
          /* more items */
        ],
        UserData: 'STRING_VALUE',
        WeightedCapacity: 'NUMBER_VALUE'
      },
      /* more items */
    ],
    LaunchTemplateConfigs: [
      {
        LaunchTemplateSpecification: {
          LaunchTemplateId: 'STRING_VALUE',
          LaunchTemplateName: 'STRING_VALUE',
          Version: 'STRING_VALUE'
        },
        Overrides: [
          {
            AvailabilityZone: 'STRING_VALUE',
            InstanceRequirements: {
              AcceleratorCount: {
                Max: 'NUMBER_VALUE',
                Min: 'NUMBER_VALUE'
              },
              AcceleratorManufacturers: [
                nvidia | amd | amazon-web-services | xilinx,
                /* more items */
              ],
              AcceleratorNames: [
                a100 | v100 | k80 | t4 | m60 | radeon-pro-v520 | vu9p,
                /* more items */
              ],
              AcceleratorTotalMemoryMiB: {
                Max: 'NUMBER_VALUE',
                Min: 'NUMBER_VALUE'
              },
              AcceleratorTypes: [
                gpu | fpga | inference,
                /* more items */
              ],
              BareMetal: included | required | excluded,
              BaselineEbsBandwidthMbps: {
                Max: 'NUMBER_VALUE',
                Min: 'NUMBER_VALUE'
              },
              BurstablePerformance: included | required | excluded,
              CpuManufacturers: [
                intel | amd | amazon-web-services,
                /* more items */
              ],
              ExcludedInstanceTypes: [
                'STRING_VALUE',
                /* more items */
              ],
              InstanceGenerations: [
                current | previous,
                /* more items */
              ],
              LocalStorage: included | required | excluded,
              LocalStorageTypes: [
                hdd | ssd,
                /* more items */
              ],
              MemoryGiBPerVCpu: {
                Max: 'NUMBER_VALUE',
                Min: 'NUMBER_VALUE'
              },
              MemoryMiB: {
                Max: 'NUMBER_VALUE',
                Min: 'NUMBER_VALUE'
              },
              NetworkInterfaceCount: {
                Max: 'NUMBER_VALUE',
                Min: 'NUMBER_VALUE'
              },
              OnDemandMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
              RequireHibernateSupport: true || false,
              SpotMaxPricePercentageOverLowestPrice: 'NUMBER_VALUE',
              TotalLocalStorageGB: {
                Max: 'NUMBER_VALUE',
                Min: 'NUMBER_VALUE'
              },
              VCpuCount: {
                Max: 'NUMBER_VALUE',
                Min: 'NUMBER_VALUE'
              }
            },
            InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
            Priority: 'NUMBER_VALUE',
            SpotPrice: 'STRING_VALUE',
            SubnetId: 'STRING_VALUE',
            WeightedCapacity: 'NUMBER_VALUE'
          },
          /* more items */
        ]
      },
      /* more items */
    ],
    LoadBalancersConfig: {
      ClassicLoadBalancersConfig: {
        ClassicLoadBalancers: [
          {
            Name: 'STRING_VALUE'
          },
          /* more items */
        ]
      },
      TargetGroupsConfig: {
        TargetGroups: [
          {
            Arn: 'STRING_VALUE'
          },
          /* more items */
        ]
      }
    },
    OnDemandAllocationStrategy: lowestPrice | prioritized,
    OnDemandFulfilledCapacity: 'NUMBER_VALUE',
    OnDemandMaxTotalPrice: 'STRING_VALUE',
    OnDemandTargetCapacity: 'NUMBER_VALUE',
    ReplaceUnhealthyInstances: true || false,
    SpotMaintenanceStrategies: {
      CapacityRebalance: {
        ReplacementStrategy: launch | launch-before-terminate,
        TerminationDelay: 'NUMBER_VALUE'
      }
    },
    SpotMaxTotalPrice: 'STRING_VALUE',
    SpotPrice: 'STRING_VALUE',
    TagSpecifications: [
      {
        ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
        Tags: [
          {
            Key: 'STRING_VALUE',
            Value: 'STRING_VALUE'
          },
          /* more items */
        ]
      },
      /* more items */
    ],
    TargetCapacityUnitType: vcpu | memory-mib | units,
    TerminateInstancesWithExpiration: true || false,
    Type: request | maintain | instant,
    ValidFrom: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
    ValidUntil: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
  },
  DryRun: true || false
};
ec2.requestSpotFleet(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.

    • SpotFleetRequestConfig — (map)

      The configuration for the Spot Fleet request.

      • AllocationStrategy — (String)

        Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet request.

        If the allocation strategy is lowestPrice, Spot Fleet launches instances from the Spot Instance pools with the lowest price. This is the default allocation strategy.

        If the allocation strategy is diversified, Spot Fleet launches instances from all the Spot Instance pools that you specify.

        If the allocation strategy is capacityOptimized (recommended), Spot Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacityOptimizedPrioritized. Set a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides. You can assign the same priority to different LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacityOptimizedPrioritized is supported only if your Spot Fleet uses a launch template. Note that if the OnDemandAllocationStrategy is set to prioritized, the same priority is applied when fulfilling On-Demand capacity.

        Possible values include:
        • "lowestPrice"
        • "diversified"
        • "capacityOptimized"
        • "capacityOptimizedPrioritized"
      • OnDemandAllocationStrategy — (String)

        The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify lowestPrice, Spot Fleet uses price to determine the order, launching the lowest price first. If you specify prioritized, Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to lowestPrice.

        Possible values include:
        • "lowestPrice"
        • "prioritized"
      • SpotMaintenanceStrategies — (map)

        The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.

        • CapacityRebalance — (map)

          The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.

          • ReplacementStrategy — (String)

            The replacement strategy to use. Only available for fleets of type maintain.

            launch - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. Spot Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.

            launch-before-terminate - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in TerminationDelay), terminates the instances that received a rebalance notification.

            Possible values include:
            • "launch"
            • "launch-before-terminate"
          • TerminationDelay — (Integer)

            The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.

      • ClientToken — (String)

        A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see Ensuring Idempotency.

      • ExcessCapacityTerminationPolicy — (String)

        Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.

        Possible values include:
        • "noTermination"
        • "default"
      • FulfilledCapacity — (Float)

        The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.

      • OnDemandFulfilledCapacity — (Float)

        The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.

      • IamFleetRolerequired — (String)

        The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see Spot Fleet prerequisites in the Amazon EC2 User Guide for Linux Instances. Spot Fleet can terminate Spot Instances on your behalf when you cancel its Spot Fleet request using CancelSpotFleetRequests or when the Spot Fleet request expires, if you set TerminateInstancesWithExpiration.

      • LaunchSpecifications — (Array<map>)

        The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications, you can't specify LaunchTemplateConfigs. If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs.

        • SecurityGroups — (Array<map>)

          One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • AddressingType — (String)

          Deprecated.

        • BlockDeviceMappings — (Array<map>)

          One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.

          • DeviceName — (String)

            The device name (for example, /dev/sdh or xvdh).

          • 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.

            NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

            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.

          • Ebs — (map)

            Parameters used to automatically set up EBS volumes when the instance is launched.

            • DeleteOnTermination — (Boolean)

              Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

              The following are the supported values for each volume type:

              • gp3: 3,000-16,000 IOPS

              • io1: 100-64,000 IOPS

              • io2: 100-64,000 IOPS

              For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

              This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

            • SnapshotId — (String)

              The ID of the snapshot.

            • VolumeSize — (Integer)

              The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

              The following are the supported volumes sizes for each volume type:

              • gp2 and gp3:1-16,384

              • io1 and io2: 4-16,384

              • st1 and sc1: 125-16,384

              • standard: 1-1,024

            • VolumeType — (String)

              The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

              Possible values include:
              • "standard"
              • "io1"
              • "io2"
              • "gp2"
              • "sc1"
              • "st1"
              • "gp3"
            • KmsKeyId — (String)

              Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

              This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

            • Throughput — (Integer)

              The throughput that the volume supports, in MiB/s.

              This parameter is valid only for gp3 volumes.

              Valid Range: Minimum value of 125. Maximum value of 1000.

            • OutpostArn — (String)

              The ARN of the Outpost on which the snapshot is stored.

            • Encrypted — (Boolean)

              Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

              In no case can you remove encryption from an encrypted volume.

              Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

              This parameter is not returned by .

          • NoDevice — (String)

            To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

        • EbsOptimized — (Boolean)

          Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

          Default: false

        • IamInstanceProfile — (map)

          The IAM instance profile.

          • Arn — (String)

            The Amazon Resource Name (ARN) of the instance profile.

          • Name — (String)

            The name of the instance profile.

        • ImageId — (String)

          The ID of the AMI.

        • InstanceType — (String)

          The instance type.

          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • KernelId — (String)

          The ID of the kernel.

        • KeyName — (String)

          The name of the key pair.

        • Monitoring — (map)

          Enable or disable monitoring for the instances.

          • Enabled — (Boolean)

            Enables monitoring for the instance.

            Default: false

        • NetworkInterfaces — (Array<map>)

          One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

          Note: SpotFleetLaunchSpecification currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use LaunchTemplateConfig.
          • AssociatePublicIpAddress — (Boolean)

            Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true.

          • DeleteOnTermination — (Boolean)

            If set to true, the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.

          • Description — (String)

            The description of the network interface. Applies only if creating a network interface when launching an instance.

          • DeviceIndex — (Integer)

            The position of the network interface in the attachment order. A primary network interface has a device index of 0.

            If you specify a network interface when launching an instance, you must specify the device index.

          • Groups — (Array<String>)

            The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

          • Ipv6AddressCount — (Integer)

            A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

          • Ipv6Addresses — (Array<map>)

            One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

            • Ipv6Address — (String)

              The IPv6 address.

          • NetworkInterfaceId — (String)

            The ID of the network interface.

            If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

          • PrivateIpAddress — (String)

            The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

          • PrivateIpAddresses — (Array<map>)

            One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

            • Primary — (Boolean)

              Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

            • PrivateIpAddress — (String)

              The private IPv4 addresses.

          • SecondaryPrivateIpAddressCount — (Integer)

            The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

          • SubnetId — (String)

            The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

          • AssociateCarrierIpAddress — (Boolean)

            Indicates whether to assign a carrier IP address to the network interface.

            You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP addresses in the Amazon Web Services Wavelength Developer Guide.

          • InterfaceType — (String)

            The type of network interface.

            To create an Elastic Fabric Adapter (EFA), specify efa. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide.

            Valid values: interface | efa

          • NetworkCardIndex — (Integer)

            The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

            If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances.

          • Ipv4Prefixes — (Array<map>)

            One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

          • Ipv4PrefixCount — (Integer)

            The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

          • Ipv6Prefixes — (Array<map>)

            One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

            • Ipv6Prefix — (String)

              The IPv6 prefix.

          • Ipv6PrefixCount — (Integer)

            The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

        • Placement — (map)

          The placement information.

          • AvailabilityZone — (String)

            The Availability Zone.

            [Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

          • GroupName — (String)

            The name of the placement group.

          • 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 Spot Instances.

            Possible values include:
            • "default"
            • "dedicated"
            • "host"
        • RamdiskId — (String)

          The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.

        • SpotPrice — (String)

          The maximum price per unit hour that you are willing to pay for a Spot Instance. If this value is not specified, the default is the Spot price specified for the fleet. To determine the Spot price per unit hour, divide the Spot price by the value of WeightedCapacity.

        • SubnetId — (String)

          The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".

        • UserData — (String)

          The Base64-encoded user data that instances use when starting up.

        • WeightedCapacity — (Float)

          The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.

          If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.

        • TagSpecifications — (Array<map>)

          The tags to apply during creation.

          • ResourceType — (String)

            The type of resource. Currently, the only resource type that is supported is instance. To tag the Spot Fleet request on creation, use the TagSpecifications parameter in SpotFleetRequestConfigData .

            Possible values include:
            • "capacity-reservation"
            • "client-vpn-endpoint"
            • "customer-gateway"
            • "carrier-gateway"
            • "dedicated-host"
            • "dhcp-options"
            • "egress-only-internet-gateway"
            • "elastic-ip"
            • "elastic-gpu"
            • "export-image-task"
            • "export-instance-task"
            • "fleet"
            • "fpga-image"
            • "host-reservation"
            • "image"
            • "import-image-task"
            • "import-snapshot-task"
            • "instance"
            • "instance-event-window"
            • "internet-gateway"
            • "ipv4pool-ec2"
            • "ipv6pool-ec2"
            • "key-pair"
            • "launch-template"
            • "local-gateway"
            • "local-gateway-route-table"
            • "local-gateway-virtual-interface"
            • "local-gateway-virtual-interface-group"
            • "local-gateway-route-table-vpc-association"
            • "local-gateway-route-table-virtual-interface-group-association"
            • "natgateway"
            • "network-acl"
            • "network-interface"
            • "network-insights-analysis"
            • "network-insights-path"
            • "placement-group"
            • "prefix-list"
            • "replace-root-volume-task"
            • "reserved-instances"
            • "route-table"
            • "security-group"
            • "security-group-rule"
            • "snapshot"
            • "spot-fleet-request"
            • "spot-instances-request"
            • "subnet"
            • "traffic-mirror-filter"
            • "traffic-mirror-session"
            • "traffic-mirror-target"
            • "transit-gateway"
            • "transit-gateway-attachment"
            • "transit-gateway-connect-peer"
            • "transit-gateway-multicast-domain"
            • "transit-gateway-route-table"
            • "volume"
            • "vpc"
            • "vpc-endpoint"
            • "vpc-endpoint-service"
            • "vpc-peering-connection"
            • "vpn-connection"
            • "vpn-gateway"
            • "vpc-flow-log"
          • Tags — (Array<map>)

            The tags.

            • 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.

        • InstanceRequirements — (map)

          The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

          Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
          • VCpuCount — (map)

            The minimum and maximum number of vCPUs.

            • Min — (Integer)

              The minimum number of vCPUs. If the value is 0, there is no minimum limit.

            • Max — (Integer)

              The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

          • MemoryMiB — (map)

            The minimum and maximum amount of memory, in MiB.

            • Min — (Integer)

              The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • CpuManufacturers — (Array<String>)

            The CPU manufacturers to include.

            • For instance types with Intel CPUs, specify intel.

            • For instance types with AMD CPUs, specify amd.

            • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

            Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

            Default: Any manufacturer

          • MemoryGiBPerVCpu — (map)

            The minimum and maximum amount of memory per vCPU, in GiB.

            Default: No minimum or maximum limits

            • Min — (Float)

              The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

            • Max — (Float)

              The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

          • ExcludedInstanceTypes — (Array<String>)

            The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

            For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

            Default: No excluded instance types

          • InstanceGenerations — (Array<String>)

            Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

            For current generation instance types, specify current.

            For previous generation instance types, specify previous.

            Default: Current and previous generation instance types

          • SpotMaxPricePercentageOverLowestPrice — (Integer)

            The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999.

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

            Default: 100

          • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

            The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999.

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

            Default: 20

          • BareMetal — (String)

            Indicates whether bare metal instance types must be included, excluded, or required.

            • To include bare metal instance types, specify included.

            • To require only bare metal instance types, specify required.

            • To exclude bare metal instance types, specify excluded.

            Default: excluded

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • BurstablePerformance — (String)

            Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

            • To include burstable performance instance types, specify included.

            • To require only burstable performance instance types, specify required.

            • To exclude burstable performance instance types, specify excluded.

            Default: excluded

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • RequireHibernateSupport — (Boolean)

            Indicates whether instance types must support hibernation for On-Demand Instances.

            This parameter is not supported for GetSpotPlacementScores.

            Default: false

          • NetworkInterfaceCount — (map)

            The minimum and maximum number of network interfaces.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

          • LocalStorage — (String)

            Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

            • To include instance types with instance store volumes, specify included.

            • To require only instance types with instance store volumes, specify required.

            • To exclude instance types with instance store volumes, specify excluded.

            Default: included

            Possible values include:
            • "included"
            • "required"
            • "excluded"
          • LocalStorageTypes — (Array<String>)

            The type of local storage that is required.

            • For instance types with hard disk drive (HDD) storage, specify hdd.

            • For instance types with solid state drive (SDD) storage, specify sdd.

            Default: hdd and sdd

          • TotalLocalStorageGB — (map)

            The minimum and maximum amount of total local storage, in GB.

            Default: No minimum or maximum limits

            • Min — (Float)

              The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

            • Max — (Float)

              The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

          • BaselineEbsBandwidthMbps — (map)

            The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

          • AcceleratorTypes — (Array<String>)

            The accelerator types that must be on the instance type.

            • For instance types with GPU accelerators, specify gpu.

            • For instance types with FPGA accelerators, specify fpga.

            • For instance types with inference accelerators, specify inference.

            Default: Any accelerator type

          • AcceleratorCount — (map)

            The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

            To exclude accelerator-enabled instance types, set Max to 0.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

          • AcceleratorManufacturers — (Array<String>)

            Indicates whether instance types must have accelerators by specific manufacturers.

            • For instance types with NVIDIA devices, specify nvidia.

            • For instance types with AMD devices, specify amd.

            • For instance types with Amazon Web Services devices, specify amazon-web-services.

            • For instance types with Xilinx devices, specify xilinx.

            Default: Any manufacturer

          • AcceleratorNames — (Array<String>)

            The accelerators that must be on the instance type.

            • For instance types with NVIDIA A100 GPUs, specify a100.

            • For instance types with NVIDIA V100 GPUs, specify v100.

            • For instance types with NVIDIA K80 GPUs, specify k80.

            • For instance types with NVIDIA T4 GPUs, specify t4.

            • For instance types with NVIDIA M60 GPUs, specify m60.

            • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

            • For instance types with Xilinx VU9P FPGAs, specify vu9p.

            Default: Any accelerator

          • AcceleratorTotalMemoryMiB — (map)

            The minimum and maximum amount of total accelerator memory, in MiB.

            Default: No minimum or maximum limits

            • Min — (Integer)

              The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

            • Max — (Integer)

              The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

      • LaunchTemplateConfigs — (Array<map>)

        The launch template and overrides. If you specify LaunchTemplateConfigs, you can't specify LaunchSpecifications. If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs.

        • LaunchTemplateSpecification — (map)

          The launch template.

          • LaunchTemplateId — (String)

            The ID of the launch template. If you specify the template ID, you can't specify the template name.

          • LaunchTemplateName — (String)

            The name of the launch template. If you specify the template name, you can't specify the template ID.

          • Version — (String)

            The launch template version number, $Latest, or $Default. You must specify a value, otherwise the request fails.

            If the value is $Latest, Amazon EC2 uses the latest version of the launch template.

            If the value is $Default, Amazon EC2 uses the default version of the launch template.

        • Overrides — (Array<map>)

          Any parameters that you specify override the same parameters in the launch template.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • SpotPrice — (String)

            The maximum price per unit hour that you are willing to pay for a Spot Instance.

          • SubnetId — (String)

            The ID of the subnet in which to launch the instances.

          • AvailabilityZone — (String)

            The Availability Zone in which to launch the instances.

          • WeightedCapacity — (Float)

            The number of units provided by the specified instance type.

          • Priority — (Float)

            The priority for the launch template override. The highest priority is launched first.

            If OnDemandAllocationStrategy is set to prioritized, Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

            If the Spot AllocationStrategy is set to capacityOptimizedPrioritized, Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

            Valid values are whole numbers starting at 0. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.

          • InstanceRequirements — (map)

            The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.

            Note: If you specify InstanceRequirements, you can't specify InstanceTypes.
            • VCpuCount — (map)

              The minimum and maximum number of vCPUs.

              • Min — (Integer)

                The minimum number of vCPUs. If the value is 0, there is no minimum limit.

              • Max — (Integer)

                The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

            • MemoryMiB — (map)

              The minimum and maximum amount of memory, in MiB.

              • Min — (Integer)

                The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

            • CpuManufacturers — (Array<String>)

              The CPU manufacturers to include.

              • For instance types with Intel CPUs, specify intel.

              • For instance types with AMD CPUs, specify amd.

              • For instance types with Amazon Web Services CPUs, specify amazon-web-services.

              Note: Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

              Default: Any manufacturer

            • MemoryGiBPerVCpu — (map)

              The minimum and maximum amount of memory per vCPU, in GiB.

              Default: No minimum or maximum limits

              • Min — (Float)

                The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

              • Max — (Float)

                The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

            • ExcludedInstanceTypes — (Array<String>)

              The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

              For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

              Default: No excluded instance types

            • InstanceGenerations — (Array<String>)

              Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.

              For current generation instance types, specify current.

              For previous generation instance types, specify previous.

              Default: Current and previous generation instance types

            • SpotMaxPricePercentageOverLowestPrice — (Integer)

              The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999.

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

              Default: 100

            • OnDemandMaxPricePercentageOverLowestPrice — (Integer)

              The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999.

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

              Default: 20

            • BareMetal — (String)

              Indicates whether bare metal instance types must be included, excluded, or required.

              • To include bare metal instance types, specify included.

              • To require only bare metal instance types, specify required.

              • To exclude bare metal instance types, specify excluded.

              Default: excluded

              Possible values include:
              • "included"
              • "required"
              • "excluded"
            • BurstablePerformance — (String)

              Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

              • To include burstable performance instance types, specify included.

              • To require only burstable performance instance types, specify required.

              • To exclude burstable performance instance types, specify excluded.

              Default: excluded

              Possible values include:
              • "included"
              • "required"
              • "excluded"
            • RequireHibernateSupport — (Boolean)

              Indicates whether instance types must support hibernation for On-Demand Instances.

              This parameter is not supported for GetSpotPlacementScores.

              Default: false

            • NetworkInterfaceCount — (map)

              The minimum and maximum number of network interfaces.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

            • LocalStorage — (String)

              Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

              • To include instance types with instance store volumes, specify included.

              • To require only instance types with instance store volumes, specify required.

              • To exclude instance types with instance store volumes, specify excluded.

              Default: included

              Possible values include:
              • "included"
              • "required"
              • "excluded"
            • LocalStorageTypes — (Array<String>)

              The type of local storage that is required.

              • For instance types with hard disk drive (HDD) storage, specify hdd.

              • For instance types with solid state drive (SDD) storage, specify sdd.

              Default: hdd and sdd

            • TotalLocalStorageGB — (map)

              The minimum and maximum amount of total local storage, in GB.

              Default: No minimum or maximum limits

              • Min — (Float)

                The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

              • Max — (Float)

                The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

            • BaselineEbsBandwidthMbps — (map)

              The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

            • AcceleratorTypes — (Array<String>)

              The accelerator types that must be on the instance type.

              • For instance types with GPU accelerators, specify gpu.

              • For instance types with FPGA accelerators, specify fpga.

              • For instance types with inference accelerators, specify inference.

              Default: Any accelerator type

            • AcceleratorCount — (map)

              The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

              To exclude accelerator-enabled instance types, set Max to 0.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

            • AcceleratorManufacturers — (Array<String>)

              Indicates whether instance types must have accelerators by specific manufacturers.

              • For instance types with NVIDIA devices, specify nvidia.

              • For instance types with AMD devices, specify amd.

              • For instance types with Amazon Web Services devices, specify amazon-web-services.

              • For instance types with Xilinx devices, specify xilinx.

              Default: Any manufacturer

            • AcceleratorNames — (Array<String>)

              The accelerators that must be on the instance type.

              • For instance types with NVIDIA A100 GPUs, specify a100.

              • For instance types with NVIDIA V100 GPUs, specify v100.

              • For instance types with NVIDIA K80 GPUs, specify k80.

              • For instance types with NVIDIA T4 GPUs, specify t4.

              • For instance types with NVIDIA M60 GPUs, specify m60.

              • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520.

              • For instance types with Xilinx VU9P FPGAs, specify vu9p.

              Default: Any accelerator

            • AcceleratorTotalMemoryMiB — (map)

              The minimum and maximum amount of total accelerator memory, in MiB.

              Default: No minimum or maximum limits

              • Min — (Integer)

                The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max — (Integer)

                The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

      • SpotPrice — (String)

        The maximum price per unit hour that you are willing to pay for a Spot Instance. The default is the On-Demand price.

      • TargetCapacityrequired — (Integer)

        The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.

      • OnDemandTargetCapacity — (Integer)

        The number of On-Demand units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.

      • OnDemandMaxTotalPrice — (String)

        The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the onDemandMaxTotalPrice parameter, the spotMaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.

      • SpotMaxTotalPrice — (String)

        The maximum amount per hour for Spot Instances that you're willing to pay. You can use the spotdMaxTotalPrice parameter, the onDemandMaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.

      • TerminateInstancesWithExpiration — (Boolean)

        Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.

      • Type — (String)

        The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is request, the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is maintain, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: maintain. instant is listed but is not used by Spot Fleet.

        Possible values include:
        • "request"
        • "maintain"
        • "instant"
      • ValidFrom — (Date)

        The start date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). By default, Amazon EC2 starts fulfilling the request immediately.

      • ValidUntil — (Date)

        The end date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.

      • ReplaceUnhealthyInstances — (Boolean)

        Indicates whether Spot Fleet should replace unhealthy instances.

      • InstanceInterruptionBehavior — (String)

        The behavior when a Spot Instance is interrupted. The default is terminate.

        Possible values include:
        • "hibernate"
        • "stop"
        • "terminate"
      • LoadBalancersConfig — (map)

        One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.

        With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.

        • ClassicLoadBalancersConfig — (map)

          The Classic Load Balancers.

          • ClassicLoadBalancers — (Array<map>)

            One or more Classic Load Balancers.

            • Name — (String)

              The name of the load balancer.

        • TargetGroupsConfig — (map)

          The target groups.

          • TargetGroups — (Array<map>)

            One or more target groups.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the target group.

      • InstancePoolsToUseCount — (Integer)

        The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot AllocationStrategy is set to lowest-price. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

        Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.

      • Context — (String)

        Reserved.

      • TargetCapacityUnitType — (String)

        The unit for the target capacity.

        Default: units (translates to number of instances)

        Possible values include:
        • "vcpu"
        • "memory-mib"
        • "units"
      • TagSpecifications — (Array<map>)

        The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType must be spot-fleet-request, otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the launch template (valid only if you use LaunchTemplateConfigs) or in the SpotFleetTagSpecification (valid only if you use LaunchSpecifications). For information about tagging after launch, see Tagging Your Resources.

        • ResourceType — (String)

          The type of resource to tag on creation.

          Possible values include:
          • "capacity-reservation"
          • "client-vpn-endpoint"
          • "customer-gateway"
          • "carrier-gateway"
          • "dedicated-host"
          • "dhcp-options"
          • "egress-only-internet-gateway"
          • "elastic-ip"
          • "elastic-gpu"
          • "export-image-task"
          • "export-instance-task"
          • "fleet"
          • "fpga-image"
          • "host-reservation"
          • "image"
          • "import-image-task"
          • "import-snapshot-task"
          • "instance"
          • "instance-event-window"
          • "internet-gateway"
          • "ipv4pool-ec2"
          • "ipv6pool-ec2"
          • "key-pair"
          • "launch-template"
          • "local-gateway"
          • "local-gateway-route-table"
          • "local-gateway-virtual-interface"
          • "local-gateway-virtual-interface-group"
          • "local-gateway-route-table-vpc-association"
          • "local-gateway-route-table-virtual-interface-group-association"
          • "natgateway"
          • "network-acl"
          • "network-interface"
          • "network-insights-analysis"
          • "network-insights-path"
          • "placement-group"
          • "prefix-list"
          • "replace-root-volume-task"
          • "reserved-instances"
          • "route-table"
          • "security-group"
          • "security-group-rule"
          • "snapshot"
          • "spot-fleet-request"
          • "spot-instances-request"
          • "subnet"
          • "traffic-mirror-filter"
          • "traffic-mirror-session"
          • "traffic-mirror-target"
          • "transit-gateway"
          • "transit-gateway-attachment"
          • "transit-gateway-connect-peer"
          • "transit-gateway-multicast-domain"
          • "transit-gateway-route-table"
          • "volume"
          • "vpc"
          • "vpc-endpoint"
          • "vpc-endpoint-service"
          • "vpc-peering-connection"
          • "vpn-connection"
          • "vpn-gateway"
          • "vpc-flow-log"
        • Tags — (Array<map>)

          The tags to apply 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.

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:

      • SpotFleetRequestId — (String)

        The ID of the Spot Fleet request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

requestSpotInstances(params = {}, callback) ⇒ AWS.Request

Creates a Spot Instance request.

For more information, see Spot Instance requests in the Amazon EC2 User Guide for Linux Instances.

Service Reference:

Examples:

To create a one-time Spot Instance request


/* This example creates a one-time Spot Instance request for five instances in the specified Availability Zone. If your account supports EC2-VPC only, Amazon EC2 launches the instances in the default subnet of the specified Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the specified Availability Zone. */

 var params = {
  InstanceCount: 5, 
  LaunchSpecification: {
   IamInstanceProfile: {
    Arn: "arn:aws:iam::123456789012:instance-profile/my-iam-role"
   }, 
   ImageId: "ami-1a2b3c4d", 
   InstanceType: "m3.medium", 
   KeyName: "my-key-pair", 
   Placement: {
    AvailabilityZone: "us-west-2a"
   }, 
   SecurityGroupIds: [
      "sg-1a2b3c4d"
   ]
  }, 
  SpotPrice: "0.03", 
  Type: "one-time"
 };
 ec2.requestSpotInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

To create a one-time Spot Instance request


/* This example command creates a one-time Spot Instance request for five instances in the specified subnet. Amazon EC2 launches the instances in the specified subnet. If the VPC is a nondefault VPC, the instances do not receive a public IP address by default. */

 var params = {
  InstanceCount: 5, 
  LaunchSpecification: {
   IamInstanceProfile: {
    Arn: "arn:aws:iam::123456789012:instance-profile/my-iam-role"
   }, 
   ImageId: "ami-1a2b3c4d", 
   InstanceType: "m3.medium", 
   SecurityGroupIds: [
      "sg-1a2b3c4d"
   ], 
   SubnetId: "subnet-1a2b3c4d"
  }, 
  SpotPrice: "0.050", 
  Type: "one-time"
 };
 ec2.requestSpotInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the requestSpotInstances operation

var params = {
  AvailabilityZoneGroup: 'STRING_VALUE',
  BlockDurationMinutes: 'NUMBER_VALUE',
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  InstanceCount: 'NUMBER_VALUE',
  InstanceInterruptionBehavior: hibernate | stop | terminate,
  LaunchGroup: 'STRING_VALUE',
  LaunchSpecification: {
    AddressingType: 'STRING_VALUE',
    BlockDeviceMappings: [
      {
        DeviceName: 'STRING_VALUE',
        Ebs: {
          DeleteOnTermination: true || false,
          Encrypted: true || false,
          Iops: 'NUMBER_VALUE',
          KmsKeyId: 'STRING_VALUE',
          OutpostArn: 'STRING_VALUE',
          SnapshotId: 'STRING_VALUE',
          Throughput: 'NUMBER_VALUE',
          VolumeSize: 'NUMBER_VALUE',
          VolumeType: standard | io1 | io2 | gp2 | sc1 | st1 | gp3
        },
        NoDevice: 'STRING_VALUE',
        VirtualName: 'STRING_VALUE'
      },
      /* more items */
    ],
    EbsOptimized: true || false,
    IamInstanceProfile: {
      Arn: 'STRING_VALUE',
      Name: 'STRING_VALUE'
    },
    ImageId: 'STRING_VALUE',
    InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
    KernelId: 'STRING_VALUE',
    KeyName: 'STRING_VALUE',
    Monitoring: {
      Enabled: true || false /* required */
    },
    NetworkInterfaces: [
      {
        AssociateCarrierIpAddress: true || false,
        AssociatePublicIpAddress: true || false,
        DeleteOnTermination: true || false,
        Description: 'STRING_VALUE',
        DeviceIndex: 'NUMBER_VALUE',
        Groups: [
          'STRING_VALUE',
          /* more items */
        ],
        InterfaceType: 'STRING_VALUE',
        Ipv4PrefixCount: 'NUMBER_VALUE',
        Ipv4Prefixes: [
          {
            Ipv4Prefix: 'STRING_VALUE'
          },
          /* more items */
        ],
        Ipv6AddressCount: 'NUMBER_VALUE',
        Ipv6Addresses: [
          {
            Ipv6Address: 'STRING_VALUE'
          },
          /* more items */
        ],
        Ipv6PrefixCount: 'NUMBER_VALUE',
        Ipv6Prefixes: [
          {
            Ipv6Prefix: 'STRING_VALUE'
          },
          /* more items */
        ],
        NetworkCardIndex: 'NUMBER_VALUE',
        NetworkInterfaceId: 'STRING_VALUE',
        PrivateIpAddress: 'STRING_VALUE',
        PrivateIpAddresses: [
          {
            Primary: true || false,
            PrivateIpAddress: 'STRING_VALUE'
          },
          /* more items */
        ],
        SecondaryPrivateIpAddressCount: 'NUMBER_VALUE',
        SubnetId: 'STRING_VALUE'
      },
      /* more items */
    ],
    Placement: {
      AvailabilityZone: 'STRING_VALUE',
      GroupName: 'STRING_VALUE',
      Tenancy: default | dedicated | host
    },
    RamdiskId: 'STRING_VALUE',
    SecurityGroupIds: [
      'STRING_VALUE',
      /* more items */
    ],
    SecurityGroups: [
      'STRING_VALUE',
      /* more items */
    ],
    SubnetId: 'STRING_VALUE',
    UserData: 'STRING_VALUE'
  },
  SpotPrice: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  Type: one-time | persistent,
  ValidFrom: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  ValidUntil: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
ec2.requestSpotInstances(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: {})
    • AvailabilityZoneGroup — (String)

      The user-specified name for a logical grouping of requests.

      When you specify an Availability Zone group in a Spot Instance request, all Spot Instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to requests for Spot Instances of the same instance type. Any additional Spot Instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.

      If there is no active instance running in the Availability Zone group that you specify for a new Spot Instance request (all instances are terminated, the request is expired, or the maximum price you specified falls below current Spot price), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot Instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.

      Default: Instances are launched in any available Availability Zone.

    • BlockDurationMinutes — (Integer)

      Deprecated.

    • ClientToken — (String)

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon EC2 User Guide for Linux Instances.

    • 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.

    • InstanceCount — (Integer)

      The maximum number of Spot Instances to launch.

      Default: 1

    • LaunchGroup — (String)

      The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

      Default: Instances are launched and terminated individually

    • LaunchSpecification — (map)

      The launch specification.

      • SecurityGroupIds — (Array<String>)

        One or more security group IDs.

      • SecurityGroups — (Array<String>)

        One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

      • AddressingType — (String)

        Deprecated.

      • BlockDeviceMappings — (Array<map>)

        One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.

        • DeviceName — (String)

          The device name (for example, /dev/sdh or xvdh).

        • 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.

          NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

          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.

        • Ebs — (map)

          Parameters used to automatically set up EBS volumes when the instance is launched.

          • DeleteOnTermination — (Boolean)

            Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

          • Iops — (Integer)

            The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

            The following are the supported values for each volume type:

            • gp3: 3,000-16,000 IOPS

            • io1: 100-64,000 IOPS

            • io2: 100-64,000 IOPS

            For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

            This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

          • SnapshotId — (String)

            The ID of the snapshot.

          • VolumeSize — (Integer)

            The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

            The following are the supported volumes sizes for each volume type:

            • gp2 and gp3:1-16,384

            • io1 and io2: 4-16,384

            • st1 and sc1: 125-16,384

            • standard: 1-1,024

          • VolumeType — (String)

            The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

            Possible values include:
            • "standard"
            • "io1"
            • "io2"
            • "gp2"
            • "sc1"
            • "st1"
            • "gp3"
          • KmsKeyId — (String)

            Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

            This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

          • Throughput — (Integer)

            The throughput that the volume supports, in MiB/s.

            This parameter is valid only for gp3 volumes.

            Valid Range: Minimum value of 125. Maximum value of 1000.

          • OutpostArn — (String)

            The ARN of the Outpost on which the snapshot is stored.

          • Encrypted — (Boolean)

            Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

            In no case can you remove encryption from an encrypted volume.

            Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

            This parameter is not returned by .

        • NoDevice — (String)

          To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

      • 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 EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

        Default: false

      • IamInstanceProfile — (map)

        The IAM instance profile.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the instance profile.

        • Name — (String)

          The name of the instance profile.

      • ImageId — (String)

        The ID of the AMI.

      • InstanceType — (String)

        The instance type.

        Possible values include:
        • "t1.micro"
        • "t2.nano"
        • "t2.micro"
        • "t2.small"
        • "t2.medium"
        • "t2.large"
        • "t2.xlarge"
        • "t2.2xlarge"
        • "t3.nano"
        • "t3.micro"
        • "t3.small"
        • "t3.medium"
        • "t3.large"
        • "t3.xlarge"
        • "t3.2xlarge"
        • "t3a.nano"
        • "t3a.micro"
        • "t3a.small"
        • "t3a.medium"
        • "t3a.large"
        • "t3a.xlarge"
        • "t3a.2xlarge"
        • "t4g.nano"
        • "t4g.micro"
        • "t4g.small"
        • "t4g.medium"
        • "t4g.large"
        • "t4g.xlarge"
        • "t4g.2xlarge"
        • "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"
        • "m4.16xlarge"
        • "m2.xlarge"
        • "m2.2xlarge"
        • "m2.4xlarge"
        • "cr1.8xlarge"
        • "r3.large"
        • "r3.xlarge"
        • "r3.2xlarge"
        • "r3.4xlarge"
        • "r3.8xlarge"
        • "r4.large"
        • "r4.xlarge"
        • "r4.2xlarge"
        • "r4.4xlarge"
        • "r4.8xlarge"
        • "r4.16xlarge"
        • "r5.large"
        • "r5.xlarge"
        • "r5.2xlarge"
        • "r5.4xlarge"
        • "r5.8xlarge"
        • "r5.12xlarge"
        • "r5.16xlarge"
        • "r5.24xlarge"
        • "r5.metal"
        • "r5a.large"
        • "r5a.xlarge"
        • "r5a.2xlarge"
        • "r5a.4xlarge"
        • "r5a.8xlarge"
        • "r5a.12xlarge"
        • "r5a.16xlarge"
        • "r5a.24xlarge"
        • "r5b.large"
        • "r5b.xlarge"
        • "r5b.2xlarge"
        • "r5b.4xlarge"
        • "r5b.8xlarge"
        • "r5b.12xlarge"
        • "r5b.16xlarge"
        • "r5b.24xlarge"
        • "r5b.metal"
        • "r5d.large"
        • "r5d.xlarge"
        • "r5d.2xlarge"
        • "r5d.4xlarge"
        • "r5d.8xlarge"
        • "r5d.12xlarge"
        • "r5d.16xlarge"
        • "r5d.24xlarge"
        • "r5d.metal"
        • "r5ad.large"
        • "r5ad.xlarge"
        • "r5ad.2xlarge"
        • "r5ad.4xlarge"
        • "r5ad.8xlarge"
        • "r5ad.12xlarge"
        • "r5ad.16xlarge"
        • "r5ad.24xlarge"
        • "r6g.metal"
        • "r6g.medium"
        • "r6g.large"
        • "r6g.xlarge"
        • "r6g.2xlarge"
        • "r6g.4xlarge"
        • "r6g.8xlarge"
        • "r6g.12xlarge"
        • "r6g.16xlarge"
        • "r6gd.metal"
        • "r6gd.medium"
        • "r6gd.large"
        • "r6gd.xlarge"
        • "r6gd.2xlarge"
        • "r6gd.4xlarge"
        • "r6gd.8xlarge"
        • "r6gd.12xlarge"
        • "r6gd.16xlarge"
        • "x1.16xlarge"
        • "x1.32xlarge"
        • "x1e.xlarge"
        • "x1e.2xlarge"
        • "x1e.4xlarge"
        • "x1e.8xlarge"
        • "x1e.16xlarge"
        • "x1e.32xlarge"
        • "i2.xlarge"
        • "i2.2xlarge"
        • "i2.4xlarge"
        • "i2.8xlarge"
        • "i3.large"
        • "i3.xlarge"
        • "i3.2xlarge"
        • "i3.4xlarge"
        • "i3.8xlarge"
        • "i3.16xlarge"
        • "i3.metal"
        • "i3en.large"
        • "i3en.xlarge"
        • "i3en.2xlarge"
        • "i3en.3xlarge"
        • "i3en.6xlarge"
        • "i3en.12xlarge"
        • "i3en.24xlarge"
        • "i3en.metal"
        • "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"
        • "c5.large"
        • "c5.xlarge"
        • "c5.2xlarge"
        • "c5.4xlarge"
        • "c5.9xlarge"
        • "c5.12xlarge"
        • "c5.18xlarge"
        • "c5.24xlarge"
        • "c5.metal"
        • "c5a.large"
        • "c5a.xlarge"
        • "c5a.2xlarge"
        • "c5a.4xlarge"
        • "c5a.8xlarge"
        • "c5a.12xlarge"
        • "c5a.16xlarge"
        • "c5a.24xlarge"
        • "c5ad.large"
        • "c5ad.xlarge"
        • "c5ad.2xlarge"
        • "c5ad.4xlarge"
        • "c5ad.8xlarge"
        • "c5ad.12xlarge"
        • "c5ad.16xlarge"
        • "c5ad.24xlarge"
        • "c5d.large"
        • "c5d.xlarge"
        • "c5d.2xlarge"
        • "c5d.4xlarge"
        • "c5d.9xlarge"
        • "c5d.12xlarge"
        • "c5d.18xlarge"
        • "c5d.24xlarge"
        • "c5d.metal"
        • "c5n.large"
        • "c5n.xlarge"
        • "c5n.2xlarge"
        • "c5n.4xlarge"
        • "c5n.9xlarge"
        • "c5n.18xlarge"
        • "c5n.metal"
        • "c6g.metal"
        • "c6g.medium"
        • "c6g.large"
        • "c6g.xlarge"
        • "c6g.2xlarge"
        • "c6g.4xlarge"
        • "c6g.8xlarge"
        • "c6g.12xlarge"
        • "c6g.16xlarge"
        • "c6gd.metal"
        • "c6gd.medium"
        • "c6gd.large"
        • "c6gd.xlarge"
        • "c6gd.2xlarge"
        • "c6gd.4xlarge"
        • "c6gd.8xlarge"
        • "c6gd.12xlarge"
        • "c6gd.16xlarge"
        • "c6gn.medium"
        • "c6gn.large"
        • "c6gn.xlarge"
        • "c6gn.2xlarge"
        • "c6gn.4xlarge"
        • "c6gn.8xlarge"
        • "c6gn.12xlarge"
        • "c6gn.16xlarge"
        • "cc1.4xlarge"
        • "cc2.8xlarge"
        • "g2.2xlarge"
        • "g2.8xlarge"
        • "g3.4xlarge"
        • "g3.8xlarge"
        • "g3.16xlarge"
        • "g3s.xlarge"
        • "g4ad.xlarge"
        • "g4ad.2xlarge"
        • "g4ad.4xlarge"
        • "g4ad.8xlarge"
        • "g4ad.16xlarge"
        • "g4dn.xlarge"
        • "g4dn.2xlarge"
        • "g4dn.4xlarge"
        • "g4dn.8xlarge"
        • "g4dn.12xlarge"
        • "g4dn.16xlarge"
        • "g4dn.metal"
        • "cg1.4xlarge"
        • "p2.xlarge"
        • "p2.8xlarge"
        • "p2.16xlarge"
        • "p3.2xlarge"
        • "p3.8xlarge"
        • "p3.16xlarge"
        • "p3dn.24xlarge"
        • "p4d.24xlarge"
        • "d2.xlarge"
        • "d2.2xlarge"
        • "d2.4xlarge"
        • "d2.8xlarge"
        • "d3.xlarge"
        • "d3.2xlarge"
        • "d3.4xlarge"
        • "d3.8xlarge"
        • "d3en.xlarge"
        • "d3en.2xlarge"
        • "d3en.4xlarge"
        • "d3en.6xlarge"
        • "d3en.8xlarge"
        • "d3en.12xlarge"
        • "dl1.24xlarge"
        • "f1.2xlarge"
        • "f1.4xlarge"
        • "f1.16xlarge"
        • "m5.large"
        • "m5.xlarge"
        • "m5.2xlarge"
        • "m5.4xlarge"
        • "m5.8xlarge"
        • "m5.12xlarge"
        • "m5.16xlarge"
        • "m5.24xlarge"
        • "m5.metal"
        • "m5a.large"
        • "m5a.xlarge"
        • "m5a.2xlarge"
        • "m5a.4xlarge"
        • "m5a.8xlarge"
        • "m5a.12xlarge"
        • "m5a.16xlarge"
        • "m5a.24xlarge"
        • "m5d.large"
        • "m5d.xlarge"
        • "m5d.2xlarge"
        • "m5d.4xlarge"
        • "m5d.8xlarge"
        • "m5d.12xlarge"
        • "m5d.16xlarge"
        • "m5d.24xlarge"
        • "m5d.metal"
        • "m5ad.large"
        • "m5ad.xlarge"
        • "m5ad.2xlarge"
        • "m5ad.4xlarge"
        • "m5ad.8xlarge"
        • "m5ad.12xlarge"
        • "m5ad.16xlarge"
        • "m5ad.24xlarge"
        • "m5zn.large"
        • "m5zn.xlarge"
        • "m5zn.2xlarge"
        • "m5zn.3xlarge"
        • "m5zn.6xlarge"
        • "m5zn.12xlarge"
        • "m5zn.metal"
        • "h1.2xlarge"
        • "h1.4xlarge"
        • "h1.8xlarge"
        • "h1.16xlarge"
        • "z1d.large"
        • "z1d.xlarge"
        • "z1d.2xlarge"
        • "z1d.3xlarge"
        • "z1d.6xlarge"
        • "z1d.12xlarge"
        • "z1d.metal"
        • "u-6tb1.56xlarge"
        • "u-6tb1.112xlarge"
        • "u-9tb1.112xlarge"
        • "u-12tb1.112xlarge"
        • "u-6tb1.metal"
        • "u-9tb1.metal"
        • "u-12tb1.metal"
        • "u-18tb1.metal"
        • "u-24tb1.metal"
        • "a1.medium"
        • "a1.large"
        • "a1.xlarge"
        • "a1.2xlarge"
        • "a1.4xlarge"
        • "a1.metal"
        • "m5dn.large"
        • "m5dn.xlarge"
        • "m5dn.2xlarge"
        • "m5dn.4xlarge"
        • "m5dn.8xlarge"
        • "m5dn.12xlarge"
        • "m5dn.16xlarge"
        • "m5dn.24xlarge"
        • "m5dn.metal"
        • "m5n.large"
        • "m5n.xlarge"
        • "m5n.2xlarge"
        • "m5n.4xlarge"
        • "m5n.8xlarge"
        • "m5n.12xlarge"
        • "m5n.16xlarge"
        • "m5n.24xlarge"
        • "m5n.metal"
        • "r5dn.large"
        • "r5dn.xlarge"
        • "r5dn.2xlarge"
        • "r5dn.4xlarge"
        • "r5dn.8xlarge"
        • "r5dn.12xlarge"
        • "r5dn.16xlarge"
        • "r5dn.24xlarge"
        • "r5dn.metal"
        • "r5n.large"
        • "r5n.xlarge"
        • "r5n.2xlarge"
        • "r5n.4xlarge"
        • "r5n.8xlarge"
        • "r5n.12xlarge"
        • "r5n.16xlarge"
        • "r5n.24xlarge"
        • "r5n.metal"
        • "inf1.xlarge"
        • "inf1.2xlarge"
        • "inf1.6xlarge"
        • "inf1.24xlarge"
        • "m6g.metal"
        • "m6g.medium"
        • "m6g.large"
        • "m6g.xlarge"
        • "m6g.2xlarge"
        • "m6g.4xlarge"
        • "m6g.8xlarge"
        • "m6g.12xlarge"
        • "m6g.16xlarge"
        • "m6gd.metal"
        • "m6gd.medium"
        • "m6gd.large"
        • "m6gd.xlarge"
        • "m6gd.2xlarge"
        • "m6gd.4xlarge"
        • "m6gd.8xlarge"
        • "m6gd.12xlarge"
        • "m6gd.16xlarge"
        • "m6i.large"
        • "m6i.xlarge"
        • "m6i.2xlarge"
        • "m6i.4xlarge"
        • "m6i.8xlarge"
        • "m6i.12xlarge"
        • "m6i.16xlarge"
        • "m6i.24xlarge"
        • "m6i.32xlarge"
        • "mac1.metal"
        • "x2gd.medium"
        • "x2gd.large"
        • "x2gd.xlarge"
        • "x2gd.2xlarge"
        • "x2gd.4xlarge"
        • "x2gd.8xlarge"
        • "x2gd.12xlarge"
        • "x2gd.16xlarge"
        • "x2gd.metal"
        • "vt1.3xlarge"
        • "vt1.6xlarge"
        • "vt1.24xlarge"
      • KernelId — (String)

        The ID of the kernel.

      • KeyName — (String)

        The name of the key pair.

      • Monitoring — (map)

        Indicates whether basic or detailed monitoring is enabled for the instance.

        Default: Disabled

        • Enabledrequired — (Boolean)

          Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

      • NetworkInterfaces — (Array<map>)

        One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

        • AssociatePublicIpAddress — (Boolean)

          Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true.

        • DeleteOnTermination — (Boolean)

          If set to true, the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.

        • Description — (String)

          The description of the network interface. Applies only if creating a network interface when launching an instance.

        • DeviceIndex — (Integer)

          The position of the network interface in the attachment order. A primary network interface has a device index of 0.

          If you specify a network interface when launching an instance, you must specify the device index.

        • Groups — (Array<String>)

          The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

        • Ipv6AddressCount — (Integer)

          A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

        • Ipv6Addresses — (Array<map>)

          One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

          • Ipv6Address — (String)

            The IPv6 address.

        • NetworkInterfaceId — (String)

          The ID of the network interface.

          If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

        • PrivateIpAddress — (String)

          The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

        • PrivateIpAddresses — (Array<map>)

          One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

          • Primary — (Boolean)

            Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

          • PrivateIpAddress — (String)

            The private IPv4 addresses.

        • SecondaryPrivateIpAddressCount — (Integer)

          The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

        • SubnetId — (String)

          The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

        • AssociateCarrierIpAddress — (Boolean)

          Indicates whether to assign a carrier IP address to the network interface.

          You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP addresses in the Amazon Web Services Wavelength Developer Guide.

        • InterfaceType — (String)

          The type of network interface.

          To create an Elastic Fabric Adapter (EFA), specify efa. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide.

          Valid values: interface | efa

        • NetworkCardIndex — (Integer)

          The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

          If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances.

        • Ipv4Prefixes — (Array<map>)

          One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

        • Ipv4PrefixCount — (Integer)

          The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

        • Ipv6Prefixes — (Array<map>)

          One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

          • Ipv6Prefix — (String)

            The IPv6 prefix.

        • Ipv6PrefixCount — (Integer)

          The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

      • Placement — (map)

        The placement information for the instance.

        • AvailabilityZone — (String)

          The Availability Zone.

          [Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

        • GroupName — (String)

          The name of the placement group.

        • 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 Spot Instances.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
      • RamdiskId — (String)

        The ID of the RAM disk.

      • SubnetId — (String)

        The ID of the subnet in which to launch the instance.

      • UserData — (String)

        The Base64-encoded user data for the instance. User data is limited to 16 KB.

    • SpotPrice — (String)

      The maximum price per hour that you are willing to pay for a Spot Instance. The default is the On-Demand price.

    • Type — (String)

      The Spot Instance request type.

      Default: one-time

      Possible values include:
      • "one-time"
      • "persistent"
    • ValidFrom — (Date)

      The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

      The specified start date and time cannot be equal to the current date and time. You must specify a start date and time that occurs after the current date and time.

    • ValidUntil — (Date)

      The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

      • For a persistent request, the request remains active until the ValidUntil date and time is reached. Otherwise, the request remains active until you cancel it.

      • For a one-time request, the request remains active until all instances launch, the request is canceled, or the ValidUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.

    • TagSpecifications — (Array<map>)

      The key-value pair for tagging the Spot Instance request on creation. The value for ResourceType must be spot-instances-request, otherwise the Spot Instance request fails. To tag the Spot Instance request after it has been created, see CreateTags.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • InstanceInterruptionBehavior — (String)

      The behavior when a Spot Instance is interrupted. The default is terminate.

      Possible values include:
      • "hibernate"
      • "stop"
      • "terminate"

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:

      • SpotInstanceRequests — (Array<map>)

        One or more Spot Instance requests.

        • ActualBlockHourlyPrice — (String)

          Deprecated.

        • AvailabilityZoneGroup — (String)

          The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

        • BlockDurationMinutes — (Integer)

          Deprecated.

        • CreateTime — (Date)

          The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

        • 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.

        • InstanceId — (String)

          The instance ID, if an instance has been launched to fulfill the Spot Instance request.

        • LaunchGroup — (String)

          The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

        • LaunchSpecification — (map)

          Additional information for launching instances.

          • UserData — (String)

            The Base64-encoded user data for the instance.

          • SecurityGroups — (Array<map>)

            One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

            • GroupName — (String)

              The name of the security group.

            • GroupId — (String)

              The ID of the security group.

          • AddressingType — (String)

            Deprecated.

          • BlockDeviceMappings — (Array<map>)

            One or more block device mapping entries.

            • DeviceName — (String)

              The device name (for example, /dev/sdh or xvdh).

            • 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.

              NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

              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.

            • Ebs — (map)

              Parameters used to automatically set up EBS volumes when the instance is launched.

              • DeleteOnTermination — (Boolean)

                Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

              • Iops — (Integer)

                The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

                The following are the supported values for each volume type:

                • gp3: 3,000-16,000 IOPS

                • io1: 100-64,000 IOPS

                • io2: 100-64,000 IOPS

                For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

                This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

              • SnapshotId — (String)

                The ID of the snapshot.

              • VolumeSize — (Integer)

                The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

                The following are the supported volumes sizes for each volume type:

                • gp2 and gp3:1-16,384

                • io1 and io2: 4-16,384

                • st1 and sc1: 125-16,384

                • standard: 1-1,024

              • VolumeType — (String)

                The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

                Possible values include:
                • "standard"
                • "io1"
                • "io2"
                • "gp2"
                • "sc1"
                • "st1"
                • "gp3"
              • KmsKeyId — (String)

                Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

                This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

              • Throughput — (Integer)

                The throughput that the volume supports, in MiB/s.

                This parameter is valid only for gp3 volumes.

                Valid Range: Minimum value of 125. Maximum value of 1000.

              • OutpostArn — (String)

                The ARN of the Outpost on which the snapshot is stored.

              • Encrypted — (Boolean)

                Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

                In no case can you remove encryption from an encrypted volume.

                Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

                This parameter is not returned by .

            • NoDevice — (String)

              To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

          • 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 EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

            Default: false

          • IamInstanceProfile — (map)

            The IAM instance profile.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the instance profile.

            • Name — (String)

              The name of the instance profile.

          • ImageId — (String)

            The ID of the AMI.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • KernelId — (String)

            The ID of the kernel.

          • KeyName — (String)

            The name of the key pair.

          • NetworkInterfaces — (Array<map>)

            One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

            • AssociatePublicIpAddress — (Boolean)

              Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true.

            • DeleteOnTermination — (Boolean)

              If set to true, the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.

            • Description — (String)

              The description of the network interface. Applies only if creating a network interface when launching an instance.

            • DeviceIndex — (Integer)

              The position of the network interface in the attachment order. A primary network interface has a device index of 0.

              If you specify a network interface when launching an instance, you must specify the device index.

            • Groups — (Array<String>)

              The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

            • Ipv6AddressCount — (Integer)

              A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

            • Ipv6Addresses — (Array<map>)

              One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

              • Ipv6Address — (String)

                The IPv6 address.

            • NetworkInterfaceId — (String)

              The ID of the network interface.

              If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

            • PrivateIpAddress — (String)

              The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

            • PrivateIpAddresses — (Array<map>)

              One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • Primary — (Boolean)

                Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

              • PrivateIpAddress — (String)

                The private IPv4 addresses.

            • SecondaryPrivateIpAddressCount — (Integer)

              The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

            • SubnetId — (String)

              The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

            • AssociateCarrierIpAddress — (Boolean)

              Indicates whether to assign a carrier IP address to the network interface.

              You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP addresses in the Amazon Web Services Wavelength Developer Guide.

            • InterfaceType — (String)

              The type of network interface.

              To create an Elastic Fabric Adapter (EFA), specify efa. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide.

              Valid values: interface | efa

            • NetworkCardIndex — (Integer)

              The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

              If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances.

            • Ipv4Prefixes — (Array<map>)

              One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

            • Ipv4PrefixCount — (Integer)

              The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

            • Ipv6Prefixes — (Array<map>)

              One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

              • Ipv6Prefix — (String)

                The IPv6 prefix.

            • Ipv6PrefixCount — (Integer)

              The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

          • Placement — (map)

            The placement information for the instance.

            • AvailabilityZone — (String)

              The Availability Zone.

              [Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

            • GroupName — (String)

              The name of the placement group.

            • 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 Spot Instances.

              Possible values include:
              • "default"
              • "dedicated"
              • "host"
          • RamdiskId — (String)

            The ID of the RAM disk.

          • SubnetId — (String)

            The ID of the subnet in which to launch the instance.

          • Monitoring — (map)

            Describes the monitoring of an instance.

            • Enabledrequired — (Boolean)

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        • LaunchedAvailabilityZone — (String)

          The Availability Zone in which the request is launched.

        • ProductDescription — (String)

          The product description associated with the Spot Instance.

          Possible values include:
          • "Linux/UNIX"
          • "Linux/UNIX (Amazon VPC)"
          • "Windows"
          • "Windows (Amazon VPC)"
        • SpotInstanceRequestId — (String)

          The ID of the Spot Instance request.

        • SpotPrice — (String)

          The maximum price per hour that you are willing to pay for a Spot Instance.

        • State — (String)

          The state of the Spot Instance request. Spot status information helps track your Spot Instance requests. For more information, see Spot status in the Amazon EC2 User Guide for Linux Instances.

          Possible values include:
          • "open"
          • "active"
          • "closed"
          • "cancelled"
          • "failed"
        • Status — (map)

          The status code and status message describing the Spot Instance request.

          • Code — (String)

            The status code. For a list of status codes, see Spot status codes in the Amazon EC2 User Guide for Linux Instances.

          • Message — (String)

            The description for the status code.

          • UpdateTime — (Date)

            The date and time of the most recent status update, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

        • 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.

        • Type — (String)

          The Spot Instance request type.

          Possible values include:
          • "one-time"
          • "persistent"
        • ValidFrom — (Date)

          The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.

        • ValidUntil — (Date)

          The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

          • For a persistent request, the request remains active until the validUntil date and time is reached. Otherwise, the request remains active until you cancel it.

          • For a one-time request, the request remains active until all instances launch, the request is canceled, or the validUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.

        • InstanceInterruptionBehavior — (String)

          The behavior when a Spot Instance is interrupted.

          Possible values include:
          • "hibernate"
          • "stop"
          • "terminate"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

resetAddressAttribute(params = {}, callback) ⇒ AWS.Request

Resets the attribute of the specified IP address. For requirements, see Using reverse DNS for email applications.

Service Reference:

Examples:

Calling the resetAddressAttribute operation

var params = {
  AllocationId: 'STRING_VALUE', /* required */
  Attribute: domain-name, /* required */
  DryRun: true || false
};
ec2.resetAddressAttribute(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: {})
    • AllocationId — (String)

      [EC2-VPC] The allocation ID.

    • Attribute — (String)

      The attribute of the IP address.

      Possible values include:
      • "domain-name"
    • 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:

      • Address — (map)

        Information about the IP address.

        • PublicIp — (String)

          The public IP address.

        • AllocationId — (String)

          [EC2-VPC] The allocation ID.

        • PtrRecord — (String)

          The pointer (PTR) record for the IP address.

        • PtrRecordUpdate — (map)

          The updated PTR record for the IP address.

          • Value — (String)

            The value for the PTR record update.

          • Status — (String)

            The status of the PTR record update.

          • Reason — (String)

            The reason for the PTR record update.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

resetEbsDefaultKmsKeyId(params = {}, callback) ⇒ AWS.Request

Resets the default KMS key for EBS encryption for your account in this Region to the Amazon Web Services managed KMS key for EBS.

After resetting the default KMS key to the Amazon Web Services managed KMS key, you can continue to encrypt by a customer managed KMS key by specifying it when you create the volume. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

Calling the resetEbsDefaultKmsKeyId operation

var params = {
  DryRun: true || false
};
ec2.resetEbsDefaultKmsKeyId(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:

      • KmsKeyId — (String)

        The Amazon Resource Name (ARN) of the default KMS key for EBS encryption by default.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

resetFpgaImageAttribute(params = {}, callback) ⇒ AWS.Request

Resets the specified attribute of the specified Amazon FPGA Image (AFI) to its default value. You can only reset the load permission attribute.

Service Reference:

Examples:

Calling the resetFpgaImageAttribute operation

var params = {
  FpgaImageId: 'STRING_VALUE', /* required */
  Attribute: loadPermission,
  DryRun: true || false
};
ec2.resetFpgaImageAttribute(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.

    • FpgaImageId — (String)

      The ID of the AFI.

    • Attribute — (String)

      The attribute.

      Possible values include:
      • "loadPermission"

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)

        Is true if the request succeeds, and an error otherwise.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

resetImageAttribute(params = {}, callback) ⇒ AWS.Request

Resets an attribute of an AMI to its default value.

Service Reference:

Examples:

To reset the launchPermission attribute


/* This example resets the launchPermission attribute for the specified AMI. By default, AMIs are private. */

 var params = {
  Attribute: "launchPermission", 
  ImageId: "ami-5731123e"
 };
 ec2.resetImageAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the resetImageAttribute operation

var params = {
  Attribute: launchPermission, /* required */
  ImageId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.resetImageAttribute(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: {})
    • Attribute — (String)

      The attribute to reset (currently you can only reset the launch permission attribute).

      Possible values include:
      • "launchPermission"
    • ImageId — (String)

      The ID of the AMI.

    • 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.

resetInstanceAttribute(params = {}, callback) ⇒ AWS.Request

Resets an attribute of an instance to its default value. To reset the kernel or ramdisk, the instance must be in a stopped state. To reset the sourceDestCheck, the instance can be either running or stopped.

The sourceDestCheck attribute controls whether source/destination checking is enabled. The default value is true, which means checking is enabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT Instances in the Amazon VPC User Guide.

Service Reference:

Examples:

To reset the sourceDestCheck attribute


/* This example resets the sourceDestCheck attribute for the specified instance. */

 var params = {
  Attribute: "sourceDestCheck", 
  InstanceId: "i-1234567890abcdef0"
 };
 ec2.resetInstanceAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the resetInstanceAttribute operation

var params = {
  Attribute: instanceType | kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport | enaSupport | enclaveOptions, /* required */
  InstanceId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.resetInstanceAttribute(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: {})
    • Attribute — (String)

      The attribute to reset.

      You can only reset the following attributes: kernel | ramdisk | sourceDestCheck. To change an instance attribute, use ModifyInstanceAttribute.

      Possible values include:
      • "instanceType"
      • "kernel"
      • "ramdisk"
      • "userData"
      • "disableApiTermination"
      • "instanceInitiatedShutdownBehavior"
      • "rootDeviceName"
      • "blockDeviceMapping"
      • "productCodes"
      • "sourceDestCheck"
      • "groupSet"
      • "ebsOptimized"
      • "sriovNetSupport"
      • "enaSupport"
      • "enclaveOptions"
    • 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.

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.

resetNetworkInterfaceAttribute(params = {}, callback) ⇒ AWS.Request

Resets a network interface attribute. You can specify only one attribute at a time.

Service Reference:

Examples:

Calling the resetNetworkInterfaceAttribute operation

var params = {
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  SourceDestCheck: 'STRING_VALUE'
};
ec2.resetNetworkInterfaceAttribute(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.

    • SourceDestCheck — (String)

      The source/destination checking attribute. Resets the value to true.

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.

resetSnapshotAttribute(params = {}, callback) ⇒ AWS.Request

Resets permission settings for the specified snapshot.

For more information about modifying snapshot permissions, see Share a snapshot in the Amazon Elastic Compute Cloud User Guide.

Service Reference:

Examples:

To reset a snapshot attribute


/* This example resets the create volume permissions for snapshot ``snap-1234567890abcdef0``. If the command succeeds, no output is returned. */

 var params = {
  Attribute: "createVolumePermission", 
  SnapshotId: "snap-1234567890abcdef0"
 };
 ec2.resetSnapshotAttribute(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the resetSnapshotAttribute operation

var params = {
  Attribute: productCodes | createVolumePermission, /* required */
  SnapshotId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.resetSnapshotAttribute(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: {})
    • Attribute — (String)

      The attribute to reset. Currently, only the attribute for permission to create volumes can be reset.

      Possible values include:
      • "productCodes"
      • "createVolumePermission"
    • SnapshotId — (String)

      The ID of the snapshot.

    • 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.

restoreAddressToClassic(params = {}, callback) ⇒ AWS.Request

Restores an Elastic IP address that was previously moved to the EC2-VPC platform back to the EC2-Classic platform. You cannot move an Elastic IP address that was originally allocated for use in EC2-VPC. The Elastic IP address must not be associated with an instance or network interface.

Service Reference:

Examples:

To restore an address to EC2-Classic


/* This example restores the specified Elastic IP address to the EC2-Classic platform. */

 var params = {
  PublicIp: "198.51.100.0"
 };
 ec2.restoreAddressToClassic(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    PublicIp: "198.51.100.0", 
    Status: "MoveInProgress"
   }
   */
 });

Calling the restoreAddressToClassic operation

var params = {
  PublicIp: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.restoreAddressToClassic(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.

    • PublicIp — (String)

      The Elastic IP address.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • PublicIp — (String)

        The Elastic IP address.

      • Status — (String)

        The move status for the IP address.

        Possible values include:
        • "MoveInProgress"
        • "InVpc"
        • "InClassic"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

restoreManagedPrefixListVersion(params = {}, callback) ⇒ AWS.Request

Restores the entries from a previous version of a managed prefix list to a new version of the prefix list.

Service Reference:

Examples:

Calling the restoreManagedPrefixListVersion operation

var params = {
  CurrentVersion: 'NUMBER_VALUE', /* required */
  PrefixListId: 'STRING_VALUE', /* required */
  PreviousVersion: 'NUMBER_VALUE', /* required */
  DryRun: true || false
};
ec2.restoreManagedPrefixListVersion(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.

    • PrefixListId — (String)

      The ID of the prefix list.

    • PreviousVersion — (Integer)

      The version to restore.

    • CurrentVersion — (Integer)

      The current version number for the prefix list.

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:

      • PrefixList — (map)

        Information about the prefix list.

        • PrefixListId — (String)

          The ID of the prefix list.

        • AddressFamily — (String)

          The IP address version.

        • State — (String)

          The current state of the prefix list.

          Possible values include:
          • "create-in-progress"
          • "create-complete"
          • "create-failed"
          • "modify-in-progress"
          • "modify-complete"
          • "modify-failed"
          • "restore-in-progress"
          • "restore-complete"
          • "restore-failed"
          • "delete-in-progress"
          • "delete-complete"
          • "delete-failed"
        • StateMessage — (String)

          The state message.

        • PrefixListArn — (String)

          The Amazon Resource Name (ARN) for the prefix list.

        • PrefixListName — (String)

          The name of the prefix list.

        • MaxEntries — (Integer)

          The maximum number of entries for the prefix list.

        • Version — (Integer)

          The version of the prefix list.

        • Tags — (Array<map>)

          The tags for the prefix list.

          • 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.

        • OwnerId — (String)

          The ID of the owner of the prefix list.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

revokeClientVpnIngress(params = {}, callback) ⇒ AWS.Request

Removes an ingress authorization rule from a Client VPN endpoint.

Service Reference:

Examples:

Calling the revokeClientVpnIngress operation

var params = {
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  TargetNetworkCidr: 'STRING_VALUE', /* required */
  AccessGroupId: 'STRING_VALUE',
  DryRun: true || false,
  RevokeAllGroups: true || false
};
ec2.revokeClientVpnIngress(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint with which the authorization rule is associated.

    • TargetNetworkCidr — (String)

      The IPv4 address range, in CIDR notation, of the network for which access is being removed.

    • AccessGroupId — (String)

      The ID of the Active Directory group for which to revoke access.

    • RevokeAllGroups — (Boolean)

      Indicates whether access should be revoked for all clients.

    • 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:

      • Status — (map)

        The current state of the authorization rule.

        • Code — (String)

          The state of the authorization rule.

          Possible values include:
          • "authorizing"
          • "active"
          • "failed"
          • "revoking"
        • Message — (String)

          A message about the status of the authorization rule, if applicable.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

revokeSecurityGroupEgress(params = {}, callback) ⇒ AWS.Request

[VPC only] Removes the specified outbound (egress) rules from a security group for EC2-VPC. This action does not apply to security groups for use in EC2-Classic.

You can specify rules using either rule IDs or security group rule properties. If you use rule properties, the values that you specify (for example, ports) must match the existing rule's values exactly. Each rule has a protocol, from and to ports, and destination (CIDR range, security group, or prefix list). For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code. If the security group rule has a description, you do not need to specify the description to revoke the rule.

[Default VPC] If the values you specify do not match the existing rule's values, no error is returned, and the output describes the security group rules that were not revoked.

Amazon Web Services recommends that you describe the security group to verify that the rules were removed.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

Service Reference:

Examples:

Calling the revokeSecurityGroupEgress operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  CidrIp: 'STRING_VALUE',
  DryRun: true || false,
  FromPort: 'NUMBER_VALUE',
  IpPermissions: [
    {
      FromPort: 'NUMBER_VALUE',
      IpProtocol: 'STRING_VALUE',
      IpRanges: [
        {
          CidrIp: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      Ipv6Ranges: [
        {
          CidrIpv6: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      PrefixListIds: [
        {
          Description: 'STRING_VALUE',
          PrefixListId: 'STRING_VALUE'
        },
        /* more items */
      ],
      ToPort: 'NUMBER_VALUE',
      UserIdGroupPairs: [
        {
          Description: 'STRING_VALUE',
          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',
  SecurityGroupRuleIds: [
    'STRING_VALUE',
    /* more items */
  ],
  SourceSecurityGroupName: 'STRING_VALUE',
  SourceSecurityGroupOwnerId: 'STRING_VALUE',
  ToPort: 'NUMBER_VALUE'
};
ec2.revokeSecurityGroupEgress(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.

    • IpPermissions — (Array<map>)

      The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions.

      • FromPort — (Integer)

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol — (String)

        The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges — (Array<map>)

        The IPv4 ranges.

        • CidrIp — (String)

          The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv4 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges — (Array<map>)

        [VPC only] The IPv6 ranges.

        • CidrIpv6 — (String)

          The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv6 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds — (Array<map>)

        [VPC only] The prefix list IDs.

        • Description — (String)

          A description for the security group rule that references this prefix list ID.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • PrefixListId — (String)

          The ID of the prefix.

      • ToPort — (Integer)

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs — (Array<map>)

        The security group and Amazon Web Services account ID pairs.

        • Description — (String)

          A description for the security group rule that references this user ID group pair.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • GroupId — (String)

          The ID of the security group.

        • 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.

          For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

        • PeeringStatus — (String)

          The status of a VPC peering connection, if applicable.

        • UserId — (String)

          The ID of an Amazon Web Services account.

          For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

          [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

        • 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.

    • SecurityGroupRuleIds — (Array<String>)

      The IDs of the security group rules.

    • CidrIp — (String)

      Not supported. Use a set of IP permissions to specify the CIDR.

    • FromPort — (Integer)

      Not supported. Use a set of IP permissions to specify the port.

    • IpProtocol — (String)

      Not supported. Use a set of IP permissions to specify the protocol name or number.

    • ToPort — (Integer)

      Not supported. Use a set of IP permissions to specify the port.

    • SourceSecurityGroupName — (String)

      Not supported. Use a set of IP permissions to specify a destination security group.

    • SourceSecurityGroupOwnerId — (String)

      Not supported. Use a set of IP permissions to specify a destination security 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. The data object has the following properties:

      • Return — (Boolean)

        Returns true if the request succeeds; otherwise, returns an error.

      • UnknownIpPermissions — (Array<map>)

        The outbound rules that were unknown to the service. In some cases, unknownIpPermissionSet might be in a different format from the request parameter.

        • FromPort — (Integer)

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • IpProtocol — (String)

          The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

          [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

        • IpRanges — (Array<map>)

          The IPv4 ranges.

          • CidrIp — (String)

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description — (String)

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • Ipv6Ranges — (Array<map>)

          [VPC only] The IPv6 ranges.

          • CidrIpv6 — (String)

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description — (String)

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • PrefixListIds — (Array<map>)

          [VPC only] The prefix list IDs.

          • Description — (String)

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId — (String)

            The ID of the prefix.

        • ToPort — (Integer)

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • UserIdGroupPairs — (Array<map>)

          The security group and Amazon Web Services account ID pairs.

          • Description — (String)

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId — (String)

            The ID of the security group.

          • 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.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus — (String)

            The status of a VPC peering connection, if applicable.

          • UserId — (String)

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

revokeSecurityGroupIngress(params = {}, callback) ⇒ AWS.Request

Removes the specified inbound (ingress) rules from a security group.

You can specify rules using either rule IDs or security group rule properties. If you use rule properties, the values that you specify (for example, ports) must match the existing rule's values exactly. Each rule has a protocol, from and to ports, and source (CIDR range, security group, or prefix list). For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code. If the security group rule has a description, you do not need to specify the description to revoke the rule.

[EC2-Classic, default VPC] If the values you specify do not match the existing rule's values, no error is returned, and the output describes the security group rules that were not revoked.

Amazon Web Services recommends that you describe the security group to verify that the rules were removed.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

Service Reference:

Examples:

Calling the revokeSecurityGroupIngress operation

var params = {
  CidrIp: 'STRING_VALUE',
  DryRun: true || false,
  FromPort: 'NUMBER_VALUE',
  GroupId: 'STRING_VALUE',
  GroupName: 'STRING_VALUE',
  IpPermissions: [
    {
      FromPort: 'NUMBER_VALUE',
      IpProtocol: 'STRING_VALUE',
      IpRanges: [
        {
          CidrIp: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      Ipv6Ranges: [
        {
          CidrIpv6: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      PrefixListIds: [
        {
          Description: 'STRING_VALUE',
          PrefixListId: 'STRING_VALUE'
        },
        /* more items */
      ],
      ToPort: 'NUMBER_VALUE',
      UserIdGroupPairs: [
        {
          Description: 'STRING_VALUE',
          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',
  SecurityGroupRuleIds: [
    'STRING_VALUE',
    /* more items */
  ],
  SourceSecurityGroupName: 'STRING_VALUE',
  SourceSecurityGroupOwnerId: 'STRING_VALUE',
  ToPort: 'NUMBER_VALUE'
};
ec2.revokeSecurityGroupIngress(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: {})
    • CidrIp — (String)

      The CIDR IP address range. You can't specify this parameter when specifying a source security group.

    • 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.

    • GroupId — (String)

      The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

    • GroupName — (String)

      [EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.

    • IpPermissions — (Array<map>)

      The sets of IP permissions. You can't specify a source security group and a CIDR IP address range in the same set of permissions.

      • FromPort — (Integer)

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol — (String)

        The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges — (Array<map>)

        The IPv4 ranges.

        • CidrIp — (String)

          The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv4 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges — (Array<map>)

        [VPC only] The IPv6 ranges.

        • CidrIpv6 — (String)

          The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv6 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds — (Array<map>)

        [VPC only] The prefix list IDs.

        • Description — (String)

          A description for the security group rule that references this prefix list ID.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • PrefixListId — (String)

          The ID of the prefix.

      • ToPort — (Integer)

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs — (Array<map>)

        The security group and Amazon Web Services account ID pairs.

        • Description — (String)

          A description for the security group rule that references this user ID group pair.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • GroupId — (String)

          The ID of the security group.

        • 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.

          For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

        • PeeringStatus — (String)

          The status of a VPC peering connection, if applicable.

        • UserId — (String)

          The ID of an Amazon Web Services account.

          For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

          [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

        • 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.

    • IpProtocol — (String)

      The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). Use -1 to specify all.

    • 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. For EC2-VPC, the source security group must be in the same VPC. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

    • SourceSecurityGroupOwnerId — (String)

      [EC2-Classic] The Amazon Web Services account ID of 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. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

    • 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.

    • 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.

    • SecurityGroupRuleIds — (Array<String>)

      The IDs of the security group rules.

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, returns an error.

      • UnknownIpPermissions — (Array<map>)

        The inbound rules that were unknown to the service. In some cases, unknownIpPermissionSet might be in a different format from the request parameter.

        • FromPort — (Integer)

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • IpProtocol — (String)

          The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

          [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

        • IpRanges — (Array<map>)

          The IPv4 ranges.

          • CidrIp — (String)

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description — (String)

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • Ipv6Ranges — (Array<map>)

          [VPC only] The IPv6 ranges.

          • CidrIpv6 — (String)

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description — (String)

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • PrefixListIds — (Array<map>)

          [VPC only] The prefix list IDs.

          • Description — (String)

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId — (String)

            The ID of the prefix.

        • ToPort — (Integer)

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • UserIdGroupPairs — (Array<map>)

          The security group and Amazon Web Services account ID pairs.

          • Description — (String)

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId — (String)

            The ID of the security group.

          • 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.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus — (String)

            The status of a VPC peering connection, if applicable.

          • UserId — (String)

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

runInstances(params = {}, callback) ⇒ AWS.Request

Launches the specified number of instances using an AMI for which you have permissions.

You can specify a number of options, or leave the default options. The following rules apply:

  • [EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request.

  • [EC2-Classic] If don't specify an Availability Zone, we choose one for you.

  • Some instance types must be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID, the request fails. For more information, see Instance types available only in a VPC.

  • [EC2-VPC] All instances have a network interface with a primary private IPv4 address. If you don't specify this address, we choose one from the IPv4 range of your subnet.

  • Not all instance types support IPv6 addresses. For more information, see Instance types.

  • If you don't specify a security group ID, we use the default security group. For more information, see Security groups.

  • If any of the AMIs have a product code attached for which the user has not subscribed, the request fails.

You can create a launch template, which is a resource that contains the parameters to launch an instance. When you launch an instance using RunInstances, you can specify the launch template instead of specifying the launch parameters.

To ensure faster instance launches, break up large requests into smaller batches. For example, create five separate launch requests for 100 instances each instead of one launch request for 500 instances.

An instance is ready for you to use when it's in the running state. You can check the state of your instance using DescribeInstances. You can tag instances and EBS volumes during launch, after launch, or both. For more information, see CreateTags and Tagging your Amazon EC2 resources.

Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see Key pairs.

For troubleshooting, see What to do if an instance immediately terminates, and Troubleshooting connecting to your instance.

Service Reference:

Examples:

To launch an instance


/* This example launches an instance using the specified AMI, instance type, security group, subnet, block device mapping, and tags. */

 var params = {
  BlockDeviceMappings: [
     {
    DeviceName: "/dev/sdh", 
    Ebs: {
     VolumeSize: 100
    }
   }
  ], 
  ImageId: "ami-abc12345", 
  InstanceType: "t2.micro", 
  KeyName: "my-key-pair", 
  MaxCount: 1, 
  MinCount: 1, 
  SecurityGroupIds: [
     "sg-1a2b3c4d"
  ], 
  SubnetId: "subnet-6e7f829e", 
  TagSpecifications: [
     {
    ResourceType: "instance", 
    Tags: [
       {
      Key: "Purpose", 
      Value: "test"
     }
    ]
   }
  ]
 };
 ec2.runInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the runInstances operation

var params = {
  MaxCount: 'NUMBER_VALUE', /* required */
  MinCount: 'NUMBER_VALUE', /* required */
  AdditionalInfo: 'STRING_VALUE',
  BlockDeviceMappings: [
    {
      DeviceName: 'STRING_VALUE',
      Ebs: {
        DeleteOnTermination: true || false,
        Encrypted: true || false,
        Iops: 'NUMBER_VALUE',
        KmsKeyId: 'STRING_VALUE',
        OutpostArn: 'STRING_VALUE',
        SnapshotId: 'STRING_VALUE',
        Throughput: 'NUMBER_VALUE',
        VolumeSize: 'NUMBER_VALUE',
        VolumeType: standard | io1 | io2 | gp2 | sc1 | st1 | gp3
      },
      NoDevice: 'STRING_VALUE',
      VirtualName: 'STRING_VALUE'
    },
    /* more items */
  ],
  CapacityReservationSpecification: {
    CapacityReservationPreference: open | none,
    CapacityReservationTarget: {
      CapacityReservationId: 'STRING_VALUE',
      CapacityReservationResourceGroupArn: 'STRING_VALUE'
    }
  },
  ClientToken: 'STRING_VALUE',
  CpuOptions: {
    CoreCount: 'NUMBER_VALUE',
    ThreadsPerCore: 'NUMBER_VALUE'
  },
  CreditSpecification: {
    CpuCredits: 'STRING_VALUE' /* required */
  },
  DisableApiTermination: true || false,
  DryRun: true || false,
  EbsOptimized: true || false,
  ElasticGpuSpecification: [
    {
      Type: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  ElasticInferenceAccelerators: [
    {
      Type: 'STRING_VALUE', /* required */
      Count: 'NUMBER_VALUE'
    },
    /* more items */
  ],
  EnclaveOptions: {
    Enabled: true || false
  },
  HibernationOptions: {
    Configured: true || false
  },
  IamInstanceProfile: {
    Arn: 'STRING_VALUE',
    Name: 'STRING_VALUE'
  },
  ImageId: 'STRING_VALUE',
  InstanceInitiatedShutdownBehavior: stop | terminate,
  InstanceMarketOptions: {
    MarketType: spot,
    SpotOptions: {
      BlockDurationMinutes: 'NUMBER_VALUE',
      InstanceInterruptionBehavior: hibernate | stop | terminate,
      MaxPrice: 'STRING_VALUE',
      SpotInstanceType: one-time | persistent,
      ValidUntil: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
    }
  },
  InstanceType: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge | t3a.nano | t3a.micro | t3a.small | t3a.medium | t3a.large | t3a.xlarge | t3a.2xlarge | t4g.nano | t4g.micro | t4g.small | t4g.medium | t4g.large | t4g.xlarge | t4g.2xlarge | 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 | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | r5.large | r5.xlarge | r5.2xlarge | r5.4xlarge | r5.8xlarge | r5.12xlarge | r5.16xlarge | r5.24xlarge | r5.metal | r5a.large | r5a.xlarge | r5a.2xlarge | r5a.4xlarge | r5a.8xlarge | r5a.12xlarge | r5a.16xlarge | r5a.24xlarge | r5b.large | r5b.xlarge | r5b.2xlarge | r5b.4xlarge | r5b.8xlarge | r5b.12xlarge | r5b.16xlarge | r5b.24xlarge | r5b.metal | r5d.large | r5d.xlarge | r5d.2xlarge | r5d.4xlarge | r5d.8xlarge | r5d.12xlarge | r5d.16xlarge | r5d.24xlarge | r5d.metal | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.24xlarge | r6g.metal | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6gd.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | i3.metal | i3en.large | i3en.xlarge | i3en.2xlarge | i3en.3xlarge | i3en.6xlarge | i3en.12xlarge | i3en.24xlarge | i3en.metal | 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 | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.12xlarge | c5.18xlarge | c5.24xlarge | c5.metal | c5a.large | c5a.xlarge | c5a.2xlarge | c5a.4xlarge | c5a.8xlarge | c5a.12xlarge | c5a.16xlarge | c5a.24xlarge | c5ad.large | c5ad.xlarge | c5ad.2xlarge | c5ad.4xlarge | c5ad.8xlarge | c5ad.12xlarge | c5ad.16xlarge | c5ad.24xlarge | c5d.large | c5d.xlarge | c5d.2xlarge | c5d.4xlarge | c5d.9xlarge | c5d.12xlarge | c5d.18xlarge | c5d.24xlarge | c5d.metal | c5n.large | c5n.xlarge | c5n.2xlarge | c5n.4xlarge | c5n.9xlarge | c5n.18xlarge | c5n.metal | c6g.metal | c6g.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6gd.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | g3s.xlarge | g4ad.xlarge | g4ad.2xlarge | g4ad.4xlarge | g4ad.8xlarge | g4ad.16xlarge | g4dn.xlarge | g4dn.2xlarge | g4dn.4xlarge | g4dn.8xlarge | g4dn.12xlarge | g4dn.16xlarge | g4dn.metal | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge | d3en.xlarge | d3en.2xlarge | d3en.4xlarge | d3en.6xlarge | d3en.8xlarge | d3en.12xlarge | dl1.24xlarge | f1.2xlarge | f1.4xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.8xlarge | m5.12xlarge | m5.16xlarge | m5.24xlarge | m5.metal | m5a.large | m5a.xlarge | m5a.2xlarge | m5a.4xlarge | m5a.8xlarge | m5a.12xlarge | m5a.16xlarge | m5a.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.metal | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-6tb1.metal | u-9tb1.metal | u-12tb1.metal | u-18tb1.metal | u-24tb1.metal | a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | m5dn.large | m5dn.xlarge | m5dn.2xlarge | m5dn.4xlarge | m5dn.8xlarge | m5dn.12xlarge | m5dn.16xlarge | m5dn.24xlarge | m5dn.metal | m5n.large | m5n.xlarge | m5n.2xlarge | m5n.4xlarge | m5n.8xlarge | m5n.12xlarge | m5n.16xlarge | m5n.24xlarge | m5n.metal | r5dn.large | r5dn.xlarge | r5dn.2xlarge | r5dn.4xlarge | r5dn.8xlarge | r5dn.12xlarge | r5dn.16xlarge | r5dn.24xlarge | r5dn.metal | r5n.large | r5n.xlarge | r5n.2xlarge | r5n.4xlarge | r5n.8xlarge | r5n.12xlarge | r5n.16xlarge | r5n.24xlarge | r5n.metal | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | m6g.metal | m6g.medium | m6g.large | m6g.xlarge | m6g.2xlarge | m6g.4xlarge | m6g.8xlarge | m6g.12xlarge | m6g.16xlarge | m6gd.metal | m6gd.medium | m6gd.large | m6gd.xlarge | m6gd.2xlarge | m6gd.4xlarge | m6gd.8xlarge | m6gd.12xlarge | m6gd.16xlarge | m6i.large | m6i.xlarge | m6i.2xlarge | m6i.4xlarge | m6i.8xlarge | m6i.12xlarge | m6i.16xlarge | m6i.24xlarge | m6i.32xlarge | mac1.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge,
  Ipv6AddressCount: 'NUMBER_VALUE',
  Ipv6Addresses: [
    {
      Ipv6Address: 'STRING_VALUE'
    },
    /* more items */
  ],
  KernelId: 'STRING_VALUE',
  KeyName: 'STRING_VALUE',
  LaunchTemplate: {
    LaunchTemplateId: 'STRING_VALUE',
    LaunchTemplateName: 'STRING_VALUE',
    Version: 'STRING_VALUE'
  },
  LicenseSpecifications: [
    {
      LicenseConfigurationArn: 'STRING_VALUE'
    },
    /* more items */
  ],
  MetadataOptions: {
    HttpEndpoint: disabled | enabled,
    HttpProtocolIpv6: disabled | enabled,
    HttpPutResponseHopLimit: 'NUMBER_VALUE',
    HttpTokens: optional | required
  },
  Monitoring: {
    Enabled: true || false /* required */
  },
  NetworkInterfaces: [
    {
      AssociateCarrierIpAddress: true || false,
      AssociatePublicIpAddress: true || false,
      DeleteOnTermination: true || false,
      Description: 'STRING_VALUE',
      DeviceIndex: 'NUMBER_VALUE',
      Groups: [
        'STRING_VALUE',
        /* more items */
      ],
      InterfaceType: 'STRING_VALUE',
      Ipv4PrefixCount: 'NUMBER_VALUE',
      Ipv4Prefixes: [
        {
          Ipv4Prefix: 'STRING_VALUE'
        },
        /* more items */
      ],
      Ipv6AddressCount: 'NUMBER_VALUE',
      Ipv6Addresses: [
        {
          Ipv6Address: 'STRING_VALUE'
        },
        /* more items */
      ],
      Ipv6PrefixCount: 'NUMBER_VALUE',
      Ipv6Prefixes: [
        {
          Ipv6Prefix: 'STRING_VALUE'
        },
        /* more items */
      ],
      NetworkCardIndex: 'NUMBER_VALUE',
      NetworkInterfaceId: 'STRING_VALUE',
      PrivateIpAddress: 'STRING_VALUE',
      PrivateIpAddresses: [
        {
          Primary: true || false,
          PrivateIpAddress: 'STRING_VALUE'
        },
        /* more items */
      ],
      SecondaryPrivateIpAddressCount: 'NUMBER_VALUE',
      SubnetId: 'STRING_VALUE'
    },
    /* more items */
  ],
  Placement: {
    Affinity: 'STRING_VALUE',
    AvailabilityZone: 'STRING_VALUE',
    GroupName: 'STRING_VALUE',
    HostId: 'STRING_VALUE',
    HostResourceGroupArn: 'STRING_VALUE',
    PartitionNumber: 'NUMBER_VALUE',
    SpreadDomain: 'STRING_VALUE',
    Tenancy: default | dedicated | host
  },
  PrivateIpAddress: 'STRING_VALUE',
  RamdiskId: 'STRING_VALUE',
  SecurityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  SecurityGroups: [
    'STRING_VALUE',
    /* more items */
  ],
  SubnetId: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  UserData: 'STRING_VALUE'
};
ec2.runInstances(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: {})
    • BlockDeviceMappings — (Array<map>)

      The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance at launch. For more information, see Block device mappings in the Amazon EC2 User Guide.

      • DeviceName — (String)

        The device name (for example, /dev/sdh or xvdh).

      • 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.

        NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

        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.

      • Ebs — (map)

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination — (Boolean)

          Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

        • Iops — (Integer)

          The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

          The following are the supported values for each volume type:

          • gp3: 3,000-16,000 IOPS

          • io1: 100-64,000 IOPS

          • io2: 100-64,000 IOPS

          For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

          This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

        • SnapshotId — (String)

          The ID of the snapshot.

        • VolumeSize — (Integer)

          The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

          The following are the supported volumes sizes for each volume type:

          • gp2 and gp3:1-16,384

          • io1 and io2: 4-16,384

          • st1 and sc1: 125-16,384

          • standard: 1-1,024

        • VolumeType — (String)

          The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

          Possible values include:
          • "standard"
          • "io1"
          • "io2"
          • "gp2"
          • "sc1"
          • "st1"
          • "gp3"
        • KmsKeyId — (String)

          Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

          This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

        • Throughput — (Integer)

          The throughput that the volume supports, in MiB/s.

          This parameter is valid only for gp3 volumes.

          Valid Range: Minimum value of 125. Maximum value of 1000.

        • OutpostArn — (String)

          The ARN of the Outpost on which the snapshot is stored.

        • Encrypted — (Boolean)

          Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

          In no case can you remove encryption from an encrypted volume.

          Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

          This parameter is not returned by .

      • NoDevice — (String)

        To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

    • ImageId — (String)

      The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.

    • InstanceType — (String)

      The instance type. For more information, see Instance types in the Amazon EC2 User Guide.

      Default: m1.small

      Possible values include:
      • "t1.micro"
      • "t2.nano"
      • "t2.micro"
      • "t2.small"
      • "t2.medium"
      • "t2.large"
      • "t2.xlarge"
      • "t2.2xlarge"
      • "t3.nano"
      • "t3.micro"
      • "t3.small"
      • "t3.medium"
      • "t3.large"
      • "t3.xlarge"
      • "t3.2xlarge"
      • "t3a.nano"
      • "t3a.micro"
      • "t3a.small"
      • "t3a.medium"
      • "t3a.large"
      • "t3a.xlarge"
      • "t3a.2xlarge"
      • "t4g.nano"
      • "t4g.micro"
      • "t4g.small"
      • "t4g.medium"
      • "t4g.large"
      • "t4g.xlarge"
      • "t4g.2xlarge"
      • "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"
      • "m4.16xlarge"
      • "m2.xlarge"
      • "m2.2xlarge"
      • "m2.4xlarge"
      • "cr1.8xlarge"
      • "r3.large"
      • "r3.xlarge"
      • "r3.2xlarge"
      • "r3.4xlarge"
      • "r3.8xlarge"
      • "r4.large"
      • "r4.xlarge"
      • "r4.2xlarge"
      • "r4.4xlarge"
      • "r4.8xlarge"
      • "r4.16xlarge"
      • "r5.large"
      • "r5.xlarge"
      • "r5.2xlarge"
      • "r5.4xlarge"
      • "r5.8xlarge"
      • "r5.12xlarge"
      • "r5.16xlarge"
      • "r5.24xlarge"
      • "r5.metal"
      • "r5a.large"
      • "r5a.xlarge"
      • "r5a.2xlarge"
      • "r5a.4xlarge"
      • "r5a.8xlarge"
      • "r5a.12xlarge"
      • "r5a.16xlarge"
      • "r5a.24xlarge"
      • "r5b.large"
      • "r5b.xlarge"
      • "r5b.2xlarge"
      • "r5b.4xlarge"
      • "r5b.8xlarge"
      • "r5b.12xlarge"
      • "r5b.16xlarge"
      • "r5b.24xlarge"
      • "r5b.metal"
      • "r5d.large"
      • "r5d.xlarge"
      • "r5d.2xlarge"
      • "r5d.4xlarge"
      • "r5d.8xlarge"
      • "r5d.12xlarge"
      • "r5d.16xlarge"
      • "r5d.24xlarge"
      • "r5d.metal"
      • "r5ad.large"
      • "r5ad.xlarge"
      • "r5ad.2xlarge"
      • "r5ad.4xlarge"
      • "r5ad.8xlarge"
      • "r5ad.12xlarge"
      • "r5ad.16xlarge"
      • "r5ad.24xlarge"
      • "r6g.metal"
      • "r6g.medium"
      • "r6g.large"
      • "r6g.xlarge"
      • "r6g.2xlarge"
      • "r6g.4xlarge"
      • "r6g.8xlarge"
      • "r6g.12xlarge"
      • "r6g.16xlarge"
      • "r6gd.metal"
      • "r6gd.medium"
      • "r6gd.large"
      • "r6gd.xlarge"
      • "r6gd.2xlarge"
      • "r6gd.4xlarge"
      • "r6gd.8xlarge"
      • "r6gd.12xlarge"
      • "r6gd.16xlarge"
      • "x1.16xlarge"
      • "x1.32xlarge"
      • "x1e.xlarge"
      • "x1e.2xlarge"
      • "x1e.4xlarge"
      • "x1e.8xlarge"
      • "x1e.16xlarge"
      • "x1e.32xlarge"
      • "i2.xlarge"
      • "i2.2xlarge"
      • "i2.4xlarge"
      • "i2.8xlarge"
      • "i3.large"
      • "i3.xlarge"
      • "i3.2xlarge"
      • "i3.4xlarge"
      • "i3.8xlarge"
      • "i3.16xlarge"
      • "i3.metal"
      • "i3en.large"
      • "i3en.xlarge"
      • "i3en.2xlarge"
      • "i3en.3xlarge"
      • "i3en.6xlarge"
      • "i3en.12xlarge"
      • "i3en.24xlarge"
      • "i3en.metal"
      • "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"
      • "c5.large"
      • "c5.xlarge"
      • "c5.2xlarge"
      • "c5.4xlarge"
      • "c5.9xlarge"
      • "c5.12xlarge"
      • "c5.18xlarge"
      • "c5.24xlarge"
      • "c5.metal"
      • "c5a.large"
      • "c5a.xlarge"
      • "c5a.2xlarge"
      • "c5a.4xlarge"
      • "c5a.8xlarge"
      • "c5a.12xlarge"
      • "c5a.16xlarge"
      • "c5a.24xlarge"
      • "c5ad.large"
      • "c5ad.xlarge"
      • "c5ad.2xlarge"
      • "c5ad.4xlarge"
      • "c5ad.8xlarge"
      • "c5ad.12xlarge"
      • "c5ad.16xlarge"
      • "c5ad.24xlarge"
      • "c5d.large"
      • "c5d.xlarge"
      • "c5d.2xlarge"
      • "c5d.4xlarge"
      • "c5d.9xlarge"
      • "c5d.12xlarge"
      • "c5d.18xlarge"
      • "c5d.24xlarge"
      • "c5d.metal"
      • "c5n.large"
      • "c5n.xlarge"
      • "c5n.2xlarge"
      • "c5n.4xlarge"
      • "c5n.9xlarge"
      • "c5n.18xlarge"
      • "c5n.metal"
      • "c6g.metal"
      • "c6g.medium"
      • "c6g.large"
      • "c6g.xlarge"
      • "c6g.2xlarge"
      • "c6g.4xlarge"
      • "c6g.8xlarge"
      • "c6g.12xlarge"
      • "c6g.16xlarge"
      • "c6gd.metal"
      • "c6gd.medium"
      • "c6gd.large"
      • "c6gd.xlarge"
      • "c6gd.2xlarge"
      • "c6gd.4xlarge"
      • "c6gd.8xlarge"
      • "c6gd.12xlarge"
      • "c6gd.16xlarge"
      • "c6gn.medium"
      • "c6gn.large"
      • "c6gn.xlarge"
      • "c6gn.2xlarge"
      • "c6gn.4xlarge"
      • "c6gn.8xlarge"
      • "c6gn.12xlarge"
      • "c6gn.16xlarge"
      • "cc1.4xlarge"
      • "cc2.8xlarge"
      • "g2.2xlarge"
      • "g2.8xlarge"
      • "g3.4xlarge"
      • "g3.8xlarge"
      • "g3.16xlarge"
      • "g3s.xlarge"
      • "g4ad.xlarge"
      • "g4ad.2xlarge"
      • "g4ad.4xlarge"
      • "g4ad.8xlarge"
      • "g4ad.16xlarge"
      • "g4dn.xlarge"
      • "g4dn.2xlarge"
      • "g4dn.4xlarge"
      • "g4dn.8xlarge"
      • "g4dn.12xlarge"
      • "g4dn.16xlarge"
      • "g4dn.metal"
      • "cg1.4xlarge"
      • "p2.xlarge"
      • "p2.8xlarge"
      • "p2.16xlarge"
      • "p3.2xlarge"
      • "p3.8xlarge"
      • "p3.16xlarge"
      • "p3dn.24xlarge"
      • "p4d.24xlarge"
      • "d2.xlarge"
      • "d2.2xlarge"
      • "d2.4xlarge"
      • "d2.8xlarge"
      • "d3.xlarge"
      • "d3.2xlarge"
      • "d3.4xlarge"
      • "d3.8xlarge"
      • "d3en.xlarge"
      • "d3en.2xlarge"
      • "d3en.4xlarge"
      • "d3en.6xlarge"
      • "d3en.8xlarge"
      • "d3en.12xlarge"
      • "dl1.24xlarge"
      • "f1.2xlarge"
      • "f1.4xlarge"
      • "f1.16xlarge"
      • "m5.large"
      • "m5.xlarge"
      • "m5.2xlarge"
      • "m5.4xlarge"
      • "m5.8xlarge"
      • "m5.12xlarge"
      • "m5.16xlarge"
      • "m5.24xlarge"
      • "m5.metal"
      • "m5a.large"
      • "m5a.xlarge"
      • "m5a.2xlarge"
      • "m5a.4xlarge"
      • "m5a.8xlarge"
      • "m5a.12xlarge"
      • "m5a.16xlarge"
      • "m5a.24xlarge"
      • "m5d.large"
      • "m5d.xlarge"
      • "m5d.2xlarge"
      • "m5d.4xlarge"
      • "m5d.8xlarge"
      • "m5d.12xlarge"
      • "m5d.16xlarge"
      • "m5d.24xlarge"
      • "m5d.metal"
      • "m5ad.large"
      • "m5ad.xlarge"
      • "m5ad.2xlarge"
      • "m5ad.4xlarge"
      • "m5ad.8xlarge"
      • "m5ad.12xlarge"
      • "m5ad.16xlarge"
      • "m5ad.24xlarge"
      • "m5zn.large"
      • "m5zn.xlarge"
      • "m5zn.2xlarge"
      • "m5zn.3xlarge"
      • "m5zn.6xlarge"
      • "m5zn.12xlarge"
      • "m5zn.metal"
      • "h1.2xlarge"
      • "h1.4xlarge"
      • "h1.8xlarge"
      • "h1.16xlarge"
      • "z1d.large"
      • "z1d.xlarge"
      • "z1d.2xlarge"
      • "z1d.3xlarge"
      • "z1d.6xlarge"
      • "z1d.12xlarge"
      • "z1d.metal"
      • "u-6tb1.56xlarge"
      • "u-6tb1.112xlarge"
      • "u-9tb1.112xlarge"
      • "u-12tb1.112xlarge"
      • "u-6tb1.metal"
      • "u-9tb1.metal"
      • "u-12tb1.metal"
      • "u-18tb1.metal"
      • "u-24tb1.metal"
      • "a1.medium"
      • "a1.large"
      • "a1.xlarge"
      • "a1.2xlarge"
      • "a1.4xlarge"
      • "a1.metal"
      • "m5dn.large"
      • "m5dn.xlarge"
      • "m5dn.2xlarge"
      • "m5dn.4xlarge"
      • "m5dn.8xlarge"
      • "m5dn.12xlarge"
      • "m5dn.16xlarge"
      • "m5dn.24xlarge"
      • "m5dn.metal"
      • "m5n.large"
      • "m5n.xlarge"
      • "m5n.2xlarge"
      • "m5n.4xlarge"
      • "m5n.8xlarge"
      • "m5n.12xlarge"
      • "m5n.16xlarge"
      • "m5n.24xlarge"
      • "m5n.metal"
      • "r5dn.large"
      • "r5dn.xlarge"
      • "r5dn.2xlarge"
      • "r5dn.4xlarge"
      • "r5dn.8xlarge"
      • "r5dn.12xlarge"
      • "r5dn.16xlarge"
      • "r5dn.24xlarge"
      • "r5dn.metal"
      • "r5n.large"
      • "r5n.xlarge"
      • "r5n.2xlarge"
      • "r5n.4xlarge"
      • "r5n.8xlarge"
      • "r5n.12xlarge"
      • "r5n.16xlarge"
      • "r5n.24xlarge"
      • "r5n.metal"
      • "inf1.xlarge"
      • "inf1.2xlarge"
      • "inf1.6xlarge"
      • "inf1.24xlarge"
      • "m6g.metal"
      • "m6g.medium"
      • "m6g.large"
      • "m6g.xlarge"
      • "m6g.2xlarge"
      • "m6g.4xlarge"
      • "m6g.8xlarge"
      • "m6g.12xlarge"
      • "m6g.16xlarge"
      • "m6gd.metal"
      • "m6gd.medium"
      • "m6gd.large"
      • "m6gd.xlarge"
      • "m6gd.2xlarge"
      • "m6gd.4xlarge"
      • "m6gd.8xlarge"
      • "m6gd.12xlarge"
      • "m6gd.16xlarge"
      • "m6i.large"
      • "m6i.xlarge"
      • "m6i.2xlarge"
      • "m6i.4xlarge"
      • "m6i.8xlarge"
      • "m6i.12xlarge"
      • "m6i.16xlarge"
      • "m6i.24xlarge"
      • "m6i.32xlarge"
      • "mac1.metal"
      • "x2gd.medium"
      • "x2gd.large"
      • "x2gd.xlarge"
      • "x2gd.2xlarge"
      • "x2gd.4xlarge"
      • "x2gd.8xlarge"
      • "x2gd.12xlarge"
      • "x2gd.16xlarge"
      • "x2gd.metal"
      • "vt1.3xlarge"
      • "vt1.6xlarge"
      • "vt1.24xlarge"
    • Ipv6AddressCount — (Integer)

      [EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

      You cannot specify this option and the network interfaces option in the same request.

    • Ipv6Addresses — (Array<map>)

      [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

      You cannot specify this option and the network interfaces option in the same request.

      • Ipv6Address — (String)

        The IPv6 address.

    • KernelId — (String)

      The ID of the kernel.

      We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon EC2 User Guide.

    • KeyName — (String)

      The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.

      If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.

    • MaxCount — (Integer)

      The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount.

      Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.

    • MinCount — (Integer)

      The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.

      Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.

    • Monitoring — (map)

      Specifies whether detailed monitoring is enabled for the instance.

      • Enabledrequired — (Boolean)

        Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

    • Placement — (map)

      The placement for the instance.

      • AvailabilityZone — (String)

        The Availability Zone of the instance.

        If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

        This parameter is not supported by CreateFleet.

      • Affinity — (String)

        The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

        This parameter is not supported by CreateFleet.

      • GroupName — (String)

        The name of the placement group the instance is in.

      • PartitionNumber — (Integer)

        The number of the partition the instance is in. Valid only if the placement group strategy is set to partition.

        This parameter is not supported by CreateFleet.

      • HostId — (String)

        The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

        This parameter is not supported by CreateFleet.

      • 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.

        This parameter is not supported by CreateFleet.

        T3 instances that use the unlimited CPU credit option do not support host tenancy.

        Possible values include:
        • "default"
        • "dedicated"
        • "host"
      • SpreadDomain — (String)

        Reserved for future use.

        This parameter is not supported by CreateFleet.

      • HostResourceGroupArn — (String)

        The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

        This parameter is not supported by CreateFleet.

    • RamdiskId — (String)

      The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go to the Amazon Web Services Resource Center and search for the kernel ID.

      We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon EC2 User Guide.

    • SecurityGroupIds — (Array<String>)

      The IDs of the security groups. You can create a security group using CreateSecurityGroup.

      If you specify a network interface, you must specify any security groups as part of the network interface.

    • SecurityGroups — (Array<String>)

      [EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead.

      If you specify a network interface, you must specify any security groups as part of the network interface.

      Default: Amazon EC2 uses the default security group.

    • SubnetId — (String)

      [EC2-VPC] The ID of the subnet to launch the instance into.

      If you specify a network interface, you must specify any subnets as part of the network interface.

    • UserData — (String)

      The user data to make available to the instance. For more information, see Running commands on your Linux instance at launch (Linux) and Adding User Data (Windows). If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.

    • AdditionalInfo — (String)

      Reserved.

    • ClientToken — (String)

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.

      For more information, see Ensuring Idempotency.

      Constraints: Maximum 64 ASCII characters

      If a token is not provided, the SDK will use a version 4 UUID.
    • DisableApiTermination — (Boolean)

      If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance by running the shutdown command from the instance.

      Default: false

    • 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.

    • EbsOptimized — (Boolean)

      Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

      Default: false

    • IamInstanceProfile — (map)

      The name or Amazon Resource Name (ARN) of an IAM instance profile.

      • Arn — (String)

        The Amazon Resource Name (ARN) of the instance profile.

      • Name — (String)

        The name of the instance profile.

    • InstanceInitiatedShutdownBehavior — (String)

      Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

      Default: stop

      Possible values include:
      • "stop"
      • "terminate"
    • NetworkInterfaces — (Array<map>)

      The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.

      • AssociatePublicIpAddress — (Boolean)

        Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true.

      • DeleteOnTermination — (Boolean)

        If set to true, the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.

      • Description — (String)

        The description of the network interface. Applies only if creating a network interface when launching an instance.

      • DeviceIndex — (Integer)

        The position of the network interface in the attachment order. A primary network interface has a device index of 0.

        If you specify a network interface when launching an instance, you must specify the device index.

      • Groups — (Array<String>)

        The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

      • Ipv6AddressCount — (Integer)

        A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

      • Ipv6Addresses — (Array<map>)

        One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

        • Ipv6Address — (String)

          The IPv6 address.

      • NetworkInterfaceId — (String)

        The ID of the network interface.

        If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

      • PrivateIpAddress — (String)

        The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

      • PrivateIpAddresses — (Array<map>)

        One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

        • Primary — (Boolean)

          Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

        • PrivateIpAddress — (String)

          The private IPv4 addresses.

      • SecondaryPrivateIpAddressCount — (Integer)

        The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

      • SubnetId — (String)

        The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

      • AssociateCarrierIpAddress — (Boolean)

        Indicates whether to assign a carrier IP address to the network interface.

        You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP addresses in the Amazon Web Services Wavelength Developer Guide.

      • InterfaceType — (String)

        The type of network interface.

        To create an Elastic Fabric Adapter (EFA), specify efa. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide.

        Valid values: interface | efa

      • NetworkCardIndex — (Integer)

        The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

        If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances.

      • Ipv4Prefixes — (Array<map>)

        One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

      • Ipv4PrefixCount — (Integer)

        The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

      • Ipv6Prefixes — (Array<map>)

        One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

        • Ipv6Prefix — (String)

          The IPv6 prefix.

      • Ipv6PrefixCount — (Integer)

        The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

    • PrivateIpAddress — (String)

      [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.

      Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.

      You cannot specify this option and the network interfaces option in the same request.

    • ElasticGpuSpecification — (Array<map>)

      An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon EC2 User Guide.

      • Typerequired — (String)

        The type of Elastic Graphics accelerator. For more information about the values to specify for Type, see Elastic Graphics Basics, specifically the Elastic Graphics accelerator column, in the Amazon Elastic Compute Cloud User Guide for Windows Instances.

    • ElasticInferenceAccelerators — (Array<map>)

      An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.

      You cannot specify accelerators from different generations in the same request.

      • Typerequired — (String)

        The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, eia1.xlarge, eia2.medium, eia2.large, and eia2.xlarge.

      • Count — (Integer)

        The number of elastic inference accelerators to attach to the instance.

        Default: 1

    • TagSpecifications — (Array<map>)

      The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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.

    • LaunchTemplate — (map)

      The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.

      • LaunchTemplateId — (String)

        The ID of the launch template.

      • LaunchTemplateName — (String)

        The name of the launch template.

      • Version — (String)

        The version number of the launch template.

        Default: The default version for the launch template.

    • InstanceMarketOptions — (map)

      The market (purchasing) option for the instances.

      For RunInstances, persistent Spot Instance requests are only supported when InstanceInterruptionBehavior is set to either hibernate or stop.

      • MarketType — (String)

        The market type.

        Possible values include:
        • "spot"
      • SpotOptions — (map)

        The options for Spot Instances.

        • MaxPrice — (String)

          The maximum hourly price you're willing to pay for the Spot Instances. The default is the On-Demand price.

        • SpotInstanceType — (String)

          The Spot Instance request type. For RunInstances, persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop.

          Possible values include:
          • "one-time"
          • "persistent"
        • BlockDurationMinutes — (Integer)

          Deprecated.

        • ValidUntil — (Date)

          The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). Supported only for persistent requests.

          • For a persistent request, the request remains active until the ValidUntil date and time is reached. Otherwise, the request remains active until you cancel it.

          • For a one-time request, ValidUntil is not supported. The request remains active until all instances launch or you cancel the request.

        • InstanceInterruptionBehavior — (String)

          The behavior when a Spot Instance is interrupted. The default is terminate.

          Possible values include:
          • "hibernate"
          • "stop"
          • "terminate"
    • CreditSpecification — (map)

      The credit option for CPU usage of the burstable performance instance. Valid values are standard and unlimited. To change this attribute after launch, use ModifyInstanceCreditSpecification. For more information, see Burstable performance instances in the Amazon EC2 User Guide.

      Default: standard (T2 instances) or unlimited (T3/T3a instances)

      For T3 instances with host tenancy, only standard is supported.

      • CpuCreditsrequired — (String)

        The credit option for CPU usage of a T2, T3, or T3a instance. Valid values are standard and unlimited.

    • CpuOptions — (map)

      The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon EC2 User Guide.

      • CoreCount — (Integer)

        The number of CPU cores for the instance.

      • ThreadsPerCore — (Integer)

        The number of threads per CPU core. To disable multithreading for the instance, specify a value of 1. Otherwise, specify the default value of 2.

    • CapacityReservationSpecification — (map)

      Information about the Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

      • CapacityReservationPreference — (String)

        Indicates the instance's Capacity Reservation preferences. Possible preferences include:

        • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

        • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.

        Possible values include:
        • "open"
        • "none"
      • CapacityReservationTarget — (map)

        Information about the target Capacity Reservation or Capacity Reservation group.

        • CapacityReservationId — (String)

          The ID of the Capacity Reservation in which to run the instance.

        • CapacityReservationResourceGroupArn — (String)

          The ARN of the Capacity Reservation resource group in which to run the instance.

    • HibernationOptions — (map)

      Indicates whether an instance is enabled for hibernation. For more information, see Hibernate your instance in the Amazon EC2 User Guide.

      You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same instance.

      • Configured — (Boolean)

        If you set this parameter to true, your instance is enabled for hibernation.

        Default: false

    • LicenseSpecifications — (Array<map>)

      The license configurations.

      • LicenseConfigurationArn — (String)

        The Amazon Resource Name (ARN) of the license configuration.

    • MetadataOptions — (map)

      The metadata options for the instance. For more information, see Instance metadata and user data.

      • HttpTokens — (String)

        The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

        If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

        If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

        Possible values include:
        • "optional"
        • "required"
      • HttpPutResponseHopLimit — (Integer)

        The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

        Default: 1

        Possible values: Integers from 1 to 64

      • HttpEndpoint — (String)

        Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled.

        If you specify a value of disabled, you will not be able to access your instance metadata.

        Possible values include:
        • "disabled"
        • "enabled"
      • HttpProtocolIpv6 — (String)

        Enables or disables the IPv6 endpoint for the instance metadata service.

        Possible values include:
        • "disabled"
        • "enabled"
    • EnclaveOptions — (map)

      Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide.

      You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.

      • Enabled — (Boolean)

        To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true.

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:

      • Groups — (Array<map>)

        [EC2-Classic only] The security groups.

        • GroupName — (String)

          The name of the security group.

        • GroupId — (String)

          The ID of the security group.

      • Instances — (Array<map>)

        The instances.

        • AmiLaunchIndex — (Integer)

          The AMI launch index, which can be used to find this instance in the launch group.

        • ImageId — (String)

          The ID of the AMI used to launch the instance.

        • InstanceId — (String)

          The ID of the instance.

        • InstanceType — (String)

          The instance type.

          Possible values include:
          • "t1.micro"
          • "t2.nano"
          • "t2.micro"
          • "t2.small"
          • "t2.medium"
          • "t2.large"
          • "t2.xlarge"
          • "t2.2xlarge"
          • "t3.nano"
          • "t3.micro"
          • "t3.small"
          • "t3.medium"
          • "t3.large"
          • "t3.xlarge"
          • "t3.2xlarge"
          • "t3a.nano"
          • "t3a.micro"
          • "t3a.small"
          • "t3a.medium"
          • "t3a.large"
          • "t3a.xlarge"
          • "t3a.2xlarge"
          • "t4g.nano"
          • "t4g.micro"
          • "t4g.small"
          • "t4g.medium"
          • "t4g.large"
          • "t4g.xlarge"
          • "t4g.2xlarge"
          • "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"
          • "m4.16xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "cr1.8xlarge"
          • "r3.large"
          • "r3.xlarge"
          • "r3.2xlarge"
          • "r3.4xlarge"
          • "r3.8xlarge"
          • "r4.large"
          • "r4.xlarge"
          • "r4.2xlarge"
          • "r4.4xlarge"
          • "r4.8xlarge"
          • "r4.16xlarge"
          • "r5.large"
          • "r5.xlarge"
          • "r5.2xlarge"
          • "r5.4xlarge"
          • "r5.8xlarge"
          • "r5.12xlarge"
          • "r5.16xlarge"
          • "r5.24xlarge"
          • "r5.metal"
          • "r5a.large"
          • "r5a.xlarge"
          • "r5a.2xlarge"
          • "r5a.4xlarge"
          • "r5a.8xlarge"
          • "r5a.12xlarge"
          • "r5a.16xlarge"
          • "r5a.24xlarge"
          • "r5b.large"
          • "r5b.xlarge"
          • "r5b.2xlarge"
          • "r5b.4xlarge"
          • "r5b.8xlarge"
          • "r5b.12xlarge"
          • "r5b.16xlarge"
          • "r5b.24xlarge"
          • "r5b.metal"
          • "r5d.large"
          • "r5d.xlarge"
          • "r5d.2xlarge"
          • "r5d.4xlarge"
          • "r5d.8xlarge"
          • "r5d.12xlarge"
          • "r5d.16xlarge"
          • "r5d.24xlarge"
          • "r5d.metal"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.24xlarge"
          • "r6g.metal"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6gd.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "i2.xlarge"
          • "i2.2xlarge"
          • "i2.4xlarge"
          • "i2.8xlarge"
          • "i3.large"
          • "i3.xlarge"
          • "i3.2xlarge"
          • "i3.4xlarge"
          • "i3.8xlarge"
          • "i3.16xlarge"
          • "i3.metal"
          • "i3en.large"
          • "i3en.xlarge"
          • "i3en.2xlarge"
          • "i3en.3xlarge"
          • "i3en.6xlarge"
          • "i3en.12xlarge"
          • "i3en.24xlarge"
          • "i3en.metal"
          • "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"
          • "c5.large"
          • "c5.xlarge"
          • "c5.2xlarge"
          • "c5.4xlarge"
          • "c5.9xlarge"
          • "c5.12xlarge"
          • "c5.18xlarge"
          • "c5.24xlarge"
          • "c5.metal"
          • "c5a.large"
          • "c5a.xlarge"
          • "c5a.2xlarge"
          • "c5a.4xlarge"
          • "c5a.8xlarge"
          • "c5a.12xlarge"
          • "c5a.16xlarge"
          • "c5a.24xlarge"
          • "c5ad.large"
          • "c5ad.xlarge"
          • "c5ad.2xlarge"
          • "c5ad.4xlarge"
          • "c5ad.8xlarge"
          • "c5ad.12xlarge"
          • "c5ad.16xlarge"
          • "c5ad.24xlarge"
          • "c5d.large"
          • "c5d.xlarge"
          • "c5d.2xlarge"
          • "c5d.4xlarge"
          • "c5d.9xlarge"
          • "c5d.12xlarge"
          • "c5d.18xlarge"
          • "c5d.24xlarge"
          • "c5d.metal"
          • "c5n.large"
          • "c5n.xlarge"
          • "c5n.2xlarge"
          • "c5n.4xlarge"
          • "c5n.9xlarge"
          • "c5n.18xlarge"
          • "c5n.metal"
          • "c6g.metal"
          • "c6g.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6gd.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "g2.2xlarge"
          • "g2.8xlarge"
          • "g3.4xlarge"
          • "g3.8xlarge"
          • "g3.16xlarge"
          • "g3s.xlarge"
          • "g4ad.xlarge"
          • "g4ad.2xlarge"
          • "g4ad.4xlarge"
          • "g4ad.8xlarge"
          • "g4ad.16xlarge"
          • "g4dn.xlarge"
          • "g4dn.2xlarge"
          • "g4dn.4xlarge"
          • "g4dn.8xlarge"
          • "g4dn.12xlarge"
          • "g4dn.16xlarge"
          • "g4dn.metal"
          • "cg1.4xlarge"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "d2.xlarge"
          • "d2.2xlarge"
          • "d2.4xlarge"
          • "d2.8xlarge"
          • "d3.xlarge"
          • "d3.2xlarge"
          • "d3.4xlarge"
          • "d3.8xlarge"
          • "d3en.xlarge"
          • "d3en.2xlarge"
          • "d3en.4xlarge"
          • "d3en.6xlarge"
          • "d3en.8xlarge"
          • "d3en.12xlarge"
          • "dl1.24xlarge"
          • "f1.2xlarge"
          • "f1.4xlarge"
          • "f1.16xlarge"
          • "m5.large"
          • "m5.xlarge"
          • "m5.2xlarge"
          • "m5.4xlarge"
          • "m5.8xlarge"
          • "m5.12xlarge"
          • "m5.16xlarge"
          • "m5.24xlarge"
          • "m5.metal"
          • "m5a.large"
          • "m5a.xlarge"
          • "m5a.2xlarge"
          • "m5a.4xlarge"
          • "m5a.8xlarge"
          • "m5a.12xlarge"
          • "m5a.16xlarge"
          • "m5a.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.metal"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "u-6tb1.56xlarge"
          • "u-6tb1.112xlarge"
          • "u-9tb1.112xlarge"
          • "u-12tb1.112xlarge"
          • "u-6tb1.metal"
          • "u-9tb1.metal"
          • "u-12tb1.metal"
          • "u-18tb1.metal"
          • "u-24tb1.metal"
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "m5dn.large"
          • "m5dn.xlarge"
          • "m5dn.2xlarge"
          • "m5dn.4xlarge"
          • "m5dn.8xlarge"
          • "m5dn.12xlarge"
          • "m5dn.16xlarge"
          • "m5dn.24xlarge"
          • "m5dn.metal"
          • "m5n.large"
          • "m5n.xlarge"
          • "m5n.2xlarge"
          • "m5n.4xlarge"
          • "m5n.8xlarge"
          • "m5n.12xlarge"
          • "m5n.16xlarge"
          • "m5n.24xlarge"
          • "m5n.metal"
          • "r5dn.large"
          • "r5dn.xlarge"
          • "r5dn.2xlarge"
          • "r5dn.4xlarge"
          • "r5dn.8xlarge"
          • "r5dn.12xlarge"
          • "r5dn.16xlarge"
          • "r5dn.24xlarge"
          • "r5dn.metal"
          • "r5n.large"
          • "r5n.xlarge"
          • "r5n.2xlarge"
          • "r5n.4xlarge"
          • "r5n.8xlarge"
          • "r5n.12xlarge"
          • "r5n.16xlarge"
          • "r5n.24xlarge"
          • "r5n.metal"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "m6g.metal"
          • "m6g.medium"
          • "m6g.large"
          • "m6g.xlarge"
          • "m6g.2xlarge"
          • "m6g.4xlarge"
          • "m6g.8xlarge"
          • "m6g.12xlarge"
          • "m6g.16xlarge"
          • "m6gd.metal"
          • "m6gd.medium"
          • "m6gd.large"
          • "m6gd.xlarge"
          • "m6gd.2xlarge"
          • "m6gd.4xlarge"
          • "m6gd.8xlarge"
          • "m6gd.12xlarge"
          • "m6gd.16xlarge"
          • "m6i.large"
          • "m6i.xlarge"
          • "m6i.2xlarge"
          • "m6i.4xlarge"
          • "m6i.8xlarge"
          • "m6i.12xlarge"
          • "m6i.16xlarge"
          • "m6i.24xlarge"
          • "m6i.32xlarge"
          • "mac1.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
        • KernelId — (String)

          The kernel associated with this instance, if applicable.

        • KeyName — (String)

          The name of the key pair, if this instance was launched with an associated key pair.

        • LaunchTime — (Date)

          The time the instance was launched.

        • Monitoring — (map)

          The monitoring for the instance.

          • State — (String)

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

            Possible values include:
            • "disabled"
            • "disabling"
            • "enabled"
            • "pending"
        • Placement — (map)

          The location where the instance launched, if applicable.

          • AvailabilityZone — (String)

            The Availability Zone of the instance.

            If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

            This parameter is not supported by CreateFleet.

          • Affinity — (String)

            The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

            This parameter is not supported by CreateFleet.

          • GroupName — (String)

            The name of the placement group the instance is in.

          • PartitionNumber — (Integer)

            The number of the partition the instance is in. Valid only if the placement group strategy is set to partition.

            This parameter is not supported by CreateFleet.

          • HostId — (String)

            The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

            This parameter is not supported by CreateFleet.

          • 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.

            This parameter is not supported by CreateFleet.

            T3 instances that use the unlimited CPU credit option do not support host tenancy.

            Possible values include:
            • "default"
            • "dedicated"
            • "host"
          • SpreadDomain — (String)

            Reserved for future use.

            This parameter is not supported by CreateFleet.

          • HostResourceGroupArn — (String)

            The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

            This parameter is not supported by CreateFleet.

        • Platform — (String)

          The value is Windows for Windows instances; otherwise blank.

          Possible values include:
          • "Windows"
        • PrivateDnsName — (String)

          (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

          [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

        • PrivateIpAddress — (String)

          The private IPv4 address assigned to the instance.

        • 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"
        • PublicDnsName — (String)

          (IPv4 only) 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.

        • PublicIpAddress — (String)

          The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.

          A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

        • RamdiskId — (String)

          The RAM disk associated with this instance, if applicable.

        • State — (map)

          The current state of the instance.

          • Code — (Integer)

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

          • Name — (String)

            The current state of the instance.

            Possible values include:
            • "pending"
            • "running"
            • "shutting-down"
            • "terminated"
            • "stopping"
            • "stopped"
        • StateTransitionReason — (String)

          The reason for the most recent state transition. This might be an empty string.

        • 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.

        • Architecture — (String)

          The architecture of the image.

          Possible values include:
          • "i386"
          • "x86_64"
          • "arm64"
          • "x86_64_mac"
        • BlockDeviceMappings — (Array<map>)

          Any block device mapping entries for the instance.

          • DeviceName — (String)

            The device name (for example, /dev/sdh or xvdh).

          • Ebs — (map)

            Parameters used to automatically set up EBS volumes when the instance is launched.

            • AttachTime — (Date)

              The time stamp when the attachment initiated.

            • DeleteOnTermination — (Boolean)

              Indicates whether the volume is deleted on instance termination.

            • Status — (String)

              The attachment state.

              Possible values include:
              • "attaching"
              • "attached"
              • "detaching"
              • "detached"
            • VolumeId — (String)

              The ID of the EBS volume.

        • ClientToken — (String)

          The idempotency token you provided when you launched the instance, if applicable.

        • EbsOptimized — (Boolean)

          Indicates whether the instance is optimized for Amazon 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.

        • EnaSupport — (Boolean)

          Specifies whether enhanced networking with ENA is enabled.

        • Hypervisor — (String)

          The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

          Possible values include:
          • "ovm"
          • "xen"
        • 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.

        • InstanceLifecycle — (String)

          Indicates whether this is a Spot Instance or a Scheduled Instance.

          Possible values include:
          • "spot"
          • "scheduled"
        • ElasticGpuAssociations — (Array<map>)

          The Elastic GPU associated with the instance.

          • ElasticGpuId — (String)

            The ID of the Elastic Graphics accelerator.

          • ElasticGpuAssociationId — (String)

            The ID of the association.

          • ElasticGpuAssociationState — (String)

            The state of the association between the instance and the Elastic Graphics accelerator.

          • ElasticGpuAssociationTime — (String)

            The time the Elastic Graphics accelerator was associated with the instance.

        • ElasticInferenceAcceleratorAssociations — (Array<map>)

          The elastic inference accelerator associated with the instance.

          • ElasticInferenceAcceleratorArn — (String)

            The Amazon Resource Name (ARN) of the elastic inference accelerator.

          • ElasticInferenceAcceleratorAssociationId — (String)

            The ID of the association.

          • ElasticInferenceAcceleratorAssociationState — (String)

            The state of the elastic inference accelerator.

          • ElasticInferenceAcceleratorAssociationTime — (Date)

            The time at which the elastic inference accelerator is associated with an instance.

        • NetworkInterfaces — (Array<map>)

          [EC2-VPC] The network interfaces for the instance.

          • Association — (map)

            The association information for an Elastic IPv4 associated with the network interface.

            • CarrierIp — (String)

              The carrier IP address associated with the network interface.

            • CustomerOwnedIp — (String)

              The customer-owned IP address associated with the network interface.

            • IpOwnerId — (String)

              The ID of the owner of the Elastic IP address.

            • PublicDnsName — (String)

              The public DNS name.

            • PublicIp — (String)

              The public IP address or Elastic IP address bound to the network interface.

          • Attachment — (map)

            The network interface attachment.

            • AttachTime — (Date)

              The time stamp when the attachment initiated.

            • AttachmentId — (String)

              The ID of the network interface attachment.

            • DeleteOnTermination — (Boolean)

              Indicates whether the network interface is deleted when the instance is terminated.

            • 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"
            • NetworkCardIndex — (Integer)

              The index of the network card.

          • Description — (String)

            The description.

          • Groups — (Array<map>)

            One or more security groups.

            • GroupName — (String)

              The name of the security group.

            • GroupId — (String)

              The ID of the security group.

          • Ipv6Addresses — (Array<map>)

            One or more IPv6 addresses associated with the network interface.

            • Ipv6Address — (String)

              The IPv6 address.

          • MacAddress — (String)

            The MAC address.

          • NetworkInterfaceId — (String)

            The ID of the network interface.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that created the network interface.

          • PrivateDnsName — (String)

            The private DNS name.

          • PrivateIpAddress — (String)

            The IPv4 address of the network interface within the subnet.

          • PrivateIpAddresses — (Array<map>)

            One or more private IPv4 addresses associated with the network interface.

            • Association — (map)

              The association information for an Elastic IP address for the network interface.

              • CarrierIp — (String)

                The carrier IP address associated with the network interface.

              • CustomerOwnedIp — (String)

                The customer-owned IP address associated with the network interface.

              • IpOwnerId — (String)

                The ID of the owner of the Elastic IP address.

              • PublicDnsName — (String)

                The public DNS name.

              • PublicIp — (String)

                The public IP address or Elastic IP address bound to the network interface.

            • Primary — (Boolean)

              Indicates whether this IPv4 address is the primary private IP address of the network interface.

            • PrivateDnsName — (String)

              The private IPv4 DNS name.

            • PrivateIpAddress — (String)

              The private IPv4 address of the network interface.

          • SourceDestCheck — (Boolean)

            Indicates whether source/destination checking is enabled.

          • Status — (String)

            The status of the network interface.

            Possible values include:
            • "available"
            • "associated"
            • "attaching"
            • "in-use"
            • "detaching"
          • SubnetId — (String)

            The ID of the subnet.

          • VpcId — (String)

            The ID of the VPC.

          • InterfaceType — (String)

            Describes the type of network interface.

            Valid values: interface | efa | trunk

          • Ipv4Prefixes — (Array<map>)

            The IPv4 delegated prefixes that are assigned to the network interface.

            • Ipv4Prefix — (String)

              One or more IPv4 prefixes assigned to the network interface.

          • Ipv6Prefixes — (Array<map>)

            The IPv6 delegated prefixes that are assigned to the network interface.

            • Ipv6Prefix — (String)

              One or more IPv6 prefixes assigned to the network interface.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • RootDeviceName — (String)

          The device name of the root device volume (for example, /dev/sda1).

        • 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"
        • SecurityGroups — (Array<map>)

          The security groups for the instance.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • SourceDestCheck — (Boolean)

          Indicates whether source/destination checking is enabled.

        • SpotInstanceRequestId — (String)

          If the request is a Spot Instance request, the ID of the request.

        • SriovNetSupport — (String)

          Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

        • 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.InsufficientInstanceCapacity: There was insufficient capacity available to satisfy the launch request.

            • Server.InternalError: An internal error caused the instance to terminate during launch.

            • Server.ScheduledStop: The instance was stopped due to a scheduled retirement.

            • Server.SpotInstanceShutdown: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

            • Server.SpotInstanceTermination: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

            • Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.

            • Client.InstanceTerminated: The instance was terminated or rebooted during AMI creation.

            • Client.InternalError: A client error caused the instance to terminate during launch.

            • Client.InvalidSnapshot.NotFound: The specified snapshot was not found.

            • Client.UserInitiatedHibernate: Hibernation was initiated on 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 account limits.

        • 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.

        • VirtualizationType — (String)

          The virtualization type of the instance.

          Possible values include:
          • "hvm"
          • "paravirtual"
        • CpuOptions — (map)

          The CPU options for the instance.

          • CoreCount — (Integer)

            The number of CPU cores for the instance.

          • ThreadsPerCore — (Integer)

            The number of threads per CPU core.

        • CapacityReservationId — (String)

          The ID of the Capacity Reservation.

        • CapacityReservationSpecification — (map)

          Information about the Capacity Reservation targeting option.

          • CapacityReservationPreference — (String)

            Describes the instance's Capacity Reservation preferences. Possible preferences include:

            • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

            • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

            Possible values include:
            • "open"
            • "none"
          • CapacityReservationTarget — (map)

            Information about the targeted Capacity Reservation or Capacity Reservation group.

            • CapacityReservationId — (String)

              The ID of the targeted Capacity Reservation.

            • CapacityReservationResourceGroupArn — (String)

              The ARN of the targeted Capacity Reservation group.

        • HibernationOptions — (map)

          Indicates whether the instance is enabled for hibernation.

          • Configured — (Boolean)

            If this parameter is set to true, your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

        • Licenses — (Array<map>)

          The license configurations for the instance.

          • LicenseConfigurationArn — (String)

            The Amazon Resource Name (ARN) of the license configuration.

        • MetadataOptions — (map)

          The metadata options for the instance.

          • State — (String)

            The state of the metadata option changes.

            pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

            applied - The metadata options have been successfully applied on the instance.

            Possible values include:
            • "pending"
            • "applied"
          • HttpTokens — (String)

            The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

            If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

            If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

            Possible values include:
            • "optional"
            • "required"
          • HttpPutResponseHopLimit — (Integer)

            The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

            Default: 1

            Possible values: Integers from 1 to 64

          • HttpEndpoint — (String)

            Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

            Possible values include:
            • "disabled"
            • "enabled"
          • HttpProtocolIpv6 — (String)

            Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

            Possible values include:
            • "disabled"
            • "enabled"
        • EnclaveOptions — (map)

          Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

          • Enabled — (Boolean)

            If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

        • BootMode — (String)

          The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide.

          Possible values include:
          • "legacy-bios"
          • "uefi"
        • PlatformDetails — (String)

          The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

        • UsageOperation — (String)

          The usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

        • UsageOperationUpdateTime — (Date)

          The time that the usage operation was last updated.

      • OwnerId — (String)

        The ID of the Amazon Web Services account that owns the reservation.

      • RequesterId — (String)

        The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).

      • ReservationId — (String)

        The ID of the reservation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

runScheduledInstances(params = {}, callback) ⇒ AWS.Request

Launches the specified Scheduled Instances.

Before you can launch a Scheduled Instance, you must purchase it and obtain an identifier using PurchaseScheduledInstances.

You must launch a Scheduled Instance during its scheduled time period. You can't stop or reboot a Scheduled Instance, but you can terminate it as needed. If you terminate a Scheduled Instance before the current scheduled time period ends, you can launch it again after a few minutes. For more information, see Scheduled Instances in the Amazon EC2 User Guide.

Service Reference:

Examples:

To launch a Scheduled Instance in a VPC


/* This example launches the specified Scheduled Instance in a VPC. */

 var params = {
  InstanceCount: 1, 
  LaunchSpecification: {
   IamInstanceProfile: {
    Name: "my-iam-role"
   }, 
   ImageId: "ami-12345678", 
   InstanceType: "c4.large", 
   KeyName: "my-key-pair", 
   NetworkInterfaces: [
      {
     AssociatePublicIpAddress: true, 
     DeviceIndex: 0, 
     Groups: [
        "sg-12345678"
     ], 
     SubnetId: "subnet-12345678"
    }
   ]
  }, 
  ScheduledInstanceId: "sci-1234-1234-1234-1234-123456789012"
 };
 ec2.runScheduledInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    InstanceIdSet: [
       "i-1234567890abcdef0"
    ]
   }
   */
 });

To launch a Scheduled Instance in EC2-Classic


/* This example launches the specified Scheduled Instance in EC2-Classic. */

 var params = {
  InstanceCount: 1, 
  LaunchSpecification: {
   IamInstanceProfile: {
    Name: "my-iam-role"
   }, 
   ImageId: "ami-12345678", 
   InstanceType: "c4.large", 
   KeyName: "my-key-pair", 
   Placement: {
    AvailabilityZone: "us-west-2b"
   }, 
   SecurityGroupIds: [
      "sg-12345678"
   ]
  }, 
  ScheduledInstanceId: "sci-1234-1234-1234-1234-123456789012"
 };
 ec2.runScheduledInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    InstanceIdSet: [
       "i-1234567890abcdef0"
    ]
   }
   */
 });

Calling the runScheduledInstances operation

var params = {
  LaunchSpecification: { /* required */
    ImageId: 'STRING_VALUE', /* required */
    BlockDeviceMappings: [
      {
        DeviceName: 'STRING_VALUE',
        Ebs: {
          DeleteOnTermination: true || false,
          Encrypted: true || false,
          Iops: 'NUMBER_VALUE',
          SnapshotId: 'STRING_VALUE',
          VolumeSize: 'NUMBER_VALUE',
          VolumeType: 'STRING_VALUE'
        },
        NoDevice: 'STRING_VALUE',
        VirtualName: 'STRING_VALUE'
      },
      /* more items */
    ],
    EbsOptimized: true || false,
    IamInstanceProfile: {
      Arn: 'STRING_VALUE',
      Name: 'STRING_VALUE'
    },
    InstanceType: 'STRING_VALUE',
    KernelId: 'STRING_VALUE',
    KeyName: 'STRING_VALUE',
    Monitoring: {
      Enabled: true || false
    },
    NetworkInterfaces: [
      {
        AssociatePublicIpAddress: true || false,
        DeleteOnTermination: true || false,
        Description: 'STRING_VALUE',
        DeviceIndex: 'NUMBER_VALUE',
        Groups: [
          'STRING_VALUE',
          /* more items */
        ],
        Ipv6AddressCount: 'NUMBER_VALUE',
        Ipv6Addresses: [
          {
            Ipv6Address: 'STRING_VALUE'
          },
          /* more items */
        ],
        NetworkInterfaceId: 'STRING_VALUE',
        PrivateIpAddress: 'STRING_VALUE',
        PrivateIpAddressConfigs: [
          {
            Primary: true || false,
            PrivateIpAddress: 'STRING_VALUE'
          },
          /* more items */
        ],
        SecondaryPrivateIpAddressCount: 'NUMBER_VALUE',
        SubnetId: 'STRING_VALUE'
      },
      /* more items */
    ],
    Placement: {
      AvailabilityZone: 'STRING_VALUE',
      GroupName: 'STRING_VALUE'
    },
    RamdiskId: 'STRING_VALUE',
    SecurityGroupIds: [
      'STRING_VALUE',
      /* more items */
    ],
    SubnetId: 'STRING_VALUE',
    UserData: 'STRING_VALUE'
  },
  ScheduledInstanceId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  InstanceCount: 'NUMBER_VALUE'
};
ec2.runScheduledInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClientToken — (String)

      Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency.

      If a token is not provided, the SDK will use a version 4 UUID.
    • 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.

    • InstanceCount — (Integer)

      The number of instances.

      Default: 1

    • LaunchSpecification — (map)

      The launch specification. You must match the instance type, Availability Zone, network, and platform of the schedule that you purchased.

      • BlockDeviceMappings — (Array<map>)

        The block device mapping entries.

        • DeviceName — (String)

          The device name (for example, /dev/sdh or xvdh).

        • Ebs — (map)

          Parameters used to set up EBS volumes automatically when the instance is launched.

          • DeleteOnTermination — (Boolean)

            Indicates whether the volume is deleted on instance termination.

          • Encrypted — (Boolean)

            Indicates whether the volume is encrypted. You can attached encrypted volumes only to instances that support them.

          • Iops — (Integer)

            The number of I/O operations per second (IOPS) to provision for an io1 or io2 volume, with a maximum ratio of 50 IOPS/GiB for io1, and 500 IOPS/GiB for io2. Range is 100 to 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed only on instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide.

            This parameter is valid only for Provisioned IOPS SSD (io1 and io2) volumes.

          • SnapshotId — (String)

            The ID of the snapshot.

          • VolumeSize — (Integer)

            The size of the volume, in GiB.

            Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

          • VolumeType — (String)

            The volume type. gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, Throughput Optimized HDD for st1, Cold HDD for sc1, or standard for Magnetic.

            Default: gp2

        • NoDevice — (String)

          To omit the device from the block device mapping, specify an empty string.

        • VirtualName — (String)

          The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with two 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.

      • EbsOptimized — (Boolean)

        Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

        Default: false

      • IamInstanceProfile — (map)

        The IAM instance profile.

        • Arn — (String)

          The Amazon Resource Name (ARN).

        • Name — (String)

          The name.

      • ImageIdrequired — (String)

        The ID of the Amazon Machine Image (AMI).

      • InstanceType — (String)

        The instance type.

      • KernelId — (String)

        The ID of the kernel.

      • KeyName — (String)

        The name of the key pair.

      • Monitoring — (map)

        Enable or disable monitoring for the instances.

        • Enabled — (Boolean)

          Indicates whether monitoring is enabled.

      • NetworkInterfaces — (Array<map>)

        The network interfaces.

        • AssociatePublicIpAddress — (Boolean)

          Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true.

        • DeleteOnTermination — (Boolean)

          Indicates whether to delete the interface when the instance is terminated.

        • Description — (String)

          The description.

        • DeviceIndex — (Integer)

          The index of the device for the network interface attachment.

        • Groups — (Array<String>)

          The IDs of the security groups.

        • Ipv6AddressCount — (Integer)

          The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.

        • Ipv6Addresses — (Array<map>)

          The specific IPv6 addresses from the subnet range.

          • Ipv6Address — (String)

            The IPv6 address.

        • NetworkInterfaceId — (String)

          The ID of the network interface.

        • PrivateIpAddress — (String)

          The IPv4 address of the network interface within the subnet.

        • PrivateIpAddressConfigs — (Array<map>)

          The private IPv4 addresses.

          • Primary — (Boolean)

            Indicates whether this is a primary IPv4 address. Otherwise, this is a secondary IPv4 address.

          • PrivateIpAddress — (String)

            The IPv4 address.

        • SecondaryPrivateIpAddressCount — (Integer)

          The number of secondary private IPv4 addresses.

        • SubnetId — (String)

          The ID of the subnet.

      • Placement — (map)

        The placement information.

        • AvailabilityZone — (String)

          The Availability Zone.

        • GroupName — (String)

          The name of the placement group.

      • RamdiskId — (String)

        The ID of the RAM disk.

      • SecurityGroupIds — (Array<String>)

        The IDs of the security groups.

      • SubnetId — (String)

        The ID of the subnet in which to launch the instances.

      • UserData — (String)

        The base64-encoded MIME user data.

    • ScheduledInstanceId — (String)

      The Scheduled Instance 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:

      • InstanceIdSet — (Array<String>)

        The IDs of the newly launched instances.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

searchLocalGatewayRoutes(params = {}, callback) ⇒ AWS.Request

Searches for routes in the specified local gateway route table.

Service Reference:

Examples:

Calling the searchLocalGatewayRoutes operation

var params = {
  LocalGatewayRouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
ec2.searchLocalGatewayRoutes(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: {})
    • LocalGatewayRouteTableId — (String)

      The ID of the local gateway route table.

    • Filters — (Array<map>)

      One or more filters.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • Routes — (Array<map>)

        Information about the routes.

        • DestinationCidrBlock — (String)

          The CIDR block used for destination matches.

        • LocalGatewayVirtualInterfaceGroupId — (String)

          The ID of the virtual interface group.

        • Type — (String)

          The route type.

          Possible values include:
          • "static"
          • "propagated"
        • State — (String)

          The state of the route.

          Possible values include:
          • "pending"
          • "active"
          • "blackhole"
          • "deleting"
          • "deleted"
        • LocalGatewayRouteTableId — (String)

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn — (String)

          The Amazon Resource Name (ARN) of the local gateway route table.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the local gateway route.

      • 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.

searchTransitGatewayMulticastGroups(params = {}, callback) ⇒ AWS.Request

Searches one or more transit gateway multicast groups and returns the group membership information.

Examples:

Calling the searchTransitGatewayMulticastGroups operation

var params = {
  DryRun: true || false,
  Filters: [
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TransitGatewayMulticastDomainId: 'STRING_VALUE'
};
ec2.searchTransitGatewayMulticastGroups(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: {})
    • TransitGatewayMulticastDomainId — (String)

      The ID of the transit gateway multicast domain.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • group-ip-address - The IP address of the transit gateway multicast group.

      • is-group-member - The resource is a group member. Valid values are true | false.

      • is-group-source - The resource is a group source. Valid values are true | false.

      • member-type - The member type. Valid values are igmp | static.

      • resource-id - The ID of the resource.

      • resource-type - The type of resource. Valid values are vpc | vpn | direct-connect-gateway | tgw-peering.

      • source-type - The source type. Valid values are igmp | static.

      • subnet-id - The ID of the subnet.

      • transit-gateway-attachment-id - The id of the transit gateway attachment.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NextToken — (String)

      The token for the next page of results.

    • 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:

      • MulticastGroups — (Array<map>)

        Information about the transit gateway multicast group.

        • GroupIpAddress — (String)

          The IP address assigned to the transit gateway multicast group.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway attachment.

        • SubnetId — (String)

          The ID of the subnet.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The type of resource, for example a VPC attachment.

          Possible values include:
          • "vpc"
          • "vpn"
          • "direct-connect-gateway"
          • "connect"
          • "peering"
          • "tgw-peering"
        • ResourceOwnerId — (String)

          The ID of the Amazon Web Services account that owns the transit gateway multicast domain group resource.

        • NetworkInterfaceId — (String)

          The ID of the transit gateway attachment.

        • GroupMember — (Boolean)

          Indicates that the resource is a transit gateway multicast group member.

        • GroupSource — (Boolean)

          Indicates that the resource is a transit gateway multicast group member.

        • MemberType — (String)

          The member type (for example, static).

          Possible values include:
          • "static"
          • "igmp"
        • SourceType — (String)

          The source type.

          Possible values include:
          • "static"
          • "igmp"
      • 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.

searchTransitGatewayRoutes(params = {}, callback) ⇒ AWS.Request

Searches for routes in the specified transit gateway route table.

Service Reference:

Examples:

Calling the searchTransitGatewayRoutes operation

var params = {
  Filters: [ /* required */
    {
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  TransitGatewayRouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  MaxResults: 'NUMBER_VALUE'
};
ec2.searchTransitGatewayRoutes(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: {})
    • TransitGatewayRouteTableId — (String)

      The ID of the transit gateway route table.

    • Filters — (Array<map>)

      One or more filters. The possible values are:

      • attachment.transit-gateway-attachment-id- The id of the transit gateway attachment.

      • attachment.resource-id - The resource id of the transit gateway attachment.

      • attachment.resource-type - The attachment resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect.

      • prefix-list-id - The ID of the prefix list.

      • route-search.exact-match - The exact match of the specified filter.

      • route-search.longest-prefix-match - The longest prefix that matches the route.

      • route-search.subnet-of-match - The routes with a subnet that match the specified CIDR filter.

      • route-search.supernet-of-match - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.

      • state - The state of the route (active | blackhole).

      • type - The type of route (propagated | static).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of routes to return.

    • 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:

      • Routes — (Array<map>)

        Information about the routes.

        • DestinationCidrBlock — (String)

          The CIDR block used for destination matches.

        • PrefixListId — (String)

          The ID of the prefix list used for destination matches.

        • TransitGatewayAttachments — (Array<map>)

          The attachments.

          • ResourceId — (String)

            The ID of the resource.

          • TransitGatewayAttachmentId — (String)

            The ID of the attachment.

          • ResourceType — (String)

            The resource type. Note that the tgw-peering resource type has been deprecated.

            Possible values include:
            • "vpc"
            • "vpn"
            • "direct-connect-gateway"
            • "connect"
            • "peering"
            • "tgw-peering"
        • Type — (String)

          The route type.

          Possible values include:
          • "static"
          • "propagated"
        • State — (String)

          The state of the route.

          Possible values include:
          • "pending"
          • "active"
          • "blackhole"
          • "deleting"
          • "deleted"
      • AdditionalRoutesAvailable — (Boolean)

        Indicates whether there are additional routes available.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

sendDiagnosticInterrupt(params = {}, callback) ⇒ AWS.Request

Sends a diagnostic interrupt to the specified Amazon EC2 instance to trigger a kernel panic (on Linux instances), or a blue screen/stop error (on Windows instances). For instances based on Intel and AMD processors, the interrupt is received as a non-maskable interrupt (NMI).

In general, the operating system crashes and reboots when a kernel panic or stop error is triggered. The operating system can also be configured to perform diagnostic tasks, such as generating a memory dump file, loading a secondary kernel, or obtaining a call trace.

Before sending a diagnostic interrupt to your instance, ensure that its operating system is configured to perform the required diagnostic tasks.

For more information about configuring your operating system to generate a crash dump when a kernel panic or stop error occurs, see Send a diagnostic interrupt (Linux instances) or Send a Diagnostic Interrupt (Windows instances).

Service Reference:

Examples:

Calling the sendDiagnosticInterrupt operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.sendDiagnosticInterrupt(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: {})
    • InstanceId — (String)

      The ID of the instance.

    • 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.

startInstances(params = {}, callback) ⇒ AWS.Request

Starts an Amazon EBS-backed instance that you've previously stopped.

Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for instance usage. However, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

Performing this operation on an instance that uses an instance store as its root device returns an error.

If you attempt to start a T3 instance with host tenancy and the unlimted CPU credit option, the request fails. The unlimited CPU credit option is not supported on Dedicated Hosts. Before you start the instance, either change its CPU credit option to standard, or change its tenancy to default or dedicated.

For more information, see Stopping instances in the Amazon EC2 User Guide.

Service Reference:

Examples:

To start a stopped EC2 instance


/* This example starts the specified EC2 instance. */

 var params = {
  InstanceIds: [
     "i-1234567890abcdef0"
  ]
 };
 ec2.startInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    StartingInstances: [
       {
      CurrentState: {
       Code: 0, 
       Name: "pending"
      }, 
      InstanceId: "i-1234567890abcdef0", 
      PreviousState: {
       Code: 80, 
       Name: "stopped"
      }
     }
    ]
   }
   */
 });

Calling the startInstances operation

var params = {
  InstanceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  AdditionalInfo: 'STRING_VALUE',
  DryRun: true || false
};
ec2.startInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceIds — (Array<String>)

      The IDs of the instances.

    • AdditionalInfo — (String)

      Reserved.

    • 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:

      • StartingInstances — (Array<map>)

        Information about the started instances.

        • CurrentState — (map)

          The current state of the instance.

          • Code — (Integer)

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

          • Name — (String)

            The current state of the instance.

            Possible values include:
            • "pending"
            • "running"
            • "shutting-down"
            • "terminated"
            • "stopping"
            • "stopped"
        • InstanceId — (String)

          The ID of the instance.

        • PreviousState — (map)

          The previous state of the instance.

          • Code — (Integer)

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

          • Name — (String)

            The current state of the instance.

            Possible values include:
            • "pending"
            • "running"
            • "shutting-down"
            • "terminated"
            • "stopping"
            • "stopped"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startNetworkInsightsAnalysis(params = {}, callback) ⇒ AWS.Request

Starts analyzing the specified path. If the path is reachable, the operation returns the shortest feasible path.

Service Reference:

Examples:

Calling the startNetworkInsightsAnalysis operation

var params = {
  ClientToken: 'STRING_VALUE', /* required */
  NetworkInsightsPathId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  FilterInArns: [
    'STRING_VALUE',
    /* more items */
  ],
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway | local-gateway-route-table | local-gateway-virtual-interface | local-gateway-virtual-interface-group | local-gateway-route-table-vpc-association | local-gateway-route-table-virtual-interface-group-association | natgateway | network-acl | network-interface | network-insights-analysis | network-insights-path | placement-group | prefix-list | replace-root-volume-task | reserved-instances | route-table | security-group | security-group-rule | snapshot | spot-fleet-request | spot-instances-request | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-route-table | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.startNetworkInsightsAnalysis(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: {})
    • NetworkInsightsPathId — (String)

      The ID of the path.

    • FilterInArns — (Array<String>)

      The Amazon Resource Names (ARN) of the resources that the path must traverse.

    • 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.

    • TagSpecifications — (Array<map>)

      The tags to apply.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "dedicated-host"
        • "dhcp-options"
        • "egress-only-internet-gateway"
        • "elastic-ip"
        • "elastic-gpu"
        • "export-image-task"
        • "export-instance-task"
        • "fleet"
        • "fpga-image"
        • "host-reservation"
        • "image"
        • "import-image-task"
        • "import-snapshot-task"
        • "instance"
        • "instance-event-window"
        • "internet-gateway"
        • "ipv4pool-ec2"
        • "ipv6pool-ec2"
        • "key-pair"
        • "launch-template"
        • "local-gateway"
        • "local-gateway-route-table"
        • "local-gateway-virtual-interface"
        • "local-gateway-virtual-interface-group"
        • "local-gateway-route-table-vpc-association"
        • "local-gateway-route-table-virtual-interface-group-association"
        • "natgateway"
        • "network-acl"
        • "network-interface"
        • "network-insights-analysis"
        • "network-insights-path"
        • "placement-group"
        • "prefix-list"
        • "replace-root-volume-task"
        • "reserved-instances"
        • "route-table"
        • "security-group"
        • "security-group-rule"
        • "snapshot"
        • "spot-fleet-request"
        • "spot-instances-request"
        • "subnet"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-route-table"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-service"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
      • Tags — (Array<map>)

        The tags to apply 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)

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.

      If a token is not provided, the SDK will use a version 4 UUID.

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:

      • NetworkInsightsAnalysis — (map)

        Information about the network insights analysis.

        • NetworkInsightsAnalysisId — (String)

          The ID of the network insights analysis.

        • NetworkInsightsAnalysisArn — (String)

          The Amazon Resource Name (ARN) of the network insights analysis.

        • NetworkInsightsPathId — (String)

          The ID of the path.

        • FilterInArns — (Array<String>)

          The Amazon Resource Names (ARN) of the Amazon Web Services resources that the path must traverse.

        • StartDate — (Date)

          The time the analysis started.

        • Status — (String)

          The status of the network insights analysis.

          Possible values include:
          • "running"
          • "succeeded"
          • "failed"
        • StatusMessage — (String)

          The status message, if the status is failed.

        • NetworkPathFound — (Boolean)

          Indicates whether the destination is reachable from the source.

        • ForwardPathComponents — (Array<map>)

          The components in the path from source to destination.

          • SequenceNumber — (Integer)

            The sequence number.

          • AclRule — (map)

            The network ACL rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Egress — (Boolean)

              Indicates whether the rule is an outbound rule.

            • PortRange — (map)

              The range of ports.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • RuleAction — (String)

              Indicates whether to allow or deny traffic that matches the rule.

            • RuleNumber — (Integer)

              The rule number.

          • Component — (map)

            The component.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • DestinationVpc — (map)

            The destination VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • OutboundHeader — (map)

            The outbound header.

            • DestinationAddresses — (Array<String>)

              The destination addresses.

            • DestinationPortRanges — (Array<map>)

              The destination port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • SourceAddresses — (Array<String>)

              The source addresses.

            • SourcePortRanges — (Array<map>)

              The source port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

          • InboundHeader — (map)

            The inbound header.

            • DestinationAddresses — (Array<String>)

              The destination addresses.

            • DestinationPortRanges — (Array<map>)

              The destination port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • SourceAddresses — (Array<String>)

              The source addresses.

            • SourcePortRanges — (Array<map>)

              The source port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

          • RouteTableRoute — (map)

            The route table route.

            • DestinationCidr — (String)

              The destination IPv4 address, in CIDR notation.

            • DestinationPrefixListId — (String)

              The prefix of the Amazon Web Service.

            • EgressOnlyInternetGatewayId — (String)

              The ID of an egress-only internet gateway.

            • GatewayId — (String)

              The ID of the gateway, such as an internet gateway or virtual private gateway.

            • InstanceId — (String)

              The ID of the instance, such as a NAT instance.

            • NatGatewayId — (String)

              The ID of a NAT gateway.

            • NetworkInterfaceId — (String)

              The ID of a network interface.

            • Origin — (String)

              Describes how the route was created. The following are possible values:

              • 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.

            • TransitGatewayId — (String)

              The ID of a transit gateway.

            • VpcPeeringConnectionId — (String)

              The ID of a VPC peering connection.

          • SecurityGroupRule — (map)

            The security group rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Direction — (String)

              The direction. The following are possible values:

              • egress

              • ingress

            • SecurityGroupId — (String)

              The security group ID.

            • PortRange — (map)

              The port range.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • PrefixListId — (String)

              The prefix list ID.

            • Protocol — (String)

              The protocol name.

          • SourceVpc — (map)

            The source VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Subnet — (map)

            The subnet.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Vpc — (map)

            The component VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

        • ReturnPathComponents — (Array<map>)

          The components in the path from destination to source.

          • SequenceNumber — (Integer)

            The sequence number.

          • AclRule — (map)

            The network ACL rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Egress — (Boolean)

              Indicates whether the rule is an outbound rule.

            • PortRange — (map)

              The range of ports.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • RuleAction — (String)

              Indicates whether to allow or deny traffic that matches the rule.

            • RuleNumber — (Integer)

              The rule number.

          • Component — (map)

            The component.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • DestinationVpc — (map)

            The destination VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • OutboundHeader — (map)

            The outbound header.

            • DestinationAddresses — (Array<String>)

              The destination addresses.

            • DestinationPortRanges — (Array<map>)

              The destination port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • SourceAddresses — (Array<String>)

              The source addresses.

            • SourcePortRanges — (Array<map>)

              The source port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

          • InboundHeader — (map)

            The inbound header.

            • DestinationAddresses — (Array<String>)

              The destination addresses.

            • DestinationPortRanges — (Array<map>)

              The destination port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • SourceAddresses — (Array<String>)

              The source addresses.

            • SourcePortRanges — (Array<map>)

              The source port ranges.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

          • RouteTableRoute — (map)

            The route table route.

            • DestinationCidr — (String)

              The destination IPv4 address, in CIDR notation.

            • DestinationPrefixListId — (String)

              The prefix of the Amazon Web Service.

            • EgressOnlyInternetGatewayId — (String)

              The ID of an egress-only internet gateway.

            • GatewayId — (String)

              The ID of the gateway, such as an internet gateway or virtual private gateway.

            • InstanceId — (String)

              The ID of the instance, such as a NAT instance.

            • NatGatewayId — (String)

              The ID of a NAT gateway.

            • NetworkInterfaceId — (String)

              The ID of a network interface.

            • Origin — (String)

              Describes how the route was created. The following are possible values:

              • 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.

            • TransitGatewayId — (String)

              The ID of a transit gateway.

            • VpcPeeringConnectionId — (String)

              The ID of a VPC peering connection.

          • SecurityGroupRule — (map)

            The security group rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Direction — (String)

              The direction. The following are possible values:

              • egress

              • ingress

            • SecurityGroupId — (String)

              The security group ID.

            • PortRange — (map)

              The port range.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • PrefixListId — (String)

              The prefix list ID.

            • Protocol — (String)

              The protocol name.

          • SourceVpc — (map)

            The source VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Subnet — (map)

            The subnet.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Vpc — (map)

            The component VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

        • Explanations — (Array<map>)

          The explanations. For more information, see Reachability Analyzer explanation codes.

          • Acl — (map)

            The network ACL.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • AclRule — (map)

            The network ACL rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Egress — (Boolean)

              Indicates whether the rule is an outbound rule.

            • PortRange — (map)

              The range of ports.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • Protocol — (String)

              The protocol.

            • RuleAction — (String)

              Indicates whether to allow or deny traffic that matches the rule.

            • RuleNumber — (Integer)

              The rule number.

          • Address — (String)

            The IPv4 address, in CIDR notation.

          • Addresses — (Array<String>)

            The IPv4 addresses, in CIDR notation.

          • AttachedTo — (map)

            The resource to which the component is attached.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • AvailabilityZones — (Array<String>)

            The Availability Zones.

          • Cidrs — (Array<String>)

            The CIDR ranges.

          • Component — (map)

            The component.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • CustomerGateway — (map)

            The customer gateway.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Destination — (map)

            The destination.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • DestinationVpc — (map)

            The destination VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Direction — (String)

            The direction. The following are possible values:

            • egress

            • ingress

          • ExplanationCode — (String)

            The explanation code.

          • IngressRouteTable — (map)

            The route table.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • InternetGateway — (map)

            The internet gateway.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • LoadBalancerArn — (String)

            The Amazon Resource Name (ARN) of the load balancer.

          • ClassicLoadBalancerListener — (map)

            The listener for a Classic Load Balancer.

            • LoadBalancerPort — (Integer)

              The port on which the load balancer is listening.

            • InstancePort — (Integer)

              [Classic Load Balancers] The back-end port for the listener.

          • LoadBalancerListenerPort — (Integer)

            The listener port of the load balancer.

          • LoadBalancerTarget — (map)

            The target.

            • Address — (String)

              The IP address.

            • AvailabilityZone — (String)

              The Availability Zone.

            • Instance — (map)

              Information about the instance.

              • Id — (String)

                The ID of the component.

              • Arn — (String)

                The Amazon Resource Name (ARN) of the component.

            • Port — (Integer)

              The port on which the target is listening.

          • LoadBalancerTargetGroup — (map)

            The target group.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • LoadBalancerTargetGroups — (Array<map>)

            The target groups.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • LoadBalancerTargetPort — (Integer)

            The target port.

          • ElasticLoadBalancerListener — (map)

            The load balancer listener.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • MissingComponent — (String)

            The missing component.

          • NatGateway — (map)

            The NAT gateway.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • NetworkInterface — (map)

            The network interface.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • PacketField — (String)

            The packet field.

          • VpcPeeringConnection — (map)

            The VPC peering connection.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Port — (Integer)

            The port.

          • PortRanges — (Array<map>)

            The port ranges.

            • From — (Integer)

              The first port in the range.

            • To — (Integer)

              The last port in the range.

          • PrefixList — (map)

            The prefix list.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Protocols — (Array<String>)

            The protocols.

          • RouteTableRoute — (map)

            The route table route.

            • DestinationCidr — (String)

              The destination IPv4 address, in CIDR notation.

            • DestinationPrefixListId — (String)

              The prefix of the Amazon Web Service.

            • EgressOnlyInternetGatewayId — (String)

              The ID of an egress-only internet gateway.

            • GatewayId — (String)

              The ID of the gateway, such as an internet gateway or virtual private gateway.

            • InstanceId — (String)

              The ID of the instance, such as a NAT instance.

            • NatGatewayId — (String)

              The ID of a NAT gateway.

            • NetworkInterfaceId — (String)

              The ID of a network interface.

            • Origin — (String)

              Describes how the route was created. The following are possible values:

              • 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.

            • TransitGatewayId — (String)

              The ID of a transit gateway.

            • VpcPeeringConnectionId — (String)

              The ID of a VPC peering connection.

          • RouteTable — (map)

            The route table.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • SecurityGroup — (map)

            The security group.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • SecurityGroupRule — (map)

            The security group rule.

            • Cidr — (String)

              The IPv4 address range, in CIDR notation.

            • Direction — (String)

              The direction. The following are possible values:

              • egress

              • ingress

            • SecurityGroupId — (String)

              The security group ID.

            • PortRange — (map)

              The port range.

              • From — (Integer)

                The first port in the range.

              • To — (Integer)

                The last port in the range.

            • PrefixListId — (String)

              The prefix list ID.

            • Protocol — (String)

              The protocol name.

          • SecurityGroups — (Array<map>)

            The security groups.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • SourceVpc — (map)

            The source VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • State — (String)

            The state.

          • Subnet — (map)

            The subnet.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • SubnetRouteTable — (map)

            The route table for the subnet.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • Vpc — (map)

            The component VPC.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • VpcEndpoint — (map)

            The VPC endpoint.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • VpnConnection — (map)

            The VPN connection.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

          • VpnGateway — (map)

            The VPN gateway.

            • Id — (String)

              The ID of the component.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the component.

        • AlternatePathHints — (Array<map>)

          Potential intermediate components.

          • ComponentId — (String)

            The ID of the component.

          • ComponentArn — (String)

            The Amazon Resource Name (ARN) of the component.

        • Tags — (Array<map>)

          The tags.

          • 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.

startVpcEndpointServicePrivateDnsVerification(params = {}, callback) ⇒ AWS.Request

Initiates the verification process to prove that the service provider owns the private DNS name domain for the endpoint service.

The service provider must successfully perform the verification before the consumer can use the name to access the service.

Before the service provider runs this command, they must add a record to the DNS server. For more information, see Adding a TXT Record to Your Domain's DNS Server in the Amazon VPC User Guide.

Examples:

Calling the startVpcEndpointServicePrivateDnsVerification operation

var params = {
  ServiceId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.startVpcEndpointServicePrivateDnsVerification(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.

    • ServiceId — (String)

      The ID of the endpoint service.

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:

      • ReturnValue — (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.

stopInstances(params = {}, callback) ⇒ AWS.Request

Stops an Amazon EBS-backed instance.

You can use the Stop action to hibernate an instance if the instance is enabled for hibernation and it meets the hibernation prerequisites. For more information, see Hibernate your instance in the Amazon EC2 User Guide.

We don't charge usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

You can't stop or hibernate instance store-backed instances. You can't use the Stop action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate Spot Instances when they are interrupted. For more information, see Hibernating interrupted Spot Instances in the Amazon EC2 User Guide.

When you stop or hibernate an instance, we shut it down. You can restart your instance at any time. Before stopping or hibernating an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM, but hibernating an instance does preserve data stored in RAM. If an instance cannot hibernate successfully, a normal shutdown occurs.

Stopping and hibernating an instance is different to rebooting or terminating it. For example, when you stop or hibernate an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, hibernating, and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide.

When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see Troubleshooting stopping your instance in the Amazon EC2 User Guide.

Service Reference:

Examples:

To stop a running EC2 instance


/* This example stops the specified EC2 instance. */

 var params = {
  InstanceIds: [
     "i-1234567890abcdef0"
  ]
 };
 ec2.stopInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    StoppingInstances: [
       {
      CurrentState: {
       Code: 64, 
       Name: "stopping"
      }, 
      InstanceId: "i-1234567890abcdef0", 
      PreviousState: {
       Code: 16, 
       Name: "running"
      }
     }
    ]
   }
   */
 });

Calling the stopInstances operation

var params = {
  InstanceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  Force: true || false,
  Hibernate: true || false
};
ec2.stopInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceIds — (Array<String>)

      The IDs of the instances.

    • Hibernate — (Boolean)

      Hibernates the instance if the instance was enabled for hibernation at launch. If the instance cannot hibernate successfully, a normal shutdown occurs. For more information, see Hibernate your instance in the Amazon EC2 User Guide.

      Default: false

    • 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.

    • Force — (Boolean)

      Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

      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:

      • StoppingInstances — (Array<map>)

        Information about the stopped instances.

        • CurrentState — (map)

          The current state of the instance.

          • Code — (Integer)

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

          • Name — (String)

            The current state of the instance.

            Possible values include:
            • "pending"
            • "running"
            • "shutting-down"
            • "terminated"
            • "stopping"
            • "stopped"
        • InstanceId — (String)

          The ID of the instance.

        • PreviousState — (map)

          The previous state of the instance.

          • Code — (Integer)

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

          • Name — (String)

            The current state of the instance.

            Possible values include:
            • "pending"
            • "running"
            • "shutting-down"
            • "terminated"
            • "stopping"
            • "stopped"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

terminateClientVpnConnections(params = {}, callback) ⇒ AWS.Request

Terminates active Client VPN endpoint connections. This action can be used to terminate a specific client connection, or up to five connections established by a specific user.

Service Reference:

Examples:

Calling the terminateClientVpnConnections operation

var params = {
  ClientVpnEndpointId: 'STRING_VALUE', /* required */
  ConnectionId: 'STRING_VALUE',
  DryRun: true || false,
  Username: 'STRING_VALUE'
};
ec2.terminateClientVpnConnections(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: {})
    • ClientVpnEndpointId — (String)

      The ID of the Client VPN endpoint to which the client is connected.

    • ConnectionId — (String)

      The ID of the client connection to be terminated.

    • Username — (String)

      The name of the user who initiated the connection. Use this option to terminate all active connections for the specified user. This option can only be used if the user has established up to five connections.

    • 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:

      • ClientVpnEndpointId — (String)

        The ID of the Client VPN endpoint.

      • Username — (String)

        The user who established the terminated client connections.

      • ConnectionStatuses — (Array<map>)

        The current state of the client connections.

        • ConnectionId — (String)

          The ID of the client connection.

        • PreviousStatus — (map)

          The state of the client connection.

          • Code — (String)

            The state of the client connection.

            Possible values include:
            • "active"
            • "failed-to-terminate"
            • "terminating"
            • "terminated"
          • Message — (String)

            A message about the status of the client connection, if applicable.

        • CurrentStatus — (map)

          A message about the status of the client connection, if applicable.

          • Code — (String)

            The state of the client connection.

            Possible values include:
            • "active"
            • "failed-to-terminate"
            • "terminating"
            • "terminated"
          • Message — (String)

            A message about the status of the client connection, if applicable.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

terminateInstances(params = {}, callback) ⇒ AWS.Request

Shuts down the specified instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds.

If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

If you terminate multiple instances across multiple Availability Zones, and one or more of the specified instances are enabled for termination protection, the request fails with the following results:

  • The specified instances that are in the same Availability Zone as the protected instance are not terminated.

  • The specified instances that are in different Availability Zones, where no other specified instances are protected, are successfully terminated.

For example, say you have the following instances:

  • Instance A: us-east-1a; Not protected

  • Instance B: us-east-1a; Not protected

  • Instance C: us-east-1b; Protected

  • Instance D: us-east-1b; not protected

If you attempt to terminate all of these instances in the same request, the request reports failure with the following results:

  • Instance A and Instance B are successfully terminated because none of the specified instances in us-east-1a are enabled for termination protection.

  • Instance C and Instance D fail to terminate because at least one of the specified instances in us-east-1b (Instance C) is enabled for termination protection.

Terminated instances remain visible after termination (for approximately one hour).

By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the DeleteOnTermination block device mapping parameter set to true are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide.

For more information about troubleshooting, see Troubleshooting terminating your instance in the Amazon EC2 User Guide.

Service Reference:

Examples:

To terminate an EC2 instance


/* This example terminates the specified EC2 instance. */

 var params = {
  InstanceIds: [
     "i-1234567890abcdef0"
  ]
 };
 ec2.terminateInstances(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    TerminatingInstances: [
       {
      CurrentState: {
       Code: 32, 
       Name: "shutting-down"
      }, 
      InstanceId: "i-1234567890abcdef0", 
      PreviousState: {
       Code: 16, 
       Name: "running"
      }
     }
    ]
   }
   */
 });

Calling the terminateInstances operation

var params = {
  InstanceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.terminateInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceIds — (Array<String>)

      The IDs of the instances.

      Constraints: Up to 1000 instance IDs. We recommend breaking up this request into smaller batches.

    • 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:

      • TerminatingInstances — (Array<map>)

        Information about the terminated instances.

        • CurrentState — (map)

          The current state of the instance.

          • Code — (Integer)

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

          • Name — (String)

            The current state of the instance.

            Possible values include:
            • "pending"
            • "running"
            • "shutting-down"
            • "terminated"
            • "stopping"
            • "stopped"
        • InstanceId — (String)

          The ID of the instance.

        • PreviousState — (map)

          The previous state of the instance.

          • Code — (Integer)

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

          • Name — (String)

            The current state of the instance.

            Possible values include:
            • "pending"
            • "running"
            • "shutting-down"
            • "terminated"
            • "stopping"
            • "stopped"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

unassignIpv6Addresses(params = {}, callback) ⇒ AWS.Request

Unassigns one or more IPv6 addresses IPv4 Prefix Delegation prefixes from a network interface.

Service Reference:

Examples:

Calling the unassignIpv6Addresses operation

var params = {
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  Ipv6Addresses: [
    'STRING_VALUE',
    /* more items */
  ],
  Ipv6Prefixes: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.unassignIpv6Addresses(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: {})
    • Ipv6Addresses — (Array<String>)

      The IPv6 addresses to unassign from the network interface.

    • Ipv6Prefixes — (Array<String>)

      One or more IPv6 prefixes to unassign from the network interface.

    • 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. The data object has the following properties:

      • NetworkInterfaceId — (String)

        The ID of the network interface.

      • UnassignedIpv6Addresses — (Array<String>)

        The IPv6 addresses that have been unassigned from the network interface.

      • UnassignedIpv6Prefixes — (Array<String>)

        The IPv4 prefixes that have been unassigned from the network interface.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

unassignPrivateIpAddresses(params = {}, callback) ⇒ AWS.Request

Unassigns one or more secondary private IP addresses, or IPv4 Prefix Delegation prefixes from a network interface.

Service Reference:

Examples:

To unassign a secondary private IP address from a network interface


/* This example unassigns the specified private IP address from the specified network interface. */

 var params = {
  NetworkInterfaceId: "eni-e5aa89a3", 
  PrivateIpAddresses: [
     "10.0.0.82"
  ]
 };
 ec2.unassignPrivateIpAddresses(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
 });

Calling the unassignPrivateIpAddresses operation

var params = {
  NetworkInterfaceId: 'STRING_VALUE', /* required */
  Ipv4Prefixes: [
    'STRING_VALUE',
    /* more items */
  ],
  PrivateIpAddresses: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.unassignPrivateIpAddresses(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>)

      The secondary private IP addresses to unassign from the network interface. You can specify this option multiple times to unassign more than one IP address.

    • Ipv4Prefixes — (Array<String>)

      The IPv4 prefixes to unassign from 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.

unmonitorInstances(params = {}, callback) ⇒ AWS.Request

Disables detailed monitoring for a running instance. For more information, see Monitoring your instances and volumes in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the unmonitorInstances operation

var params = {
  InstanceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false
};
ec2.unmonitorInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceIds — (Array<String>)

      The IDs of the instances.

    • 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:

      • InstanceMonitorings — (Array<map>)

        The monitoring information.

        • InstanceId — (String)

          The ID of the instance.

        • Monitoring — (map)

          The monitoring for the instance.

          • State — (String)

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

            Possible values include:
            • "disabled"
            • "disabling"
            • "enabled"
            • "pending"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateSecurityGroupRuleDescriptionsEgress(params = {}, callback) ⇒ AWS.Request

[VPC only] Updates the description of an egress (outbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously. You can remove a description for a security group rule by omitting the description parameter in the request.

Examples:

To update an outbound security group rule description


/* This example updates the description for the specified security group rule. */

 var params = {
  GroupId: "sg-123abc12", 
  IpPermissions: [
     {
    FromPort: 80, 
    IpProtocol: "tcp", 
    IpRanges: [
       {
      CidrIp: "203.0.113.0/24", 
      Description: "Outbound HTTP access to server 2"
     }
    ], 
    ToPort: 80
   }
  ]
 };
 ec2.updateSecurityGroupRuleDescriptionsEgress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the updateSecurityGroupRuleDescriptionsEgress operation

var params = {
  DryRun: true || false,
  GroupId: 'STRING_VALUE',
  GroupName: 'STRING_VALUE',
  IpPermissions: [
    {
      FromPort: 'NUMBER_VALUE',
      IpProtocol: 'STRING_VALUE',
      IpRanges: [
        {
          CidrIp: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      Ipv6Ranges: [
        {
          CidrIpv6: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      PrefixListIds: [
        {
          Description: 'STRING_VALUE',
          PrefixListId: 'STRING_VALUE'
        },
        /* more items */
      ],
      ToPort: 'NUMBER_VALUE',
      UserIdGroupPairs: [
        {
          Description: 'STRING_VALUE',
          GroupId: 'STRING_VALUE',
          GroupName: 'STRING_VALUE',
          PeeringStatus: 'STRING_VALUE',
          UserId: 'STRING_VALUE',
          VpcId: 'STRING_VALUE',
          VpcPeeringConnectionId: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  SecurityGroupRuleDescriptions: [
    {
      Description: 'STRING_VALUE',
      SecurityGroupRuleId: 'STRING_VALUE'
    },
    /* more items */
  ]
};
ec2.updateSecurityGroupRuleDescriptionsEgress(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. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

    • GroupName — (String)

      [Default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.

    • IpPermissions — (Array<map>)

      The IP permissions for the security group rule. You must specify either the IP permissions or the description.

      • FromPort — (Integer)

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol — (String)

        The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges — (Array<map>)

        The IPv4 ranges.

        • CidrIp — (String)

          The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv4 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges — (Array<map>)

        [VPC only] The IPv6 ranges.

        • CidrIpv6 — (String)

          The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv6 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds — (Array<map>)

        [VPC only] The prefix list IDs.

        • Description — (String)

          A description for the security group rule that references this prefix list ID.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • PrefixListId — (String)

          The ID of the prefix.

      • ToPort — (Integer)

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs — (Array<map>)

        The security group and Amazon Web Services account ID pairs.

        • Description — (String)

          A description for the security group rule that references this user ID group pair.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • GroupId — (String)

          The ID of the security group.

        • 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.

          For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

        • PeeringStatus — (String)

          The status of a VPC peering connection, if applicable.

        • UserId — (String)

          The ID of an Amazon Web Services account.

          For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

          [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

        • 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.

    • SecurityGroupRuleDescriptions — (Array<map>)

      The description for the egress security group rules. You must specify either the description or the IP permissions.

      • SecurityGroupRuleId — (String)

        The ID of the security group rule.

      • Description — (String)

        The description of the security group 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. The data object has the following properties:

      • Return — (Boolean)

        Returns true if the request succeeds; otherwise, returns an error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateSecurityGroupRuleDescriptionsIngress(params = {}, callback) ⇒ AWS.Request

Updates the description of an ingress (inbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously. You can remove a description for a security group rule by omitting the description parameter in the request.

Examples:

To update an inbound security group rule description


/* This example updates the description for the specified security group rule. */

 var params = {
  GroupId: "sg-123abc12", 
  IpPermissions: [
     {
    FromPort: 22, 
    IpProtocol: "tcp", 
    IpRanges: [
       {
      CidrIp: "203.0.113.0/16", 
      Description: "SSH access from the LA office"
     }
    ], 
    ToPort: 22
   }
  ]
 };
 ec2.updateSecurityGroupRuleDescriptionsIngress(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the updateSecurityGroupRuleDescriptionsIngress operation

var params = {
  DryRun: true || false,
  GroupId: 'STRING_VALUE',
  GroupName: 'STRING_VALUE',
  IpPermissions: [
    {
      FromPort: 'NUMBER_VALUE',
      IpProtocol: 'STRING_VALUE',
      IpRanges: [
        {
          CidrIp: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      Ipv6Ranges: [
        {
          CidrIpv6: 'STRING_VALUE',
          Description: 'STRING_VALUE'
        },
        /* more items */
      ],
      PrefixListIds: [
        {
          Description: 'STRING_VALUE',
          PrefixListId: 'STRING_VALUE'
        },
        /* more items */
      ],
      ToPort: 'NUMBER_VALUE',
      UserIdGroupPairs: [
        {
          Description: 'STRING_VALUE',
          GroupId: 'STRING_VALUE',
          GroupName: 'STRING_VALUE',
          PeeringStatus: 'STRING_VALUE',
          UserId: 'STRING_VALUE',
          VpcId: 'STRING_VALUE',
          VpcPeeringConnectionId: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  SecurityGroupRuleDescriptions: [
    {
      Description: 'STRING_VALUE',
      SecurityGroupRuleId: 'STRING_VALUE'
    },
    /* more items */
  ]
};
ec2.updateSecurityGroupRuleDescriptionsIngress(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. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

    • GroupName — (String)

      [EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.

    • IpPermissions — (Array<map>)

      The IP permissions for the security group rule. You must specify either IP permissions or a description.

      • FromPort — (Integer)

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol — (String)

        The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges — (Array<map>)

        The IPv4 ranges.

        • CidrIp — (String)

          The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv4 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges — (Array<map>)

        [VPC only] The IPv6 ranges.

        • CidrIpv6 — (String)

          The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

        • Description — (String)

          A description for the security group rule that references this IPv6 address range.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds — (Array<map>)

        [VPC only] The prefix list IDs.

        • Description — (String)

          A description for the security group rule that references this prefix list ID.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • PrefixListId — (String)

          The ID of the prefix.

      • ToPort — (Integer)

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs — (Array<map>)

        The security group and Amazon Web Services account ID pairs.

        • Description — (String)

          A description for the security group rule that references this user ID group pair.

          Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

        • GroupId — (String)

          The ID of the security group.

        • 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.

          For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

        • PeeringStatus — (String)

          The status of a VPC peering connection, if applicable.

        • UserId — (String)

          The ID of an Amazon Web Services account.

          For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

          [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

        • 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.

    • SecurityGroupRuleDescriptions — (Array<map>)

      [VPC only] The description for the ingress security group rules. You must specify either a description or IP permissions.

      • SecurityGroupRuleId — (String)

        The ID of the security group rule.

      • Description — (String)

        The description of the security group 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. The data object has the following properties:

      • Return — (Boolean)

        Returns true if the request succeeds; otherwise, returns an error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

waitFor(state, params = {}, callback) ⇒ AWS.Request

Waits for a given EC2 resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.

Examples:

Waiting for the instanceExists state

var params = {
  // ... input parameters ...
};
ec2.waitFor('instanceExists', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • state (String)

    the resource state to wait for. Available states for this service are listed in "Waiter Resource States" below.

  • params (map) (defaults to: {})

    a list of parameters for the given state. See each waiter resource state for required parameters.

Callback (callback):

  • function(err, data) { ... }

    Callback containing error and data information. See the respective resource state for the expected error or data information.

    If the waiter times out its requests, it will return a ResourceNotReady error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

withdrawByoipCidr(params = {}, callback) ⇒ AWS.Request

Stops advertising an address range that is provisioned as an address pool.

You can perform this operation at most once every 10 seconds, even if you specify different address ranges each time.

It can take a few minutes before traffic to the specified addresses stops routing to Amazon Web Services because of BGP propagation delays.

Service Reference:

Examples:

Calling the withdrawByoipCidr operation

var params = {
  Cidr: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.withdrawByoipCidr(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: {})
    • Cidr — (String)

      The address range, in CIDR notation.

    • 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:

      • ByoipCidr — (map)

        Information about the address pool.

        • Cidr — (String)

          The address range, in CIDR notation.

        • Description — (String)

          The description of the address range.

        • StatusMessage — (String)

          Upon success, contains the ID of the address pool. Otherwise, contains an error message.

        • State — (String)

          The state of the address pool.

          Possible values include:
          • "advertised"
          • "deprovisioned"
          • "failed-deprovision"
          • "failed-provision"
          • "pending-deprovision"
          • "pending-provision"
          • "provisioned"
          • "provisioned-not-publicly-advertisable"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource Details

ec2.waitFor('instanceExists', params = {}, [callback]) ⇒ AWS.Request

Waits for the instanceExists state by periodically calling the underlying EC2.describeInstances() operation every 5 seconds (at most 40 times).

Examples:

Waiting for the instanceExists state

var params = {
  // ... input parameters ...
};
ec2.waitFor('instanceExists', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The filters.

      • affinity - The affinity setting for an instance running on a Dedicated Host (default | host).

      • architecture - The instance architecture (i386 | x86_64 | arm64).

      • 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 specified in the block device mapping (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.

      • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.

      • 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). The value xen is used for both Xen and Nitro hypervisors.

      • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z. You can use a wildcard (*), for example, 2021-09-29T*, which matches an entire day.

      • metadata-options.http-tokens - The metadata request authorization state (optional | required)

      • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64)

      • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled)

      • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled).

      • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.

      • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.

      • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.

      • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.

      • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.

      • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.

      • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.

      • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.

      • 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.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.availability-zone - The Availability Zone for the network interface.

      • network-interface.description - The description of the network interface.

      • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.

      • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.

      • network-interface.status - The status of the network interface (available) | in-use).

      • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.

      • 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.

      • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

      • owner-id - The Amazon Web Services account ID of the instance owner.

      • placement-group-name - The name of the placement group for the instance.

      • placement-partition-number - The partition in which the instance is located.

      • platform - The platform. To list only Windows instances, use windows.

      • private-dns-name - The private IPv4 DNS name of the instance.

      • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.

      • root-device-name - The device name of the root device volume (for example, /dev/sda1).

      • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.

      • 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.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • InstanceIds — (Array<String>)

      The instance IDs.

      Default: Describes all your instances.

    • 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.

    • 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.

    • NextToken — (String)

      The token to request 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:

      • Reservations — (Array<map>)

        Information about the reservations.

        • Groups — (Array<map>)

          [EC2-Classic only] The security groups.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • Instances — (Array<map>)

          The instances.

          • AmiLaunchIndex — (Integer)

            The AMI launch index, which can be used to find this instance in the launch group.

          • ImageId — (String)

            The ID of the AMI used to launch the instance.

          • InstanceId — (String)

            The ID of the instance.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • KernelId — (String)

            The kernel associated with this instance, if applicable.

          • KeyName — (String)

            The name of the key pair, if this instance was launched with an associated key pair.

          • LaunchTime — (Date)

            The time the instance was launched.

          • Monitoring — (map)

            The monitoring for the instance.

            • State — (String)

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

              Possible values include:
              • "disabled"
              • "disabling"
              • "enabled"
              • "pending"
          • Placement — (map)

            The location where the instance launched, if applicable.

            • AvailabilityZone — (String)

              The Availability Zone of the instance.

              If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

              This parameter is not supported by CreateFleet.

            • Affinity — (String)

              The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet.

            • GroupName — (String)

              The name of the placement group the instance is in.

            • PartitionNumber — (Integer)

              The number of the partition the instance is in. Valid only if the placement group strategy is set to partition.

              This parameter is not supported by CreateFleet.

            • HostId — (String)

              The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet.

            • 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.

              This parameter is not supported by CreateFleet.

              T3 instances that use the unlimited CPU credit option do not support host tenancy.

              Possible values include:
              • "default"
              • "dedicated"
              • "host"
            • SpreadDomain — (String)

              Reserved for future use.

              This parameter is not supported by CreateFleet.

            • HostResourceGroupArn — (String)

              The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

              This parameter is not supported by CreateFleet.

          • Platform — (String)

            The value is Windows for Windows instances; otherwise blank.

            Possible values include:
            • "Windows"
          • PrivateDnsName — (String)

            (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

            [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

          • PrivateIpAddress — (String)

            The private IPv4 address assigned to the instance.

          • 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"
          • PublicDnsName — (String)

            (IPv4 only) 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.

          • PublicIpAddress — (String)

            The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.

            A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

          • RamdiskId — (String)

            The RAM disk associated with this instance, if applicable.

          • State — (map)

            The current state of the instance.

            • Code — (Integer)

              The state of the instance as a 16-bit unsigned integer.

              The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

              The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

              The valid values for instance-state-code will all be in the range of the low byte and they are:

              • 0 : pending

              • 16 : running

              • 32 : shutting-down

              • 48 : terminated

              • 64 : stopping

              • 80 : stopped

              You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

            • Name — (String)

              The current state of the instance.

              Possible values include:
              • "pending"
              • "running"
              • "shutting-down"
              • "terminated"
              • "stopping"
              • "stopped"
          • StateTransitionReason — (String)

            The reason for the most recent state transition. This might be an empty string.

          • 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.

          • Architecture — (String)

            The architecture of the image.

            Possible values include:
            • "i386"
            • "x86_64"
            • "arm64"
            • "x86_64_mac"
          • BlockDeviceMappings — (Array<map>)

            Any block device mapping entries for the instance.

            • DeviceName — (String)

              The device name (for example, /dev/sdh or xvdh).

            • Ebs — (map)

              Parameters used to automatically set up EBS volumes when the instance is launched.

              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • DeleteOnTermination — (Boolean)

                Indicates whether the volume is deleted on instance termination.

              • Status — (String)

                The attachment state.

                Possible values include:
                • "attaching"
                • "attached"
                • "detaching"
                • "detached"
              • VolumeId — (String)

                The ID of the EBS volume.

          • ClientToken — (String)

            The idempotency token you provided when you launched the instance, if applicable.

          • EbsOptimized — (Boolean)

            Indicates whether the instance is optimized for Amazon 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.

          • EnaSupport — (Boolean)

            Specifies whether enhanced networking with ENA is enabled.

          • Hypervisor — (String)

            The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

            Possible values include:
            • "ovm"
            • "xen"
          • 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.

          • InstanceLifecycle — (String)

            Indicates whether this is a Spot Instance or a Scheduled Instance.

            Possible values include:
            • "spot"
            • "scheduled"
          • ElasticGpuAssociations — (Array<map>)

            The Elastic GPU associated with the instance.

            • ElasticGpuId — (String)

              The ID of the Elastic Graphics accelerator.

            • ElasticGpuAssociationId — (String)

              The ID of the association.

            • ElasticGpuAssociationState — (String)

              The state of the association between the instance and the Elastic Graphics accelerator.

            • ElasticGpuAssociationTime — (String)

              The time the Elastic Graphics accelerator was associated with the instance.

          • ElasticInferenceAcceleratorAssociations — (Array<map>)

            The elastic inference accelerator associated with the instance.

            • ElasticInferenceAcceleratorArn — (String)

              The Amazon Resource Name (ARN) of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationId — (String)

              The ID of the association.

            • ElasticInferenceAcceleratorAssociationState — (String)

              The state of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationTime — (Date)

              The time at which the elastic inference accelerator is associated with an instance.

          • NetworkInterfaces — (Array<map>)

            [EC2-VPC] The network interfaces for the instance.

            • Association — (map)

              The association information for an Elastic IPv4 associated with the network interface.

              • CarrierIp — (String)

                The carrier IP address associated with the network interface.

              • CustomerOwnedIp — (String)

                The customer-owned IP address associated with the network interface.

              • IpOwnerId — (String)

                The ID of the owner of the Elastic IP address.

              • PublicDnsName — (String)

                The public DNS name.

              • PublicIp — (String)

                The public IP address or Elastic IP address bound to the network interface.

            • Attachment — (map)

              The network interface attachment.

              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • AttachmentId — (String)

                The ID of the network interface attachment.

              • DeleteOnTermination — (Boolean)

                Indicates whether the network interface is deleted when the instance is terminated.

              • 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"
              • NetworkCardIndex — (Integer)

                The index of the network card.

            • Description — (String)

              The description.

            • Groups — (Array<map>)

              One or more security groups.

              • GroupName — (String)

                The name of the security group.

              • GroupId — (String)

                The ID of the security group.

            • Ipv6Addresses — (Array<map>)

              One or more IPv6 addresses associated with the network interface.

              • Ipv6Address — (String)

                The IPv6 address.

            • MacAddress — (String)

              The MAC address.

            • NetworkInterfaceId — (String)

              The ID of the network interface.

            • OwnerId — (String)

              The ID of the Amazon Web Services account that created the network interface.

            • PrivateDnsName — (String)

              The private DNS name.

            • PrivateIpAddress — (String)

              The IPv4 address of the network interface within the subnet.

            • PrivateIpAddresses — (Array<map>)

              One or more private IPv4 addresses associated with the network interface.

              • Association — (map)

                The association information for an Elastic IP address for the network interface.

                • CarrierIp — (String)

                  The carrier IP address associated with the network interface.

                • CustomerOwnedIp — (String)

                  The customer-owned IP address associated with the network interface.

                • IpOwnerId — (String)

                  The ID of the owner of the Elastic IP address.

                • PublicDnsName — (String)

                  The public DNS name.

                • PublicIp — (String)

                  The public IP address or Elastic IP address bound to the network interface.

              • Primary — (Boolean)

                Indicates whether this IPv4 address is the primary private IP address of the network interface.

              • PrivateDnsName — (String)

                The private IPv4 DNS name.

              • PrivateIpAddress — (String)

                The private IPv4 address of the network interface.

            • SourceDestCheck — (Boolean)

              Indicates whether source/destination checking is enabled.

            • Status — (String)

              The status of the network interface.

              Possible values include:
              • "available"
              • "associated"
              • "attaching"
              • "in-use"
              • "detaching"
            • SubnetId — (String)

              The ID of the subnet.

            • VpcId — (String)

              The ID of the VPC.

            • InterfaceType — (String)

              Describes the type of network interface.

              Valid values: interface | efa | trunk

            • Ipv4Prefixes — (Array<map>)

              The IPv4 delegated prefixes that are assigned to the network interface.

              • Ipv4Prefix — (String)

                One or more IPv4 prefixes assigned to the network interface.

            • Ipv6Prefixes — (Array<map>)

              The IPv6 delegated prefixes that are assigned to the network interface.

              • Ipv6Prefix — (String)

                One or more IPv6 prefixes assigned to the network interface.

          • OutpostArn — (String)

            The Amazon Resource Name (ARN) of the Outpost.

          • RootDeviceName — (String)

            The device name of the root device volume (for example, /dev/sda1).

          • 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"
          • SecurityGroups — (Array<map>)

            The security groups for the instance.

            • GroupName — (String)

              The name of the security group.

            • GroupId — (String)

              The ID of the security group.

          • SourceDestCheck — (Boolean)

            Indicates whether source/destination checking is enabled.

          • SpotInstanceRequestId — (String)

            If the request is a Spot Instance request, the ID of the request.

          • SriovNetSupport — (String)

            Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

          • 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.InsufficientInstanceCapacity: There was insufficient capacity available to satisfy the launch request.

              • Server.InternalError: An internal error caused the instance to terminate during launch.

              • Server.ScheduledStop: The instance was stopped due to a scheduled retirement.

              • Server.SpotInstanceShutdown: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

              • Server.SpotInstanceTermination: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

              • Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.

              • Client.InstanceTerminated: The instance was terminated or rebooted during AMI creation.

              • Client.InternalError: A client error caused the instance to terminate during launch.

              • Client.InvalidSnapshot.NotFound: The specified snapshot was not found.

              • Client.UserInitiatedHibernate: Hibernation was initiated on 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 account limits.

          • 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.

          • VirtualizationType — (String)

            The virtualization type of the instance.

            Possible values include:
            • "hvm"
            • "paravirtual"
          • CpuOptions — (map)

            The CPU options for the instance.

            • CoreCount — (Integer)

              The number of CPU cores for the instance.

            • ThreadsPerCore — (Integer)

              The number of threads per CPU core.

          • CapacityReservationId — (String)

            The ID of the Capacity Reservation.

          • CapacityReservationSpecification — (map)

            Information about the Capacity Reservation targeting option.

            • CapacityReservationPreference — (String)

              Describes the instance's Capacity Reservation preferences. Possible preferences include:

              • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

              • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

              Possible values include:
              • "open"
              • "none"
            • CapacityReservationTarget — (map)

              Information about the targeted Capacity Reservation or Capacity Reservation group.

              • CapacityReservationId — (String)

                The ID of the targeted Capacity Reservation.

              • CapacityReservationResourceGroupArn — (String)

                The ARN of the targeted Capacity Reservation group.

          • HibernationOptions — (map)

            Indicates whether the instance is enabled for hibernation.

            • Configured — (Boolean)

              If this parameter is set to true, your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

          • Licenses — (Array<map>)

            The license configurations for the instance.

            • LicenseConfigurationArn — (String)

              The Amazon Resource Name (ARN) of the license configuration.

          • MetadataOptions — (map)

            The metadata options for the instance.

            • State — (String)

              The state of the metadata option changes.

              pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

              applied - The metadata options have been successfully applied on the instance.

              Possible values include:
              • "pending"
              • "applied"
            • HttpTokens — (String)

              The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

              If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

              If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

              Possible values include:
              • "optional"
              • "required"
            • HttpPutResponseHopLimit — (Integer)

              The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

              Default: 1

              Possible values: Integers from 1 to 64

            • HttpEndpoint — (String)

              Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

              Possible values include:
              • "disabled"
              • "enabled"
            • HttpProtocolIpv6 — (String)

              Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

              Possible values include:
              • "disabled"
              • "enabled"
          • EnclaveOptions — (map)

            Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

            • Enabled — (Boolean)

              If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

          • BootMode — (String)

            The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide.

            Possible values include:
            • "legacy-bios"
            • "uefi"
          • PlatformDetails — (String)

            The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

          • UsageOperation — (String)

            The usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

          • UsageOperationUpdateTime — (Date)

            The time that the usage operation was last updated.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the reservation.

        • RequesterId — (String)

          The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).

        • ReservationId — (String)

          The ID of the reservation.

      • 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.

See Also:

ec2.waitFor('bundleTaskComplete', params = {}, [callback]) ⇒ AWS.Request

Waits for the bundleTaskComplete state by periodically calling the underlying EC2.describeBundleTasks() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the bundleTaskComplete state

var params = {
  // ... input parameters ...
};
ec2.waitFor('bundleTaskComplete', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • BundleIds — (Array<String>)

      The bundle task IDs.

      Default: Describes all your bundle tasks.

    • Filters — (Array<map>)

      The 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>)

        The filter values. Filter values are case-sensitive.

    • 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:

      • BundleTasks — (Array<map>)

        Information about the bundle tasks.

        • BundleId — (String)

          The ID of the bundle task.

        • BundleTaskError — (map)

          If the task fails, a description of the error.

          • Code — (String)

            The error code.

          • Message — (String)

            The error message.

        • InstanceId — (String)

          The ID of the instance associated with this bundle task.

        • Progress — (String)

          The level of task completion, as a percent (for example, 20%).

        • StartTime — (Date)

          The time this task started.

        • State — (String)

          The state of the task.

          Possible values include:
          • "pending"
          • "waiting-for-shutdown"
          • "bundling"
          • "storing"
          • "cancelling"
          • "complete"
          • "failed"
        • Storage — (map)

          The Amazon S3 storage locations.

          • S3 — (map)

            An Amazon S3 storage location.

            • 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 Amazon Web Services Access Keys.

            • 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.

            • 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.

        • UpdateTime — (Date)

          The time of the most recent update for the task.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

ec2.waitFor('conversionTaskCancelled', params = {}, [callback]) ⇒ AWS.Request

Waits for the conversionTaskCancelled state by periodically calling the underlying EC2.describeConversionTasks() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the conversionTaskCancelled state

var params = {
  // ... input parameters ...
};
ec2.waitFor('conversionTaskCancelled', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • ConversionTaskIds — (Array<String>)

      The conversion task IDs.

    • 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:

      • ConversionTasks — (Array<map>)

        Information about the conversion tasks.

        • ConversionTaskId — (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.

          • Description — (String)

            A description of the task.

          • InstanceId — (String)

            The ID of the instance.

          • Platform — (String)

            The instance operating system.

            Possible values include:
            • "Windows"
          • Volumes — (Array<map>)

            The volumes.

            • AvailabilityZone — (String)

              The Availability Zone where the resulting instance will reside.

            • BytesConverted — (Integer)

              The number of bytes converted so far.

            • Description — (String)

              A description of the task.

            • Image — (map)

              The image.

              • Checksum — (String)

                The checksum computed for the disk image.

              • Format — (String)

                The disk image format.

                Possible values include:
                • "VMDK"
                • "RAW"
                • "VHD"
              • ImportManifestUrl — (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.

              • Size — (Integer)

                The size of the disk image, in GiB.

            • Status — (String)

              The status of the import of this particular disk image.

            • StatusMessage — (String)

              The status information or errors related to the disk image.

            • Volume — (map)

              The volume.

              • Id — (String)

                The volume identifier.

              • Size — (Integer)

                The size of the volume, in GiB.

        • ImportVolume — (map)

          If the task is for importing a volume, this contains information about the import volume task.

          • AvailabilityZone — (String)

            The Availability Zone where the resulting volume will reside.

          • BytesConverted — (Integer)

            The number of bytes converted so far.

          • Description — (String)

            The description you provided when starting the import volume task.

          • Image — (map)

            The image.

            • Checksum — (String)

              The checksum computed for the disk image.

            • Format — (String)

              The disk image format.

              Possible values include:
              • "VMDK"
              • "RAW"
              • "VHD"
            • ImportManifestUrl — (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.

            • Size — (Integer)

              The size of the disk image, in GiB.

          • Volume — (map)

            The volume.

            • Id — (String)

              The volume identifier.

            • Size — (Integer)

              The size of the volume, in GiB.

        • State — (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.

See Also:

ec2.waitFor('conversionTaskCompleted', params = {}, [callback]) ⇒ AWS.Request

Waits for the conversionTaskCompleted state by periodically calling the underlying EC2.describeConversionTasks() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the conversionTaskCompleted state

var params = {
  // ... input parameters ...
};
ec2.waitFor('conversionTaskCompleted', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • ConversionTaskIds — (Array<String>)

      The conversion task IDs.

    • 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:

      • ConversionTasks — (Array<map>)

        Information about the conversion tasks.

        • ConversionTaskId — (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.

          • Description — (String)

            A description of the task.

          • InstanceId — (String)

            The ID of the instance.

          • Platform — (String)

            The instance operating system.

            Possible values include:
            • "Windows"
          • Volumes — (Array<map>)

            The volumes.

            • AvailabilityZone — (String)

              The Availability Zone where the resulting instance will reside.

            • BytesConverted — (Integer)

              The number of bytes converted so far.

            • Description — (String)

              A description of the task.

            • Image — (map)

              The image.

              • Checksum — (String)

                The checksum computed for the disk image.

              • Format — (String)

                The disk image format.

                Possible values include:
                • "VMDK"
                • "RAW"
                • "VHD"
              • ImportManifestUrl — (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.

              • Size — (Integer)

                The size of the disk image, in GiB.

            • Status — (String)

              The status of the import of this particular disk image.

            • StatusMessage — (String)

              The status information or errors related to the disk image.

            • Volume — (map)

              The volume.

              • Id — (String)

                The volume identifier.

              • Size — (Integer)

                The size of the volume, in GiB.

        • ImportVolume — (map)

          If the task is for importing a volume, this contains information about the import volume task.

          • AvailabilityZone — (String)

            The Availability Zone where the resulting volume will reside.

          • BytesConverted — (Integer)

            The number of bytes converted so far.

          • Description — (String)

            The description you provided when starting the import volume task.

          • Image — (map)

            The image.

            • Checksum — (String)

              The checksum computed for the disk image.

            • Format — (String)

              The disk image format.

              Possible values include:
              • "VMDK"
              • "RAW"
              • "VHD"
            • ImportManifestUrl — (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.

            • Size — (Integer)

              The size of the disk image, in GiB.

          • Volume — (map)

            The volume.

            • Id — (String)

              The volume identifier.

            • Size — (Integer)

              The size of the volume, in GiB.

        • State — (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.

See Also:

ec2.waitFor('conversionTaskDeleted', params = {}, [callback]) ⇒ AWS.Request

Waits for the conversionTaskDeleted state by periodically calling the underlying EC2.describeConversionTasks() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the conversionTaskDeleted state

var params = {
  // ... input parameters ...
};
ec2.waitFor('conversionTaskDeleted', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • ConversionTaskIds — (Array<String>)

      The conversion task IDs.

    • 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:

      • ConversionTasks — (Array<map>)

        Information about the conversion tasks.

        • ConversionTaskId — (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.

          • Description — (String)

            A description of the task.

          • InstanceId — (String)

            The ID of the instance.

          • Platform — (String)

            The instance operating system.

            Possible values include:
            • "Windows"
          • Volumes — (Array<map>)

            The volumes.

            • AvailabilityZone — (String)

              The Availability Zone where the resulting instance will reside.

            • BytesConverted — (Integer)

              The number of bytes converted so far.

            • Description — (String)

              A description of the task.

            • Image — (map)

              The image.

              • Checksum — (String)

                The checksum computed for the disk image.

              • Format — (String)

                The disk image format.

                Possible values include:
                • "VMDK"
                • "RAW"
                • "VHD"
              • ImportManifestUrl — (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.

              • Size — (Integer)

                The size of the disk image, in GiB.

            • Status — (String)

              The status of the import of this particular disk image.

            • StatusMessage — (String)

              The status information or errors related to the disk image.

            • Volume — (map)

              The volume.

              • Id — (String)

                The volume identifier.

              • Size — (Integer)

                The size of the volume, in GiB.

        • ImportVolume — (map)

          If the task is for importing a volume, this contains information about the import volume task.

          • AvailabilityZone — (String)

            The Availability Zone where the resulting volume will reside.

          • BytesConverted — (Integer)

            The number of bytes converted so far.

          • Description — (String)

            The description you provided when starting the import volume task.

          • Image — (map)

            The image.

            • Checksum — (String)

              The checksum computed for the disk image.

            • Format — (String)

              The disk image format.

              Possible values include:
              • "VMDK"
              • "RAW"
              • "VHD"
            • ImportManifestUrl — (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.

            • Size — (Integer)

              The size of the disk image, in GiB.

          • Volume — (map)

            The volume.

            • Id — (String)

              The volume identifier.

            • Size — (Integer)

              The size of the volume, in GiB.

        • State — (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.

See Also:

ec2.waitFor('customerGatewayAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the customerGatewayAvailable state by periodically calling the underlying EC2.describeCustomerGateways() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the customerGatewayAvailable state

var params = {
  // ... input parameters ...
};
ec2.waitFor('customerGatewayAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • 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:

      • CustomerGateways — (Array<map>)

        Information about one or more customer gateways.

        • BgpAsn — (String)

          The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).

        • CustomerGatewayId — (String)

          The ID of the customer gateway.

        • IpAddress — (String)

          The Internet-routable IP address of the customer gateway's outside interface.

        • CertificateArn — (String)

          The Amazon Resource Name (ARN) for the customer gateway certificate.

        • 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).

        • DeviceName — (String)

          The name of customer gateway device.

        • 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.

See Also:

ec2.waitFor('exportTaskCancelled', params = {}, [callback]) ⇒ AWS.Request

Waits for the exportTaskCancelled state by periodically calling the underlying EC2.describeExportTasks() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the exportTaskCancelled state

var params = {
  // ... input parameters ...
};
ec2.waitFor('exportTaskCancelled', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • ExportTaskIds — (Array<String>)

      The export task IDs.

    • Filters — (Array<map>)

      the filters for the export tasks.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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:

      • ExportTasks — (Array<map>)

        Information about the export tasks.

        • Description — (String)

          A description of the resource being exported.

        • ExportTaskId — (String)

          The ID of the export task.

        • ExportToS3Task — (map)

          Information about the export task.

          • 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"
          • DiskImageFormat — (String)

            The format for the exported image.

            Possible values include:
            • "VMDK"
            • "RAW"
            • "VHD"
          • S3Bucket — (String)

            The Amazon S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the Amazon Web Services account vm-import-export@amazon.com.

          • S3Key — (String)

            The encryption key for your S3 bucket.

        • 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"
        • 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.

        • Tags — (Array<map>)

          The tags for the export 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.

See Also:

ec2.waitFor('exportTaskCompleted', params = {}, [callback]) ⇒ AWS.Request

Waits for the exportTaskCompleted state by periodically calling the underlying EC2.describeExportTasks() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the exportTaskCompleted state

var params = {
  // ... input parameters ...
};
ec2.waitFor('exportTaskCompleted', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • ExportTaskIds — (Array<String>)

      The export task IDs.

    • Filters — (Array<map>)

      the filters for the export tasks.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The 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:

      • ExportTasks — (Array<map>)

        Information about the export tasks.

        • Description — (String)

          A description of the resource being exported.

        • ExportTaskId — (String)

          The ID of the export task.

        • ExportToS3Task — (map)

          Information about the export task.

          • 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"
          • DiskImageFormat — (String)

            The format for the exported image.

            Possible values include:
            • "VMDK"
            • "RAW"
            • "VHD"
          • S3Bucket — (String)

            The Amazon S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the Amazon Web Services account vm-import-export@amazon.com.

          • S3Key — (String)

            The encryption key for your S3 bucket.

        • 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"
        • 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.

        • Tags — (Array<map>)

          The tags for the export 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.

See Also:

ec2.waitFor('imageExists', params = {}, [callback]) ⇒ AWS.Request

Waits for the imageExists state by periodically calling the underlying EC2.describeImages() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the imageExists state

var params = {
  // ... input parameters ...
};
ec2.waitFor('imageExists', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • ExecutableUsers — (Array<String>)

      Scopes the images by users with explicit launch permissions. Specify an Amazon Web Services account ID, self (the sender of the request), or all (public AMIs).

      • If you specify an Amazon Web Services account ID that is not your own, only AMIs shared with that specific Amazon Web Services account ID are returned. However, AMIs that are shared with the account’s organization or organizational unit (OU) are not returned.

      • If you specify self or your own Amazon Web Services account ID, AMIs shared with your account are returned. In addition, AMIs that are shared with the organization or OU of which you are member are also returned.

      • If you specify all, all public AMIs are returned.

    • Filters — (Array<map>)

      The filters.

      • architecture - The image architecture (i386 | x86_64 | arm64).

      • 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 specified in the block device mapping (for example, /dev/sdh or xvdh).

      • block-device-mapping.snapshot-id - The ID of the snapshot used for the Amazon EBS volume.

      • block-device-mapping.volume-size - The volume size of the Amazon EBS volume, in GiB.

      • block-device-mapping.volume-type - The volume type of the Amazon EBS volume (io1 | io2 | gp2 | gp3 | sc1 | st1 | standard).

      • block-device-mapping.encrypted - A Boolean that indicates whether the Amazon EBS volume is encrypted.

      • description - The description of the image (provided during image creation).

      • ena-support - A Boolean that indicates whether enhanced networking with ENA is enabled.

      • 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 - The owner alias (amazon | aws-marketplace). The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be set using the IAM console. We recommend that you use the Owner request parameter instead of this filter.

      • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the Owner request parameter instead of this filter.

      • 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 (marketplace).

      • ramdisk-id - The RAM disk ID.

      • root-device-name - The device 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.

      • sriov-net-support - A value of simple indicates that enhanced networking with the Intel 82599 VF interface is enabled.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • virtualization-type - The virtualization type (paravirtual | hvm).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • ImageIds — (Array<String>)

      The image IDs.

      Default: Describes all images available to you.

    • Owners — (Array<String>)

      Scopes the results to images with the specified owners. You can specify a combination of Amazon Web Services account IDs, self, amazon, and aws-marketplace. If you omit this parameter, the results include all images for which you have launch permissions, regardless of ownership.

    • IncludeDeprecated — (Boolean)

      If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.

      Note: If you are the AMI owner, all deprecated AMIs appear in the response regardless of the value (true or false) that you set for this parameter.
    • 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:

      • Images — (Array<map>)

        Information about the images.

        • Architecture — (String)

          The architecture of the image.

          Possible values include:
          • "i386"
          • "x86_64"
          • "arm64"
          • "x86_64_mac"
        • CreationDate — (String)

          The date and time the image was created.

        • ImageId — (String)

          The ID of the AMI.

        • ImageLocation — (String)

          The location of the AMI.

        • ImageType — (String)

          The type of image.

          Possible values include:
          • "machine"
          • "kernel"
          • "ramdisk"
        • 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.

        • KernelId — (String)

          The kernel associated with the image, if any. Only applicable for machine images.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the image.

        • Platform — (String)

          This value is set to windows for Windows AMIs; otherwise, it is blank.

          Possible values include:
          • "Windows"
        • PlatformDetails — (String)

          The platform details associated with the billing code of the AMI. For more information, see Understanding AMI billing in the Amazon Elastic Compute Cloud User Guide.

        • UsageOperation — (String)

          The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price List API. You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, or in the responses that are returned by the DescribeImages command in the Amazon EC2 API, or the describe-images command in the CLI.

        • 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"
        • RamdiskId — (String)

          The RAM disk associated with the image, if any. Only applicable for machine images.

        • 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"
        • BlockDeviceMappings — (Array<map>)

          Any block device mapping entries.

          • DeviceName — (String)

            The device name (for example, /dev/sdh or xvdh).

          • 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.

            NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

            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.

          • Ebs — (map)

            Parameters used to automatically set up EBS volumes when the instance is launched.

            • DeleteOnTermination — (Boolean)

              Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

              The following are the supported values for each volume type:

              • gp3: 3,000-16,000 IOPS

              • io1: 100-64,000 IOPS

              • io2: 100-64,000 IOPS

              For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

              This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

            • SnapshotId — (String)

              The ID of the snapshot.

            • VolumeSize — (Integer)

              The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

              The following are the supported volumes sizes for each volume type:

              • gp2 and gp3:1-16,384

              • io1 and io2: 4-16,384

              • st1 and sc1: 125-16,384

              • standard: 1-1,024

            • VolumeType — (String)

              The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

              Possible values include:
              • "standard"
              • "io1"
              • "io2"
              • "gp2"
              • "sc1"
              • "st1"
              • "gp3"
            • KmsKeyId — (String)

              Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

              This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

            • Throughput — (Integer)

              The throughput that the volume supports, in MiB/s.

              This parameter is valid only for gp3 volumes.

              Valid Range: Minimum value of 125. Maximum value of 1000.

            • OutpostArn — (String)

              The ARN of the Outpost on which the snapshot is stored.

            • Encrypted — (Boolean)

              Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

              In no case can you remove encryption from an encrypted volume.

              Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

              This parameter is not returned by .

          • NoDevice — (String)

            To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

        • Description — (String)

          The description of the AMI that was provided during image creation.

        • EnaSupport — (Boolean)

          Specifies whether enhanced networking with ENA is enabled.

        • Hypervisor — (String)

          The hypervisor type of the image.

          Possible values include:
          • "ovm"
          • "xen"
        • ImageOwnerAlias — (String)

          The Amazon Web Services account alias (for example, amazon, self) or the Amazon Web Services account ID of the AMI owner.

        • Name — (String)

          The name of the AMI that was provided during image creation.

        • RootDeviceName — (String)

          The device name of the root device volume (for example, /dev/sda1).

        • RootDeviceType — (String)

          The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.

          Possible values include:
          • "ebs"
          • "instance-store"
        • SriovNetSupport — (String)

          Specifies whether enhanced networking with the Intel 82599 Virtual Function interface 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.InsufficientInstanceCapacity: There was insufficient capacity available to satisfy the launch request.

            • Server.InternalError: An internal error caused the instance to terminate during launch.

            • Server.ScheduledStop: The instance was stopped due to a scheduled retirement.

            • Server.SpotInstanceShutdown: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

            • Server.SpotInstanceTermination: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

            • Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.

            • Client.InstanceTerminated: The instance was terminated or rebooted during AMI creation.

            • Client.InternalError: A client error caused the instance to terminate during launch.

            • Client.InvalidSnapshot.NotFound: The specified snapshot was not found.

            • Client.UserInitiatedHibernate: Hibernation was initiated on 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 account limits.

        • 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.

        • VirtualizationType — (String)

          The type of virtualization of the AMI.

          Possible values include:
          • "hvm"
          • "paravirtual"
        • BootMode — (String)

          The boot mode of the image. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.

          Possible values include:
          • "legacy-bios"
          • "uefi"
        • DeprecationTime — (String)

          The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

ec2.waitFor('imageAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the imageAvailable state by periodically calling the underlying EC2.describeImages() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the imageAvailable state

var params = {
  // ... input parameters ...
};
ec2.waitFor('imageAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • ExecutableUsers — (Array<String>)

      Scopes the images by users with explicit launch permissions. Specify an Amazon Web Services account ID, self (the sender of the request), or all (public AMIs).

      • If you specify an Amazon Web Services account ID that is not your own, only AMIs shared with that specific Amazon Web Services account ID are returned. However, AMIs that are shared with the account’s organization or organizational unit (OU) are not returned.

      • If you specify self or your own Amazon Web Services account ID, AMIs shared with your account are returned. In addition, AMIs that are shared with the organization or OU of which you are member are also returned.

      • If you specify all, all public AMIs are returned.

    • Filters — (Array<map>)

      The filters.

      • architecture - The image architecture (i386 | x86_64 | arm64).

      • 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 specified in the block device mapping (for example, /dev/sdh or xvdh).

      • block-device-mapping.snapshot-id - The ID of the snapshot used for the Amazon EBS volume.

      • block-device-mapping.volume-size - The volume size of the Amazon EBS volume, in GiB.

      • block-device-mapping.volume-type - The volume type of the Amazon EBS volume (io1 | io2 | gp2 | gp3 | sc1 | st1 | standard).

      • block-device-mapping.encrypted - A Boolean that indicates whether the Amazon EBS volume is encrypted.

      • description - The description of the image (provided during image creation).

      • ena-support - A Boolean that indicates whether enhanced networking with ENA is enabled.

      • 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 - The owner alias (amazon | aws-marketplace). The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be set using the IAM console. We recommend that you use the Owner request parameter instead of this filter.

      • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the Owner request parameter instead of this filter.

      • 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 (marketplace).

      • ramdisk-id - The RAM disk ID.

      • root-device-name - The device 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.

      • sriov-net-support - A value of simple indicates that enhanced networking with the Intel 82599 VF interface is enabled.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • virtualization-type - The virtualization type (paravirtual | hvm).

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • ImageIds — (Array<String>)

      The image IDs.

      Default: Describes all images available to you.

    • Owners — (Array<String>)

      Scopes the results to images with the specified owners. You can specify a combination of Amazon Web Services account IDs, self, amazon, and aws-marketplace. If you omit this parameter, the results include all images for which you have launch permissions, regardless of ownership.

    • IncludeDeprecated — (Boolean)

      If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.

      Note: If you are the AMI owner, all deprecated AMIs appear in the response regardless of the value (true or false) that you set for this parameter.
    • 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:

      • Images — (Array<map>)

        Information about the images.

        • Architecture — (String)

          The architecture of the image.

          Possible values include:
          • "i386"
          • "x86_64"
          • "arm64"
          • "x86_64_mac"
        • CreationDate — (String)

          The date and time the image was created.

        • ImageId — (String)

          The ID of the AMI.

        • ImageLocation — (String)

          The location of the AMI.

        • ImageType — (String)

          The type of image.

          Possible values include:
          • "machine"
          • "kernel"
          • "ramdisk"
        • 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.

        • KernelId — (String)

          The kernel associated with the image, if any. Only applicable for machine images.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the image.

        • Platform — (String)

          This value is set to windows for Windows AMIs; otherwise, it is blank.

          Possible values include:
          • "Windows"
        • PlatformDetails — (String)

          The platform details associated with the billing code of the AMI. For more information, see Understanding AMI billing in the Amazon Elastic Compute Cloud User Guide.

        • UsageOperation — (String)

          The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price List API. You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, or in the responses that are returned by the DescribeImages command in the Amazon EC2 API, or the describe-images command in the CLI.

        • 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"
        • RamdiskId — (String)

          The RAM disk associated with the image, if any. Only applicable for machine images.

        • 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"
        • BlockDeviceMappings — (Array<map>)

          Any block device mapping entries.

          • DeviceName — (String)

            The device name (for example, /dev/sdh or xvdh).

          • 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.

            NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

            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.

          • Ebs — (map)

            Parameters used to automatically set up EBS volumes when the instance is launched.

            • DeleteOnTermination — (Boolean)

              Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

              The following are the supported values for each volume type:

              • gp3: 3,000-16,000 IOPS

              • io1: 100-64,000 IOPS

              • io2: 100-64,000 IOPS

              For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

              This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

            • SnapshotId — (String)

              The ID of the snapshot.

            • VolumeSize — (Integer)

              The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

              The following are the supported volumes sizes for each volume type:

              • gp2 and gp3:1-16,384

              • io1 and io2: 4-16,384

              • st1 and sc1: 125-16,384

              • standard: 1-1,024

            • VolumeType — (String)

              The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

              Possible values include:
              • "standard"
              • "io1"
              • "io2"
              • "gp2"
              • "sc1"
              • "st1"
              • "gp3"
            • KmsKeyId — (String)

              Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

              This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

            • Throughput — (Integer)

              The throughput that the volume supports, in MiB/s.

              This parameter is valid only for gp3 volumes.

              Valid Range: Minimum value of 125. Maximum value of 1000.

            • OutpostArn — (String)

              The ARN of the Outpost on which the snapshot is stored.

            • Encrypted — (Boolean)

              Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

              In no case can you remove encryption from an encrypted volume.

              Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

              This parameter is not returned by .

          • NoDevice — (String)

            To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

        • Description — (String)

          The description of the AMI that was provided during image creation.

        • EnaSupport — (Boolean)

          Specifies whether enhanced networking with ENA is enabled.

        • Hypervisor — (String)

          The hypervisor type of the image.

          Possible values include:
          • "ovm"
          • "xen"
        • ImageOwnerAlias — (String)

          The Amazon Web Services account alias (for example, amazon, self) or the Amazon Web Services account ID of the AMI owner.

        • Name — (String)

          The name of the AMI that was provided during image creation.

        • RootDeviceName — (String)

          The device name of the root device volume (for example, /dev/sda1).

        • RootDeviceType — (String)

          The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.

          Possible values include:
          • "ebs"
          • "instance-store"
        • SriovNetSupport — (String)

          Specifies whether enhanced networking with the Intel 82599 Virtual Function interface 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.InsufficientInstanceCapacity: There was insufficient capacity available to satisfy the launch request.

            • Server.InternalError: An internal error caused the instance to terminate during launch.

            • Server.ScheduledStop: The instance was stopped due to a scheduled retirement.

            • Server.SpotInstanceShutdown: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

            • Server.SpotInstanceTermination: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

            • Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.

            • Client.InstanceTerminated: The instance was terminated or rebooted during AMI creation.

            • Client.InternalError: A client error caused the instance to terminate during launch.

            • Client.InvalidSnapshot.NotFound: The specified snapshot was not found.

            • Client.UserInitiatedHibernate: Hibernation was initiated on 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 account limits.

        • 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.

        • VirtualizationType — (String)

          The type of virtualization of the AMI.

          Possible values include:
          • "hvm"
          • "paravirtual"
        • BootMode — (String)

          The boot mode of the image. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.

          Possible values include:
          • "legacy-bios"
          • "uefi"
        • DeprecationTime — (String)

          The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

ec2.waitFor('instanceRunning', params = {}, [callback]) ⇒ AWS.Request

Waits for the instanceRunning state by periodically calling the underlying EC2.describeInstances() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the instanceRunning state

var params = {
  // ... input parameters ...
};
ec2.waitFor('instanceRunning', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The filters.

      • affinity - The affinity setting for an instance running on a Dedicated Host (default | host).

      • architecture - The instance architecture (i386 | x86_64 | arm64).

      • 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 specified in the block device mapping (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.

      • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.

      • 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). The value xen is used for both Xen and Nitro hypervisors.

      • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z. You can use a wildcard (*), for example, 2021-09-29T*, which matches an entire day.

      • metadata-options.http-tokens - The metadata request authorization state (optional | required)

      • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64)

      • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled)

      • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled).

      • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.

      • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.

      • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.

      • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.

      • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.

      • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.

      • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.

      • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.

      • 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.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.availability-zone - The Availability Zone for the network interface.

      • network-interface.description - The description of the network interface.

      • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.

      • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.

      • network-interface.status - The status of the network interface (available) | in-use).

      • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.

      • 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.

      • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

      • owner-id - The Amazon Web Services account ID of the instance owner.

      • placement-group-name - The name of the placement group for the instance.

      • placement-partition-number - The partition in which the instance is located.

      • platform - The platform. To list only Windows instances, use windows.

      • private-dns-name - The private IPv4 DNS name of the instance.

      • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.

      • root-device-name - The device name of the root device volume (for example, /dev/sda1).

      • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.

      • 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.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • InstanceIds — (Array<String>)

      The instance IDs.

      Default: Describes all your instances.

    • 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.

    • 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.

    • NextToken — (String)

      The token to request 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:

      • Reservations — (Array<map>)

        Information about the reservations.

        • Groups — (Array<map>)

          [EC2-Classic only] The security groups.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • Instances — (Array<map>)

          The instances.

          • AmiLaunchIndex — (Integer)

            The AMI launch index, which can be used to find this instance in the launch group.

          • ImageId — (String)

            The ID of the AMI used to launch the instance.

          • InstanceId — (String)

            The ID of the instance.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • KernelId — (String)

            The kernel associated with this instance, if applicable.

          • KeyName — (String)

            The name of the key pair, if this instance was launched with an associated key pair.

          • LaunchTime — (Date)

            The time the instance was launched.

          • Monitoring — (map)

            The monitoring for the instance.

            • State — (String)

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

              Possible values include:
              • "disabled"
              • "disabling"
              • "enabled"
              • "pending"
          • Placement — (map)

            The location where the instance launched, if applicable.

            • AvailabilityZone — (String)

              The Availability Zone of the instance.

              If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

              This parameter is not supported by CreateFleet.

            • Affinity — (String)

              The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet.

            • GroupName — (String)

              The name of the placement group the instance is in.

            • PartitionNumber — (Integer)

              The number of the partition the instance is in. Valid only if the placement group strategy is set to partition.

              This parameter is not supported by CreateFleet.

            • HostId — (String)

              The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet.

            • 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.

              This parameter is not supported by CreateFleet.

              T3 instances that use the unlimited CPU credit option do not support host tenancy.

              Possible values include:
              • "default"
              • "dedicated"
              • "host"
            • SpreadDomain — (String)

              Reserved for future use.

              This parameter is not supported by CreateFleet.

            • HostResourceGroupArn — (String)

              The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

              This parameter is not supported by CreateFleet.

          • Platform — (String)

            The value is Windows for Windows instances; otherwise blank.

            Possible values include:
            • "Windows"
          • PrivateDnsName — (String)

            (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

            [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

          • PrivateIpAddress — (String)

            The private IPv4 address assigned to the instance.

          • 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"
          • PublicDnsName — (String)

            (IPv4 only) 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.

          • PublicIpAddress — (String)

            The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.

            A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

          • RamdiskId — (String)

            The RAM disk associated with this instance, if applicable.

          • State — (map)

            The current state of the instance.

            • Code — (Integer)

              The state of the instance as a 16-bit unsigned integer.

              The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

              The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

              The valid values for instance-state-code will all be in the range of the low byte and they are:

              • 0 : pending

              • 16 : running

              • 32 : shutting-down

              • 48 : terminated

              • 64 : stopping

              • 80 : stopped

              You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

            • Name — (String)

              The current state of the instance.

              Possible values include:
              • "pending"
              • "running"
              • "shutting-down"
              • "terminated"
              • "stopping"
              • "stopped"
          • StateTransitionReason — (String)

            The reason for the most recent state transition. This might be an empty string.

          • 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.

          • Architecture — (String)

            The architecture of the image.

            Possible values include:
            • "i386"
            • "x86_64"
            • "arm64"
            • "x86_64_mac"
          • BlockDeviceMappings — (Array<map>)

            Any block device mapping entries for the instance.

            • DeviceName — (String)

              The device name (for example, /dev/sdh or xvdh).

            • Ebs — (map)

              Parameters used to automatically set up EBS volumes when the instance is launched.

              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • DeleteOnTermination — (Boolean)

                Indicates whether the volume is deleted on instance termination.

              • Status — (String)

                The attachment state.

                Possible values include:
                • "attaching"
                • "attached"
                • "detaching"
                • "detached"
              • VolumeId — (String)

                The ID of the EBS volume.

          • ClientToken — (String)

            The idempotency token you provided when you launched the instance, if applicable.

          • EbsOptimized — (Boolean)

            Indicates whether the instance is optimized for Amazon 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.

          • EnaSupport — (Boolean)

            Specifies whether enhanced networking with ENA is enabled.

          • Hypervisor — (String)

            The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

            Possible values include:
            • "ovm"
            • "xen"
          • 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.

          • InstanceLifecycle — (String)

            Indicates whether this is a Spot Instance or a Scheduled Instance.

            Possible values include:
            • "spot"
            • "scheduled"
          • ElasticGpuAssociations — (Array<map>)

            The Elastic GPU associated with the instance.

            • ElasticGpuId — (String)

              The ID of the Elastic Graphics accelerator.

            • ElasticGpuAssociationId — (String)

              The ID of the association.

            • ElasticGpuAssociationState — (String)

              The state of the association between the instance and the Elastic Graphics accelerator.

            • ElasticGpuAssociationTime — (String)

              The time the Elastic Graphics accelerator was associated with the instance.

          • ElasticInferenceAcceleratorAssociations — (Array<map>)

            The elastic inference accelerator associated with the instance.

            • ElasticInferenceAcceleratorArn — (String)

              The Amazon Resource Name (ARN) of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationId — (String)

              The ID of the association.

            • ElasticInferenceAcceleratorAssociationState — (String)

              The state of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationTime — (Date)

              The time at which the elastic inference accelerator is associated with an instance.

          • NetworkInterfaces — (Array<map>)

            [EC2-VPC] The network interfaces for the instance.

            • Association — (map)

              The association information for an Elastic IPv4 associated with the network interface.

              • CarrierIp — (String)

                The carrier IP address associated with the network interface.

              • CustomerOwnedIp — (String)

                The customer-owned IP address associated with the network interface.

              • IpOwnerId — (String)

                The ID of the owner of the Elastic IP address.

              • PublicDnsName — (String)

                The public DNS name.

              • PublicIp — (String)

                The public IP address or Elastic IP address bound to the network interface.

            • Attachment — (map)

              The network interface attachment.

              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • AttachmentId — (String)

                The ID of the network interface attachment.

              • DeleteOnTermination — (Boolean)

                Indicates whether the network interface is deleted when the instance is terminated.

              • 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"
              • NetworkCardIndex — (Integer)

                The index of the network card.

            • Description — (String)

              The description.

            • Groups — (Array<map>)

              One or more security groups.

              • GroupName — (String)

                The name of the security group.

              • GroupId — (String)

                The ID of the security group.

            • Ipv6Addresses — (Array<map>)

              One or more IPv6 addresses associated with the network interface.

              • Ipv6Address — (String)

                The IPv6 address.

            • MacAddress — (String)

              The MAC address.

            • NetworkInterfaceId — (String)

              The ID of the network interface.

            • OwnerId — (String)

              The ID of the Amazon Web Services account that created the network interface.

            • PrivateDnsName — (String)

              The private DNS name.

            • PrivateIpAddress — (String)

              The IPv4 address of the network interface within the subnet.

            • PrivateIpAddresses — (Array<map>)

              One or more private IPv4 addresses associated with the network interface.

              • Association — (map)

                The association information for an Elastic IP address for the network interface.

                • CarrierIp — (String)

                  The carrier IP address associated with the network interface.

                • CustomerOwnedIp — (String)

                  The customer-owned IP address associated with the network interface.

                • IpOwnerId — (String)

                  The ID of the owner of the Elastic IP address.

                • PublicDnsName — (String)

                  The public DNS name.

                • PublicIp — (String)

                  The public IP address or Elastic IP address bound to the network interface.

              • Primary — (Boolean)

                Indicates whether this IPv4 address is the primary private IP address of the network interface.

              • PrivateDnsName — (String)

                The private IPv4 DNS name.

              • PrivateIpAddress — (String)

                The private IPv4 address of the network interface.

            • SourceDestCheck — (Boolean)

              Indicates whether source/destination checking is enabled.

            • Status — (String)

              The status of the network interface.

              Possible values include:
              • "available"
              • "associated"
              • "attaching"
              • "in-use"
              • "detaching"
            • SubnetId — (String)

              The ID of the subnet.

            • VpcId — (String)

              The ID of the VPC.

            • InterfaceType — (String)

              Describes the type of network interface.

              Valid values: interface | efa | trunk

            • Ipv4Prefixes — (Array<map>)

              The IPv4 delegated prefixes that are assigned to the network interface.

              • Ipv4Prefix — (String)

                One or more IPv4 prefixes assigned to the network interface.

            • Ipv6Prefixes — (Array<map>)

              The IPv6 delegated prefixes that are assigned to the network interface.

              • Ipv6Prefix — (String)

                One or more IPv6 prefixes assigned to the network interface.

          • OutpostArn — (String)

            The Amazon Resource Name (ARN) of the Outpost.

          • RootDeviceName — (String)

            The device name of the root device volume (for example, /dev/sda1).

          • 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"
          • SecurityGroups — (Array<map>)

            The security groups for the instance.

            • GroupName — (String)

              The name of the security group.

            • GroupId — (String)

              The ID of the security group.

          • SourceDestCheck — (Boolean)

            Indicates whether source/destination checking is enabled.

          • SpotInstanceRequestId — (String)

            If the request is a Spot Instance request, the ID of the request.

          • SriovNetSupport — (String)

            Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

          • 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.InsufficientInstanceCapacity: There was insufficient capacity available to satisfy the launch request.

              • Server.InternalError: An internal error caused the instance to terminate during launch.

              • Server.ScheduledStop: The instance was stopped due to a scheduled retirement.

              • Server.SpotInstanceShutdown: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

              • Server.SpotInstanceTermination: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

              • Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.

              • Client.InstanceTerminated: The instance was terminated or rebooted during AMI creation.

              • Client.InternalError: A client error caused the instance to terminate during launch.

              • Client.InvalidSnapshot.NotFound: The specified snapshot was not found.

              • Client.UserInitiatedHibernate: Hibernation was initiated on 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 account limits.

          • 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.

          • VirtualizationType — (String)

            The virtualization type of the instance.

            Possible values include:
            • "hvm"
            • "paravirtual"
          • CpuOptions — (map)

            The CPU options for the instance.

            • CoreCount — (Integer)

              The number of CPU cores for the instance.

            • ThreadsPerCore — (Integer)

              The number of threads per CPU core.

          • CapacityReservationId — (String)

            The ID of the Capacity Reservation.

          • CapacityReservationSpecification — (map)

            Information about the Capacity Reservation targeting option.

            • CapacityReservationPreference — (String)

              Describes the instance's Capacity Reservation preferences. Possible preferences include:

              • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

              • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

              Possible values include:
              • "open"
              • "none"
            • CapacityReservationTarget — (map)

              Information about the targeted Capacity Reservation or Capacity Reservation group.

              • CapacityReservationId — (String)

                The ID of the targeted Capacity Reservation.

              • CapacityReservationResourceGroupArn — (String)

                The ARN of the targeted Capacity Reservation group.

          • HibernationOptions — (map)

            Indicates whether the instance is enabled for hibernation.

            • Configured — (Boolean)

              If this parameter is set to true, your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

          • Licenses — (Array<map>)

            The license configurations for the instance.

            • LicenseConfigurationArn — (String)

              The Amazon Resource Name (ARN) of the license configuration.

          • MetadataOptions — (map)

            The metadata options for the instance.

            • State — (String)

              The state of the metadata option changes.

              pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

              applied - The metadata options have been successfully applied on the instance.

              Possible values include:
              • "pending"
              • "applied"
            • HttpTokens — (String)

              The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

              If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

              If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

              Possible values include:
              • "optional"
              • "required"
            • HttpPutResponseHopLimit — (Integer)

              The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

              Default: 1

              Possible values: Integers from 1 to 64

            • HttpEndpoint — (String)

              Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

              Possible values include:
              • "disabled"
              • "enabled"
            • HttpProtocolIpv6 — (String)

              Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

              Possible values include:
              • "disabled"
              • "enabled"
          • EnclaveOptions — (map)

            Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

            • Enabled — (Boolean)

              If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

          • BootMode — (String)

            The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide.

            Possible values include:
            • "legacy-bios"
            • "uefi"
          • PlatformDetails — (String)

            The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

          • UsageOperation — (String)

            The usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

          • UsageOperationUpdateTime — (Date)

            The time that the usage operation was last updated.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the reservation.

        • RequesterId — (String)

          The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).

        • ReservationId — (String)

          The ID of the reservation.

      • 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.

See Also:

ec2.waitFor('instanceStatusOk', params = {}, [callback]) ⇒ AWS.Request

Waits for the instanceStatusOk state by periodically calling the underlying EC2.describeInstanceStatus() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the instanceStatusOk state

var params = {
  // ... input parameters ...
};
ec2.waitFor('instanceStatusOk', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The 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.instance-event-id - The ID of the event whose date and time you are modifying.

      • 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).

      • event.not-before-deadline - The deadline for starting the 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 used for internal purposes 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>)

        The filter values. Filter values are case-sensitive.

    • InstanceIds — (Array<String>)

      The instance IDs.

      Default: Describes all your instances.

      Constraints: Maximum 100 explicitly specified instance IDs.

    • 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.

    • NextToken — (String)

      The token to retrieve the next page of results.

    • 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.

    • 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>)

        Information about the status of the instances.

        • AvailabilityZone — (String)

          The Availability Zone of the instance.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • Events — (Array<map>)

          Any scheduled events associated with the instance.

          • InstanceEventId — (String)

            The ID of the event.

          • 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].

          • NotAfter — (Date)

            The latest scheduled end time for the event.

          • NotBefore — (Date)

            The earliest scheduled start time for the event.

          • NotBeforeDeadline — (Date)

            The deadline for starting the event.

        • InstanceId — (String)

          The ID of the instance.

        • InstanceState — (map)

          The intended state of the instance. DescribeInstanceStatus requires that an instance be in the running state.

          • Code — (Integer)

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

          • Name — (String)

            The current state of the instance.

            Possible values include:
            • "pending"
            • "running"
            • "shutting-down"
            • "terminated"
            • "stopping"
            • "stopped"
        • InstanceStatus — (map)

          Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.

          • Details — (Array<map>)

            The system instance health or application instance health.

            • 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.

            • Name — (String)

              The type of instance status.

              Possible values include:
              • "reachability"
            • Status — (String)

              The status.

              Possible values include:
              • "passed"
              • "failed"
              • "insufficient-data"
              • "initializing"
          • Status — (String)

            The status.

            Possible values include:
            • "ok"
            • "impaired"
            • "insufficient-data"
            • "not-applicable"
            • "initializing"
        • 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.

          • Details — (Array<map>)

            The system instance health or application instance health.

            • 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.

            • Name — (String)

              The type of instance status.

              Possible values include:
              • "reachability"
            • Status — (String)

              The status.

              Possible values include:
              • "passed"
              • "failed"
              • "insufficient-data"
              • "initializing"
          • Status — (String)

            The status.

            Possible values include:
            • "ok"
            • "impaired"
            • "insufficient-data"
            • "not-applicable"
            • "initializing"
      • 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.

See Also:

ec2.waitFor('instanceStopped', params = {}, [callback]) ⇒ AWS.Request

Waits for the instanceStopped state by periodically calling the underlying EC2.describeInstances() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the instanceStopped state

var params = {
  // ... input parameters ...
};
ec2.waitFor('instanceStopped', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The filters.

      • affinity - The affinity setting for an instance running on a Dedicated Host (default | host).

      • architecture - The instance architecture (i386 | x86_64 | arm64).

      • 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 specified in the block device mapping (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.

      • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.

      • 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). The value xen is used for both Xen and Nitro hypervisors.

      • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z. You can use a wildcard (*), for example, 2021-09-29T*, which matches an entire day.

      • metadata-options.http-tokens - The metadata request authorization state (optional | required)

      • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64)

      • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled)

      • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled).

      • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.

      • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.

      • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.

      • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.

      • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.

      • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.

      • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.

      • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.

      • 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.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.availability-zone - The Availability Zone for the network interface.

      • network-interface.description - The description of the network interface.

      • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.

      • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.

      • network-interface.status - The status of the network interface (available) | in-use).

      • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.

      • 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.

      • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

      • owner-id - The Amazon Web Services account ID of the instance owner.

      • placement-group-name - The name of the placement group for the instance.

      • placement-partition-number - The partition in which the instance is located.

      • platform - The platform. To list only Windows instances, use windows.

      • private-dns-name - The private IPv4 DNS name of the instance.

      • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.

      • root-device-name - The device name of the root device volume (for example, /dev/sda1).

      • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.

      • 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.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • InstanceIds — (Array<String>)

      The instance IDs.

      Default: Describes all your instances.

    • 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.

    • 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.

    • NextToken — (String)

      The token to request 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:

      • Reservations — (Array<map>)

        Information about the reservations.

        • Groups — (Array<map>)

          [EC2-Classic only] The security groups.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • Instances — (Array<map>)

          The instances.

          • AmiLaunchIndex — (Integer)

            The AMI launch index, which can be used to find this instance in the launch group.

          • ImageId — (String)

            The ID of the AMI used to launch the instance.

          • InstanceId — (String)

            The ID of the instance.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • KernelId — (String)

            The kernel associated with this instance, if applicable.

          • KeyName — (String)

            The name of the key pair, if this instance was launched with an associated key pair.

          • LaunchTime — (Date)

            The time the instance was launched.

          • Monitoring — (map)

            The monitoring for the instance.

            • State — (String)

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

              Possible values include:
              • "disabled"
              • "disabling"
              • "enabled"
              • "pending"
          • Placement — (map)

            The location where the instance launched, if applicable.

            • AvailabilityZone — (String)

              The Availability Zone of the instance.

              If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

              This parameter is not supported by CreateFleet.

            • Affinity — (String)

              The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet.

            • GroupName — (String)

              The name of the placement group the instance is in.

            • PartitionNumber — (Integer)

              The number of the partition the instance is in. Valid only if the placement group strategy is set to partition.

              This parameter is not supported by CreateFleet.

            • HostId — (String)

              The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet.

            • 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.

              This parameter is not supported by CreateFleet.

              T3 instances that use the unlimited CPU credit option do not support host tenancy.

              Possible values include:
              • "default"
              • "dedicated"
              • "host"
            • SpreadDomain — (String)

              Reserved for future use.

              This parameter is not supported by CreateFleet.

            • HostResourceGroupArn — (String)

              The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

              This parameter is not supported by CreateFleet.

          • Platform — (String)

            The value is Windows for Windows instances; otherwise blank.

            Possible values include:
            • "Windows"
          • PrivateDnsName — (String)

            (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

            [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

          • PrivateIpAddress — (String)

            The private IPv4 address assigned to the instance.

          • 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"
          • PublicDnsName — (String)

            (IPv4 only) 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.

          • PublicIpAddress — (String)

            The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.

            A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

          • RamdiskId — (String)

            The RAM disk associated with this instance, if applicable.

          • State — (map)

            The current state of the instance.

            • Code — (Integer)

              The state of the instance as a 16-bit unsigned integer.

              The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

              The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

              The valid values for instance-state-code will all be in the range of the low byte and they are:

              • 0 : pending

              • 16 : running

              • 32 : shutting-down

              • 48 : terminated

              • 64 : stopping

              • 80 : stopped

              You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

            • Name — (String)

              The current state of the instance.

              Possible values include:
              • "pending"
              • "running"
              • "shutting-down"
              • "terminated"
              • "stopping"
              • "stopped"
          • StateTransitionReason — (String)

            The reason for the most recent state transition. This might be an empty string.

          • 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.

          • Architecture — (String)

            The architecture of the image.

            Possible values include:
            • "i386"
            • "x86_64"
            • "arm64"
            • "x86_64_mac"
          • BlockDeviceMappings — (Array<map>)

            Any block device mapping entries for the instance.

            • DeviceName — (String)

              The device name (for example, /dev/sdh or xvdh).

            • Ebs — (map)

              Parameters used to automatically set up EBS volumes when the instance is launched.

              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • DeleteOnTermination — (Boolean)

                Indicates whether the volume is deleted on instance termination.

              • Status — (String)

                The attachment state.

                Possible values include:
                • "attaching"
                • "attached"
                • "detaching"
                • "detached"
              • VolumeId — (String)

                The ID of the EBS volume.

          • ClientToken — (String)

            The idempotency token you provided when you launched the instance, if applicable.

          • EbsOptimized — (Boolean)

            Indicates whether the instance is optimized for Amazon 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.

          • EnaSupport — (Boolean)

            Specifies whether enhanced networking with ENA is enabled.

          • Hypervisor — (String)

            The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

            Possible values include:
            • "ovm"
            • "xen"
          • 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.

          • InstanceLifecycle — (String)

            Indicates whether this is a Spot Instance or a Scheduled Instance.

            Possible values include:
            • "spot"
            • "scheduled"
          • ElasticGpuAssociations — (Array<map>)

            The Elastic GPU associated with the instance.

            • ElasticGpuId — (String)

              The ID of the Elastic Graphics accelerator.

            • ElasticGpuAssociationId — (String)

              The ID of the association.

            • ElasticGpuAssociationState — (String)

              The state of the association between the instance and the Elastic Graphics accelerator.

            • ElasticGpuAssociationTime — (String)

              The time the Elastic Graphics accelerator was associated with the instance.

          • ElasticInferenceAcceleratorAssociations — (Array<map>)

            The elastic inference accelerator associated with the instance.

            • ElasticInferenceAcceleratorArn — (String)

              The Amazon Resource Name (ARN) of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationId — (String)

              The ID of the association.

            • ElasticInferenceAcceleratorAssociationState — (String)

              The state of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationTime — (Date)

              The time at which the elastic inference accelerator is associated with an instance.

          • NetworkInterfaces — (Array<map>)

            [EC2-VPC] The network interfaces for the instance.

            • Association — (map)

              The association information for an Elastic IPv4 associated with the network interface.

              • CarrierIp — (String)

                The carrier IP address associated with the network interface.

              • CustomerOwnedIp — (String)

                The customer-owned IP address associated with the network interface.

              • IpOwnerId — (String)

                The ID of the owner of the Elastic IP address.

              • PublicDnsName — (String)

                The public DNS name.

              • PublicIp — (String)

                The public IP address or Elastic IP address bound to the network interface.

            • Attachment — (map)

              The network interface attachment.

              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • AttachmentId — (String)

                The ID of the network interface attachment.

              • DeleteOnTermination — (Boolean)

                Indicates whether the network interface is deleted when the instance is terminated.

              • 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"
              • NetworkCardIndex — (Integer)

                The index of the network card.

            • Description — (String)

              The description.

            • Groups — (Array<map>)

              One or more security groups.

              • GroupName — (String)

                The name of the security group.

              • GroupId — (String)

                The ID of the security group.

            • Ipv6Addresses — (Array<map>)

              One or more IPv6 addresses associated with the network interface.

              • Ipv6Address — (String)

                The IPv6 address.

            • MacAddress — (String)

              The MAC address.

            • NetworkInterfaceId — (String)

              The ID of the network interface.

            • OwnerId — (String)

              The ID of the Amazon Web Services account that created the network interface.

            • PrivateDnsName — (String)

              The private DNS name.

            • PrivateIpAddress — (String)

              The IPv4 address of the network interface within the subnet.

            • PrivateIpAddresses — (Array<map>)

              One or more private IPv4 addresses associated with the network interface.

              • Association — (map)

                The association information for an Elastic IP address for the network interface.

                • CarrierIp — (String)

                  The carrier IP address associated with the network interface.

                • CustomerOwnedIp — (String)

                  The customer-owned IP address associated with the network interface.

                • IpOwnerId — (String)

                  The ID of the owner of the Elastic IP address.

                • PublicDnsName — (String)

                  The public DNS name.

                • PublicIp — (String)

                  The public IP address or Elastic IP address bound to the network interface.

              • Primary — (Boolean)

                Indicates whether this IPv4 address is the primary private IP address of the network interface.

              • PrivateDnsName — (String)

                The private IPv4 DNS name.

              • PrivateIpAddress — (String)

                The private IPv4 address of the network interface.

            • SourceDestCheck — (Boolean)

              Indicates whether source/destination checking is enabled.

            • Status — (String)

              The status of the network interface.

              Possible values include:
              • "available"
              • "associated"
              • "attaching"
              • "in-use"
              • "detaching"
            • SubnetId — (String)

              The ID of the subnet.

            • VpcId — (String)

              The ID of the VPC.

            • InterfaceType — (String)

              Describes the type of network interface.

              Valid values: interface | efa | trunk

            • Ipv4Prefixes — (Array<map>)

              The IPv4 delegated prefixes that are assigned to the network interface.

              • Ipv4Prefix — (String)

                One or more IPv4 prefixes assigned to the network interface.

            • Ipv6Prefixes — (Array<map>)

              The IPv6 delegated prefixes that are assigned to the network interface.

              • Ipv6Prefix — (String)

                One or more IPv6 prefixes assigned to the network interface.

          • OutpostArn — (String)

            The Amazon Resource Name (ARN) of the Outpost.

          • RootDeviceName — (String)

            The device name of the root device volume (for example, /dev/sda1).

          • 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"
          • SecurityGroups — (Array<map>)

            The security groups for the instance.

            • GroupName — (String)

              The name of the security group.

            • GroupId — (String)

              The ID of the security group.

          • SourceDestCheck — (Boolean)

            Indicates whether source/destination checking is enabled.

          • SpotInstanceRequestId — (String)

            If the request is a Spot Instance request, the ID of the request.

          • SriovNetSupport — (String)

            Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

          • 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.InsufficientInstanceCapacity: There was insufficient capacity available to satisfy the launch request.

              • Server.InternalError: An internal error caused the instance to terminate during launch.

              • Server.ScheduledStop: The instance was stopped due to a scheduled retirement.

              • Server.SpotInstanceShutdown: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

              • Server.SpotInstanceTermination: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

              • Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.

              • Client.InstanceTerminated: The instance was terminated or rebooted during AMI creation.

              • Client.InternalError: A client error caused the instance to terminate during launch.

              • Client.InvalidSnapshot.NotFound: The specified snapshot was not found.

              • Client.UserInitiatedHibernate: Hibernation was initiated on 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 account limits.

          • 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.

          • VirtualizationType — (String)

            The virtualization type of the instance.

            Possible values include:
            • "hvm"
            • "paravirtual"
          • CpuOptions — (map)

            The CPU options for the instance.

            • CoreCount — (Integer)

              The number of CPU cores for the instance.

            • ThreadsPerCore — (Integer)

              The number of threads per CPU core.

          • CapacityReservationId — (String)

            The ID of the Capacity Reservation.

          • CapacityReservationSpecification — (map)

            Information about the Capacity Reservation targeting option.

            • CapacityReservationPreference — (String)

              Describes the instance's Capacity Reservation preferences. Possible preferences include:

              • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

              • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

              Possible values include:
              • "open"
              • "none"
            • CapacityReservationTarget — (map)

              Information about the targeted Capacity Reservation or Capacity Reservation group.

              • CapacityReservationId — (String)

                The ID of the targeted Capacity Reservation.

              • CapacityReservationResourceGroupArn — (String)

                The ARN of the targeted Capacity Reservation group.

          • HibernationOptions — (map)

            Indicates whether the instance is enabled for hibernation.

            • Configured — (Boolean)

              If this parameter is set to true, your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

          • Licenses — (Array<map>)

            The license configurations for the instance.

            • LicenseConfigurationArn — (String)

              The Amazon Resource Name (ARN) of the license configuration.

          • MetadataOptions — (map)

            The metadata options for the instance.

            • State — (String)

              The state of the metadata option changes.

              pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

              applied - The metadata options have been successfully applied on the instance.

              Possible values include:
              • "pending"
              • "applied"
            • HttpTokens — (String)

              The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

              If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

              If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

              Possible values include:
              • "optional"
              • "required"
            • HttpPutResponseHopLimit — (Integer)

              The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

              Default: 1

              Possible values: Integers from 1 to 64

            • HttpEndpoint — (String)

              Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

              Possible values include:
              • "disabled"
              • "enabled"
            • HttpProtocolIpv6 — (String)

              Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

              Possible values include:
              • "disabled"
              • "enabled"
          • EnclaveOptions — (map)

            Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

            • Enabled — (Boolean)

              If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

          • BootMode — (String)

            The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide.

            Possible values include:
            • "legacy-bios"
            • "uefi"
          • PlatformDetails — (String)

            The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

          • UsageOperation — (String)

            The usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

          • UsageOperationUpdateTime — (Date)

            The time that the usage operation was last updated.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the reservation.

        • RequesterId — (String)

          The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).

        • ReservationId — (String)

          The ID of the reservation.

      • 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.

See Also:

ec2.waitFor('instanceTerminated', params = {}, [callback]) ⇒ AWS.Request

Waits for the instanceTerminated state by periodically calling the underlying EC2.describeInstances() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the instanceTerminated state

var params = {
  // ... input parameters ...
};
ec2.waitFor('instanceTerminated', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The filters.

      • affinity - The affinity setting for an instance running on a Dedicated Host (default | host).

      • architecture - The instance architecture (i386 | x86_64 | arm64).

      • 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 specified in the block device mapping (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.

      • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.

      • 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). The value xen is used for both Xen and Nitro hypervisors.

      • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z. You can use a wildcard (*), for example, 2021-09-29T*, which matches an entire day.

      • metadata-options.http-tokens - The metadata request authorization state (optional | required)

      • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64)

      • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled)

      • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled).

      • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.

      • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.

      • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.

      • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.

      • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.

      • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.

      • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.

      • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.

      • 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.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.availability-zone - The Availability Zone for the network interface.

      • network-interface.description - The description of the network interface.

      • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.

      • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.

      • network-interface.status - The status of the network interface (available) | in-use).

      • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.

      • 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.

      • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

      • owner-id - The Amazon Web Services account ID of the instance owner.

      • placement-group-name - The name of the placement group for the instance.

      • placement-partition-number - The partition in which the instance is located.

      • platform - The platform. To list only Windows instances, use windows.

      • private-dns-name - The private IPv4 DNS name of the instance.

      • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.

      • root-device-name - The device name of the root device volume (for example, /dev/sda1).

      • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.

      • 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.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • InstanceIds — (Array<String>)

      The instance IDs.

      Default: Describes all your instances.

    • 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.

    • 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.

    • NextToken — (String)

      The token to request 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:

      • Reservations — (Array<map>)

        Information about the reservations.

        • Groups — (Array<map>)

          [EC2-Classic only] The security groups.

          • GroupName — (String)

            The name of the security group.

          • GroupId — (String)

            The ID of the security group.

        • Instances — (Array<map>)

          The instances.

          • AmiLaunchIndex — (Integer)

            The AMI launch index, which can be used to find this instance in the launch group.

          • ImageId — (String)

            The ID of the AMI used to launch the instance.

          • InstanceId — (String)

            The ID of the instance.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • KernelId — (String)

            The kernel associated with this instance, if applicable.

          • KeyName — (String)

            The name of the key pair, if this instance was launched with an associated key pair.

          • LaunchTime — (Date)

            The time the instance was launched.

          • Monitoring — (map)

            The monitoring for the instance.

            • State — (String)

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

              Possible values include:
              • "disabled"
              • "disabling"
              • "enabled"
              • "pending"
          • Placement — (map)

            The location where the instance launched, if applicable.

            • AvailabilityZone — (String)

              The Availability Zone of the instance.

              If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

              This parameter is not supported by CreateFleet.

            • Affinity — (String)

              The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet.

            • GroupName — (String)

              The name of the placement group the instance is in.

            • PartitionNumber — (Integer)

              The number of the partition the instance is in. Valid only if the placement group strategy is set to partition.

              This parameter is not supported by CreateFleet.

            • HostId — (String)

              The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet.

            • 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.

              This parameter is not supported by CreateFleet.

              T3 instances that use the unlimited CPU credit option do not support host tenancy.

              Possible values include:
              • "default"
              • "dedicated"
              • "host"
            • SpreadDomain — (String)

              Reserved for future use.

              This parameter is not supported by CreateFleet.

            • HostResourceGroupArn — (String)

              The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

              This parameter is not supported by CreateFleet.

          • Platform — (String)

            The value is Windows for Windows instances; otherwise blank.

            Possible values include:
            • "Windows"
          • PrivateDnsName — (String)

            (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

            [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

          • PrivateIpAddress — (String)

            The private IPv4 address assigned to the instance.

          • 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"
          • PublicDnsName — (String)

            (IPv4 only) 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.

          • PublicIpAddress — (String)

            The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.

            A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

          • RamdiskId — (String)

            The RAM disk associated with this instance, if applicable.

          • State — (map)

            The current state of the instance.

            • Code — (Integer)

              The state of the instance as a 16-bit unsigned integer.

              The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

              The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

              The valid values for instance-state-code will all be in the range of the low byte and they are:

              • 0 : pending

              • 16 : running

              • 32 : shutting-down

              • 48 : terminated

              • 64 : stopping

              • 80 : stopped

              You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

            • Name — (String)

              The current state of the instance.

              Possible values include:
              • "pending"
              • "running"
              • "shutting-down"
              • "terminated"
              • "stopping"
              • "stopped"
          • StateTransitionReason — (String)

            The reason for the most recent state transition. This might be an empty string.

          • 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.

          • Architecture — (String)

            The architecture of the image.

            Possible values include:
            • "i386"
            • "x86_64"
            • "arm64"
            • "x86_64_mac"
          • BlockDeviceMappings — (Array<map>)

            Any block device mapping entries for the instance.

            • DeviceName — (String)

              The device name (for example, /dev/sdh or xvdh).

            • Ebs — (map)

              Parameters used to automatically set up EBS volumes when the instance is launched.

              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • DeleteOnTermination — (Boolean)

                Indicates whether the volume is deleted on instance termination.

              • Status — (String)

                The attachment state.

                Possible values include:
                • "attaching"
                • "attached"
                • "detaching"
                • "detached"
              • VolumeId — (String)

                The ID of the EBS volume.

          • ClientToken — (String)

            The idempotency token you provided when you launched the instance, if applicable.

          • EbsOptimized — (Boolean)

            Indicates whether the instance is optimized for Amazon 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.

          • EnaSupport — (Boolean)

            Specifies whether enhanced networking with ENA is enabled.

          • Hypervisor — (String)

            The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

            Possible values include:
            • "ovm"
            • "xen"
          • 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.

          • InstanceLifecycle — (String)

            Indicates whether this is a Spot Instance or a Scheduled Instance.

            Possible values include:
            • "spot"
            • "scheduled"
          • ElasticGpuAssociations — (Array<map>)

            The Elastic GPU associated with the instance.

            • ElasticGpuId — (String)

              The ID of the Elastic Graphics accelerator.

            • ElasticGpuAssociationId — (String)

              The ID of the association.

            • ElasticGpuAssociationState — (String)

              The state of the association between the instance and the Elastic Graphics accelerator.

            • ElasticGpuAssociationTime — (String)

              The time the Elastic Graphics accelerator was associated with the instance.

          • ElasticInferenceAcceleratorAssociations — (Array<map>)

            The elastic inference accelerator associated with the instance.

            • ElasticInferenceAcceleratorArn — (String)

              The Amazon Resource Name (ARN) of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationId — (String)

              The ID of the association.

            • ElasticInferenceAcceleratorAssociationState — (String)

              The state of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationTime — (Date)

              The time at which the elastic inference accelerator is associated with an instance.

          • NetworkInterfaces — (Array<map>)

            [EC2-VPC] The network interfaces for the instance.

            • Association — (map)

              The association information for an Elastic IPv4 associated with the network interface.

              • CarrierIp — (String)

                The carrier IP address associated with the network interface.

              • CustomerOwnedIp — (String)

                The customer-owned IP address associated with the network interface.

              • IpOwnerId — (String)

                The ID of the owner of the Elastic IP address.

              • PublicDnsName — (String)

                The public DNS name.

              • PublicIp — (String)

                The public IP address or Elastic IP address bound to the network interface.

            • Attachment — (map)

              The network interface attachment.

              • AttachTime — (Date)

                The time stamp when the attachment initiated.

              • AttachmentId — (String)

                The ID of the network interface attachment.

              • DeleteOnTermination — (Boolean)

                Indicates whether the network interface is deleted when the instance is terminated.

              • 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"
              • NetworkCardIndex — (Integer)

                The index of the network card.

            • Description — (String)

              The description.

            • Groups — (Array<map>)

              One or more security groups.

              • GroupName — (String)

                The name of the security group.

              • GroupId — (String)

                The ID of the security group.

            • Ipv6Addresses — (Array<map>)

              One or more IPv6 addresses associated with the network interface.

              • Ipv6Address — (String)

                The IPv6 address.

            • MacAddress — (String)

              The MAC address.

            • NetworkInterfaceId — (String)

              The ID of the network interface.

            • OwnerId — (String)

              The ID of the Amazon Web Services account that created the network interface.

            • PrivateDnsName — (String)

              The private DNS name.

            • PrivateIpAddress — (String)

              The IPv4 address of the network interface within the subnet.

            • PrivateIpAddresses — (Array<map>)

              One or more private IPv4 addresses associated with the network interface.

              • Association — (map)

                The association information for an Elastic IP address for the network interface.

                • CarrierIp — (String)

                  The carrier IP address associated with the network interface.

                • CustomerOwnedIp — (String)

                  The customer-owned IP address associated with the network interface.

                • IpOwnerId — (String)

                  The ID of the owner of the Elastic IP address.

                • PublicDnsName — (String)

                  The public DNS name.

                • PublicIp — (String)

                  The public IP address or Elastic IP address bound to the network interface.

              • Primary — (Boolean)

                Indicates whether this IPv4 address is the primary private IP address of the network interface.

              • PrivateDnsName — (String)

                The private IPv4 DNS name.

              • PrivateIpAddress — (String)

                The private IPv4 address of the network interface.

            • SourceDestCheck — (Boolean)

              Indicates whether source/destination checking is enabled.

            • Status — (String)

              The status of the network interface.

              Possible values include:
              • "available"
              • "associated"
              • "attaching"
              • "in-use"
              • "detaching"
            • SubnetId — (String)

              The ID of the subnet.

            • VpcId — (String)

              The ID of the VPC.

            • InterfaceType — (String)

              Describes the type of network interface.

              Valid values: interface | efa | trunk

            • Ipv4Prefixes — (Array<map>)

              The IPv4 delegated prefixes that are assigned to the network interface.

              • Ipv4Prefix — (String)

                One or more IPv4 prefixes assigned to the network interface.

            • Ipv6Prefixes — (Array<map>)

              The IPv6 delegated prefixes that are assigned to the network interface.

              • Ipv6Prefix — (String)

                One or more IPv6 prefixes assigned to the network interface.

          • OutpostArn — (String)

            The Amazon Resource Name (ARN) of the Outpost.

          • RootDeviceName — (String)

            The device name of the root device volume (for example, /dev/sda1).

          • 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"
          • SecurityGroups — (Array<map>)

            The security groups for the instance.

            • GroupName — (String)

              The name of the security group.

            • GroupId — (String)

              The ID of the security group.

          • SourceDestCheck — (Boolean)

            Indicates whether source/destination checking is enabled.

          • SpotInstanceRequestId — (String)

            If the request is a Spot Instance request, the ID of the request.

          • SriovNetSupport — (String)

            Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

          • 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.InsufficientInstanceCapacity: There was insufficient capacity available to satisfy the launch request.

              • Server.InternalError: An internal error caused the instance to terminate during launch.

              • Server.ScheduledStop: The instance was stopped due to a scheduled retirement.

              • Server.SpotInstanceShutdown: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

              • Server.SpotInstanceTermination: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.

              • Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.

              • Client.InstanceTerminated: The instance was terminated or rebooted during AMI creation.

              • Client.InternalError: A client error caused the instance to terminate during launch.

              • Client.InvalidSnapshot.NotFound: The specified snapshot was not found.

              • Client.UserInitiatedHibernate: Hibernation was initiated on 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 account limits.

          • 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.

          • VirtualizationType — (String)

            The virtualization type of the instance.

            Possible values include:
            • "hvm"
            • "paravirtual"
          • CpuOptions — (map)

            The CPU options for the instance.

            • CoreCount — (Integer)

              The number of CPU cores for the instance.

            • ThreadsPerCore — (Integer)

              The number of threads per CPU core.

          • CapacityReservationId — (String)

            The ID of the Capacity Reservation.

          • CapacityReservationSpecification — (map)

            Information about the Capacity Reservation targeting option.

            • CapacityReservationPreference — (String)

              Describes the instance's Capacity Reservation preferences. Possible preferences include:

              • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

              • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

              Possible values include:
              • "open"
              • "none"
            • CapacityReservationTarget — (map)

              Information about the targeted Capacity Reservation or Capacity Reservation group.

              • CapacityReservationId — (String)

                The ID of the targeted Capacity Reservation.

              • CapacityReservationResourceGroupArn — (String)

                The ARN of the targeted Capacity Reservation group.

          • HibernationOptions — (map)

            Indicates whether the instance is enabled for hibernation.

            • Configured — (Boolean)

              If this parameter is set to true, your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

          • Licenses — (Array<map>)

            The license configurations for the instance.

            • LicenseConfigurationArn — (String)

              The Amazon Resource Name (ARN) of the license configuration.

          • MetadataOptions — (map)

            The metadata options for the instance.

            • State — (String)

              The state of the metadata option changes.

              pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

              applied - The metadata options have been successfully applied on the instance.

              Possible values include:
              • "pending"
              • "applied"
            • HttpTokens — (String)

              The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

              If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

              If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

              Possible values include:
              • "optional"
              • "required"
            • HttpPutResponseHopLimit — (Integer)

              The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

              Default: 1

              Possible values: Integers from 1 to 64

            • HttpEndpoint — (String)

              Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

              Possible values include:
              • "disabled"
              • "enabled"
            • HttpProtocolIpv6 — (String)

              Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

              Possible values include:
              • "disabled"
              • "enabled"
          • EnclaveOptions — (map)

            Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

            • Enabled — (Boolean)

              If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

          • BootMode — (String)

            The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide.

            Possible values include:
            • "legacy-bios"
            • "uefi"
          • PlatformDetails — (String)

            The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

          • UsageOperation — (String)

            The usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

          • UsageOperationUpdateTime — (Date)

            The time that the usage operation was last updated.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the reservation.

        • RequesterId — (String)

          The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).

        • ReservationId — (String)

          The ID of the reservation.

      • 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.

See Also:

ec2.waitFor('keyPairExists', params = {}, [callback]) ⇒ AWS.Request

Waits for the keyPairExists state by periodically calling the underlying EC2.describeKeyPairs() operation every 5 seconds (at most 6 times).

Examples:

Waiting for the keyPairExists state

var params = {
  // ... input parameters ...
};
ec2.waitFor('keyPairExists', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The filters.

      • key-pair-id - The ID of the key pair.

      • fingerprint - The fingerprint of the key pair.

      • key-name - The name of the key pair.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • KeyNames — (Array<String>)

      The key pair names.

      Default: Describes all of your key pairs.

    • KeyPairIds — (Array<String>)

      The IDs of the key pairs.

    • 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:

      • KeyPairs — (Array<map>)

        Information about the key pairs.

        • KeyPairId — (String)

          The ID of the key pair.

        • KeyFingerprint — (String)

          If you used CreateKeyPair to create the key pair:

          • For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.

          • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.

          If you used ImportKeyPair to provide Amazon Web Services the public key:

          • For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC4716.

          • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.

        • KeyName — (String)

          The name of the key pair.

        • KeyType — (String)

          The type of key pair.

          Possible values include:
          • "rsa"
          • "ed25519"
        • Tags — (Array<map>)

          Any tags applied to the key pair.

          • 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.

See Also:

ec2.waitFor('natGatewayAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the natGatewayAvailable state by periodically calling the underlying EC2.describeNatGateways() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the natGatewayAvailable state

var params = {
  // ... input parameters ...
};
ec2.waitFor('natGatewayAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • 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.

    • 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.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • 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>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    • NatGatewayIds — (Array<String>)

      One or more NAT gateway IDs.

    • NextToken — (String)

      The token for 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.

        • CreateTime — (Date)

          The date and time the NAT gateway was created.

        • DeleteTime — (Date)

          The date and time the NAT gateway was deleted, if applicable.

        • 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."

        • NatGatewayAddresses — (Array<map>)

          Information about the IP addresses and network interface associated with the NAT gateway.

          • AllocationId — (String)

            [Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.

          • NetworkInterfaceId — (String)

            The ID of the network interface associated with the NAT gateway.

          • PrivateIp — (String)

            The private IP address associated with the NAT gateway.

          • PublicIp — (String)

            [Public NAT gateway only] The Elastic IP address associated with the NAT gateway.

        • NatGatewayId — (String)

          The ID of the NAT gateway.

        • ProvisionedBandwidth — (map)

          Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.

        • 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"
        • SubnetId — (String)

          The ID of the subnet in which the NAT gateway is located.

        • VpcId — (String)

          The ID of the VPC in which the NAT gateway is located.

        • Tags — (Array<map>)

          The tags for the NAT 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.

        • ConnectivityType — (String)

          Indicates whether the NAT gateway supports public or private connectivity.

          Possible values include:
          • "private"
          • "public"
      • 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.

See Also:

ec2.waitFor('networkInterfaceAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the networkInterfaceAvailable state by periodically calling the underlying EC2.describeNetworkInterfaces() operation every 20 seconds (at most 10 times).

Examples:

Waiting for the networkInterfaceAvailable state

var params = {
  // ... input parameters ...
};
ec2.waitFor('networkInterfaceAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      One or more filters.

      • addresses.private-ip-address - The private IPv4 addresses associated with the network interface.

      • addresses.primary - Whether the private IPv4 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 (IPv4).

      • 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 IPv4 address.

      • association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.

      • association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.

      • association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.

      • association.public-dns-name - The public DNS name for the network interface (IPv4).

      • 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.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.

      • ipv6-addresses.ipv6-address - An IPv6 address 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 Amazon Web Services account ID of the network interface owner.

      • private-ip-address - The private IPv4 address or addresses of the network interface.

      • private-dns-name - The private DNS name of the network interface (IPv4).

      • requester-id - The alias or Amazon Web Services account ID of the principal or service that created the network interface.

      • requester-managed - Indicates whether the network interface is being managed by an Amazon Web Service (for example, Amazon Web Services Management Console, Auto Scaling, and so on).

      • source-dest-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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • 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>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • NextToken — (String)

      The token to retrieve the next page of results.

    • 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. You cannot specify this parameter and the network interface 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:

      • NetworkInterfaces — (Array<map>)

        Information about one or more network interfaces.

        • Association — (map)

          The association information for an Elastic IP address (IPv4) associated with the network interface.

          • AllocationId — (String)

            The allocation ID.

          • AssociationId — (String)

            The association ID.

          • IpOwnerId — (String)

            The ID of the Elastic IP address owner.

          • PublicDnsName — (String)

            The public DNS name.

          • PublicIp — (String)

            The address of the Elastic IP address bound to the network interface.

          • CustomerOwnedIp — (String)

            The customer-owned IP address associated with the network interface.

          • CarrierIp — (String)

            The carrier IP address associated with the network interface.

            This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

        • Attachment — (map)

          The network interface attachment.

          • AttachTime — (Date)

            The timestamp indicating when the attachment initiated.

          • AttachmentId — (String)

            The ID of the network interface attachment.

          • DeleteOnTermination — (Boolean)

            Indicates whether the network interface is deleted when the instance is terminated.

          • DeviceIndex — (Integer)

            The device index of the network interface attachment on the instance.

          • NetworkCardIndex — (Integer)

            The index of the network card.

          • InstanceId — (String)

            The ID of the instance.

          • InstanceOwnerId — (String)

            The Amazon Web Services account ID of the owner of the instance.

          • Status — (String)

            The attachment state.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
        • AvailabilityZone — (String)

          The Availability Zone.

        • Description — (String)

          A description.

        • 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.

        • InterfaceType — (String)

          The type of network interface.

          Possible values include:
          • "interface"
          • "natGateway"
          • "efa"
          • "trunk"
        • Ipv6Addresses — (Array<map>)

          The IPv6 addresses associated with the network interface.

          • Ipv6Address — (String)

            The IPv6 address.

        • MacAddress — (String)

          The MAC address.

        • NetworkInterfaceId — (String)

          The ID of the network interface.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • OwnerId — (String)

          The Amazon Web Services account ID of the owner of the network interface.

        • PrivateDnsName — (String)

          The private DNS name.

        • PrivateIpAddress — (String)

          The IPv4 address of the network interface within the subnet.

        • PrivateIpAddresses — (Array<map>)

          The private IPv4 addresses associated with the network interface.

          • Association — (map)

            The association information for an Elastic IP address (IPv4) associated with the network interface.

            • AllocationId — (String)

              The allocation ID.

            • AssociationId — (String)

              The association ID.

            • IpOwnerId — (String)

              The ID of the Elastic IP address owner.

            • PublicDnsName — (String)

              The public DNS name.

            • PublicIp — (String)

              The address of the Elastic IP address bound to the network interface.

            • CustomerOwnedIp — (String)

              The customer-owned IP address associated with the network interface.

            • CarrierIp — (String)

              The carrier IP address associated with the network interface.

              This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

          • Primary — (Boolean)

            Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.

          • PrivateDnsName — (String)

            The private DNS name.

          • PrivateIpAddress — (String)

            The private IPv4 address.

        • Ipv4Prefixes — (Array<map>)

          The IPv4 prefixes that are assigned to the network interface.

        • Ipv6Prefixes — (Array<map>)

          The IPv6 prefixes that are assigned to the network interface.

          • Ipv6Prefix — (String)

            The IPv6 prefix.

        • RequesterId — (String)

          The alias or Amazon Web Services account ID of the principal or service that created the network interface.

        • RequesterManaged — (Boolean)

          Indicates whether the network interface is being managed by Amazon Web Services.

        • SourceDestCheck — (Boolean)

          Indicates whether source/destination checking is enabled.

        • Status — (String)

          The status of the network interface.

          Possible values include:
          • "available"
          • "associated"
          • "attaching"
          • "in-use"
          • "detaching"
        • SubnetId — (String)

          The ID of the subnet.

        • 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.

        • VpcId — (String)

          The ID of the VPC.

        • DenyAllIgwTraffic — (Boolean)

          Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is true, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.

      • 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.

See Also:

ec2.waitFor('passwordDataAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the passwordDataAvailable state by periodically calling the underlying EC2.getPasswordData() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the passwordDataAvailable state

var params = {
  InstanceId: 'STRING_VALUE', /* required */
};
ec2.waitFor('passwordDataAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • InstanceId — (String)

      The ID of the Windows instance.

    • 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:

      • InstanceId — (String)

        The ID of the Windows instance.

      • PasswordData — (String)

        The password of the instance. Returns an empty string if the password is not available.

      • Timestamp — (Date)

        The time the data was last updated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

ec2.waitFor('snapshotCompleted', params = {}, [callback]) ⇒ AWS.Request

Waits for the snapshotCompleted state by periodically calling the underlying EC2.describeSnapshots() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the snapshotCompleted state

var params = {
  // ... input parameters ...
};
ec2.waitFor('snapshotCompleted', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The filters.

      • description - A description of the snapshot.

      • encrypted - Indicates whether the snapshot is encrypted (true | false)

      • owner-alias - The owner alias, from an Amazon-maintained list (amazon). This is not the user-configured Amazon Web Services account alias set using the IAM console. We recommend that you use the related parameter instead of this filter.

      • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the related parameter instead of this filter.

      • progress - The progress of the snapshot, as a percentage (for example, 80%).

      • snapshot-id - The snapshot ID.

      • start-time - The time stamp when the snapshot was initiated.

      • status - The status of the snapshot (pending | completed | error).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • volume-id - The ID of the volume the snapshot is for.

      • volume-size - The size of the volume, in GiB.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • MaxResults — (Integer)

      The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.

    • NextToken — (String)

      The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

    • OwnerIds — (Array<String>)

      Scopes the results to snapshots with the specified owners. You can specify a combination of Amazon Web Services account IDs, self, and amazon.

    • RestorableByUserIds — (Array<String>)

      The IDs of the Amazon Web Services accounts that can create volumes from the snapshot.

    • SnapshotIds — (Array<String>)

      The snapshot IDs.

      Default: Describes the snapshots for which you have create volume permissions.

    • 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:

      • Snapshots — (Array<map>)

        Information about the snapshots.

        • 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 DescribeSnapshots.

        • Description — (String)

          The description for the snapshot.

        • Encrypted — (Boolean)

          Indicates whether the snapshot is encrypted.

        • KmsKeyId — (String)

          The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the parent volume.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the EBS snapshot.

        • Progress — (String)

          The progress of the snapshot, as a percentage.

        • SnapshotId — (String)

          The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

        • StartTime — (Date)

          The time stamp when the snapshot was initiated.

        • 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 Key Management Service (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 DescribeSnapshots.

        • 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.

        • VolumeSize — (Integer)

          The size of the volume, in GiB.

        • OwnerAlias — (String)

          The Amazon Web Services owner alias, from an Amazon-maintained list (amazon). This is not the user-configured Amazon Web Services account alias set using the IAM console.

        • OutpostArn — (String)

          The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide.

        • 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.

      • NextToken — (String)

        The NextToken value to include in a future DescribeSnapshots request. When the results of a DescribeSnapshots request exceed MaxResults, this value can be used 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.

See Also:

ec2.waitFor('securityGroupExists', params = {}, [callback]) ⇒ AWS.Request

Waits for the securityGroupExists state by periodically calling the underlying EC2.describeSecurityGroups() operation every 5 seconds (at most 6 times).

Examples:

Waiting for the securityGroupExists state

var params = {
  // ... input parameters ...
};
ec2.waitFor('securityGroupExists', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The 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.cidr - An IPv4 CIDR block for an outbound security group rule.

      • egress.ip-permission.from-port - For an outbound rule, the start of port range for the TCP and UDP protocols, or an ICMP type number.

      • egress.ip-permission.group-id - The ID of a security group that has been referenced in an outbound security group rule.

      • egress.ip-permission.group-name - The name of a security group that is referenced in an outbound security group rule.

      • egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound security group rule.

      • egress.ip-permission.prefix-list-id - The ID of a prefix list to which a security group rule allows outbound access.

      • egress.ip-permission.protocol - The IP protocol for an outbound security group rule (tcp | udp | icmp, a protocol number, or -1 for all protocols).

      • egress.ip-permission.to-port - For an outbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.

      • egress.ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an outbound security group rule.

      • group-id - The ID of the security group.

      • group-name - The name of the security group.

      • ip-permission.cidr - An IPv4 CIDR block for an inbound security group rule.

      • ip-permission.from-port - For an inbound rule, 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 referenced in an inbound security group rule.

      • ip-permission.group-name - The name of a security group that is referenced in an inbound security group rule.

      • ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security group rule.

      • ip-permission.prefix-list-id - The ID of a prefix list from which a security group rule allows inbound access.

      • ip-permission.protocol - The IP protocol for an inbound security group rule (tcp | udp | icmp, a protocol number, or -1 for all protocols).

      • ip-permission.to-port - For an inbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.

      • ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an inbound security group rule.

      • owner-id - The Amazon Web Services account ID of the owner of the security group.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • 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>)

        The filter values. Filter values are case-sensitive.

    • GroupIds — (Array<String>)

      The IDs of the security groups. Required for security groups in a nondefault VPC.

      Default: Describes all of your security groups.

    • GroupNames — (Array<String>)

      [EC2-Classic and default VPC only] The names of the security groups. 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 of your security groups.

    • 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.

    • 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 request with the returned NextToken value. This value can be between 5 and 1000. If this parameter is not specified, then all results are returned.

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 the security groups.

        • Description — (String)

          A description of the security group.

        • GroupName — (String)

          The name of the security group.

        • IpPermissions — (Array<map>)

          The inbound rules associated with the security group.

          • FromPort — (Integer)

            The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

          • IpProtocol — (String)

            The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

            [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

          • IpRanges — (Array<map>)

            The IPv4 ranges.

            • CidrIp — (String)

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

            • Description — (String)

              A description for the security group rule that references this IPv4 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

          • Ipv6Ranges — (Array<map>)

            [VPC only] The IPv6 ranges.

            • CidrIpv6 — (String)

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

            • Description — (String)

              A description for the security group rule that references this IPv6 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

          • PrefixListIds — (Array<map>)

            [VPC only] The prefix list IDs.

            • Description — (String)

              A description for the security group rule that references this prefix list ID.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • PrefixListId — (String)

              The ID of the prefix.

          • ToPort — (Integer)

            The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

          • UserIdGroupPairs — (Array<map>)

            The security group and Amazon Web Services account ID pairs.

            • Description — (String)

              A description for the security group rule that references this user ID group pair.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • GroupId — (String)

              The ID of the security group.

            • 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.

              For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

            • PeeringStatus — (String)

              The status of a VPC peering connection, if applicable.

            • UserId — (String)

              The ID of an Amazon Web Services account.

              For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

            • 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.

        • OwnerId — (String)

          The Amazon Web Services account ID of the owner of the security group.

        • GroupId — (String)

          The ID of the security group.

        • IpPermissionsEgress — (Array<map>)

          [VPC only] The outbound rules associated with the security group.

          • FromPort — (Integer)

            The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

          • IpProtocol — (String)

            The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

            [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

          • IpRanges — (Array<map>)

            The IPv4 ranges.

            • CidrIp — (String)

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

            • Description — (String)

              A description for the security group rule that references this IPv4 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

          • Ipv6Ranges — (Array<map>)

            [VPC only] The IPv6 ranges.

            • CidrIpv6 — (String)

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

            • Description — (String)

              A description for the security group rule that references this IPv6 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

          • PrefixListIds — (Array<map>)

            [VPC only] The prefix list IDs.

            • Description — (String)

              A description for the security group rule that references this prefix list ID.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • PrefixListId — (String)

              The ID of the prefix.

          • ToPort — (Integer)

            The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

          • UserIdGroupPairs — (Array<map>)

            The security group and Amazon Web Services account ID pairs.

            • Description — (String)

              A description for the security group rule that references this user ID group pair.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • GroupId — (String)

              The ID of the security group.

            • 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.

              For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

            • PeeringStatus — (String)

              The status of a VPC peering connection, if applicable.

            • UserId — (String)

              The ID of an Amazon Web Services account.

              For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

            • 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.

        • 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.

        • VpcId — (String)

          [VPC only] The ID of the VPC for the security group.

      • 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.

See Also:

ec2.waitFor('spotInstanceRequestFulfilled', params = {}, [callback]) ⇒ AWS.Request

Waits for the spotInstanceRequestFulfilled state by periodically calling the underlying EC2.describeSpotInstanceRequests() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the spotInstanceRequestFulfilled state

var params = {
  // ... input parameters ...
};
ec2.waitFor('spotInstanceRequestFulfilled', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      One or more filters.

      • availability-zone-group - The Availability Zone group.

      • create-time - The time stamp when the Spot Instance request was created.

      • fault-code - The fault code related to the request.

      • fault-message - The fault message related to the request.

      • instance-id - The ID of the instance that fulfilled the request.

      • launch-group - The Spot Instance launch group.

      • launch.block-device-mapping.delete-on-termination - Indicates whether the EBS volume is deleted on instance termination.

      • launch.block-device-mapping.device-name - The device name for the volume in the block device mapping (for example, /dev/sdh or xvdh).

      • launch.block-device-mapping.snapshot-id - The ID of the snapshot for the EBS volume.

      • launch.block-device-mapping.volume-size - The size of the EBS volume, in GiB.

      • launch.block-device-mapping.volume-type - The type of EBS volume: gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1for Cold HDD, or standard for Magnetic.

      • launch.group-id - The ID of the security group for the instance.

      • launch.group-name - The name of the security group for the instance.

      • launch.image-id - The ID of the AMI.

      • launch.instance-type - The type of instance (for example, m3.medium).

      • launch.kernel-id - The kernel ID.

      • launch.key-name - The name of the key pair the instance launched with.

      • launch.monitoring-enabled - Whether detailed monitoring is enabled for the Spot Instance.

      • launch.ramdisk-id - The RAM disk ID.

      • launched-availability-zone - The Availability Zone in which the request is launched.

      • network-interface.addresses.primary - Indicates whether the IP address is the primary private IP address.

      • network-interface.delete-on-termination - Indicates whether the network interface is deleted when the instance is terminated.

      • network-interface.description - A description of the network interface.

      • network-interface.device-index - The index of the device for the network interface attachment on the instance.

      • network-interface.group-id - The ID of the security group associated with the network interface.

      • network-interface.network-interface-id - The ID of the network interface.

      • network-interface.private-ip-address - The primary private IP address of the network interface.

      • network-interface.subnet-id - The ID of the subnet for the instance.

      • product-description - The product description associated with the instance (Linux/UNIX | Windows).

      • spot-instance-request-id - The Spot Instance request ID.

      • spot-price - The maximum hourly price for any Spot Instance launched to fulfill the request.

      • state - The state of the Spot Instance request (open | active | closed | cancelled | failed). Spot request status information can help you track your Amazon EC2 Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances.

      • status-code - The short code describing the most recent evaluation of your Spot Instance request.

      • status-message - The message explaining the status of the Spot Instance request.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • type - The type of Spot Instance request (one-time | persistent).

      • valid-from - The start date of the request.

      • valid-until - The end date of the request.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • NextToken — (String)

      The token to request the next set of results. This value is null when there are no more results to return.

    • MaxResults — (Integer)

      The maximum number of results to return in a single call. Specify a value between 5 and 1000. To retrieve the remaining results, make another call with the returned NextToken value.

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:

      • SpotInstanceRequests — (Array<map>)

        One or more Spot Instance requests.

        • ActualBlockHourlyPrice — (String)

          Deprecated.

        • AvailabilityZoneGroup — (String)

          The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

        • BlockDurationMinutes — (Integer)

          Deprecated.

        • CreateTime — (Date)

          The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

        • 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.

        • InstanceId — (String)

          The instance ID, if an instance has been launched to fulfill the Spot Instance request.

        • LaunchGroup — (String)

          The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

        • LaunchSpecification — (map)

          Additional information for launching instances.

          • UserData — (String)

            The Base64-encoded user data for the instance.

          • SecurityGroups — (Array<map>)

            One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

            • GroupName — (String)

              The name of the security group.

            • GroupId — (String)

              The ID of the security group.

          • AddressingType — (String)

            Deprecated.

          • BlockDeviceMappings — (Array<map>)

            One or more block device mapping entries.

            • DeviceName — (String)

              The device name (for example, /dev/sdh or xvdh).

            • 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.

              NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

              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.

            • Ebs — (map)

              Parameters used to automatically set up EBS volumes when the instance is launched.

              • DeleteOnTermination — (Boolean)

                Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

              • Iops — (Integer)

                The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

                The following are the supported values for each volume type:

                • gp3: 3,000-16,000 IOPS

                • io1: 100-64,000 IOPS

                • io2: 100-64,000 IOPS

                For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.

                This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard volumes.

              • SnapshotId — (String)

                The ID of the snapshot.

              • VolumeSize — (Integer)

                The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

                The following are the supported volumes sizes for each volume type:

                • gp2 and gp3:1-16,384

                • io1 and io2: 4-16,384

                • st1 and sc1: 125-16,384

                • standard: 1-1,024

              • VolumeType — (String)

                The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the IOPS that the volume supports.

                Possible values include:
                • "standard"
                • "io1"
                • "io2"
                • "gp2"
                • "sc1"
                • "st1"
                • "gp3"
              • KmsKeyId — (String)

                Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

                This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

              • Throughput — (Integer)

                The throughput that the volume supports, in MiB/s.

                This parameter is valid only for gp3 volumes.

                Valid Range: Minimum value of 125. Maximum value of 1000.

              • OutpostArn — (String)

                The ARN of the Outpost on which the snapshot is stored.

              • Encrypted — (Boolean)

                Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide.

                In no case can you remove encryption from an encrypted volume.

                Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

                This parameter is not returned by .

            • NoDevice — (String)

              To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

          • 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 EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

            Default: false

          • IamInstanceProfile — (map)

            The IAM instance profile.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the instance profile.

            • Name — (String)

              The name of the instance profile.

          • ImageId — (String)

            The ID of the AMI.

          • InstanceType — (String)

            The instance type.

            Possible values include:
            • "t1.micro"
            • "t2.nano"
            • "t2.micro"
            • "t2.small"
            • "t2.medium"
            • "t2.large"
            • "t2.xlarge"
            • "t2.2xlarge"
            • "t3.nano"
            • "t3.micro"
            • "t3.small"
            • "t3.medium"
            • "t3.large"
            • "t3.xlarge"
            • "t3.2xlarge"
            • "t3a.nano"
            • "t3a.micro"
            • "t3a.small"
            • "t3a.medium"
            • "t3a.large"
            • "t3a.xlarge"
            • "t3a.2xlarge"
            • "t4g.nano"
            • "t4g.micro"
            • "t4g.small"
            • "t4g.medium"
            • "t4g.large"
            • "t4g.xlarge"
            • "t4g.2xlarge"
            • "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"
            • "m4.16xlarge"
            • "m2.xlarge"
            • "m2.2xlarge"
            • "m2.4xlarge"
            • "cr1.8xlarge"
            • "r3.large"
            • "r3.xlarge"
            • "r3.2xlarge"
            • "r3.4xlarge"
            • "r3.8xlarge"
            • "r4.large"
            • "r4.xlarge"
            • "r4.2xlarge"
            • "r4.4xlarge"
            • "r4.8xlarge"
            • "r4.16xlarge"
            • "r5.large"
            • "r5.xlarge"
            • "r5.2xlarge"
            • "r5.4xlarge"
            • "r5.8xlarge"
            • "r5.12xlarge"
            • "r5.16xlarge"
            • "r5.24xlarge"
            • "r5.metal"
            • "r5a.large"
            • "r5a.xlarge"
            • "r5a.2xlarge"
            • "r5a.4xlarge"
            • "r5a.8xlarge"
            • "r5a.12xlarge"
            • "r5a.16xlarge"
            • "r5a.24xlarge"
            • "r5b.large"
            • "r5b.xlarge"
            • "r5b.2xlarge"
            • "r5b.4xlarge"
            • "r5b.8xlarge"
            • "r5b.12xlarge"
            • "r5b.16xlarge"
            • "r5b.24xlarge"
            • "r5b.metal"
            • "r5d.large"
            • "r5d.xlarge"
            • "r5d.2xlarge"
            • "r5d.4xlarge"
            • "r5d.8xlarge"
            • "r5d.12xlarge"
            • "r5d.16xlarge"
            • "r5d.24xlarge"
            • "r5d.metal"
            • "r5ad.large"
            • "r5ad.xlarge"
            • "r5ad.2xlarge"
            • "r5ad.4xlarge"
            • "r5ad.8xlarge"
            • "r5ad.12xlarge"
            • "r5ad.16xlarge"
            • "r5ad.24xlarge"
            • "r6g.metal"
            • "r6g.medium"
            • "r6g.large"
            • "r6g.xlarge"
            • "r6g.2xlarge"
            • "r6g.4xlarge"
            • "r6g.8xlarge"
            • "r6g.12xlarge"
            • "r6g.16xlarge"
            • "r6gd.metal"
            • "r6gd.medium"
            • "r6gd.large"
            • "r6gd.xlarge"
            • "r6gd.2xlarge"
            • "r6gd.4xlarge"
            • "r6gd.8xlarge"
            • "r6gd.12xlarge"
            • "r6gd.16xlarge"
            • "x1.16xlarge"
            • "x1.32xlarge"
            • "x1e.xlarge"
            • "x1e.2xlarge"
            • "x1e.4xlarge"
            • "x1e.8xlarge"
            • "x1e.16xlarge"
            • "x1e.32xlarge"
            • "i2.xlarge"
            • "i2.2xlarge"
            • "i2.4xlarge"
            • "i2.8xlarge"
            • "i3.large"
            • "i3.xlarge"
            • "i3.2xlarge"
            • "i3.4xlarge"
            • "i3.8xlarge"
            • "i3.16xlarge"
            • "i3.metal"
            • "i3en.large"
            • "i3en.xlarge"
            • "i3en.2xlarge"
            • "i3en.3xlarge"
            • "i3en.6xlarge"
            • "i3en.12xlarge"
            • "i3en.24xlarge"
            • "i3en.metal"
            • "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"
            • "c5.large"
            • "c5.xlarge"
            • "c5.2xlarge"
            • "c5.4xlarge"
            • "c5.9xlarge"
            • "c5.12xlarge"
            • "c5.18xlarge"
            • "c5.24xlarge"
            • "c5.metal"
            • "c5a.large"
            • "c5a.xlarge"
            • "c5a.2xlarge"
            • "c5a.4xlarge"
            • "c5a.8xlarge"
            • "c5a.12xlarge"
            • "c5a.16xlarge"
            • "c5a.24xlarge"
            • "c5ad.large"
            • "c5ad.xlarge"
            • "c5ad.2xlarge"
            • "c5ad.4xlarge"
            • "c5ad.8xlarge"
            • "c5ad.12xlarge"
            • "c5ad.16xlarge"
            • "c5ad.24xlarge"
            • "c5d.large"
            • "c5d.xlarge"
            • "c5d.2xlarge"
            • "c5d.4xlarge"
            • "c5d.9xlarge"
            • "c5d.12xlarge"
            • "c5d.18xlarge"
            • "c5d.24xlarge"
            • "c5d.metal"
            • "c5n.large"
            • "c5n.xlarge"
            • "c5n.2xlarge"
            • "c5n.4xlarge"
            • "c5n.9xlarge"
            • "c5n.18xlarge"
            • "c5n.metal"
            • "c6g.metal"
            • "c6g.medium"
            • "c6g.large"
            • "c6g.xlarge"
            • "c6g.2xlarge"
            • "c6g.4xlarge"
            • "c6g.8xlarge"
            • "c6g.12xlarge"
            • "c6g.16xlarge"
            • "c6gd.metal"
            • "c6gd.medium"
            • "c6gd.large"
            • "c6gd.xlarge"
            • "c6gd.2xlarge"
            • "c6gd.4xlarge"
            • "c6gd.8xlarge"
            • "c6gd.12xlarge"
            • "c6gd.16xlarge"
            • "c6gn.medium"
            • "c6gn.large"
            • "c6gn.xlarge"
            • "c6gn.2xlarge"
            • "c6gn.4xlarge"
            • "c6gn.8xlarge"
            • "c6gn.12xlarge"
            • "c6gn.16xlarge"
            • "cc1.4xlarge"
            • "cc2.8xlarge"
            • "g2.2xlarge"
            • "g2.8xlarge"
            • "g3.4xlarge"
            • "g3.8xlarge"
            • "g3.16xlarge"
            • "g3s.xlarge"
            • "g4ad.xlarge"
            • "g4ad.2xlarge"
            • "g4ad.4xlarge"
            • "g4ad.8xlarge"
            • "g4ad.16xlarge"
            • "g4dn.xlarge"
            • "g4dn.2xlarge"
            • "g4dn.4xlarge"
            • "g4dn.8xlarge"
            • "g4dn.12xlarge"
            • "g4dn.16xlarge"
            • "g4dn.metal"
            • "cg1.4xlarge"
            • "p2.xlarge"
            • "p2.8xlarge"
            • "p2.16xlarge"
            • "p3.2xlarge"
            • "p3.8xlarge"
            • "p3.16xlarge"
            • "p3dn.24xlarge"
            • "p4d.24xlarge"
            • "d2.xlarge"
            • "d2.2xlarge"
            • "d2.4xlarge"
            • "d2.8xlarge"
            • "d3.xlarge"
            • "d3.2xlarge"
            • "d3.4xlarge"
            • "d3.8xlarge"
            • "d3en.xlarge"
            • "d3en.2xlarge"
            • "d3en.4xlarge"
            • "d3en.6xlarge"
            • "d3en.8xlarge"
            • "d3en.12xlarge"
            • "dl1.24xlarge"
            • "f1.2xlarge"
            • "f1.4xlarge"
            • "f1.16xlarge"
            • "m5.large"
            • "m5.xlarge"
            • "m5.2xlarge"
            • "m5.4xlarge"
            • "m5.8xlarge"
            • "m5.12xlarge"
            • "m5.16xlarge"
            • "m5.24xlarge"
            • "m5.metal"
            • "m5a.large"
            • "m5a.xlarge"
            • "m5a.2xlarge"
            • "m5a.4xlarge"
            • "m5a.8xlarge"
            • "m5a.12xlarge"
            • "m5a.16xlarge"
            • "m5a.24xlarge"
            • "m5d.large"
            • "m5d.xlarge"
            • "m5d.2xlarge"
            • "m5d.4xlarge"
            • "m5d.8xlarge"
            • "m5d.12xlarge"
            • "m5d.16xlarge"
            • "m5d.24xlarge"
            • "m5d.metal"
            • "m5ad.large"
            • "m5ad.xlarge"
            • "m5ad.2xlarge"
            • "m5ad.4xlarge"
            • "m5ad.8xlarge"
            • "m5ad.12xlarge"
            • "m5ad.16xlarge"
            • "m5ad.24xlarge"
            • "m5zn.large"
            • "m5zn.xlarge"
            • "m5zn.2xlarge"
            • "m5zn.3xlarge"
            • "m5zn.6xlarge"
            • "m5zn.12xlarge"
            • "m5zn.metal"
            • "h1.2xlarge"
            • "h1.4xlarge"
            • "h1.8xlarge"
            • "h1.16xlarge"
            • "z1d.large"
            • "z1d.xlarge"
            • "z1d.2xlarge"
            • "z1d.3xlarge"
            • "z1d.6xlarge"
            • "z1d.12xlarge"
            • "z1d.metal"
            • "u-6tb1.56xlarge"
            • "u-6tb1.112xlarge"
            • "u-9tb1.112xlarge"
            • "u-12tb1.112xlarge"
            • "u-6tb1.metal"
            • "u-9tb1.metal"
            • "u-12tb1.metal"
            • "u-18tb1.metal"
            • "u-24tb1.metal"
            • "a1.medium"
            • "a1.large"
            • "a1.xlarge"
            • "a1.2xlarge"
            • "a1.4xlarge"
            • "a1.metal"
            • "m5dn.large"
            • "m5dn.xlarge"
            • "m5dn.2xlarge"
            • "m5dn.4xlarge"
            • "m5dn.8xlarge"
            • "m5dn.12xlarge"
            • "m5dn.16xlarge"
            • "m5dn.24xlarge"
            • "m5dn.metal"
            • "m5n.large"
            • "m5n.xlarge"
            • "m5n.2xlarge"
            • "m5n.4xlarge"
            • "m5n.8xlarge"
            • "m5n.12xlarge"
            • "m5n.16xlarge"
            • "m5n.24xlarge"
            • "m5n.metal"
            • "r5dn.large"
            • "r5dn.xlarge"
            • "r5dn.2xlarge"
            • "r5dn.4xlarge"
            • "r5dn.8xlarge"
            • "r5dn.12xlarge"
            • "r5dn.16xlarge"
            • "r5dn.24xlarge"
            • "r5dn.metal"
            • "r5n.large"
            • "r5n.xlarge"
            • "r5n.2xlarge"
            • "r5n.4xlarge"
            • "r5n.8xlarge"
            • "r5n.12xlarge"
            • "r5n.16xlarge"
            • "r5n.24xlarge"
            • "r5n.metal"
            • "inf1.xlarge"
            • "inf1.2xlarge"
            • "inf1.6xlarge"
            • "inf1.24xlarge"
            • "m6g.metal"
            • "m6g.medium"
            • "m6g.large"
            • "m6g.xlarge"
            • "m6g.2xlarge"
            • "m6g.4xlarge"
            • "m6g.8xlarge"
            • "m6g.12xlarge"
            • "m6g.16xlarge"
            • "m6gd.metal"
            • "m6gd.medium"
            • "m6gd.large"
            • "m6gd.xlarge"
            • "m6gd.2xlarge"
            • "m6gd.4xlarge"
            • "m6gd.8xlarge"
            • "m6gd.12xlarge"
            • "m6gd.16xlarge"
            • "m6i.large"
            • "m6i.xlarge"
            • "m6i.2xlarge"
            • "m6i.4xlarge"
            • "m6i.8xlarge"
            • "m6i.12xlarge"
            • "m6i.16xlarge"
            • "m6i.24xlarge"
            • "m6i.32xlarge"
            • "mac1.metal"
            • "x2gd.medium"
            • "x2gd.large"
            • "x2gd.xlarge"
            • "x2gd.2xlarge"
            • "x2gd.4xlarge"
            • "x2gd.8xlarge"
            • "x2gd.12xlarge"
            • "x2gd.16xlarge"
            • "x2gd.metal"
            • "vt1.3xlarge"
            • "vt1.6xlarge"
            • "vt1.24xlarge"
          • KernelId — (String)

            The ID of the kernel.

          • KeyName — (String)

            The name of the key pair.

          • NetworkInterfaces — (Array<map>)

            One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

            • AssociatePublicIpAddress — (Boolean)

              Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true.

            • DeleteOnTermination — (Boolean)

              If set to true, the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.

            • Description — (String)

              The description of the network interface. Applies only if creating a network interface when launching an instance.

            • DeviceIndex — (Integer)

              The position of the network interface in the attachment order. A primary network interface has a device index of 0.

              If you specify a network interface when launching an instance, you must specify the device index.

            • Groups — (Array<String>)

              The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

            • Ipv6AddressCount — (Integer)

              A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

            • Ipv6Addresses — (Array<map>)

              One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

              • Ipv6Address — (String)

                The IPv6 address.

            • NetworkInterfaceId — (String)

              The ID of the network interface.

              If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

            • PrivateIpAddress — (String)

              The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

            • PrivateIpAddresses — (Array<map>)

              One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • Primary — (Boolean)

                Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

              • PrivateIpAddress — (String)

                The private IPv4 addresses.

            • SecondaryPrivateIpAddressCount — (Integer)

              The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

            • SubnetId — (String)

              The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

            • AssociateCarrierIpAddress — (Boolean)

              Indicates whether to assign a carrier IP address to the network interface.

              You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP addresses in the Amazon Web Services Wavelength Developer Guide.

            • InterfaceType — (String)

              The type of network interface.

              To create an Elastic Fabric Adapter (EFA), specify efa. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide.

              Valid values: interface | efa

            • NetworkCardIndex — (Integer)

              The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

              If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances.

            • Ipv4Prefixes — (Array<map>)

              One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

            • Ipv4PrefixCount — (Integer)

              The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

            • Ipv6Prefixes — (Array<map>)

              One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

              • Ipv6Prefix — (String)

                The IPv6 prefix.

            • Ipv6PrefixCount — (Integer)

              The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

          • Placement — (map)

            The placement information for the instance.

            • AvailabilityZone — (String)

              The Availability Zone.

              [Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

            • GroupName — (String)

              The name of the placement group.

            • 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 Spot Instances.

              Possible values include:
              • "default"
              • "dedicated"
              • "host"
          • RamdiskId — (String)

            The ID of the RAM disk.

          • SubnetId — (String)

            The ID of the subnet in which to launch the instance.

          • Monitoring — (map)

            Describes the monitoring of an instance.

            • Enabledrequired — (Boolean)

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        • LaunchedAvailabilityZone — (String)

          The Availability Zone in which the request is launched.

        • ProductDescription — (String)

          The product description associated with the Spot Instance.

          Possible values include:
          • "Linux/UNIX"
          • "Linux/UNIX (Amazon VPC)"
          • "Windows"
          • "Windows (Amazon VPC)"
        • SpotInstanceRequestId — (String)

          The ID of the Spot Instance request.

        • SpotPrice — (String)

          The maximum price per hour that you are willing to pay for a Spot Instance.

        • State — (String)

          The state of the Spot Instance request. Spot status information helps track your Spot Instance requests. For more information, see Spot status in the Amazon EC2 User Guide for Linux Instances.

          Possible values include:
          • "open"
          • "active"
          • "closed"
          • "cancelled"
          • "failed"
        • Status — (map)

          The status code and status message describing the Spot Instance request.

          • Code — (String)

            The status code. For a list of status codes, see Spot status codes in the Amazon EC2 User Guide for Linux Instances.

          • Message — (String)

            The description for the status code.

          • UpdateTime — (Date)

            The date and time of the most recent status update, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

        • 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.

        • Type — (String)

          The Spot Instance request type.

          Possible values include:
          • "one-time"
          • "persistent"
        • ValidFrom — (Date)

          The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.

        • ValidUntil — (Date)

          The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

          • For a persistent request, the request remains active until the validUntil date and time is reached. Otherwise, the request remains active until you cancel it.

          • For a one-time request, the request remains active until all instances launch, the request is canceled, or the validUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.

        • InstanceInterruptionBehavior — (String)

          The behavior when a Spot Instance is interrupted.

          Possible values include:
          • "hibernate"
          • "stop"
          • "terminate"
      • NextToken — (String)

        The token to use to retrieve the next set 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.

See Also:

ec2.waitFor('subnetAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the subnetAvailable state by periodically calling the underlying EC2.describeSubnets() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the subnetAvailable state

var params = {
  // ... input parameters ...
};
ec2.waitFor('subnetAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      One or more filters.

      • availability-zone - The Availability Zone for the subnet. You can also use availabilityZone as the filter name.

      • availability-zone-id - The ID of the Availability Zone for the subnet. You can also use availabilityZoneId as the filter name.

      • available-ip-address-count - The number of IPv4 addresses in the subnet that are available.

      • cidr-block - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use cidr or cidrBlock as the filter names.

      • default-for-az - Indicates whether this is the default subnet for the Availability Zone. You can also use defaultForAz as the filter name.

      • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the subnet.

      • ipv6-cidr-block-association.association-id - An association ID for an IPv6 CIDR block associated with the subnet.

      • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the subnet.

      • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

      • owner-id - The ID of the Amazon Web Services account that owns the subnet.

      • state - The state of the subnet (pending | available).

      • subnet-arn - The Amazon Resource Name (ARN) of the subnet.

      • subnet-id - The ID of the subnet.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • vpc-id - The ID of the VPC for the subnet.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • SubnetIds — (Array<String>)

      One or more subnet IDs.

      Default: Describes all your subnets.

    • 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.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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:

      • Subnets — (Array<map>)

        Information about one or more subnets.

        • AvailabilityZone — (String)

          The Availability Zone of the subnet.

        • AvailabilityZoneId — (String)

          The AZ ID of the subnet.

        • AvailableIpAddressCount — (Integer)

          The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.

        • CidrBlock — (String)

          The IPv4 CIDR block assigned to 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 IPv4 address.

        • MapCustomerOwnedIpOnLaunch — (Boolean)

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives a customer-owned IPv4 address.

        • CustomerOwnedIpv4Pool — (String)

          The customer-owned IPv4 address pool associated with the subnet.

        • State — (String)

          The current state of the subnet.

          Possible values include:
          • "pending"
          • "available"
        • SubnetId — (String)

          The ID of the subnet.

        • VpcId — (String)

          The ID of the VPC the subnet is in.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the subnet.

        • AssignIpv6AddressOnCreation — (Boolean)

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives an IPv6 address.

        • Ipv6CidrBlockAssociationSet — (Array<map>)

          Information about the IPv6 CIDR blocks associated with the subnet.

          • AssociationId — (String)

            The association ID for the CIDR block.

          • Ipv6CidrBlock — (String)

            The IPv6 CIDR block.

          • Ipv6CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of a CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

        • 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.

        • SubnetArn — (String)

          The Amazon Resource Name (ARN) of the subnet.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

      • 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.

See Also:

ec2.waitFor('systemStatusOk', params = {}, [callback]) ⇒ AWS.Request

Waits for the systemStatusOk state by periodically calling the underlying EC2.describeInstanceStatus() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the systemStatusOk state

var params = {
  // ... input parameters ...
};
ec2.waitFor('systemStatusOk', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The 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.instance-event-id - The ID of the event whose date and time you are modifying.

      • 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).

      • event.not-before-deadline - The deadline for starting the 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 used for internal purposes 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>)

        The filter values. Filter values are case-sensitive.

    • InstanceIds — (Array<String>)

      The instance IDs.

      Default: Describes all your instances.

      Constraints: Maximum 100 explicitly specified instance IDs.

    • 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.

    • NextToken — (String)

      The token to retrieve the next page of results.

    • 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.

    • 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>)

        Information about the status of the instances.

        • AvailabilityZone — (String)

          The Availability Zone of the instance.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • Events — (Array<map>)

          Any scheduled events associated with the instance.

          • InstanceEventId — (String)

            The ID of the event.

          • 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].

          • NotAfter — (Date)

            The latest scheduled end time for the event.

          • NotBefore — (Date)

            The earliest scheduled start time for the event.

          • NotBeforeDeadline — (Date)

            The deadline for starting the event.

        • InstanceId — (String)

          The ID of the instance.

        • InstanceState — (map)

          The intended state of the instance. DescribeInstanceStatus requires that an instance be in the running state.

          • Code — (Integer)

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 28 and (216)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 20 and (28)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 28 or 256 in decimal.

          • Name — (String)

            The current state of the instance.

            Possible values include:
            • "pending"
            • "running"
            • "shutting-down"
            • "terminated"
            • "stopping"
            • "stopped"
        • InstanceStatus — (map)

          Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.

          • Details — (Array<map>)

            The system instance health or application instance health.

            • 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.

            • Name — (String)

              The type of instance status.

              Possible values include:
              • "reachability"
            • Status — (String)

              The status.

              Possible values include:
              • "passed"
              • "failed"
              • "insufficient-data"
              • "initializing"
          • Status — (String)

            The status.

            Possible values include:
            • "ok"
            • "impaired"
            • "insufficient-data"
            • "not-applicable"
            • "initializing"
        • 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.

          • Details — (Array<map>)

            The system instance health or application instance health.

            • 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.

            • Name — (String)

              The type of instance status.

              Possible values include:
              • "reachability"
            • Status — (String)

              The status.

              Possible values include:
              • "passed"
              • "failed"
              • "insufficient-data"
              • "initializing"
          • Status — (String)

            The status.

            Possible values include:
            • "ok"
            • "impaired"
            • "insufficient-data"
            • "not-applicable"
            • "initializing"
      • 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.

See Also:

ec2.waitFor('volumeAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the volumeAvailable state by periodically calling the underlying EC2.describeVolumes() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the volumeAvailable state

var params = {
  // ... input parameters ...
};
ec2.waitFor('volumeAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The filters.

      • attachment.attach-time - The time stamp when the attachment initiated.

      • attachment.delete-on-termination - Whether the volume is deleted on instance termination.

      • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1).

      • attachment.instance-id - The ID of the instance the volume is attached to.

      • attachment.status - The attachment state (attaching | attached | detaching).

      • availability-zone - The Availability Zone in which the volume was created.

      • create-time - The time stamp when the volume was created.

      • encrypted - Indicates whether the volume is encrypted (true | false)

      • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false)

      • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false).

      • size - The size of the volume, in GiB.

      • snapshot-id - The snapshot from which the volume was created.

      • status - The state of the volume (creating | available | in-use | deleting | deleted | error).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • volume-id - The volume ID.

      • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1| standard)

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • VolumeIds — (Array<String>)

      The volume IDs.

    • 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.

    • MaxResults — (Integer)

      The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

    • NextToken — (String)

      The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

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:

      • Volumes — (Array<map>)

        Information about the volumes.

        • Attachments — (Array<map>)

          Information about the volume attachments.

          • AttachTime — (Date)

            The time stamp when the attachment initiated.

          • Device — (String)

            The device name.

          • InstanceId — (String)

            The ID of the instance.

          • State — (String)

            The attachment state of the volume.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
            • "busy"
          • VolumeId — (String)

            The ID of the volume.

          • DeleteOnTermination — (Boolean)

            Indicates whether the EBS volume is deleted on instance termination.

        • AvailabilityZone — (String)

          The Availability Zone for the volume.

        • CreateTime — (Date)

          The time stamp when volume creation was initiated.

        • Encrypted — (Boolean)

          Indicates whether the volume is encrypted.

        • KmsKeyId — (String)

          The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • Size — (Integer)

          The size of the volume, in GiBs.

        • SnapshotId — (String)

          The snapshot from which the volume was created, if applicable.

        • State — (String)

          The volume state.

          Possible values include:
          • "creating"
          • "available"
          • "in-use"
          • "deleting"
          • "deleted"
          • "error"
        • VolumeId — (String)

          The ID of the volume.

        • Iops — (Integer)

          The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

        • 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.

          Possible values include:
          • "standard"
          • "io1"
          • "io2"
          • "gp2"
          • "sc1"
          • "st1"
          • "gp3"
        • FastRestored — (Boolean)

          Indicates whether the volume was created using fast snapshot restore.

        • MultiAttachEnabled — (Boolean)

          Indicates whether Amazon EBS Multi-Attach is enabled.

        • Throughput — (Integer)

          The throughput that the volume supports, in MiB/s.

      • NextToken — (String)

        The NextToken value to include in a future DescribeVolumes request. When the results of a DescribeVolumes request exceed MaxResults, this value can be used 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.

See Also:

ec2.waitFor('volumeDeleted', params = {}, [callback]) ⇒ AWS.Request

Waits for the volumeDeleted state by periodically calling the underlying EC2.describeVolumes() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the volumeDeleted state

var params = {
  // ... input parameters ...
};
ec2.waitFor('volumeDeleted', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The filters.

      • attachment.attach-time - The time stamp when the attachment initiated.

      • attachment.delete-on-termination - Whether the volume is deleted on instance termination.

      • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1).

      • attachment.instance-id - The ID of the instance the volume is attached to.

      • attachment.status - The attachment state (attaching | attached | detaching).

      • availability-zone - The Availability Zone in which the volume was created.

      • create-time - The time stamp when the volume was created.

      • encrypted - Indicates whether the volume is encrypted (true | false)

      • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false)

      • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false).

      • size - The size of the volume, in GiB.

      • snapshot-id - The snapshot from which the volume was created.

      • status - The state of the volume (creating | available | in-use | deleting | deleted | error).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • volume-id - The volume ID.

      • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1| standard)

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • VolumeIds — (Array<String>)

      The volume IDs.

    • 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.

    • MaxResults — (Integer)

      The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

    • NextToken — (String)

      The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

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:

      • Volumes — (Array<map>)

        Information about the volumes.

        • Attachments — (Array<map>)

          Information about the volume attachments.

          • AttachTime — (Date)

            The time stamp when the attachment initiated.

          • Device — (String)

            The device name.

          • InstanceId — (String)

            The ID of the instance.

          • State — (String)

            The attachment state of the volume.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
            • "busy"
          • VolumeId — (String)

            The ID of the volume.

          • DeleteOnTermination — (Boolean)

            Indicates whether the EBS volume is deleted on instance termination.

        • AvailabilityZone — (String)

          The Availability Zone for the volume.

        • CreateTime — (Date)

          The time stamp when volume creation was initiated.

        • Encrypted — (Boolean)

          Indicates whether the volume is encrypted.

        • KmsKeyId — (String)

          The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • Size — (Integer)

          The size of the volume, in GiBs.

        • SnapshotId — (String)

          The snapshot from which the volume was created, if applicable.

        • State — (String)

          The volume state.

          Possible values include:
          • "creating"
          • "available"
          • "in-use"
          • "deleting"
          • "deleted"
          • "error"
        • VolumeId — (String)

          The ID of the volume.

        • Iops — (Integer)

          The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

        • 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.

          Possible values include:
          • "standard"
          • "io1"
          • "io2"
          • "gp2"
          • "sc1"
          • "st1"
          • "gp3"
        • FastRestored — (Boolean)

          Indicates whether the volume was created using fast snapshot restore.

        • MultiAttachEnabled — (Boolean)

          Indicates whether Amazon EBS Multi-Attach is enabled.

        • Throughput — (Integer)

          The throughput that the volume supports, in MiB/s.

      • NextToken — (String)

        The NextToken value to include in a future DescribeVolumes request. When the results of a DescribeVolumes request exceed MaxResults, this value can be used 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.

See Also:

ec2.waitFor('volumeInUse', params = {}, [callback]) ⇒ AWS.Request

Waits for the volumeInUse state by periodically calling the underlying EC2.describeVolumes() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the volumeInUse state

var params = {
  // ... input parameters ...
};
ec2.waitFor('volumeInUse', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      The filters.

      • attachment.attach-time - The time stamp when the attachment initiated.

      • attachment.delete-on-termination - Whether the volume is deleted on instance termination.

      • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1).

      • attachment.instance-id - The ID of the instance the volume is attached to.

      • attachment.status - The attachment state (attaching | attached | detaching).

      • availability-zone - The Availability Zone in which the volume was created.

      • create-time - The time stamp when the volume was created.

      • encrypted - Indicates whether the volume is encrypted (true | false)

      • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false)

      • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false).

      • size - The size of the volume, in GiB.

      • snapshot-id - The snapshot from which the volume was created.

      • status - The state of the volume (creating | available | in-use | deleting | deleted | error).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • volume-id - The volume ID.

      • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1| standard)

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • VolumeIds — (Array<String>)

      The volume IDs.

    • 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.

    • MaxResults — (Integer)

      The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

    • NextToken — (String)

      The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

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:

      • Volumes — (Array<map>)

        Information about the volumes.

        • Attachments — (Array<map>)

          Information about the volume attachments.

          • AttachTime — (Date)

            The time stamp when the attachment initiated.

          • Device — (String)

            The device name.

          • InstanceId — (String)

            The ID of the instance.

          • State — (String)

            The attachment state of the volume.

            Possible values include:
            • "attaching"
            • "attached"
            • "detaching"
            • "detached"
            • "busy"
          • VolumeId — (String)

            The ID of the volume.

          • DeleteOnTermination — (Boolean)

            Indicates whether the EBS volume is deleted on instance termination.

        • AvailabilityZone — (String)

          The Availability Zone for the volume.

        • CreateTime — (Date)

          The time stamp when volume creation was initiated.

        • Encrypted — (Boolean)

          Indicates whether the volume is encrypted.

        • KmsKeyId — (String)

          The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost.

        • Size — (Integer)

          The size of the volume, in GiBs.

        • SnapshotId — (String)

          The snapshot from which the volume was created, if applicable.

        • State — (String)

          The volume state.

          Possible values include:
          • "creating"
          • "available"
          • "in-use"
          • "deleting"
          • "deleted"
          • "error"
        • VolumeId — (String)

          The ID of the volume.

        • Iops — (Integer)

          The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

        • 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.

          Possible values include:
          • "standard"
          • "io1"
          • "io2"
          • "gp2"
          • "sc1"
          • "st1"
          • "gp3"
        • FastRestored — (Boolean)

          Indicates whether the volume was created using fast snapshot restore.

        • MultiAttachEnabled — (Boolean)

          Indicates whether Amazon EBS Multi-Attach is enabled.

        • Throughput — (Integer)

          The throughput that the volume supports, in MiB/s.

      • NextToken — (String)

        The NextToken value to include in a future DescribeVolumes request. When the results of a DescribeVolumes request exceed MaxResults, this value can be used 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.

See Also:

ec2.waitFor('vpcAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the vpcAvailable state by periodically calling the underlying EC2.describeVpcs() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the vpcAvailable state

var params = {
  // ... input parameters ...
};
ec2.waitFor('vpcAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      One or more filters.

      • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28).

      • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.

      • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.

      • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.

      • dhcp-options-id - The ID of a set of DHCP options.

      • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.

      • ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

      • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.

      • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.

      • is-default - Indicates whether the VPC is the default VPC.

      • owner-id - The ID of the Amazon Web Services account that owns the VPC.

      • state - The state of the VPC (pending | available).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • vpc-id - The ID of the VPC.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • VpcIds — (Array<String>)

      One or more VPC IDs.

      Default: Describes all your VPCs.

    • 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.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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:

      • Vpcs — (Array<map>)

        Information about one or more VPCs.

        • CidrBlock — (String)

          The primary IPv4 CIDR block for the VPC.

        • DhcpOptionsId — (String)

          The ID of the set of DHCP options you've associated with the VPC.

        • State — (String)

          The current state of the VPC.

          Possible values include:
          • "pending"
          • "available"
        • VpcId — (String)

          The ID of the VPC.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC.

        • InstanceTenancy — (String)

          The allowed tenancy of instances launched into the VPC.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • Ipv6CidrBlockAssociationSet — (Array<map>)

          Information about the IPv6 CIDR blocks associated with the VPC.

          • AssociationId — (String)

            The association ID for the IPv6 CIDR block.

          • Ipv6CidrBlock — (String)

            The IPv6 CIDR block.

          • Ipv6CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of the CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

          • NetworkBorderGroup — (String)

            The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1.

          • Ipv6Pool — (String)

            The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

        • CidrBlockAssociationSet — (Array<map>)

          Information about the IPv4 CIDR blocks associated with the VPC.

          • AssociationId — (String)

            The association ID for the IPv4 CIDR block.

          • CidrBlock — (String)

            The IPv4 CIDR block.

          • CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of the CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

        • IsDefault — (Boolean)

          Indicates whether the VPC is the default 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.

      • 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.

See Also:

ec2.waitFor('vpcExists', params = {}, [callback]) ⇒ AWS.Request

Waits for the vpcExists state by periodically calling the underlying EC2.describeVpcs() operation every 1 seconds (at most 5 times).

Examples:

Waiting for the vpcExists state

var params = {
  // ... input parameters ...
};
ec2.waitFor('vpcExists', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      One or more filters.

      • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28).

      • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.

      • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.

      • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.

      • dhcp-options-id - The ID of a set of DHCP options.

      • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.

      • ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

      • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.

      • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.

      • is-default - Indicates whether the VPC is the default VPC.

      • owner-id - The ID of the Amazon Web Services account that owns the VPC.

      • state - The state of the VPC (pending | available).

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • vpc-id - The ID of the VPC.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • VpcIds — (Array<String>)

      One or more VPC IDs.

      Default: Describes all your VPCs.

    • 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.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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:

      • Vpcs — (Array<map>)

        Information about one or more VPCs.

        • CidrBlock — (String)

          The primary IPv4 CIDR block for the VPC.

        • DhcpOptionsId — (String)

          The ID of the set of DHCP options you've associated with the VPC.

        • State — (String)

          The current state of the VPC.

          Possible values include:
          • "pending"
          • "available"
        • VpcId — (String)

          The ID of the VPC.

        • OwnerId — (String)

          The ID of the Amazon Web Services account that owns the VPC.

        • InstanceTenancy — (String)

          The allowed tenancy of instances launched into the VPC.

          Possible values include:
          • "default"
          • "dedicated"
          • "host"
        • Ipv6CidrBlockAssociationSet — (Array<map>)

          Information about the IPv6 CIDR blocks associated with the VPC.

          • AssociationId — (String)

            The association ID for the IPv6 CIDR block.

          • Ipv6CidrBlock — (String)

            The IPv6 CIDR block.

          • Ipv6CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of the CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

          • NetworkBorderGroup — (String)

            The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1.

          • Ipv6Pool — (String)

            The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

        • CidrBlockAssociationSet — (Array<map>)

          Information about the IPv4 CIDR blocks associated with the VPC.

          • AssociationId — (String)

            The association ID for the IPv4 CIDR block.

          • CidrBlock — (String)

            The IPv4 CIDR block.

          • CidrBlockState — (map)

            Information about the state of the CIDR block.

            • State — (String)

              The state of the CIDR block.

              Possible values include:
              • "associating"
              • "associated"
              • "disassociating"
              • "disassociated"
              • "failing"
              • "failed"
            • StatusMessage — (String)

              A message about the status of the CIDR block, if applicable.

        • IsDefault — (Boolean)

          Indicates whether the VPC is the default 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.

      • 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.

See Also:

ec2.waitFor('vpnConnectionAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the vpnConnectionAvailable state by periodically calling the underlying EC2.describeVpnConnections() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the vpnConnectionAvailable state

var params = {
  // ... input parameters ...
};
ec2.waitFor('vpnConnectionAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      One or more filters.

      • customer-gateway-configuration - The configuration information for the customer gateway.

      • customer-gateway-id - The ID of a customer gateway associated with the VPN connection.

      • state - The state of the VPN connection (pending | available | deleting | deleted).

      • option.static-routes-only - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP).

      • route.destination-cidr-block - The destination CIDR block. This corresponds to the subnet used in a customer data center.

      • bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP device.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • type - The type of VPN connection. Currently the only supported type is ipsec.1.

      • vpn-connection-id - The ID of the VPN connection.

      • vpn-gateway-id - The ID of a virtual private gateway associated with the VPN connection.

      • transit-gateway-id - The ID of a transit gateway associated with the VPN connection.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • VpnConnectionIds — (Array<String>)

      One or more VPN connection IDs.

      Default: Describes your VPN connections.

    • 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:

      • VpnConnections — (Array<map>)

        Information about one or more VPN connections.

        • 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.

        • CustomerGatewayId — (String)

          The ID of the customer gateway at your end of the VPN connection.

        • Category — (String)

          The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

        • State — (String)

          The current state of the VPN connection.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • Type — (String)

          The type of VPN connection.

          Possible values include:
          • "ipsec.1"
        • VpnConnectionId — (String)

          The ID of the VPN connection.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

        • TransitGatewayId — (String)

          The ID of the transit gateway associated with the VPN connection.

        • CoreNetworkArn — (String)

          The ARN of the core network.

        • CoreNetworkAttachmentArn — (String)

          The ARN of the core network attachment.

        • GatewayAssociationState — (String)

          The current state of the gateway association.

          Possible values include:
          • "associated"
          • "not-associated"
          • "associating"
          • "disassociating"
        • Options — (map)

          The VPN connection options.

          • EnableAcceleration — (Boolean)

            Indicates whether acceleration is enabled for the VPN connection.

          • StaticRoutesOnly — (Boolean)

            Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

          • LocalIpv4NetworkCidr — (String)

            The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv4NetworkCidr — (String)

            The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

          • LocalIpv6NetworkCidr — (String)

            The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv6NetworkCidr — (String)

            The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

          • TunnelInsideIpVersion — (String)

            Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

            Possible values include:
            • "ipv4"
            • "ipv6"
          • TunnelOptions — (Array<map>)

            Indicates the VPN tunnel options.

            • OutsideIpAddress — (String)

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr — (String)

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr — (String)

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey — (String)

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds — (Integer)

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds — (Integer)

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds — (Integer)

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage — (Integer)

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize — (Integer)

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds — (Integer)

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction — (String)

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The encryption algorithm.

            • Phase1IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The integrity algorithm.

            • Phase1DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • IkeVersions — (Array<map>)

              The IKE versions that are permitted for the VPN tunnel.

              • Value — (String)

                The IKE version.

            • StartupAction — (String)

              The action to take when the establishing the VPN tunnels for a VPN connection.

        • 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"
        • 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.

          • AcceptedRouteCount — (Integer)

            The number of accepted routes.

          • LastStatusChange — (Date)

            The date and time of the last change in status.

          • 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"
          • StatusMessage — (String)

            If an error occurs, a description of the error.

          • CertificateArn — (String)

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

ec2.waitFor('vpnConnectionDeleted', params = {}, [callback]) ⇒ AWS.Request

Waits for the vpnConnectionDeleted state by periodically calling the underlying EC2.describeVpnConnections() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the vpnConnectionDeleted state

var params = {
  // ... input parameters ...
};
ec2.waitFor('vpnConnectionDeleted', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      One or more filters.

      • customer-gateway-configuration - The configuration information for the customer gateway.

      • customer-gateway-id - The ID of a customer gateway associated with the VPN connection.

      • state - The state of the VPN connection (pending | available | deleting | deleted).

      • option.static-routes-only - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP).

      • route.destination-cidr-block - The destination CIDR block. This corresponds to the subnet used in a customer data center.

      • bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP device.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • type - The type of VPN connection. Currently the only supported type is ipsec.1.

      • vpn-connection-id - The ID of the VPN connection.

      • vpn-gateway-id - The ID of a virtual private gateway associated with the VPN connection.

      • transit-gateway-id - The ID of a transit gateway associated with the VPN connection.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • VpnConnectionIds — (Array<String>)

      One or more VPN connection IDs.

      Default: Describes your VPN connections.

    • 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:

      • VpnConnections — (Array<map>)

        Information about one or more VPN connections.

        • 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.

        • CustomerGatewayId — (String)

          The ID of the customer gateway at your end of the VPN connection.

        • Category — (String)

          The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

        • State — (String)

          The current state of the VPN connection.

          Possible values include:
          • "pending"
          • "available"
          • "deleting"
          • "deleted"
        • Type — (String)

          The type of VPN connection.

          Possible values include:
          • "ipsec.1"
        • VpnConnectionId — (String)

          The ID of the VPN connection.

        • VpnGatewayId — (String)

          The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

        • TransitGatewayId — (String)

          The ID of the transit gateway associated with the VPN connection.

        • CoreNetworkArn — (String)

          The ARN of the core network.

        • CoreNetworkAttachmentArn — (String)

          The ARN of the core network attachment.

        • GatewayAssociationState — (String)

          The current state of the gateway association.

          Possible values include:
          • "associated"
          • "not-associated"
          • "associating"
          • "disassociating"
        • Options — (map)

          The VPN connection options.

          • EnableAcceleration — (Boolean)

            Indicates whether acceleration is enabled for the VPN connection.

          • StaticRoutesOnly — (Boolean)

            Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

          • LocalIpv4NetworkCidr — (String)

            The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv4NetworkCidr — (String)

            The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

          • LocalIpv6NetworkCidr — (String)

            The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv6NetworkCidr — (String)

            The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

          • TunnelInsideIpVersion — (String)

            Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

            Possible values include:
            • "ipv4"
            • "ipv6"
          • TunnelOptions — (Array<map>)

            Indicates the VPN tunnel options.

            • OutsideIpAddress — (String)

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr — (String)

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr — (String)

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey — (String)

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds — (Integer)

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds — (Integer)

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds — (Integer)

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage — (Integer)

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize — (Integer)

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds — (Integer)

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction — (String)

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms — (Array<map>)

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The encryption algorithm.

            • Phase1IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (String)

                The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms — (Array<map>)

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (String)

                The integrity algorithm.

            • Phase1DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers — (Array<map>)

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • Value — (Integer)

                The Diffie-Hellmann group number.

            • IkeVersions — (Array<map>)

              The IKE versions that are permitted for the VPN tunnel.

              • Value — (String)

                The IKE version.

            • StartupAction — (String)

              The action to take when the establishing the VPN tunnels for a VPN connection.

        • 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"
        • 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.

          • AcceptedRouteCount — (Integer)

            The number of accepted routes.

          • LastStatusChange — (Date)

            The date and time of the last change in status.

          • 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"
          • StatusMessage — (String)

            If an error occurs, a description of the error.

          • CertificateArn — (String)

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

ec2.waitFor('vpcPeeringConnectionExists', params = {}, [callback]) ⇒ AWS.Request

Waits for the vpcPeeringConnectionExists state by periodically calling the underlying EC2.describeVpcPeeringConnections() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the vpcPeeringConnectionExists state

var params = {
  // ... input parameters ...
};
ec2.waitFor('vpcPeeringConnectionExists', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      One or more filters.

      • accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC.

      • accepter-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the accepter VPC.

      • accepter-vpc-info.vpc-id - The ID of the accepter VPC.

      • expiration-time - The expiration date and time for the VPC peering connection.

      • requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC.

      • requester-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the requester VPC.

      • requester-vpc-info.vpc-id - The ID of the requester VPC.

      • status-code - The status of the VPC peering connection (pending-acceptance | failed | expired | provisioning | active | deleting | deleted | rejected).

      • status-message - A message that provides more information about the status of the VPC peering connection, if applicable.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • vpc-peering-connection-id - The ID of the VPC peering connection.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • VpcPeeringConnectionIds — (Array<String>)

      One or more VPC peering connection IDs.

      Default: Describes all your VPC peering connections.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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:

      • VpcPeeringConnections — (Array<map>)

        Information about the VPC peering connections.

        • AccepterVpcInfo — (map)

          Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock — (String)

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet — (Array<map>)

            The IPv6 CIDR block for the VPC.

            • Ipv6CidrBlock — (String)

              The IPv6 CIDR block.

          • CidrBlockSet — (Array<map>)

            Information about the IPv4 CIDR blocks for the VPC.

            • CidrBlock — (String)

              The IPv4 CIDR block.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions — (map)

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer 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.

          • VpcId — (String)

            The ID of the VPC.

          • Region — (String)

            The Region in which the VPC is located.

        • ExpirationTime — (Date)

          The time that an unaccepted VPC peering connection will expire.

        • RequesterVpcInfo — (map)

          Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock — (String)

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet — (Array<map>)

            The IPv6 CIDR block for the VPC.

            • Ipv6CidrBlock — (String)

              The IPv6 CIDR block.

          • CidrBlockSet — (Array<map>)

            Information about the IPv4 CIDR blocks for the VPC.

            • CidrBlock — (String)

              The IPv4 CIDR block.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions — (map)

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer 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.

          • VpcId — (String)

            The ID of the VPC.

          • Region — (String)

            The Region in which the VPC is located.

        • 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.

      • 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.

See Also:

ec2.waitFor('vpcPeeringConnectionDeleted', params = {}, [callback]) ⇒ AWS.Request

Waits for the vpcPeeringConnectionDeleted state by periodically calling the underlying EC2.describeVpcPeeringConnections() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the vpcPeeringConnectionDeleted state

var params = {
  // ... input parameters ...
};
ec2.waitFor('vpcPeeringConnectionDeleted', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • Filters — (Array<map>)

      One or more filters.

      • accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC.

      • accepter-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the accepter VPC.

      • accepter-vpc-info.vpc-id - The ID of the accepter VPC.

      • expiration-time - The expiration date and time for the VPC peering connection.

      • requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC.

      • requester-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the requester VPC.

      • requester-vpc-info.vpc-id - The ID of the requester VPC.

      • status-code - The status of the VPC peering connection (pending-acceptance | failed | expired | provisioning | active | deleting | deleted | rejected).

      • status-message - A message that provides more information about the status of the VPC peering connection, if applicable.

      • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

      • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • vpc-peering-connection-id - The ID of the VPC peering connection.

      • Name — (String)

        The name of the filter. Filter names are case-sensitive.

      • Values — (Array<String>)

        The filter values. Filter values are case-sensitive.

    • 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.

    • VpcPeeringConnectionIds — (Array<String>)

      One or more VPC peering connection IDs.

      Default: Describes all your VPC peering connections.

    • NextToken — (String)

      The token for the next page of results.

    • MaxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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:

      • VpcPeeringConnections — (Array<map>)

        Information about the VPC peering connections.

        • AccepterVpcInfo — (map)

          Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock — (String)

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet — (Array<map>)

            The IPv6 CIDR block for the VPC.

            • Ipv6CidrBlock — (String)

              The IPv6 CIDR block.

          • CidrBlockSet — (Array<map>)

            Information about the IPv4 CIDR blocks for the VPC.

            • CidrBlock — (String)

              The IPv4 CIDR block.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions — (map)

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer 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.

          • VpcId — (String)

            The ID of the VPC.

          • Region — (String)

            The Region in which the VPC is located.

        • ExpirationTime — (Date)

          The time that an unaccepted VPC peering connection will expire.

        • RequesterVpcInfo — (map)

          Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock — (String)

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet — (Array<map>)

            The IPv6 CIDR block for the VPC.

            • Ipv6CidrBlock — (String)

              The IPv6 CIDR block.

          • CidrBlockSet — (Array<map>)

            Information about the IPv4 CIDR blocks for the VPC.

            • CidrBlock — (String)

              The IPv4 CIDR block.

          • OwnerId — (String)

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions — (map)

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowDnsResolutionFromRemoteVpc — (Boolean)

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer 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.

          • VpcId — (String)

            The ID of the VPC.

          • Region — (String)

            The Region in which the VPC is located.

        • 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.

      • 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.

See Also: