@aws-sdk/client-route53-recovery-cluster 3.901.0 → 3.906.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 (2) hide show
  1. package/dist-cjs/index.js +534 -724
  2. package/package.json +5 -5
package/dist-cjs/index.js CHANGED
@@ -1,763 +1,573 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
19
+
20
+ const resolveClientEndpointParameters = (options) => {
21
+ return Object.assign(options, {
22
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
23
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
24
+ defaultSigningName: "route53-recovery-cluster",
25
+ });
10
26
  };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
27
+ const commonParams = {
28
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
29
+ Endpoint: { type: "builtInParams", name: "endpoint" },
30
+ Region: { type: "builtInParams", name: "region" },
31
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
32
  };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- AccessDeniedException: () => AccessDeniedException,
25
- ConflictException: () => ConflictException,
26
- EndpointTemporarilyUnavailableException: () => EndpointTemporarilyUnavailableException,
27
- GetRoutingControlStateCommand: () => GetRoutingControlStateCommand,
28
- InternalServerException: () => InternalServerException,
29
- ListRoutingControlsCommand: () => ListRoutingControlsCommand,
30
- ResourceNotFoundException: () => ResourceNotFoundException,
31
- Route53RecoveryCluster: () => Route53RecoveryCluster,
32
- Route53RecoveryClusterClient: () => Route53RecoveryClusterClient,
33
- Route53RecoveryClusterServiceException: () => Route53RecoveryClusterServiceException,
34
- RoutingControlState: () => RoutingControlState,
35
- ServiceLimitExceededException: () => ServiceLimitExceededException,
36
- ThrottlingException: () => ThrottlingException,
37
- UpdateRoutingControlStateCommand: () => UpdateRoutingControlStateCommand,
38
- UpdateRoutingControlStatesCommand: () => UpdateRoutingControlStatesCommand,
39
- ValidationException: () => ValidationException,
40
- ValidationExceptionReason: () => ValidationExceptionReason,
41
- __Client: () => import_smithy_client.Client,
42
- paginateListRoutingControls: () => paginateListRoutingControls
43
- });
44
- module.exports = __toCommonJS(index_exports);
45
-
46
- // src/Route53RecoveryClusterClient.ts
47
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
48
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
49
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
50
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
51
- var import_config_resolver = require("@smithy/config-resolver");
52
- var import_core = require("@smithy/core");
53
- var import_middleware_content_length = require("@smithy/middleware-content-length");
54
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
55
- var import_middleware_retry = require("@smithy/middleware-retry");
56
-
57
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
58
33
 
59
- // src/endpoint/EndpointParameters.ts
60
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
61
- return Object.assign(options, {
62
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
63
- useFipsEndpoint: options.useFipsEndpoint ?? false,
64
- defaultSigningName: "route53-recovery-cluster"
65
- });
66
- }, "resolveClientEndpointParameters");
67
- var commonParams = {
68
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
69
- Endpoint: { type: "builtInParams", name: "endpoint" },
70
- Region: { type: "builtInParams", name: "region" },
71
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
34
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
37
+ let _credentials = runtimeConfig.credentials;
38
+ return {
39
+ setHttpAuthScheme(httpAuthScheme) {
40
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
41
+ if (index === -1) {
42
+ _httpAuthSchemes.push(httpAuthScheme);
43
+ }
44
+ else {
45
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
46
+ }
47
+ },
48
+ httpAuthSchemes() {
49
+ return _httpAuthSchemes;
50
+ },
51
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
52
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
53
+ },
54
+ httpAuthSchemeProvider() {
55
+ return _httpAuthSchemeProvider;
56
+ },
57
+ setCredentials(credentials) {
58
+ _credentials = credentials;
59
+ },
60
+ credentials() {
61
+ return _credentials;
62
+ },
63
+ };
64
+ };
65
+ const resolveHttpAuthRuntimeConfig = (config) => {
66
+ return {
67
+ httpAuthSchemes: config.httpAuthSchemes(),
68
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
69
+ credentials: config.credentials(),
70
+ };
72
71
  };
73
72
 
74
- // src/Route53RecoveryClusterClient.ts
75
- var import_runtimeConfig = require("././runtimeConfig");
76
-
77
- // src/runtimeExtensions.ts
78
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
79
- var import_protocol_http = require("@smithy/protocol-http");
80
- var import_smithy_client = require("@smithy/smithy-client");
73
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
74
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
75
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
76
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
77
+ };
81
78
 
82
- // src/auth/httpAuthExtensionConfiguration.ts
83
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
84
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
85
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
86
- let _credentials = runtimeConfig.credentials;
87
- return {
88
- setHttpAuthScheme(httpAuthScheme) {
89
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
90
- if (index === -1) {
91
- _httpAuthSchemes.push(httpAuthScheme);
92
- } else {
93
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
94
- }
95
- },
96
- httpAuthSchemes() {
97
- return _httpAuthSchemes;
98
- },
99
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
100
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
101
- },
102
- httpAuthSchemeProvider() {
103
- return _httpAuthSchemeProvider;
104
- },
105
- setCredentials(credentials) {
106
- _credentials = credentials;
107
- },
108
- credentials() {
109
- return _credentials;
79
+ class Route53RecoveryClusterClient extends smithyClient.Client {
80
+ config;
81
+ constructor(...[configuration]) {
82
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
83
+ super(_config_0);
84
+ this.initConfig = _config_0;
85
+ const _config_1 = resolveClientEndpointParameters(_config_0);
86
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
87
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
88
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
89
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
90
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
91
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
92
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
93
+ this.config = _config_8;
94
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
95
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
96
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
97
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
98
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
99
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
100
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
101
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultRoute53RecoveryClusterHttpAuthSchemeParametersProvider,
102
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
103
+ "aws.auth#sigv4": config.credentials,
104
+ }),
105
+ }));
106
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
110
107
  }
