We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

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

You can access the features of Amazon Elastic Compute Cloud (Amazon EC2) programmatically. For more information, see the Amazon EC2 Developer Guide.

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, internetGatewayExists, keyPairExists, natGatewayAvailable, natGatewayDeleted, networkInterfaceAvailable, passwordDataAvailable, snapshotCompleted, snapshotImported, securityGroupExists, spotInstanceRequestFulfilled, storeImageTaskComplete, 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'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

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

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

Accepts an Elastic IP address transfer. For more information, see Accept a transferred Elastic IP address in the Amazon VPC User Guide.

Service Reference:

Examples:

Calling the acceptAddressTransfer operation

var params = {
  Address: 'STRING_VALUE', /* required */
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.acceptAddressTransfer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The Elastic IP address you are accepting for transfer.

    • TagSpecifications — (Array<map>)

      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.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 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:

      • AddressTransfer — (map)

        An Elastic IP address transfer.

        • PublicIp — (String)

          The Elastic IP address being transferred.

        • AllocationId — (String)

          The allocation ID of an Elastic IP address.

        • TransferAccountId — (String)

          The ID of the account that you want to transfer the Elastic IP address to.

        • TransferOfferExpirationTimestamp — (Date)

          The timestamp when the Elastic IP address transfer expired. When the source account starts the transfer, the transfer account has seven hours to allocate the Elastic IP address to complete the transfer, or the Elastic IP address will return to its original owner.

        • TransferOfferAcceptedTimestamp — (Date)

          The timestamp when the Elastic IP address transfer was accepted.

        • AddressTransferStatus — (String)

          The Elastic IP address transfer status.

          Possible values include:
          • "pending"
          • "disabled"
          • "accepted"

Returns:

  • (AWS.Request)

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

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)

        Information about 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.

        • AccepterTransitGatewayAttachmentId — (String)

          The ID of the accepter transit gateway attachment.

        • RequesterTgwInfo — (map)

          Information about the requester transit gateway.

          • TransitGatewayId — (String)

            The ID of the transit gateway.

          • CoreNetworkId — (String)

            The ID of the core network where the transit gateway peer is located.

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

          • CoreNetworkId — (String)

            The ID of the core network where the transit gateway peer is located.

          • OwnerId — (String)

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

          • Region — (String)

            The Region of the transit gateway.

        • Options — (map)

          Details about the transit gateway peering attachment.

          • DynamicRouting — (String)

            Describes whether dynamic routing is enabled or disabled for the transit gateway peering attachment.

            Possible values include:
            • "enable"
            • "disable"
        • 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 256 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"
          • SecurityGroupReferencingSupport — (String)
            Note: This parameter is in preview and may not be available for your account.

            Enables you to reference a security group across VPCs attached to a transit gateway. Use this option to simplify security group management and control of instance-to-instance traffic across VPCs that are connected by transit gateway. You can also use this option to migrate from VPC peering (which was the only option that supported security group referencing) to transit gateways (which now also support security group referencing). This option is disabled by default and there are no additional costs to use this feature.

            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 256 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Accepts 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 the 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 = {
  VpcPeeringConnectionId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
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)

              Deprecated.

            • AllowEgressFromLocalVpcToRemoteClassicLink — (Boolean)

              Deprecated.

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

              Deprecated.

            • AllowEgressFromLocalVpcToRemoteClassicLink — (Boolean)

              Deprecated.

          • 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 256 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 */
  Asn: 'STRING_VALUE',
  DryRun: true || false,
  NetworkBorderGroup: 'STRING_VALUE'
};
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.

    • Asn — (String)

      The public 2-byte or 4-byte ASN that you want to advertise.

    • DryRun — (Boolean)

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

    • NetworkBorderGroup — (String)

      If you have Local Zones enabled, you can choose a network border group for Local Zones when you provision and advertise a BYOIPv4 CIDR. Choose the network border group carefully as the EIP and the Amazon Web Services resource it is associated with must reside in the same network border group.

      You can provision BYOIP address ranges to and advertise them in the following Local Zone network border groups:

      • us-east-1-dfw-2

      • us-west-2-lax-1

      • us-west-2-phx-2

      Note: You cannot provision or advertise BYOIPv6 address ranges in Local Zones at this time.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

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

        • AsnAssociations — (Array<map>)

          The BYOIP CIDR associations with ASNs.

          • Asn — (String)

            The association's ASN.

          • Cidr — (String)

            The association's CIDR.

          • StatusMessage — (String)

            The association's status message.

          • State — (String)

            The association's state.

            Possible values include:
            • "disassociated"
            • "failed-disassociation"
            • "failed-association"
            • "pending-disassociation"
            • "pending-association"
            • "associated"
        • StatusMessage — (String)

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

        • State — (String)

          The state of the address range.

          • advertised: The address range is being advertised to the internet by Amazon Web Services.

          • deprovisioned: The address range is deprovisioned.

          • failed-deprovision: The request to deprovision the address range was unsuccessful. Ensure that all EIPs from the range have been deallocated and try again.

          • failed-provision: The request to provision the address range was unsuccessful.

          • pending-deprovision: You’ve submitted a request to deprovision an address range and it's pending.

          • pending-provision: You’ve submitted a request to provision an address range and it's pending.

          • provisioned: The address range is provisioned and can be advertised. The range is not currently advertised.

          • provisioned-not-publicly-advertisable: The address range is provisioned and cannot be advertised.

          Possible values include:
          • "advertised"
          • "deprovisioned"
          • "failed-deprovision"
          • "failed-provision"
          • "pending-deprovision"
          • "pending-provision"
          • "provisioned"
          • "provisioned-not-publicly-advertisable"
        • NetworkBorderGroup — (String)

          If you have Local Zones enabled, you can choose a network border group for Local Zones when you provision and advertise a BYOIPv4 CIDR. Choose the network border group carefully as the EIP and the Amazon Web Services resource it is associated with must reside in the same network border group.

          You can provision BYOIP address ranges to and advertise them in the following Local Zone network border groups:

          • us-east-1-dfw-2

          • us-west-2-lax-1

          • us-west-2-phx-2

          Note: You cannot provision or advertise BYOIPv6 address ranges in Local Zones at this time.

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 EC2 User Guide.

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. To attempt to recover an Elastic IP address that you released, specify it in this operation.

For more information, see Elastic IP Addresses in the Amazon EC2 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


/* This example allocates an Elastic IP address. */

 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 = {
    AllocationId: "eipalloc-64d5890a", 
    Domain: "vpc", 
    NetworkBorderGroup: "us-east-1", 
    PublicIp: "203.0.113.0", 
    PublicIpv4Pool: "amazon"
   }
   */
 });

Calling the allocateAddress operation

var params = {
  Address: 'STRING_VALUE',
  CustomerOwnedIpv4Pool: 'STRING_VALUE',
  Domain: vpc | standard,
  DryRun: true || false,
  IpamPoolId: 'STRING_VALUE',
  NetworkBorderGroup: 'STRING_VALUE',
  PublicIpv4Pool: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      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)

      The network (vpc).

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

      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.

    • 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"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 Unicode characters.

    • IpamPoolId — (String)

      The ID of an IPAM pool.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

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

        The ID that represents the allocation of the Elastic IP address.

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

        The network (vpc).

        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 that reside in a subnet in a Wavelength Zone.

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 */
  AssetIds: [
    'STRING_VALUE',
    /* more items */
  ],
  AutoPlacement: on | off,
  ClientToken: 'STRING_VALUE',
  HostMaintenance: on | off,
  HostRecovery: on | off,
  InstanceFamily: 'STRING_VALUE',
  InstanceType: 'STRING_VALUE',
  OutpostArn: 'STRING_VALUE',
  Quantity: 'NUMBER_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      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: off

      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. If you are allocating the Dedicated Hosts on an Outpost, and you specify AssetIds, you can omit this parameter. In this case, Amazon EC2 allocates a Dedicated Host on each specified hardware asset. If you specify both AssetIds and Quantity, then the value that you specify for Quantity must be equal to the number of asset IDs specified.

    • 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"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 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"
    • OutpostArn — (String)

      The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to allocate the Dedicated Host. If you specify OutpostArn, you can optionally specify AssetIds.

      If you are allocating the Dedicated Host in a Region, omit this parameter.

    • HostMaintenance — (String)

      Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see Host maintenance in the Amazon EC2 User Guide.

      Possible values include:
      • "on"
      • "off"
    • AssetIds — (Array<String>)

      The IDs of the Outpost hardware assets on which to allocate the Dedicated Hosts. Targeting specific hardware assets on an Outpost can help to minimize latency between your workloads. This parameter is supported only if you specify OutpostArn. If you are allocating the Dedicated Hosts in a Region, omit this parameter.

      • If you specify this parameter, you can omit Quantity. In this case, Amazon EC2 allocates a Dedicated Host on each specified hardware asset.

      • If you specify both AssetIds and Quantity, then the value for Quantity must be equal to the number of asset IDs specified.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

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

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

Allocate a CIDR from an IPAM pool. The Region you use should be the IPAM pool locale. The locale is the Amazon Web Services Region where this IPAM pool is available for allocations.

In IPAM, an allocation is a CIDR assignment from an IPAM pool to another IPAM pool or to a resource. For more information, see Allocate CIDRs in the Amazon VPC IPAM User Guide.

Note: This action creates an allocation with strong consistency. The returned CIDR will not overlap with any other allocations from the same pool.

Service Reference:

Examples:

Calling the allocateIpamPoolCidr operation

var params = {
  IpamPoolId: 'STRING_VALUE', /* required */
  AllowedCidrs: [
    'STRING_VALUE',
    /* more items */
  ],
  Cidr: 'STRING_VALUE',
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DisallowedCidrs: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  NetmaskLength: 'NUMBER_VALUE',
  PreviewNextCidr: true || false
};
ec2.allocateIpamPoolCidr(params, 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)

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

    • IpamPoolId — (String)

      The ID of the IPAM pool from which you would like to allocate a CIDR.

    • Cidr — (String)

      The CIDR you would like to allocate from the IPAM pool. Note the following:

      • If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or the CIDR.

      • If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength allocation rule will be ignored.

      Possible values: Any available IPv4 or IPv6 CIDR.

    • NetmaskLength — (Integer)

      The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following:

      • If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or the CIDR.

      • If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength allocation rule will be ignored.

      Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

    • ClientToken — (String)

      A 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.
    • Description — (String)

      A description for the allocation.

    • PreviewNextCidr — (Boolean)

      A preview of the next available CIDR in a pool.

    • AllowedCidrs — (Array<String>)

      Include a particular CIDR range that can be returned by the pool. Allowed CIDRs are only allowed if using netmask length for allocation.

    • DisallowedCidrs — (Array<String>)

      Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if using netmask length for allocation.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • IpamPoolAllocation — (map)

        Information about the allocation created.

        • Cidr — (String)

          The CIDR for the allocation. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is 10.24.34.0/23. An IPv6 CIDR example is 2001:DB8::/32.

        • IpamPoolAllocationId — (String)

          The ID of an allocation.

        • Description — (String)

          A description of the pool allocation.

        • ResourceId — (String)

          The ID of the resource.

        • ResourceType — (String)

          The type of the resource.

          Possible values include:
          • "ipam-pool"
          • "vpc"
          • "ec2-public-ipv4-pool"
          • "custom"
          • "subnet"
          • "eip"
        • ResourceRegion — (String)

          The Amazon Web Services Region of the resource.

        • ResourceOwner — (String)

          The owner of the resource.

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.

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 network interfaces in the Amazon EC2 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>)

      The 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 more information about Elastic IP addresses, see Elastic IP Addresses in the Amazon EC2 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 network interfaces in the Amazon EC2 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>)

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

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

Assigns private IPv4 addresses to a private NAT gateway. For more information, see Work with NAT gateways in the Amazon VPC User Guide.

Service Reference:

Examples:

Calling the assignPrivateNatGatewayAddress operation

