clients/client-global-accelerator/README.md
AWS SDK for JavaScript GlobalAccelerator Client for Node.js, Browser and React Native.
<fullname>Global Accelerator</fullname>
<p>This is the <i>Global Accelerator API Reference</i>. This guide is for developers who need detailed information about Global Accelerator API actions, data types, and errors. For more information about Global Accelerator features, see the <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/what-is-global-accelerator.html">Global Accelerator Developer Guide</a>.</p> <p>Global Accelerator is a service in which you create <i>accelerators</i> to improve the performance of your applications for local and global users. Depending on the type of accelerator you choose, you can gain additional benefits. </p> <ul> <li> <p>By using a standard accelerator, you can improve availability of your internet applications that are used by a global audience. With a standard accelerator, Global Accelerator directs traffic to optimal endpoints over the Amazon Web Services global network. </p> </li> <li> <p>For other scenarios, you might choose a custom routing accelerator. With a custom routing accelerator, you can use application logic to directly map one or more users to a specific endpoint among many endpoints.</p> </li> </ul> <p>Global Accelerator is a global service that supports endpoints in multiple Amazon Web Services Regions but you must specify the US West (Oregon) Region to create, update, or otherwise work with accelerators. That is, for example, specify <code>--region us-west-2</code> on Amazon Web Services CLI commands.</p> <p>By default, Global Accelerator provides you with static IP addresses that you associate with your accelerator. The static IP addresses are anycast from the Amazon Web Services edge network. For IPv4, Global Accelerator provides two static IPv4 addresses. For dual-stack, Global Accelerator provides a total of four addresses: two static IPv4 addresses and two static IPv6 addresses. With a standard accelerator for IPv4, instead of using the addresses that Global Accelerator provides, you can configure these entry points to be IPv4 addresses from your own IP address ranges that you bring to Global Accelerator (BYOIP). </p> <p>For a standard accelerator, they distribute incoming application traffic across multiple endpoint resources in multiple Amazon Web Services Regions , which increases the availability of your applications. Endpoints for standard accelerators can be Network Load Balancers, Application Load Balancers, Amazon EC2 instances, or Elastic IP addresses that are located in one Amazon Web Services Region or multiple Amazon Web Services Regions. For custom routing accelerators, you map traffic that arrives to the static IP addresses to specific Amazon EC2 servers in endpoints that are virtual private cloud (VPC) subnets.</p> <p>The static IP addresses remain assigned to your accelerator for as long as it exists, even if you disable the accelerator and it no longer accepts or routes traffic. However, when you <i>delete</i> an accelerator, you lose the static IP addresses that are assigned to it, so you can no longer route traffic by using them. You can use IAM policies like tag-based permissions with Global Accelerator to limit the users who have permissions to delete an accelerator. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/access-control-manage-access-tag-policies.html">Tag-based policies</a>.</p> <p>For standard accelerators, Global Accelerator uses the Amazon Web Services global network to route traffic to the optimal regional endpoint based on health, client location, and policies that you configure. The service reacts instantly to changes in health or configuration to ensure that internet traffic from clients is always directed to healthy endpoints.</p> <p>For more information about understanding and using Global Accelerator, see the <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/what-is-global-accelerator.html">Global Accelerator Developer Guide</a>.</p>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-global-acceleratoryarn add @aws-sdk/client-global-acceleratorpnpm add @aws-sdk/client-global-acceleratorThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the GlobalAcceleratorClient and
the commands you need, for example ListAcceleratorsCommand:
// ES5 example
const { GlobalAcceleratorClient, ListAcceleratorsCommand } = require("@aws-sdk/client-global-accelerator");
// ES6+ example
import { GlobalAcceleratorClient, ListAcceleratorsCommand } from "@aws-sdk/client-global-accelerator";
To send a request:
send operation on the client, providing the command object as input.const client = new GlobalAcceleratorClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListAcceleratorsCommand(params);
We recommend using the await operator to wait for the promise returned by send operation as follows:
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
You can also use Promise chaining.
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
The aggregated client class is exported from the same package, but without the "Client" suffix.
GlobalAccelerator extends GlobalAcceleratorClient 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 (GlobalAcceleratorClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { GlobalAccelerator } from "@aws-sdk/client-global-accelerator";
const client = new GlobalAccelerator({ region: "REGION" });
// async/await.
try {
const data = await client.listAccelerators(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listAccelerators(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listAccelerators(params, (err, data) => {
// process err and data.
});
When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).
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.
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.
aws-sdk-js
on AWS Developer Blog.aws-sdk-js.To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-global-accelerator package is updated.
To contribute to client you can check our generate clients scripts.
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Command API Reference / Input / Output
</details> <details> <summary> AddEndpoints </summary>Command API Reference / Input / Output
</details> <details> <summary> AdvertiseByoipCidr </summary>Command API Reference / Input / Output
</details> <details> <summary> AllowCustomRoutingTraffic </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateAccelerator </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateCrossAccountAttachment </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateCustomRoutingAccelerator </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateCustomRoutingEndpointGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateCustomRoutingListener </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateEndpointGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateListener </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteAccelerator </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteCrossAccountAttachment </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteCustomRoutingAccelerator </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteCustomRoutingEndpointGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteCustomRoutingListener </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteEndpointGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteListener </summary>Command API Reference / Input / Output
</details> <details> <summary> DenyCustomRoutingTraffic </summary>Command API Reference / Input / Output
</details> <details> <summary> DeprovisionByoipCidr </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeAccelerator </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeAcceleratorAttributes </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeCrossAccountAttachment </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeCustomRoutingAccelerator </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeCustomRoutingAcceleratorAttributes </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeCustomRoutingEndpointGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeCustomRoutingListener </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeEndpointGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeListener </summary>Command API Reference / Input / Output
</details> <details> <summary> ListAccelerators </summary>Command API Reference / Input / Output
</details> <details> <summary> ListByoipCidrs </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCrossAccountAttachments </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCrossAccountResourceAccounts </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCrossAccountResources </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCustomRoutingAccelerators </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCustomRoutingEndpointGroups </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCustomRoutingListeners </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCustomRoutingPortMappings </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCustomRoutingPortMappingsByDestination </summary>Command API Reference / Input / Output
</details> <details> <summary> ListEndpointGroups </summary>Command API Reference / Input / Output
</details> <details> <summary> ListListeners </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> ProvisionByoipCidr </summary>Command API Reference / Input / Output
</details> <details> <summary> RemoveCustomRoutingEndpoints </summary>Command API Reference / Input / Output
</details> <details> <summary> RemoveEndpoints </summary>Command API Reference / Input / Output
</details> <details> <summary> TagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UntagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateAccelerator </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateAcceleratorAttributes </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateCrossAccountAttachment </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateCustomRoutingAccelerator </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateCustomRoutingAcceleratorAttributes </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateCustomRoutingListener </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateEndpointGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateListener </summary> </details> <details> <summary> WithdrawByoipCidr </summary> </details>