Skip to content

Commit

Permalink
feat(client-arc-zonal-shift): This release adds a new capability, zon…
Browse files Browse the repository at this point in the history
…al autoshift. You can configure zonal autoshift so that AWS shifts traffic for a resource away from an Availability Zone, on your behalf, when AWS determines that there is an issue that could potentially affect customers in the Availability Zone.
  • Loading branch information
awstools committed Nov 30, 2023
1 parent fd0d898 commit 2152324
Show file tree
Hide file tree
Showing 21 changed files with 3,722 additions and 251 deletions.
96 changes: 74 additions & 22 deletions clients/client-arc-zonal-shift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,33 @@

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

<p>This is the API Reference Guide for the zonal shift feature of Amazon Route 53 Application Recovery Controller. This guide is for developers who need detailed information about
zonal shift API actions, data types, and errors.</p>
<p>Zonal shift is in preview release for Amazon Route 53 Application Recovery Controller and is subject to change.</p>
<p>Zonal shift in Route 53 ARC enables you to move traffic for a load balancer resource away from an Availability Zone. Starting
a zonal shift helps your application recover immediately, for example, from a developer's bad code deployment
or from an AWS infrastructure failure in a single Availability Zone, reducing the impact and time lost from an issue
in one zone. </p>
<p>Supported AWS resources are automatically registered with Route 53 ARC. Resources that are registered for zonal shifts
in Route 53 ARC are managed resources in Route 53 ARC. You can start a zonal shift for any managed resource in your account in a Region.
At this time, you can only start a zonal shift for Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.</p>
<p>Zonal shifts are temporary. You must specify an expiration when you start a zonal shift, of up to three days initially.
If you want to still keep traffic away from an Availability Zone, you can update the zonal shift and set a new expiration.
You can also cancel a zonal shift, before it expires, for example, if you're ready to restore traffic to the Availability Zone.</p>
<p>For more information about using zonal shift, see the
<a href="https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route53-recovery.html">Amazon Route 53 Application Recovery Controller Developer Guide</a>.</p>
<p>Welcome to the Zonal Shift API Reference Guide for Amazon Route 53 Application Recovery Controller (Route 53 ARC).</p>
<p>You can start a zonal shift to move traffic for a load balancer resource away from an Availability Zone to
help your application recover quickly from an impairment in an Availability Zone. For example,
you can recover your application from a developer's bad code deployment or from an
Amazon Web Services infrastructure failure in a single Availability Zone.</p>
<p>You can also configure zonal autoshift for a load balancer resource. Zonal autoshift
is a capability in Route 53 ARC where Amazon Web Services shifts away application resource
traffic from an Availability Zone, on your behalf, to help reduce your time to recovery during events.
Amazon Web Services shifts away traffic for resources that are enabled for zonal autoshift whenever Amazon Web Services
determines that there's an issue in the Availability Zone that could potentially affect
customers.</p>
<p>To ensure that zonal autoshift is safe for your application, you must
also configure practice runs when you enable zonal autoshift for a resource. Practice runs start
weekly zonal shifts for a resource, to shift
traffic for the resource out of an Availability Zone. Practice runs make sure, on a regular basis,
that you have enough capacity in all the Availability Zones in an Amazon Web Services Region
for your application to continue to operate normally
when traffic for a resource is shifted away from one Availability Zone.</p>
<important>
<p>You must prescale resource capacity in all Availability Zones in the Region
where your application is deployed, before you configure practice runs or enable zonal autoshift
for a resource. You should not rely on scaling on demand when an autoshift or practice run
starts. </p>
</important>
<p>For more information about using zonal shift and zonal autoshift, see the
<a href="https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route53-recovery.html">Amazon Route 53 Application Recovery Controller
Developer Guide</a>.</p>

## Installing

Expand All @@ -37,16 +49,16 @@ using your favorite package manager:

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

```js
// ES5 example
const { ARCZonalShiftClient, ListZonalShiftsCommand } = require("@aws-sdk/client-arc-zonal-shift");
const { ARCZonalShiftClient, ListAutoshiftsCommand } = require("@aws-sdk/client-arc-zonal-shift");
```