var params = {
  NatGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  PrivateIpAddressCount: 'NUMBER_VALUE',
  PrivateIpAddresses: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.assignPrivateNatGatewayAddress(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The ID of the NAT gateway.

    • PrivateIpAddresses — (Array<String>)

      The private IPv4 addresses you want to assign to the private NAT gateway.

    • PrivateIpAddressCount — (Integer)

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

    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without 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:

      • NatGatewayId — (String)

        The ID of the NAT gateway.

      • NatGatewayAddresses — (Array<map>)

        NAT gateway IP addresses.

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

        • AssociationId — (String)

          [Public NAT gateway only] The association ID of the Elastic IP address that's associated with the NAT gateway.

        • IsPrimary — (Boolean)

          Defines if the IP address is the primary address.

        • FailureMessage — (String)

          The address failure message.

        • Status — (String)

          The address status.

          Possible values include:
          • "assigning"
          • "unassigning"
          • "associating"
          • "disassociating"
          • "succeeded"
          • "failed"

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.

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.

[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


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

 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"
   }
   */
 });

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)

      The allocation ID. This is required.

    • InstanceId — (String)

      The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.

    • PublicIp — (String)

      Deprecated.

    • AllowReassociation — (Boolean)

      Reassociation is automatic, but 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)

      The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

      You can specify either the instance ID or the network interface ID, but not both.

    • PrivateIpAddress — (String)

      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)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (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 option sets in the Amazon VPC 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 location 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', /* required */
  RoleArn: 'STRING_VALUE', /* required */
  DryRun: true || false
};
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 256 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 256 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 256 Unicode characters.

Returns:

  • (AWS.Request)

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

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

Associates your Autonomous System Number (ASN) with a BYOIP CIDR that you own in the same Amazon Web Services Region. For more information, see Tutorial: Bring your ASN to IPAM in the Amazon VPC IPAM guide.

After the association succeeds, the ASN is eligible for advertisement. You can view the association with DescribeByoipCidrs. You can advertise the CIDR with AdvertiseByoipCidr.

Service Reference:

Examples:

Calling the associateIpamByoasn operation

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

    • Asn — (String)

      A public 2-byte or 4-byte ASN.

    • Cidr — (String)

      The BYOIP CIDR you want to associate with an ASN.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • AsnAssociation — (map)

        The ASN and BYOIP CIDR association.

        • Asn — (String)

          The association's ASN.

        • Cidr — (String)

          The association's CIDR.

        • StatusMessage — (String)

          The association's status message.

        • State — (String)

          The association's state.

          Possible values include:
          • "disassociated"
          • "failed-disassociation"
          • "failed-association"
          • "pending-disassociation"
          • "pending-association"
          • "associated"

Returns:

  • (AWS.Request)

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

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

Associates an IPAM resource discovery with an Amazon VPC IPAM. A resource discovery is an IPAM component that enables IPAM to manage and monitor resources that belong to the owning account.

Service Reference:

Examples:

Calling the associateIpamResourceDiscovery operation

