Skip to content

Commit 406035c

Browse files
author
awstools
committed
feat(client-arc-region-switch): New API to list Route 53 health checks created by ARC region switch for a plan in a specific AWS Region using the Region switch Regional data plane.
1 parent 800275c commit 406035c

File tree

16 files changed

+530
-22
lines changed

16 files changed

+530
-22
lines changed

clients/client-arc-region-switch/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,14 @@ ListRoute53HealthChecks
306306

307307
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/arc-region-switch/command/ListRoute53HealthChecksCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-region-switch/Interface/ListRoute53HealthChecksCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-region-switch/Interface/ListRoute53HealthChecksCommandOutput/)
308308

309+
</details>
310+
<details>
311+
<summary>
312+
ListRoute53HealthChecksInRegion
313+
</summary>
314+
315+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/arc-region-switch/command/ListRoute53HealthChecksInRegionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-region-switch/Interface/ListRoute53HealthChecksInRegionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-arc-region-switch/Interface/ListRoute53HealthChecksInRegionCommandOutput/)
316+
309317
</details>
310318
<details>
311319
<summary>

clients/client-arc-region-switch/src/ARCRegionSwitch.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ import {
5252
ListRoute53HealthChecksCommandInput,
5353
ListRoute53HealthChecksCommandOutput,
5454
} from "./commands/ListRoute53HealthChecksCommand";
55+
import {
56+
ListRoute53HealthChecksInRegionCommand,
57+
ListRoute53HealthChecksInRegionCommandInput,
58+
ListRoute53HealthChecksInRegionCommandOutput,
59+
} from "./commands/ListRoute53HealthChecksInRegionCommand";
5560
import {
5661
ListTagsForResourceCommand,
5762
ListTagsForResourceCommandInput,
@@ -94,6 +99,7 @@ const commands = {
9499
ListPlansCommand,
95100
ListPlansInRegionCommand,
96101
ListRoute53HealthChecksCommand,
102+
ListRoute53HealthChecksInRegionCommand,
97103
ListTagsForResourceCommand,
98104
StartPlanExecutionCommand,
99105
TagResourceCommand,
@@ -300,6 +306,23 @@ export interface ARCRegionSwitch {
300306
cb: (err: any, data?: ListRoute53HealthChecksCommandOutput) => void
301307
): void;
302308

309+
/**
310+
* @see {@link ListRoute53HealthChecksInRegionCommand}
311+
*/
312+
listRoute53HealthChecksInRegion(
313+
args: ListRoute53HealthChecksInRegionCommandInput,
314+
options?: __HttpHandlerOptions
315+
): Promise<ListRoute53HealthChecksInRegionCommandOutput>;
316+
listRoute53HealthChecksInRegion(
317+
args: ListRoute53HealthChecksInRegionCommandInput,
318+
cb: (err: any, data?: ListRoute53HealthChecksInRegionCommandOutput) => void
319+
): void;
320+
listRoute53HealthChecksInRegion(
321+
args: ListRoute53HealthChecksInRegionCommandInput,
322+
options: __HttpHandlerOptions,
323+
cb: (err: any, data?: ListRoute53HealthChecksInRegionCommandOutput) => void
324+
): void;
325+
303326
/**
304327
* @see {@link ListTagsForResourceCommand}
305328
*/

clients/client-arc-region-switch/src/ARCRegionSwitchClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ import {
9191
ListRoute53HealthChecksCommandInput,
9292
ListRoute53HealthChecksCommandOutput,
9393
} from "./commands/ListRoute53HealthChecksCommand";
94+
import {
95+
ListRoute53HealthChecksInRegionCommandInput,
96+
ListRoute53HealthChecksInRegionCommandOutput,
97+
} from "./commands/ListRoute53HealthChecksInRegionCommand";
9498
import {
9599
ListTagsForResourceCommandInput,
96100
ListTagsForResourceCommandOutput,
@@ -135,6 +139,7 @@ export type ServiceInputTypes =
135139
| ListPlansCommandInput
136140
| ListPlansInRegionCommandInput
137141
| ListRoute53HealthChecksCommandInput
142+
| ListRoute53HealthChecksInRegionCommandInput
138143
| ListTagsForResourceCommandInput
139144
| StartPlanExecutionCommandInput
140145
| TagResourceCommandInput
@@ -160,6 +165,7 @@ export type ServiceOutputTypes =
160165
| ListPlansCommandOutput
161166
| ListPlansInRegionCommandOutput
162167
| ListRoute53HealthChecksCommandOutput
168+
| ListRoute53HealthChecksInRegionCommandOutput
163169
| ListTagsForResourceCommandOutput
164170
| StartPlanExecutionCommandOutput
165171
| TagResourceCommandOutput

clients/client-arc-region-switch/src/commands/ListRoute53HealthChecksCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export interface ListRoute53HealthChecksCommandOutput extends ListRoute53HealthC
5555
* // hostedZoneId: "STRING_VALUE", // required
5656
* // recordName: "STRING_VALUE", // required
5757
* // healthCheckId: "STRING_VALUE",
58+
* // status: "healthy" || "unhealthy" || "unknown",
5859
* // region: "STRING_VALUE", // required
5960
* // },
6061
* // ],
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { Command as $Command } from "@smithy/smithy-client";
4+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
5+
6+
import type {
7+
ARCRegionSwitchClientResolvedConfig,
8+
ServiceInputTypes,
9+
ServiceOutputTypes,
10+
} from "../ARCRegionSwitchClient";
11+
import { commonParams } from "../endpoint/EndpointParameters";
12+
import type {
13+
ListRoute53HealthChecksInRegionRequest,
14+
ListRoute53HealthChecksInRegionResponse,
15+
} from "../models/models_0";
16+
import { ListRoute53HealthChecksInRegion$ } from "../schemas/schemas_0";
17+
18+
/**
19+
* @public
20+
*/
21+
export type { __MetadataBearer };
22+
export { $Command };
23+
/**
24+
* @public
25+
*
26+
* The input for {@link ListRoute53HealthChecksInRegionCommand}.
27+
*/
28+
export interface ListRoute53HealthChecksInRegionCommandInput extends ListRoute53HealthChecksInRegionRequest {}
29+
/**
30+
* @public
31+
*
32+
* The output of {@link ListRoute53HealthChecksInRegionCommand}.
33+
*/
34+
export interface ListRoute53HealthChecksInRegionCommandOutput
35+
extends ListRoute53HealthChecksInRegionResponse,
36+
__MetadataBearer {}
37+
38+
/**
39+
* <p>List the Amazon Route 53 health checks in a specific Amazon Web Services Region.</p>
40+
* @example
41+
* Use a bare-bones client and the command you need to make an API call.
42+
* ```javascript
43+
* import { ARCRegionSwitchClient, ListRoute53HealthChecksInRegionCommand } from "@aws-sdk/client-arc-region-switch"; // ES Modules import
44+
* // const { ARCRegionSwitchClient, ListRoute53HealthChecksInRegionCommand } = require("@aws-sdk/client-arc-region-switch"); // CommonJS import
45+
* // import type { ARCRegionSwitchClientConfig } from "@aws-sdk/client-arc-region-switch";
46+
* const config = {}; // type is ARCRegionSwitchClientConfig
47+
* const client = new ARCRegionSwitchClient(config);
48+
* const input = { // ListRoute53HealthChecksInRegionRequest
49+
* arn: "STRING_VALUE", // required
50+
* hostedZoneId: "STRING_VALUE",
51+
* recordName: "STRING_VALUE",
52+
* maxResults: Number("int"),
53+
* nextToken: "STRING_VALUE",
54+
* };
55+
* const command = new ListRoute53HealthChecksInRegionCommand(input);
56+
* const response = await client.send(command);
57+
* // { // ListRoute53HealthChecksInRegionResponse
58+
* // healthChecks: [ // Route53HealthCheckList
59+
* // { // Route53HealthCheck
60+
* // hostedZoneId: "STRING_VALUE", // required
61+
* // recordName: "STRING_VALUE", // required
62+
* // healthCheckId: "STRING_VALUE",
63+
* // status: "healthy" || "unhealthy" || "unknown",
64+
* // region: "STRING_VALUE", // required
65+
* // },
66+
* // ],
67+
* // nextToken: "STRING_VALUE",
68+
* // };
69+
*
70+
* ```
71+
*
72+
* @param ListRoute53HealthChecksInRegionCommandInput - {@link ListRoute53HealthChecksInRegionCommandInput}
73+
* @returns {@link ListRoute53HealthChecksInRegionCommandOutput}
74+
* @see {@link ListRoute53HealthChecksInRegionCommandInput} for command's `input` shape.
75+
* @see {@link ListRoute53HealthChecksInRegionCommandOutput} for command's `response` shape.
76+
* @see {@link ARCRegionSwitchClientResolvedConfig | config} for ARCRegionSwitchClient's `config` shape.
77+
*
78+
* @throws {@link AccessDeniedException} (client fault)
79+
* <p>You do not have sufficient access to perform this action.</p> <p>HTTP Status Code: 403</p>
80+
*
81+
* @throws {@link IllegalArgumentException} (client fault)
82+
* <p>The request processing has an invalid argument.</p>
83+
*
84+
* @throws {@link InternalServerException} (server fault)
85+
* <p>The request processing has failed because of an unknown error, exception, or failure.</p> <p>HTTP Status Code: 500</p>
86+
*
87+
* @throws {@link ResourceNotFoundException} (client fault)
88+
* <p>The specified resource was not found.</p> <p>HTTP Status Code: 404</p>
89+
*
90+
* @throws {@link ARCRegionSwitchServiceException}
91+
* <p>Base exception class for all service exceptions from ARCRegionSwitch service.</p>
92+
*
93+
*
94+
* @example Example ListRoute53HealthChecksInRegion
95+
* ```javascript
96+
* //
97+
* const input = {
98+
* arn: "arn:aws:arc-region-switch::123456789012:plan/example:000000",
99+
* hostedZoneId: "Z0123456789ABCDEFGHI",
100+
* maxResults: 10,
101+
* nextToken: "eyJNYXJrZXIiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAxfQ",
102+
* recordName: "my.record.name"
103+
* };
104+
* const command = new ListRoute53HealthChecksInRegionCommand(input);
105+
* const response = await client.send(command);
106+
* /* response is
107+
* {
108+
* healthChecks: [
109+
* {
110+
* healthCheckId: "01234567-8901-abcd-efgh-ijklmnop0123",
111+
* hostedZoneId: "Z0123456789ABCDEFGHI",
112+
* recordName: "my.record.name",
113+
* region: "us-west-2",
114+
* status: "healthy"
115+
* },
116+
* {
117+
* healthCheckId: "zyxwvuts-rqpo-9876-5432-10nmlkji0123",
118+
* hostedZoneId: "Z0123456789ABCDEFGHI",
119+
* recordName: "my.record.name",
120+
* region: "us-east-1",
121+
* status: "healthy"
122+
* }
123+
* ]
124+
* }
125+
* *\/
126+
* ```
127+
*
128+
* @public
129+
*/
130+
export class ListRoute53HealthChecksInRegionCommand extends $Command
131+
.classBuilder<
132+
ListRoute53HealthChecksInRegionCommandInput,
133+
ListRoute53HealthChecksInRegionCommandOutput,
134+
ARCRegionSwitchClientResolvedConfig,
135+
ServiceInputTypes,
136+
ServiceOutputTypes
137+
>()
138+
.ep(commonParams)
139+
.m(function (this: any, Command: any, cs: any, config: ARCRegionSwitchClientResolvedConfig, o: any) {
140+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
141+
})
142+
.s("ArcRegionSwitch", "ListRoute53HealthChecksInRegion", {})
143+
.n("ARCRegionSwitchClient", "ListRoute53HealthChecksInRegionCommand")
144+
.sc(ListRoute53HealthChecksInRegion$)
145+
.build() {
146+
/** @internal type navigation helper, not in runtime. */
147+
protected declare static __types: {
148+
api: {
149+
input: ListRoute53HealthChecksInRegionRequest;
150+
output: ListRoute53HealthChecksInRegionResponse;
151+
};
152+
sdk: {
153+
input: ListRoute53HealthChecksInRegionCommandInput;
154+
output: ListRoute53HealthChecksInRegionCommandOutput;
155+
};
156+
};
157+
}

clients/client-arc-region-switch/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export * from "./ListPlanExecutionsCommand";
1212
export * from "./ListPlansCommand";
1313
export * from "./ListPlansInRegionCommand";
1414
export * from "./ListRoute53HealthChecksCommand";
15+
export * from "./ListRoute53HealthChecksInRegionCommand";
1516
export * from "./ListTagsForResourceCommand";
1617
export * from "./StartPlanExecutionCommand";
1718
export * from "./TagResourceCommand";

clients/client-arc-region-switch/src/endpoint/ruleset.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ x="argv",
1111
y="ref";
1212
const a=true,
1313
b=false,
14-
c="Boolean",
14+
c="boolean",
1515
d="sigv4",
1616
e="arc-region-switch",
1717
f="endpoint",
1818
g="tree",
1919
h="error",
20-
i={"required":false,"type":"String"},
20+
i={"required":false,"type":"string"},
2121
j={[w]:"isSet",[x]:[{[y]:"UseControlPlaneEndpoint"}]},
2222
k={[w]:"booleanEquals",[x]:[{[y]:"UseControlPlaneEndpoint"},true]},
2323
l={[w]:"isSet",[x]:[{[y]:"Region"}]},

clients/client-arc-region-switch/src/models/enums.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,20 @@ export const ExecutionEventType = {
321321
*/
322322
export type ExecutionEventType = (typeof ExecutionEventType)[keyof typeof ExecutionEventType];
323323

324+
/**
325+
* @public
326+
* @enum
327+
*/
328+
export const Route53HealthCheckStatus = {
329+
HEALTHY: "healthy",
330+
UNHEALTHY: "unhealthy",
331+
UNKNOWN: "unknown",
332+
} as const;
333+
/**
334+
* @public
335+
*/
336+
export type Route53HealthCheckStatus = (typeof Route53HealthCheckStatus)[keyof typeof Route53HealthCheckStatus];
337+
324338
/**
325339
* @public
326340
* @enum

clients/client-arc-region-switch/src/models/errors.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,41 +64,41 @@ export class InternalServerException extends __BaseException {
6464
}
6565

6666
/**
67-
* <p>The operation failed because the current state of the resource doesn't allow the operation to proceed.</p> <p>HTTP Status Code: 400</p>
67+
* <p>The request processing has an invalid argument.</p>
6868
* @public
6969
*/
70-
export class IllegalStateException extends __BaseException {
71-
readonly name = "IllegalStateException" as const;
70+
export class IllegalArgumentException extends __BaseException {
71+
readonly name = "IllegalArgumentException" as const;
7272
readonly $fault = "client" as const;
7373
/**
7474
* @internal
7575
*/
76-
constructor(opts: __ExceptionOptionType<IllegalStateException, __BaseException>) {
76+
constructor(opts: __ExceptionOptionType<IllegalArgumentException, __BaseException>) {
7777
super({
78-
name: "IllegalStateException",
78+
name: "IllegalArgumentException",
7979
$fault: "client",
8080
...opts,
8181
});
82-
Object.setPrototypeOf(this, IllegalStateException.prototype);
82+
Object.setPrototypeOf(this, IllegalArgumentException.prototype);
8383
}
8484
}
8585

8686
/**
87-
* <p>The request processing has an invalid argument.</p>
87+
* <p>The operation failed because the current state of the resource doesn't allow the operation to proceed.</p> <p>HTTP Status Code: 400</p>
8888
* @public
8989
*/
90-
export class IllegalArgumentException extends __BaseException {
91-
readonly name = "IllegalArgumentException" as const;
90+
export class IllegalStateException extends __BaseException {
91+
readonly name = "IllegalStateException" as const;
9292
readonly $fault = "client" as const;
9393
/**
9494
* @internal
9595
*/
96-
constructor(opts: __ExceptionOptionType<IllegalArgumentException, __BaseException>) {
96+
constructor(opts: __ExceptionOptionType<IllegalStateException, __BaseException>) {
9797
super({
98-
name: "IllegalArgumentException",
98+
name: "IllegalStateException",
9999
$fault: "client",
100100
...opts,
101101
});
102-
Object.setPrototypeOf(this, IllegalArgumentException.prototype);
102+
Object.setPrototypeOf(this, IllegalStateException.prototype);
103103
}
104104
}

0 commit comments

Comments
 (0)