111
- };
112
- }, "getHttpAuthExtensionConfiguration");
113
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
114
- return {
115
- httpAuthSchemes: config.httpAuthSchemes(),
116
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
117
- credentials: config.credentials()
118
- };
119
- }, "resolveHttpAuthRuntimeConfig");
108
+ destroy() {
109
+ super.destroy();
110
+ }
111
+ }
120
112
 
121
- // src/runtimeExtensions.ts
122
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
123
- const extensionConfiguration = Object.assign(
124
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
125
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
126
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
127
- getHttpAuthExtensionConfiguration(runtimeConfig)
128
- );
129
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
130
- return Object.assign(
131
- runtimeConfig,
132
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
133
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
134
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
135
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
136
- );
137
- }, "resolveRuntimeExtensions");
113
+ class Route53RecoveryClusterServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, Route53RecoveryClusterServiceException.prototype);
117
+ }
118
+ }
138
119
 
139
- // src/Route53RecoveryClusterClient.ts
140
- var Route53RecoveryClusterClient = class extends import_smithy_client.Client {
141
- static {
142
- __name(this, "Route53RecoveryClusterClient");
143
- }
144
- /**
145
- * The resolved configuration of Route53RecoveryClusterClient class. This is resolved and normalized from the {@link Route53RecoveryClusterClientConfig | constructor configuration interface}.
146
- */
147
- config;
148
- constructor(...[configuration]) {
149
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
150
- super(_config_0);
151
- this.initConfig = _config_0;
152
- const _config_1 = resolveClientEndpointParameters(_config_0);
153
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
154
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
155
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
156
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
157
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
158
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
159
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
160
- this.config = _config_8;
161
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
162
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
163
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
164
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
165
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
166
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
167
- this.middlewareStack.use(
168
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
169
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultRoute53RecoveryClusterHttpAuthSchemeParametersProvider,
170
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
171
- "aws.auth#sigv4": config.credentials
172
- }), "identityProviderConfigProvider")
173
- })
174
- );
175
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
176
- }
177
- /**
178
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
179
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
180
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
181
- */
182
- destroy() {
183
- super.destroy();
184
- }
120
+ class AccessDeniedException extends Route53RecoveryClusterServiceException {
121
+ name = "AccessDeniedException";
122
+ $fault = "client";
123
+ constructor(opts) {
124
+ super({
125
+ name: "AccessDeniedException",
126
+ $fault: "client",
127
+ ...opts,
128
+ });
129
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
130
+ }
131
+ }
132
+ class ConflictException extends Route53RecoveryClusterServiceException {
133
+ name = "ConflictException";
134
+ $fault = "client";
135
+ resourceId;
136
+ resourceType;
137
+ constructor(opts) {
138
+ super({
139
+ name: "ConflictException",
140
+ $fault: "client",
141
+ ...opts,
142
+ });
143
+ Object.setPrototypeOf(this, ConflictException.prototype);
144
+ this.resourceId = opts.resourceId;
145
+ this.resourceType = opts.resourceType;
146
+ }
147
+ }
148
+ class EndpointTemporarilyUnavailableException extends Route53RecoveryClusterServiceException {
149
+ name = "EndpointTemporarilyUnavailableException";
150
+ $fault = "server";
151
+ constructor(opts) {
152
+ super({
153
+ name: "EndpointTemporarilyUnavailableException",
154
+ $fault: "server",
155
+ ...opts,
156
+ });
157
+ Object.setPrototypeOf(this, EndpointTemporarilyUnavailableException.prototype);
158
+ }
159
+ }
160
+ const RoutingControlState = {
161
+ Off: "Off",
162
+ On: "On",
185
163
  };