```ts
// ES6+ example
import { ARCZonalShiftClient, ListZonalShiftsCommand } from "@aws-sdk/client-arc-zonal-shift";
import { ARCZonalShiftClient, ListAutoshiftsCommand } from "@aws-sdk/client-arc-zonal-shift";
```

### Usage
Expand All @@ -65,7 +77,7 @@ const client = new ARCZonalShiftClient({ region: "REGION" });
const params = {
/** input parameters */
};
const command = new ListZonalShiftsCommand(params);
const command = new ListAutoshiftsCommand(params);
```

#### Async/await
Expand Down Expand Up @@ -144,15 +156,15 @@ const client = new AWS.ARCZonalShift({ region: "REGION" });

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

// Promises.
client
.listZonalShifts(params)
.listAutoshifts(params)
.then((data) => {
// process data.
})
Expand All @@ -161,7 +173,7 @@ client
});

// callbacks.
client.listZonalShifts(params, (err, data) => {
client.listAutoshifts(params, (err, data) => {
// process err and data.
});
```
Expand Down Expand Up @@ -224,6 +236,22 @@ CancelZonalShift

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/arc-zonal-shift/command/CancelZonalShiftCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/CancelZonalShiftCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/CancelZonalShiftCommandOutput/)

</details>
<details>
<summary>
CreatePracticeRunConfiguration
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/arc-zonal-shift/command/CreatePracticeRunConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/CreatePracticeRunConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/CreatePracticeRunConfigurationCommandOutput/)

</details>
<details>
<summary>
DeletePracticeRunConfiguration
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/arc-zonal-shift/command/DeletePracticeRunConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/DeletePracticeRunConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/DeletePracticeRunConfigurationCommandOutput/)

</details>
<details>
<summary>
Expand All @@ -232,6 +260,14 @@ GetManagedResource

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/arc-zonal-shift/command/GetManagedResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/GetManagedResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/GetManagedResourceCommandOutput/)

</details>
<details>
<summary>
ListAutoshifts
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/arc-zonal-shift/command/ListAutoshiftsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/ListAutoshiftsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/ListAutoshiftsCommandOutput/)

</details>
<details>
<summary>
Expand All @@ -256,6 +292,22 @@ StartZonalShift

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/arc-zonal-shift/command/StartZonalShiftCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/StartZonalShiftCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/StartZonalShiftCommandOutput/)

</details>
<details>
<summary>
UpdatePracticeRunConfiguration
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/arc-zonal-shift/command/UpdatePracticeRunConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/UpdatePracticeRunConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/UpdatePracticeRunConfigurationCommandOutput/)

</details>
<details>
<summary>
UpdateZonalAutoshiftConfiguration
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/arc-zonal-shift/command/UpdateZonalAutoshiftConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/UpdateZonalAutoshiftConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-zonal-shift/Interface/UpdateZonalAutoshiftConfigurationCommandOutput/)