var params = {
  IpamId: 'STRING_VALUE', /* required */
  IpamResourceDiscoveryId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.associateIpamResourceDiscovery(params, 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)

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

    • IpamId — (String)

      An IPAM ID.

    • IpamResourceDiscoveryId — (String)

      A resource discovery ID.

    • TagSpecifications — (Array<map>)

      Tag specifications.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 Unicode characters.

    • ClientToken — (String)

      A client token.

      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:

      • IpamResourceDiscoveryAssociation — (map)

        A resource discovery association. An associated resource discovery is a resource discovery that has been associated with an IPAM.

        • OwnerId — (String)

          The Amazon Web Services account ID of the resource discovery owner.

        • IpamResourceDiscoveryAssociationId — (String)

          The resource discovery association ID.

        • IpamResourceDiscoveryAssociationArn — (String)

          The resource discovery association Amazon Resource Name (ARN).

        • IpamResourceDiscoveryId — (String)

          The resource discovery ID.

        • IpamId — (String)

          The IPAM ID.

        • IpamArn — (String)

          The IPAM ARN.

        • IpamRegion — (String)

          The IPAM home Region.

        • IsDefault — (Boolean)

          Defines if the resource discovery is the default. When you create an IPAM, a default resource discovery is created for your IPAM and it's associated with your IPAM.

        • ResourceDiscoveryStatus — (String)

          The resource discovery status.

          • active - Connection or permissions required to read the results of the resource discovery are intact.

          • not-found - Connection or permissions required to read the results of the resource discovery are broken. This may happen if the owner of the resource discovery stopped sharing it or deleted the resource discovery. Verify the resource discovery still exists and the Amazon Web Services RAM resource share is still intact.

          Possible values include:
          • "active"
          • "not-found"
        • State — (String)

          The lifecycle state of the association when you associate or disassociate a resource discovery.

          • associate-in-progress - Resource discovery is being associated.

          • associate-complete - Resource discovery association is complete.

          • associate-failed - Resource discovery association has failed.

          • disassociate-in-progress - Resource discovery is being disassociated.

          • disassociate-complete - Resource discovery disassociation is complete.

          • disassociate-failed - Resource discovery disassociation has failed.

          • isolate-in-progress - Amazon Web Services account that created the resource discovery association has been removed and the resource discovery associatation is being isolated.

          • isolate-complete - Resource discovery isolation is complete..

          • restore-in-progress - Resource discovery is being restored.

          Possible values include:
          • "associate-in-progress"
          • "associate-complete"
          • "associate-failed"
          • "disassociate-in-progress"
          • "disassociate-complete"
          • "disassociate-failed"
          • "isolate-in-progress"
          • "isolate-complete"
          • "restore-in-progress"
        • Tags — (Array<map>)

          A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value. You can use tags to search and filter your resources or track your Amazon Web Services costs.

          • Key — (String)

            The key of the tag.

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

          • Value — (String)

            The value of the tag.

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

Returns:

  • (AWS.Request)

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

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

Associates Elastic IP addresses (EIPs) and private IPv4 addresses with a public NAT gateway. For more information, see Work with NAT gateways in the Amazon VPC User Guide.

By default, you can associate up to 2 Elastic IP addresses per public NAT gateway. You can increase the limit by requesting a quota adjustment. For more information, see Elastic IP address quotas in the Amazon VPC User Guide.

When you associate an EIP or secondary EIPs with a public NAT gateway, the network border group of the EIPs must match the network border group of the Availability Zone (AZ) that the public NAT gateway is in. If it's not the same, the EIP will fail to associate. You can see the network border group for the subnet's AZ by viewing the details of the subnet. Similarly, you can view the network border group of an EIP by viewing the details of the EIP address. For more information about network border groups and EIPs, see Allocate an Elastic IP address in the Amazon VPC User Guide.

Service Reference:

Examples:

Calling the associateNatGatewayAddress operation

var params = {
  AllocationIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  NatGatewayId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  PrivateIpAddresses: [
    'STRING_VALUE',
    /* more items */
  ]
};
ec2.associateNatGatewayAddress(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The ID of the NAT gateway.

    • AllocationIds — (Array<String>)

      The allocation IDs of EIPs that you want to associate with your NAT gateway.

    • PrivateIpAddresses — (Array<String>)

      The private IPv4 addresses that you want to assign to the NAT 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:

      • NatGatewayId — (String)

        The ID of the NAT gateway.

      • NatGatewayAddresses — (Array<map>)

        The IP addresses.

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

        • AssociationId — (String)

          [Public NAT gateway only] The association ID of the Elastic IP address that's associated with the NAT gateway.

        • IsPrimary — (Boolean)

          Defines if the IP address is the primary address.

        • FailureMessage — (String)

          The address failure message.

        • Status — (String)

          The address status.

          Possible values include:
          • "assigning"
          • "unassigning"
          • "associating"
          • "disassociating"
          • "succeeded"
          • "failed"

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

Service Reference:

Examples:

Calling the associateSubnetCidrBlock operation

var params = {
  SubnetId: 'STRING_VALUE', /* required */
  Ipv6CidrBlock: 'STRING_VALUE',
  Ipv6IpamPoolId: 'STRING_VALUE',
  Ipv6NetmaskLength: 'NUMBER_VALUE'
};
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.

    • SubnetId — (String)

      The ID of your subnet.

    • Ipv6IpamPoolId — (String)

      An IPv6 IPAM pool ID.

    • Ipv6NetmaskLength — (Integer)

      An IPv6 netmask length.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (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 association.

        • AssociationId — (String)

          The ID of the association.

        • Ipv6CidrBlock — (String)

          The IPv6 CIDR block.

        • Ipv6CidrBlockState — (map)

          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.

        • Ipv6AddressAttribute — (String)

          Public IPv6 addresses are those advertised on the internet from Amazon Web Services. Private IP addresses are not and cannot be advertised on the internet from Amazon Web Services.

          Possible values include:
          • "public"
          • "private"
        • IpSource — (String)

          The source that allocated the IP address space. byoip or amazon indicates public IP address space allocated by Amazon or space that you have allocated with Bring your own IP (BYOIP). none indicates private space.

          Possible values include:
          • "amazon"
          • "byoip"
          • "none"
      • 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 = {
  SubnetIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  TransitGatewayAttachmentId: 'STRING_VALUE', /* required */
  TransitGatewayMulticastDomainId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
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.

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

Associates the specified transit gateway attachment with a transit gateway policy table.

Examples:

Calling the associateTransitGatewayPolicyTable operation

var params = {
  TransitGatewayAttachmentId: 'STRING_VALUE', /* required */
  TransitGatewayPolicyTableId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.associateTransitGatewayPolicyTable(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The ID of the transit gateway policy table to associate with the transit gateway attachment.

    • TransitGatewayAttachmentId — (String)

      The ID of the transit gateway attachment to associate with the policy 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:

      • Association — (map)

        Describes the association of a transit gateway and a transit gateway policy table.

        • TransitGatewayPolicyTableId — (String)

          The ID of the transit gateway policy table.

        • TransitGatewayAttachmentId — (String)

          The ID of the transit gateway attachment.

        • ResourceId — (String)

          The resource ID of the transit gateway attachment.

        • ResourceType — (String)

          The resource type for the transit gateway policy table association.

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

          The state of the transit gateway policy table association.

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

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

Associates a branch network interface with a trunk network interface.

Before you create the association, use CreateNetworkInterface command and set the 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 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.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (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 256 Unicode characters.

      • ClientToken — (String)

        Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring 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).

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 IP addressing for your VPCs and subnets in the Amazon VPC User Guide.

Service Reference:

Examples:

Calling the associateVpcCidrBlock operation

var params = {
  VpcId: 'STRING_VALUE', /* required */
  AmazonProvidedIpv6CidrBlock: true || false,
  CidrBlock: 'STRING_VALUE',
  Ipv4IpamPoolId: 'STRING_VALUE',
  Ipv4NetmaskLength: 'NUMBER_VALUE',
  Ipv6CidrBlock: 'STRING_VALUE',
  Ipv6CidrBlockNetworkBorderGroup: 'STRING_VALUE',
  Ipv6IpamPoolId: 'STRING_VALUE',
  Ipv6NetmaskLength: 'NUMBER_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.

    • Ipv4IpamPoolId — (String)

      Associate a CIDR allocated from an IPv4 IPAM pool to a VPC. For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide.

    • Ipv4NetmaskLength — (Integer)

      The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide.

    • Ipv6IpamPoolId — (String)

      Associates a CIDR allocated from an IPv6 IPAM pool to a VPC. For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide.

    • Ipv6NetmaskLength — (Integer)

      The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM 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:

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

        • Ipv6AddressAttribute — (String)

          Public IPv6 addresses are those advertised on the internet from Amazon Web Services. Private IP addresses are not and cannot be advertised on the internet from Amazon Web Services.

          Possible values include:
          • "public"
          • "private"
        • IpSource — (String)

          The source that allocated the IP address space. byoip or amazon indicates public IP address space allocated by Amazon or space that you have allocated with Bring your own IP (BYOIP). none indicates private space.

          Possible values include:
          • "amazon"
          • "byoip"
          • "none"
      • 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

Note: This action is deprecated.

Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC 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 IDs of the security groups. You cannot specify security groups from a different VPC.

    • InstanceId — (String)

      The ID of the EC2-Classic instance.

    • VpcId — (String)

      The ID of the 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, see Internet gateways in the Amazon VPC 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,
  EnaSrdSpecification: {
    EnaSrdEnabled: true || false,
    EnaSrdUdpSpecification: {
      EnaSrdUdpEnabled: 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.

    • EnaSrdSpecification — (map)

      Configures ENA Express for the network interface that this action attaches to the instance.

      • EnaSrdEnabled — (Boolean)

        Indicates whether ENA Express is enabled for the network interface.

      • EnaSrdUdpSpecification — (map)

        Configures ENA Express for UDP network traffic.

        • EnaSrdUdpEnabled — (Boolean)

          Indicates whether UDP traffic to and from the instance uses ENA Express. To specify this setting, you must first enable ENA Express.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

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

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

Attaches the specified Amazon Web Services Verified Access trust provider to the specified Amazon Web Services Verified Access instance.

Examples:

Calling the attachVerifiedAccessTrustProvider operation

var params = {
  VerifiedAccessInstanceId: 'STRING_VALUE', /* required */
  VerifiedAccessTrustProviderId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false
};
ec2.attachVerifiedAccessTrustProvider(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

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

      The ID of the Verified Access instance.

    • VerifiedAccessTrustProviderId — (String)

      The ID of the Verified Access trust provider.

    • ClientToken — (String)

      A unique, case-sensitive token that you provide to ensure idempotency of your modification 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.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • VerifiedAccessTrustProvider — (map)

        Details about the Verified Access trust provider.

        • VerifiedAccessTrustProviderId — (String)

          The ID of the Amazon Web Services Verified Access trust provider.

        • Description — (String)

          A description for the Amazon Web Services Verified Access trust provider.

        • TrustProviderType — (String)

          The type of Verified Access trust provider.

          Possible values include:
          • "user"
          • "device"
        • UserTrustProviderType — (String)

          The type of user-based trust provider.

          Possible values include:
          • "iam-identity-center"
          • "oidc"
        • DeviceTrustProviderType — (String)

          The type of device-based trust provider.

          Possible values include:
          • "jamf"
          • "crowdstrike"
          • "jumpcloud"
        • OidcOptions — (map)

          The options for an OpenID Connect-compatible user-identity trust provider.

          • Issuer — (String)

            The OIDC issuer.

          • AuthorizationEndpoint — (String)

            The OIDC authorization endpoint.

          • TokenEndpoint — (String)

            The OIDC token endpoint.

          • UserInfoEndpoint — (String)

            The OIDC user info endpoint.

          • ClientId — (String)

            The client identifier.

          • ClientSecret — (String)

            The client secret.

          • Scope — (String)

            The OpenID Connect (OIDC) scope specified.

        • DeviceOptions — (map)

          The options for device-identity trust provider.

          • TenantId — (String)

            The ID of the tenant application with the device-identity provider.

          • PublicSigningKeyUrl — (String)

            The URL Amazon Web Services Verified Access will use to verify the authenticity of the device tokens.

        • PolicyReferenceName — (String)

          The identifier to be used when working with policy rules.

        • CreationTime — (String)

          The creation time.

        • LastUpdatedTime — (String)

          The last updated time.

        • 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 256 Unicode characters.

        • SseSpecification — (map)

          The options in use for server side encryption.

          • CustomerManagedKeyEnabled — (Boolean)

            Indicates whether customer managed KMS keys are in use for server side encryption.

            Valid values: True | False

          • KmsKeyArn — (String)

            The ARN of the KMS key.

      • VerifiedAccessInstance — (map)

        Details about the Verified Access instance.

        • VerifiedAccessInstanceId — (String)

          The ID of the Amazon Web Services Verified Access instance.

        • Description — (String)

          A description for the Amazon Web Services Verified Access instance.

        • VerifiedAccessTrustProviders — (Array<map>)

          The IDs of the Amazon Web Services Verified Access trust providers.

          • VerifiedAccessTrustProviderId — (String)

            The ID of the trust provider.

          • Description — (String)

            The description of trust provider.

          • TrustProviderType — (String)

            The type of trust provider (user- or device-based).

            Possible values include:
            • "user"
            • "device"
          • UserTrustProviderType — (String)

            The type of user-based trust provider.

            Possible values include:
            • "iam-identity-center"
            • "oidc"
          • DeviceTrustProviderType — (String)

            The type of device-based trust provider.

            Possible values include:
            • "jamf"
            • "crowdstrike"
            • "jumpcloud"
        • CreationTime — (String)

          The creation time.

        • LastUpdatedTime — (String)

          The last updated time.

        • 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 256 Unicode characters.

        • FipsEnabled — (Boolean)

          Indicates whether support for Federal Information Processing Standards (FIPS) is enabled on the instance.

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

        If the volume is attached to a Fargate task, this parameter returns null.

      • InstanceId — (String)

        The ID of the instance.

        If the volume is attached to a Fargate task, this parameter returns null.

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

      • AssociatedResource — (String)

        The ARN of the Amazon ECS or Fargate task to which the volume is attached.

      • InstanceOwningService — (String)

        The service principal of Amazon Web Services service that owns the underlying instance to which the volume is attached.

        This parameter is returned only for volumes that are attached to Fargate tasks.

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (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

Adds the specified outbound (egress) rules to a security group.

An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 address ranges, the IP address ranges specified by a prefix list, or the instances that are associated with a source security group. For more information, see Security group rules.

You must specify exactly one of the following destinations: an IPv4 or IPv6 address range, a prefix list, or a security group. You must specify a protocol for each rule (for example, TCP). If the protocol is TCP or UDP, you must also specify a port or port range. If the protocol is ICMP or ICMPv6, you must also specify the ICMP type and code.

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

For examples of rules that you can add to security groups for specific access scenarios, see Security group rules for different use cases in the Amazon EC2 User Guide.

For information about security group quotas, see Amazon VPC quotas in the Amazon VPC User Guide.

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 | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      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 permissions for the security group rules.

      • FromPort — (Integer)

        If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).

      • IpProtocol — (String)

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

        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 address ranges.

        • CidrIp — (String)

          The IPv4 address range. You can either specify a CIDR block 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>)

        The IPv6 address ranges.

        • CidrIpv6 — (String)

          The IPv6 address range. You can either specify a CIDR block 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>)

        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)

        If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP 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)

          [Default VPC] The name of the security group. 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.

        • 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"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 Unicode characters.

    • CidrIp — (String)

      Not supported. Use IP permissions instead.

    • FromPort — (Integer)

      Not supported. Use IP permissions instead.

    • IpProtocol — (String)

      Not supported. Use IP permissions instead.

    • ToPort — (Integer)

      Not supported. Use IP permissions instead.

    • SourceSecurityGroupName — (String)

      Not supported. Use IP permissions instead.

    • SourceSecurityGroupOwnerId — (String)

      Not supported. Use IP permissions instead.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

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

          If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).

        • ToPort — (Integer)

          If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP 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 (if applicable).

        • 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 256 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 address range, the IP address ranges that are specified by a prefix list, or the instances that are associated with a destination security group. For more information, see Security group rules.

You must specify exactly one of the following sources: an IPv4 or IPv6 address range, a prefix list, or a security group. You must specify a protocol for each rule (for example, TCP). If the protocol is TCP or UDP, you must also specify a port or port range. If the protocol is ICMP or ICMPv6, you must also specify the ICMP/ICMPv6 type and code.

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

For examples of rules that you can add to security groups for specific access scenarios, see Security group rules for different use cases in the Amazon EC2 User Guide.

For more information about security group quotas, see Amazon VPC quotas in the Amazon VPC User Guide.

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 | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      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.

      To specify an IPv6 address range, use IP permissions instead.

      To specify multiple rules and descriptions for the rules, use IP permissions instead.

    • FromPort — (Integer)

      If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP, this is the ICMP type or -1 (all ICMP types).

      To specify multiple rules and descriptions for the rules, use IP permissions instead.

    • GroupId — (String)

      The ID of the security group.

    • GroupName — (String)

      [Default VPC] The name of the security group. For security groups for a default VPC you can specify either the ID or the name of the security group. For security groups for a nondefault VPC, you must specify the ID of the security group.

    • IpPermissions — (Array<map>)

      The permissions for the security group rules.

      • FromPort — (Integer)

        If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).

      • IpProtocol — (String)

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

        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 address ranges.

        • CidrIp — (String)

          The IPv4 address range. You can either specify a CIDR block 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>)

        The IPv6 address ranges.

        • CidrIpv6 — (String)

          The IPv6 address range. You can either specify a CIDR block 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>)

        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)

        If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP 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)

          [Default VPC] The name of the security group. 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.

        • 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 all protocols, use -1.

      To specify icmpv6, use IP permissions instead.

      If you specify a protocol other than one of the supported values, traffic is allowed on all ports, regardless of any ports that you specify.

      To specify multiple rules and descriptions for the rules, use IP permissions instead.

    • SourceSecurityGroupName — (String)

      [Default VPC] The name of the source security group.

      The rule grants full ICMP, UDP, and TCP access. To create a rule with a specific protocol and port range, specify a set of IP permissions instead.

    • SourceSecurityGroupOwnerId — (String)

      The Amazon Web Services account ID for the source security group, if the source security group is in a different account.

      The rule grants full ICMP, UDP, and TCP access. To create a rule with a specific protocol and port range, use IP permissions instead.

    • ToPort — (Integer)

      If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).

      To specify multiple rules and descriptions for the rules, use IP permissions instead.

    • DryRun — (Boolean)

      Checks whether you have the required permissions for the action, without 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 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"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 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)

          If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).

        • ToPort — (Integer)

          If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP 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 (if applicable).

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

      Default: None

    • 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 Amazon Web Services accounts in the Account ManagementReference Guide.

        • 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 Amazon Web Services accounts in the Account ManagementReference Guide.

            • 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 Amazon Web Services accounts in the Account ManagementReference Guide.

            • 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 the CreateInstanceExportTask and ExportImage operations.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

      the error object returned from the request. Set to 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.

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

Removes your Amazon Web Services account from the launch permissions for the specified AMI. For more information, see Cancel having an AMI shared with your Amazon Web Services account in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the cancelImageLaunchPermission operation