186
-
187
- // src/Route53RecoveryCluster.ts
188
-
189
-
190
- // src/commands/GetRoutingControlStateCommand.ts
191
-
192
- var import_middleware_serde = require("@smithy/middleware-serde");
193
-
194
-
195
- // src/protocols/Aws_json1_0.ts
196
- var import_core2 = require("@aws-sdk/core");
197
-
198
-
199
-
200
- // src/models/Route53RecoveryClusterServiceException.ts
201
-
202
- var Route53RecoveryClusterServiceException = class _Route53RecoveryClusterServiceException extends import_smithy_client.ServiceException {
203
- static {
204
- __name(this, "Route53RecoveryClusterServiceException");
205
- }
206
- /**
207
- * @internal
208
- */
209
- constructor(options) {
210
- super(options);
211
- Object.setPrototypeOf(this, _Route53RecoveryClusterServiceException.prototype);
212
- }
164
+ class InternalServerException extends Route53RecoveryClusterServiceException {
165
+ name = "InternalServerException";
166
+ $fault = "server";
167
+ retryAfterSeconds;
168
+ constructor(opts) {
169
+ super({
170
+ name: "InternalServerException",
171
+ $fault: "server",
172
+ ...opts,
173
+ });
174
+ Object.setPrototypeOf(this, InternalServerException.prototype);
175
+ this.retryAfterSeconds = opts.retryAfterSeconds;
176
+ }
177
+ }
178
+ class ResourceNotFoundException extends Route53RecoveryClusterServiceException {
179
+ name = "ResourceNotFoundException";
180
+ $fault = "client";
181
+ resourceId;
182
+ resourceType;
183
+ constructor(opts) {
184
+ super({
185
+ name: "ResourceNotFoundException",
186
+ $fault: "client",
187
+ ...opts,
188
+ });
189
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
190
+ this.resourceId = opts.resourceId;
191
+ this.resourceType = opts.resourceType;
192
+ }
193
+ }
194
+ class ThrottlingException extends Route53RecoveryClusterServiceException {
195
+ name = "ThrottlingException";
196
+ $fault = "client";
197
+ retryAfterSeconds;
198
+ constructor(opts) {
199
+ super({
200
+ name: "ThrottlingException",
201
+ $fault: "client",
202
+ ...opts,
203
+ });
204
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
205
+ this.retryAfterSeconds = opts.retryAfterSeconds;
206
+ }
207
+ }
208
+ const ValidationExceptionReason = {
209
+ CANNOT_PARSE: "cannotParse",
210
+ FIELD_VALIDATION_FAILED: "fieldValidationFailed",
211
+ OTHER: "other",
212
+ UNKNOWN_OPERATION: "unknownOperation",
213
213
  };
214
+ class ValidationException extends Route53RecoveryClusterServiceException {
215
+ name = "ValidationException";
216
+ $fault = "client";
217
+ reason;
218
+ fields;
219
+ constructor(opts) {
220
+ super({
221
+ name: "ValidationException",
222
+ $fault: "client",
223
+ ...opts,
224
+ });
225
+ Object.setPrototypeOf(this, ValidationException.prototype);
226
+ this.reason = opts.reason;
227
+ this.fields = opts.fields;
228
+ }
229
+ }
230
+ class ServiceLimitExceededException extends Route53RecoveryClusterServiceException {
231
+ name = "ServiceLimitExceededException";
232
+ $fault = "client";
233
+ resourceId;
234
+ resourceType;
235
+ limitCode;
236
+ serviceCode;
237
+ constructor(opts) {
238
+ super({
239
+ name: "ServiceLimitExceededException",
240
+ $fault: "client",
241
+ ...opts,
242
+ });
243
+ Object.setPrototypeOf(this, ServiceLimitExceededException.prototype);
244
+ this.resourceId = opts.resourceId;
245
+ this.resourceType = opts.resourceType;
246
+ this.limitCode = opts.limitCode;
247
+ this.serviceCode = opts.serviceCode;
248
+ }
249
+ }
214
250
 
215
- // src/models/models_0.ts
216
- var AccessDeniedException = class _AccessDeniedException extends Route53RecoveryClusterServiceException {
217
- static {
218
- __name(this, "AccessDeniedException");
219
- }
220
- name = "AccessDeniedException";
221
- $fault = "client";
222
- /**
223
- * @internal
224
- */
225
- constructor(opts) {
226
- super({
227
- name: "AccessDeniedException",
228
- $fault: "client",
229
- ...opts
230
- });
231
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
232
- }
251
+ const se_GetRoutingControlStateCommand = async (input, context) => {
252
+ const headers = sharedHeaders("GetRoutingControlState");
253
+ let body;
254
+ body = JSON.stringify(smithyClient._json(input));
255
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
233
256
  };
234
- var ConflictException = class _ConflictException extends Route53RecoveryClusterServiceException {
235
- static {
236
- __name(this, "ConflictException");
237
- }
238
- name = "ConflictException";
239
- $fault = "client";
240
- /**
241
- * Identifier of the resource in use
242
- * @public
243
- */
244
- resourceId;
245
- /**
246
- * Type of the resource in use
247
- * @public
248
- */
249
- resourceType;
250
- /**
251
- * @internal
252
- */
253
- constructor(opts) {
254
- super({
255
- name: "ConflictException",
256
- $fault: "client",
257
- ...opts
258
- });
259
- Object.setPrototypeOf(this, _ConflictException.prototype);
260
- this.resourceId = opts.resourceId;
261
- this.resourceType = opts.resourceType;
262
- }
257
+ const se_ListRoutingControlsCommand = async (input, context) => {
258
+ const headers = sharedHeaders("ListRoutingControls");
259
+ let body;
260
+ body = JSON.stringify(smithyClient._json(input));
261
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
263
262
  };
264
- var EndpointTemporarilyUnavailableException = class _EndpointTemporarilyUnavailableException extends Route53RecoveryClusterServiceException {
265
- static {
266
- __name(this, "EndpointTemporarilyUnavailableException");
267
- }
268
- name = "EndpointTemporarilyUnavailableException";
269
- $fault = "server";
270
- /**
271
- * @internal
272
- */
273
- constructor(opts) {
274
- super({
275
- name: "EndpointTemporarilyUnavailableException",
276
- $fault: "server",
277
- ...opts
278
- });
279
- Object.setPrototypeOf(this, _EndpointTemporarilyUnavailableException.prototype);
280
- }
263
+ const se_UpdateRoutingControlStateCommand = async (input, context) => {
264
+ const headers = sharedHeaders("UpdateRoutingControlState");
265
+ let body;
266
+ body = JSON.stringify(smithyClient._json(input));
267
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
268
+ };
269
+ const se_UpdateRoutingControlStatesCommand = async (input, context) => {
270
+ const headers = sharedHeaders("UpdateRoutingControlStates");
271
+ let body;
272
+ body = JSON.stringify(smithyClient._json(input));
273
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
274
+ };
275
+ const de_GetRoutingControlStateCommand = async (output, context) => {
276
+ if (output.statusCode >= 300) {
277
+ return de_CommandError(output, context);
278
+ }
279
+ const data = await core$1.parseJsonBody(output.body, context);
280
+ let contents = {};
281
+ contents = smithyClient._json(data);
282
+ const response = {
283
+ $metadata: deserializeMetadata(output),
284
+ ...contents,
285
+ };
286
+ return response;
287
+ };
288
+ const de_ListRoutingControlsCommand = async (output, context) => {
289
+ if (output.statusCode >= 300) {
290
+ return de_CommandError(output, context);
291
+ }
292
+ const data = await core$1.parseJsonBody(output.body, context);
293
+ let contents = {};
294
+ contents = smithyClient._json(data);
295
+ const response = {
296
+ $metadata: deserializeMetadata(output),
297
+ ...contents,
298
+ };
299
+ return response;
300
+ };
301
+ const de_UpdateRoutingControlStateCommand = async (output, context) => {
302
+ if (output.statusCode >= 300) {
303
+ return de_CommandError(output, context);
304
+ }
305
+ const data = await core$1.parseJsonBody(output.body, context);
306
+ let contents = {};
307
+ contents = smithyClient._json(data);
308
+ const response = {
309
+ $metadata: deserializeMetadata(output),
310
+ ...contents,
311
+ };
312
+ return response;
313
+ };
314
+ const de_UpdateRoutingControlStatesCommand = async (output, context) => {
315
+ if (output.statusCode >= 300) {
316
+ return de_CommandError(output, context);
317
+ }
318
+ const data = await core$1.parseJsonBody(output.body, context);
319
+ let contents = {};
320
+ contents = smithyClient._json(data);
321
+ const response = {
322
+ $metadata: deserializeMetadata(output),
323
+ ...contents,
324
+ };
325
+ return response;
281
326
  };
282
- var RoutingControlState = {
283
- Off: "Off",
284
- On: "On"
327
+ const de_CommandError = async (output, context) => {
328
+ const parsedOutput = {
329
+ ...output,
330
+ body: await core$1.parseJsonErrorBody(output.body, context),
331
+ };
332
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
333
+ switch (errorCode) {
334
+ case "AccessDeniedException":
335
+ case "com.amazonaws.route53recoverycluster#AccessDeniedException":
336
+ throw await de_AccessDeniedExceptionRes(parsedOutput);
337
+ case "EndpointTemporarilyUnavailableException":
338
+ case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
339
+ throw await de_EndpointTemporarilyUnavailableExceptionRes(parsedOutput);
340
+ case "InternalServerException":
341
+ case "com.amazonaws.route53recoverycluster#InternalServerException":
342
+ throw await de_InternalServerExceptionRes(parsedOutput);
343
+ case "ResourceNotFoundException":
344
+ case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
345
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
346
+ case "ThrottlingException":
347
+ case "com.amazonaws.route53recoverycluster#ThrottlingException":
348
+ throw await de_ThrottlingExceptionRes(parsedOutput);
349
+ case "ValidationException":
350
+ case "com.amazonaws.route53recoverycluster#ValidationException":
351
+ throw await de_ValidationExceptionRes(parsedOutput);
352
+ case "ConflictException":
353
+ case "com.amazonaws.route53recoverycluster#ConflictException":
354
+ throw await de_ConflictExceptionRes(parsedOutput);
355
+ case "ServiceLimitExceededException":
356
+ case "com.amazonaws.route53recoverycluster#ServiceLimitExceededException":
357
+ throw await de_ServiceLimitExceededExceptionRes(parsedOutput);
358
+ default:
359
+ const parsedBody = parsedOutput.body;
360
+ return throwDefaultError({
361
+ output,
362
+ parsedBody,
363
+ errorCode,
364
+ });
365
+ }
285
366
  };
286
- var InternalServerException = class _InternalServerException extends Route53RecoveryClusterServiceException {
287
- static {
288
- __name(this, "InternalServerException");
289
- }
290
- name = "InternalServerException";
291
- $fault = "server";
292
- /**
293
- * Advice to clients on when the call can be safely retried
294
- * @public
295
- */
296
- retryAfterSeconds;
297
- /**
298
- * @internal
299
- */
300
- constructor(opts) {
301
- super({
302
- name: "InternalServerException",
303
- $fault: "server",
304
- ...opts
367
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
368
+ const body = parsedOutput.body;
369
+ const deserialized = smithyClient._json(body);
370
+ const exception = new AccessDeniedException({
371
+ $metadata: deserializeMetadata(parsedOutput),
372
+ ...deserialized,
305
373
  });
306
- Object.setPrototypeOf(this, _InternalServerException.prototype);
307
- this.retryAfterSeconds = opts.retryAfterSeconds;
308
- }
374
+ return smithyClient.decorateServiceException(exception, body);
309
375
  };
310
- var ResourceNotFoundException = class _ResourceNotFoundException extends Route53RecoveryClusterServiceException {
311
- static {
312
- __name(this, "ResourceNotFoundException");
313
- }
314
- name = "ResourceNotFoundException";
315
- $fault = "client";
316
- /**
317
- * Hypothetical resource identifier that was not found
318
- * @public
319
- */
320
- resourceId;
321
- /**
322
- * Hypothetical resource type that was not found
323
- * @public
324
- */
325
- resourceType;
326
- /**
327
- * @internal
328
- */
329
- constructor(opts) {
330
- super({
331
- name: "ResourceNotFoundException",
332
- $fault: "client",
333
- ...opts
376
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
377
+ const body = parsedOutput.body;
378
+ const deserialized = smithyClient._json(body);
379
+ const exception = new ConflictException({
380
+ $metadata: deserializeMetadata(parsedOutput),
381
+ ...deserialized,
334
382
  });
335
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
336
- this.resourceId = opts.resourceId;
337
- this.resourceType = opts.resourceType;
338
- }
383
+ return smithyClient.decorateServiceException(exception, body);
339
384
  };
340
- var ThrottlingException = class _ThrottlingException extends Route53RecoveryClusterServiceException {
341
- static {
342
- __name(this, "ThrottlingException");
343
- }
344
- name = "ThrottlingException";
345
- $fault = "client";
346
- /**
347
- * Advice to clients on when the call can be safely retried
348
- * @public
349
- */
350
- retryAfterSeconds;
351
- /**
352
- * @internal
353
- */
354
- constructor(opts) {
355
- super({
356
- name: "ThrottlingException",
357
- $fault: "client",
358
- ...opts
385
+ const de_EndpointTemporarilyUnavailableExceptionRes = async (parsedOutput, context) => {
386
+ const body = parsedOutput.body;
387
+ const deserialized = smithyClient._json(body);
388
+ const exception = new EndpointTemporarilyUnavailableException({
389
+ $metadata: deserializeMetadata(parsedOutput),
390
+ ...deserialized,
359
391
  });
360
- Object.setPrototypeOf(this, _ThrottlingException.prototype);
361
- this.retryAfterSeconds = opts.retryAfterSeconds;
362
- }
392
+ return smithyClient.decorateServiceException(exception, body);
363
393
  };
364
- var ValidationExceptionReason = {
365
- CANNOT_PARSE: "cannotParse",
366
- FIELD_VALIDATION_FAILED: "fieldValidationFailed",
367
- OTHER: "other",
368
- UNKNOWN_OPERATION: "unknownOperation"
394
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
395
+ const body = parsedOutput.body;
396
+ const deserialized = smithyClient._json(body);
397
+ const exception = new InternalServerException({
398
+ $metadata: deserializeMetadata(parsedOutput),
399
+ ...deserialized,
400
+ });
401
+ return smithyClient.decorateServiceException(exception, body);
369
402
  };
370
- var ValidationException = class _ValidationException extends Route53RecoveryClusterServiceException {
371
- static {
372
- __name(this, "ValidationException");
373
- }
374
- name = "ValidationException";
375
- $fault = "client";
376
- /**
377
- * Reason the request failed validation
378
- * @public
379
- */
380
- reason;
381
- /**
382
- * The fields that caused the error, if applicable
383
- * @public
384
- */
385
- fields;
386
- /**
387
- * @internal
388
- */
389
- constructor(opts) {
390
- super({
391
- name: "ValidationException",
392
- $fault: "client",
393
- ...opts
403
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
404
+ const body = parsedOutput.body;
405
+ const deserialized = smithyClient._json(body);
406
+ const exception = new ResourceNotFoundException({
407
+ $metadata: deserializeMetadata(parsedOutput),
408
+ ...deserialized,
394
409
  });
395
- Object.setPrototypeOf(this, _ValidationException.prototype);
396
- this.reason = opts.reason;
397
- this.fields = opts.fields;
398
- }
410
+ return smithyClient.decorateServiceException(exception, body);
399
411
  };
400
- var ServiceLimitExceededException = class _ServiceLimitExceededException extends Route53RecoveryClusterServiceException {
401
- static {
402
- __name(this, "ServiceLimitExceededException");
403
- }
404
- name = "ServiceLimitExceededException";
405
- $fault = "client";
406
- /**
407
- * <p>The resource identifier of the limit that was exceeded.</p>
408
- * @public
409
- */
410
- resourceId;
411
- /**
412
- * <p>The resource type of the limit that was exceeded.</p>
413
- * @public
414
- */
415
- resourceType;
416
- /**
417
- * <p>The code of the limit that was exceeded.</p>
418
- * @public
419
- */
420
- limitCode;
421
- /**
422
- * <p>The service code of the limit that was exceeded.</p>
423
- * @public
424
- */
425
- serviceCode;
426
- /**
427
- * @internal
428
- */
429
- constructor(opts) {
430
- super({
431
- name: "ServiceLimitExceededException",
432
- $fault: "client",
433
- ...opts
412
+ const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
413
+ const body = parsedOutput.body;
414
+ const deserialized = smithyClient._json(body);
415
+ const exception = new ServiceLimitExceededException({
416
+ $metadata: deserializeMetadata(parsedOutput),
417
+ ...deserialized,
434
418
  });
435
- Object.setPrototypeOf(this, _ServiceLimitExceededException.prototype);
436
- this.resourceId = opts.resourceId;
437
- this.resourceType = opts.resourceType;
438
- this.limitCode = opts.limitCode;
439
- this.serviceCode = opts.serviceCode;
440
- }
419
+ return smithyClient.decorateServiceException(exception, body);
441
420
  };
442
-
443
- // src/protocols/Aws_json1_0.ts
444
- var se_GetRoutingControlStateCommand = /* @__PURE__ */ __name(async (input, context) => {
445
- const headers = sharedHeaders("GetRoutingControlState");
446
- let body;
447
- body = JSON.stringify((0, import_smithy_client._json)(input));
448
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
449
- }, "se_GetRoutingControlStateCommand");
450
- var se_ListRoutingControlsCommand = /* @__PURE__ */ __name(async (input, context) => {
451
- const headers = sharedHeaders("ListRoutingControls");
452
- let body;
453
- body = JSON.stringify((0, import_smithy_client._json)(input));
454
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
455
- }, "se_ListRoutingControlsCommand");
456
- var se_UpdateRoutingControlStateCommand = /* @__PURE__ */ __name(async (input, context) => {
457
- const headers = sharedHeaders("UpdateRoutingControlState");
458
- let body;
459
- body = JSON.stringify((0, import_smithy_client._json)(input));
460
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
461
- }, "se_UpdateRoutingControlStateCommand");
462
- var se_UpdateRoutingControlStatesCommand = /* @__PURE__ */ __name(async (input, context) => {
463
- const headers = sharedHeaders("UpdateRoutingControlStates");
464
- let body;
465
- body = JSON.stringify((0, import_smithy_client._json)(input));
466
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
467
- }, "se_UpdateRoutingControlStatesCommand");
468
- var de_GetRoutingControlStateCommand = /* @__PURE__ */ __name(async (output, context) => {
469
- if (output.statusCode >= 300) {
470
- return de_CommandError(output, context);
471
- }
472
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
473
- let contents = {};
474
- contents = (0, import_smithy_client._json)(data);
475
- const response = {
476
- $metadata: deserializeMetadata(output),
477
- ...contents
478
- };
479
- return response;
480
- }, "de_GetRoutingControlStateCommand");
481
- var de_ListRoutingControlsCommand = /* @__PURE__ */ __name(async (output, context) => {
482
- if (output.statusCode >= 300) {
483
- return de_CommandError(output, context);
484
- }
485
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
486
- let contents = {};
487
- contents = (0, import_smithy_client._json)(data);
488
- const response = {
489
- $metadata: deserializeMetadata(output),
490
- ...contents
491
- };
492
- return response;
493
- }, "de_ListRoutingControlsCommand");
494
- var de_UpdateRoutingControlStateCommand = /* @__PURE__ */ __name(async (output, context) => {
495
- if (output.statusCode >= 300) {
496
- return de_CommandError(output, context);
497
- }
498
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
499
- let contents = {};
500
- contents = (0, import_smithy_client._json)(data);
501
- const response = {
502
- $metadata: deserializeMetadata(output),
503
- ...contents
504
- };
505
- return response;
506
- }, "de_UpdateRoutingControlStateCommand");
507
- var de_UpdateRoutingControlStatesCommand = /* @__PURE__ */ __name(async (output, context) => {
508
- if (output.statusCode >= 300) {
509
- return de_CommandError(output, context);
510
- }
511
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
512
- let contents = {};
513
- contents = (0, import_smithy_client._json)(data);
514
- const response = {
515
- $metadata: deserializeMetadata(output),
516
- ...contents
517
- };
518
- return response;
519
- }, "de_UpdateRoutingControlStatesCommand");
520
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
521
- const parsedOutput = {
522
- ...output,
523
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
524
- };
525
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
526
- switch (errorCode) {
527
- case "AccessDeniedException":
528
- case "com.amazonaws.route53recoverycluster#AccessDeniedException":
529
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
530
- case "EndpointTemporarilyUnavailableException":
531
- case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
532
- throw await de_EndpointTemporarilyUnavailableExceptionRes(parsedOutput, context);
533
- case "InternalServerException":
534
- case "com.amazonaws.route53recoverycluster#InternalServerException":
535
- throw await de_InternalServerExceptionRes(parsedOutput, context);
536
- case "ResourceNotFoundException":
537
- case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
538
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
539
- case "ThrottlingException":
540
- case "com.amazonaws.route53recoverycluster#ThrottlingException":
541
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
542
- case "ValidationException":
543
- case "com.amazonaws.route53recoverycluster#ValidationException":
544
- throw await de_ValidationExceptionRes(parsedOutput, context);
545
- case "ConflictException":
546
- case "com.amazonaws.route53recoverycluster#ConflictException":
547
- throw await de_ConflictExceptionRes(parsedOutput, context);
548
- case "ServiceLimitExceededException":
549
- case "com.amazonaws.route53recoverycluster#ServiceLimitExceededException":
550
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
551
- default:
552
- const parsedBody = parsedOutput.body;
553
- return throwDefaultError({
554
- output,
555
- parsedBody,
556
- errorCode
557
- });
558
- }
559
- }, "de_CommandError");
560
- var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
561
- const body = parsedOutput.body;
562
- const deserialized = (0, import_smithy_client._json)(body);
563
- const exception = new AccessDeniedException({
564
- $metadata: deserializeMetadata(parsedOutput),
565
- ...deserialized
566
- });
567
- return (0, import_smithy_client.decorateServiceException)(exception, body);
568
- }, "de_AccessDeniedExceptionRes");
569
- var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
570
- const body = parsedOutput.body;
571
- const deserialized = (0, import_smithy_client._json)(body);
572
- const exception = new ConflictException({
573
- $metadata: deserializeMetadata(parsedOutput),
574
- ...deserialized
575
- });
576
- return (0, import_smithy_client.decorateServiceException)(exception, body);
577
- }, "de_ConflictExceptionRes");
578
- var de_EndpointTemporarilyUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
579
- const body = parsedOutput.body;
580
- const deserialized = (0, import_smithy_client._json)(body);
581
- const exception = new EndpointTemporarilyUnavailableException({
582
- $metadata: deserializeMetadata(parsedOutput),
583
- ...deserialized
584
- });
585
- return (0, import_smithy_client.decorateServiceException)(exception, body);
586
- }, "de_EndpointTemporarilyUnavailableExceptionRes");
587
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
588
- const body = parsedOutput.body;
589
- const deserialized = (0, import_smithy_client._json)(body);
590
- const exception = new InternalServerException({
591
- $metadata: deserializeMetadata(parsedOutput),
592
- ...deserialized
593
- });
594
- return (0, import_smithy_client.decorateServiceException)(exception, body);
595
- }, "de_InternalServerExceptionRes");
596
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
597
- const body = parsedOutput.body;
598
- const deserialized = (0, import_smithy_client._json)(body);
599
- const exception = new ResourceNotFoundException({
600
- $metadata: deserializeMetadata(parsedOutput),
601
- ...deserialized
602
- });
603
- return (0, import_smithy_client.decorateServiceException)(exception, body);
604
- }, "de_ResourceNotFoundExceptionRes");
605
- var de_ServiceLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
606
- const body = parsedOutput.body;
607
- const deserialized = (0, import_smithy_client._json)(body);
608
- const exception = new ServiceLimitExceededException({
609
- $metadata: deserializeMetadata(parsedOutput),
610
- ...deserialized
611
- });
612
- return (0, import_smithy_client.decorateServiceException)(exception, body);
613
- }, "de_ServiceLimitExceededExceptionRes");
614
- var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
615
- const body = parsedOutput.body;
616
- const deserialized = (0, import_smithy_client._json)(body);
617
- const exception = new ThrottlingException({
618
- $metadata: deserializeMetadata(parsedOutput),
619
- ...deserialized
620
- });
621
- return (0, import_smithy_client.decorateServiceException)(exception, body);
622
- }, "de_ThrottlingExceptionRes");
623
- var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
624
- const body = parsedOutput.body;
625
- const deserialized = (0, import_smithy_client._json)(body);
626
- const exception = new ValidationException({
627
- $metadata: deserializeMetadata(parsedOutput),
628
- ...deserialized
629
- });
630
- return (0, import_smithy_client.decorateServiceException)(exception, body);
631
- }, "de_ValidationExceptionRes");
632
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
633
- httpStatusCode: output.statusCode,
634
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
635
- extendedRequestId: output.headers["x-amz-id-2"],
636
- cfId: output.headers["x-amz-cf-id"]
637
- }), "deserializeMetadata");
638
- var throwDefaultError = (0, import_smithy_client.withBaseException)(Route53RecoveryClusterServiceException);
639
- var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
640
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
641
- const contents = {
642
- protocol,
643
- hostname,
644
- port,
645
- method: "POST",
646
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
647
- headers
648
- };
649
- if (resolvedHostname !== void 0) {
650
- contents.hostname = resolvedHostname;
651
- }
652
- if (body !== void 0) {
653
- contents.body = body;
654
- }
655
- return new import_protocol_http.HttpRequest(contents);
656
- }, "buildHttpRpcRequest");
657
- function sharedHeaders(operation) {
658
- return {
659
- "content-type": "application/x-amz-json-1.0",
660
- "x-amz-target": `ToggleCustomerAPI.${operation}`
661
- };
662
- }
663
- __name(sharedHeaders, "sharedHeaders");
664
-
665
- // src/commands/GetRoutingControlStateCommand.ts
666
- var GetRoutingControlStateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
667
- return [
668
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
669
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
670
- ];
671
- }).s("ToggleCustomerAPI", "GetRoutingControlState", {}).n("Route53RecoveryClusterClient", "GetRoutingControlStateCommand").f(void 0, void 0).ser(se_GetRoutingControlStateCommand).de(de_GetRoutingControlStateCommand).build() {
672
- static {
673
- __name(this, "GetRoutingControlStateCommand");
674
- }
421
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
422
+ const body = parsedOutput.body;
423
+ const deserialized = smithyClient._json(body);
424
+ const exception = new ThrottlingException({
425
+ $metadata: deserializeMetadata(parsedOutput),
426
+ ...deserialized,
427
+ });
428
+ return smithyClient.decorateServiceException(exception, body);
675
429
  };
676
-
677
- // src/commands/ListRoutingControlsCommand.ts
678
-
679
-
680
-
681
- var ListRoutingControlsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
682
- return [
683
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
684
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
685
- ];
686
- }).s("ToggleCustomerAPI", "ListRoutingControls", {}).n("Route53RecoveryClusterClient", "ListRoutingControlsCommand").f(void 0, void 0).ser(se_ListRoutingControlsCommand).de(de_ListRoutingControlsCommand).build() {
687
- static {
688
- __name(this, "ListRoutingControlsCommand");
689
- }
430
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
431
+ const body = parsedOutput.body;
432
+ const deserialized = smithyClient._json(body);
433
+ const exception = new ValidationException({
434
+ $metadata: deserializeMetadata(parsedOutput),
435
+ ...deserialized,
436
+ });
437
+ return smithyClient.decorateServiceException(exception, body);
690
438
  };
691
-
692
- // src/commands/UpdateRoutingControlStateCommand.ts
693
-
694
-
695
-
696
- var UpdateRoutingControlStateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
697
- return [
698
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
699
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
700
- ];
701
- }).s("ToggleCustomerAPI", "UpdateRoutingControlState", {}).n("Route53RecoveryClusterClient", "UpdateRoutingControlStateCommand").f(void 0, void 0).ser(se_UpdateRoutingControlStateCommand).de(de_UpdateRoutingControlStateCommand).build() {
702
- static {
703
- __name(this, "UpdateRoutingControlStateCommand");
704
- }
439
+ const deserializeMetadata = (output) => ({
440
+ httpStatusCode: output.statusCode,
441
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
442
+ extendedRequestId: output.headers["x-amz-id-2"],
443
+ cfId: output.headers["x-amz-cf-id"],
444
+ });
445
+ const throwDefaultError = smithyClient.withBaseException(Route53RecoveryClusterServiceException);
446
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
447
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
448
+ const contents = {
449
+ protocol,
450
+ hostname,
451
+ port,
452
+ method: "POST",
453
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
454
+ headers,
455
+ };
456
+ if (body !== undefined) {
457
+ contents.body = body;
458
+ }
459
+ return new protocolHttp.HttpRequest(contents);
705
460
  };
461
+ function sharedHeaders(operation) {
462
+ return {
463
+ "content-type": "application/x-amz-json-1.0",
464
+ "x-amz-target": `ToggleCustomerAPI.${operation}`,
465
+ };
466
+ }
706
467
 
707
- // src/commands/UpdateRoutingControlStatesCommand.ts
468
+ class GetRoutingControlStateCommand extends smithyClient.Command
469
+ .classBuilder()
470
+ .ep(commonParams)
471
+ .m(function (Command, cs, config, o) {
472
+ return [
473
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
474
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
475
+ ];
476
+ })
477
+ .s("ToggleCustomerAPI", "GetRoutingControlState", {})
478
+ .n("Route53RecoveryClusterClient", "GetRoutingControlStateCommand")
479
+ .f(void 0, void 0)
480
+ .ser(se_GetRoutingControlStateCommand)
481
+ .de(de_GetRoutingControlStateCommand)
482
+ .build() {
483
+ }
708
484
 
485
+ class ListRoutingControlsCommand extends smithyClient.Command
486
+ .classBuilder()
487
+ .ep(commonParams)
488
+ .m(function (Command, cs, config, o) {
489
+ return [
490
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
491
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
492
+ ];
493
+ })
494
+ .s("ToggleCustomerAPI", "ListRoutingControls", {})
495
+ .n("Route53RecoveryClusterClient", "ListRoutingControlsCommand")
496
+ .f(void 0, void 0)
497
+ .ser(se_ListRoutingControlsCommand)
498
+ .de(de_ListRoutingControlsCommand)
499
+ .build() {
500
+ }
709
501
 
502
+ class UpdateRoutingControlStateCommand extends smithyClient.Command
503
+ .classBuilder()
504
+ .ep(commonParams)
505
+ .m(function (Command, cs, config, o) {
506
+ return [
507
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
508
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
509
+ ];
510
+ })
511
+ .s("ToggleCustomerAPI", "UpdateRoutingControlState", {})
512
+ .n("Route53RecoveryClusterClient", "UpdateRoutingControlStateCommand")
513
+ .f(void 0, void 0)
514
+ .ser(se_UpdateRoutingControlStateCommand)
515
+ .de(de_UpdateRoutingControlStateCommand)
516
+ .build() {
517
+ }
710
518
 
711
- var UpdateRoutingControlStatesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
712
- return [
713
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
714
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
715
- ];
716
- }).s("ToggleCustomerAPI", "UpdateRoutingControlStates", {}).n("Route53RecoveryClusterClient", "UpdateRoutingControlStatesCommand").f(void 0, void 0).ser(se_UpdateRoutingControlStatesCommand).de(de_UpdateRoutingControlStatesCommand).build() {
717
- static {
718
- __name(this, "UpdateRoutingControlStatesCommand");
719
- }
720
- };
519
+ class UpdateRoutingControlStatesCommand extends smithyClient.Command
520
+ .classBuilder()
521
+ .ep(commonParams)
522
+ .m(function (Command, cs, config, o) {
523
+ return [
524
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
525
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
526
+ ];
527
+ })
528
+ .s("ToggleCustomerAPI", "UpdateRoutingControlStates", {})
529
+ .n("Route53RecoveryClusterClient", "UpdateRoutingControlStatesCommand")
530
+ .f(void 0, void 0)
531
+ .ser(se_UpdateRoutingControlStatesCommand)
532
+ .de(de_UpdateRoutingControlStatesCommand)
533
+ .build() {
534
+ }
721
535
 
722
- // src/Route53RecoveryCluster.ts
723
- var commands = {
724
- GetRoutingControlStateCommand,
725
- ListRoutingControlsCommand,
726
- UpdateRoutingControlStateCommand,
727
- UpdateRoutingControlStatesCommand
536
+ const commands = {
537
+ GetRoutingControlStateCommand,
538
+ ListRoutingControlsCommand,
539
+ UpdateRoutingControlStateCommand,
540
+ UpdateRoutingControlStatesCommand,
728
541
  };
729
- var Route53RecoveryCluster = class extends Route53RecoveryClusterClient {
730
- static {
731
- __name(this, "Route53RecoveryCluster");
732
- }
733
- };
734
- (0, import_smithy_client.createAggregatedClient)(commands, Route53RecoveryCluster);
735
-
736
- // src/pagination/ListRoutingControlsPaginator.ts
542
+ class Route53RecoveryCluster extends Route53RecoveryClusterClient {
543
+ }
544
+ smithyClient.createAggregatedClient(commands, Route53RecoveryCluster);
737
545
 
738
- var paginateListRoutingControls = (0, import_core.createPaginator)(Route53RecoveryClusterClient, ListRoutingControlsCommand, "NextToken", "NextToken", "MaxResults");
739
- // Annotate the CommonJS export names for ESM import in node:
546
+ const paginateListRoutingControls = core.createPaginator(Route53RecoveryClusterClient, ListRoutingControlsCommand, "NextToken", "NextToken", "MaxResults");
740
547
 
741
- 0 && (module.exports = {
742
- Route53RecoveryClusterServiceException,
743
- __Client,
744
- Route53RecoveryClusterClient,
745
- Route53RecoveryCluster,
746
- $Command,
747
- GetRoutingControlStateCommand,
748
- ListRoutingControlsCommand,
749
- UpdateRoutingControlStateCommand,
750
- UpdateRoutingControlStatesCommand,
751
- paginateListRoutingControls,
752
- AccessDeniedException,
753
- ConflictException,
754
- EndpointTemporarilyUnavailableException,
755
- RoutingControlState,
756
- InternalServerException,
757
- ResourceNotFoundException,
758
- ThrottlingException,
759
- ValidationExceptionReason,
760
- ValidationException,
761
- ServiceLimitExceededException
548
+ Object.defineProperty(exports, "$Command", {
549
+ enumerable: true,
550
+ get: function () { return smithyClient.Command; }
762
551
  });
763
-
552
+ Object.defineProperty(exports, "__Client", {
553
+ enumerable: true,
554
+ get: function () { return smithyClient.Client; }
555
+ });
556
+ exports.AccessDeniedException = AccessDeniedException;
557
+ exports.ConflictException = ConflictException;
558
+ exports.EndpointTemporarilyUnavailableException = EndpointTemporarilyUnavailableException;
559
+ exports.GetRoutingControlStateCommand = GetRoutingControlStateCommand;
560
+ exports.InternalServerException = InternalServerException;
561
+ exports.ListRoutingControlsCommand = ListRoutingControlsCommand;
562
+ exports.ResourceNotFoundException = ResourceNotFoundException;
563
+ exports.Route53RecoveryCluster = Route53RecoveryCluster;
564
+ exports.Route53RecoveryClusterClient = Route53RecoveryClusterClient;
565
+ exports.Route53RecoveryClusterServiceException = Route53RecoveryClusterServiceException;
566
+ exports.RoutingControlState = RoutingControlState;
567
+ exports.ServiceLimitExceededException = ServiceLimitExceededException;
568
+ exports.ThrottlingException = ThrottlingException;
569
+ exports.UpdateRoutingControlStateCommand = UpdateRoutingControlStateCommand;
570
+ exports.UpdateRoutingControlStatesCommand = UpdateRoutingControlStatesCommand;
571
+ exports.ValidationException = ValidationException;
572
+ exports.ValidationExceptionReason = ValidationExceptionReason;
573
+ exports.paginateListRoutingControls = paginateListRoutingControls;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-route53-recovery-cluster",
3
3
  "description": "AWS SDK for JavaScript Route53 Recovery Cluster Client for Node.js, Browser and React Native",
4
- "version": "3.901.0",
4
+ "version": "3.906.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-route53-recovery-cluster",
@@ -20,17 +20,17 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "3.901.0",
24
- "@aws-sdk/credential-provider-node": "3.901.0",
23
+ "@aws-sdk/core": "3.906.0",
24
+ "@aws-sdk/credential-provider-node": "3.906.0",
25
25
  "@aws-sdk/middleware-host-header": "3.901.0",
26
26
  "@aws-sdk/middleware-logger": "3.901.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.901.0",
28
- "@aws-sdk/middleware-user-agent": "3.901.0",
28
+ "@aws-sdk/middleware-user-agent": "3.906.0",
29
29
  "@aws-sdk/region-config-resolver": "3.901.0",
30
30
  "@aws-sdk/types": "3.901.0",
31
31
  "@aws-sdk/util-endpoints": "3.901.0",
32
32
  "@aws-sdk/util-user-agent-browser": "3.901.0",
33
- "@aws-sdk/util-user-agent-node": "3.901.0",
33
+ "@aws-sdk/util-user-agent-node": "3.906.0",
34
34
  "@smithy/config-resolver": "^4.3.0",
35
35
  "@smithy/core": "^3.14.0",
36
36
  "@smithy/fetch-http-handler": "^5.3.0",