@aws-sdk/client-route53-recovery-cluster 3.56.0 → 3.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +20 -19
  3. package/dist-cjs/Route53RecoveryCluster.js +15 -0
  4. package/dist-cjs/commands/ListRoutingControlsCommand.js +36 -0
  5. package/dist-cjs/commands/index.js +1 -0
  6. package/dist-cjs/index.js +1 -0
  7. package/dist-cjs/models/models_0.js +36 -1
  8. package/dist-cjs/pagination/Interfaces.js +2 -0
  9. package/dist-cjs/pagination/ListRoutingControlsPaginator.js +35 -0
  10. package/dist-cjs/pagination/index.js +5 -0
  11. package/dist-cjs/protocols/Aws_json1_0.js +120 -1
  12. package/dist-es/Route53RecoveryCluster.js +15 -0
  13. package/dist-es/commands/ListRoutingControlsCommand.js +39 -0
  14. package/dist-es/commands/index.js +1 -0
  15. package/dist-es/index.js +1 -0
  16. package/dist-es/models/models_0.js +28 -0
  17. package/dist-es/pagination/Interfaces.js +1 -0
  18. package/dist-es/pagination/ListRoutingControlsPaginator.js +74 -0
  19. package/dist-es/pagination/index.js +2 -0
  20. package/dist-es/protocols/Aws_json1_0.js +145 -9
  21. package/dist-types/Route53RecoveryCluster.d.ts +70 -30
  22. package/dist-types/Route53RecoveryClusterClient.d.ts +21 -19
  23. package/dist-types/commands/GetRoutingControlStateCommand.d.ts +9 -8
  24. package/dist-types/commands/ListRoutingControlsCommand.d.ts +66 -0
  25. package/dist-types/commands/UpdateRoutingControlStateCommand.d.ts +3 -3
  26. package/dist-types/commands/UpdateRoutingControlStatesCommand.d.ts +2 -2
  27. package/dist-types/commands/index.d.ts +1 -0
  28. package/dist-types/index.d.ts +1 -0
  29. package/dist-types/models/models_0.d.ts +109 -8
  30. package/dist-types/pagination/Interfaces.d.ts +6 -0
  31. package/dist-types/pagination/ListRoutingControlsPaginator.d.ts +4 -0
  32. package/dist-types/pagination/index.d.ts +2 -0
  33. package/dist-types/protocols/Aws_json1_0.d.ts +3 -0
  34. package/dist-types/ts3.4/Route53RecoveryCluster.d.ts +5 -0
  35. package/dist-types/ts3.4/Route53RecoveryClusterClient.d.ts +3 -2
  36. package/dist-types/ts3.4/commands/ListRoutingControlsCommand.d.ts +17 -0
  37. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  38. package/dist-types/ts3.4/index.d.ts +1 -0
  39. package/dist-types/ts3.4/models/models_0.d.ts +56 -0
  40. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  41. package/dist-types/ts3.4/pagination/ListRoutingControlsPaginator.d.ts +4 -0
  42. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  43. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +3 -0
  44. package/package.json +18 -18
