@aws-sdk/client-route53-recovery-cluster 3.32.0 → 3.36.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.
- package/CHANGELOG.md +44 -0
- package/{dist/cjs → dist-cjs}/Route53RecoveryCluster.js +1 -2
- package/{dist/cjs → dist-cjs}/Route53RecoveryClusterClient.js +8 -9
- package/{dist/cjs → dist-cjs}/commands/GetRoutingControlStateCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/commands/UpdateRoutingControlStateCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/commands/UpdateRoutingControlStatesCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -1
- package/{dist/cjs → dist-cjs}/protocols/Aws_json1_0.js +0 -1
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +2 -2
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +2 -2
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -1
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -2
- package/{dist/es → dist-es}/Route53RecoveryCluster.js +2 -27
- package/dist-es/Route53RecoveryClusterClient.js +37 -0
- package/dist-es/commands/GetRoutingControlStateCommand.js +39 -0
- package/{dist/es → dist-es}/commands/UpdateRoutingControlStateCommand.js +4 -34
- package/{dist/es → dist-es}/commands/UpdateRoutingControlStatesCommand.js +4 -34
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -46
- package/{dist/es → dist-es}/protocols/Aws_json1_0.js +110 -116
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
- package/{dist/types → dist-types}/Route53RecoveryCluster.d.ts +2 -2
- package/{dist/types → dist-types}/Route53RecoveryClusterClient.d.ts +4 -4
- package/{dist/types → dist-types}/commands/GetRoutingControlStateCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/UpdateRoutingControlStateCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/UpdateRoutingControlStatesCommand.d.ts +3 -3
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/protocols/Aws_json1_0.d.ts +2 -2
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +4 -1
- package/{dist/types/ts3.4 → dist-types}/runtimeConfig.d.ts +37 -36
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +1 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/Route53RecoveryCluster.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/Route53RecoveryClusterClient.d.ts +4 -4
- package/{dist/types → dist-types}/ts3.4/commands/GetRoutingControlStateCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/commands/UpdateRoutingControlStateCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/commands/UpdateRoutingControlStatesCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_0.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +4 -1
- package/{dist/types → dist-types/ts3.4}/runtimeConfig.d.ts +37 -36
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +0 -0
- package/package.json +52 -49
- package/Route53RecoveryCluster.ts +0 -156
- package/Route53RecoveryClusterClient.ts +0 -274
- package/commands/GetRoutingControlStateCommand.ts +0 -107
- package/commands/UpdateRoutingControlStateCommand.ts +0 -105
- package/commands/UpdateRoutingControlStatesCommand.ts +0 -105
- package/dist/cjs/Route53RecoveryCluster.js.map +0 -1
- package/dist/cjs/Route53RecoveryClusterClient.js.map +0 -1
- package/dist/cjs/commands/GetRoutingControlStateCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateRoutingControlStateCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateRoutingControlStatesCommand.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -91
- package/dist/cjs/protocols/Aws_json1_0.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/es/Route53RecoveryCluster.js.map +0 -1
- package/dist/es/Route53RecoveryClusterClient.js +0 -67
- package/dist/es/Route53RecoveryClusterClient.js.map +0 -1
- package/dist/es/commands/GetRoutingControlStateCommand.js +0 -74
- package/dist/es/commands/GetRoutingControlStateCommand.js.map +0 -1
- package/dist/es/commands/UpdateRoutingControlStateCommand.js.map +0 -1
- package/dist/es/commands/UpdateRoutingControlStatesCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -7
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -91
- package/dist/es/protocols/Aws_json1_0.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/endpoints.ts +0 -57
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -322
- package/protocols/Aws_json1_0.ts +0 -739
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -12
- package/tsconfig.json +0 -32
package/protocols/Aws_json1_0.ts
DELETED
|
@@ -1,739 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GetRoutingControlStateCommandInput,
|
|
3
|
-
GetRoutingControlStateCommandOutput,
|
|
4
|
-
} from "../commands/GetRoutingControlStateCommand";
|
|
5
|
-
import {
|
|
6
|
-
UpdateRoutingControlStateCommandInput,
|
|
7
|
-
UpdateRoutingControlStateCommandOutput,
|
|
8
|
-
} from "../commands/UpdateRoutingControlStateCommand";
|
|
9
|
-
import {
|
|
10
|
-
UpdateRoutingControlStatesCommandInput,
|
|
11
|
-
UpdateRoutingControlStatesCommandOutput,
|
|
12
|
-
} from "../commands/UpdateRoutingControlStatesCommand";
|
|
13
|
-
import {
|
|
14
|
-
AccessDeniedException,
|
|
15
|
-
ConflictException,
|
|
16
|
-
EndpointTemporarilyUnavailableException,
|
|
17
|
-
GetRoutingControlStateRequest,
|
|
18
|
-
GetRoutingControlStateResponse,
|
|
19
|
-
InternalServerException,
|
|
20
|
-
ResourceNotFoundException,
|
|
21
|
-
ThrottlingException,
|
|
22
|
-
UpdateRoutingControlStateEntry,
|
|
23
|
-
UpdateRoutingControlStateRequest,
|
|
24
|
-
UpdateRoutingControlStateResponse,
|
|
25
|
-
UpdateRoutingControlStatesRequest,
|
|
26
|
-
UpdateRoutingControlStatesResponse,
|
|
27
|
-
ValidationException,
|
|
28
|
-
ValidationExceptionField,
|
|
29
|
-
} from "../models/models_0";
|
|
30
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
31
|
-
import { expectInt32 as __expectInt32, expectString as __expectString } from "@aws-sdk/smithy-client";
|
|
32
|
-
import {
|
|
33
|
-
Endpoint as __Endpoint,
|
|
34
|
-
HeaderBag as __HeaderBag,
|
|
35
|
-
MetadataBearer as __MetadataBearer,
|
|
36
|
-
ResponseMetadata as __ResponseMetadata,
|
|
37
|
-
SerdeContext as __SerdeContext,
|
|
38
|
-
SmithyException as __SmithyException,
|
|
39
|
-
} from "@aws-sdk/types";
|
|
40
|
-
|
|
41
|
-
export const serializeAws_json1_0GetRoutingControlStateCommand = async (
|
|
42
|
-
input: GetRoutingControlStateCommandInput,
|
|
43
|
-
context: __SerdeContext
|
|
44
|
-
): Promise<__HttpRequest> => {
|
|
45
|
-
const headers: __HeaderBag = {
|
|
46
|
-
"content-type": "application/x-amz-json-1.0",
|
|
47
|
-
"x-amz-target": "ToggleCustomerAPI.GetRoutingControlState",
|
|
48
|
-
};
|
|
49
|
-
let body: any;
|
|
50
|
-
body = JSON.stringify(serializeAws_json1_0GetRoutingControlStateRequest(input, context));
|
|
51
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const serializeAws_json1_0UpdateRoutingControlStateCommand = async (
|
|
55
|
-
input: UpdateRoutingControlStateCommandInput,
|
|
56
|
-
context: __SerdeContext
|
|
57
|
-
): Promise<__HttpRequest> => {
|
|
58
|
-
const headers: __HeaderBag = {
|
|
59
|
-
"content-type": "application/x-amz-json-1.0",
|
|
60
|
-
"x-amz-target": "ToggleCustomerAPI.UpdateRoutingControlState",
|
|
61
|
-
};
|
|
62
|
-
let body: any;
|
|
63
|
-
body = JSON.stringify(serializeAws_json1_0UpdateRoutingControlStateRequest(input, context));
|
|
64
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const serializeAws_json1_0UpdateRoutingControlStatesCommand = async (
|
|
68
|
-
input: UpdateRoutingControlStatesCommandInput,
|
|
69
|
-
context: __SerdeContext
|
|
70
|
-
): Promise<__HttpRequest> => {
|
|
71
|
-
const headers: __HeaderBag = {
|
|
72
|
-
"content-type": "application/x-amz-json-1.0",
|
|
73
|
-
"x-amz-target": "ToggleCustomerAPI.UpdateRoutingControlStates",
|
|
74
|
-
};
|
|
75
|
-
let body: any;
|
|
76
|
-
body = JSON.stringify(serializeAws_json1_0UpdateRoutingControlStatesRequest(input, context));
|
|
77
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export const deserializeAws_json1_0GetRoutingControlStateCommand = async (
|
|
81
|
-
output: __HttpResponse,
|
|
82
|
-
context: __SerdeContext
|
|
83
|
-
): Promise<GetRoutingControlStateCommandOutput> => {
|
|
84
|
-
if (output.statusCode >= 300) {
|
|
85
|
-
return deserializeAws_json1_0GetRoutingControlStateCommandError(output, context);
|
|
86
|
-
}
|
|
87
|
-
const data: any = await parseBody(output.body, context);
|
|
88
|
-
let contents: any = {};
|
|
89
|
-
contents = deserializeAws_json1_0GetRoutingControlStateResponse(data, context);
|
|
90
|
-
const response: GetRoutingControlStateCommandOutput = {
|
|
91
|
-
$metadata: deserializeMetadata(output),
|
|
92
|
-
...contents,
|
|
93
|
-
};
|
|
94
|
-
return Promise.resolve(response);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
const deserializeAws_json1_0GetRoutingControlStateCommandError = async (
|
|
98
|
-
output: __HttpResponse,
|
|
99
|
-
context: __SerdeContext
|
|
100
|
-
): Promise<GetRoutingControlStateCommandOutput> => {
|
|
101
|
-
const parsedOutput: any = {
|
|
102
|
-
...output,
|
|
103
|
-
body: await parseBody(output.body, context),
|
|
104
|
-
};
|
|
105
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
106
|
-
let errorCode: string = "UnknownError";
|
|
107
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
108
|
-
switch (errorCode) {
|
|
109
|
-
case "AccessDeniedException":
|
|
110
|
-
case "com.amazonaws.route53recoverycluster#AccessDeniedException":
|
|
111
|
-
response = {
|
|
112
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
113
|
-
name: errorCode,
|
|
114
|
-
$metadata: deserializeMetadata(output),
|
|
115
|
-
};
|
|
116
|
-
break;
|
|
117
|
-
case "EndpointTemporarilyUnavailableException":
|
|
118
|
-
case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
|
|
119
|
-
response = {
|
|
120
|
-
...(await deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context)),
|
|
121
|
-
name: errorCode,
|
|
122
|
-
$metadata: deserializeMetadata(output),
|
|
123
|
-
};
|
|
124
|
-
break;
|
|
125
|
-
case "InternalServerException":
|
|
126
|
-
case "com.amazonaws.route53recoverycluster#InternalServerException":
|
|
127
|
-
response = {
|
|
128
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
129
|
-
name: errorCode,
|
|
130
|
-
$metadata: deserializeMetadata(output),
|
|
131
|
-
};
|
|
132
|
-
break;
|
|
133
|
-
case "ResourceNotFoundException":
|
|
134
|
-
case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
|
|
135
|
-
response = {
|
|
136
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
137
|
-
name: errorCode,
|
|
138
|
-
$metadata: deserializeMetadata(output),
|
|
139
|
-
};
|
|
140
|
-
break;
|
|
141
|
-
case "ThrottlingException":
|
|
142
|
-
case "com.amazonaws.route53recoverycluster#ThrottlingException":
|
|
143
|
-
response = {
|
|
144
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
145
|
-
name: errorCode,
|
|
146
|
-
$metadata: deserializeMetadata(output),
|
|
147
|
-
};
|
|
148
|
-
break;
|
|
149
|
-
case "ValidationException":
|
|
150
|
-
case "com.amazonaws.route53recoverycluster#ValidationException":
|
|
151
|
-
response = {
|
|
152
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
153
|
-
name: errorCode,
|
|
154
|
-
$metadata: deserializeMetadata(output),
|
|
155
|
-
};
|
|
156
|
-
break;
|
|
157
|
-
default:
|
|
158
|
-
const parsedBody = parsedOutput.body;
|
|
159
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
160
|
-
response = {
|
|
161
|
-
...parsedBody,
|
|
162
|
-
name: `${errorCode}`,
|
|
163
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
164
|
-
$fault: "client",
|
|
165
|
-
$metadata: deserializeMetadata(output),
|
|
166
|
-
} as any;
|
|
167
|
-
}
|
|
168
|
-
const message = response.message || response.Message || errorCode;
|
|
169
|
-
response.message = message;
|
|
170
|
-
delete response.Message;
|
|
171
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
export const deserializeAws_json1_0UpdateRoutingControlStateCommand = async (
|
|
175
|
-
output: __HttpResponse,
|
|
176
|
-
context: __SerdeContext
|
|
177
|
-
): Promise<UpdateRoutingControlStateCommandOutput> => {
|
|
178
|
-
if (output.statusCode >= 300) {
|
|
179
|
-
return deserializeAws_json1_0UpdateRoutingControlStateCommandError(output, context);
|
|
180
|
-
}
|
|
181
|
-
const data: any = await parseBody(output.body, context);
|
|
182
|
-
let contents: any = {};
|
|
183
|
-
contents = deserializeAws_json1_0UpdateRoutingControlStateResponse(data, context);
|
|
184
|
-
const response: UpdateRoutingControlStateCommandOutput = {
|
|
185
|
-
$metadata: deserializeMetadata(output),
|
|
186
|
-
...contents,
|
|
187
|
-
};
|
|
188
|
-
return Promise.resolve(response);
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
const deserializeAws_json1_0UpdateRoutingControlStateCommandError = async (
|
|
192
|
-
output: __HttpResponse,
|
|
193
|
-
context: __SerdeContext
|
|
194
|
-
): Promise<UpdateRoutingControlStateCommandOutput> => {
|
|
195
|
-
const parsedOutput: any = {
|
|
196
|
-
...output,
|
|
197
|
-
body: await parseBody(output.body, context),
|
|
198
|
-
};
|
|
199
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
200
|
-
let errorCode: string = "UnknownError";
|
|
201
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
202
|
-
switch (errorCode) {
|
|
203
|
-
case "AccessDeniedException":
|
|
204
|
-
case "com.amazonaws.route53recoverycluster#AccessDeniedException":
|
|
205
|
-
response = {
|
|
206
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
207
|
-
name: errorCode,
|
|
208
|
-
$metadata: deserializeMetadata(output),
|
|
209
|
-
};
|
|
210
|
-
break;
|
|
211
|
-
case "ConflictException":
|
|
212
|
-
case "com.amazonaws.route53recoverycluster#ConflictException":
|
|
213
|
-
response = {
|
|
214
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
215
|
-
name: errorCode,
|
|
216
|
-
$metadata: deserializeMetadata(output),
|
|
217
|
-
};
|
|
218
|
-
break;
|
|
219
|
-
case "EndpointTemporarilyUnavailableException":
|
|
220
|
-
case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
|
|
221
|
-
response = {
|
|
222
|
-
...(await deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context)),
|
|
223
|
-
name: errorCode,
|
|
224
|
-
$metadata: deserializeMetadata(output),
|
|
225
|
-
};
|
|
226
|
-
break;
|
|
227
|
-
case "InternalServerException":
|
|
228
|
-
case "com.amazonaws.route53recoverycluster#InternalServerException":
|
|
229
|
-
response = {
|
|
230
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
231
|
-
name: errorCode,
|
|
232
|
-
$metadata: deserializeMetadata(output),
|
|
233
|
-
};
|
|
234
|
-
break;
|
|
235
|
-
case "ResourceNotFoundException":
|
|
236
|
-
case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
|
|
237
|
-
response = {
|
|
238
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
239
|
-
name: errorCode,
|
|
240
|
-
$metadata: deserializeMetadata(output),
|
|
241
|
-
};
|
|
242
|
-
break;
|
|
243
|
-
case "ThrottlingException":
|
|
244
|
-
case "com.amazonaws.route53recoverycluster#ThrottlingException":
|
|
245
|
-
response = {
|
|
246
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
247
|
-
name: errorCode,
|
|
248
|
-
$metadata: deserializeMetadata(output),
|
|
249
|
-
};
|
|
250
|
-
break;
|
|
251
|
-
case "ValidationException":
|
|
252
|
-
case "com.amazonaws.route53recoverycluster#ValidationException":
|
|
253
|
-
response = {
|
|
254
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
255
|
-
name: errorCode,
|
|
256
|
-
$metadata: deserializeMetadata(output),
|
|
257
|
-
};
|
|
258
|
-
break;
|
|
259
|
-
default:
|
|
260
|
-
const parsedBody = parsedOutput.body;
|
|
261
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
262
|
-
response = {
|
|
263
|
-
...parsedBody,
|
|
264
|
-
name: `${errorCode}`,
|
|
265
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
266
|
-
$fault: "client",
|
|
267
|
-
$metadata: deserializeMetadata(output),
|
|
268
|
-
} as any;
|
|
269
|
-
}
|
|
270
|
-
const message = response.message || response.Message || errorCode;
|
|
271
|
-
response.message = message;
|
|
272
|
-
delete response.Message;
|
|
273
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
export const deserializeAws_json1_0UpdateRoutingControlStatesCommand = async (
|
|
277
|
-
output: __HttpResponse,
|
|
278
|
-
context: __SerdeContext
|
|
279
|
-
): Promise<UpdateRoutingControlStatesCommandOutput> => {
|
|
280
|
-
if (output.statusCode >= 300) {
|
|
281
|
-
return deserializeAws_json1_0UpdateRoutingControlStatesCommandError(output, context);
|
|
282
|
-
}
|
|
283
|
-
const data: any = await parseBody(output.body, context);
|
|
284
|
-
let contents: any = {};
|
|
285
|
-
contents = deserializeAws_json1_0UpdateRoutingControlStatesResponse(data, context);
|
|
286
|
-
const response: UpdateRoutingControlStatesCommandOutput = {
|
|
287
|
-
$metadata: deserializeMetadata(output),
|
|
288
|
-
...contents,
|
|
289
|
-
};
|
|
290
|
-
return Promise.resolve(response);
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
const deserializeAws_json1_0UpdateRoutingControlStatesCommandError = async (
|
|
294
|
-
output: __HttpResponse,
|
|
295
|
-
context: __SerdeContext
|
|
296
|
-
): Promise<UpdateRoutingControlStatesCommandOutput> => {
|
|
297
|
-
const parsedOutput: any = {
|
|
298
|
-
...output,
|
|
299
|
-
body: await parseBody(output.body, context),
|
|
300
|
-
};
|
|
301
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
302
|
-
let errorCode: string = "UnknownError";
|
|
303
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
304
|
-
switch (errorCode) {
|
|
305
|
-
case "AccessDeniedException":
|
|
306
|
-
case "com.amazonaws.route53recoverycluster#AccessDeniedException":
|
|
307
|
-
response = {
|
|
308
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
309
|
-
name: errorCode,
|
|
310
|
-
$metadata: deserializeMetadata(output),
|
|
311
|
-
};
|
|
312
|
-
break;
|
|
313
|
-
case "ConflictException":
|
|
314
|
-
case "com.amazonaws.route53recoverycluster#ConflictException":
|
|
315
|
-
response = {
|
|
316
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
317
|
-
name: errorCode,
|
|
318
|
-
$metadata: deserializeMetadata(output),
|
|
319
|
-
};
|
|
320
|
-
break;
|
|
321
|
-
case "EndpointTemporarilyUnavailableException":
|
|
322
|
-
case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
|
|
323
|
-
response = {
|
|
324
|
-
...(await deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context)),
|
|
325
|
-
name: errorCode,
|
|
326
|
-
$metadata: deserializeMetadata(output),
|
|
327
|
-
};
|
|
328
|
-
break;
|
|
329
|
-
case "InternalServerException":
|
|
330
|
-
case "com.amazonaws.route53recoverycluster#InternalServerException":
|
|
331
|
-
response = {
|
|
332
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
333
|
-
name: errorCode,
|
|
334
|
-
$metadata: deserializeMetadata(output),
|
|
335
|
-
};
|
|
336
|
-
break;
|
|
337
|
-
case "ResourceNotFoundException":
|
|
338
|
-
case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
|
|
339
|
-
response = {
|
|
340
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
341
|
-
name: errorCode,
|
|
342
|
-
$metadata: deserializeMetadata(output),
|
|
343
|
-
};
|
|
344
|
-
break;
|
|
345
|
-
case "ThrottlingException":
|
|
346
|
-
case "com.amazonaws.route53recoverycluster#ThrottlingException":
|
|
347
|
-
response = {
|
|
348
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
349
|
-
name: errorCode,
|
|
350
|
-
$metadata: deserializeMetadata(output),
|
|
351
|
-
};
|
|
352
|
-
break;
|
|
353
|
-
case "ValidationException":
|
|
354
|
-
case "com.amazonaws.route53recoverycluster#ValidationException":
|
|
355
|
-
response = {
|
|
356
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
357
|
-
name: errorCode,
|
|
358
|
-
$metadata: deserializeMetadata(output),
|
|
359
|
-
};
|
|
360
|
-
break;
|
|
361
|
-
default:
|
|
362
|
-
const parsedBody = parsedOutput.body;
|
|
363
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
364
|
-
response = {
|
|
365
|
-
...parsedBody,
|
|
366
|
-
name: `${errorCode}`,
|
|
367
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
368
|
-
$fault: "client",
|
|
369
|
-
$metadata: deserializeMetadata(output),
|
|
370
|
-
} as any;
|
|
371
|
-
}
|
|
372
|
-
const message = response.message || response.Message || errorCode;
|
|
373
|
-
response.message = message;
|
|
374
|
-
delete response.Message;
|
|
375
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
376
|
-
};
|
|
377
|
-
|
|
378
|
-
const deserializeAws_json1_0AccessDeniedExceptionResponse = async (
|
|
379
|
-
parsedOutput: any,
|
|
380
|
-
context: __SerdeContext
|
|
381
|
-
): Promise<AccessDeniedException> => {
|
|
382
|
-
const body = parsedOutput.body;
|
|
383
|
-
const deserialized: any = deserializeAws_json1_0AccessDeniedException(body, context);
|
|
384
|
-
const contents: AccessDeniedException = {
|
|
385
|
-
name: "AccessDeniedException",
|
|
386
|
-
$fault: "client",
|
|
387
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
388
|
-
...deserialized,
|
|
389
|
-
};
|
|
390
|
-
return contents;
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
const deserializeAws_json1_0ConflictExceptionResponse = async (
|
|
394
|
-
parsedOutput: any,
|
|
395
|
-
context: __SerdeContext
|
|
396
|
-
): Promise<ConflictException> => {
|
|
397
|
-
const body = parsedOutput.body;
|
|
398
|
-
const deserialized: any = deserializeAws_json1_0ConflictException(body, context);
|
|
399
|
-
const contents: ConflictException = {
|
|
400
|
-
name: "ConflictException",
|
|
401
|
-
$fault: "client",
|
|
402
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
403
|
-
...deserialized,
|
|
404
|
-
};
|
|
405
|
-
return contents;
|
|
406
|
-
};
|
|
407
|
-
|
|
408
|
-
const deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse = async (
|
|
409
|
-
parsedOutput: any,
|
|
410
|
-
context: __SerdeContext
|
|
411
|
-
): Promise<EndpointTemporarilyUnavailableException> => {
|
|
412
|
-
const body = parsedOutput.body;
|
|
413
|
-
const deserialized: any = deserializeAws_json1_0EndpointTemporarilyUnavailableException(body, context);
|
|
414
|
-
const contents: EndpointTemporarilyUnavailableException = {
|
|
415
|
-
name: "EndpointTemporarilyUnavailableException",
|
|
416
|
-
$fault: "server",
|
|
417
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
418
|
-
...deserialized,
|
|
419
|
-
};
|
|
420
|
-
return contents;
|
|
421
|
-
};
|
|
422
|
-
|
|
423
|
-
const deserializeAws_json1_0InternalServerExceptionResponse = async (
|
|
424
|
-
parsedOutput: any,
|
|
425
|
-
context: __SerdeContext
|
|
426
|
-
): Promise<InternalServerException> => {
|
|
427
|
-
const body = parsedOutput.body;
|
|
428
|
-
const deserialized: any = deserializeAws_json1_0InternalServerException(body, context);
|
|
429
|
-
const contents: InternalServerException = {
|
|
430
|
-
name: "InternalServerException",
|
|
431
|
-
$fault: "server",
|
|
432
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
433
|
-
...deserialized,
|
|
434
|
-
};
|
|
435
|
-
return contents;
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (
|
|
439
|
-
parsedOutput: any,
|
|
440
|
-
context: __SerdeContext
|
|
441
|
-
): Promise<ResourceNotFoundException> => {
|
|
442
|
-
const body = parsedOutput.body;
|
|
443
|
-
const deserialized: any = deserializeAws_json1_0ResourceNotFoundException(body, context);
|
|
444
|
-
const contents: ResourceNotFoundException = {
|
|
445
|
-
name: "ResourceNotFoundException",
|
|
446
|
-
$fault: "client",
|
|
447
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
448
|
-
...deserialized,
|
|
449
|
-
};
|
|
450
|
-
return contents;
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
const deserializeAws_json1_0ThrottlingExceptionResponse = async (
|
|
454
|
-
parsedOutput: any,
|
|
455
|
-
context: __SerdeContext
|
|
456
|
-
): Promise<ThrottlingException> => {
|
|
457
|
-
const body = parsedOutput.body;
|
|
458
|
-
const deserialized: any = deserializeAws_json1_0ThrottlingException(body, context);
|
|
459
|
-
const contents: ThrottlingException = {
|
|
460
|
-
name: "ThrottlingException",
|
|
461
|
-
$fault: "client",
|
|
462
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
463
|
-
...deserialized,
|
|
464
|
-
};
|
|
465
|
-
return contents;
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
const deserializeAws_json1_0ValidationExceptionResponse = async (
|
|
469
|
-
parsedOutput: any,
|
|
470
|
-
context: __SerdeContext
|
|
471
|
-
): Promise<ValidationException> => {
|
|
472
|
-
const body = parsedOutput.body;
|
|
473
|
-
const deserialized: any = deserializeAws_json1_0ValidationException(body, context);
|
|
474
|
-
const contents: ValidationException = {
|
|
475
|
-
name: "ValidationException",
|
|
476
|
-
$fault: "client",
|
|
477
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
478
|
-
...deserialized,
|
|
479
|
-
};
|
|
480
|
-
return contents;
|
|
481
|
-
};
|
|
482
|
-
|
|
483
|
-
const serializeAws_json1_0GetRoutingControlStateRequest = (
|
|
484
|
-
input: GetRoutingControlStateRequest,
|
|
485
|
-
context: __SerdeContext
|
|
486
|
-
): any => {
|
|
487
|
-
return {
|
|
488
|
-
...(input.RoutingControlArn !== undefined &&
|
|
489
|
-
input.RoutingControlArn !== null && { RoutingControlArn: input.RoutingControlArn }),
|
|
490
|
-
};
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
const serializeAws_json1_0UpdateRoutingControlStateEntries = (
|
|
494
|
-
input: UpdateRoutingControlStateEntry[],
|
|
495
|
-
context: __SerdeContext
|
|
496
|
-
): any => {
|
|
497
|
-
return input
|
|
498
|
-
.filter((e: any) => e != null)
|
|
499
|
-
.map((entry) => {
|
|
500
|
-
if (entry === null) {
|
|
501
|
-
return null as any;
|
|
502
|
-
}
|
|
503
|
-
return serializeAws_json1_0UpdateRoutingControlStateEntry(entry, context);
|
|
504
|
-
});
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
const serializeAws_json1_0UpdateRoutingControlStateEntry = (
|
|
508
|
-
input: UpdateRoutingControlStateEntry,
|
|
509
|
-
context: __SerdeContext
|
|
510
|
-
): any => {
|
|
511
|
-
return {
|
|
512
|
-
...(input.RoutingControlArn !== undefined &&
|
|
513
|
-
input.RoutingControlArn !== null && { RoutingControlArn: input.RoutingControlArn }),
|
|
514
|
-
...(input.RoutingControlState !== undefined &&
|
|
515
|
-
input.RoutingControlState !== null && { RoutingControlState: input.RoutingControlState }),
|
|
516
|
-
};
|
|
517
|
-
};
|
|
518
|
-
|
|
519
|
-
const serializeAws_json1_0UpdateRoutingControlStateRequest = (
|
|
520
|
-
input: UpdateRoutingControlStateRequest,
|
|
521
|
-
context: __SerdeContext
|
|
522
|
-
): any => {
|
|
523
|
-
return {
|
|
524
|
-
...(input.RoutingControlArn !== undefined &&
|
|
525
|
-
input.RoutingControlArn !== null && { RoutingControlArn: input.RoutingControlArn }),
|
|
526
|
-
...(input.RoutingControlState !== undefined &&
|
|
527
|
-
input.RoutingControlState !== null && { RoutingControlState: input.RoutingControlState }),
|
|
528
|
-
};
|
|
529
|
-
};
|
|
530
|
-
|
|
531
|
-
const serializeAws_json1_0UpdateRoutingControlStatesRequest = (
|
|
532
|
-
input: UpdateRoutingControlStatesRequest,
|
|
533
|
-
context: __SerdeContext
|
|
534
|
-
): any => {
|
|
535
|
-
return {
|
|
536
|
-
...(input.UpdateRoutingControlStateEntries !== undefined &&
|
|
537
|
-
input.UpdateRoutingControlStateEntries !== null && {
|
|
538
|
-
UpdateRoutingControlStateEntries: serializeAws_json1_0UpdateRoutingControlStateEntries(
|
|
539
|
-
input.UpdateRoutingControlStateEntries,
|
|
540
|
-
context
|
|
541
|
-
),
|
|
542
|
-
}),
|
|
543
|
-
};
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
const deserializeAws_json1_0AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => {
|
|
547
|
-
return {
|
|
548
|
-
message: __expectString(output.message),
|
|
549
|
-
} as any;
|
|
550
|
-
};
|
|
551
|
-
|
|
552
|
-
const deserializeAws_json1_0ConflictException = (output: any, context: __SerdeContext): ConflictException => {
|
|
553
|
-
return {
|
|
554
|
-
message: __expectString(output.message),
|
|
555
|
-
resourceId: __expectString(output.resourceId),
|
|
556
|
-
resourceType: __expectString(output.resourceType),
|
|
557
|
-
} as any;
|
|
558
|
-
};
|
|
559
|
-
|
|
560
|
-
const deserializeAws_json1_0EndpointTemporarilyUnavailableException = (
|
|
561
|
-
output: any,
|
|
562
|
-
context: __SerdeContext
|
|
563
|
-
): EndpointTemporarilyUnavailableException => {
|
|
564
|
-
return {
|
|
565
|
-
message: __expectString(output.message),
|
|
566
|
-
} as any;
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
const deserializeAws_json1_0GetRoutingControlStateResponse = (
|
|
570
|
-
output: any,
|
|
571
|
-
context: __SerdeContext
|
|
572
|
-
): GetRoutingControlStateResponse => {
|
|
573
|
-
return {
|
|
574
|
-
RoutingControlArn: __expectString(output.RoutingControlArn),
|
|
575
|
-
RoutingControlState: __expectString(output.RoutingControlState),
|
|
576
|
-
} as any;
|
|
577
|
-
};
|
|
578
|
-
|
|
579
|
-
const deserializeAws_json1_0InternalServerException = (
|
|
580
|
-
output: any,
|
|
581
|
-
context: __SerdeContext
|
|
582
|
-
): InternalServerException => {
|
|
583
|
-
return {
|
|
584
|
-
message: __expectString(output.message),
|
|
585
|
-
retryAfterSeconds: __expectInt32(output.retryAfterSeconds),
|
|
586
|
-
} as any;
|
|
587
|
-
};
|
|
588
|
-
|
|
589
|
-
const deserializeAws_json1_0ResourceNotFoundException = (
|
|
590
|
-
output: any,
|
|
591
|
-
context: __SerdeContext
|
|
592
|
-
): ResourceNotFoundException => {
|
|
593
|
-
return {
|
|
594
|
-
message: __expectString(output.message),
|
|
595
|
-
resourceId: __expectString(output.resourceId),
|
|
596
|
-
resourceType: __expectString(output.resourceType),
|
|
597
|
-
} as any;
|
|
598
|
-
};
|
|
599
|
-
|
|
600
|
-
const deserializeAws_json1_0ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => {
|
|
601
|
-
return {
|
|
602
|
-
message: __expectString(output.message),
|
|
603
|
-
retryAfterSeconds: __expectInt32(output.retryAfterSeconds),
|
|
604
|
-
} as any;
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
const deserializeAws_json1_0UpdateRoutingControlStateResponse = (
|
|
608
|
-
output: any,
|
|
609
|
-
context: __SerdeContext
|
|
610
|
-
): UpdateRoutingControlStateResponse => {
|
|
611
|
-
return {} as any;
|
|
612
|
-
};
|
|
613
|
-
|
|
614
|
-
const deserializeAws_json1_0UpdateRoutingControlStatesResponse = (
|
|
615
|
-
output: any,
|
|
616
|
-
context: __SerdeContext
|
|
617
|
-
): UpdateRoutingControlStatesResponse => {
|
|
618
|
-
return {} as any;
|
|
619
|
-
};
|
|
620
|
-
|
|
621
|
-
const deserializeAws_json1_0ValidationException = (output: any, context: __SerdeContext): ValidationException => {
|
|
622
|
-
return {
|
|
623
|
-
fields:
|
|
624
|
-
output.fields !== undefined && output.fields !== null
|
|
625
|
-
? deserializeAws_json1_0ValidationExceptionFieldList(output.fields, context)
|
|
626
|
-
: undefined,
|
|
627
|
-
message: __expectString(output.message),
|
|
628
|
-
reason: __expectString(output.reason),
|
|
629
|
-
} as any;
|
|
630
|
-
};
|
|
631
|
-
|
|
632
|
-
const deserializeAws_json1_0ValidationExceptionField = (
|
|
633
|
-
output: any,
|
|
634
|
-
context: __SerdeContext
|
|
635
|
-
): ValidationExceptionField => {
|
|
636
|
-
return {
|
|
637
|
-
message: __expectString(output.message),
|
|
638
|
-
name: __expectString(output.name),
|
|
639
|
-
} as any;
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
const deserializeAws_json1_0ValidationExceptionFieldList = (
|
|
643
|
-
output: any,
|
|
644
|
-
context: __SerdeContext
|
|
645
|
-
): ValidationExceptionField[] => {
|
|
646
|
-
return (output || [])
|
|
647
|
-
.filter((e: any) => e != null)
|
|
648
|
-
.map((entry: any) => {
|
|
649
|
-
if (entry === null) {
|
|
650
|
-
return null as any;
|
|
651
|
-
}
|
|
652
|
-
return deserializeAws_json1_0ValidationExceptionField(entry, context);
|
|
653
|
-
});
|
|
654
|
-
};
|
|
655
|
-
|
|
656
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
657
|
-
httpStatusCode: output.statusCode,
|
|
658
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
659
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
660
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
661
|
-
});
|
|
662
|
-
|
|
663
|
-
// Collect low-level response body stream to Uint8Array.
|
|
664
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
665
|
-
if (streamBody instanceof Uint8Array) {
|
|
666
|
-
return Promise.resolve(streamBody);
|
|
667
|
-
}
|
|
668
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
669
|
-
};
|
|
670
|
-
|
|
671
|
-
// Encode Uint8Array data into string with utf-8.
|
|
672
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
673
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
674
|
-
|
|
675
|
-
const buildHttpRpcRequest = async (
|
|
676
|
-
context: __SerdeContext,
|
|
677
|
-
headers: __HeaderBag,
|
|
678
|
-
path: string,
|
|
679
|
-
resolvedHostname: string | undefined,
|
|
680
|
-
body: any
|
|
681
|
-
): Promise<__HttpRequest> => {
|
|
682
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
683
|
-
const contents: any = {
|
|
684
|
-
protocol,
|
|
685
|
-
hostname,
|
|
686
|
-
port,
|
|
687
|
-
method: "POST",
|
|
688
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
689
|
-
headers,
|
|
690
|
-
};
|
|
691
|
-
if (resolvedHostname !== undefined) {
|
|
692
|
-
contents.hostname = resolvedHostname;
|
|
693
|
-
}
|
|
694
|
-
if (body !== undefined) {
|
|
695
|
-
contents.body = body;
|
|
696
|
-
}
|
|
697
|
-
return new __HttpRequest(contents);
|
|
698
|
-
};
|
|
699
|
-
|
|
700
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
701
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
702
|
-
if (encoded.length) {
|
|
703
|
-
return JSON.parse(encoded);
|
|
704
|
-
}
|
|
705
|
-
return {};
|
|
706
|
-
});
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
710
|
-
*/
|
|
711
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
712
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
713
|
-
|
|
714
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
715
|
-
let cleanValue = rawValue;
|
|
716
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
717
|
-
cleanValue = cleanValue.split(":")[0];
|
|
718
|
-
}
|
|
719
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
720
|
-
cleanValue = cleanValue.split("#")[1];
|
|
721
|
-
}
|
|
722
|
-
return cleanValue;
|
|
723
|
-
};
|
|
724
|
-
|
|
725
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
726
|
-
if (headerKey !== undefined) {
|
|
727
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
if (data.code !== undefined) {
|
|
731
|
-
return sanitizeErrorCode(data.code);
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
if (data["__type"] !== undefined) {
|
|
735
|
-
return sanitizeErrorCode(data["__type"]);
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
return "";
|
|
739
|
-
};
|