</details>
<details>
<summary>
Expand Down
154 changes: 139 additions & 15 deletions clients/client-arc-zonal-shift/src/ARCZonalShift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,26 @@ import {
CancelZonalShiftCommandInput,
CancelZonalShiftCommandOutput,
} from "./commands/CancelZonalShiftCommand";
import {
CreatePracticeRunConfigurationCommand,
CreatePracticeRunConfigurationCommandInput,
CreatePracticeRunConfigurationCommandOutput,
} from "./commands/CreatePracticeRunConfigurationCommand";
import {
DeletePracticeRunConfigurationCommand,
DeletePracticeRunConfigurationCommandInput,
DeletePracticeRunConfigurationCommandOutput,
} from "./commands/DeletePracticeRunConfigurationCommand";
import {
GetManagedResourceCommand,
GetManagedResourceCommandInput,
GetManagedResourceCommandOutput,
} from "./commands/GetManagedResourceCommand";
import {
ListAutoshiftsCommand,
ListAutoshiftsCommandInput,
ListAutoshiftsCommandOutput,
} from "./commands/ListAutoshiftsCommand";
import {
ListManagedResourcesCommand,
ListManagedResourcesCommandInput,
Expand All @@ -28,6 +43,16 @@ import {
StartZonalShiftCommandInput,
StartZonalShiftCommandOutput,
} from "./commands/StartZonalShiftCommand";
import {
UpdatePracticeRunConfigurationCommand,
UpdatePracticeRunConfigurationCommandInput,
UpdatePracticeRunConfigurationCommandOutput,
} from "./commands/UpdatePracticeRunConfigurationCommand";
import {
UpdateZonalAutoshiftConfigurationCommand,
UpdateZonalAutoshiftConfigurationCommandInput,
UpdateZonalAutoshiftConfigurationCommandOutput,
} from "./commands/UpdateZonalAutoshiftConfigurationCommand";
import {
UpdateZonalShiftCommand,
UpdateZonalShiftCommandInput,
Expand All @@ -36,10 +61,15 @@ import {

const commands = {
CancelZonalShiftCommand,
CreatePracticeRunConfigurationCommand,
DeletePracticeRunConfigurationCommand,
GetManagedResourceCommand,
ListAutoshiftsCommand,
ListManagedResourcesCommand,
ListZonalShiftsCommand,
StartZonalShiftCommand,
UpdatePracticeRunConfigurationCommand,
UpdateZonalAutoshiftConfigurationCommand,
UpdateZonalShiftCommand,
};

Expand All @@ -61,6 +91,40 @@ export interface ARCZonalShift {
cb: (err: any, data?: CancelZonalShiftCommandOutput) => void
): void;

/**
* @see {@link CreatePracticeRunConfigurationCommand}
*/
createPracticeRunConfiguration(
args: CreatePracticeRunConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<CreatePracticeRunConfigurationCommandOutput>;
createPracticeRunConfiguration(
args: CreatePracticeRunConfigurationCommandInput,
cb: (err: any, data?: CreatePracticeRunConfigurationCommandOutput) => void
): void;
createPracticeRunConfiguration(
args: CreatePracticeRunConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreatePracticeRunConfigurationCommandOutput) => void
): void;

/**
* @see {@link DeletePracticeRunConfigurationCommand}
*/
deletePracticeRunConfiguration(
args: DeletePracticeRunConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<DeletePracticeRunConfigurationCommandOutput>;
deletePracticeRunConfiguration(
args: DeletePracticeRunConfigurationCommandInput,
cb: (err: any, data?: DeletePracticeRunConfigurationCommandOutput) => void
): void;
deletePracticeRunConfiguration(
args: DeletePracticeRunConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeletePracticeRunConfigurationCommandOutput) => void
): void;

/**
* @see {@link GetManagedResourceCommand}
*/
Expand All @@ -78,6 +142,20 @@ export interface ARCZonalShift {
cb: (err: any, data?: GetManagedResourceCommandOutput) => void
): void;

/**
* @see {@link ListAutoshiftsCommand}
*/
listAutoshifts(
args: ListAutoshiftsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListAutoshiftsCommandOutput>;
listAutoshifts(args: ListAutoshiftsCommandInput, cb: (err: any, data?: ListAutoshiftsCommandOutput) => void): void;
listAutoshifts(
args: ListAutoshiftsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListAutoshiftsCommandOutput) => void
): void;

/**
* @see {@link ListManagedResourcesCommand}
*/
Expand Down Expand Up @@ -123,6 +201,40 @@ export interface ARCZonalShift {
cb: (err: any, data?: StartZonalShiftCommandOutput) => void
): void;

/**
* @see {@link UpdatePracticeRunConfigurationCommand}
*/
updatePracticeRunConfiguration(
args: UpdatePracticeRunConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdatePracticeRunConfigurationCommandOutput>;
updatePracticeRunConfiguration(
args: UpdatePracticeRunConfigurationCommandInput,
cb: (err: any, data?: UpdatePracticeRunConfigurationCommandOutput) => void
): void;
updatePracticeRunConfiguration(
args: UpdatePracticeRunConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdatePracticeRunConfigurationCommandOutput) => void
): void;

/**
* @see {@link UpdateZonalAutoshiftConfigurationCommand}
*/
updateZonalAutoshiftConfiguration(
args: UpdateZonalAutoshiftConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateZonalAutoshiftConfigurationCommandOutput>;
updateZonalAutoshiftConfiguration(
args: UpdateZonalAutoshiftConfigurationCommandInput,
cb: (err: any, data?: UpdateZonalAutoshiftConfigurationCommandOutput) => void
): void;
updateZonalAutoshiftConfiguration(
args: UpdateZonalAutoshiftConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateZonalAutoshiftConfigurationCommandOutput) => void
): void;

/**
* @see {@link UpdateZonalShiftCommand}
*/
Expand All @@ -143,21 +255,33 @@ export interface ARCZonalShift {

/**
* @public
* <p>This is the API Reference Guide for the zonal shift feature of Amazon Route 53 Application Recovery Controller. This guide is for developers who need detailed information about
* zonal shift API actions, data types, and errors.</p>
* <p>Zonal shift is in preview release for Amazon Route 53 Application Recovery Controller and is subject to change.</p>
* <p>Zonal shift in Route 53 ARC enables you to move traffic for a load balancer resource away from an Availability Zone. Starting
* a zonal shift helps your application recover immediately, for example, from a developer's bad code deployment
* or from an AWS infrastructure failure in a single Availability Zone, reducing the impact and time lost from an issue
* in one zone. </p>
* <p>Supported AWS resources are automatically registered with Route 53 ARC. Resources that are registered for zonal shifts
* in Route 53 ARC are managed resources in Route 53 ARC. You can start a zonal shift for any managed resource in your account in a Region.
* At this time, you can only start a zonal shift for Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.</p>
* <p>Zonal shifts are temporary. You must specify an expiration when you start a zonal shift, of up to three days initially.
* If you want to still keep traffic away from an Availability Zone, you can update the zonal shift and set a new expiration.
* You can also cancel a zonal shift, before it expires, for example, if you're ready to restore traffic to the Availability Zone.</p>
* <p>For more information about using zonal shift, see the
* <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route53-recovery.html">Amazon Route 53 Application Recovery Controller Developer Guide</a>.</p>
* <p>Welcome to the Zonal Shift API Reference Guide for Amazon Route 53 Application Recovery Controller (Route 53 ARC).</p>
* <p>You can start a zonal shift to move traffic for a load balancer resource away from an Availability Zone to
* help your application recover quickly from an impairment in an Availability Zone. For example,
* you can recover your application from a developer's bad code deployment or from an
* Amazon Web Services infrastructure failure in a single Availability Zone.</p>
* <p>You can also configure zonal autoshift for a load balancer resource. Zonal autoshift
* is a capability in Route 53 ARC where Amazon Web Services shifts away application resource
* traffic from an Availability Zone, on your behalf, to help reduce your time to recovery during events.
* Amazon Web Services shifts away traffic for resources that are enabled for zonal autoshift whenever Amazon Web Services
* determines that there's an issue in the Availability Zone that could potentially affect
* customers.</p>
* <p>To ensure that zonal autoshift is safe for your application, you must
* also configure practice runs when you enable zonal autoshift for a resource. Practice runs start
* weekly zonal shifts for a resource, to shift
* traffic for the resource out of an Availability Zone. Practice runs make sure, on a regular basis,
* that you have enough capacity in all the Availability Zones in an Amazon Web Services Region
* for your application to continue to operate normally
* when traffic for a resource is shifted away from one Availability Zone.</p>
* <important>
* <p>You must prescale resource capacity in all Availability Zones in the Region
* where your application is deployed, before you configure practice runs or enable zonal autoshift
* for a resource. You should not rely on scaling on demand when an autoshift or practice run
* starts. </p>
* </important>
* <p>For more information about using zonal shift and zonal autoshift, see the
* <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route53-recovery.html">Amazon Route 53 Application Recovery Controller
* Developer Guide</a>.</p>
*/
export class ARCZonalShift extends ARCZonalShiftClient implements ARCZonalShift {}
createAggregatedClient(commands, ARCZonalShift);
Loading

0 comments on commit 2152324

Please sign in to comment.