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