package/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.67.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.66.0...v3.67.0) (2022-04-08)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-route53-recovery-cluster
9
+
10
+
11
+
12
+
13
+
14
+ # [3.61.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.60.0...v3.61.0) (2022-03-31)
15
+
16
+
17
+ ### Features
18
+
19
+ * **client-route53-recovery-cluster:** This release adds a new API "ListRoutingControls" to list routing control states using the highly reliable Route 53 ARC data plane endpoints. ([ac15087](https://github.com/aws/aws-sdk-js-v3/commit/ac1508711cd99e732b3e5cf8fa120fe46ea2ad8b))
20
+
21
+
22
+
23
+
24
+
25
+ # [3.58.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.57.0...v3.58.0) (2022-03-28)
26
+
27
+ **Note:** Version bump only for package @aws-sdk/client-route53-recovery-cluster
28
+
29
+
30
+
31
+
32
+
6
33
  # [3.56.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.55.0...v3.56.0) (2022-03-24)
7
34
 
8
35
  **Note:** Version bump only for package @aws-sdk/client-route53-recovery-cluster
package/README.md CHANGED
@@ -8,42 +8,43 @@
8
8
  AWS SDK for JavaScript Route53RecoveryCluster Client for Node.js, Browser and React Native.
9
9
 
10
10
  <p>Welcome to the Routing Control (Recovery Cluster) API Reference Guide for Amazon Route 53 Application Recovery Controller.</p>
11
- <p>With Amazon Route 53 Application Recovery Controller, you can use routing control with extreme reliability to
11
+ <p>With Route 53 ARC, you can use routing control with extreme reliability to
12
12
  recover applications by rerouting traffic across
13
- Availability Zones or AWS Regions. Routing controls are simple on/off switches hosted
14
- on a highly available cluster in Application Recovery Controller. A cluster provides a set of five redundant Regional endpoints against which you
13
+ Availability Zones or Amazon Web Services Regions. Routing controls are simple on/off switches hosted
14
+ on a highly available cluster in Route 53 ARC. A cluster provides a set of five redundant Regional endpoints against which you
15
15
  can run API calls to get or update the state of routing controls. To implement failover, you set
16
- one routing control on and another one off, to reroute traffic from one Availability Zone or Amazon Web Services Region
16
+ one routing control On and another one Off, to reroute traffic from one Availability Zone or Amazon Web Services Region
17
17
  to another. </p>
18
18
  <p>
19
- <i>Be aware that you must specify the Regional endpoints for a cluster when you work with API cluster operations
20
- to get or update routing control states in Application Recovery Controller.</i> In addition, you must specify the US West (Oregon) Region
21
- for Application Recovery Controller API calls. For example, use the parameter <code>region us-west-2</code> with AWS CLI commands.
19
+ <i>Be aware that you must specify a Regional endpoint for a cluster when you work with API cluster operations
20
+ to get or update routing control states in Route 53 ARC.</i> In addition, you must specify the US West (Oregon) Region
21
+ for Route 53 ARC API calls. For example, use the parameter <code>--region us-west-2</code> with AWS CLI commands.
22
22
  For more information, see
23
23
  <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.update.api.html">
24
24
  Get and update routing control states using the API</a> in the Amazon Route 53 Application Recovery Controller Developer Guide.</p>
25
25
  <p>This API guide includes information about the API operations for how to get and update routing control states
26
- in Application Recovery Controller. You also must set up the structures to support routing controls: clusters and control panels.</p>
27
- <p>For more information about working with routing control in Application Recovery Controller, see the following:</p>
26
+ in Route 53 ARC. To work with routing control in Route 53 ARC, you must first create the required components (clusters, control
27
+ panels, and routing controls) using the recovery cluster configuration API.</p>
28
+ <p>For more information about working with routing control in Route 53 ARC, see the following:</p>
28
29
  <ul>
29
30
  <li>
30
- <p>To create clusters, routing controls, and control panels by using the control plane API
31
- for routing control, see the <a href="https://docs.aws.amazon.com/recovery-cluster/latest/api/">Recovery Control Configuration API Reference Guide for Amazon Route 53 Application Recovery Controller</a>.</p>
31
+ <p>Create clusters, control panels, and routing controls by using API operations. For more information,
32
+ see the <a href="https://docs.aws.amazon.com/recovery-cluster/latest/api/">Recovery Control Configuration API Reference Guide for Amazon Route 53 Application Recovery Controller</a>.</p>
32
33
  </li>
33
34
  <li>
34
- <p>Learn about the components in recovery control configuration, including clusters,
35
- routing controls, and control panels. For more information, see
36
- <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/introduction-components.html#introduction-components-routing">
35
+ <p>Learn about the components in recovery control, including clusters,
36
+ routing controls, and control panels, and how to work with Route 53 ARC in the Amazon Web Services console. For more
37
+ information, see <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/introduction-components.html#introduction-components-routing">
37
38
  Recovery control components</a> in the Amazon Route 53 Application Recovery Controller Developer Guide.</p>
38
39
  </li>
39
40
  <li>
40
- <p>Application Recovery Controller also provides readiness checks that run continually to help make sure that your
41
+ <p>Route 53 ARC also provides readiness checks that continually audit resources to help make sure that your
41
42
  applications are scaled and ready to handle failover traffic. For more information about
42
- the related API actions, see the <a href="https://docs.aws.amazon.com/recovery-readiness/latest/api/">Recovery Readiness API Reference Guide for Amazon Route 53 Application Recovery Controller</a>.</p>
43
+ the related API operations, see the <a href="https://docs.aws.amazon.com/recovery-readiness/latest/api/">Recovery Readiness API Reference Guide for Amazon Route 53 Application Recovery Controller</a>.</p>
43
44
  </li>
44
45
  <li>
45
46
  <p>For more information about creating resilient applications and preparing for
46
- recovery readiness with Application Recovery Controller, see the <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/">Amazon Route 53 Application Recovery Controller Developer Guide</a>.</p>
47
+ recovery readiness with Route 53 ARC, see the <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/">Amazon Route 53 Application Recovery Controller Developer Guide</a>.</p>
47
48
  </li>
48
49
  </ul>
49
50
 
@@ -156,7 +157,7 @@ but they are supported by the send operation.
156
157
  ```js
157
158
  // callbacks.
158
159
  client.send(command, (err, data) => {
159
- // proccess err and data.
160
+ // process err and data.
160
161
  });
161
162
  ```
162
163
 
@@ -190,7 +191,7 @@ client
190
191
 
191
192
  // callbacks.
192
193
  client.getRoutingControlState(params, (err, data) => {
193
- // proccess err and data.
194
+ // process err and data.
194
195
  });
195
196
  ```
196
197
 
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Route53RecoveryCluster = void 0;
4
4
  const GetRoutingControlStateCommand_1 = require("./commands/GetRoutingControlStateCommand");
5
+ const ListRoutingControlsCommand_1 = require("./commands/ListRoutingControlsCommand");
5
6
  const UpdateRoutingControlStateCommand_1 = require("./commands/UpdateRoutingControlStateCommand");
6
7
  const UpdateRoutingControlStatesCommand_1 = require("./commands/UpdateRoutingControlStatesCommand");
7
8
  const Route53RecoveryClusterClient_1 = require("./Route53RecoveryClusterClient");
@@ -20,6 +21,20 @@ class Route53RecoveryCluster extends Route53RecoveryClusterClient_1.Route53Recov
20
21
  return this.send(command, optionsOrCb);
21
22
  }
22
23
  }
24
+ listRoutingControls(args, optionsOrCb, cb) {
25
+ const command = new ListRoutingControlsCommand_1.ListRoutingControlsCommand(args);
26
+ if (typeof optionsOrCb === "function") {
27
+ this.send(command, optionsOrCb);
28
+ }
29
+ else if (typeof cb === "function") {
30
+ if (typeof optionsOrCb !== "object")
31
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
32
+ this.send(command, optionsOrCb || {}, cb);
33
+ }
34
+ else {
35
+ return this.send(command, optionsOrCb);
36
+ }
37
+ }
23
38
  updateRoutingControlState(args, optionsOrCb, cb) {
24
39
  const command = new UpdateRoutingControlStateCommand_1.UpdateRoutingControlStateCommand(args);
25
40
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListRoutingControlsCommand = void 0;
4
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
8
+ class ListRoutingControlsCommand extends smithy_client_1.Command {
9
+ constructor(input) {
10
+ super();
11
+ this.input = input;
12
+ }
13
+ resolveMiddleware(clientStack, configuration, options) {
14
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
15
+ const stack = clientStack.concat(this.middlewareStack);
16
+ const { logger } = configuration;
17
+ const clientName = "Route53RecoveryClusterClient";
18
+ const commandName = "ListRoutingControlsCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.ListRoutingControlsRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.ListRoutingControlsResponse.filterSensitiveLog,
25
+ };
26
+ const { requestHandler } = configuration;
27
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
28
+ }
29
+ serialize(input, context) {
30
+ return (0, Aws_json1_0_1.serializeAws_json1_0ListRoutingControlsCommand)(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return (0, Aws_json1_0_1.deserializeAws_json1_0ListRoutingControlsCommand)(output, context);
34
+ }
35
+ }
36
+ exports.ListRoutingControlsCommand = ListRoutingControlsCommand;
@@ -2,5 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./GetRoutingControlStateCommand"), exports);
5
+ tslib_1.__exportStar(require("./ListRoutingControlsCommand"), exports);
5
6
  tslib_1.__exportStar(require("./UpdateRoutingControlStateCommand"), exports);
6
7
  tslib_1.__exportStar(require("./UpdateRoutingControlStatesCommand"), exports);
package/dist-cjs/index.js CHANGED
@@ -6,5 +6,6 @@ tslib_1.__exportStar(require("./Route53RecoveryCluster"), exports);
6
6
  tslib_1.__exportStar(require("./Route53RecoveryClusterClient"), exports);
7
7
  tslib_1.__exportStar(require("./commands"), exports);
8
8
  tslib_1.__exportStar(require("./models"), exports);
9
+ tslib_1.__exportStar(require("./pagination"), exports);
9
10
  var Route53RecoveryClusterServiceException_1 = require("./models/Route53RecoveryClusterServiceException");
10
11
  Object.defineProperty(exports, "Route53RecoveryClusterServiceException", { enumerable: true, get: function () { return Route53RecoveryClusterServiceException_1.Route53RecoveryClusterServiceException; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateRoutingControlStatesResponse = exports.UpdateRoutingControlStatesRequest = exports.UpdateRoutingControlStateEntry = exports.UpdateRoutingControlStateResponse = exports.UpdateRoutingControlStateRequest = exports.ValidationException = exports.ValidationExceptionReason = exports.ValidationExceptionField = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.GetRoutingControlStateResponse = exports.RoutingControlState = exports.GetRoutingControlStateRequest = exports.EndpointTemporarilyUnavailableException = exports.ConflictException = exports.AccessDeniedException = void 0;
3
+ exports.UpdateRoutingControlStatesResponse = exports.UpdateRoutingControlStatesRequest = exports.UpdateRoutingControlStateEntry = exports.UpdateRoutingControlStateResponse = exports.UpdateRoutingControlStateRequest = exports.ServiceLimitExceededException = exports.ListRoutingControlsResponse = exports.RoutingControl = exports.ListRoutingControlsRequest = exports.ValidationException = exports.ValidationExceptionReason = exports.ValidationExceptionField = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.GetRoutingControlStateResponse = exports.RoutingControlState = exports.GetRoutingControlStateRequest = exports.EndpointTemporarilyUnavailableException = exports.ConflictException = exports.AccessDeniedException = void 0;
4
4
  const Route53RecoveryClusterServiceException_1 = require("./Route53RecoveryClusterServiceException");
5
5
  class AccessDeniedException extends Route53RecoveryClusterServiceException_1.Route53RecoveryClusterServiceException {
6
6
  constructor(opts) {
@@ -131,6 +131,41 @@ class ValidationException extends Route53RecoveryClusterServiceException_1.Route
131
131
  }
132
132
  }
133
133
  exports.ValidationException = ValidationException;
134
+ var ListRoutingControlsRequest;
135
+ (function (ListRoutingControlsRequest) {
136
+ ListRoutingControlsRequest.filterSensitiveLog = (obj) => ({
137
+ ...obj,
138
+ });
139
+ })(ListRoutingControlsRequest = exports.ListRoutingControlsRequest || (exports.ListRoutingControlsRequest = {}));
140
+ var RoutingControl;
141
+ (function (RoutingControl) {
142
+ RoutingControl.filterSensitiveLog = (obj) => ({
143
+ ...obj,
144
+ });
145
+ })(RoutingControl = exports.RoutingControl || (exports.RoutingControl = {}));
146
+ var ListRoutingControlsResponse;
147
+ (function (ListRoutingControlsResponse) {
148
+ ListRoutingControlsResponse.filterSensitiveLog = (obj) => ({
149
+ ...obj,
150
+ });
151
+ })(ListRoutingControlsResponse = exports.ListRoutingControlsResponse || (exports.ListRoutingControlsResponse = {}));
152
+ class ServiceLimitExceededException extends Route53RecoveryClusterServiceException_1.Route53RecoveryClusterServiceException {
153
+ constructor(opts) {
154
+ super({
155
+ name: "ServiceLimitExceededException",
156
+ $fault: "client",
157
+ ...opts,
158
+ });
159
+ this.name = "ServiceLimitExceededException";
160
+ this.$fault = "client";
161
+ Object.setPrototypeOf(this, ServiceLimitExceededException.prototype);
162
+ this.resourceId = opts.resourceId;
163
+ this.resourceType = opts.resourceType;
164
+ this.limitCode = opts.limitCode;
165
+ this.serviceCode = opts.serviceCode;
166
+ }
167
+ }
168
+ exports.ServiceLimitExceededException = ServiceLimitExceededException;
134
169
  var UpdateRoutingControlStateRequest;
135
170
  (function (UpdateRoutingControlStateRequest) {
136
171
  UpdateRoutingControlStateRequest.filterSensitiveLog = (obj) => ({
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListRoutingControls = void 0;
4
+ const ListRoutingControlsCommand_1 = require("../commands/ListRoutingControlsCommand");
5
+ const Route53RecoveryCluster_1 = require("../Route53RecoveryCluster");
6
+ const Route53RecoveryClusterClient_1 = require("../Route53RecoveryClusterClient");
7
+ const makePagedClientRequest = async (client, input, ...args) => {
8
+ return await client.send(new ListRoutingControlsCommand_1.ListRoutingControlsCommand(input), ...args);
9
+ };
10
+ const makePagedRequest = async (client, input, ...args) => {
11
+ return await client.listRoutingControls(input, ...args);
12
+ };
13
+ async function* paginateListRoutingControls(config, input, ...additionalArguments) {
14
+ let token = config.startingToken || undefined;
15
+ let hasNext = true;
16
+ let page;
17
+ while (hasNext) {
18
+ input.NextToken = token;
19
+ input["MaxResults"] = config.pageSize;
20
+ if (config.client instanceof Route53RecoveryCluster_1.Route53RecoveryCluster) {
21
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else if (config.client instanceof Route53RecoveryClusterClient_1.Route53RecoveryClusterClient) {
24
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
25
+ }
26
+ else {
27
+ throw new Error("Invalid client, expected Route53RecoveryCluster | Route53RecoveryClusterClient");
28
+ }
29
+ yield page;
30
+ token = page.NextToken;
31
+ hasNext = !!token;
32
+ }
33
+ return undefined;
34
+ }
35
+ exports.paginateListRoutingControls = paginateListRoutingControls;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./Interfaces"), exports);
5
+ tslib_1.__exportStar(require("./ListRoutingControlsPaginator"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_json1_0UpdateRoutingControlStatesCommand = exports.deserializeAws_json1_0UpdateRoutingControlStateCommand = exports.deserializeAws_json1_0GetRoutingControlStateCommand = exports.serializeAws_json1_0UpdateRoutingControlStatesCommand = exports.serializeAws_json1_0UpdateRoutingControlStateCommand = exports.serializeAws_json1_0GetRoutingControlStateCommand = void 0;
3
+ exports.deserializeAws_json1_0UpdateRoutingControlStatesCommand = exports.deserializeAws_json1_0UpdateRoutingControlStateCommand = exports.deserializeAws_json1_0ListRoutingControlsCommand = exports.deserializeAws_json1_0GetRoutingControlStateCommand = exports.serializeAws_json1_0UpdateRoutingControlStatesCommand = exports.serializeAws_json1_0UpdateRoutingControlStateCommand = exports.serializeAws_json1_0ListRoutingControlsCommand = exports.serializeAws_json1_0GetRoutingControlStateCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
@@ -15,6 +15,16 @@ const serializeAws_json1_0GetRoutingControlStateCommand = async (input, context)
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  exports.serializeAws_json1_0GetRoutingControlStateCommand = serializeAws_json1_0GetRoutingControlStateCommand;
18
+ const serializeAws_json1_0ListRoutingControlsCommand = async (input, context) => {
19
+ const headers = {
20
+ "content-type": "application/x-amz-json-1.0",
21
+ "x-amz-target": "ToggleCustomerAPI.ListRoutingControls",
22
+ };
23
+ let body;
24
+ body = JSON.stringify(serializeAws_json1_0ListRoutingControlsRequest(input, context));
25
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
26
+ };
27
+ exports.serializeAws_json1_0ListRoutingControlsCommand = serializeAws_json1_0ListRoutingControlsCommand;
18
28
  const serializeAws_json1_0UpdateRoutingControlStateCommand = async (input, context) => {
19
29
  const headers = {
20
30
  "content-type": "application/x-amz-json-1.0",
@@ -86,6 +96,57 @@ const deserializeAws_json1_0GetRoutingControlStateCommandError = async (output,
86
96
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
87
97
  }
88
98
  };
99
+ const deserializeAws_json1_0ListRoutingControlsCommand = async (output, context) => {
100
+ if (output.statusCode >= 300) {
101
+ return deserializeAws_json1_0ListRoutingControlsCommandError(output, context);
102
+ }
103
+ const data = await parseBody(output.body, context);
104
+ let contents = {};
105
+ contents = deserializeAws_json1_0ListRoutingControlsResponse(data, context);
106
+ const response = {
107
+ $metadata: deserializeMetadata(output),
108
+ ...contents,
109
+ };
110
+ return Promise.resolve(response);
111
+ };
112
+ exports.deserializeAws_json1_0ListRoutingControlsCommand = deserializeAws_json1_0ListRoutingControlsCommand;
113
+ const deserializeAws_json1_0ListRoutingControlsCommandError = async (output, context) => {
114
+ const parsedOutput = {
115
+ ...output,
116
+ body: await parseBody(output.body, context),
117
+ };
118
+ let response;
119
+ let errorCode = "UnknownError";
120
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
121
+ switch (errorCode) {
122
+ case "AccessDeniedException":
123
+ case "com.amazonaws.route53recoverycluster#AccessDeniedException":
124
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
125
+ case "EndpointTemporarilyUnavailableException":
126
+ case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
127
+ throw await deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context);
128
+ case "InternalServerException":
129
+ case "com.amazonaws.route53recoverycluster#InternalServerException":
130
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
131
+ case "ResourceNotFoundException":
132
+ case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
133
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
134
+ case "ThrottlingException":
135
+ case "com.amazonaws.route53recoverycluster#ThrottlingException":
136
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
137
+ case "ValidationException":
138
+ case "com.amazonaws.route53recoverycluster#ValidationException":
139
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
140
+ default:
141
+ const parsedBody = parsedOutput.body;
142
+ response = new Route53RecoveryClusterServiceException_1.Route53RecoveryClusterServiceException({
143
+ name: parsedBody.code || parsedBody.Code || errorCode,
144
+ $fault: "client",
145
+ $metadata: deserializeMetadata(output),
146
+ });
147
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
148
+ }
149
+ };
89
150
  const deserializeAws_json1_0UpdateRoutingControlStateCommand = async (output, context) => {
90
151
  if (output.statusCode >= 300) {
91
152
  return deserializeAws_json1_0UpdateRoutingControlStateCommandError(output, context);
@@ -178,6 +239,9 @@ const deserializeAws_json1_0UpdateRoutingControlStatesCommandError = async (outp
178
239
  case "ResourceNotFoundException":
179
240
  case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
180
241
  throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
242
+ case "ServiceLimitExceededException":
243
+ case "com.amazonaws.route53recoverycluster#ServiceLimitExceededException":
244
+ throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
181
245
  case "ThrottlingException":
182
246
  case "com.amazonaws.route53recoverycluster#ThrottlingException":
183
247
  throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
@@ -239,6 +303,15 @@ const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (parsedOut
239
303
  });
240
304
  return (0, smithy_client_1.decorateServiceException)(exception, body);
241
305
  };
306
+ const deserializeAws_json1_0ServiceLimitExceededExceptionResponse = async (parsedOutput, context) => {
307
+ const body = parsedOutput.body;
308
+ const deserialized = deserializeAws_json1_0ServiceLimitExceededException(body, context);
309
+ const exception = new models_0_1.ServiceLimitExceededException({
310
+ $metadata: deserializeMetadata(parsedOutput),
311
+ ...deserialized,
312
+ });
313
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
314
+ };
242
315
  const deserializeAws_json1_0ThrottlingExceptionResponse = async (parsedOutput, context) => {
243
316
  const body = parsedOutput.body;
244
317
  const deserialized = deserializeAws_json1_0ThrottlingException(body, context);
@@ -273,6 +346,14 @@ const serializeAws_json1_0GetRoutingControlStateRequest = (input, context) => {
273
346
  input.RoutingControlArn !== null && { RoutingControlArn: input.RoutingControlArn }),
274
347
  };
275
348
  };
349
+ const serializeAws_json1_0ListRoutingControlsRequest = (input, context) => {
350
+ return {
351
+ ...(input.ControlPanelArn !== undefined &&
352
+ input.ControlPanelArn !== null && { ControlPanelArn: input.ControlPanelArn }),
353
+ ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
354
+ ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
355
+ };
356
+ };
276
357
  const serializeAws_json1_0UpdateRoutingControlStateEntries = (input, context) => {
277
358
  return input
278
359
  .filter((e) => e != null)
@@ -335,6 +416,7 @@ const deserializeAws_json1_0EndpointTemporarilyUnavailableException = (output, c
335
416
  const deserializeAws_json1_0GetRoutingControlStateResponse = (output, context) => {
336
417
  return {
337
418
  RoutingControlArn: (0, smithy_client_1.expectString)(output.RoutingControlArn),
419
+ RoutingControlName: (0, smithy_client_1.expectString)(output.RoutingControlName),
338
420
  RoutingControlState: (0, smithy_client_1.expectString)(output.RoutingControlState),
339
421
  };
340
422
  };
@@ -344,6 +426,14 @@ const deserializeAws_json1_0InternalServerException = (output, context) => {
344
426
  retryAfterSeconds: (0, smithy_client_1.expectInt32)(output.retryAfterSeconds),
345
427
  };
346
428
  };
429
+ const deserializeAws_json1_0ListRoutingControlsResponse = (output, context) => {
430
+ return {
431
+ NextToken: (0, smithy_client_1.expectString)(output.NextToken),
432
+ RoutingControls: output.RoutingControls !== undefined && output.RoutingControls !== null
433
+ ? deserializeAws_json1_0RoutingControls(output.RoutingControls, context)
434
+ : undefined,
435
+ };
436
+ };
347
437
  const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
348
438
  return {
349
439
  message: (0, smithy_client_1.expectString)(output.message),
@@ -351,6 +441,35 @@ const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
351
441
  resourceType: (0, smithy_client_1.expectString)(output.resourceType),
352
442
  };
353
443
  };
444
+ const deserializeAws_json1_0RoutingControl = (output, context) => {
445
+ return {
446
+ ControlPanelArn: (0, smithy_client_1.expectString)(output.ControlPanelArn),
447
+ ControlPanelName: (0, smithy_client_1.expectString)(output.ControlPanelName),
448
+ RoutingControlArn: (0, smithy_client_1.expectString)(output.RoutingControlArn),
449
+ RoutingControlName: (0, smithy_client_1.expectString)(output.RoutingControlName),
450
+ RoutingControlState: (0, smithy_client_1.expectString)(output.RoutingControlState),
451
+ };
452
+ };
453
+ const deserializeAws_json1_0RoutingControls = (output, context) => {
454
+ const retVal = (output || [])
455
+ .filter((e) => e != null)
456
+ .map((entry) => {
457
+ if (entry === null) {
458
+ return null;
459
+ }
460
+ return deserializeAws_json1_0RoutingControl(entry, context);
461
+ });
462
+ return retVal;
463
+ };
464
+ const deserializeAws_json1_0ServiceLimitExceededException = (output, context) => {
465
+ return {
466
+ limitCode: (0, smithy_client_1.expectString)(output.limitCode),
467
+ message: (0, smithy_client_1.expectString)(output.message),
468
+ resourceId: (0, smithy_client_1.expectString)(output.resourceId),
469
+ resourceType: (0, smithy_client_1.expectString)(output.resourceType),
470
+ serviceCode: (0, smithy_client_1.expectString)(output.serviceCode),
471
+ };
472
+ };
354
473
  const deserializeAws_json1_0ThrottlingException = (output, context) => {
355
474
  return {
356
475
  message: (0, smithy_client_1.expectString)(output.message),
@@ -1,5 +1,6 @@
1
1
  import { __extends } from "tslib";
2
2
  import { GetRoutingControlStateCommand, } from "./commands/GetRoutingControlStateCommand";
3
+ import { ListRoutingControlsCommand, } from "./commands/ListRoutingControlsCommand";
3
4
  import { UpdateRoutingControlStateCommand, } from "./commands/UpdateRoutingControlStateCommand";
4
5
  import { UpdateRoutingControlStatesCommand, } from "./commands/UpdateRoutingControlStatesCommand";
5
6
  import { Route53RecoveryClusterClient } from "./Route53RecoveryClusterClient";
@@ -22,6 +23,20 @@ var Route53RecoveryCluster = (function (_super) {
22
23
  return this.send(command, optionsOrCb);
23
24
  }
24
25
  };
26
+ Route53RecoveryCluster.prototype.listRoutingControls = function (args, optionsOrCb, cb) {
27
+ var command = new ListRoutingControlsCommand(args);
28
+ if (typeof optionsOrCb === "function") {
29
+ this.send(command, optionsOrCb);
30
+ }
31
+ else if (typeof cb === "function") {
32
+ if (typeof optionsOrCb !== "object")
33
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
34
+ this.send(command, optionsOrCb || {}, cb);
35
+ }
36
+ else {
37
+ return this.send(command, optionsOrCb);
38
+ }
39
+ };
25
40
  Route53RecoveryCluster.prototype.updateRoutingControlState = function (args, optionsOrCb, cb) {
26
41
  var command = new UpdateRoutingControlStateCommand(args);
27
42
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { ListRoutingControlsRequest, ListRoutingControlsResponse } from "../models/models_0";
5
+ import { deserializeAws_json1_0ListRoutingControlsCommand, serializeAws_json1_0ListRoutingControlsCommand, } from "../protocols/Aws_json1_0";
6
+ var ListRoutingControlsCommand = (function (_super) {
7
+ __extends(ListRoutingControlsCommand, _super);
8
+ function ListRoutingControlsCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ ListRoutingControlsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "Route53RecoveryClusterClient";
18
+ var commandName = "ListRoutingControlsCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: ListRoutingControlsRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: ListRoutingControlsResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ ListRoutingControlsCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_json1_0ListRoutingControlsCommand(input, context);
33
+ };
34
+ ListRoutingControlsCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_json1_0ListRoutingControlsCommand(output, context);
36
+ };
37
+ return ListRoutingControlsCommand;
38
+ }($Command));
39
+ export { ListRoutingControlsCommand };
@@ -1,3 +1,4 @@
1
1
  export * from "./GetRoutingControlStateCommand";
2
+ export * from "./ListRoutingControlsCommand";
2
3
  export * from "./UpdateRoutingControlStateCommand";
3
4
  export * from "./UpdateRoutingControlStatesCommand";
package/dist-es/index.js CHANGED
@@ -2,4 +2,5 @@ export * from "./Route53RecoveryCluster";
2
2
  export * from "./Route53RecoveryClusterClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
+ export * from "./pagination";
5
6
  export { Route53RecoveryClusterServiceException } from "./models/Route53RecoveryClusterServiceException";
@@ -116,6 +116,34 @@ var ValidationException = (function (_super) {
116
116
  return ValidationException;
117
117
  }(__BaseException));
118
118
  export { ValidationException };
119
+ export var ListRoutingControlsRequest;
120
+ (function (ListRoutingControlsRequest) {
121
+ ListRoutingControlsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
122
+ })(ListRoutingControlsRequest || (ListRoutingControlsRequest = {}));
123
+ export var RoutingControl;
124
+ (function (RoutingControl) {
125
+ RoutingControl.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
126
+ })(RoutingControl || (RoutingControl = {}));
127
+ export var ListRoutingControlsResponse;
128
+ (function (ListRoutingControlsResponse) {
129
+ ListRoutingControlsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
130
+ })(ListRoutingControlsResponse || (ListRoutingControlsResponse = {}));
131
+ var ServiceLimitExceededException = (function (_super) {
132
+ __extends(ServiceLimitExceededException, _super);
133
+ function ServiceLimitExceededException(opts) {
134
+ var _this = _super.call(this, __assign({ name: "ServiceLimitExceededException", $fault: "client" }, opts)) || this;
135
+ _this.name = "ServiceLimitExceededException";
136
+ _this.$fault = "client";
137
+ Object.setPrototypeOf(_this, ServiceLimitExceededException.prototype);
138
+ _this.resourceId = opts.resourceId;
139
+ _this.resourceType = opts.resourceType;
140
+ _this.limitCode = opts.limitCode;
141
+ _this.serviceCode = opts.serviceCode;
142
+ return _this;
143
+ }
144
+ return ServiceLimitExceededException;
145
+ }(__BaseException));
146
+ export { ServiceLimitExceededException };
119
147
  export var UpdateRoutingControlStateRequest;
120
148
  (function (UpdateRoutingControlStateRequest) {
121
149
  UpdateRoutingControlStateRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -0,0 +1 @@
1
+ export {};