var params = {
  ImageId: 'STRING_VALUE', /* required */
  DryRun: true || false
};
ec2.cancelImageLaunchPermission(params, 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 that was shared with your 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:

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

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 Sell in the 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 256 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 instances.

You must also specify whether a canceled Spot Fleet request should terminate its instances. If you choose to 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.

Restrictions

  • You can delete up to 100 fleets in a single request. If you exceed the specified number, no fleets are deleted.

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.

      Constraint: You can specify up to 100 IDs in a single request.

    • TerminateInstances — (Boolean)

      Indicates whether to terminate the associated instances when the Spot Fleet request is canceled. The default is to terminate the instances.

      To let the instances continue to run after the Spot Fleet request is canceled, specify no-terminate-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:

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

      The IDs of the Spot Instance 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:

      • CancelledSpotInstanceRequests — (Array<map>)

        The 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 an AMI copy operation. 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.

When you copy an AMI from one Region to another, the destination Region is the current Region.

When you copy an AMI from a Region to an Outpost, specify the ARN of the Outpost as the destination. Backing snapshots copied to an Outpost are encrypted by default using the default encryption key for the Region or the key that you specify. Outposts do not support unencrypted snapshots.

For information about the prerequisites when copying an AMI, see Copy an AMI in the Amazon EC2 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',
  CopyImageTags: true || false,
  Description: 'STRING_VALUE',
  DestinationOutpostArn: 'STRING_VALUE',
  DryRun: true || false,
  Encrypted: true || false,
  KmsKeyId: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
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 Use encryption with EBS-backed AMIs in the Amazon EC2 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 Copy AMIs from an Amazon Web Services Region to an Outpost in the Amazon EBS 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.

    • CopyImageTags — (Boolean)

      Indicates whether to include your user-defined AMI tags when copying the AMI.

      The following tags will not be copied:

      • System tags (prefixed with aws:)

      • For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts

      Default: Your user-defined AMI tags are not copied.

    • TagSpecifications — (Array<map>)

      The tags to apply to the new AMI and new snapshots. You can tag the AMI, the snapshots, or both.

      • To tag the new AMI, the value for ResourceType must be image.

      • To tag the new snapshots, the value for ResourceType must be snapshot. The same tag is applied to all the new snapshots.

      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"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 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.

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 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 EBS 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 EBS 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 | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      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 EBS 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 EBS User Guide.

    • KmsKeyId — (String)

      The identifier of the 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 S3 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"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 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 256 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 | RHEL with SQL Server Standard | RHEL with SQL Server Enterprise | RHEL with SQL Server Web | RHEL with HA | RHEL with HA and SQL Server Standard | RHEL with HA and SQL Server Enterprise | Ubuntu Pro, /* 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',
  PlacementGroupArn: 'STRING_VALUE',
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      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"
      • "RHEL with SQL Server Standard"
      • "RHEL with SQL Server Enterprise"
      • "RHEL with SQL Server Web"
      • "RHEL with HA"
      • "RHEL with HA and SQL Server Standard"
      • "RHEL with HA and SQL Server Enterprise"
      • "Ubuntu Pro"
    • 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)

      Deprecated.

    • 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"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 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.

    • PlacementGroupArn — (String)

      The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 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:

      • 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"
          • "RHEL with SQL Server Standard"
          • "RHEL with SQL Server Enterprise"
          • "RHEL with SQL Server Web"
          • "RHEL with HA"
          • "RHEL with HA and SQL Server Standard"
          • "RHEL with HA and SQL Server Enterprise"
          • "Ubuntu Pro"
        • 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)

          Deprecated.

        • 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"
          • "scheduled"
          • "payment-pending"
          • "payment-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 256 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.

        • PlacementGroupArn — (String)

          The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.

        • CapacityAllocations — (Array<map>)

          Information about instance capacity usage.

          • AllocationType — (String)

            The usage type. used indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.

            Possible values include:
            • "used"
          • Count — (Integer)

            The amount of instance capacity associated with the usage. For example a value of 4 indicates that instance capacity for 4 instances is currently in use.

        • ReservationType — (String)

          The type of Capacity Reservation.

          Possible values include:
          • "default"
          • "capacity-block"

Returns:

  • (AWS.Request)

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

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

Create a new Capacity Reservation by splitting the available capacity of the source Capacity Reservation. The new Capacity Reservation will have the same attributes as the source Capacity Reservation except for tags. The source Capacity Reservation must be active and owned by your Amazon Web Services account.

Examples:

Calling the createCapacityReservationBySplitting operation

