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

Class: AWS.ServiceDiscovery

Inherits:
AWS.Service show all
Identifier:
servicediscovery
API Version:
2017-03-14
Defined in:
(unknown)

Overview

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

Service Description

With Cloud Map, you can configure public DNS, private DNS, or HTTP namespaces that your microservice applications run in. When an instance becomes available, you can call the Cloud Map API to register the instance with Cloud Map. For public or private DNS namespaces, Cloud Map automatically creates DNS records and an optional health check. Clients that submit public or private DNS queries, or HTTP requests, for the service receive an answer that contains up to eight healthy records.

Sending a Request Using ServiceDiscovery

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

var servicediscovery = new AWS.ServiceDiscovery({apiVersion: '2017-03-14'});

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

AWS.config.apiVersions = {
  servicediscovery: '2017-03-14',
  // other service API versions
};

var servicediscovery = new AWS.ServiceDiscovery();

Version:

  • 2017-03-14

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse