Back to Aws Sdk Js V3

@aws-sdk/client-route-53

clients/client-route-53/README.md

3.1043.040.2 KB
Original Source
<!-- generated file, do not edit directly -->

@aws-sdk/client-route-53

Description

AWS SDK for JavaScript Route53 Client for Node.js, Browser and React Native.

<p>Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service.</p> <p>You can use Route 53 to:</p> <ul> <li> <p>Register domain names.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-domain-registration.html">How domain registration works</a>.</p> </li> <li> <p>Route internet traffic to the resources for your domain</p> <p>For more information, see <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-dns-service.html">How internet traffic is routed to your website or web application</a>.</p> </li> <li> <p>Check the health of your resources.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-health-checks.html">How Route 53 checks the health of your resources</a>.</p> </li> </ul>

Installing

To install this package, use the CLI of your favorite package manager:

  • npm install @aws-sdk/client-route-53
  • yarn add @aws-sdk/client-route-53
  • pnpm add @aws-sdk/client-route-53

Getting Started

Import

The AWS SDK is modulized by clients and commands. To send a request, you only need to import the Route53Client and the commands you need, for example ListGeoLocationsCommand:

js
// ES5 example
const { Route53Client, ListGeoLocationsCommand } = require("@aws-sdk/client-route-53");
ts
// ES6+ example
import { Route53Client, ListGeoLocationsCommand } from "@aws-sdk/client-route-53";

Usage

To send a request:

  • Instantiate a client with configuration (e.g. credentials, region).
  • Instantiate a command with input parameters.
  • Call the send operation on the client, providing the command object as input.
js
const client = new Route53Client({ region: "REGION" });

const params = { /** input parameters */ };
const command = new ListGeoLocationsCommand(params);

Async/await

We recommend using the await operator to wait for the promise returned by send operation as follows:

js
// async/await.
try {
  const data = await client.send(command);
  // process data.
} catch (error) {
  // error handling.
} finally {
  // finally.
}

Promises

You can also use Promise chaining.

js
client
  .send(command)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  })
  .finally(() => {
    // finally.
  });

Aggregated client

The aggregated client class is exported from the same package, but without the "Client" suffix.

Route53 extends Route53Client and additionally supports all operations, waiters, and paginators as methods. This style may be familiar to you from the AWS SDK for JavaScript v2.

If you are bundling the AWS SDK, we recommend using only the bare-bones client (Route53Client). More details are in the blog post on modular packages in AWS SDK for JavaScript.

ts
import { Route53 } from "@aws-sdk/client-route-53";

const client = new Route53({ region: "REGION" });

// async/await.
try {
  const data = await client.listGeoLocations(params);
  // process data.
} catch (error) {
  // error handling.
}

// Promises.
client
  .listGeoLocations(params)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  });

// callbacks (not recommended).
client.listGeoLocations(params, (err, data) => {
  // process err and data.
});

Troubleshooting

When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).

js
try {
  const data = await client.send(command);
  // process data.
} catch (error) {
  const { requestId, cfId, extendedRequestId } = error.$metadata;
  console.log({ requestId, cfId, extendedRequestId });
  /**
   * The keys within exceptions are also parsed.
   * You can access them by specifying exception names:
   * if (error.name === 'SomeServiceException') {
   *     const value = error.specialKeyInException;
   * }
   */
}

See also docs/ERROR_HANDLING.

Getting Help

Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.

To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.

Contributing

This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-route-53 package is updated. To contribute to client you can check our generate clients scripts.

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.

Client Commands (Operations List)

<details> <summary> ActivateKeySigningKey </summary>

Command API Reference / Input / Output

</details> <details> <summary> AssociateVPCWithHostedZone </summary>

Command API Reference / Input / Output

</details> <details> <summary> ChangeCidrCollection </summary>

Command API Reference / Input / Output

</details> <details> <summary> ChangeResourceRecordSets </summary>

Command API Reference / Input / Output

</details> <details> <summary> ChangeTagsForResource </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateCidrCollection </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateHealthCheck </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateHostedZone </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateKeySigningKey </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateQueryLoggingConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateReusableDelegationSet </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateTrafficPolicy </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateTrafficPolicyInstance </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateTrafficPolicyVersion </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateVPCAssociationAuthorization </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeactivateKeySigningKey </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteCidrCollection </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteHealthCheck </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteHostedZone </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteKeySigningKey </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteQueryLoggingConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteReusableDelegationSet </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteTrafficPolicy </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteTrafficPolicyInstance </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteVPCAssociationAuthorization </summary>

Command API Reference / Input / Output

</details> <details> <summary> DisableHostedZoneDNSSEC </summary>

Command API Reference / Input / Output

</details> <details> <summary> DisassociateVPCFromHostedZone </summary>

Command API Reference / Input / Output

</details> <details> <summary> EnableHostedZoneDNSSEC </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetAccountLimit </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetChange </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetCheckerIpRanges </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetDNSSEC </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetGeoLocation </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetHealthCheck </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetHealthCheckCount </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetHealthCheckLastFailureReason </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetHealthCheckStatus </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetHostedZone </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetHostedZoneCount </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetHostedZoneLimit </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetQueryLoggingConfig </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetReusableDelegationSet </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetReusableDelegationSetLimit </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetTrafficPolicy </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetTrafficPolicyInstance </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetTrafficPolicyInstanceCount </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListCidrBlocks </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListCidrCollections </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListCidrLocations </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListGeoLocations </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListHealthChecks </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListHostedZones </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListHostedZonesByName </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListHostedZonesByVPC </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListQueryLoggingConfigs </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListResourceRecordSets </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListReusableDelegationSets </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListTagsForResource </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListTagsForResources </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListTrafficPolicies </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListTrafficPolicyInstances </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListTrafficPolicyInstancesByHostedZone </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListTrafficPolicyInstancesByPolicy </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListTrafficPolicyVersions </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListVPCAssociationAuthorizations </summary>

Command API Reference / Input / Output

</details> <details> <summary> TestDNSAnswer </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateHealthCheck </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateHostedZoneComment </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateHostedZoneFeatures </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateTrafficPolicyComment </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateTrafficPolicyInstance </summary>

Command API Reference / Input / Output

</details>