var params = {
  InstanceCount: 'NUMBER_VALUE', /* required */
  SourceCapacityReservationId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createCapacityReservationBySplitting(params, 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 Ensure Idempotency.

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

      The ID of the Capacity Reservation from which you want to split the available capacity.

    • InstanceCount — (Integer)

      The number of instances to split from the source Capacity Reservation.

    • TagSpecifications — (Array<map>)

      The tags to apply to the new Capacity Reservation.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 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:

      • SourceCapacityReservation — (map)

        Information about the source 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"
          • "RHEL with SQL Server Standard"
          • "RHEL with SQL Server Enterprise"
          • "RHEL with SQL Server Web"
          • "RHEL with HA"
          • "RHEL with HA and SQL Server Standard"
          • "RHEL with HA and SQL Server Enterprise"
          • "Ubuntu Pro"
        • 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)

          Deprecated.

        • 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"
          • "scheduled"
          • "payment-pending"
          • "payment-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 256 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.

        • PlacementGroupArn — (String)

          The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.

        • CapacityAllocations — (Array<map>)

          Information about instance capacity usage.

          • AllocationType — (String)

            The usage type. used indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.

            Possible values include:
            • "used"
          • Count — (Integer)

            The amount of instance capacity associated with the usage. For example a value of 4 indicates that instance capacity for 4 instances is currently in use.

        • ReservationType — (String)

          The type of Capacity Reservation.

          Possible values include:
          • "default"
          • "capacity-block"
      • DestinationCapacityReservation — (map)

        Information about the destination 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"
          • "RHEL with SQL Server Standard"
          • "RHEL with SQL Server Enterprise"
          • "RHEL with SQL Server Web"
          • "RHEL with HA"
          • "RHEL with HA and SQL Server Standard"
          • "RHEL with HA and SQL Server Enterprise"
          • "Ubuntu Pro"
        • 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)

          Deprecated.

        • 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"
          • "scheduled"
          • "payment-pending"
          • "payment-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 256 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.

        • PlacementGroupArn — (String)

          The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.

        • CapacityAllocations — (Array<map>)

          Information about instance capacity usage.

          • AllocationType — (String)

            The usage type. used indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.

            Possible values include:
            • "used"
          • Count — (Integer)

            The amount of instance capacity associated with the usage. For example a value of 4 indicates that instance capacity for 4 instances is currently in use.

        • ReservationType — (String)

          The type of Capacity Reservation.

          Possible values include:
          • "default"
          • "capacity-block"
      • InstanceCount — (Integer)

        The number of instances in the new Capacity Reservation. The number of instances in the source Capacity Reservation was reduced by this amount.

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 | RHEL with SQL Server Standard | RHEL with SQL Server Enterprise | RHEL with SQL Server Web | RHEL with HA | RHEL with HA and SQL Server Standard | RHEL with HA and SQL Server Enterprise | Ubuntu Pro,
      InstanceType: a1.medium | a1.large | a1.xlarge | a1.2xlarge | a1.4xlarge | a1.metal | 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.medium | c6g.large | c6g.xlarge | c6g.2xlarge | c6g.4xlarge | c6g.8xlarge | c6g.12xlarge | c6g.16xlarge | c6g.metal | c6gd.medium | c6gd.large | c6gd.xlarge | c6gd.2xlarge | c6gd.4xlarge | c6gd.8xlarge | c6gd.12xlarge | c6gd.16xlarge | c6gd.metal | c6gn.medium | c6gn.large | c6gn.xlarge | c6gn.2xlarge | c6gn.4xlarge | c6gn.8xlarge | c6gn.12xlarge | c6gn.16xlarge | c6i.large | c6i.xlarge | c6i.2xlarge | c6i.4xlarge | c6i.8xlarge | c6i.12xlarge | c6i.16xlarge | c6i.24xlarge | c6i.32xlarge | c6i.metal | cc1.4xlarge | cc2.8xlarge | cg1.4xlarge | cr1.8xlarge | 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 | 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 | g5.xlarge | g5.2xlarge | g5.4xlarge | g5.8xlarge | g5.12xlarge | g5.16xlarge | g5.24xlarge | g5.48xlarge | g5g.xlarge | g5g.2xlarge | g5g.4xlarge | g5g.8xlarge | g5g.16xlarge | g5g.metal | hi1.4xlarge | hpc6a.48xlarge | hs1.8xlarge | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | 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 | im4gn.large | im4gn.xlarge | im4gn.2xlarge | im4gn.4xlarge | im4gn.8xlarge | im4gn.16xlarge | inf1.xlarge | inf1.2xlarge | inf1.6xlarge | inf1.24xlarge | is4gen.medium | is4gen.large | is4gen.xlarge | is4gen.2xlarge | is4gen.4xlarge | is4gen.8xlarge | m1.small | m1.medium | m1.large | m1.xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | m3.medium | m3.large | m3.xlarge | m3.2xlarge | m4.large | m4.xlarge | m4.2xlarge | m4.4xlarge | m4.10xlarge | m4.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 | m5ad.large | m5ad.xlarge | m5ad.2xlarge | m5ad.4xlarge | m5ad.8xlarge | m5ad.12xlarge | m5ad.16xlarge | m5ad.24xlarge | m5d.large | m5d.xlarge | m5d.2xlarge | m5d.4xlarge | m5d.8xlarge | m5d.12xlarge | m5d.16xlarge | m5d.24xlarge | m5d.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 | m5zn.large | m5zn.xlarge | m5zn.2xlarge | m5zn.3xlarge | m5zn.6xlarge | m5zn.12xlarge | m5zn.metal | m6a.large | m6a.xlarge | m6a.2xlarge | m6a.4xlarge | m6a.8xlarge | m6a.12xlarge | m6a.16xlarge | m6a.24xlarge | m6a.32xlarge | m6a.48xlarge | 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 | m6i.metal | mac1.metal | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | p3dn.24xlarge | p4d.24xlarge | 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 | r5ad.large | r5ad.xlarge | r5ad.2xlarge | r5ad.4xlarge | r5ad.8xlarge | r5ad.12xlarge | r5ad.16xlarge | r5ad.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 | 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 | r6g.medium | r6g.large | r6g.xlarge | r6g.2xlarge | r6g.4xlarge | r6g.8xlarge | r6g.12xlarge | r6g.16xlarge | r6g.metal | r6gd.medium | r6gd.large | r6gd.xlarge | r6gd.2xlarge | r6gd.4xlarge | r6gd.8xlarge | r6gd.12xlarge | r6gd.16xlarge | r6gd.metal | r6i.large | r6i.xlarge | r6i.2xlarge | r6i.4xlarge | r6i.8xlarge | r6i.12xlarge | r6i.16xlarge | r6i.24xlarge | r6i.32xlarge | r6i.metal | 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 | 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 | vt1.3xlarge | vt1.6xlarge | vt1.24xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | x2iezn.2xlarge | x2iezn.4xlarge | x2iezn.6xlarge | x2iezn.8xlarge | x2iezn.12xlarge | x2iezn.metal | x2gd.medium | x2gd.large | x2gd.xlarge | x2gd.2xlarge | x2gd.4xlarge | x2gd.8xlarge | x2gd.12xlarge | x2gd.16xlarge | x2gd.metal | z1d.large | z1d.xlarge | z1d.2xlarge | z1d.3xlarge | z1d.6xlarge | z1d.12xlarge | z1d.metal | x2idn.16xlarge | x2idn.24xlarge | x2idn.32xlarge | x2iedn.xlarge | x2iedn.2xlarge | x2iedn.4xlarge | x2iedn.8xlarge | x2iedn.16xlarge | x2iedn.24xlarge | x2iedn.32xlarge | c6a.large | c6a.xlarge | c6a.2xlarge | c6a.4xlarge | c6a.8xlarge | c6a.12xlarge | c6a.16xlarge | c6a.24xlarge | c6a.32xlarge | c6a.48xlarge | c6a.metal | m6a.metal | i4i.large | i4i.xlarge | i4i.2xlarge | i4i.4xlarge | i4i.8xlarge | i4i.16xlarge | i4i.32xlarge | i4i.metal | x2idn.metal | x2iedn.metal | c7g.medium | c7g.large | c7g.xlarge | c7g.2xlarge | c7g.4xlarge | c7g.8xlarge | c7g.12xlarge | c7g.16xlarge | mac2.metal | c6id.large | c6id.xlarge | c6id.2xlarge | c6id.4xlarge | c6id.8xlarge | c6id.12xlarge | c6id.16xlarge | c6id.24xlarge | c6id.32xlarge | c6id.metal | m6id.large | m6id.xlarge | m6id.2xlarge | m6id.4xlarge | m6id.8xlarge | m6id.12xlarge | m6id.16xlarge | m6id.24xlarge | m6id.32xlarge | m6id.metal | r6id.large | r6id.xlarge | r6id.2xlarge | r6id.4xlarge | r6id.8xlarge | r6id.12xlarge | r6id.16xlarge | r6id.24xlarge | r6id.32xlarge | r6id.metal | r6a.large | r6a.xlarge | r6a.2xlarge | r6a.4xlarge | r6a.8xlarge | r6a.12xlarge | r6a.16xlarge | r6a.24xlarge | r6a.32xlarge | r6a.48xlarge | r6a.metal | p4de.24xlarge | u-3tb1.56xlarge | u-18tb1.112xlarge | u-24tb1.112xlarge | trn1.2xlarge | trn1.32xlarge | hpc6id.32xlarge | c6in.large | c6in.xlarge | c6in.2xlarge | c6in.4xlarge | c6in.8xlarge | c6in.12xlarge | c6in.16xlarge | c6in.24xlarge | c6in.32xlarge | m6in.large | m6in.xlarge | m6in.2xlarge | m6in.4xlarge | m6in.8xlarge | m6in.12xlarge | m6in.16xlarge | m6in.24xlarge | m6in.32xlarge | m6idn.large | m6idn.xlarge | m6idn.2xlarge | m6idn.4xlarge | m6idn.8xlarge | m6idn.12xlarge | m6idn.16xlarge | m6idn.24xlarge | m6idn.32xlarge | r6in.large | r6in.xlarge | r6in.2xlarge | r6in.4xlarge | r6in.8xlarge | r6in.12xlarge | r6in.16xlarge | r6in.24xlarge | r6in.32xlarge | r6idn.large | r6idn.xlarge | r6idn.2xlarge | r6idn.4xlarge | r6idn.8xlarge | r6idn.12xlarge | r6idn.16xlarge | r6idn.24xlarge | r6idn.32xlarge | c7g.metal | m7g.medium | m7g.large | m7g.xlarge | m7g.2xlarge | m7g.4xlarge | m7g.8xlarge | m7g.12xlarge | m7g.16xlarge | m7g.metal | r7g.medium | r7g.large | r7g.xlarge | r7g.2xlarge | r7g.4xlarge | r7g.8xlarge | r7g.12xlarge | r7g.16xlarge | r7g.metal | c6in.metal | m6in.metal | m6idn.metal | r6in.metal | r6idn.metal | inf2.xlarge | inf2.8xlarge | inf2.24xlarge | inf2.48xlarge | trn1n.32xlarge | i4g.large | i4g.xlarge | i4g.2xlarge | i4g.4xlarge | i4g.8xlarge | i4g.16xlarge | hpc7g.4xlarge | hpc7g.8xlarge | hpc7g.16xlarge | c7gn.medium | c7gn.large | c7gn.xlarge | c7gn.2xlarge | c7gn.4xlarge | c7gn.8xlarge | c7gn.12xlarge | c7gn.16xlarge | p5.48xlarge | m7i.large | m7i.xlarge | m7i.2xlarge | m7i.4xlarge | m7i.8xlarge | m7i.12xlarge | m7i.16xlarge | m7i.24xlarge | m7i.48xlarge | m7i-flex.large | m7i-flex.xlarge | m7i-flex.2xlarge | m7i-flex.4xlarge | m7i-flex.8xlarge | m7a.medium | m7a.large | m7a.xlarge | m7a.2xlarge | m7a.4xlarge | m7a.8xlarge | m7a.12xlarge | m7a.16xlarge | m7a.24xlarge | m7a.32xlarge | m7a.48xlarge | m7a.metal-48xl | hpc7a.12xlarge | hpc7a.24xlarge | hpc7a.48xlarge | hpc7a.96xlarge | c7gd.medium | c7gd.large | c7gd.xlarge | c7gd.2xlarge | c7gd.4xlarge | c7gd.8xlarge | c7gd.12xlarge | c7gd.16xlarge | m7gd.medium | m7gd.large | m7gd.xlarge | m7gd.2xlarge | m7gd.4xlarge | m7gd.8xlarge | m7gd.12xlarge | m7gd.16xlarge | r7gd.medium | r7gd.large | r7gd.xlarge | r7gd.2xlarge | r7gd.4xlarge | r7gd.8xlarge | r7gd.12xlarge | r7gd.16xlarge | r7a.medium | r7a.large | r7a.xlarge | r7a.2xlarge | r7a.4xlarge | r7a.8xlarge | r7a.12xlarge | r7a.16xlarge | r7a.24xlarge | r7a.32xlarge | r7a.48xlarge | c7i.large | c7i.xlarge | c7i.2xlarge | c7i.4xlarge | c7i.8xlarge | c7i.12xlarge | c7i.16xlarge | c7i.24xlarge | c7i.48xlarge | mac2-m2pro.metal | r7iz.large | r7iz.xlarge | r7iz.2xlarge | r7iz.4xlarge | r7iz.8xlarge | r7iz.12xlarge | r7iz.16xlarge | r7iz.32xlarge | c7a.medium | c7a.large | c7a.xlarge | c7a.2xlarge | c7a.4xlarge | c7a.8xlarge | c7a.12xlarge | c7a.16xlarge | c7a.24xlarge | c7a.32xlarge | c7a.48xlarge | c7a.metal-48xl | r7a.metal-48xl | r7i.large | r7i.xlarge | r7i.2xlarge | r7i.4xlarge | r7i.8xlarge | r7i.12xlarge | r7i.16xlarge | r7i.24xlarge | r7i.48xlarge | dl2q.24xlarge | mac2-m2.metal | i4i.12xlarge | i4i.24xlarge | c7i.metal-24xl | c7i.metal-48xl | m7i.metal-24xl | m7i.metal-48xl | r7i.metal-24xl | r7i.metal-48xl | r7iz.metal-16xl | r7iz.metal-32xl | c7gd.metal | m7gd.metal | r7gd.metal | g6.xlarge | g6.2xlarge | g6.4xlarge | g6.8xlarge | g6.12xlarge | g6.16xlarge | g6.24xlarge | g6.48xlarge | gr6.4xlarge | gr6.8xlarge | c7i-flex.large | c7i-flex.xlarge | c7i-flex.2xlarge | c7i-flex.4xlarge | c7i-flex.8xlarge | u7i-12tb.224xlarge | u7in-16tb.224xlarge | u7in-24tb.224xlarge | u7in-32tb.224xlarge | u7ib-12tb.224xlarge | c7gn.metal | r8g.medium | r8g.large | r8g.xlarge | r8g.2xlarge | r8g.4xlarge | r8g.8xlarge | r8g.12xlarge | r8g.16xlarge | r8g.24xlarge | r8g.48xlarge | r8g.metal-24xl | r8g.metal-48xl | mac2-m1ultra.metal,
      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 | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      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:
        • "a1.medium"
        • "a1.large"
        • "a1.xlarge"
        • "a1.2xlarge"
        • "a1.4xlarge"
        • "a1.metal"
        • "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.medium"
        • "c6g.large"
        • "c6g.xlarge"
        • "c6g.2xlarge"
        • "c6g.4xlarge"
        • "c6g.8xlarge"
        • "c6g.12xlarge"
        • "c6g.16xlarge"
        • "c6g.metal"
        • "c6gd.medium"
        • "c6gd.large"
        • "c6gd.xlarge"
        • "c6gd.2xlarge"
        • "c6gd.4xlarge"
        • "c6gd.8xlarge"
        • "c6gd.12xlarge"
        • "c6gd.16xlarge"
        • "c6gd.metal"
        • "c6gn.medium"
        • "c6gn.large"
        • "c6gn.xlarge"
        • "c6gn.2xlarge"
        • "c6gn.4xlarge"
        • "c6gn.8xlarge"
        • "c6gn.12xlarge"
        • "c6gn.16xlarge"
        • "c6i.large"
        • "c6i.xlarge"
        • "c6i.2xlarge"
        • "c6i.4xlarge"
        • "c6i.8xlarge"
        • "c6i.12xlarge"
        • "c6i.16xlarge"
        • "c6i.24xlarge"
        • "c6i.32xlarge"
        • "c6i.metal"
        • "cc1.4xlarge"
        • "cc2.8xlarge"
        • "cg1.4xlarge"
        • "cr1.8xlarge"
        • "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"
        • "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"
        • "g5.xlarge"
        • "g5.2xlarge"
        • "g5.4xlarge"
        • "g5.8xlarge"
        • "g5.12xlarge"
        • "g5.16xlarge"
        • "g5.24xlarge"
        • "g5.48xlarge"
        • "g5g.xlarge"
        • "g5g.2xlarge"
        • "g5g.4xlarge"
        • "g5g.8xlarge"
        • "g5g.16xlarge"
        • "g5g.metal"
        • "hi1.4xlarge"
        • "hpc6a.48xlarge"
        • "hs1.8xlarge"
        • "h1.2xlarge"
        • "h1.4xlarge"
        • "h1.8xlarge"
        • "h1.16xlarge"
        • "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"
        • "im4gn.large"
        • "im4gn.xlarge"
        • "im4gn.2xlarge"
        • "im4gn.4xlarge"
        • "im4gn.8xlarge"
        • "im4gn.16xlarge"
        • "inf1.xlarge"
        • "inf1.2xlarge"
        • "inf1.6xlarge"
        • "inf1.24xlarge"
        • "is4gen.medium"
        • "is4gen.large"
        • "is4gen.xlarge"
        • "is4gen.2xlarge"
        • "is4gen.4xlarge"
        • "is4gen.8xlarge"
        • "m1.small"
        • "m1.medium"
        • "m1.large"
        • "m1.xlarge"
        • "m2.xlarge"
        • "m2.2xlarge"
        • "m2.4xlarge"
        • "m3.medium"
        • "m3.large"
        • "m3.xlarge"
        • "m3.2xlarge"
        • "m4.large"
        • "m4.xlarge"
        • "m4.2xlarge"
        • "m4.4xlarge"
        • "m4.10xlarge"
        • "m4.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"
        • "m5ad.large"
        • "m5ad.xlarge"
        • "m5ad.2xlarge"
        • "m5ad.4xlarge"
        • "m5ad.8xlarge"
        • "m5ad.12xlarge"
        • "m5ad.16xlarge"
        • "m5ad.24xlarge"
        • "m5d.large"
        • "m5d.xlarge"
        • "m5d.2xlarge"
        • "m5d.4xlarge"
        • "m5d.8xlarge"
        • "m5d.12xlarge"
        • "m5d.16xlarge"
        • "m5d.24xlarge"
        • "m5d.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"
        • "m5zn.large"
        • "m5zn.xlarge"
        • "m5zn.2xlarge"
        • "m5zn.3xlarge"
        • "m5zn.6xlarge"
        • "m5zn.12xlarge"
        • "m5zn.metal"
        • "m6a.large"
        • "m6a.xlarge"
        • "m6a.2xlarge"
        • "m6a.4xlarge"
        • "m6a.8xlarge"
        • "m6a.12xlarge"
        • "m6a.16xlarge"
        • "m6a.24xlarge"
        • "m6a.32xlarge"
        • "m6a.48xlarge"
        • "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"
        • "m6i.metal"
        • "mac1.metal"
        • "p2.xlarge"
        • "p2.8xlarge"
        • "p2.16xlarge"
        • "p3.2xlarge"
        • "p3.8xlarge"
        • "p3.16xlarge"
        • "p3dn.24xlarge"
        • "p4d.24xlarge"
        • "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"
        • "r5ad.large"
        • "r5ad.xlarge"
        • "r5ad.2xlarge"
        • "r5ad.4xlarge"
        • "r5ad.8xlarge"
        • "r5ad.12xlarge"
        • "r5ad.16xlarge"
        • "r5ad.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"
        • "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"
        • "r6g.medium"
        • "r6g.large"
        • "r6g.xlarge"
        • "r6g.2xlarge"
        • "r6g.4xlarge"
        • "r6g.8xlarge"
        • "r6g.12xlarge"
        • "r6g.16xlarge"
        • "r6g.metal"
        • "r6gd.medium"
        • "r6gd.large"
        • "r6gd.xlarge"
        • "r6gd.2xlarge"
        • "r6gd.4xlarge"
        • "r6gd.8xlarge"
        • "r6gd.12xlarge"
        • "r6gd.16xlarge"
        • "r6gd.metal"
        • "r6i.large"
        • "r6i.xlarge"
        • "r6i.2xlarge"
        • "r6i.4xlarge"
        • "r6i.8xlarge"
        • "r6i.12xlarge"
        • "r6i.16xlarge"
        • "r6i.24xlarge"
        • "r6i.32xlarge"
        • "r6i.metal"
        • "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"
        • "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"
        • "vt1.3xlarge"
        • "vt1.6xlarge"
        • "vt1.24xlarge"
        • "x1.16xlarge"
        • "x1.32xlarge"
        • "x1e.xlarge"
        • "x1e.2xlarge"
        • "x1e.4xlarge"
        • "x1e.8xlarge"
        • "x1e.16xlarge"
        • "x1e.32xlarge"
        • "x2iezn.2xlarge"
        • "x2iezn.4xlarge"
        • "x2iezn.6xlarge"
        • "x2iezn.8xlarge"
        • "x2iezn.12xlarge"
        • "x2iezn.metal"
        • "x2gd.medium"
        • "x2gd.large"
        • "x2gd.xlarge"
        • "x2gd.2xlarge"
        • "x2gd.4xlarge"
        • "x2gd.8xlarge"
        • "x2gd.12xlarge"
        • "x2gd.16xlarge"
        • "x2gd.metal"
        • "z1d.large"
        • "z1d.xlarge"
        • "z1d.2xlarge"
        • "z1d.3xlarge"
        • "z1d.6xlarge"
        • "z1d.12xlarge"
        • "z1d.metal"
        • "x2idn.16xlarge"
        • "x2idn.24xlarge"
        • "x2idn.32xlarge"
        • "x2iedn.xlarge"
        • "x2iedn.2xlarge"
        • "x2iedn.4xlarge"
        • "x2iedn.8xlarge"
        • "x2iedn.16xlarge"
        • "x2iedn.24xlarge"
        • "x2iedn.32xlarge"
        • "c6a.large"
        • "c6a.xlarge"
        • "c6a.2xlarge"
        • "c6a.4xlarge"
        • "c6a.8xlarge"
        • "c6a.12xlarge"
        • "c6a.16xlarge"
        • "c6a.24xlarge"
        • "c6a.32xlarge"
        • "c6a.48xlarge"
        • "c6a.metal"
        • "m6a.metal"
        • "i4i.large"
        • "i4i.xlarge"
        • "i4i.2xlarge"
        • "i4i.4xlarge"
        • "i4i.8xlarge"
        • "i4i.16xlarge"
        • "i4i.32xlarge"
        • "i4i.metal"
        • "x2idn.metal"
        • "x2iedn.metal"
        • "c7g.medium"
        • "c7g.large"
        • "c7g.xlarge"
        • "c7g.2xlarge"
        • "c7g.4xlarge"
        • "c7g.8xlarge"
        • "c7g.12xlarge"
        • "c7g.16xlarge"
        • "mac2.metal"
        • "c6id.large"
        • "c6id.xlarge"
        • "c6id.2xlarge"
        • "c6id.4xlarge"
        • "c6id.8xlarge"
        • "c6id.12xlarge"
        • "c6id.16xlarge"
        • "c6id.24xlarge"
        • "c6id.32xlarge"
        • "c6id.metal"
        • "m6id.large"
        • "m6id.xlarge"
        • "m6id.2xlarge"
        • "m6id.4xlarge"
        • "m6id.8xlarge"
        • "m6id.12xlarge"
        • "m6id.16xlarge"
        • "m6id.24xlarge"
        • "m6id.32xlarge"
        • "m6id.metal"
        • "r6id.large"
        • "r6id.xlarge"
        • "r6id.2xlarge"
        • "r6id.4xlarge"
        • "r6id.8xlarge"
        • "r6id.12xlarge"
        • "r6id.16xlarge"
        • "r6id.24xlarge"
        • "r6id.32xlarge"
        • "r6id.metal"
        • "r6a.large"
        • "r6a.xlarge"
        • "r6a.2xlarge"
        • "r6a.4xlarge"
        • "r6a.8xlarge"
        • "r6a.12xlarge"
        • "r6a.16xlarge"
        • "r6a.24xlarge"
        • "r6a.32xlarge"
        • "r6a.48xlarge"
        • "r6a.metal"
        • "p4de.24xlarge"
        • "u-3tb1.56xlarge"
        • "u-18tb1.112xlarge"
        • "u-24tb1.112xlarge"
        • "trn1.2xlarge"
        • "trn1.32xlarge"
        • "hpc6id.32xlarge"
        • "c6in.large"
        • "c6in.xlarge"
        • "c6in.2xlarge"
        • "c6in.4xlarge"
        • "c6in.8xlarge"
        • "c6in.12xlarge"
        • "c6in.16xlarge"
        • "c6in.24xlarge"
        • "c6in.32xlarge"
        • "m6in.large"
        • "m6in.xlarge"
        • "m6in.2xlarge"
        • "m6in.4xlarge"
        • "m6in.8xlarge"
        • "m6in.12xlarge"
        • "m6in.16xlarge"
        • "m6in.24xlarge"
        • "m6in.32xlarge"
        • "m6idn.large"
        • "m6idn.xlarge"
        • "m6idn.2xlarge"
        • "m6idn.4xlarge"
        • "m6idn.8xlarge"
        • "m6idn.12xlarge"
        • "m6idn.16xlarge"
        • "m6idn.24xlarge"
        • "m6idn.32xlarge"
        • "r6in.large"
        • "r6in.xlarge"
        • "r6in.2xlarge"
        • "r6in.4xlarge"
        • "r6in.8xlarge"
        • "r6in.12xlarge"
        • "r6in.16xlarge"
        • "r6in.24xlarge"
        • "r6in.32xlarge"
        • "r6idn.large"
        • "r6idn.xlarge"
        • "r6idn.2xlarge"
        • "r6idn.4xlarge"
        • "r6idn.8xlarge"
        • "r6idn.12xlarge"
        • "r6idn.16xlarge"
        • "r6idn.24xlarge"
        • "r6idn.32xlarge"
        • "c7g.metal"
        • "m7g.medium"
        • "m7g.large"
        • "m7g.xlarge"
        • "m7g.2xlarge"
        • "m7g.4xlarge"
        • "m7g.8xlarge"
        • "m7g.12xlarge"
        • "m7g.16xlarge"
        • "m7g.metal"
        • "r7g.medium"
        • "r7g.large"
        • "r7g.xlarge"
        • "r7g.2xlarge"
        • "r7g.4xlarge"
        • "r7g.8xlarge"
        • "r7g.12xlarge"
        • "r7g.16xlarge"
        • "r7g.metal"
        • "c6in.metal"
        • "m6in.metal"
        • "m6idn.metal"
        • "r6in.metal"
        • "r6idn.metal"
        • "inf2.xlarge"
        • "inf2.8xlarge"
        • "inf2.24xlarge"
        • "inf2.48xlarge"
        • "trn1n.32xlarge"
        • "i4g.large"
        • "i4g.xlarge"
        • "i4g.2xlarge"
        • "i4g.4xlarge"
        • "i4g.8xlarge"
        • "i4g.16xlarge"
        • "hpc7g.4xlarge"
        • "hpc7g.8xlarge"
        • "hpc7g.16xlarge"
        • "c7gn.medium"
        • "c7gn.large"
        • "c7gn.xlarge"
        • "c7gn.2xlarge"
        • "c7gn.4xlarge"
        • "c7gn.8xlarge"
        • "c7gn.12xlarge"
        • "c7gn.16xlarge"
        • "p5.48xlarge"
        • "m7i.large"
        • "m7i.xlarge"
        • "m7i.2xlarge"
        • "m7i.4xlarge"
        • "m7i.8xlarge"
        • "m7i.12xlarge"
        • "m7i.16xlarge"
        • "m7i.24xlarge"
        • "m7i.48xlarge"
        • "m7i-flex.large"
        • "m7i-flex.xlarge"
        • "m7i-flex.2xlarge"
        • "m7i-flex.4xlarge"
        • "m7i-flex.8xlarge"
        • "m7a.medium"
        • "m7a.large"
        • "m7a.xlarge"
        • "m7a.2xlarge"
        • "m7a.4xlarge"
        • "m7a.8xlarge"
        • "m7a.12xlarge"
        • "m7a.16xlarge"
        • "m7a.24xlarge"
        • "m7a.32xlarge"
        • "m7a.48xlarge"
        • "m7a.metal-48xl"
        • "hpc7a.12xlarge"
        • "hpc7a.24xlarge"
        • "hpc7a.48xlarge"
        • "hpc7a.96xlarge"
        • "c7gd.medium"
        • "c7gd.large"
        • "c7gd.xlarge"
        • "c7gd.2xlarge"
        • "c7gd.4xlarge"
        • "c7gd.8xlarge"
        • "c7gd.12xlarge"
        • "c7gd.16xlarge"
        • "m7gd.medium"
        • "m7gd.large"
        • "m7gd.xlarge"
        • "m7gd.2xlarge"
        • "m7gd.4xlarge"
        • "m7gd.8xlarge"
        • "m7gd.12xlarge"
        • "m7gd.16xlarge"
        • "r7gd.medium"
        • "r7gd.large"
        • "r7gd.xlarge"
        • "r7gd.2xlarge"
        • "r7gd.4xlarge"
        • "r7gd.8xlarge"
        • "r7gd.12xlarge"
        • "r7gd.16xlarge"
        • "r7a.medium"
        • "r7a.large"
        • "r7a.xlarge"
        • "r7a.2xlarge"
        • "r7a.4xlarge"
        • "r7a.8xlarge"
        • "r7a.12xlarge"
        • "r7a.16xlarge"
        • "r7a.24xlarge"
        • "r7a.32xlarge"
        • "r7a.48xlarge"
        • "c7i.large"
        • "c7i.xlarge"
        • "c7i.2xlarge"
        • "c7i.4xlarge"
        • "c7i.8xlarge"
        • "c7i.12xlarge"
        • "c7i.16xlarge"
        • "c7i.24xlarge"
        • "c7i.48xlarge"
        • "mac2-m2pro.metal"
        • "r7iz.large"
        • "r7iz.xlarge"
        • "r7iz.2xlarge"
        • "r7iz.4xlarge"
        • "r7iz.8xlarge"
        • "r7iz.12xlarge"
        • "r7iz.16xlarge"
        • "r7iz.32xlarge"
        • "c7a.medium"
        • "c7a.large"
        • "c7a.xlarge"
        • "c7a.2xlarge"
        • "c7a.4xlarge"
        • "c7a.8xlarge"
        • "c7a.12xlarge"
        • "c7a.16xlarge"
        • "c7a.24xlarge"
        • "c7a.32xlarge"
        • "c7a.48xlarge"
        • "c7a.metal-48xl"
        • "r7a.metal-48xl"
        • "r7i.large"
        • "r7i.xlarge"
        • "r7i.2xlarge"
        • "r7i.4xlarge"
        • "r7i.8xlarge"
        • "r7i.12xlarge"
        • "r7i.16xlarge"
        • "r7i.24xlarge"
        • "r7i.48xlarge"
        • "dl2q.24xlarge"
        • "mac2-m2.metal"
        • "i4i.12xlarge"
        • "i4i.24xlarge"
        • "c7i.metal-24xl"
        • "c7i.metal-48xl"
        • "m7i.metal-24xl"
        • "m7i.metal-48xl"
        • "r7i.metal-24xl"
        • "r7i.metal-48xl"
        • "r7iz.metal-16xl"
        • "r7iz.metal-32xl"
        • "c7gd.metal"
        • "m7gd.metal"
        • "r7gd.metal"
        • "g6.xlarge"
        • "g6.2xlarge"
        • "g6.4xlarge"
        • "g6.8xlarge"
        • "g6.12xlarge"
        • "g6.16xlarge"
        • "g6.24xlarge"
        • "g6.48xlarge"
        • "gr6.4xlarge"
        • "gr6.8xlarge"
        • "c7i-flex.large"
        • "c7i-flex.xlarge"
        • "c7i-flex.2xlarge"
        • "c7i-flex.4xlarge"
        • "c7i-flex.8xlarge"
        • "u7i-12tb.224xlarge"
        • "u7in-16tb.224xlarge"
        • "u7in-24tb.224xlarge"
        • "u7in-32tb.224xlarge"
        • "u7ib-12tb.224xlarge"
        • "c7gn.metal"
        • "r8g.medium"
        • "r8g.large"
        • "r8g.xlarge"
        • "r8g.2xlarge"
        • "r8g.4xlarge"
        • "r8g.8xlarge"
        • "r8g.12xlarge"
        • "r8g.16xlarge"
        • "r8g.24xlarge"
        • "r8g.48xlarge"
        • "r8g.metal-24xl"
        • "r8g.metal-48xl"
        • "mac2-m1ultra.metal"
      • 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"
        • "RHEL with SQL Server Standard"
        • "RHEL with SQL Server Enterprise"
        • "RHEL with SQL Server Web"
        • "RHEL with HA"
        • "RHEL with HA and SQL Server Standard"
        • "RHEL with HA and SQL Server Enterprise"
        • "Ubuntu Pro"
      • 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"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 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:
          • "a1.medium"
          • "a1.large"
          • "a1.xlarge"
          • "a1.2xlarge"
          • "a1.4xlarge"
          • "a1.metal"
          • "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.medium"
          • "c6g.large"
          • "c6g.xlarge"
          • "c6g.2xlarge"
          • "c6g.4xlarge"
          • "c6g.8xlarge"
          • "c6g.12xlarge"
          • "c6g.16xlarge"
          • "c6g.metal"
          • "c6gd.medium"
          • "c6gd.large"
          • "c6gd.xlarge"
          • "c6gd.2xlarge"
          • "c6gd.4xlarge"
          • "c6gd.8xlarge"
          • "c6gd.12xlarge"
          • "c6gd.16xlarge"
          • "c6gd.metal"
          • "c6gn.medium"
          • "c6gn.large"
          • "c6gn.xlarge"
          • "c6gn.2xlarge"
          • "c6gn.4xlarge"
          • "c6gn.8xlarge"
          • "c6gn.12xlarge"
          • "c6gn.16xlarge"
          • "c6i.large"
          • "c6i.xlarge"
          • "c6i.2xlarge"
          • "c6i.4xlarge"
          • "c6i.8xlarge"
          • "c6i.12xlarge"
          • "c6i.16xlarge"
          • "c6i.24xlarge"
          • "c6i.32xlarge"
          • "c6i.metal"
          • "cc1.4xlarge"
          • "cc2.8xlarge"
          • "cg1.4xlarge"
          • "cr1.8xlarge"
          • "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"
          • "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"
          • "g5.xlarge"
          • "g5.2xlarge"
          • "g5.4xlarge"
          • "g5.8xlarge"
          • "g5.12xlarge"
          • "g5.16xlarge"
          • "g5.24xlarge"
          • "g5.48xlarge"
          • "g5g.xlarge"
          • "g5g.2xlarge"
          • "g5g.4xlarge"
          • "g5g.8xlarge"
          • "g5g.16xlarge"
          • "g5g.metal"
          • "hi1.4xlarge"
          • "hpc6a.48xlarge"
          • "hs1.8xlarge"
          • "h1.2xlarge"
          • "h1.4xlarge"
          • "h1.8xlarge"
          • "h1.16xlarge"
          • "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"
          • "im4gn.large"
          • "im4gn.xlarge"
          • "im4gn.2xlarge"
          • "im4gn.4xlarge"
          • "im4gn.8xlarge"
          • "im4gn.16xlarge"
          • "inf1.xlarge"
          • "inf1.2xlarge"
          • "inf1.6xlarge"
          • "inf1.24xlarge"
          • "is4gen.medium"
          • "is4gen.large"
          • "is4gen.xlarge"
          • "is4gen.2xlarge"
          • "is4gen.4xlarge"
          • "is4gen.8xlarge"
          • "m1.small"
          • "m1.medium"
          • "m1.large"
          • "m1.xlarge"
          • "m2.xlarge"
          • "m2.2xlarge"
          • "m2.4xlarge"
          • "m3.medium"
          • "m3.large"
          • "m3.xlarge"
          • "m3.2xlarge"
          • "m4.large"
          • "m4.xlarge"
          • "m4.2xlarge"
          • "m4.4xlarge"
          • "m4.10xlarge"
          • "m4.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"
          • "m5ad.large"
          • "m5ad.xlarge"
          • "m5ad.2xlarge"
          • "m5ad.4xlarge"
          • "m5ad.8xlarge"
          • "m5ad.12xlarge"
          • "m5ad.16xlarge"
          • "m5ad.24xlarge"
          • "m5d.large"
          • "m5d.xlarge"
          • "m5d.2xlarge"
          • "m5d.4xlarge"
          • "m5d.8xlarge"
          • "m5d.12xlarge"
          • "m5d.16xlarge"
          • "m5d.24xlarge"
          • "m5d.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"
          • "m5zn.large"
          • "m5zn.xlarge"
          • "m5zn.2xlarge"
          • "m5zn.3xlarge"
          • "m5zn.6xlarge"
          • "m5zn.12xlarge"
          • "m5zn.metal"
          • "m6a.large"
          • "m6a.xlarge"
          • "m6a.2xlarge"
          • "m6a.4xlarge"
          • "m6a.8xlarge"
          • "m6a.12xlarge"
          • "m6a.16xlarge"
          • "m6a.24xlarge"
          • "m6a.32xlarge"
          • "m6a.48xlarge"
          • "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"
          • "m6i.metal"
          • "mac1.metal"
          • "p2.xlarge"
          • "p2.8xlarge"
          • "p2.16xlarge"
          • "p3.2xlarge"
          • "p3.8xlarge"
          • "p3.16xlarge"
          • "p3dn.24xlarge"
          • "p4d.24xlarge"
          • "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"
          • "r5ad.large"
          • "r5ad.xlarge"
          • "r5ad.2xlarge"
          • "r5ad.4xlarge"
          • "r5ad.8xlarge"
          • "r5ad.12xlarge"
          • "r5ad.16xlarge"
          • "r5ad.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"
          • "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"
          • "r6g.medium"
          • "r6g.large"
          • "r6g.xlarge"
          • "r6g.2xlarge"
          • "r6g.4xlarge"
          • "r6g.8xlarge"
          • "r6g.12xlarge"
          • "r6g.16xlarge"
          • "r6g.metal"
          • "r6gd.medium"
          • "r6gd.large"
          • "r6gd.xlarge"
          • "r6gd.2xlarge"
          • "r6gd.4xlarge"
          • "r6gd.8xlarge"
          • "r6gd.12xlarge"
          • "r6gd.16xlarge"
          • "r6gd.metal"
          • "r6i.large"
          • "r6i.xlarge"
          • "r6i.2xlarge"
          • "r6i.4xlarge"
          • "r6i.8xlarge"
          • "r6i.12xlarge"
          • "r6i.16xlarge"
          • "r6i.24xlarge"
          • "r6i.32xlarge"
          • "r6i.metal"
          • "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"
          • "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"
          • "vt1.3xlarge"
          • "vt1.6xlarge"
          • "vt1.24xlarge"
          • "x1.16xlarge"
          • "x1.32xlarge"
          • "x1e.xlarge"
          • "x1e.2xlarge"
          • "x1e.4xlarge"
          • "x1e.8xlarge"
          • "x1e.16xlarge"
          • "x1e.32xlarge"
          • "x2iezn.2xlarge"
          • "x2iezn.4xlarge"
          • "x2iezn.6xlarge"
          • "x2iezn.8xlarge"
          • "x2iezn.12xlarge"
          • "x2iezn.metal"
          • "x2gd.medium"
          • "x2gd.large"
          • "x2gd.xlarge"
          • "x2gd.2xlarge"
          • "x2gd.4xlarge"
          • "x2gd.8xlarge"
          • "x2gd.12xlarge"
          • "x2gd.16xlarge"
          • "x2gd.metal"
          • "z1d.large"
          • "z1d.xlarge"
          • "z1d.2xlarge"
          • "z1d.3xlarge"
          • "z1d.6xlarge"
          • "z1d.12xlarge"
          • "z1d.metal"
          • "x2idn.16xlarge"
          • "x2idn.24xlarge"
          • "x2idn.32xlarge"
          • "x2iedn.xlarge"
          • "x2iedn.2xlarge"
          • "x2iedn.4xlarge"
          • "x2iedn.8xlarge"
          • "x2iedn.16xlarge"
          • "x2iedn.24xlarge"
          • "x2iedn.32xlarge"
          • "c6a.large"
          • "c6a.xlarge"
          • "c6a.2xlarge"
          • "c6a.4xlarge"
          • "c6a.8xlarge"
          • "c6a.12xlarge"
          • "c6a.16xlarge"
          • "c6a.24xlarge"
          • "c6a.32xlarge"
          • "c6a.48xlarge"
          • "c6a.metal"
          • "m6a.metal"
          • "i4i.large"
          • "i4i.xlarge"
          • "i4i.2xlarge"
          • "i4i.4xlarge"
          • "i4i.8xlarge"
          • "i4i.16xlarge"
          • "i4i.32xlarge"
          • "i4i.metal"
          • "x2idn.metal"
          • "x2iedn.metal"
          • "c7g.medium"
          • "c7g.large"
          • "c7g.xlarge"
          • "c7g.2xlarge"
          • "c7g.4xlarge"
          • "c7g.8xlarge"
          • "c7g.12xlarge"
          • "c7g.16xlarge"
          • "mac2.metal"
          • "c6id.large"
          • "c6id.xlarge"
          • "c6id.2xlarge"
          • "c6id.4xlarge"
          • "c6id.8xlarge"
          • "c6id.12xlarge"
          • "c6id.16xlarge"
          • "c6id.24xlarge"
          • "c6id.32xlarge"
          • "c6id.metal"
          • "m6id.large"
          • "m6id.xlarge"
          • "m6id.2xlarge"
          • "m6id.4xlarge"
          • "m6id.8xlarge"
          • "m6id.12xlarge"
          • "m6id.16xlarge"
          • "m6id.24xlarge"
          • "m6id.32xlarge"
          • "m6id.metal"
          • "r6id.large"
          • "r6id.xlarge"
          • "r6id.2xlarge"
          • "r6id.4xlarge"
          • "r6id.8xlarge"
          • "r6id.12xlarge"
          • "r6id.16xlarge"
          • "r6id.24xlarge"
          • "r6id.32xlarge"
          • "r6id.metal"
          • "r6a.large"
          • "r6a.xlarge"
          • "r6a.2xlarge"
          • "r6a.4xlarge"
          • "r6a.8xlarge"
          • "r6a.12xlarge"
          • "r6a.16xlarge"
          • "r6a.24xlarge"
          • "r6a.32xlarge"
          • "r6a.48xlarge"
          • "r6a.metal"
          • "p4de.24xlarge"
          • "u-3tb1.56xlarge"
          • "u-18tb1.112xlarge"
          • "u-24tb1.112xlarge"
          • "trn1.2xlarge"
          • "trn1.32xlarge"
          • "hpc6id.32xlarge"
          • "c6in.large"
          • "c6in.xlarge"
          • "c6in.2xlarge"
          • "c6in.4xlarge"
          • "c6in.8xlarge"
          • "c6in.12xlarge"
          • "c6in.16xlarge"
          • "c6in.24xlarge"
          • "c6in.32xlarge"
          • "m6in.large"
          • "m6in.xlarge"
          • "m6in.2xlarge"
          • "m6in.4xlarge"
          • "m6in.8xlarge"
          • "m6in.12xlarge"
          • "m6in.16xlarge"
          • "m6in.24xlarge"
          • "m6in.32xlarge"
          • "m6idn.large"
          • "m6idn.xlarge"
          • "m6idn.2xlarge"
          • "m6idn.4xlarge"
          • "m6idn.8xlarge"
          • "m6idn.12xlarge"
          • "m6idn.16xlarge"
          • "m6idn.24xlarge"
          • "m6idn.32xlarge"
          • "r6in.large"
          • "r6in.xlarge"
          • "r6in.2xlarge"
          • "r6in.4xlarge"
          • "r6in.8xlarge"
          • "r6in.12xlarge"
          • "r6in.16xlarge"
          • "r6in.24xlarge"
          • "r6in.32xlarge"
          • "r6idn.large"
          • "r6idn.xlarge"
          • "r6idn.2xlarge"
          • "r6idn.4xlarge"
          • "r6idn.8xlarge"
          • "r6idn.12xlarge"
          • "r6idn.16xlarge"
          • "r6idn.24xlarge"
          • "r6idn.32xlarge"
          • "c7g.metal"
          • "m7g.medium"
          • "m7g.large"
          • "m7g.xlarge"
          • "m7g.2xlarge"
          • "m7g.4xlarge"
          • "m7g.8xlarge"
          • "m7g.12xlarge"
          • "m7g.16xlarge"
          • "m7g.metal"
          • "r7g.medium"
          • "r7g.large"
          • "r7g.xlarge"
          • "r7g.2xlarge"
          • "r7g.4xlarge"
          • "r7g.8xlarge"
          • "r7g.12xlarge"
          • "r7g.16xlarge"
          • "r7g.metal"
          • "c6in.metal"
          • "m6in.metal"
          • "m6idn.metal"
          • "r6in.metal"
          • "r6idn.metal"
          • "inf2.xlarge"
          • "inf2.8xlarge"
          • "inf2.24xlarge"
          • "inf2.48xlarge"
          • "trn1n.32xlarge"
          • "i4g.large"
          • "i4g.xlarge"
          • "i4g.2xlarge"
          • "i4g.4xlarge"
          • "i4g.8xlarge"
          • "i4g.16xlarge"
          • "hpc7g.4xlarge"
          • "hpc7g.8xlarge"
          • "hpc7g.16xlarge"
          • "c7gn.medium"
          • "c7gn.large"
          • "c7gn.xlarge"
          • "c7gn.2xlarge"
          • "c7gn.4xlarge"
          • "c7gn.8xlarge"
          • "c7gn.12xlarge"
          • "c7gn.16xlarge"
          • "p5.48xlarge"
          • "m7i.large"
          • "m7i.xlarge"
          • "m7i.2xlarge"
          • "m7i.4xlarge"
          • "m7i.8xlarge"
          • "m7i.12xlarge"
          • "m7i.16xlarge"
          • "m7i.24xlarge"
          • "m7i.48xlarge"
          • "m7i-flex.large"
          • "m7i-flex.xlarge"
          • "m7i-flex.2xlarge"
          • "m7i-flex.4xlarge"
          • "m7i-flex.8xlarge"
          • "m7a.medium"
          • "m7a.large"
          • "m7a.xlarge"
          • "m7a.2xlarge"
          • "m7a.4xlarge"
          • "m7a.8xlarge"
          • "m7a.12xlarge"
          • "m7a.16xlarge"
          • "m7a.24xlarge"
          • "m7a.32xlarge"
          • "m7a.48xlarge"
          • "m7a.metal-48xl"
          • "hpc7a.12xlarge"
          • "hpc7a.24xlarge"
          • "hpc7a.48xlarge"
          • "hpc7a.96xlarge"
          • "c7gd.medium"
          • "c7gd.large"
          • "c7gd.xlarge"
          • "c7gd.2xlarge"
          • "c7gd.4xlarge"
          • "c7gd.8xlarge"
          • "c7gd.12xlarge"
          • "c7gd.16xlarge"
          • "m7gd.medium"
          • "m7gd.large"
          • "m7gd.xlarge"
          • "m7gd.2xlarge"
          • "m7gd.4xlarge"
          • "m7gd.8xlarge"
          • "m7gd.12xlarge"
          • "m7gd.16xlarge"
          • "r7gd.medium"
          • "r7gd.large"
          • "r7gd.xlarge"
          • "r7gd.2xlarge"
          • "r7gd.4xlarge"
          • "r7gd.8xlarge"
          • "r7gd.12xlarge"
          • "r7gd.16xlarge"
          • "r7a.medium"
          • "r7a.large"
          • "r7a.xlarge"
          • "r7a.2xlarge"
          • "r7a.4xlarge"
          • "r7a.8xlarge"
          • "r7a.12xlarge"
          • "r7a.16xlarge"
          • "r7a.24xlarge"
          • "r7a.32xlarge"
          • "r7a.48xlarge"
          • "c7i.large"
          • "c7i.xlarge"
          • "c7i.2xlarge"
          • "c7i.4xlarge"
          • "c7i.8xlarge"
          • "c7i.12xlarge"
          • "c7i.16xlarge"
          • "c7i.24xlarge"
          • "c7i.48xlarge"
          • "mac2-m2pro.metal"
          • "r7iz.large"
          • "r7iz.xlarge"
          • "r7iz.2xlarge"
          • "r7iz.4xlarge"
          • "r7iz.8xlarge"
          • "r7iz.12xlarge"
          • "r7iz.16xlarge"
          • "r7iz.32xlarge"
          • "c7a.medium"
          • "c7a.large"
          • "c7a.xlarge"
          • "c7a.2xlarge"
          • "c7a.4xlarge"
          • "c7a.8xlarge"
          • "c7a.12xlarge"
          • "c7a.16xlarge"
          • "c7a.24xlarge"
          • "c7a.32xlarge"
          • "c7a.48xlarge"
          • "c7a.metal-48xl"
          • "r7a.metal-48xl"
          • "r7i.large"
          • "r7i.xlarge"
          • "r7i.2xlarge"
          • "r7i.4xlarge"
          • "r7i.8xlarge"
          • "r7i.12xlarge"
          • "r7i.16xlarge"
          • "r7i.24xlarge"
          • "r7i.48xlarge"
          • "dl2q.24xlarge"
          • "mac2-m2.metal"
          • "i4i.12xlarge"
          • "i4i.24xlarge"
          • "c7i.metal-24xl"
          • "c7i.metal-48xl"
          • "m7i.metal-24xl"
          • "m7i.metal-48xl"
          • "r7i.metal-24xl"
          • "r7i.metal-48xl"
          • "r7iz.metal-16xl"
          • "r7iz.metal-32xl"
          • "c7gd.metal"
          • "m7gd.metal"
          • "r7gd.metal"
          • "g6.xlarge"
          • "g6.2xlarge"
          • "g6.4xlarge"
          • "g6.8xlarge"
          • "g6.12xlarge"
          • "g6.16xlarge"
          • "g6.24xlarge"
          • "g6.48xlarge"
          • "gr6.4xlarge"
          • "gr6.8xlarge"
          • "c7i-flex.large"
          • "c7i-flex.xlarge"
          • "c7i-flex.2xlarge"
          • "c7i-flex.4xlarge"
          • "c7i-flex.8xlarge"
          • "u7i-12tb.224xlarge"
          • "u7in-16tb.224xlarge"
          • "u7in-24tb.224xlarge"
          • "u7in-32tb.224xlarge"
          • "u7ib-12tb.224xlarge"
          • "c7gn.metal"
          • "r8g.medium"
          • "r8g.large"
          • "r8g.xlarge"
          • "r8g.2xlarge"
          • "r8g.4xlarge"
          • "r8g.8xlarge"
          • "r8g.12xlarge"
          • "r8g.16xlarge"
          • "r8g.24xlarge"
          • "r8g.48xlarge"
          • "r8g.metal-24xl"
          • "r8g.metal-48xl"
          • "mac2-m1ultra.metal"
        • 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"
          • "RHEL with SQL Server Standard"
          • "RHEL with SQL Server Enterprise"
          • "RHEL with SQL Server Web"
          • "RHEL with HA"
          • "RHEL with HA and SQL Server Standard"
          • "RHEL with HA and SQL Server Enterprise"
          • "Ubuntu Pro"
        • 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 256 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 | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      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"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 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 256 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'
  },
  ClientLoginBannerOptions: {
    BannerText: 'STRING_VALUE',
    Enabled: true || false
  },
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DnsServers: [
    'STRING_VALUE',
    /* more items */
  ],
  DryRun: true || false,
  SecurityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  SelfServicePortal: enabled | disabled,
  SessionTimeoutHours: 'NUMBER_VALUE',
  SplitTunnel: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      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. Client CIDR range must have a size of at least /22 and must not be greater than /12.

    • 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 Ensuring 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"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 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.

    • SessionTimeoutHours — (Integer)

      The maximum VPN session duration time in hours.

      Valid values: 8 | 10 | 12 | 24

      Default value: 24

    • ClientLoginBannerOptions — (map)

      Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.

      • Enabled — (Boolean)

        Enable or disable a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.

        Valid values: true | false

        Default value: false

      • BannerText — (String)

        Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 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:

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

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

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

Creates a range of customer-owned IP addresses.

Service Reference:

Examples:

Calling the createCoipCidr operation

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

      A customer-owned IP address range to create.

    • CoipPoolId — (String)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • CoipCidr — (map)

        Information about a range of customer-owned IP addresses.

        • Cidr — (String)

          An address range in a customer-owned IP address space.

        • CoipPoolId — (String)

          The ID of the address pool.

        • LocalGatewayRouteTableId — (String)

          The ID of the local gateway route table.

Returns:

  • (AWS.Request)

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

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

Creates a pool of customer-owned IP (CoIP) addresses.

Service Reference:

Examples:

Calling the createCoipPool operation

var params = {
  LocalGatewayRouteTableId: 'STRING_VALUE', /* required */
  DryRun: true || false,
  TagSpecifications: [
    {
      ResourceType: capacity-reservation | client-vpn-endpoint | customer-gateway | carrier-gateway | coip-pool | 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 | ipam | ipam-pool | ipam-scope | 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 | network-insights-access-scope | network-insights-access-scope-analysis | 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 | subnet-cidr-reservation | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-connect-peer | transit-gateway-multicast-domain | transit-gateway-policy-table | transit-gateway-route-table | transit-gateway-route-table-announcement | volume | vpc | vpc-endpoint | vpc-endpoint-connection | vpc-endpoint-service | vpc-endpoint-service-permission | vpc-peering-connection | vpn-connection | vpn-gateway | vpc-flow-log | capacity-reservation-fleet | traffic-mirror-filter-rule | vpc-endpoint-connection-device-type | verified-access-instance | verified-access-group | verified-access-endpoint | verified-access-policy | verified-access-trust-provider | vpn-connection-device-type | vpc-block-public-access-exclusion | ipam-resource-discovery | ipam-resource-discovery-association | instance-connect-endpoint | ipam-external-resource-verification-token,
      Tags: [
        {
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ec2.createCoipPool(params, 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.

    • TagSpecifications — (Array<map>)

      The tags to assign to the CoIP address pool.

      • ResourceType — (String)

        The type of resource to tag on creation.

        Possible values include:
        • "capacity-reservation"
        • "client-vpn-endpoint"
        • "customer-gateway"
        • "carrier-gateway"
        • "coip-pool"
        • "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"
        • "ipam"
        • "ipam-pool"
        • "ipam-scope"
        • "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"
        • "network-insights-access-scope"
        • "network-insights-access-scope-analysis"
        • "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"
        • "subnet-cidr-reservation"
        • "traffic-mirror-filter"
        • "traffic-mirror-session"
        • "traffic-mirror-target"
        • "transit-gateway"
        • "transit-gateway-attachment"
        • "transit-gateway-connect-peer"
        • "transit-gateway-multicast-domain"
        • "transit-gateway-policy-table"
        • "transit-gateway-route-table"
        • "transit-gateway-route-table-announcement"
        • "volume"
        • "vpc"
        • "vpc-endpoint"
        • "vpc-endpoint-connection"
        • "vpc-endpoint-service"
        • "vpc-endpoint-service-permission"
        • "vpc-peering-connection"
        • "vpn-connection"
        • "vpn-gateway"
        • "vpc-flow-log"
        • "capacity-reservation-fleet"
        • "traffic-mirror-filter-rule"
        • "vpc-endpoint-connection-device-type"
        • "verified-access-instance"
        • "verified-access-group"
        • "verified-access-endpoint"
        • "verified-access-policy"
        • "verified-access-trust-provider"
        • "vpn-connection-device-type"
        • "vpc-block-public-access-exclusion"
        • "ipam-resource-discovery"
        • "ipam-resource-discovery-association"
        • "instance-connect-endpoint"
        • "ipam-external-resource-verification-token"
      • 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 256 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.