@aws-sdk/client-servicediscovery 3.186.0 → 3.190.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 +16 -0
- package/dist-es/ServiceDiscovery.js +106 -113
- package/dist-es/ServiceDiscoveryClient.js +22 -28
- package/dist-es/commands/CreateHttpNamespaceCommand.js +21 -28
- package/dist-es/commands/CreatePrivateDnsNamespaceCommand.js +21 -28
- package/dist-es/commands/CreatePublicDnsNamespaceCommand.js +21 -28
- package/dist-es/commands/CreateServiceCommand.js +21 -28
- package/dist-es/commands/DeleteNamespaceCommand.js +21 -28
- package/dist-es/commands/DeleteServiceCommand.js +21 -28
- package/dist-es/commands/DeregisterInstanceCommand.js +21 -28
- package/dist-es/commands/DiscoverInstancesCommand.js +21 -28
- package/dist-es/commands/GetInstanceCommand.js +21 -28
- package/dist-es/commands/GetInstancesHealthStatusCommand.js +21 -28
- package/dist-es/commands/GetNamespaceCommand.js +21 -28
- package/dist-es/commands/GetOperationCommand.js +21 -28
- package/dist-es/commands/GetServiceCommand.js +21 -28
- package/dist-es/commands/ListInstancesCommand.js +21 -28
- package/dist-es/commands/ListNamespacesCommand.js +21 -28
- package/dist-es/commands/ListOperationsCommand.js +21 -28
- package/dist-es/commands/ListServicesCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/RegisterInstanceCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateHttpNamespaceCommand.js +21 -28
- package/dist-es/commands/UpdateInstanceCustomHealthStatusCommand.js +22 -29
- package/dist-es/commands/UpdatePrivateDnsNamespaceCommand.js +21 -28
- package/dist-es/commands/UpdatePublicDnsNamespaceCommand.js +21 -28
- package/dist-es/commands/UpdateServiceCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ServiceDiscoveryServiceException.js +5 -10
- package/dist-es/models/models_0.js +432 -261
- package/dist-es/pagination/GetInstancesHealthStatusPaginator.js +25 -68
- package/dist-es/pagination/ListInstancesPaginator.js +25 -68
- package/dist-es/pagination/ListNamespacesPaginator.js +25 -68
- package/dist-es/pagination/ListOperationsPaginator.js +25 -68
- package/dist-es/pagination/ListServicesPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +1863 -2311
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,2318 +1,1891 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
4
|
import { CustomHealthNotFound, DuplicateRequest, InstanceNotFound, InvalidInput, NamespaceAlreadyExists, NamespaceNotFound, OperationNotFound, RequestLimitExceeded, ResourceInUse, ResourceLimitExceeded, ResourceNotFoundException, ServiceAlreadyExists, ServiceNotFound, TooManyTagsException, } from "../models/models_0";
|
|
6
5
|
import { ServiceDiscoveryServiceException as __BaseException } from "../models/ServiceDiscoveryServiceException";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
});
|
|
83
|
-
}); };
|
|
84
|
-
export var serializeAws_json1_1DiscoverInstancesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
85
|
-
var headers, body, resolvedHostname;
|
|
86
|
-
return __generator(this, function (_a) {
|
|
87
|
-
switch (_a.label) {
|
|
88
|
-
case 0:
|
|
89
|
-
headers = {
|
|
90
|
-
"content-type": "application/x-amz-json-1.1",
|
|
91
|
-
"x-amz-target": "Route53AutoNaming_v20170314.DiscoverInstances",
|
|
92
|
-
};
|
|
93
|
-
body = JSON.stringify(serializeAws_json1_1DiscoverInstancesRequest(input, context));
|
|
94
|
-
return [4, context.endpoint()];
|
|
95
|
-
case 1:
|
|
96
|
-
resolvedHostname = (_a.sent()).hostname;
|
|
97
|
-
if (context.disableHostPrefix !== true) {
|
|
98
|
-
resolvedHostname = "data-" + resolvedHostname;
|
|
99
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
100
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return [2, buildHttpRpcRequest(context, headers, "/", resolvedHostname, body)];
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}); };
|
|
107
|
-
export var serializeAws_json1_1GetInstanceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
108
|
-
var headers, body;
|
|
109
|
-
return __generator(this, function (_a) {
|
|
110
|
-
headers = {
|
|
111
|
-
"content-type": "application/x-amz-json-1.1",
|
|
112
|
-
"x-amz-target": "Route53AutoNaming_v20170314.GetInstance",
|
|
113
|
-
};
|
|
114
|
-
body = JSON.stringify(serializeAws_json1_1GetInstanceRequest(input, context));
|
|
115
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
116
|
-
});
|
|
117
|
-
}); };
|
|
118
|
-
export var serializeAws_json1_1GetInstancesHealthStatusCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
119
|
-
var headers, body;
|
|
120
|
-
return __generator(this, function (_a) {
|
|
121
|
-
headers = {
|
|
122
|
-
"content-type": "application/x-amz-json-1.1",
|
|
123
|
-
"x-amz-target": "Route53AutoNaming_v20170314.GetInstancesHealthStatus",
|
|
124
|
-
};
|
|
125
|
-
body = JSON.stringify(serializeAws_json1_1GetInstancesHealthStatusRequest(input, context));
|
|
126
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
127
|
-
});
|
|
128
|
-
}); };
|
|
129
|
-
export var serializeAws_json1_1GetNamespaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
130
|
-
var headers, body;
|
|
131
|
-
return __generator(this, function (_a) {
|
|
132
|
-
headers = {
|
|
133
|
-
"content-type": "application/x-amz-json-1.1",
|
|
134
|
-
"x-amz-target": "Route53AutoNaming_v20170314.GetNamespace",
|
|
135
|
-
};
|
|
136
|
-
body = JSON.stringify(serializeAws_json1_1GetNamespaceRequest(input, context));
|
|
137
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
138
|
-
});
|
|
139
|
-
}); };
|
|
140
|
-
export var serializeAws_json1_1GetOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
141
|
-
var headers, body;
|
|
142
|
-
return __generator(this, function (_a) {
|
|
143
|
-
headers = {
|
|
144
|
-
"content-type": "application/x-amz-json-1.1",
|
|
145
|
-
"x-amz-target": "Route53AutoNaming_v20170314.GetOperation",
|
|
146
|
-
};
|
|
147
|
-
body = JSON.stringify(serializeAws_json1_1GetOperationRequest(input, context));
|
|
148
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
149
|
-
});
|
|
150
|
-
}); };
|
|
151
|
-
export var serializeAws_json1_1GetServiceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
152
|
-
var headers, body;
|
|
153
|
-
return __generator(this, function (_a) {
|
|
154
|
-
headers = {
|
|
155
|
-
"content-type": "application/x-amz-json-1.1",
|
|
156
|
-
"x-amz-target": "Route53AutoNaming_v20170314.GetService",
|
|
157
|
-
};
|
|
158
|
-
body = JSON.stringify(serializeAws_json1_1GetServiceRequest(input, context));
|
|
159
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
160
|
-
});
|
|
161
|
-
}); };
|
|
162
|
-
export var serializeAws_json1_1ListInstancesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
163
|
-
var headers, body;
|
|
164
|
-
return __generator(this, function (_a) {
|
|
165
|
-
headers = {
|
|
166
|
-
"content-type": "application/x-amz-json-1.1",
|
|
167
|
-
"x-amz-target": "Route53AutoNaming_v20170314.ListInstances",
|
|
168
|
-
};
|
|
169
|
-
body = JSON.stringify(serializeAws_json1_1ListInstancesRequest(input, context));
|
|
170
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
171
|
-
});
|
|
172
|
-
}); };
|
|
173
|
-
export var serializeAws_json1_1ListNamespacesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
174
|
-
var headers, body;
|
|
175
|
-
return __generator(this, function (_a) {
|
|
176
|
-
headers = {
|
|
177
|
-
"content-type": "application/x-amz-json-1.1",
|
|
178
|
-
"x-amz-target": "Route53AutoNaming_v20170314.ListNamespaces",
|
|
179
|
-
};
|
|
180
|
-
body = JSON.stringify(serializeAws_json1_1ListNamespacesRequest(input, context));
|
|
181
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
182
|
-
});
|
|
183
|
-
}); };
|
|
184
|
-
export var serializeAws_json1_1ListOperationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
185
|
-
var headers, body;
|
|
186
|
-
return __generator(this, function (_a) {
|
|
187
|
-
headers = {
|
|
188
|
-
"content-type": "application/x-amz-json-1.1",
|
|
189
|
-
"x-amz-target": "Route53AutoNaming_v20170314.ListOperations",
|
|
190
|
-
};
|
|
191
|
-
body = JSON.stringify(serializeAws_json1_1ListOperationsRequest(input, context));
|
|
192
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
193
|
-
});
|
|
194
|
-
}); };
|
|
195
|
-
export var serializeAws_json1_1ListServicesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
196
|
-
var headers, body;
|
|
197
|
-
return __generator(this, function (_a) {
|
|
198
|
-
headers = {
|
|
199
|
-
"content-type": "application/x-amz-json-1.1",
|
|
200
|
-
"x-amz-target": "Route53AutoNaming_v20170314.ListServices",
|
|
201
|
-
};
|
|
202
|
-
body = JSON.stringify(serializeAws_json1_1ListServicesRequest(input, context));
|
|
203
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
204
|
-
});
|
|
205
|
-
}); };
|
|
206
|
-
export var serializeAws_json1_1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
207
|
-
var headers, body;
|
|
208
|
-
return __generator(this, function (_a) {
|
|
209
|
-
headers = {
|
|
210
|
-
"content-type": "application/x-amz-json-1.1",
|
|
211
|
-
"x-amz-target": "Route53AutoNaming_v20170314.ListTagsForResource",
|
|
212
|
-
};
|
|
213
|
-
body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
|
|
214
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
215
|
-
});
|
|
216
|
-
}); };
|
|
217
|
-
export var serializeAws_json1_1RegisterInstanceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
218
|
-
var headers, body;
|
|
219
|
-
return __generator(this, function (_a) {
|
|
220
|
-
headers = {
|
|
221
|
-
"content-type": "application/x-amz-json-1.1",
|
|
222
|
-
"x-amz-target": "Route53AutoNaming_v20170314.RegisterInstance",
|
|
223
|
-
};
|
|
224
|
-
body = JSON.stringify(serializeAws_json1_1RegisterInstanceRequest(input, context));
|
|
225
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
226
|
-
});
|
|
227
|
-
}); };
|
|
228
|
-
export var serializeAws_json1_1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
229
|
-
var headers, body;
|
|
230
|
-
return __generator(this, function (_a) {
|
|
231
|
-
headers = {
|
|
232
|
-
"content-type": "application/x-amz-json-1.1",
|
|
233
|
-
"x-amz-target": "Route53AutoNaming_v20170314.TagResource",
|
|
234
|
-
};
|
|
235
|
-
body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
|
|
236
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
237
|
-
});
|
|
238
|
-
}); };
|
|
239
|
-
export var serializeAws_json1_1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
240
|
-
var headers, body;
|
|
241
|
-
return __generator(this, function (_a) {
|
|
242
|
-
headers = {
|
|
243
|
-
"content-type": "application/x-amz-json-1.1",
|
|
244
|
-
"x-amz-target": "Route53AutoNaming_v20170314.UntagResource",
|
|
245
|
-
};
|
|
246
|
-
body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
|
|
247
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
248
|
-
});
|
|
249
|
-
}); };
|
|
250
|
-
export var serializeAws_json1_1UpdateHttpNamespaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
251
|
-
var headers, body;
|
|
252
|
-
return __generator(this, function (_a) {
|
|
253
|
-
headers = {
|
|
254
|
-
"content-type": "application/x-amz-json-1.1",
|
|
255
|
-
"x-amz-target": "Route53AutoNaming_v20170314.UpdateHttpNamespace",
|
|
256
|
-
};
|
|
257
|
-
body = JSON.stringify(serializeAws_json1_1UpdateHttpNamespaceRequest(input, context));
|
|
258
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
259
|
-
});
|
|
260
|
-
}); };
|
|
261
|
-
export var serializeAws_json1_1UpdateInstanceCustomHealthStatusCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
262
|
-
var headers, body;
|
|
263
|
-
return __generator(this, function (_a) {
|
|
264
|
-
headers = {
|
|
265
|
-
"content-type": "application/x-amz-json-1.1",
|
|
266
|
-
"x-amz-target": "Route53AutoNaming_v20170314.UpdateInstanceCustomHealthStatus",
|
|
267
|
-
};
|
|
268
|
-
body = JSON.stringify(serializeAws_json1_1UpdateInstanceCustomHealthStatusRequest(input, context));
|
|
269
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
270
|
-
});
|
|
271
|
-
}); };
|
|
272
|
-
export var serializeAws_json1_1UpdatePrivateDnsNamespaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
273
|
-
var headers, body;
|
|
274
|
-
return __generator(this, function (_a) {
|
|
275
|
-
headers = {
|
|
276
|
-
"content-type": "application/x-amz-json-1.1",
|
|
277
|
-
"x-amz-target": "Route53AutoNaming_v20170314.UpdatePrivateDnsNamespace",
|
|
278
|
-
};
|
|
279
|
-
body = JSON.stringify(serializeAws_json1_1UpdatePrivateDnsNamespaceRequest(input, context));
|
|
280
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
281
|
-
});
|
|
282
|
-
}); };
|
|
283
|
-
export var serializeAws_json1_1UpdatePublicDnsNamespaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
284
|
-
var headers, body;
|
|
285
|
-
return __generator(this, function (_a) {
|
|
286
|
-
headers = {
|
|
287
|
-
"content-type": "application/x-amz-json-1.1",
|
|
288
|
-
"x-amz-target": "Route53AutoNaming_v20170314.UpdatePublicDnsNamespace",
|
|
289
|
-
};
|
|
290
|
-
body = JSON.stringify(serializeAws_json1_1UpdatePublicDnsNamespaceRequest(input, context));
|
|
291
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
292
|
-
});
|
|
293
|
-
}); };
|
|
294
|
-
export var serializeAws_json1_1UpdateServiceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
295
|
-
var headers, body;
|
|
296
|
-
return __generator(this, function (_a) {
|
|
297
|
-
headers = {
|
|
298
|
-
"content-type": "application/x-amz-json-1.1",
|
|
299
|
-
"x-amz-target": "Route53AutoNaming_v20170314.UpdateService",
|
|
300
|
-
};
|
|
301
|
-
body = JSON.stringify(serializeAws_json1_1UpdateServiceRequest(input, context));
|
|
302
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
303
|
-
});
|
|
304
|
-
}); };
|
|
305
|
-
export var deserializeAws_json1_1CreateHttpNamespaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
306
|
-
var data, contents, response;
|
|
307
|
-
return __generator(this, function (_a) {
|
|
308
|
-
switch (_a.label) {
|
|
309
|
-
case 0:
|
|
310
|
-
if (output.statusCode >= 300) {
|
|
311
|
-
return [2, deserializeAws_json1_1CreateHttpNamespaceCommandError(output, context)];
|
|
312
|
-
}
|
|
313
|
-
return [4, parseBody(output.body, context)];
|
|
314
|
-
case 1:
|
|
315
|
-
data = _a.sent();
|
|
316
|
-
contents = {};
|
|
317
|
-
contents = deserializeAws_json1_1CreateHttpNamespaceResponse(data, context);
|
|
318
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
319
|
-
return [2, Promise.resolve(response)];
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
}); };
|
|
323
|
-
var deserializeAws_json1_1CreateHttpNamespaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
324
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
325
|
-
var _c;
|
|
326
|
-
return __generator(this, function (_d) {
|
|
327
|
-
switch (_d.label) {
|
|
328
|
-
case 0:
|
|
329
|
-
_a = [__assign({}, output)];
|
|
330
|
-
_c = {};
|
|
331
|
-
return [4, parseErrorBody(output.body, context)];
|
|
332
|
-
case 1:
|
|
333
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
334
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
335
|
-
_b = errorCode;
|
|
336
|
-
switch (_b) {
|
|
337
|
-
case "DuplicateRequest": return [3, 2];
|
|
338
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest": return [3, 2];
|
|
339
|
-
case "InvalidInput": return [3, 4];
|
|
340
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 4];
|
|
341
|
-
case "NamespaceAlreadyExists": return [3, 6];
|
|
342
|
-
case "com.amazonaws.servicediscovery#NamespaceAlreadyExists": return [3, 6];
|
|
343
|
-
case "ResourceLimitExceeded": return [3, 8];
|
|
344
|
-
case "com.amazonaws.servicediscovery#ResourceLimitExceeded": return [3, 8];
|
|
345
|
-
case "TooManyTagsException": return [3, 10];
|
|
346
|
-
case "com.amazonaws.servicediscovery#TooManyTagsException": return [3, 10];
|
|
347
|
-
}
|
|
348
|
-
return [3, 12];
|
|
349
|
-
case 2: return [4, deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context)];
|
|
350
|
-
case 3: throw _d.sent();
|
|
351
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
352
|
-
case 5: throw _d.sent();
|
|
353
|
-
case 6: return [4, deserializeAws_json1_1NamespaceAlreadyExistsResponse(parsedOutput, context)];
|
|
354
|
-
case 7: throw _d.sent();
|
|
355
|
-
case 8: return [4, deserializeAws_json1_1ResourceLimitExceededResponse(parsedOutput, context)];
|
|
356
|
-
case 9: throw _d.sent();
|
|
357
|
-
case 10: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
|
|
358
|
-
case 11: throw _d.sent();
|
|
359
|
-
case 12:
|
|
360
|
-
parsedBody = parsedOutput.body;
|
|
361
|
-
throwDefaultError({
|
|
362
|
-
output: output,
|
|
363
|
-
parsedBody: parsedBody,
|
|
364
|
-
exceptionCtor: __BaseException,
|
|
365
|
-
errorCode: errorCode,
|
|
366
|
-
});
|
|
367
|
-
_d.label = 13;
|
|
368
|
-
case 13: return [2];
|
|
369
|
-
}
|
|
370
|
-
});
|
|
371
|
-
}); };
|
|
372
|
-
export var deserializeAws_json1_1CreatePrivateDnsNamespaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
373
|
-
var data, contents, response;
|
|
374
|
-
return __generator(this, function (_a) {
|
|
375
|
-
switch (_a.label) {
|
|
376
|
-
case 0:
|
|
377
|
-
if (output.statusCode >= 300) {
|
|
378
|
-
return [2, deserializeAws_json1_1CreatePrivateDnsNamespaceCommandError(output, context)];
|
|
379
|
-
}
|
|
380
|
-
return [4, parseBody(output.body, context)];
|
|
381
|
-
case 1:
|
|
382
|
-
data = _a.sent();
|
|
383
|
-
contents = {};
|
|
384
|
-
contents = deserializeAws_json1_1CreatePrivateDnsNamespaceResponse(data, context);
|
|
385
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
386
|
-
return [2, Promise.resolve(response)];
|
|
387
|
-
}
|
|
388
|
-
});
|
|
389
|
-
}); };
|
|
390
|
-
var deserializeAws_json1_1CreatePrivateDnsNamespaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
391
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
392
|
-
var _c;
|
|
393
|
-
return __generator(this, function (_d) {
|
|
394
|
-
switch (_d.label) {
|
|
395
|
-
case 0:
|
|
396
|
-
_a = [__assign({}, output)];
|
|
397
|
-
_c = {};
|
|
398
|
-
return [4, parseErrorBody(output.body, context)];
|
|
399
|
-
case 1:
|
|
400
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
401
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
402
|
-
_b = errorCode;
|
|
403
|
-
switch (_b) {
|
|
404
|
-
case "DuplicateRequest": return [3, 2];
|
|
405
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest": return [3, 2];
|
|
406
|
-
case "InvalidInput": return [3, 4];
|
|
407
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 4];
|
|
408
|
-
case "NamespaceAlreadyExists": return [3, 6];
|
|
409
|
-
case "com.amazonaws.servicediscovery#NamespaceAlreadyExists": return [3, 6];
|
|
410
|
-
case "ResourceLimitExceeded": return [3, 8];
|
|
411
|
-
case "com.amazonaws.servicediscovery#ResourceLimitExceeded": return [3, 8];
|
|
412
|
-
case "TooManyTagsException": return [3, 10];
|
|
413
|
-
case "com.amazonaws.servicediscovery#TooManyTagsException": return [3, 10];
|
|
414
|
-
}
|
|
415
|
-
return [3, 12];
|
|
416
|
-
case 2: return [4, deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context)];
|
|
417
|
-
case 3: throw _d.sent();
|
|
418
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
419
|
-
case 5: throw _d.sent();
|
|
420
|
-
case 6: return [4, deserializeAws_json1_1NamespaceAlreadyExistsResponse(parsedOutput, context)];
|
|
421
|
-
case 7: throw _d.sent();
|
|
422
|
-
case 8: return [4, deserializeAws_json1_1ResourceLimitExceededResponse(parsedOutput, context)];
|
|
423
|
-
case 9: throw _d.sent();
|
|
424
|
-
case 10: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
|
|
425
|
-
case 11: throw _d.sent();
|
|
426
|
-
case 12:
|
|
427
|
-
parsedBody = parsedOutput.body;
|
|
428
|
-
throwDefaultError({
|
|
429
|
-
output: output,
|
|
430
|
-
parsedBody: parsedBody,
|
|
431
|
-
exceptionCtor: __BaseException,
|
|
432
|
-
errorCode: errorCode,
|
|
433
|
-
});
|
|
434
|
-
_d.label = 13;
|
|
435
|
-
case 13: return [2];
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
}); };
|
|
439
|
-
export var deserializeAws_json1_1CreatePublicDnsNamespaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
440
|
-
var data, contents, response;
|
|
441
|
-
return __generator(this, function (_a) {
|
|
442
|
-
switch (_a.label) {
|
|
443
|
-
case 0:
|
|
444
|
-
if (output.statusCode >= 300) {
|
|
445
|
-
return [2, deserializeAws_json1_1CreatePublicDnsNamespaceCommandError(output, context)];
|
|
446
|
-
}
|
|
447
|
-
return [4, parseBody(output.body, context)];
|
|
448
|
-
case 1:
|
|
449
|
-
data = _a.sent();
|
|
450
|
-
contents = {};
|
|
451
|
-
contents = deserializeAws_json1_1CreatePublicDnsNamespaceResponse(data, context);
|
|
452
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
453
|
-
return [2, Promise.resolve(response)];
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
}); };
|
|
457
|
-
var deserializeAws_json1_1CreatePublicDnsNamespaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
458
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
459
|
-
var _c;
|
|
460
|
-
return __generator(this, function (_d) {
|
|
461
|
-
switch (_d.label) {
|
|
462
|
-
case 0:
|
|
463
|
-
_a = [__assign({}, output)];
|
|
464
|
-
_c = {};
|
|
465
|
-
return [4, parseErrorBody(output.body, context)];
|
|
466
|
-
case 1:
|
|
467
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
468
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
469
|
-
_b = errorCode;
|
|
470
|
-
switch (_b) {
|
|
471
|
-
case "DuplicateRequest": return [3, 2];
|
|
472
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest": return [3, 2];
|
|
473
|
-
case "InvalidInput": return [3, 4];
|
|
474
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 4];
|
|
475
|
-
case "NamespaceAlreadyExists": return [3, 6];
|
|
476
|
-
case "com.amazonaws.servicediscovery#NamespaceAlreadyExists": return [3, 6];
|
|
477
|
-
case "ResourceLimitExceeded": return [3, 8];
|
|
478
|
-
case "com.amazonaws.servicediscovery#ResourceLimitExceeded": return [3, 8];
|
|
479
|
-
case "TooManyTagsException": return [3, 10];
|
|
480
|
-
case "com.amazonaws.servicediscovery#TooManyTagsException": return [3, 10];
|
|
481
|
-
}
|
|
482
|
-
return [3, 12];
|
|
483
|
-
case 2: return [4, deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context)];
|
|
484
|
-
case 3: throw _d.sent();
|
|
485
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
486
|
-
case 5: throw _d.sent();
|
|
487
|
-
case 6: return [4, deserializeAws_json1_1NamespaceAlreadyExistsResponse(parsedOutput, context)];
|
|
488
|
-
case 7: throw _d.sent();
|
|
489
|
-
case 8: return [4, deserializeAws_json1_1ResourceLimitExceededResponse(parsedOutput, context)];
|
|
490
|
-
case 9: throw _d.sent();
|
|
491
|
-
case 10: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
|
|
492
|
-
case 11: throw _d.sent();
|
|
493
|
-
case 12:
|
|
494
|
-
parsedBody = parsedOutput.body;
|
|
495
|
-
throwDefaultError({
|
|
496
|
-
output: output,
|
|
497
|
-
parsedBody: parsedBody,
|
|
498
|
-
exceptionCtor: __BaseException,
|
|
499
|
-
errorCode: errorCode,
|
|
500
|
-
});
|
|
501
|
-
_d.label = 13;
|
|
502
|
-
case 13: return [2];
|
|
503
|
-
}
|
|
504
|
-
});
|
|
505
|
-
}); };
|
|
506
|
-
export var deserializeAws_json1_1CreateServiceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
507
|
-
var data, contents, response;
|
|
508
|
-
return __generator(this, function (_a) {
|
|
509
|
-
switch (_a.label) {
|
|
510
|
-
case 0:
|
|
511
|
-
if (output.statusCode >= 300) {
|
|
512
|
-
return [2, deserializeAws_json1_1CreateServiceCommandError(output, context)];
|
|
513
|
-
}
|
|
514
|
-
return [4, parseBody(output.body, context)];
|
|
515
|
-
case 1:
|
|
516
|
-
data = _a.sent();
|
|
517
|
-
contents = {};
|
|
518
|
-
contents = deserializeAws_json1_1CreateServiceResponse(data, context);
|
|
519
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
520
|
-
return [2, Promise.resolve(response)];
|
|
521
|
-
}
|
|
522
|
-
});
|
|
523
|
-
}); };
|
|
524
|
-
var deserializeAws_json1_1CreateServiceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
525
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
526
|
-
var _c;
|
|
527
|
-
return __generator(this, function (_d) {
|
|
528
|
-
switch (_d.label) {
|
|
529
|
-
case 0:
|
|
530
|
-
_a = [__assign({}, output)];
|
|
531
|
-
_c = {};
|
|
532
|
-
return [4, parseErrorBody(output.body, context)];
|
|
533
|
-
case 1:
|
|
534
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
535
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
536
|
-
_b = errorCode;
|
|
537
|
-
switch (_b) {
|
|
538
|
-
case "InvalidInput": return [3, 2];
|
|
539
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
540
|
-
case "NamespaceNotFound": return [3, 4];
|
|
541
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound": return [3, 4];
|
|
542
|
-
case "ResourceLimitExceeded": return [3, 6];
|
|
543
|
-
case "com.amazonaws.servicediscovery#ResourceLimitExceeded": return [3, 6];
|
|
544
|
-
case "ServiceAlreadyExists": return [3, 8];
|
|
545
|
-
case "com.amazonaws.servicediscovery#ServiceAlreadyExists": return [3, 8];
|
|
546
|
-
case "TooManyTagsException": return [3, 10];
|
|
547
|
-
case "com.amazonaws.servicediscovery#TooManyTagsException": return [3, 10];
|
|
548
|
-
}
|
|
549
|
-
return [3, 12];
|
|
550
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
551
|
-
case 3: throw _d.sent();
|
|
552
|
-
case 4: return [4, deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context)];
|
|
553
|
-
case 5: throw _d.sent();
|
|
554
|
-
case 6: return [4, deserializeAws_json1_1ResourceLimitExceededResponse(parsedOutput, context)];
|
|
555
|
-
case 7: throw _d.sent();
|
|
556
|
-
case 8: return [4, deserializeAws_json1_1ServiceAlreadyExistsResponse(parsedOutput, context)];
|
|
557
|
-
case 9: throw _d.sent();
|
|
558
|
-
case 10: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
|
|
559
|
-
case 11: throw _d.sent();
|
|
560
|
-
case 12:
|
|
561
|
-
parsedBody = parsedOutput.body;
|
|
562
|
-
throwDefaultError({
|
|
563
|
-
output: output,
|
|
564
|
-
parsedBody: parsedBody,
|
|
565
|
-
exceptionCtor: __BaseException,
|
|
566
|
-
errorCode: errorCode,
|
|
567
|
-
});
|
|
568
|
-
_d.label = 13;
|
|
569
|
-
case 13: return [2];
|
|
570
|
-
}
|
|
571
|
-
});
|
|
572
|
-
}); };
|
|
573
|
-
export var deserializeAws_json1_1DeleteNamespaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
574
|
-
var data, contents, response;
|
|
575
|
-
return __generator(this, function (_a) {
|
|
576
|
-
switch (_a.label) {
|
|
577
|
-
case 0:
|
|
578
|
-
if (output.statusCode >= 300) {
|
|
579
|
-
return [2, deserializeAws_json1_1DeleteNamespaceCommandError(output, context)];
|
|
580
|
-
}
|
|
581
|
-
return [4, parseBody(output.body, context)];
|
|
582
|
-
case 1:
|
|
583
|
-
data = _a.sent();
|
|
584
|
-
contents = {};
|
|
585
|
-
contents = deserializeAws_json1_1DeleteNamespaceResponse(data, context);
|
|
586
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
587
|
-
return [2, Promise.resolve(response)];
|
|
588
|
-
}
|
|
589
|
-
});
|
|
590
|
-
}); };
|
|
591
|
-
var deserializeAws_json1_1DeleteNamespaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
592
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
593
|
-
var _c;
|
|
594
|
-
return __generator(this, function (_d) {
|
|
595
|
-
switch (_d.label) {
|
|
596
|
-
case 0:
|
|
597
|
-
_a = [__assign({}, output)];
|
|
598
|
-
_c = {};
|
|
599
|
-
return [4, parseErrorBody(output.body, context)];
|
|
600
|
-
case 1:
|
|
601
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
602
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
603
|
-
_b = errorCode;
|
|
604
|
-
switch (_b) {
|
|
605
|
-
case "DuplicateRequest": return [3, 2];
|
|
606
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest": return [3, 2];
|
|
607
|
-
case "InvalidInput": return [3, 4];
|
|
608
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 4];
|
|
609
|
-
case "NamespaceNotFound": return [3, 6];
|
|
610
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound": return [3, 6];
|
|
611
|
-
case "ResourceInUse": return [3, 8];
|
|
612
|
-
case "com.amazonaws.servicediscovery#ResourceInUse": return [3, 8];
|
|
613
|
-
}
|
|
614
|
-
return [3, 10];
|
|
615
|
-
case 2: return [4, deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context)];
|
|
616
|
-
case 3: throw _d.sent();
|
|
617
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
618
|
-
case 5: throw _d.sent();
|
|
619
|
-
case 6: return [4, deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context)];
|
|
620
|
-
case 7: throw _d.sent();
|
|
621
|
-
case 8: return [4, deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context)];
|
|
622
|
-
case 9: throw _d.sent();
|
|
623
|
-
case 10:
|
|
624
|
-
parsedBody = parsedOutput.body;
|
|
625
|
-
throwDefaultError({
|
|
626
|
-
output: output,
|
|
627
|
-
parsedBody: parsedBody,
|
|
628
|
-
exceptionCtor: __BaseException,
|
|
629
|
-
errorCode: errorCode,
|
|
630
|
-
});
|
|
631
|
-
_d.label = 11;
|
|
632
|
-
case 11: return [2];
|
|
633
|
-
}
|
|
634
|
-
});
|
|
635
|
-
}); };
|
|
636
|
-
export var deserializeAws_json1_1DeleteServiceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
637
|
-
var data, contents, response;
|
|
638
|
-
return __generator(this, function (_a) {
|
|
639
|
-
switch (_a.label) {
|
|
640
|
-
case 0:
|
|
641
|
-
if (output.statusCode >= 300) {
|
|
642
|
-
return [2, deserializeAws_json1_1DeleteServiceCommandError(output, context)];
|
|
643
|
-
}
|
|
644
|
-
return [4, parseBody(output.body, context)];
|
|
645
|
-
case 1:
|
|
646
|
-
data = _a.sent();
|
|
647
|
-
contents = {};
|
|
648
|
-
contents = deserializeAws_json1_1DeleteServiceResponse(data, context);
|
|
649
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
650
|
-
return [2, Promise.resolve(response)];
|
|
651
|
-
}
|
|
652
|
-
});
|
|
653
|
-
}); };
|
|
654
|
-
var deserializeAws_json1_1DeleteServiceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
655
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
656
|
-
var _c;
|
|
657
|
-
return __generator(this, function (_d) {
|
|
658
|
-
switch (_d.label) {
|
|
659
|
-
case 0:
|
|
660
|
-
_a = [__assign({}, output)];
|
|
661
|
-
_c = {};
|
|
662
|
-
return [4, parseErrorBody(output.body, context)];
|
|
663
|
-
case 1:
|
|
664
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
665
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
666
|
-
_b = errorCode;
|
|
667
|
-
switch (_b) {
|
|
668
|
-
case "InvalidInput": return [3, 2];
|
|
669
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
670
|
-
case "ResourceInUse": return [3, 4];
|
|
671
|
-
case "com.amazonaws.servicediscovery#ResourceInUse": return [3, 4];
|
|
672
|
-
case "ServiceNotFound": return [3, 6];
|
|
673
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound": return [3, 6];
|
|
674
|
-
}
|
|
675
|
-
return [3, 8];
|
|
676
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
677
|
-
case 3: throw _d.sent();
|
|
678
|
-
case 4: return [4, deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context)];
|
|
679
|
-
case 5: throw _d.sent();
|
|
680
|
-
case 6: return [4, deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context)];
|
|
681
|
-
case 7: throw _d.sent();
|
|
682
|
-
case 8:
|
|
683
|
-
parsedBody = parsedOutput.body;
|
|
684
|
-
throwDefaultError({
|
|
685
|
-
output: output,
|
|
686
|
-
parsedBody: parsedBody,
|
|
687
|
-
exceptionCtor: __BaseException,
|
|
688
|
-
errorCode: errorCode,
|
|
689
|
-
});
|
|
690
|
-
_d.label = 9;
|
|
691
|
-
case 9: return [2];
|
|
692
|
-
}
|
|
693
|
-
});
|
|
694
|
-
}); };
|
|
695
|
-
export var deserializeAws_json1_1DeregisterInstanceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
696
|
-
var data, contents, response;
|
|
697
|
-
return __generator(this, function (_a) {
|
|
698
|
-
switch (_a.label) {
|
|
699
|
-
case 0:
|
|
700
|
-
if (output.statusCode >= 300) {
|
|
701
|
-
return [2, deserializeAws_json1_1DeregisterInstanceCommandError(output, context)];
|
|
702
|
-
}
|
|
703
|
-
return [4, parseBody(output.body, context)];
|
|
704
|
-
case 1:
|
|
705
|
-
data = _a.sent();
|
|
706
|
-
contents = {};
|
|
707
|
-
contents = deserializeAws_json1_1DeregisterInstanceResponse(data, context);
|
|
708
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
709
|
-
return [2, Promise.resolve(response)];
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
}); };
|
|
713
|
-
var deserializeAws_json1_1DeregisterInstanceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
714
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
715
|
-
var _c;
|
|
716
|
-
return __generator(this, function (_d) {
|
|
717
|
-
switch (_d.label) {
|
|
718
|
-
case 0:
|
|
719
|
-
_a = [__assign({}, output)];
|
|
720
|
-
_c = {};
|
|
721
|
-
return [4, parseErrorBody(output.body, context)];
|
|
722
|
-
case 1:
|
|
723
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
724
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
725
|
-
_b = errorCode;
|
|
726
|
-
switch (_b) {
|
|
727
|
-
case "DuplicateRequest": return [3, 2];
|
|
728
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest": return [3, 2];
|
|
729
|
-
case "InstanceNotFound": return [3, 4];
|
|
730
|
-
case "com.amazonaws.servicediscovery#InstanceNotFound": return [3, 4];
|
|
731
|
-
case "InvalidInput": return [3, 6];
|
|
732
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 6];
|
|
733
|
-
case "ResourceInUse": return [3, 8];
|
|
734
|
-
case "com.amazonaws.servicediscovery#ResourceInUse": return [3, 8];
|
|
735
|
-
case "ServiceNotFound": return [3, 10];
|
|
736
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound": return [3, 10];
|
|
737
|
-
}
|
|
738
|
-
return [3, 12];
|
|
739
|
-
case 2: return [4, deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context)];
|
|
740
|
-
case 3: throw _d.sent();
|
|
741
|
-
case 4: return [4, deserializeAws_json1_1InstanceNotFoundResponse(parsedOutput, context)];
|
|
742
|
-
case 5: throw _d.sent();
|
|
743
|
-
case 6: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
744
|
-
case 7: throw _d.sent();
|
|
745
|
-
case 8: return [4, deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context)];
|
|
746
|
-
case 9: throw _d.sent();
|
|
747
|
-
case 10: return [4, deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context)];
|
|
748
|
-
case 11: throw _d.sent();
|
|
749
|
-
case 12:
|
|
750
|
-
parsedBody = parsedOutput.body;
|
|
751
|
-
throwDefaultError({
|
|
752
|
-
output: output,
|
|
753
|
-
parsedBody: parsedBody,
|
|
754
|
-
exceptionCtor: __BaseException,
|
|
755
|
-
errorCode: errorCode,
|
|
756
|
-
});
|
|
757
|
-
_d.label = 13;
|
|
758
|
-
case 13: return [2];
|
|
759
|
-
}
|
|
760
|
-
});
|
|
761
|
-
}); };
|
|
762
|
-
export var deserializeAws_json1_1DiscoverInstancesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
763
|
-
var data, contents, response;
|
|
764
|
-
return __generator(this, function (_a) {
|
|
765
|
-
switch (_a.label) {
|
|
766
|
-
case 0:
|
|
767
|
-
if (output.statusCode >= 300) {
|
|
768
|
-
return [2, deserializeAws_json1_1DiscoverInstancesCommandError(output, context)];
|
|
769
|
-
}
|
|
770
|
-
return [4, parseBody(output.body, context)];
|
|
771
|
-
case 1:
|
|
772
|
-
data = _a.sent();
|
|
773
|
-
contents = {};
|
|
774
|
-
contents = deserializeAws_json1_1DiscoverInstancesResponse(data, context);
|
|
775
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
776
|
-
return [2, Promise.resolve(response)];
|
|
777
|
-
}
|
|
778
|
-
});
|
|
779
|
-
}); };
|
|
780
|
-
var deserializeAws_json1_1DiscoverInstancesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
781
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
782
|
-
var _c;
|
|
783
|
-
return __generator(this, function (_d) {
|
|
784
|
-
switch (_d.label) {
|
|
785
|
-
case 0:
|
|
786
|
-
_a = [__assign({}, output)];
|
|
787
|
-
_c = {};
|
|
788
|
-
return [4, parseErrorBody(output.body, context)];
|
|
789
|
-
case 1:
|
|
790
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
791
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
792
|
-
_b = errorCode;
|
|
793
|
-
switch (_b) {
|
|
794
|
-
case "InvalidInput": return [3, 2];
|
|
795
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
796
|
-
case "NamespaceNotFound": return [3, 4];
|
|
797
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound": return [3, 4];
|
|
798
|
-
case "RequestLimitExceeded": return [3, 6];
|
|
799
|
-
case "com.amazonaws.servicediscovery#RequestLimitExceeded": return [3, 6];
|
|
800
|
-
case "ServiceNotFound": return [3, 8];
|
|
801
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound": return [3, 8];
|
|
802
|
-
}
|
|
803
|
-
return [3, 10];
|
|
804
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
805
|
-
case 3: throw _d.sent();
|
|
806
|
-
case 4: return [4, deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context)];
|
|
807
|
-
case 5: throw _d.sent();
|
|
808
|
-
case 6: return [4, deserializeAws_json1_1RequestLimitExceededResponse(parsedOutput, context)];
|
|
809
|
-
case 7: throw _d.sent();
|
|
810
|
-
case 8: return [4, deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context)];
|
|
811
|
-
case 9: throw _d.sent();
|
|
812
|
-
case 10:
|
|
813
|
-
parsedBody = parsedOutput.body;
|
|
814
|
-
throwDefaultError({
|
|
815
|
-
output: output,
|
|
816
|
-
parsedBody: parsedBody,
|
|
817
|
-
exceptionCtor: __BaseException,
|
|
818
|
-
errorCode: errorCode,
|
|
819
|
-
});
|
|
820
|
-
_d.label = 11;
|
|
821
|
-
case 11: return [2];
|
|
822
|
-
}
|
|
823
|
-
});
|
|
824
|
-
}); };
|
|
825
|
-
export var deserializeAws_json1_1GetInstanceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
826
|
-
var data, contents, response;
|
|
827
|
-
return __generator(this, function (_a) {
|
|
828
|
-
switch (_a.label) {
|
|
829
|
-
case 0:
|
|
830
|
-
if (output.statusCode >= 300) {
|
|
831
|
-
return [2, deserializeAws_json1_1GetInstanceCommandError(output, context)];
|
|
832
|
-
}
|
|
833
|
-
return [4, parseBody(output.body, context)];
|
|
834
|
-
case 1:
|
|
835
|
-
data = _a.sent();
|
|
836
|
-
contents = {};
|
|
837
|
-
contents = deserializeAws_json1_1GetInstanceResponse(data, context);
|
|
838
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
839
|
-
return [2, Promise.resolve(response)];
|
|
840
|
-
}
|
|
841
|
-
});
|
|
842
|
-
}); };
|
|
843
|
-
var deserializeAws_json1_1GetInstanceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
844
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
845
|
-
var _c;
|
|
846
|
-
return __generator(this, function (_d) {
|
|
847
|
-
switch (_d.label) {
|
|
848
|
-
case 0:
|
|
849
|
-
_a = [__assign({}, output)];
|
|
850
|
-
_c = {};
|
|
851
|
-
return [4, parseErrorBody(output.body, context)];
|
|
852
|
-
case 1:
|
|
853
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
854
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
855
|
-
_b = errorCode;
|
|
856
|
-
switch (_b) {
|
|
857
|
-
case "InstanceNotFound": return [3, 2];
|
|
858
|
-
case "com.amazonaws.servicediscovery#InstanceNotFound": return [3, 2];
|
|
859
|
-
case "InvalidInput": return [3, 4];
|
|
860
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 4];
|
|
861
|
-
case "ServiceNotFound": return [3, 6];
|
|
862
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound": return [3, 6];
|
|
863
|
-
}
|
|
864
|
-
return [3, 8];
|
|
865
|
-
case 2: return [4, deserializeAws_json1_1InstanceNotFoundResponse(parsedOutput, context)];
|
|
866
|
-
case 3: throw _d.sent();
|
|
867
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
868
|
-
case 5: throw _d.sent();
|
|
869
|
-
case 6: return [4, deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context)];
|
|
870
|
-
case 7: throw _d.sent();
|
|
871
|
-
case 8:
|
|
872
|
-
parsedBody = parsedOutput.body;
|
|
873
|
-
throwDefaultError({
|
|
874
|
-
output: output,
|
|
875
|
-
parsedBody: parsedBody,
|
|
876
|
-
exceptionCtor: __BaseException,
|
|
877
|
-
errorCode: errorCode,
|
|
878
|
-
});
|
|
879
|
-
_d.label = 9;
|
|
880
|
-
case 9: return [2];
|
|
881
|
-
}
|
|
882
|
-
});
|
|
883
|
-
}); };
|
|
884
|
-
export var deserializeAws_json1_1GetInstancesHealthStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
885
|
-
var data, contents, response;
|
|
886
|
-
return __generator(this, function (_a) {
|
|
887
|
-
switch (_a.label) {
|
|
888
|
-
case 0:
|
|
889
|
-
if (output.statusCode >= 300) {
|
|
890
|
-
return [2, deserializeAws_json1_1GetInstancesHealthStatusCommandError(output, context)];
|
|
891
|
-
}
|
|
892
|
-
return [4, parseBody(output.body, context)];
|
|
893
|
-
case 1:
|
|
894
|
-
data = _a.sent();
|
|
895
|
-
contents = {};
|
|
896
|
-
contents = deserializeAws_json1_1GetInstancesHealthStatusResponse(data, context);
|
|
897
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
898
|
-
return [2, Promise.resolve(response)];
|
|
899
|
-
}
|
|
900
|
-
});
|
|
901
|
-
}); };
|
|
902
|
-
var deserializeAws_json1_1GetInstancesHealthStatusCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
903
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
904
|
-
var _c;
|
|
905
|
-
return __generator(this, function (_d) {
|
|
906
|
-
switch (_d.label) {
|
|
907
|
-
case 0:
|
|
908
|
-
_a = [__assign({}, output)];
|
|
909
|
-
_c = {};
|
|
910
|
-
return [4, parseErrorBody(output.body, context)];
|
|
911
|
-
case 1:
|
|
912
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
913
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
914
|
-
_b = errorCode;
|
|
915
|
-
switch (_b) {
|
|
916
|
-
case "InstanceNotFound": return [3, 2];
|
|
917
|
-
case "com.amazonaws.servicediscovery#InstanceNotFound": return [3, 2];
|
|
918
|
-
case "InvalidInput": return [3, 4];
|
|
919
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 4];
|
|
920
|
-
case "ServiceNotFound": return [3, 6];
|
|
921
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound": return [3, 6];
|
|
922
|
-
}
|
|
923
|
-
return [3, 8];
|
|
924
|
-
case 2: return [4, deserializeAws_json1_1InstanceNotFoundResponse(parsedOutput, context)];
|
|
925
|
-
case 3: throw _d.sent();
|
|
926
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
927
|
-
case 5: throw _d.sent();
|
|
928
|
-
case 6: return [4, deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context)];
|
|
929
|
-
case 7: throw _d.sent();
|
|
930
|
-
case 8:
|
|
931
|
-
parsedBody = parsedOutput.body;
|
|
932
|
-
throwDefaultError({
|
|
933
|
-
output: output,
|
|
934
|
-
parsedBody: parsedBody,
|
|
935
|
-
exceptionCtor: __BaseException,
|
|
936
|
-
errorCode: errorCode,
|
|
937
|
-
});
|
|
938
|
-
_d.label = 9;
|
|
939
|
-
case 9: return [2];
|
|
940
|
-
}
|
|
941
|
-
});
|
|
942
|
-
}); };
|
|
943
|
-
export var deserializeAws_json1_1GetNamespaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
944
|
-
var data, contents, response;
|
|
945
|
-
return __generator(this, function (_a) {
|
|
946
|
-
switch (_a.label) {
|
|
947
|
-
case 0:
|
|
948
|
-
if (output.statusCode >= 300) {
|
|
949
|
-
return [2, deserializeAws_json1_1GetNamespaceCommandError(output, context)];
|
|
950
|
-
}
|
|
951
|
-
return [4, parseBody(output.body, context)];
|
|
952
|
-
case 1:
|
|
953
|
-
data = _a.sent();
|
|
954
|
-
contents = {};
|
|
955
|
-
contents = deserializeAws_json1_1GetNamespaceResponse(data, context);
|
|
956
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
957
|
-
return [2, Promise.resolve(response)];
|
|
958
|
-
}
|
|
959
|
-
});
|
|
960
|
-
}); };
|
|
961
|
-
var deserializeAws_json1_1GetNamespaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
962
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
963
|
-
var _c;
|
|
964
|
-
return __generator(this, function (_d) {
|
|
965
|
-
switch (_d.label) {
|
|
966
|
-
case 0:
|
|
967
|
-
_a = [__assign({}, output)];
|
|
968
|
-
_c = {};
|
|
969
|
-
return [4, parseErrorBody(output.body, context)];
|
|
970
|
-
case 1:
|
|
971
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
972
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
973
|
-
_b = errorCode;
|
|
974
|
-
switch (_b) {
|
|
975
|
-
case "InvalidInput": return [3, 2];
|
|
976
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
977
|
-
case "NamespaceNotFound": return [3, 4];
|
|
978
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound": return [3, 4];
|
|
979
|
-
}
|
|
980
|
-
return [3, 6];
|
|
981
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
982
|
-
case 3: throw _d.sent();
|
|
983
|
-
case 4: return [4, deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context)];
|
|
984
|
-
case 5: throw _d.sent();
|
|
985
|
-
case 6:
|
|
986
|
-
parsedBody = parsedOutput.body;
|
|
987
|
-
throwDefaultError({
|
|
988
|
-
output: output,
|
|
989
|
-
parsedBody: parsedBody,
|
|
990
|
-
exceptionCtor: __BaseException,
|
|
991
|
-
errorCode: errorCode,
|
|
992
|
-
});
|
|
993
|
-
_d.label = 7;
|
|
994
|
-
case 7: return [2];
|
|
995
|
-
}
|
|
996
|
-
});
|
|
997
|
-
}); };
|
|
998
|
-
export var deserializeAws_json1_1GetOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
999
|
-
var data, contents, response;
|
|
1000
|
-
return __generator(this, function (_a) {
|
|
1001
|
-
switch (_a.label) {
|
|
1002
|
-
case 0:
|
|
1003
|
-
if (output.statusCode >= 300) {
|
|
1004
|
-
return [2, deserializeAws_json1_1GetOperationCommandError(output, context)];
|
|
1005
|
-
}
|
|
1006
|
-
return [4, parseBody(output.body, context)];
|
|
1007
|
-
case 1:
|
|
1008
|
-
data = _a.sent();
|
|
1009
|
-
contents = {};
|
|
1010
|
-
contents = deserializeAws_json1_1GetOperationResponse(data, context);
|
|
1011
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1012
|
-
return [2, Promise.resolve(response)];
|
|
1013
|
-
}
|
|
1014
|
-
});
|
|
1015
|
-
}); };
|
|
1016
|
-
var deserializeAws_json1_1GetOperationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1017
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1018
|
-
var _c;
|
|
1019
|
-
return __generator(this, function (_d) {
|
|
1020
|
-
switch (_d.label) {
|
|
1021
|
-
case 0:
|
|
1022
|
-
_a = [__assign({}, output)];
|
|
1023
|
-
_c = {};
|
|
1024
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1025
|
-
case 1:
|
|
1026
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1027
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1028
|
-
_b = errorCode;
|
|
1029
|
-
switch (_b) {
|
|
1030
|
-
case "InvalidInput": return [3, 2];
|
|
1031
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
1032
|
-
case "OperationNotFound": return [3, 4];
|
|
1033
|
-
case "com.amazonaws.servicediscovery#OperationNotFound": return [3, 4];
|
|
1034
|
-
}
|
|
1035
|
-
return [3, 6];
|
|
1036
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1037
|
-
case 3: throw _d.sent();
|
|
1038
|
-
case 4: return [4, deserializeAws_json1_1OperationNotFoundResponse(parsedOutput, context)];
|
|
1039
|
-
case 5: throw _d.sent();
|
|
1040
|
-
case 6:
|
|
1041
|
-
parsedBody = parsedOutput.body;
|
|
1042
|
-
throwDefaultError({
|
|
1043
|
-
output: output,
|
|
1044
|
-
parsedBody: parsedBody,
|
|
1045
|
-
exceptionCtor: __BaseException,
|
|
1046
|
-
errorCode: errorCode,
|
|
1047
|
-
});
|
|
1048
|
-
_d.label = 7;
|
|
1049
|
-
case 7: return [2];
|
|
1050
|
-
}
|
|
1051
|
-
});
|
|
1052
|
-
}); };
|
|
1053
|
-
export var deserializeAws_json1_1GetServiceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1054
|
-
var data, contents, response;
|
|
1055
|
-
return __generator(this, function (_a) {
|
|
1056
|
-
switch (_a.label) {
|
|
1057
|
-
case 0:
|
|
1058
|
-
if (output.statusCode >= 300) {
|
|
1059
|
-
return [2, deserializeAws_json1_1GetServiceCommandError(output, context)];
|
|
1060
|
-
}
|
|
1061
|
-
return [4, parseBody(output.body, context)];
|
|
1062
|
-
case 1:
|
|
1063
|
-
data = _a.sent();
|
|
1064
|
-
contents = {};
|
|
1065
|
-
contents = deserializeAws_json1_1GetServiceResponse(data, context);
|
|
1066
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1067
|
-
return [2, Promise.resolve(response)];
|
|
1068
|
-
}
|
|
1069
|
-
});
|
|
1070
|
-
}); };
|
|
1071
|
-
var deserializeAws_json1_1GetServiceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1072
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1073
|
-
var _c;
|
|
1074
|
-
return __generator(this, function (_d) {
|
|
1075
|
-
switch (_d.label) {
|
|
1076
|
-
case 0:
|
|
1077
|
-
_a = [__assign({}, output)];
|
|
1078
|
-
_c = {};
|
|
1079
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1080
|
-
case 1:
|
|
1081
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1082
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1083
|
-
_b = errorCode;
|
|
1084
|
-
switch (_b) {
|
|
1085
|
-
case "InvalidInput": return [3, 2];
|
|
1086
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
1087
|
-
case "ServiceNotFound": return [3, 4];
|
|
1088
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound": return [3, 4];
|
|
1089
|
-
}
|
|
1090
|
-
return [3, 6];
|
|
1091
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1092
|
-
case 3: throw _d.sent();
|
|
1093
|
-
case 4: return [4, deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context)];
|
|
1094
|
-
case 5: throw _d.sent();
|
|
1095
|
-
case 6:
|
|
1096
|
-
parsedBody = parsedOutput.body;
|
|
1097
|
-
throwDefaultError({
|
|
1098
|
-
output: output,
|
|
1099
|
-
parsedBody: parsedBody,
|
|
1100
|
-
exceptionCtor: __BaseException,
|
|
1101
|
-
errorCode: errorCode,
|
|
1102
|
-
});
|
|
1103
|
-
_d.label = 7;
|
|
1104
|
-
case 7: return [2];
|
|
1105
|
-
}
|
|
1106
|
-
});
|
|
1107
|
-
}); };
|
|
1108
|
-
export var deserializeAws_json1_1ListInstancesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1109
|
-
var data, contents, response;
|
|
1110
|
-
return __generator(this, function (_a) {
|
|
1111
|
-
switch (_a.label) {
|
|
1112
|
-
case 0:
|
|
1113
|
-
if (output.statusCode >= 300) {
|
|
1114
|
-
return [2, deserializeAws_json1_1ListInstancesCommandError(output, context)];
|
|
1115
|
-
}
|
|
1116
|
-
return [4, parseBody(output.body, context)];
|
|
1117
|
-
case 1:
|
|
1118
|
-
data = _a.sent();
|
|
1119
|
-
contents = {};
|
|
1120
|
-
contents = deserializeAws_json1_1ListInstancesResponse(data, context);
|
|
1121
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1122
|
-
return [2, Promise.resolve(response)];
|
|
1123
|
-
}
|
|
1124
|
-
});
|
|
1125
|
-
}); };
|
|
1126
|
-
var deserializeAws_json1_1ListInstancesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1127
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1128
|
-
var _c;
|
|
1129
|
-
return __generator(this, function (_d) {
|
|
1130
|
-
switch (_d.label) {
|
|
1131
|
-
case 0:
|
|
1132
|
-
_a = [__assign({}, output)];
|
|
1133
|
-
_c = {};
|
|
1134
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1135
|
-
case 1:
|
|
1136
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1137
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1138
|
-
_b = errorCode;
|
|
1139
|
-
switch (_b) {
|
|
1140
|
-
case "InvalidInput": return [3, 2];
|
|
1141
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
1142
|
-
case "ServiceNotFound": return [3, 4];
|
|
1143
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound": return [3, 4];
|
|
1144
|
-
}
|
|
1145
|
-
return [3, 6];
|
|
1146
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1147
|
-
case 3: throw _d.sent();
|
|
1148
|
-
case 4: return [4, deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context)];
|
|
1149
|
-
case 5: throw _d.sent();
|
|
1150
|
-
case 6:
|
|
1151
|
-
parsedBody = parsedOutput.body;
|
|
1152
|
-
throwDefaultError({
|
|
1153
|
-
output: output,
|
|
1154
|
-
parsedBody: parsedBody,
|
|
1155
|
-
exceptionCtor: __BaseException,
|
|
1156
|
-
errorCode: errorCode,
|
|
1157
|
-
});
|
|
1158
|
-
_d.label = 7;
|
|
1159
|
-
case 7: return [2];
|
|
1160
|
-
}
|
|
1161
|
-
});
|
|
1162
|
-
}); };
|
|
1163
|
-
export var deserializeAws_json1_1ListNamespacesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1164
|
-
var data, contents, response;
|
|
1165
|
-
return __generator(this, function (_a) {
|
|
1166
|
-
switch (_a.label) {
|
|
1167
|
-
case 0:
|
|
1168
|
-
if (output.statusCode >= 300) {
|
|
1169
|
-
return [2, deserializeAws_json1_1ListNamespacesCommandError(output, context)];
|
|
1170
|
-
}
|
|
1171
|
-
return [4, parseBody(output.body, context)];
|
|
1172
|
-
case 1:
|
|
1173
|
-
data = _a.sent();
|
|
1174
|
-
contents = {};
|
|
1175
|
-
contents = deserializeAws_json1_1ListNamespacesResponse(data, context);
|
|
1176
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1177
|
-
return [2, Promise.resolve(response)];
|
|
1178
|
-
}
|
|
1179
|
-
});
|
|
1180
|
-
}); };
|
|
1181
|
-
var deserializeAws_json1_1ListNamespacesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1182
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1183
|
-
var _c;
|
|
1184
|
-
return __generator(this, function (_d) {
|
|
1185
|
-
switch (_d.label) {
|
|
1186
|
-
case 0:
|
|
1187
|
-
_a = [__assign({}, output)];
|
|
1188
|
-
_c = {};
|
|
1189
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1190
|
-
case 1:
|
|
1191
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1192
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1193
|
-
_b = errorCode;
|
|
1194
|
-
switch (_b) {
|
|
1195
|
-
case "InvalidInput": return [3, 2];
|
|
1196
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
1197
|
-
}
|
|
1198
|
-
return [3, 4];
|
|
1199
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1200
|
-
case 3: throw _d.sent();
|
|
1201
|
-
case 4:
|
|
1202
|
-
parsedBody = parsedOutput.body;
|
|
1203
|
-
throwDefaultError({
|
|
1204
|
-
output: output,
|
|
1205
|
-
parsedBody: parsedBody,
|
|
1206
|
-
exceptionCtor: __BaseException,
|
|
1207
|
-
errorCode: errorCode,
|
|
1208
|
-
});
|
|
1209
|
-
_d.label = 5;
|
|
1210
|
-
case 5: return [2];
|
|
1211
|
-
}
|
|
1212
|
-
});
|
|
1213
|
-
}); };
|
|
1214
|
-
export var deserializeAws_json1_1ListOperationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1215
|
-
var data, contents, response;
|
|
1216
|
-
return __generator(this, function (_a) {
|
|
1217
|
-
switch (_a.label) {
|
|
1218
|
-
case 0:
|
|
1219
|
-
if (output.statusCode >= 300) {
|
|
1220
|
-
return [2, deserializeAws_json1_1ListOperationsCommandError(output, context)];
|
|
1221
|
-
}
|
|
1222
|
-
return [4, parseBody(output.body, context)];
|
|
1223
|
-
case 1:
|
|
1224
|
-
data = _a.sent();
|
|
1225
|
-
contents = {};
|
|
1226
|
-
contents = deserializeAws_json1_1ListOperationsResponse(data, context);
|
|
1227
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1228
|
-
return [2, Promise.resolve(response)];
|
|
1229
|
-
}
|
|
1230
|
-
});
|
|
1231
|
-
}); };
|
|
1232
|
-
var deserializeAws_json1_1ListOperationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1233
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1234
|
-
var _c;
|
|
1235
|
-
return __generator(this, function (_d) {
|
|
1236
|
-
switch (_d.label) {
|
|
1237
|
-
case 0:
|
|
1238
|
-
_a = [__assign({}, output)];
|
|
1239
|
-
_c = {};
|
|
1240
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1241
|
-
case 1:
|
|
1242
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1243
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1244
|
-
_b = errorCode;
|
|
1245
|
-
switch (_b) {
|
|
1246
|
-
case "InvalidInput": return [3, 2];
|
|
1247
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
1248
|
-
}
|
|
1249
|
-
return [3, 4];
|
|
1250
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1251
|
-
case 3: throw _d.sent();
|
|
1252
|
-
case 4:
|
|
1253
|
-
parsedBody = parsedOutput.body;
|
|
1254
|
-
throwDefaultError({
|
|
1255
|
-
output: output,
|
|
1256
|
-
parsedBody: parsedBody,
|
|
1257
|
-
exceptionCtor: __BaseException,
|
|
1258
|
-
errorCode: errorCode,
|
|
1259
|
-
});
|
|
1260
|
-
_d.label = 5;
|
|
1261
|
-
case 5: return [2];
|
|
1262
|
-
}
|
|
1263
|
-
});
|
|
1264
|
-
}); };
|
|
1265
|
-
export var deserializeAws_json1_1ListServicesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1266
|
-
var data, contents, response;
|
|
1267
|
-
return __generator(this, function (_a) {
|
|
1268
|
-
switch (_a.label) {
|
|
1269
|
-
case 0:
|
|
1270
|
-
if (output.statusCode >= 300) {
|
|
1271
|
-
return [2, deserializeAws_json1_1ListServicesCommandError(output, context)];
|
|
1272
|
-
}
|
|
1273
|
-
return [4, parseBody(output.body, context)];
|
|
1274
|
-
case 1:
|
|
1275
|
-
data = _a.sent();
|
|
1276
|
-
contents = {};
|
|
1277
|
-
contents = deserializeAws_json1_1ListServicesResponse(data, context);
|
|
1278
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1279
|
-
return [2, Promise.resolve(response)];
|
|
1280
|
-
}
|
|
1281
|
-
});
|
|
1282
|
-
}); };
|
|
1283
|
-
var deserializeAws_json1_1ListServicesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1284
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1285
|
-
var _c;
|
|
1286
|
-
return __generator(this, function (_d) {
|
|
1287
|
-
switch (_d.label) {
|
|
1288
|
-
case 0:
|
|
1289
|
-
_a = [__assign({}, output)];
|
|
1290
|
-
_c = {};
|
|
1291
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1292
|
-
case 1:
|
|
1293
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1294
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1295
|
-
_b = errorCode;
|
|
1296
|
-
switch (_b) {
|
|
1297
|
-
case "InvalidInput": return [3, 2];
|
|
1298
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
1299
|
-
}
|
|
1300
|
-
return [3, 4];
|
|
1301
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1302
|
-
case 3: throw _d.sent();
|
|
1303
|
-
case 4:
|
|
1304
|
-
parsedBody = parsedOutput.body;
|
|
1305
|
-
throwDefaultError({
|
|
1306
|
-
output: output,
|
|
1307
|
-
parsedBody: parsedBody,
|
|
1308
|
-
exceptionCtor: __BaseException,
|
|
1309
|
-
errorCode: errorCode,
|
|
1310
|
-
});
|
|
1311
|
-
_d.label = 5;
|
|
1312
|
-
case 5: return [2];
|
|
1313
|
-
}
|
|
1314
|
-
});
|
|
1315
|
-
}); };
|
|
1316
|
-
export var deserializeAws_json1_1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1317
|
-
var data, contents, response;
|
|
1318
|
-
return __generator(this, function (_a) {
|
|
1319
|
-
switch (_a.label) {
|
|
1320
|
-
case 0:
|
|
1321
|
-
if (output.statusCode >= 300) {
|
|
1322
|
-
return [2, deserializeAws_json1_1ListTagsForResourceCommandError(output, context)];
|
|
1323
|
-
}
|
|
1324
|
-
return [4, parseBody(output.body, context)];
|
|
1325
|
-
case 1:
|
|
1326
|
-
data = _a.sent();
|
|
1327
|
-
contents = {};
|
|
1328
|
-
contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
|
|
1329
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1330
|
-
return [2, Promise.resolve(response)];
|
|
1331
|
-
}
|
|
1332
|
-
});
|
|
1333
|
-
}); };
|
|
1334
|
-
var deserializeAws_json1_1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1335
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1336
|
-
var _c;
|
|
1337
|
-
return __generator(this, function (_d) {
|
|
1338
|
-
switch (_d.label) {
|
|
1339
|
-
case 0:
|
|
1340
|
-
_a = [__assign({}, output)];
|
|
1341
|
-
_c = {};
|
|
1342
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1343
|
-
case 1:
|
|
1344
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1345
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1346
|
-
_b = errorCode;
|
|
1347
|
-
switch (_b) {
|
|
1348
|
-
case "InvalidInput": return [3, 2];
|
|
1349
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
1350
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
1351
|
-
case "com.amazonaws.servicediscovery#ResourceNotFoundException": return [3, 4];
|
|
1352
|
-
}
|
|
1353
|
-
return [3, 6];
|
|
1354
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1355
|
-
case 3: throw _d.sent();
|
|
1356
|
-
case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1357
|
-
case 5: throw _d.sent();
|
|
1358
|
-
case 6:
|
|
1359
|
-
parsedBody = parsedOutput.body;
|
|
1360
|
-
throwDefaultError({
|
|
1361
|
-
output: output,
|
|
1362
|
-
parsedBody: parsedBody,
|
|
1363
|
-
exceptionCtor: __BaseException,
|
|
1364
|
-
errorCode: errorCode,
|
|
1365
|
-
});
|
|
1366
|
-
_d.label = 7;
|
|
1367
|
-
case 7: return [2];
|
|
1368
|
-
}
|
|
1369
|
-
});
|
|
1370
|
-
}); };
|
|
1371
|
-
export var deserializeAws_json1_1RegisterInstanceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1372
|
-
var data, contents, response;
|
|
1373
|
-
return __generator(this, function (_a) {
|
|
1374
|
-
switch (_a.label) {
|
|
1375
|
-
case 0:
|
|
1376
|
-
if (output.statusCode >= 300) {
|
|
1377
|
-
return [2, deserializeAws_json1_1RegisterInstanceCommandError(output, context)];
|
|
1378
|
-
}
|
|
1379
|
-
return [4, parseBody(output.body, context)];
|
|
1380
|
-
case 1:
|
|
1381
|
-
data = _a.sent();
|
|
1382
|
-
contents = {};
|
|
1383
|
-
contents = deserializeAws_json1_1RegisterInstanceResponse(data, context);
|
|
1384
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1385
|
-
return [2, Promise.resolve(response)];
|
|
1386
|
-
}
|
|
1387
|
-
});
|
|
1388
|
-
}); };
|
|
1389
|
-
var deserializeAws_json1_1RegisterInstanceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1390
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1391
|
-
var _c;
|
|
1392
|
-
return __generator(this, function (_d) {
|
|
1393
|
-
switch (_d.label) {
|
|
1394
|
-
case 0:
|
|
1395
|
-
_a = [__assign({}, output)];
|
|
1396
|
-
_c = {};
|
|
1397
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1398
|
-
case 1:
|
|
1399
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1400
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1401
|
-
_b = errorCode;
|
|
1402
|
-
switch (_b) {
|
|
1403
|
-
case "DuplicateRequest": return [3, 2];
|
|
1404
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest": return [3, 2];
|
|
1405
|
-
case "InvalidInput": return [3, 4];
|
|
1406
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 4];
|
|
1407
|
-
case "ResourceInUse": return [3, 6];
|
|
1408
|
-
case "com.amazonaws.servicediscovery#ResourceInUse": return [3, 6];
|
|
1409
|
-
case "ResourceLimitExceeded": return [3, 8];
|
|
1410
|
-
case "com.amazonaws.servicediscovery#ResourceLimitExceeded": return [3, 8];
|
|
1411
|
-
case "ServiceNotFound": return [3, 10];
|
|
1412
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound": return [3, 10];
|
|
1413
|
-
}
|
|
1414
|
-
return [3, 12];
|
|
1415
|
-
case 2: return [4, deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context)];
|
|
1416
|
-
case 3: throw _d.sent();
|
|
1417
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1418
|
-
case 5: throw _d.sent();
|
|
1419
|
-
case 6: return [4, deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context)];
|
|
1420
|
-
case 7: throw _d.sent();
|
|
1421
|
-
case 8: return [4, deserializeAws_json1_1ResourceLimitExceededResponse(parsedOutput, context)];
|
|
1422
|
-
case 9: throw _d.sent();
|
|
1423
|
-
case 10: return [4, deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context)];
|
|
1424
|
-
case 11: throw _d.sent();
|
|
1425
|
-
case 12:
|
|
1426
|
-
parsedBody = parsedOutput.body;
|
|
1427
|
-
throwDefaultError({
|
|
1428
|
-
output: output,
|
|
1429
|
-
parsedBody: parsedBody,
|
|
1430
|
-
exceptionCtor: __BaseException,
|
|
1431
|
-
errorCode: errorCode,
|
|
1432
|
-
});
|
|
1433
|
-
_d.label = 13;
|
|
1434
|
-
case 13: return [2];
|
|
1435
|
-
}
|
|
1436
|
-
});
|
|
1437
|
-
}); };
|
|
1438
|
-
export var deserializeAws_json1_1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1439
|
-
var data, contents, response;
|
|
1440
|
-
return __generator(this, function (_a) {
|
|
1441
|
-
switch (_a.label) {
|
|
1442
|
-
case 0:
|
|
1443
|
-
if (output.statusCode >= 300) {
|
|
1444
|
-
return [2, deserializeAws_json1_1TagResourceCommandError(output, context)];
|
|
1445
|
-
}
|
|
1446
|
-
return [4, parseBody(output.body, context)];
|
|
1447
|
-
case 1:
|
|
1448
|
-
data = _a.sent();
|
|
1449
|
-
contents = {};
|
|
1450
|
-
contents = deserializeAws_json1_1TagResourceResponse(data, context);
|
|
1451
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1452
|
-
return [2, Promise.resolve(response)];
|
|
1453
|
-
}
|
|
1454
|
-
});
|
|
1455
|
-
}); };
|
|
1456
|
-
var deserializeAws_json1_1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1457
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1458
|
-
var _c;
|
|
1459
|
-
return __generator(this, function (_d) {
|
|
1460
|
-
switch (_d.label) {
|
|
1461
|
-
case 0:
|
|
1462
|
-
_a = [__assign({}, output)];
|
|
1463
|
-
_c = {};
|
|
1464
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1465
|
-
case 1:
|
|
1466
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1467
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1468
|
-
_b = errorCode;
|
|
1469
|
-
switch (_b) {
|
|
1470
|
-
case "InvalidInput": return [3, 2];
|
|
1471
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
1472
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
1473
|
-
case "com.amazonaws.servicediscovery#ResourceNotFoundException": return [3, 4];
|
|
1474
|
-
case "TooManyTagsException": return [3, 6];
|
|
1475
|
-
case "com.amazonaws.servicediscovery#TooManyTagsException": return [3, 6];
|
|
1476
|
-
}
|
|
1477
|
-
return [3, 8];
|
|
1478
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1479
|
-
case 3: throw _d.sent();
|
|
1480
|
-
case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1481
|
-
case 5: throw _d.sent();
|
|
1482
|
-
case 6: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
|
|
1483
|
-
case 7: throw _d.sent();
|
|
1484
|
-
case 8:
|
|
1485
|
-
parsedBody = parsedOutput.body;
|
|
1486
|
-
throwDefaultError({
|
|
1487
|
-
output: output,
|
|
1488
|
-
parsedBody: parsedBody,
|
|
1489
|
-
exceptionCtor: __BaseException,
|
|
1490
|
-
errorCode: errorCode,
|
|
1491
|
-
});
|
|
1492
|
-
_d.label = 9;
|
|
1493
|
-
case 9: return [2];
|
|
1494
|
-
}
|
|
1495
|
-
});
|
|
1496
|
-
}); };
|
|
1497
|
-
export var deserializeAws_json1_1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1498
|
-
var data, contents, response;
|
|
1499
|
-
return __generator(this, function (_a) {
|
|
1500
|
-
switch (_a.label) {
|
|
1501
|
-
case 0:
|
|
1502
|
-
if (output.statusCode >= 300) {
|
|
1503
|
-
return [2, deserializeAws_json1_1UntagResourceCommandError(output, context)];
|
|
1504
|
-
}
|
|
1505
|
-
return [4, parseBody(output.body, context)];
|
|
1506
|
-
case 1:
|
|
1507
|
-
data = _a.sent();
|
|
1508
|
-
contents = {};
|
|
1509
|
-
contents = deserializeAws_json1_1UntagResourceResponse(data, context);
|
|
1510
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1511
|
-
return [2, Promise.resolve(response)];
|
|
1512
|
-
}
|
|
1513
|
-
});
|
|
1514
|
-
}); };
|
|
1515
|
-
var deserializeAws_json1_1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1516
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1517
|
-
var _c;
|
|
1518
|
-
return __generator(this, function (_d) {
|
|
1519
|
-
switch (_d.label) {
|
|
1520
|
-
case 0:
|
|
1521
|
-
_a = [__assign({}, output)];
|
|
1522
|
-
_c = {};
|
|
1523
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1524
|
-
case 1:
|
|
1525
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1526
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1527
|
-
_b = errorCode;
|
|
1528
|
-
switch (_b) {
|
|
1529
|
-
case "InvalidInput": return [3, 2];
|
|
1530
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 2];
|
|
1531
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
1532
|
-
case "com.amazonaws.servicediscovery#ResourceNotFoundException": return [3, 4];
|
|
1533
|
-
}
|
|
1534
|
-
return [3, 6];
|
|
1535
|
-
case 2: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1536
|
-
case 3: throw _d.sent();
|
|
1537
|
-
case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1538
|
-
case 5: throw _d.sent();
|
|
1539
|
-
case 6:
|
|
1540
|
-
parsedBody = parsedOutput.body;
|
|
1541
|
-
throwDefaultError({
|
|
1542
|
-
output: output,
|
|
1543
|
-
parsedBody: parsedBody,
|
|
1544
|
-
exceptionCtor: __BaseException,
|
|
1545
|
-
errorCode: errorCode,
|
|
1546
|
-
});
|
|
1547
|
-
_d.label = 7;
|
|
1548
|
-
case 7: return [2];
|
|
1549
|
-
}
|
|
1550
|
-
});
|
|
1551
|
-
}); };
|
|
1552
|
-
export var deserializeAws_json1_1UpdateHttpNamespaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1553
|
-
var data, contents, response;
|
|
1554
|
-
return __generator(this, function (_a) {
|
|
1555
|
-
switch (_a.label) {
|
|
1556
|
-
case 0:
|
|
1557
|
-
if (output.statusCode >= 300) {
|
|
1558
|
-
return [2, deserializeAws_json1_1UpdateHttpNamespaceCommandError(output, context)];
|
|
1559
|
-
}
|
|
1560
|
-
return [4, parseBody(output.body, context)];
|
|
1561
|
-
case 1:
|
|
1562
|
-
data = _a.sent();
|
|
1563
|
-
contents = {};
|
|
1564
|
-
contents = deserializeAws_json1_1UpdateHttpNamespaceResponse(data, context);
|
|
1565
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1566
|
-
return [2, Promise.resolve(response)];
|
|
1567
|
-
}
|
|
1568
|
-
});
|
|
1569
|
-
}); };
|
|
1570
|
-
var deserializeAws_json1_1UpdateHttpNamespaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1571
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1572
|
-
var _c;
|
|
1573
|
-
return __generator(this, function (_d) {
|
|
1574
|
-
switch (_d.label) {
|
|
1575
|
-
case 0:
|
|
1576
|
-
_a = [__assign({}, output)];
|
|
1577
|
-
_c = {};
|
|
1578
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1579
|
-
case 1:
|
|
1580
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1581
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1582
|
-
_b = errorCode;
|
|
1583
|
-
switch (_b) {
|
|
1584
|
-
case "DuplicateRequest": return [3, 2];
|
|
1585
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest": return [3, 2];
|
|
1586
|
-
case "InvalidInput": return [3, 4];
|
|
1587
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 4];
|
|
1588
|
-
case "NamespaceNotFound": return [3, 6];
|
|
1589
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound": return [3, 6];
|
|
1590
|
-
case "ResourceInUse": return [3, 8];
|
|
1591
|
-
case "com.amazonaws.servicediscovery#ResourceInUse": return [3, 8];
|
|
1592
|
-
}
|
|
1593
|
-
return [3, 10];
|
|
1594
|
-
case 2: return [4, deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context)];
|
|
1595
|
-
case 3: throw _d.sent();
|
|
1596
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1597
|
-
case 5: throw _d.sent();
|
|
1598
|
-
case 6: return [4, deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context)];
|
|
1599
|
-
case 7: throw _d.sent();
|
|
1600
|
-
case 8: return [4, deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context)];
|
|
1601
|
-
case 9: throw _d.sent();
|
|
1602
|
-
case 10:
|
|
1603
|
-
parsedBody = parsedOutput.body;
|
|
1604
|
-
throwDefaultError({
|
|
1605
|
-
output: output,
|
|
1606
|
-
parsedBody: parsedBody,
|
|
1607
|
-
exceptionCtor: __BaseException,
|
|
1608
|
-
errorCode: errorCode,
|
|
1609
|
-
});
|
|
1610
|
-
_d.label = 11;
|
|
1611
|
-
case 11: return [2];
|
|
1612
|
-
}
|
|
1613
|
-
});
|
|
1614
|
-
}); };
|
|
1615
|
-
export var deserializeAws_json1_1UpdateInstanceCustomHealthStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1616
|
-
var response;
|
|
1617
|
-
return __generator(this, function (_a) {
|
|
1618
|
-
switch (_a.label) {
|
|
1619
|
-
case 0:
|
|
1620
|
-
if (output.statusCode >= 300) {
|
|
1621
|
-
return [2, deserializeAws_json1_1UpdateInstanceCustomHealthStatusCommandError(output, context)];
|
|
1622
|
-
}
|
|
1623
|
-
return [4, collectBody(output.body, context)];
|
|
1624
|
-
case 1:
|
|
1625
|
-
_a.sent();
|
|
1626
|
-
response = {
|
|
1627
|
-
$metadata: deserializeMetadata(output),
|
|
1628
|
-
};
|
|
1629
|
-
return [2, Promise.resolve(response)];
|
|
1630
|
-
}
|
|
1631
|
-
});
|
|
1632
|
-
}); };
|
|
1633
|
-
var deserializeAws_json1_1UpdateInstanceCustomHealthStatusCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1634
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1635
|
-
var _c;
|
|
1636
|
-
return __generator(this, function (_d) {
|
|
1637
|
-
switch (_d.label) {
|
|
1638
|
-
case 0:
|
|
1639
|
-
_a = [__assign({}, output)];
|
|
1640
|
-
_c = {};
|
|
1641
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1642
|
-
case 1:
|
|
1643
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1644
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1645
|
-
_b = errorCode;
|
|
1646
|
-
switch (_b) {
|
|
1647
|
-
case "CustomHealthNotFound": return [3, 2];
|
|
1648
|
-
case "com.amazonaws.servicediscovery#CustomHealthNotFound": return [3, 2];
|
|
1649
|
-
case "InstanceNotFound": return [3, 4];
|
|
1650
|
-
case "com.amazonaws.servicediscovery#InstanceNotFound": return [3, 4];
|
|
1651
|
-
case "InvalidInput": return [3, 6];
|
|
1652
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 6];
|
|
1653
|
-
case "ServiceNotFound": return [3, 8];
|
|
1654
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound": return [3, 8];
|
|
1655
|
-
}
|
|
1656
|
-
return [3, 10];
|
|
1657
|
-
case 2: return [4, deserializeAws_json1_1CustomHealthNotFoundResponse(parsedOutput, context)];
|
|
1658
|
-
case 3: throw _d.sent();
|
|
1659
|
-
case 4: return [4, deserializeAws_json1_1InstanceNotFoundResponse(parsedOutput, context)];
|
|
1660
|
-
case 5: throw _d.sent();
|
|
1661
|
-
case 6: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1662
|
-
case 7: throw _d.sent();
|
|
1663
|
-
case 8: return [4, deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context)];
|
|
1664
|
-
case 9: throw _d.sent();
|
|
1665
|
-
case 10:
|
|
1666
|
-
parsedBody = parsedOutput.body;
|
|
1667
|
-
throwDefaultError({
|
|
1668
|
-
output: output,
|
|
1669
|
-
parsedBody: parsedBody,
|
|
1670
|
-
exceptionCtor: __BaseException,
|
|
1671
|
-
errorCode: errorCode,
|
|
1672
|
-
});
|
|
1673
|
-
_d.label = 11;
|
|
1674
|
-
case 11: return [2];
|
|
1675
|
-
}
|
|
1676
|
-
});
|
|
1677
|
-
}); };
|
|
1678
|
-
export var deserializeAws_json1_1UpdatePrivateDnsNamespaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1679
|
-
var data, contents, response;
|
|
1680
|
-
return __generator(this, function (_a) {
|
|
1681
|
-
switch (_a.label) {
|
|
1682
|
-
case 0:
|
|
1683
|
-
if (output.statusCode >= 300) {
|
|
1684
|
-
return [2, deserializeAws_json1_1UpdatePrivateDnsNamespaceCommandError(output, context)];
|
|
1685
|
-
}
|
|
1686
|
-
return [4, parseBody(output.body, context)];
|
|
1687
|
-
case 1:
|
|
1688
|
-
data = _a.sent();
|
|
1689
|
-
contents = {};
|
|
1690
|
-
contents = deserializeAws_json1_1UpdatePrivateDnsNamespaceResponse(data, context);
|
|
1691
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1692
|
-
return [2, Promise.resolve(response)];
|
|
1693
|
-
}
|
|
1694
|
-
});
|
|
1695
|
-
}); };
|
|
1696
|
-
var deserializeAws_json1_1UpdatePrivateDnsNamespaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1697
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1698
|
-
var _c;
|
|
1699
|
-
return __generator(this, function (_d) {
|
|
1700
|
-
switch (_d.label) {
|
|
1701
|
-
case 0:
|
|
1702
|
-
_a = [__assign({}, output)];
|
|
1703
|
-
_c = {};
|
|
1704
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1705
|
-
case 1:
|
|
1706
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1707
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1708
|
-
_b = errorCode;
|
|
1709
|
-
switch (_b) {
|
|
1710
|
-
case "DuplicateRequest": return [3, 2];
|
|
1711
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest": return [3, 2];
|
|
1712
|
-
case "InvalidInput": return [3, 4];
|
|
1713
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 4];
|
|
1714
|
-
case "NamespaceNotFound": return [3, 6];
|
|
1715
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound": return [3, 6];
|
|
1716
|
-
case "ResourceInUse": return [3, 8];
|
|
1717
|
-
case "com.amazonaws.servicediscovery#ResourceInUse": return [3, 8];
|
|
1718
|
-
}
|
|
1719
|
-
return [3, 10];
|
|
1720
|
-
case 2: return [4, deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context)];
|
|
1721
|
-
case 3: throw _d.sent();
|
|
1722
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1723
|
-
case 5: throw _d.sent();
|
|
1724
|
-
case 6: return [4, deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context)];
|
|
1725
|
-
case 7: throw _d.sent();
|
|
1726
|
-
case 8: return [4, deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context)];
|
|
1727
|
-
case 9: throw _d.sent();
|
|
1728
|
-
case 10:
|
|
1729
|
-
parsedBody = parsedOutput.body;
|
|
1730
|
-
throwDefaultError({
|
|
1731
|
-
output: output,
|
|
1732
|
-
parsedBody: parsedBody,
|
|
1733
|
-
exceptionCtor: __BaseException,
|
|
1734
|
-
errorCode: errorCode,
|
|
1735
|
-
});
|
|
1736
|
-
_d.label = 11;
|
|
1737
|
-
case 11: return [2];
|
|
1738
|
-
}
|
|
1739
|
-
});
|
|
1740
|
-
}); };
|
|
1741
|
-
export var deserializeAws_json1_1UpdatePublicDnsNamespaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1742
|
-
var data, contents, response;
|
|
1743
|
-
return __generator(this, function (_a) {
|
|
1744
|
-
switch (_a.label) {
|
|
1745
|
-
case 0:
|
|
1746
|
-
if (output.statusCode >= 300) {
|
|
1747
|
-
return [2, deserializeAws_json1_1UpdatePublicDnsNamespaceCommandError(output, context)];
|
|
1748
|
-
}
|
|
1749
|
-
return [4, parseBody(output.body, context)];
|
|
1750
|
-
case 1:
|
|
1751
|
-
data = _a.sent();
|
|
1752
|
-
contents = {};
|
|
1753
|
-
contents = deserializeAws_json1_1UpdatePublicDnsNamespaceResponse(data, context);
|
|
1754
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1755
|
-
return [2, Promise.resolve(response)];
|
|
1756
|
-
}
|
|
1757
|
-
});
|
|
1758
|
-
}); };
|
|
1759
|
-
var deserializeAws_json1_1UpdatePublicDnsNamespaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1760
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1761
|
-
var _c;
|
|
1762
|
-
return __generator(this, function (_d) {
|
|
1763
|
-
switch (_d.label) {
|
|
1764
|
-
case 0:
|
|
1765
|
-
_a = [__assign({}, output)];
|
|
1766
|
-
_c = {};
|
|
1767
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1768
|
-
case 1:
|
|
1769
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1770
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1771
|
-
_b = errorCode;
|
|
1772
|
-
switch (_b) {
|
|
1773
|
-
case "DuplicateRequest": return [3, 2];
|
|
1774
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest": return [3, 2];
|
|
1775
|
-
case "InvalidInput": return [3, 4];
|
|
1776
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 4];
|
|
1777
|
-
case "NamespaceNotFound": return [3, 6];
|
|
1778
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound": return [3, 6];
|
|
1779
|
-
case "ResourceInUse": return [3, 8];
|
|
1780
|
-
case "com.amazonaws.servicediscovery#ResourceInUse": return [3, 8];
|
|
1781
|
-
}
|
|
1782
|
-
return [3, 10];
|
|
1783
|
-
case 2: return [4, deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context)];
|
|
1784
|
-
case 3: throw _d.sent();
|
|
1785
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1786
|
-
case 5: throw _d.sent();
|
|
1787
|
-
case 6: return [4, deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context)];
|
|
1788
|
-
case 7: throw _d.sent();
|
|
1789
|
-
case 8: return [4, deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context)];
|
|
1790
|
-
case 9: throw _d.sent();
|
|
1791
|
-
case 10:
|
|
1792
|
-
parsedBody = parsedOutput.body;
|
|
1793
|
-
throwDefaultError({
|
|
1794
|
-
output: output,
|
|
1795
|
-
parsedBody: parsedBody,
|
|
1796
|
-
exceptionCtor: __BaseException,
|
|
1797
|
-
errorCode: errorCode,
|
|
1798
|
-
});
|
|
1799
|
-
_d.label = 11;
|
|
1800
|
-
case 11: return [2];
|
|
1801
|
-
}
|
|
1802
|
-
});
|
|
1803
|
-
}); };
|
|
1804
|
-
export var deserializeAws_json1_1UpdateServiceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1805
|
-
var data, contents, response;
|
|
1806
|
-
return __generator(this, function (_a) {
|
|
1807
|
-
switch (_a.label) {
|
|
1808
|
-
case 0:
|
|
1809
|
-
if (output.statusCode >= 300) {
|
|
1810
|
-
return [2, deserializeAws_json1_1UpdateServiceCommandError(output, context)];
|
|
1811
|
-
}
|
|
1812
|
-
return [4, parseBody(output.body, context)];
|
|
1813
|
-
case 1:
|
|
1814
|
-
data = _a.sent();
|
|
1815
|
-
contents = {};
|
|
1816
|
-
contents = deserializeAws_json1_1UpdateServiceResponse(data, context);
|
|
1817
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1818
|
-
return [2, Promise.resolve(response)];
|
|
1819
|
-
}
|
|
1820
|
-
});
|
|
1821
|
-
}); };
|
|
1822
|
-
var deserializeAws_json1_1UpdateServiceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1823
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1824
|
-
var _c;
|
|
1825
|
-
return __generator(this, function (_d) {
|
|
1826
|
-
switch (_d.label) {
|
|
1827
|
-
case 0:
|
|
1828
|
-
_a = [__assign({}, output)];
|
|
1829
|
-
_c = {};
|
|
1830
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1831
|
-
case 1:
|
|
1832
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1833
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1834
|
-
_b = errorCode;
|
|
1835
|
-
switch (_b) {
|
|
1836
|
-
case "DuplicateRequest": return [3, 2];
|
|
1837
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest": return [3, 2];
|
|
1838
|
-
case "InvalidInput": return [3, 4];
|
|
1839
|
-
case "com.amazonaws.servicediscovery#InvalidInput": return [3, 4];
|
|
1840
|
-
case "ServiceNotFound": return [3, 6];
|
|
1841
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound": return [3, 6];
|
|
1842
|
-
}
|
|
1843
|
-
return [3, 8];
|
|
1844
|
-
case 2: return [4, deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context)];
|
|
1845
|
-
case 3: throw _d.sent();
|
|
1846
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputResponse(parsedOutput, context)];
|
|
1847
|
-
case 5: throw _d.sent();
|
|
1848
|
-
case 6: return [4, deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context)];
|
|
1849
|
-
case 7: throw _d.sent();
|
|
1850
|
-
case 8:
|
|
1851
|
-
parsedBody = parsedOutput.body;
|
|
1852
|
-
throwDefaultError({
|
|
1853
|
-
output: output,
|
|
1854
|
-
parsedBody: parsedBody,
|
|
1855
|
-
exceptionCtor: __BaseException,
|
|
1856
|
-
errorCode: errorCode,
|
|
1857
|
-
});
|
|
1858
|
-
_d.label = 9;
|
|
1859
|
-
case 9: return [2];
|
|
6
|
+
export const serializeAws_json1_1CreateHttpNamespaceCommand = async (input, context) => {
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/x-amz-json-1.1",
|
|
9
|
+
"x-amz-target": "Route53AutoNaming_v20170314.CreateHttpNamespace",
|
|
10
|
+
};
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify(serializeAws_json1_1CreateHttpNamespaceRequest(input, context));
|
|
13
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
14
|
+
};
|
|
15
|
+
export const serializeAws_json1_1CreatePrivateDnsNamespaceCommand = async (input, context) => {
|
|
16
|
+
const headers = {
|
|
17
|
+
"content-type": "application/x-amz-json-1.1",
|
|
18
|
+
"x-amz-target": "Route53AutoNaming_v20170314.CreatePrivateDnsNamespace",
|
|
19
|
+
};
|
|
20
|
+
let body;
|
|
21
|
+
body = JSON.stringify(serializeAws_json1_1CreatePrivateDnsNamespaceRequest(input, context));
|
|
22
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
23
|
+
};
|
|
24
|
+
export const serializeAws_json1_1CreatePublicDnsNamespaceCommand = async (input, context) => {
|
|
25
|
+
const headers = {
|
|
26
|
+
"content-type": "application/x-amz-json-1.1",
|
|
27
|
+
"x-amz-target": "Route53AutoNaming_v20170314.CreatePublicDnsNamespace",
|
|
28
|
+
};
|
|
29
|
+
let body;
|
|
30
|
+
body = JSON.stringify(serializeAws_json1_1CreatePublicDnsNamespaceRequest(input, context));
|
|
31
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
32
|
+
};
|
|
33
|
+
export const serializeAws_json1_1CreateServiceCommand = async (input, context) => {
|
|
34
|
+
const headers = {
|
|
35
|
+
"content-type": "application/x-amz-json-1.1",
|
|
36
|
+
"x-amz-target": "Route53AutoNaming_v20170314.CreateService",
|
|
37
|
+
};
|
|
38
|
+
let body;
|
|
39
|
+
body = JSON.stringify(serializeAws_json1_1CreateServiceRequest(input, context));
|
|
40
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
+
};
|
|
42
|
+
export const serializeAws_json1_1DeleteNamespaceCommand = async (input, context) => {
|
|
43
|
+
const headers = {
|
|
44
|
+
"content-type": "application/x-amz-json-1.1",
|
|
45
|
+
"x-amz-target": "Route53AutoNaming_v20170314.DeleteNamespace",
|
|
46
|
+
};
|
|
47
|
+
let body;
|
|
48
|
+
body = JSON.stringify(serializeAws_json1_1DeleteNamespaceRequest(input, context));
|
|
49
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
50
|
+
};
|
|
51
|
+
export const serializeAws_json1_1DeleteServiceCommand = async (input, context) => {
|
|
52
|
+
const headers = {
|
|
53
|
+
"content-type": "application/x-amz-json-1.1",
|
|
54
|
+
"x-amz-target": "Route53AutoNaming_v20170314.DeleteService",
|
|
55
|
+
};
|
|
56
|
+
let body;
|
|
57
|
+
body = JSON.stringify(serializeAws_json1_1DeleteServiceRequest(input, context));
|
|
58
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
59
|
+
};
|
|
60
|
+
export const serializeAws_json1_1DeregisterInstanceCommand = async (input, context) => {
|
|
61
|
+
const headers = {
|
|
62
|
+
"content-type": "application/x-amz-json-1.1",
|
|
63
|
+
"x-amz-target": "Route53AutoNaming_v20170314.DeregisterInstance",
|
|
64
|
+
};
|
|
65
|
+
let body;
|
|
66
|
+
body = JSON.stringify(serializeAws_json1_1DeregisterInstanceRequest(input, context));
|
|
67
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
68
|
+
};
|
|
69
|
+
export const serializeAws_json1_1DiscoverInstancesCommand = async (input, context) => {
|
|
70
|
+
const headers = {
|
|
71
|
+
"content-type": "application/x-amz-json-1.1",
|
|
72
|
+
"x-amz-target": "Route53AutoNaming_v20170314.DiscoverInstances",
|
|
73
|
+
};
|
|
74
|
+
let body;
|
|
75
|
+
body = JSON.stringify(serializeAws_json1_1DiscoverInstancesRequest(input, context));
|
|
76
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
77
|
+
if (context.disableHostPrefix !== true) {
|
|
78
|
+
resolvedHostname = "data-" + resolvedHostname;
|
|
79
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
80
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1860
81
|
}
|
|
1861
|
-
}
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
82
|
+
}
|
|
83
|
+
return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
|
|
84
|
+
};
|
|
85
|
+
export const serializeAws_json1_1GetInstanceCommand = async (input, context) => {
|
|
86
|
+
const headers = {
|
|
87
|
+
"content-type": "application/x-amz-json-1.1",
|
|
88
|
+
"x-amz-target": "Route53AutoNaming_v20170314.GetInstance",
|
|
89
|
+
};
|
|
90
|
+
let body;
|
|
91
|
+
body = JSON.stringify(serializeAws_json1_1GetInstanceRequest(input, context));
|
|
92
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
93
|
+
};
|
|
94
|
+
export const serializeAws_json1_1GetInstancesHealthStatusCommand = async (input, context) => {
|
|
95
|
+
const headers = {
|
|
96
|
+
"content-type": "application/x-amz-json-1.1",
|
|
97
|
+
"x-amz-target": "Route53AutoNaming_v20170314.GetInstancesHealthStatus",
|
|
98
|
+
};
|
|
99
|
+
let body;
|
|
100
|
+
body = JSON.stringify(serializeAws_json1_1GetInstancesHealthStatusRequest(input, context));
|
|
101
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
102
|
+
};
|
|
103
|
+
export const serializeAws_json1_1GetNamespaceCommand = async (input, context) => {
|
|
104
|
+
const headers = {
|
|
105
|
+
"content-type": "application/x-amz-json-1.1",
|
|
106
|
+
"x-amz-target": "Route53AutoNaming_v20170314.GetNamespace",
|
|
107
|
+
};
|
|
108
|
+
let body;
|
|
109
|
+
body = JSON.stringify(serializeAws_json1_1GetNamespaceRequest(input, context));
|
|
110
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
111
|
+
};
|
|
112
|
+
export const serializeAws_json1_1GetOperationCommand = async (input, context) => {
|
|
113
|
+
const headers = {
|
|
114
|
+
"content-type": "application/x-amz-json-1.1",
|
|
115
|
+
"x-amz-target": "Route53AutoNaming_v20170314.GetOperation",
|
|
116
|
+
};
|
|
117
|
+
let body;
|
|
118
|
+
body = JSON.stringify(serializeAws_json1_1GetOperationRequest(input, context));
|
|
119
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
120
|
+
};
|
|
121
|
+
export const serializeAws_json1_1GetServiceCommand = async (input, context) => {
|
|
122
|
+
const headers = {
|
|
123
|
+
"content-type": "application/x-amz-json-1.1",
|
|
124
|
+
"x-amz-target": "Route53AutoNaming_v20170314.GetService",
|
|
125
|
+
};
|
|
126
|
+
let body;
|
|
127
|
+
body = JSON.stringify(serializeAws_json1_1GetServiceRequest(input, context));
|
|
128
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
129
|
+
};
|
|
130
|
+
export const serializeAws_json1_1ListInstancesCommand = async (input, context) => {
|
|
131
|
+
const headers = {
|
|
132
|
+
"content-type": "application/x-amz-json-1.1",
|
|
133
|
+
"x-amz-target": "Route53AutoNaming_v20170314.ListInstances",
|
|
134
|
+
};
|
|
135
|
+
let body;
|
|
136
|
+
body = JSON.stringify(serializeAws_json1_1ListInstancesRequest(input, context));
|
|
137
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
138
|
+
};
|
|
139
|
+
export const serializeAws_json1_1ListNamespacesCommand = async (input, context) => {
|
|
140
|
+
const headers = {
|
|
141
|
+
"content-type": "application/x-amz-json-1.1",
|
|
142
|
+
"x-amz-target": "Route53AutoNaming_v20170314.ListNamespaces",
|
|
143
|
+
};
|
|
144
|
+
let body;
|
|
145
|
+
body = JSON.stringify(serializeAws_json1_1ListNamespacesRequest(input, context));
|
|
146
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
147
|
+
};
|
|
148
|
+
export const serializeAws_json1_1ListOperationsCommand = async (input, context) => {
|
|
149
|
+
const headers = {
|
|
150
|
+
"content-type": "application/x-amz-json-1.1",
|
|
151
|
+
"x-amz-target": "Route53AutoNaming_v20170314.ListOperations",
|
|
152
|
+
};
|
|
153
|
+
let body;
|
|
154
|
+
body = JSON.stringify(serializeAws_json1_1ListOperationsRequest(input, context));
|
|
155
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
156
|
+
};
|
|
157
|
+
export const serializeAws_json1_1ListServicesCommand = async (input, context) => {
|
|
158
|
+
const headers = {
|
|
159
|
+
"content-type": "application/x-amz-json-1.1",
|
|
160
|
+
"x-amz-target": "Route53AutoNaming_v20170314.ListServices",
|
|
161
|
+
};
|
|
162
|
+
let body;
|
|
163
|
+
body = JSON.stringify(serializeAws_json1_1ListServicesRequest(input, context));
|
|
164
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
165
|
+
};
|
|
166
|
+
export const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
|
|
167
|
+
const headers = {
|
|
168
|
+
"content-type": "application/x-amz-json-1.1",
|
|
169
|
+
"x-amz-target": "Route53AutoNaming_v20170314.ListTagsForResource",
|
|
170
|
+
};
|
|
171
|
+
let body;
|
|
172
|
+
body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
|
|
173
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
174
|
+
};
|
|
175
|
+
export const serializeAws_json1_1RegisterInstanceCommand = async (input, context) => {
|
|
176
|
+
const headers = {
|
|
177
|
+
"content-type": "application/x-amz-json-1.1",
|
|
178
|
+
"x-amz-target": "Route53AutoNaming_v20170314.RegisterInstance",
|
|
179
|
+
};
|
|
180
|
+
let body;
|
|
181
|
+
body = JSON.stringify(serializeAws_json1_1RegisterInstanceRequest(input, context));
|
|
182
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
183
|
+
};
|
|
184
|
+
export const serializeAws_json1_1TagResourceCommand = async (input, context) => {
|
|
185
|
+
const headers = {
|
|
186
|
+
"content-type": "application/x-amz-json-1.1",
|
|
187
|
+
"x-amz-target": "Route53AutoNaming_v20170314.TagResource",
|
|
188
|
+
};
|
|
189
|
+
let body;
|
|
190
|
+
body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
|
|
191
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
192
|
+
};
|
|
193
|
+
export const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
|
|
194
|
+
const headers = {
|
|
195
|
+
"content-type": "application/x-amz-json-1.1",
|
|
196
|
+
"x-amz-target": "Route53AutoNaming_v20170314.UntagResource",
|
|
197
|
+
};
|
|
198
|
+
let body;
|
|
199
|
+
body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
|
|
200
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
201
|
+
};
|
|
202
|
+
export const serializeAws_json1_1UpdateHttpNamespaceCommand = async (input, context) => {
|
|
203
|
+
const headers = {
|
|
204
|
+
"content-type": "application/x-amz-json-1.1",
|
|
205
|
+
"x-amz-target": "Route53AutoNaming_v20170314.UpdateHttpNamespace",
|
|
206
|
+
};
|
|
207
|
+
let body;
|
|
208
|
+
body = JSON.stringify(serializeAws_json1_1UpdateHttpNamespaceRequest(input, context));
|
|
209
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
210
|
+
};
|
|
211
|
+
export const serializeAws_json1_1UpdateInstanceCustomHealthStatusCommand = async (input, context) => {
|
|
212
|
+
const headers = {
|
|
213
|
+
"content-type": "application/x-amz-json-1.1",
|
|
214
|
+
"x-amz-target": "Route53AutoNaming_v20170314.UpdateInstanceCustomHealthStatus",
|
|
215
|
+
};
|
|
216
|
+
let body;
|
|
217
|
+
body = JSON.stringify(serializeAws_json1_1UpdateInstanceCustomHealthStatusRequest(input, context));
|
|
218
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
219
|
+
};
|
|
220
|
+
export const serializeAws_json1_1UpdatePrivateDnsNamespaceCommand = async (input, context) => {
|
|
221
|
+
const headers = {
|
|
222
|
+
"content-type": "application/x-amz-json-1.1",
|
|
223
|
+
"x-amz-target": "Route53AutoNaming_v20170314.UpdatePrivateDnsNamespace",
|
|
224
|
+
};
|
|
225
|
+
let body;
|
|
226
|
+
body = JSON.stringify(serializeAws_json1_1UpdatePrivateDnsNamespaceRequest(input, context));
|
|
227
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
228
|
+
};
|
|
229
|
+
export const serializeAws_json1_1UpdatePublicDnsNamespaceCommand = async (input, context) => {
|
|
230
|
+
const headers = {
|
|
231
|
+
"content-type": "application/x-amz-json-1.1",
|
|
232
|
+
"x-amz-target": "Route53AutoNaming_v20170314.UpdatePublicDnsNamespace",
|
|
233
|
+
};
|
|
234
|
+
let body;
|
|
235
|
+
body = JSON.stringify(serializeAws_json1_1UpdatePublicDnsNamespaceRequest(input, context));
|
|
236
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
237
|
+
};
|
|
238
|
+
export const serializeAws_json1_1UpdateServiceCommand = async (input, context) => {
|
|
239
|
+
const headers = {
|
|
240
|
+
"content-type": "application/x-amz-json-1.1",
|
|
241
|
+
"x-amz-target": "Route53AutoNaming_v20170314.UpdateService",
|
|
242
|
+
};
|
|
243
|
+
let body;
|
|
244
|
+
body = JSON.stringify(serializeAws_json1_1UpdateServiceRequest(input, context));
|
|
245
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
246
|
+
};
|
|
247
|
+
export const deserializeAws_json1_1CreateHttpNamespaceCommand = async (output, context) => {
|
|
248
|
+
if (output.statusCode >= 300) {
|
|
249
|
+
return deserializeAws_json1_1CreateHttpNamespaceCommandError(output, context);
|
|
250
|
+
}
|
|
251
|
+
const data = await parseBody(output.body, context);
|
|
252
|
+
let contents = {};
|
|
253
|
+
contents = deserializeAws_json1_1CreateHttpNamespaceResponse(data, context);
|
|
254
|
+
const response = {
|
|
255
|
+
$metadata: deserializeMetadata(output),
|
|
256
|
+
...contents,
|
|
257
|
+
};
|
|
258
|
+
return Promise.resolve(response);
|
|
259
|
+
};
|
|
260
|
+
const deserializeAws_json1_1CreateHttpNamespaceCommandError = async (output, context) => {
|
|
261
|
+
const parsedOutput = {
|
|
262
|
+
...output,
|
|
263
|
+
body: await parseErrorBody(output.body, context),
|
|
264
|
+
};
|
|
265
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
266
|
+
switch (errorCode) {
|
|
267
|
+
case "DuplicateRequest":
|
|
268
|
+
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
269
|
+
throw await deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context);
|
|
270
|
+
case "InvalidInput":
|
|
271
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
272
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
273
|
+
case "NamespaceAlreadyExists":
|
|
274
|
+
case "com.amazonaws.servicediscovery#NamespaceAlreadyExists":
|
|
275
|
+
throw await deserializeAws_json1_1NamespaceAlreadyExistsResponse(parsedOutput, context);
|
|
276
|
+
case "ResourceLimitExceeded":
|
|
277
|
+
case "com.amazonaws.servicediscovery#ResourceLimitExceeded":
|
|
278
|
+
throw await deserializeAws_json1_1ResourceLimitExceededResponse(parsedOutput, context);
|
|
279
|
+
case "TooManyTagsException":
|
|
280
|
+
case "com.amazonaws.servicediscovery#TooManyTagsException":
|
|
281
|
+
throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
282
|
+
default:
|
|
283
|
+
const parsedBody = parsedOutput.body;
|
|
284
|
+
throwDefaultError({
|
|
285
|
+
output,
|
|
286
|
+
parsedBody,
|
|
287
|
+
exceptionCtor: __BaseException,
|
|
288
|
+
errorCode,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
export const deserializeAws_json1_1CreatePrivateDnsNamespaceCommand = async (output, context) => {
|
|
293
|
+
if (output.statusCode >= 300) {
|
|
294
|
+
return deserializeAws_json1_1CreatePrivateDnsNamespaceCommandError(output, context);
|
|
295
|
+
}
|
|
296
|
+
const data = await parseBody(output.body, context);
|
|
297
|
+
let contents = {};
|
|
298
|
+
contents = deserializeAws_json1_1CreatePrivateDnsNamespaceResponse(data, context);
|
|
299
|
+
const response = {
|
|
300
|
+
$metadata: deserializeMetadata(output),
|
|
301
|
+
...contents,
|
|
302
|
+
};
|
|
303
|
+
return Promise.resolve(response);
|
|
304
|
+
};
|
|
305
|
+
const deserializeAws_json1_1CreatePrivateDnsNamespaceCommandError = async (output, context) => {
|
|
306
|
+
const parsedOutput = {
|
|
307
|
+
...output,
|
|
308
|
+
body: await parseErrorBody(output.body, context),
|
|
309
|
+
};
|
|
310
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
311
|
+
switch (errorCode) {
|
|
312
|
+
case "DuplicateRequest":
|
|
313
|
+
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
314
|
+
throw await deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context);
|
|
315
|
+
case "InvalidInput":
|
|
316
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
317
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
318
|
+
case "NamespaceAlreadyExists":
|
|
319
|
+
case "com.amazonaws.servicediscovery#NamespaceAlreadyExists":
|
|
320
|
+
throw await deserializeAws_json1_1NamespaceAlreadyExistsResponse(parsedOutput, context);
|
|
321
|
+
case "ResourceLimitExceeded":
|
|
322
|
+
case "com.amazonaws.servicediscovery#ResourceLimitExceeded":
|
|
323
|
+
throw await deserializeAws_json1_1ResourceLimitExceededResponse(parsedOutput, context);
|
|
324
|
+
case "TooManyTagsException":
|
|
325
|
+
case "com.amazonaws.servicediscovery#TooManyTagsException":
|
|
326
|
+
throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
327
|
+
default:
|
|
328
|
+
const parsedBody = parsedOutput.body;
|
|
329
|
+
throwDefaultError({
|
|
330
|
+
output,
|
|
331
|
+
parsedBody,
|
|
332
|
+
exceptionCtor: __BaseException,
|
|
333
|
+
errorCode,
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
export const deserializeAws_json1_1CreatePublicDnsNamespaceCommand = async (output, context) => {
|
|
338
|
+
if (output.statusCode >= 300) {
|
|
339
|
+
return deserializeAws_json1_1CreatePublicDnsNamespaceCommandError(output, context);
|
|
340
|
+
}
|
|
341
|
+
const data = await parseBody(output.body, context);
|
|
342
|
+
let contents = {};
|
|
343
|
+
contents = deserializeAws_json1_1CreatePublicDnsNamespaceResponse(data, context);
|
|
344
|
+
const response = {
|
|
345
|
+
$metadata: deserializeMetadata(output),
|
|
346
|
+
...contents,
|
|
347
|
+
};
|
|
348
|
+
return Promise.resolve(response);
|
|
349
|
+
};
|
|
350
|
+
const deserializeAws_json1_1CreatePublicDnsNamespaceCommandError = async (output, context) => {
|
|
351
|
+
const parsedOutput = {
|
|
352
|
+
...output,
|
|
353
|
+
body: await parseErrorBody(output.body, context),
|
|
354
|
+
};
|
|
355
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
356
|
+
switch (errorCode) {
|
|
357
|
+
case "DuplicateRequest":
|
|
358
|
+
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
359
|
+
throw await deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context);
|
|
360
|
+
case "InvalidInput":
|
|
361
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
362
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
363
|
+
case "NamespaceAlreadyExists":
|
|
364
|
+
case "com.amazonaws.servicediscovery#NamespaceAlreadyExists":
|
|
365
|
+
throw await deserializeAws_json1_1NamespaceAlreadyExistsResponse(parsedOutput, context);
|
|
366
|
+
case "ResourceLimitExceeded":
|
|
367
|
+
case "com.amazonaws.servicediscovery#ResourceLimitExceeded":
|
|
368
|
+
throw await deserializeAws_json1_1ResourceLimitExceededResponse(parsedOutput, context);
|
|
369
|
+
case "TooManyTagsException":
|
|
370
|
+
case "com.amazonaws.servicediscovery#TooManyTagsException":
|
|
371
|
+
throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
372
|
+
default:
|
|
373
|
+
const parsedBody = parsedOutput.body;
|
|
374
|
+
throwDefaultError({
|
|
375
|
+
output,
|
|
376
|
+
parsedBody,
|
|
377
|
+
exceptionCtor: __BaseException,
|
|
378
|
+
errorCode,
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
export const deserializeAws_json1_1CreateServiceCommand = async (output, context) => {
|
|
383
|
+
if (output.statusCode >= 300) {
|
|
384
|
+
return deserializeAws_json1_1CreateServiceCommandError(output, context);
|
|
385
|
+
}
|
|
386
|
+
const data = await parseBody(output.body, context);
|
|
387
|
+
let contents = {};
|
|
388
|
+
contents = deserializeAws_json1_1CreateServiceResponse(data, context);
|
|
389
|
+
const response = {
|
|
390
|
+
$metadata: deserializeMetadata(output),
|
|
391
|
+
...contents,
|
|
392
|
+
};
|
|
393
|
+
return Promise.resolve(response);
|
|
394
|
+
};
|
|
395
|
+
const deserializeAws_json1_1CreateServiceCommandError = async (output, context) => {
|
|
396
|
+
const parsedOutput = {
|
|
397
|
+
...output,
|
|
398
|
+
body: await parseErrorBody(output.body, context),
|
|
399
|
+
};
|
|
400
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
401
|
+
switch (errorCode) {
|
|
402
|
+
case "InvalidInput":
|
|
403
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
404
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
405
|
+
case "NamespaceNotFound":
|
|
406
|
+
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
407
|
+
throw await deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context);
|
|
408
|
+
case "ResourceLimitExceeded":
|
|
409
|
+
case "com.amazonaws.servicediscovery#ResourceLimitExceeded":
|
|
410
|
+
throw await deserializeAws_json1_1ResourceLimitExceededResponse(parsedOutput, context);
|
|
411
|
+
case "ServiceAlreadyExists":
|
|
412
|
+
case "com.amazonaws.servicediscovery#ServiceAlreadyExists":
|
|
413
|
+
throw await deserializeAws_json1_1ServiceAlreadyExistsResponse(parsedOutput, context);
|
|
414
|
+
case "TooManyTagsException":
|
|
415
|
+
case "com.amazonaws.servicediscovery#TooManyTagsException":
|
|
416
|
+
throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
417
|
+
default:
|
|
418
|
+
const parsedBody = parsedOutput.body;
|
|
419
|
+
throwDefaultError({
|
|
420
|
+
output,
|
|
421
|
+
parsedBody,
|
|
422
|
+
exceptionCtor: __BaseException,
|
|
423
|
+
errorCode,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
export const deserializeAws_json1_1DeleteNamespaceCommand = async (output, context) => {
|
|
428
|
+
if (output.statusCode >= 300) {
|
|
429
|
+
return deserializeAws_json1_1DeleteNamespaceCommandError(output, context);
|
|
430
|
+
}
|
|
431
|
+
const data = await parseBody(output.body, context);
|
|
432
|
+
let contents = {};
|
|
433
|
+
contents = deserializeAws_json1_1DeleteNamespaceResponse(data, context);
|
|
434
|
+
const response = {
|
|
435
|
+
$metadata: deserializeMetadata(output),
|
|
436
|
+
...contents,
|
|
437
|
+
};
|
|
438
|
+
return Promise.resolve(response);
|
|
439
|
+
};
|
|
440
|
+
const deserializeAws_json1_1DeleteNamespaceCommandError = async (output, context) => {
|
|
441
|
+
const parsedOutput = {
|
|
442
|
+
...output,
|
|
443
|
+
body: await parseErrorBody(output.body, context),
|
|
444
|
+
};
|
|
445
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
446
|
+
switch (errorCode) {
|
|
447
|
+
case "DuplicateRequest":
|
|
448
|
+
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
449
|
+
throw await deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context);
|
|
450
|
+
case "InvalidInput":
|
|
451
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
452
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
453
|
+
case "NamespaceNotFound":
|
|
454
|
+
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
455
|
+
throw await deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context);
|
|
456
|
+
case "ResourceInUse":
|
|
457
|
+
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
458
|
+
throw await deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context);
|
|
459
|
+
default:
|
|
460
|
+
const parsedBody = parsedOutput.body;
|
|
461
|
+
throwDefaultError({
|
|
462
|
+
output,
|
|
463
|
+
parsedBody,
|
|
464
|
+
exceptionCtor: __BaseException,
|
|
465
|
+
errorCode,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
export const deserializeAws_json1_1DeleteServiceCommand = async (output, context) => {
|
|
470
|
+
if (output.statusCode >= 300) {
|
|
471
|
+
return deserializeAws_json1_1DeleteServiceCommandError(output, context);
|
|
472
|
+
}
|
|
473
|
+
const data = await parseBody(output.body, context);
|
|
474
|
+
let contents = {};
|
|
475
|
+
contents = deserializeAws_json1_1DeleteServiceResponse(data, context);
|
|
476
|
+
const response = {
|
|
477
|
+
$metadata: deserializeMetadata(output),
|
|
478
|
+
...contents,
|
|
479
|
+
};
|
|
480
|
+
return Promise.resolve(response);
|
|
481
|
+
};
|
|
482
|
+
const deserializeAws_json1_1DeleteServiceCommandError = async (output, context) => {
|
|
483
|
+
const parsedOutput = {
|
|
484
|
+
...output,
|
|
485
|
+
body: await parseErrorBody(output.body, context),
|
|
486
|
+
};
|
|
487
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
488
|
+
switch (errorCode) {
|
|
489
|
+
case "InvalidInput":
|
|
490
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
491
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
492
|
+
case "ResourceInUse":
|
|
493
|
+
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
494
|
+
throw await deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context);
|
|
495
|
+
case "ServiceNotFound":
|
|
496
|
+
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
497
|
+
throw await deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context);
|
|
498
|
+
default:
|
|
499
|
+
const parsedBody = parsedOutput.body;
|
|
500
|
+
throwDefaultError({
|
|
501
|
+
output,
|
|
502
|
+
parsedBody,
|
|
503
|
+
exceptionCtor: __BaseException,
|
|
504
|
+
errorCode,
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
export const deserializeAws_json1_1DeregisterInstanceCommand = async (output, context) => {
|
|
509
|
+
if (output.statusCode >= 300) {
|
|
510
|
+
return deserializeAws_json1_1DeregisterInstanceCommandError(output, context);
|
|
511
|
+
}
|
|
512
|
+
const data = await parseBody(output.body, context);
|
|
513
|
+
let contents = {};
|
|
514
|
+
contents = deserializeAws_json1_1DeregisterInstanceResponse(data, context);
|
|
515
|
+
const response = {
|
|
516
|
+
$metadata: deserializeMetadata(output),
|
|
517
|
+
...contents,
|
|
518
|
+
};
|
|
519
|
+
return Promise.resolve(response);
|
|
520
|
+
};
|
|
521
|
+
const deserializeAws_json1_1DeregisterInstanceCommandError = async (output, context) => {
|
|
522
|
+
const parsedOutput = {
|
|
523
|
+
...output,
|
|
524
|
+
body: await parseErrorBody(output.body, context),
|
|
525
|
+
};
|
|
526
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
527
|
+
switch (errorCode) {
|
|
528
|
+
case "DuplicateRequest":
|
|
529
|
+
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
530
|
+
throw await deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context);
|
|
531
|
+
case "InstanceNotFound":
|
|
532
|
+
case "com.amazonaws.servicediscovery#InstanceNotFound":
|
|
533
|
+
throw await deserializeAws_json1_1InstanceNotFoundResponse(parsedOutput, context);
|
|
534
|
+
case "InvalidInput":
|
|
535
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
536
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
537
|
+
case "ResourceInUse":
|
|
538
|
+
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
539
|
+
throw await deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context);
|
|
540
|
+
case "ServiceNotFound":
|
|
541
|
+
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
542
|
+
throw await deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context);
|
|
543
|
+
default:
|
|
544
|
+
const parsedBody = parsedOutput.body;
|
|
545
|
+
throwDefaultError({
|
|
546
|
+
output,
|
|
547
|
+
parsedBody,
|
|
548
|
+
exceptionCtor: __BaseException,
|
|
549
|
+
errorCode,
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
export const deserializeAws_json1_1DiscoverInstancesCommand = async (output, context) => {
|
|
554
|
+
if (output.statusCode >= 300) {
|
|
555
|
+
return deserializeAws_json1_1DiscoverInstancesCommandError(output, context);
|
|
556
|
+
}
|
|
557
|
+
const data = await parseBody(output.body, context);
|
|
558
|
+
let contents = {};
|
|
559
|
+
contents = deserializeAws_json1_1DiscoverInstancesResponse(data, context);
|
|
560
|
+
const response = {
|
|
561
|
+
$metadata: deserializeMetadata(output),
|
|
562
|
+
...contents,
|
|
563
|
+
};
|
|
564
|
+
return Promise.resolve(response);
|
|
565
|
+
};
|
|
566
|
+
const deserializeAws_json1_1DiscoverInstancesCommandError = async (output, context) => {
|
|
567
|
+
const parsedOutput = {
|
|
568
|
+
...output,
|
|
569
|
+
body: await parseErrorBody(output.body, context),
|
|
570
|
+
};
|
|
571
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
572
|
+
switch (errorCode) {
|
|
573
|
+
case "InvalidInput":
|
|
574
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
575
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
576
|
+
case "NamespaceNotFound":
|
|
577
|
+
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
578
|
+
throw await deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context);
|
|
579
|
+
case "RequestLimitExceeded":
|
|
580
|
+
case "com.amazonaws.servicediscovery#RequestLimitExceeded":
|
|
581
|
+
throw await deserializeAws_json1_1RequestLimitExceededResponse(parsedOutput, context);
|
|
582
|
+
case "ServiceNotFound":
|
|
583
|
+
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
584
|
+
throw await deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context);
|
|
585
|
+
default:
|
|
586
|
+
const parsedBody = parsedOutput.body;
|
|
587
|
+
throwDefaultError({
|
|
588
|
+
output,
|
|
589
|
+
parsedBody,
|
|
590
|
+
exceptionCtor: __BaseException,
|
|
591
|
+
errorCode,
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
export const deserializeAws_json1_1GetInstanceCommand = async (output, context) => {
|
|
596
|
+
if (output.statusCode >= 300) {
|
|
597
|
+
return deserializeAws_json1_1GetInstanceCommandError(output, context);
|
|
598
|
+
}
|
|
599
|
+
const data = await parseBody(output.body, context);
|
|
600
|
+
let contents = {};
|
|
601
|
+
contents = deserializeAws_json1_1GetInstanceResponse(data, context);
|
|
602
|
+
const response = {
|
|
603
|
+
$metadata: deserializeMetadata(output),
|
|
604
|
+
...contents,
|
|
605
|
+
};
|
|
606
|
+
return Promise.resolve(response);
|
|
607
|
+
};
|
|
608
|
+
const deserializeAws_json1_1GetInstanceCommandError = async (output, context) => {
|
|
609
|
+
const parsedOutput = {
|
|
610
|
+
...output,
|
|
611
|
+
body: await parseErrorBody(output.body, context),
|
|
612
|
+
};
|
|
613
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
614
|
+
switch (errorCode) {
|
|
615
|
+
case "InstanceNotFound":
|
|
616
|
+
case "com.amazonaws.servicediscovery#InstanceNotFound":
|
|
617
|
+
throw await deserializeAws_json1_1InstanceNotFoundResponse(parsedOutput, context);
|
|
618
|
+
case "InvalidInput":
|
|
619
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
620
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
621
|
+
case "ServiceNotFound":
|
|
622
|
+
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
623
|
+
throw await deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context);
|
|
624
|
+
default:
|
|
625
|
+
const parsedBody = parsedOutput.body;
|
|
626
|
+
throwDefaultError({
|
|
627
|
+
output,
|
|
628
|
+
parsedBody,
|
|
629
|
+
exceptionCtor: __BaseException,
|
|
630
|
+
errorCode,
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
export const deserializeAws_json1_1GetInstancesHealthStatusCommand = async (output, context) => {
|
|
635
|
+
if (output.statusCode >= 300) {
|
|
636
|
+
return deserializeAws_json1_1GetInstancesHealthStatusCommandError(output, context);
|
|
637
|
+
}
|
|
638
|
+
const data = await parseBody(output.body, context);
|
|
639
|
+
let contents = {};
|
|
640
|
+
contents = deserializeAws_json1_1GetInstancesHealthStatusResponse(data, context);
|
|
641
|
+
const response = {
|
|
642
|
+
$metadata: deserializeMetadata(output),
|
|
643
|
+
...contents,
|
|
644
|
+
};
|
|
645
|
+
return Promise.resolve(response);
|
|
646
|
+
};
|
|
647
|
+
const deserializeAws_json1_1GetInstancesHealthStatusCommandError = async (output, context) => {
|
|
648
|
+
const parsedOutput = {
|
|
649
|
+
...output,
|
|
650
|
+
body: await parseErrorBody(output.body, context),
|
|
651
|
+
};
|
|
652
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
653
|
+
switch (errorCode) {
|
|
654
|
+
case "InstanceNotFound":
|
|
655
|
+
case "com.amazonaws.servicediscovery#InstanceNotFound":
|
|
656
|
+
throw await deserializeAws_json1_1InstanceNotFoundResponse(parsedOutput, context);
|
|
657
|
+
case "InvalidInput":
|
|
658
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
659
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
660
|
+
case "ServiceNotFound":
|
|
661
|
+
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
662
|
+
throw await deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context);
|
|
663
|
+
default:
|
|
664
|
+
const parsedBody = parsedOutput.body;
|
|
665
|
+
throwDefaultError({
|
|
666
|
+
output,
|
|
667
|
+
parsedBody,
|
|
668
|
+
exceptionCtor: __BaseException,
|
|
669
|
+
errorCode,
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
export const deserializeAws_json1_1GetNamespaceCommand = async (output, context) => {
|
|
674
|
+
if (output.statusCode >= 300) {
|
|
675
|
+
return deserializeAws_json1_1GetNamespaceCommandError(output, context);
|
|
676
|
+
}
|
|
677
|
+
const data = await parseBody(output.body, context);
|
|
678
|
+
let contents = {};
|
|
679
|
+
contents = deserializeAws_json1_1GetNamespaceResponse(data, context);
|
|
680
|
+
const response = {
|
|
681
|
+
$metadata: deserializeMetadata(output),
|
|
682
|
+
...contents,
|
|
683
|
+
};
|
|
684
|
+
return Promise.resolve(response);
|
|
685
|
+
};
|
|
686
|
+
const deserializeAws_json1_1GetNamespaceCommandError = async (output, context) => {
|
|
687
|
+
const parsedOutput = {
|
|
688
|
+
...output,
|
|
689
|
+
body: await parseErrorBody(output.body, context),
|
|
690
|
+
};
|
|
691
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
692
|
+
switch (errorCode) {
|
|
693
|
+
case "InvalidInput":
|
|
694
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
695
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
696
|
+
case "NamespaceNotFound":
|
|
697
|
+
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
698
|
+
throw await deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context);
|
|
699
|
+
default:
|
|
700
|
+
const parsedBody = parsedOutput.body;
|
|
701
|
+
throwDefaultError({
|
|
702
|
+
output,
|
|
703
|
+
parsedBody,
|
|
704
|
+
exceptionCtor: __BaseException,
|
|
705
|
+
errorCode,
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
export const deserializeAws_json1_1GetOperationCommand = async (output, context) => {
|
|
710
|
+
if (output.statusCode >= 300) {
|
|
711
|
+
return deserializeAws_json1_1GetOperationCommandError(output, context);
|
|
712
|
+
}
|
|
713
|
+
const data = await parseBody(output.body, context);
|
|
714
|
+
let contents = {};
|
|
715
|
+
contents = deserializeAws_json1_1GetOperationResponse(data, context);
|
|
716
|
+
const response = {
|
|
717
|
+
$metadata: deserializeMetadata(output),
|
|
718
|
+
...contents,
|
|
719
|
+
};
|
|
720
|
+
return Promise.resolve(response);
|
|
721
|
+
};
|
|
722
|
+
const deserializeAws_json1_1GetOperationCommandError = async (output, context) => {
|
|
723
|
+
const parsedOutput = {
|
|
724
|
+
...output,
|
|
725
|
+
body: await parseErrorBody(output.body, context),
|
|
726
|
+
};
|
|
727
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
728
|
+
switch (errorCode) {
|
|
729
|
+
case "InvalidInput":
|
|
730
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
731
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
732
|
+
case "OperationNotFound":
|
|
733
|
+
case "com.amazonaws.servicediscovery#OperationNotFound":
|
|
734
|
+
throw await deserializeAws_json1_1OperationNotFoundResponse(parsedOutput, context);
|
|
735
|
+
default:
|
|
736
|
+
const parsedBody = parsedOutput.body;
|
|
737
|
+
throwDefaultError({
|
|
738
|
+
output,
|
|
739
|
+
parsedBody,
|
|
740
|
+
exceptionCtor: __BaseException,
|
|
741
|
+
errorCode,
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
};
|
|
745
|
+
export const deserializeAws_json1_1GetServiceCommand = async (output, context) => {
|
|
746
|
+
if (output.statusCode >= 300) {
|
|
747
|
+
return deserializeAws_json1_1GetServiceCommandError(output, context);
|
|
748
|
+
}
|
|
749
|
+
const data = await parseBody(output.body, context);
|
|
750
|
+
let contents = {};
|
|
751
|
+
contents = deserializeAws_json1_1GetServiceResponse(data, context);
|
|
752
|
+
const response = {
|
|
753
|
+
$metadata: deserializeMetadata(output),
|
|
754
|
+
...contents,
|
|
755
|
+
};
|
|
756
|
+
return Promise.resolve(response);
|
|
757
|
+
};
|
|
758
|
+
const deserializeAws_json1_1GetServiceCommandError = async (output, context) => {
|
|
759
|
+
const parsedOutput = {
|
|
760
|
+
...output,
|
|
761
|
+
body: await parseErrorBody(output.body, context),
|
|
762
|
+
};
|
|
763
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
764
|
+
switch (errorCode) {
|
|
765
|
+
case "InvalidInput":
|
|
766
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
767
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
768
|
+
case "ServiceNotFound":
|
|
769
|
+
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
770
|
+
throw await deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context);
|
|
771
|
+
default:
|
|
772
|
+
const parsedBody = parsedOutput.body;
|
|
773
|
+
throwDefaultError({
|
|
774
|
+
output,
|
|
775
|
+
parsedBody,
|
|
776
|
+
exceptionCtor: __BaseException,
|
|
777
|
+
errorCode,
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
export const deserializeAws_json1_1ListInstancesCommand = async (output, context) => {
|
|
782
|
+
if (output.statusCode >= 300) {
|
|
783
|
+
return deserializeAws_json1_1ListInstancesCommandError(output, context);
|
|
784
|
+
}
|
|
785
|
+
const data = await parseBody(output.body, context);
|
|
786
|
+
let contents = {};
|
|
787
|
+
contents = deserializeAws_json1_1ListInstancesResponse(data, context);
|
|
788
|
+
const response = {
|
|
789
|
+
$metadata: deserializeMetadata(output),
|
|
790
|
+
...contents,
|
|
791
|
+
};
|
|
792
|
+
return Promise.resolve(response);
|
|
793
|
+
};
|
|
794
|
+
const deserializeAws_json1_1ListInstancesCommandError = async (output, context) => {
|
|
795
|
+
const parsedOutput = {
|
|
796
|
+
...output,
|
|
797
|
+
body: await parseErrorBody(output.body, context),
|
|
798
|
+
};
|
|
799
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
800
|
+
switch (errorCode) {
|
|
801
|
+
case "InvalidInput":
|
|
802
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
803
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
804
|
+
case "ServiceNotFound":
|
|
805
|
+
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
806
|
+
throw await deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context);
|
|
807
|
+
default:
|
|
808
|
+
const parsedBody = parsedOutput.body;
|
|
809
|
+
throwDefaultError({
|
|
810
|
+
output,
|
|
811
|
+
parsedBody,
|
|
812
|
+
exceptionCtor: __BaseException,
|
|
813
|
+
errorCode,
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
};
|
|
817
|
+
export const deserializeAws_json1_1ListNamespacesCommand = async (output, context) => {
|
|
818
|
+
if (output.statusCode >= 300) {
|
|
819
|
+
return deserializeAws_json1_1ListNamespacesCommandError(output, context);
|
|
820
|
+
}
|
|
821
|
+
const data = await parseBody(output.body, context);
|
|
822
|
+
let contents = {};
|
|
823
|
+
contents = deserializeAws_json1_1ListNamespacesResponse(data, context);
|
|
824
|
+
const response = {
|
|
825
|
+
$metadata: deserializeMetadata(output),
|
|
826
|
+
...contents,
|
|
827
|
+
};
|
|
828
|
+
return Promise.resolve(response);
|
|
829
|
+
};
|
|
830
|
+
const deserializeAws_json1_1ListNamespacesCommandError = async (output, context) => {
|
|
831
|
+
const parsedOutput = {
|
|
832
|
+
...output,
|
|
833
|
+
body: await parseErrorBody(output.body, context),
|
|
834
|
+
};
|
|
835
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
836
|
+
switch (errorCode) {
|
|
837
|
+
case "InvalidInput":
|
|
838
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
839
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
840
|
+
default:
|
|
841
|
+
const parsedBody = parsedOutput.body;
|
|
842
|
+
throwDefaultError({
|
|
843
|
+
output,
|
|
844
|
+
parsedBody,
|
|
845
|
+
exceptionCtor: __BaseException,
|
|
846
|
+
errorCode,
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
};
|
|
850
|
+
export const deserializeAws_json1_1ListOperationsCommand = async (output, context) => {
|
|
851
|
+
if (output.statusCode >= 300) {
|
|
852
|
+
return deserializeAws_json1_1ListOperationsCommandError(output, context);
|
|
853
|
+
}
|
|
854
|
+
const data = await parseBody(output.body, context);
|
|
855
|
+
let contents = {};
|
|
856
|
+
contents = deserializeAws_json1_1ListOperationsResponse(data, context);
|
|
857
|
+
const response = {
|
|
858
|
+
$metadata: deserializeMetadata(output),
|
|
859
|
+
...contents,
|
|
860
|
+
};
|
|
861
|
+
return Promise.resolve(response);
|
|
862
|
+
};
|
|
863
|
+
const deserializeAws_json1_1ListOperationsCommandError = async (output, context) => {
|
|
864
|
+
const parsedOutput = {
|
|
865
|
+
...output,
|
|
866
|
+
body: await parseErrorBody(output.body, context),
|
|
867
|
+
};
|
|
868
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
869
|
+
switch (errorCode) {
|
|
870
|
+
case "InvalidInput":
|
|
871
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
872
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
873
|
+
default:
|
|
874
|
+
const parsedBody = parsedOutput.body;
|
|
875
|
+
throwDefaultError({
|
|
876
|
+
output,
|
|
877
|
+
parsedBody,
|
|
878
|
+
exceptionCtor: __BaseException,
|
|
879
|
+
errorCode,
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
};
|
|
883
|
+
export const deserializeAws_json1_1ListServicesCommand = async (output, context) => {
|
|
884
|
+
if (output.statusCode >= 300) {
|
|
885
|
+
return deserializeAws_json1_1ListServicesCommandError(output, context);
|
|
886
|
+
}
|
|
887
|
+
const data = await parseBody(output.body, context);
|
|
888
|
+
let contents = {};
|
|
889
|
+
contents = deserializeAws_json1_1ListServicesResponse(data, context);
|
|
890
|
+
const response = {
|
|
891
|
+
$metadata: deserializeMetadata(output),
|
|
892
|
+
...contents,
|
|
893
|
+
};
|
|
894
|
+
return Promise.resolve(response);
|
|
895
|
+
};
|
|
896
|
+
const deserializeAws_json1_1ListServicesCommandError = async (output, context) => {
|
|
897
|
+
const parsedOutput = {
|
|
898
|
+
...output,
|
|
899
|
+
body: await parseErrorBody(output.body, context),
|
|
900
|
+
};
|
|
901
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
902
|
+
switch (errorCode) {
|
|
903
|
+
case "InvalidInput":
|
|
904
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
905
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
906
|
+
default:
|
|
907
|
+
const parsedBody = parsedOutput.body;
|
|
908
|
+
throwDefaultError({
|
|
909
|
+
output,
|
|
910
|
+
parsedBody,
|
|
911
|
+
exceptionCtor: __BaseException,
|
|
912
|
+
errorCode,
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
};
|
|
916
|
+
export const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
|
|
917
|
+
if (output.statusCode >= 300) {
|
|
918
|
+
return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
|
|
919
|
+
}
|
|
920
|
+
const data = await parseBody(output.body, context);
|
|
921
|
+
let contents = {};
|
|
922
|
+
contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
|
|
923
|
+
const response = {
|
|
924
|
+
$metadata: deserializeMetadata(output),
|
|
925
|
+
...contents,
|
|
926
|
+
};
|
|
927
|
+
return Promise.resolve(response);
|
|
928
|
+
};
|
|
929
|
+
const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
|
|
930
|
+
const parsedOutput = {
|
|
931
|
+
...output,
|
|
932
|
+
body: await parseErrorBody(output.body, context),
|
|
933
|
+
};
|
|
934
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
935
|
+
switch (errorCode) {
|
|
936
|
+
case "InvalidInput":
|
|
937
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
938
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
939
|
+
case "ResourceNotFoundException":
|
|
940
|
+
case "com.amazonaws.servicediscovery#ResourceNotFoundException":
|
|
941
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
942
|
+
default:
|
|
943
|
+
const parsedBody = parsedOutput.body;
|
|
944
|
+
throwDefaultError({
|
|
945
|
+
output,
|
|
946
|
+
parsedBody,
|
|
947
|
+
exceptionCtor: __BaseException,
|
|
948
|
+
errorCode,
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
};
|
|
952
|
+
export const deserializeAws_json1_1RegisterInstanceCommand = async (output, context) => {
|
|
953
|
+
if (output.statusCode >= 300) {
|
|
954
|
+
return deserializeAws_json1_1RegisterInstanceCommandError(output, context);
|
|
955
|
+
}
|
|
956
|
+
const data = await parseBody(output.body, context);
|
|
957
|
+
let contents = {};
|
|
958
|
+
contents = deserializeAws_json1_1RegisterInstanceResponse(data, context);
|
|
959
|
+
const response = {
|
|
960
|
+
$metadata: deserializeMetadata(output),
|
|
961
|
+
...contents,
|
|
962
|
+
};
|
|
963
|
+
return Promise.resolve(response);
|
|
964
|
+
};
|
|
965
|
+
const deserializeAws_json1_1RegisterInstanceCommandError = async (output, context) => {
|
|
966
|
+
const parsedOutput = {
|
|
967
|
+
...output,
|
|
968
|
+
body: await parseErrorBody(output.body, context),
|
|
969
|
+
};
|
|
970
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
971
|
+
switch (errorCode) {
|
|
972
|
+
case "DuplicateRequest":
|
|
973
|
+
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
974
|
+
throw await deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context);
|
|
975
|
+
case "InvalidInput":
|
|
976
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
977
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
978
|
+
case "ResourceInUse":
|
|
979
|
+
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
980
|
+
throw await deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context);
|
|
981
|
+
case "ResourceLimitExceeded":
|
|
982
|
+
case "com.amazonaws.servicediscovery#ResourceLimitExceeded":
|
|
983
|
+
throw await deserializeAws_json1_1ResourceLimitExceededResponse(parsedOutput, context);
|
|
984
|
+
case "ServiceNotFound":
|
|
985
|
+
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
986
|
+
throw await deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context);
|
|
987
|
+
default:
|
|
988
|
+
const parsedBody = parsedOutput.body;
|
|
989
|
+
throwDefaultError({
|
|
990
|
+
output,
|
|
991
|
+
parsedBody,
|
|
992
|
+
exceptionCtor: __BaseException,
|
|
993
|
+
errorCode,
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
};
|
|
997
|
+
export const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
|
|
998
|
+
if (output.statusCode >= 300) {
|
|
999
|
+
return deserializeAws_json1_1TagResourceCommandError(output, context);
|
|
1000
|
+
}
|
|
1001
|
+
const data = await parseBody(output.body, context);
|
|
1002
|
+
let contents = {};
|
|
1003
|
+
contents = deserializeAws_json1_1TagResourceResponse(data, context);
|
|
1004
|
+
const response = {
|
|
1005
|
+
$metadata: deserializeMetadata(output),
|
|
1006
|
+
...contents,
|
|
1007
|
+
};
|
|
1008
|
+
return Promise.resolve(response);
|
|
1009
|
+
};
|
|
1010
|
+
const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
|
|
1011
|
+
const parsedOutput = {
|
|
1012
|
+
...output,
|
|
1013
|
+
body: await parseErrorBody(output.body, context),
|
|
1014
|
+
};
|
|
1015
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1016
|
+
switch (errorCode) {
|
|
1017
|
+
case "InvalidInput":
|
|
1018
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1019
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
1020
|
+
case "ResourceNotFoundException":
|
|
1021
|
+
case "com.amazonaws.servicediscovery#ResourceNotFoundException":
|
|
1022
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1023
|
+
case "TooManyTagsException":
|
|
1024
|
+
case "com.amazonaws.servicediscovery#TooManyTagsException":
|
|
1025
|
+
throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
1026
|
+
default:
|
|
1027
|
+
const parsedBody = parsedOutput.body;
|
|
1028
|
+
throwDefaultError({
|
|
1029
|
+
output,
|
|
1030
|
+
parsedBody,
|
|
1031
|
+
exceptionCtor: __BaseException,
|
|
1032
|
+
errorCode,
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
};
|
|
1036
|
+
export const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
|
|
1037
|
+
if (output.statusCode >= 300) {
|
|
1038
|
+
return deserializeAws_json1_1UntagResourceCommandError(output, context);
|
|
1039
|
+
}
|
|
1040
|
+
const data = await parseBody(output.body, context);
|
|
1041
|
+
let contents = {};
|
|
1042
|
+
contents = deserializeAws_json1_1UntagResourceResponse(data, context);
|
|
1043
|
+
const response = {
|
|
1044
|
+
$metadata: deserializeMetadata(output),
|
|
1045
|
+
...contents,
|
|
1046
|
+
};
|
|
1047
|
+
return Promise.resolve(response);
|
|
1048
|
+
};
|
|
1049
|
+
const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
|
|
1050
|
+
const parsedOutput = {
|
|
1051
|
+
...output,
|
|
1052
|
+
body: await parseErrorBody(output.body, context),
|
|
1053
|
+
};
|
|
1054
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1055
|
+
switch (errorCode) {
|
|
1056
|
+
case "InvalidInput":
|
|
1057
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1058
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
1059
|
+
case "ResourceNotFoundException":
|
|
1060
|
+
case "com.amazonaws.servicediscovery#ResourceNotFoundException":
|
|
1061
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1062
|
+
default:
|
|
1063
|
+
const parsedBody = parsedOutput.body;
|
|
1064
|
+
throwDefaultError({
|
|
1065
|
+
output,
|
|
1066
|
+
parsedBody,
|
|
1067
|
+
exceptionCtor: __BaseException,
|
|
1068
|
+
errorCode,
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
1071
|
+
};
|
|
1072
|
+
export const deserializeAws_json1_1UpdateHttpNamespaceCommand = async (output, context) => {
|
|
1073
|
+
if (output.statusCode >= 300) {
|
|
1074
|
+
return deserializeAws_json1_1UpdateHttpNamespaceCommandError(output, context);
|
|
1075
|
+
}
|
|
1076
|
+
const data = await parseBody(output.body, context);
|
|
1077
|
+
let contents = {};
|
|
1078
|
+
contents = deserializeAws_json1_1UpdateHttpNamespaceResponse(data, context);
|
|
1079
|
+
const response = {
|
|
1080
|
+
$metadata: deserializeMetadata(output),
|
|
1081
|
+
...contents,
|
|
1082
|
+
};
|
|
1083
|
+
return Promise.resolve(response);
|
|
1084
|
+
};
|
|
1085
|
+
const deserializeAws_json1_1UpdateHttpNamespaceCommandError = async (output, context) => {
|
|
1086
|
+
const parsedOutput = {
|
|
1087
|
+
...output,
|
|
1088
|
+
body: await parseErrorBody(output.body, context),
|
|
1089
|
+
};
|
|
1090
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1091
|
+
switch (errorCode) {
|
|
1092
|
+
case "DuplicateRequest":
|
|
1093
|
+
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
1094
|
+
throw await deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context);
|
|
1095
|
+
case "InvalidInput":
|
|
1096
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1097
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
1098
|
+
case "NamespaceNotFound":
|
|
1099
|
+
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
1100
|
+
throw await deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context);
|
|
1101
|
+
case "ResourceInUse":
|
|
1102
|
+
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
1103
|
+
throw await deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context);
|
|
1104
|
+
default:
|
|
1105
|
+
const parsedBody = parsedOutput.body;
|
|
1106
|
+
throwDefaultError({
|
|
1107
|
+
output,
|
|
1108
|
+
parsedBody,
|
|
1109
|
+
exceptionCtor: __BaseException,
|
|
1110
|
+
errorCode,
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
};
|
|
1114
|
+
export const deserializeAws_json1_1UpdateInstanceCustomHealthStatusCommand = async (output, context) => {
|
|
1115
|
+
if (output.statusCode >= 300) {
|
|
1116
|
+
return deserializeAws_json1_1UpdateInstanceCustomHealthStatusCommandError(output, context);
|
|
1117
|
+
}
|
|
1118
|
+
await collectBody(output.body, context);
|
|
1119
|
+
const response = {
|
|
1120
|
+
$metadata: deserializeMetadata(output),
|
|
1121
|
+
};
|
|
1122
|
+
return Promise.resolve(response);
|
|
1123
|
+
};
|
|
1124
|
+
const deserializeAws_json1_1UpdateInstanceCustomHealthStatusCommandError = async (output, context) => {
|
|
1125
|
+
const parsedOutput = {
|
|
1126
|
+
...output,
|
|
1127
|
+
body: await parseErrorBody(output.body, context),
|
|
1128
|
+
};
|
|
1129
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1130
|
+
switch (errorCode) {
|
|
1131
|
+
case "CustomHealthNotFound":
|
|
1132
|
+
case "com.amazonaws.servicediscovery#CustomHealthNotFound":
|
|
1133
|
+
throw await deserializeAws_json1_1CustomHealthNotFoundResponse(parsedOutput, context);
|
|
1134
|
+
case "InstanceNotFound":
|
|
1135
|
+
case "com.amazonaws.servicediscovery#InstanceNotFound":
|
|
1136
|
+
throw await deserializeAws_json1_1InstanceNotFoundResponse(parsedOutput, context);
|
|
1137
|
+
case "InvalidInput":
|
|
1138
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1139
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
1140
|
+
case "ServiceNotFound":
|
|
1141
|
+
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
1142
|
+
throw await deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context);
|
|
1143
|
+
default:
|
|
1144
|
+
const parsedBody = parsedOutput.body;
|
|
1145
|
+
throwDefaultError({
|
|
1146
|
+
output,
|
|
1147
|
+
parsedBody,
|
|
1148
|
+
exceptionCtor: __BaseException,
|
|
1149
|
+
errorCode,
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
};
|
|
1153
|
+
export const deserializeAws_json1_1UpdatePrivateDnsNamespaceCommand = async (output, context) => {
|
|
1154
|
+
if (output.statusCode >= 300) {
|
|
1155
|
+
return deserializeAws_json1_1UpdatePrivateDnsNamespaceCommandError(output, context);
|
|
1156
|
+
}
|
|
1157
|
+
const data = await parseBody(output.body, context);
|
|
1158
|
+
let contents = {};
|
|
1159
|
+
contents = deserializeAws_json1_1UpdatePrivateDnsNamespaceResponse(data, context);
|
|
1160
|
+
const response = {
|
|
1161
|
+
$metadata: deserializeMetadata(output),
|
|
1162
|
+
...contents,
|
|
1163
|
+
};
|
|
1164
|
+
return Promise.resolve(response);
|
|
1165
|
+
};
|
|
1166
|
+
const deserializeAws_json1_1UpdatePrivateDnsNamespaceCommandError = async (output, context) => {
|
|
1167
|
+
const parsedOutput = {
|
|
1168
|
+
...output,
|
|
1169
|
+
body: await parseErrorBody(output.body, context),
|
|
1170
|
+
};
|
|
1171
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1172
|
+
switch (errorCode) {
|
|
1173
|
+
case "DuplicateRequest":
|
|
1174
|
+
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
1175
|
+
throw await deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context);
|
|
1176
|
+
case "InvalidInput":
|
|
1177
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1178
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
1179
|
+
case "NamespaceNotFound":
|
|
1180
|
+
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
1181
|
+
throw await deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context);
|
|
1182
|
+
case "ResourceInUse":
|
|
1183
|
+
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
1184
|
+
throw await deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context);
|
|
1185
|
+
default:
|
|
1186
|
+
const parsedBody = parsedOutput.body;
|
|
1187
|
+
throwDefaultError({
|
|
1188
|
+
output,
|
|
1189
|
+
parsedBody,
|
|
1190
|
+
exceptionCtor: __BaseException,
|
|
1191
|
+
errorCode,
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
};
|
|
1195
|
+
export const deserializeAws_json1_1UpdatePublicDnsNamespaceCommand = async (output, context) => {
|
|
1196
|
+
if (output.statusCode >= 300) {
|
|
1197
|
+
return deserializeAws_json1_1UpdatePublicDnsNamespaceCommandError(output, context);
|
|
1198
|
+
}
|
|
1199
|
+
const data = await parseBody(output.body, context);
|
|
1200
|
+
let contents = {};
|
|
1201
|
+
contents = deserializeAws_json1_1UpdatePublicDnsNamespaceResponse(data, context);
|
|
1202
|
+
const response = {
|
|
1203
|
+
$metadata: deserializeMetadata(output),
|
|
1204
|
+
...contents,
|
|
1205
|
+
};
|
|
1206
|
+
return Promise.resolve(response);
|
|
1207
|
+
};
|
|
1208
|
+
const deserializeAws_json1_1UpdatePublicDnsNamespaceCommandError = async (output, context) => {
|
|
1209
|
+
const parsedOutput = {
|
|
1210
|
+
...output,
|
|
1211
|
+
body: await parseErrorBody(output.body, context),
|
|
1212
|
+
};
|
|
1213
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1214
|
+
switch (errorCode) {
|
|
1215
|
+
case "DuplicateRequest":
|
|
1216
|
+
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
1217
|
+
throw await deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context);
|
|
1218
|
+
case "InvalidInput":
|
|
1219
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1220
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
1221
|
+
case "NamespaceNotFound":
|
|
1222
|
+
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
1223
|
+
throw await deserializeAws_json1_1NamespaceNotFoundResponse(parsedOutput, context);
|
|
1224
|
+
case "ResourceInUse":
|
|
1225
|
+
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
1226
|
+
throw await deserializeAws_json1_1ResourceInUseResponse(parsedOutput, context);
|
|
1227
|
+
default:
|
|
1228
|
+
const parsedBody = parsedOutput.body;
|
|
1229
|
+
throwDefaultError({
|
|
1230
|
+
output,
|
|
1231
|
+
parsedBody,
|
|
1232
|
+
exceptionCtor: __BaseException,
|
|
1233
|
+
errorCode,
|
|
1234
|
+
});
|
|
1235
|
+
}
|
|
1236
|
+
};
|
|
1237
|
+
export const deserializeAws_json1_1UpdateServiceCommand = async (output, context) => {
|
|
1238
|
+
if (output.statusCode >= 300) {
|
|
1239
|
+
return deserializeAws_json1_1UpdateServiceCommandError(output, context);
|
|
1240
|
+
}
|
|
1241
|
+
const data = await parseBody(output.body, context);
|
|
1242
|
+
let contents = {};
|
|
1243
|
+
contents = deserializeAws_json1_1UpdateServiceResponse(data, context);
|
|
1244
|
+
const response = {
|
|
1245
|
+
$metadata: deserializeMetadata(output),
|
|
1246
|
+
...contents,
|
|
1247
|
+
};
|
|
1248
|
+
return Promise.resolve(response);
|
|
1249
|
+
};
|
|
1250
|
+
const deserializeAws_json1_1UpdateServiceCommandError = async (output, context) => {
|
|
1251
|
+
const parsedOutput = {
|
|
1252
|
+
...output,
|
|
1253
|
+
body: await parseErrorBody(output.body, context),
|
|
1254
|
+
};
|
|
1255
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1256
|
+
switch (errorCode) {
|
|
1257
|
+
case "DuplicateRequest":
|
|
1258
|
+
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
1259
|
+
throw await deserializeAws_json1_1DuplicateRequestResponse(parsedOutput, context);
|
|
1260
|
+
case "InvalidInput":
|
|
1261
|
+
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1262
|
+
throw await deserializeAws_json1_1InvalidInputResponse(parsedOutput, context);
|
|
1263
|
+
case "ServiceNotFound":
|
|
1264
|
+
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
1265
|
+
throw await deserializeAws_json1_1ServiceNotFoundResponse(parsedOutput, context);
|
|
1266
|
+
default:
|
|
1267
|
+
const parsedBody = parsedOutput.body;
|
|
1268
|
+
throwDefaultError({
|
|
1269
|
+
output,
|
|
1270
|
+
parsedBody,
|
|
1271
|
+
exceptionCtor: __BaseException,
|
|
1272
|
+
errorCode,
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1275
|
+
};
|
|
1276
|
+
const deserializeAws_json1_1CustomHealthNotFoundResponse = async (parsedOutput, context) => {
|
|
1277
|
+
const body = parsedOutput.body;
|
|
1278
|
+
const deserialized = deserializeAws_json1_1CustomHealthNotFound(body, context);
|
|
1279
|
+
const exception = new CustomHealthNotFound({
|
|
1280
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1281
|
+
...deserialized,
|
|
1282
|
+
});
|
|
1283
|
+
return __decorateServiceException(exception, body);
|
|
1284
|
+
};
|
|
1285
|
+
const deserializeAws_json1_1DuplicateRequestResponse = async (parsedOutput, context) => {
|
|
1286
|
+
const body = parsedOutput.body;
|
|
1287
|
+
const deserialized = deserializeAws_json1_1DuplicateRequest(body, context);
|
|
1288
|
+
const exception = new DuplicateRequest({
|
|
1289
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1290
|
+
...deserialized,
|
|
1291
|
+
});
|
|
1292
|
+
return __decorateServiceException(exception, body);
|
|
1293
|
+
};
|
|
1294
|
+
const deserializeAws_json1_1InstanceNotFoundResponse = async (parsedOutput, context) => {
|
|
1295
|
+
const body = parsedOutput.body;
|
|
1296
|
+
const deserialized = deserializeAws_json1_1InstanceNotFound(body, context);
|
|
1297
|
+
const exception = new InstanceNotFound({
|
|
1298
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1299
|
+
...deserialized,
|
|
1300
|
+
});
|
|
1301
|
+
return __decorateServiceException(exception, body);
|
|
1302
|
+
};
|
|
1303
|
+
const deserializeAws_json1_1InvalidInputResponse = async (parsedOutput, context) => {
|
|
1304
|
+
const body = parsedOutput.body;
|
|
1305
|
+
const deserialized = deserializeAws_json1_1InvalidInput(body, context);
|
|
1306
|
+
const exception = new InvalidInput({
|
|
1307
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1308
|
+
...deserialized,
|
|
1309
|
+
});
|
|
1310
|
+
return __decorateServiceException(exception, body);
|
|
1311
|
+
};
|
|
1312
|
+
const deserializeAws_json1_1NamespaceAlreadyExistsResponse = async (parsedOutput, context) => {
|
|
1313
|
+
const body = parsedOutput.body;
|
|
1314
|
+
const deserialized = deserializeAws_json1_1NamespaceAlreadyExists(body, context);
|
|
1315
|
+
const exception = new NamespaceAlreadyExists({
|
|
1316
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1317
|
+
...deserialized,
|
|
1318
|
+
});
|
|
1319
|
+
return __decorateServiceException(exception, body);
|
|
1320
|
+
};
|
|
1321
|
+
const deserializeAws_json1_1NamespaceNotFoundResponse = async (parsedOutput, context) => {
|
|
1322
|
+
const body = parsedOutput.body;
|
|
1323
|
+
const deserialized = deserializeAws_json1_1NamespaceNotFound(body, context);
|
|
1324
|
+
const exception = new NamespaceNotFound({
|
|
1325
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1326
|
+
...deserialized,
|
|
1327
|
+
});
|
|
1328
|
+
return __decorateServiceException(exception, body);
|
|
1329
|
+
};
|
|
1330
|
+
const deserializeAws_json1_1OperationNotFoundResponse = async (parsedOutput, context) => {
|
|
1331
|
+
const body = parsedOutput.body;
|
|
1332
|
+
const deserialized = deserializeAws_json1_1OperationNotFound(body, context);
|
|
1333
|
+
const exception = new OperationNotFound({
|
|
1334
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1335
|
+
...deserialized,
|
|
1336
|
+
});
|
|
1337
|
+
return __decorateServiceException(exception, body);
|
|
1338
|
+
};
|
|
1339
|
+
const deserializeAws_json1_1RequestLimitExceededResponse = async (parsedOutput, context) => {
|
|
1340
|
+
const body = parsedOutput.body;
|
|
1341
|
+
const deserialized = deserializeAws_json1_1RequestLimitExceeded(body, context);
|
|
1342
|
+
const exception = new RequestLimitExceeded({
|
|
1343
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1344
|
+
...deserialized,
|
|
1345
|
+
});
|
|
1346
|
+
return __decorateServiceException(exception, body);
|
|
1347
|
+
};
|
|
1348
|
+
const deserializeAws_json1_1ResourceInUseResponse = async (parsedOutput, context) => {
|
|
1349
|
+
const body = parsedOutput.body;
|
|
1350
|
+
const deserialized = deserializeAws_json1_1ResourceInUse(body, context);
|
|
1351
|
+
const exception = new ResourceInUse({
|
|
1352
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1353
|
+
...deserialized,
|
|
1354
|
+
});
|
|
1355
|
+
return __decorateServiceException(exception, body);
|
|
1356
|
+
};
|
|
1357
|
+
const deserializeAws_json1_1ResourceLimitExceededResponse = async (parsedOutput, context) => {
|
|
1358
|
+
const body = parsedOutput.body;
|
|
1359
|
+
const deserialized = deserializeAws_json1_1ResourceLimitExceeded(body, context);
|
|
1360
|
+
const exception = new ResourceLimitExceeded({
|
|
1361
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1362
|
+
...deserialized,
|
|
1363
|
+
});
|
|
1364
|
+
return __decorateServiceException(exception, body);
|
|
1365
|
+
};
|
|
1366
|
+
const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1367
|
+
const body = parsedOutput.body;
|
|
1368
|
+
const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
1369
|
+
const exception = new ResourceNotFoundException({
|
|
1370
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1371
|
+
...deserialized,
|
|
1372
|
+
});
|
|
1373
|
+
return __decorateServiceException(exception, body);
|
|
1374
|
+
};
|
|
1375
|
+
const deserializeAws_json1_1ServiceAlreadyExistsResponse = async (parsedOutput, context) => {
|
|
1376
|
+
const body = parsedOutput.body;
|
|
1377
|
+
const deserialized = deserializeAws_json1_1ServiceAlreadyExists(body, context);
|
|
1378
|
+
const exception = new ServiceAlreadyExists({
|
|
1379
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1380
|
+
...deserialized,
|
|
1381
|
+
});
|
|
1382
|
+
return __decorateServiceException(exception, body);
|
|
1383
|
+
};
|
|
1384
|
+
const deserializeAws_json1_1ServiceNotFoundResponse = async (parsedOutput, context) => {
|
|
1385
|
+
const body = parsedOutput.body;
|
|
1386
|
+
const deserialized = deserializeAws_json1_1ServiceNotFound(body, context);
|
|
1387
|
+
const exception = new ServiceNotFound({
|
|
1388
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1389
|
+
...deserialized,
|
|
1390
|
+
});
|
|
1391
|
+
return __decorateServiceException(exception, body);
|
|
1392
|
+
};
|
|
1393
|
+
const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
|
|
1394
|
+
const body = parsedOutput.body;
|
|
1395
|
+
const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
|
|
1396
|
+
const exception = new TooManyTagsException({
|
|
1397
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1398
|
+
...deserialized,
|
|
1399
|
+
});
|
|
1400
|
+
return __decorateServiceException(exception, body);
|
|
1401
|
+
};
|
|
1402
|
+
const serializeAws_json1_1Attributes = (input, context) => {
|
|
1403
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1993
1404
|
if (value === null) {
|
|
1994
1405
|
return acc;
|
|
1995
1406
|
}
|
|
1996
|
-
return
|
|
1407
|
+
return {
|
|
1408
|
+
...acc,
|
|
1409
|
+
[key]: value,
|
|
1410
|
+
};
|
|
1997
1411
|
}, {});
|
|
1998
1412
|
};
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
1413
|
+
const serializeAws_json1_1CreateHttpNamespaceRequest = (input, context) => {
|
|
1414
|
+
return {
|
|
1415
|
+
CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(),
|
|
1416
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1417
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1418
|
+
...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
1419
|
+
};
|
|
2002
1420
|
};
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
1421
|
+
const serializeAws_json1_1CreatePrivateDnsNamespaceRequest = (input, context) => {
|
|
1422
|
+
return {
|
|
1423
|
+
CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(),
|
|
1424
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1425
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1426
|
+
...(input.Properties != null && {
|
|
1427
|
+
Properties: serializeAws_json1_1PrivateDnsNamespaceProperties(input.Properties, context),
|
|
1428
|
+
}),
|
|
1429
|
+
...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
1430
|
+
...(input.Vpc != null && { Vpc: input.Vpc }),
|
|
1431
|
+
};
|
|
2008
1432
|
};
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
1433
|
+
const serializeAws_json1_1CreatePublicDnsNamespaceRequest = (input, context) => {
|
|
1434
|
+
return {
|
|
1435
|
+
CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(),
|
|
1436
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1437
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1438
|
+
...(input.Properties != null && {
|
|
1439
|
+
Properties: serializeAws_json1_1PublicDnsNamespaceProperties(input.Properties, context),
|
|
1440
|
+
}),
|
|
1441
|
+
...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
1442
|
+
};
|
|
2014
1443
|
};
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
1444
|
+
const serializeAws_json1_1CreateServiceRequest = (input, context) => {
|
|
1445
|
+
return {
|
|
1446
|
+
CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(),
|
|
1447
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1448
|
+
...(input.DnsConfig != null && { DnsConfig: serializeAws_json1_1DnsConfig(input.DnsConfig, context) }),
|
|
1449
|
+
...(input.HealthCheckConfig != null && {
|
|
1450
|
+
HealthCheckConfig: serializeAws_json1_1HealthCheckConfig(input.HealthCheckConfig, context),
|
|
1451
|
+
}),
|
|
1452
|
+
...(input.HealthCheckCustomConfig != null && {
|
|
1453
|
+
HealthCheckCustomConfig: serializeAws_json1_1HealthCheckCustomConfig(input.HealthCheckCustomConfig, context),
|
|
1454
|
+
}),
|
|
1455
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1456
|
+
...(input.NamespaceId != null && { NamespaceId: input.NamespaceId }),
|
|
1457
|
+
...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
1458
|
+
...(input.Type != null && { Type: input.Type }),
|
|
1459
|
+
};
|
|
2022
1460
|
};
|
|
2023
|
-
|
|
2024
|
-
return
|
|
1461
|
+
const serializeAws_json1_1DeleteNamespaceRequest = (input, context) => {
|
|
1462
|
+
return {
|
|
1463
|
+
...(input.Id != null && { Id: input.Id }),
|
|
1464
|
+
};
|
|
2025
1465
|
};
|
|
2026
|
-
|
|
2027
|
-
return
|
|
1466
|
+
const serializeAws_json1_1DeleteServiceRequest = (input, context) => {
|
|
1467
|
+
return {
|
|
1468
|
+
...(input.Id != null && { Id: input.Id }),
|
|
1469
|
+
};
|
|
2028
1470
|
};
|
|
2029
|
-
|
|
2030
|
-
return
|
|
1471
|
+
const serializeAws_json1_1DeregisterInstanceRequest = (input, context) => {
|
|
1472
|
+
return {
|
|
1473
|
+
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
1474
|
+
...(input.ServiceId != null && { ServiceId: input.ServiceId }),
|
|
1475
|
+
};
|
|
2031
1476
|
};
|
|
2032
|
-
|
|
2033
|
-
return
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
1477
|
+
const serializeAws_json1_1DiscoverInstancesRequest = (input, context) => {
|
|
1478
|
+
return {
|
|
1479
|
+
...(input.HealthStatus != null && { HealthStatus: input.HealthStatus }),
|
|
1480
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1481
|
+
...(input.NamespaceName != null && { NamespaceName: input.NamespaceName }),
|
|
1482
|
+
...(input.OptionalParameters != null && {
|
|
1483
|
+
OptionalParameters: serializeAws_json1_1Attributes(input.OptionalParameters, context),
|
|
1484
|
+
}),
|
|
1485
|
+
...(input.QueryParameters != null && {
|
|
1486
|
+
QueryParameters: serializeAws_json1_1Attributes(input.QueryParameters, context),
|
|
1487
|
+
}),
|
|
1488
|
+
...(input.ServiceName != null && { ServiceName: input.ServiceName }),
|
|
1489
|
+
};
|
|
2038
1490
|
};
|
|
2039
|
-
|
|
2040
|
-
return
|
|
1491
|
+
const serializeAws_json1_1DnsConfig = (input, context) => {
|
|
1492
|
+
return {
|
|
1493
|
+
...(input.DnsRecords != null && { DnsRecords: serializeAws_json1_1DnsRecordList(input.DnsRecords, context) }),
|
|
1494
|
+
...(input.NamespaceId != null && { NamespaceId: input.NamespaceId }),
|
|
1495
|
+
...(input.RoutingPolicy != null && { RoutingPolicy: input.RoutingPolicy }),
|
|
1496
|
+
};
|
|
2041
1497
|
};
|
|
2042
|
-
|
|
2043
|
-
return
|
|
1498
|
+
const serializeAws_json1_1DnsConfigChange = (input, context) => {
|
|
1499
|
+
return {
|
|
1500
|
+
...(input.DnsRecords != null && { DnsRecords: serializeAws_json1_1DnsRecordList(input.DnsRecords, context) }),
|
|
1501
|
+
};
|
|
2044
1502
|
};
|
|
2045
|
-
|
|
2046
|
-
return
|
|
1503
|
+
const serializeAws_json1_1DnsRecord = (input, context) => {
|
|
1504
|
+
return {
|
|
1505
|
+
...(input.TTL != null && { TTL: input.TTL }),
|
|
1506
|
+
...(input.Type != null && { Type: input.Type }),
|
|
1507
|
+
};
|
|
2047
1508
|
};
|
|
2048
|
-
|
|
1509
|
+
const serializeAws_json1_1DnsRecordList = (input, context) => {
|
|
2049
1510
|
return input
|
|
2050
|
-
.filter(
|
|
2051
|
-
.map(
|
|
1511
|
+
.filter((e) => e != null)
|
|
1512
|
+
.map((entry) => {
|
|
2052
1513
|
return serializeAws_json1_1DnsRecord(entry, context);
|
|
2053
1514
|
});
|
|
2054
1515
|
};
|
|
2055
|
-
|
|
1516
|
+
const serializeAws_json1_1FilterValues = (input, context) => {
|
|
2056
1517
|
return input
|
|
2057
|
-
.filter(
|
|
2058
|
-
.map(
|
|
1518
|
+
.filter((e) => e != null)
|
|
1519
|
+
.map((entry) => {
|
|
2059
1520
|
return entry;
|
|
2060
1521
|
});
|
|
2061
1522
|
};
|
|
2062
|
-
|
|
2063
|
-
return
|
|
1523
|
+
const serializeAws_json1_1GetInstanceRequest = (input, context) => {
|
|
1524
|
+
return {
|
|
1525
|
+
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
1526
|
+
...(input.ServiceId != null && { ServiceId: input.ServiceId }),
|
|
1527
|
+
};
|
|
2064
1528
|
};
|
|
2065
|
-
|
|
2066
|
-
return
|
|
1529
|
+
const serializeAws_json1_1GetInstancesHealthStatusRequest = (input, context) => {
|
|
1530
|
+
return {
|
|
1531
|
+
...(input.Instances != null && { Instances: serializeAws_json1_1InstanceIdList(input.Instances, context) }),
|
|
1532
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1533
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1534
|
+
...(input.ServiceId != null && { ServiceId: input.ServiceId }),
|
|
1535
|
+
};
|
|
2067
1536
|
};
|
|
2068
|
-
|
|
2069
|
-
return
|
|
1537
|
+
const serializeAws_json1_1GetNamespaceRequest = (input, context) => {
|
|
1538
|
+
return {
|
|
1539
|
+
...(input.Id != null && { Id: input.Id }),
|
|
1540
|
+
};
|
|
2070
1541
|
};
|
|
2071
|
-
|
|
2072
|
-
return
|
|
1542
|
+
const serializeAws_json1_1GetOperationRequest = (input, context) => {
|
|
1543
|
+
return {
|
|
1544
|
+
...(input.OperationId != null && { OperationId: input.OperationId }),
|
|
1545
|
+
};
|
|
2073
1546
|
};
|
|
2074
|
-
|
|
2075
|
-
return
|
|
1547
|
+
const serializeAws_json1_1GetServiceRequest = (input, context) => {
|
|
1548
|
+
return {
|
|
1549
|
+
...(input.Id != null && { Id: input.Id }),
|
|
1550
|
+
};
|
|
2076
1551
|
};
|
|
2077
|
-
|
|
2078
|
-
return
|
|
1552
|
+
const serializeAws_json1_1HealthCheckConfig = (input, context) => {
|
|
1553
|
+
return {
|
|
1554
|
+
...(input.FailureThreshold != null && { FailureThreshold: input.FailureThreshold }),
|
|
1555
|
+
...(input.ResourcePath != null && { ResourcePath: input.ResourcePath }),
|
|
1556
|
+
...(input.Type != null && { Type: input.Type }),
|
|
1557
|
+
};
|
|
2079
1558
|
};
|
|
2080
|
-
|
|
2081
|
-
return
|
|
1559
|
+
const serializeAws_json1_1HealthCheckCustomConfig = (input, context) => {
|
|
1560
|
+
return {
|
|
1561
|
+
...(input.FailureThreshold != null && { FailureThreshold: input.FailureThreshold }),
|
|
1562
|
+
};
|
|
2082
1563
|
};
|
|
2083
|
-
|
|
2084
|
-
return
|
|
1564
|
+
const serializeAws_json1_1HttpNamespaceChange = (input, context) => {
|
|
1565
|
+
return {
|
|
1566
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1567
|
+
};
|
|
2085
1568
|
};
|
|
2086
|
-
|
|
1569
|
+
const serializeAws_json1_1InstanceIdList = (input, context) => {
|
|
2087
1570
|
return input
|
|
2088
|
-
.filter(
|
|
2089
|
-
.map(
|
|
1571
|
+
.filter((e) => e != null)
|
|
1572
|
+
.map((entry) => {
|
|
2090
1573
|
return entry;
|
|
2091
1574
|
});
|
|
2092
1575
|
};
|
|
2093
|
-
|
|
2094
|
-
return
|
|
1576
|
+
const serializeAws_json1_1ListInstancesRequest = (input, context) => {
|
|
1577
|
+
return {
|
|
1578
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1579
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1580
|
+
...(input.ServiceId != null && { ServiceId: input.ServiceId }),
|
|
1581
|
+
};
|
|
2095
1582
|
};
|
|
2096
|
-
|
|
2097
|
-
return
|
|
1583
|
+
const serializeAws_json1_1ListNamespacesRequest = (input, context) => {
|
|
1584
|
+
return {
|
|
1585
|
+
...(input.Filters != null && { Filters: serializeAws_json1_1NamespaceFilters(input.Filters, context) }),
|
|
1586
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1587
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1588
|
+
};
|
|
2098
1589
|
};
|
|
2099
|
-
|
|
2100
|
-
return
|
|
1590
|
+
const serializeAws_json1_1ListOperationsRequest = (input, context) => {
|
|
1591
|
+
return {
|
|
1592
|
+
...(input.Filters != null && { Filters: serializeAws_json1_1OperationFilters(input.Filters, context) }),
|
|
1593
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1594
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1595
|
+
};
|
|
2101
1596
|
};
|
|
2102
|
-
|
|
2103
|
-
return
|
|
1597
|
+
const serializeAws_json1_1ListServicesRequest = (input, context) => {
|
|
1598
|
+
return {
|
|
1599
|
+
...(input.Filters != null && { Filters: serializeAws_json1_1ServiceFilters(input.Filters, context) }),
|
|
1600
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1601
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1602
|
+
};
|
|
2104
1603
|
};
|
|
2105
|
-
|
|
2106
|
-
return
|
|
1604
|
+
const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
|
|
1605
|
+
return {
|
|
1606
|
+
...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
|
|
1607
|
+
};
|
|
2107
1608
|
};
|
|
2108
|
-
|
|
2109
|
-
return
|
|
1609
|
+
const serializeAws_json1_1NamespaceFilter = (input, context) => {
|
|
1610
|
+
return {
|
|
1611
|
+
...(input.Condition != null && { Condition: input.Condition }),
|
|
1612
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1613
|
+
...(input.Values != null && { Values: serializeAws_json1_1FilterValues(input.Values, context) }),
|
|
1614
|
+
};
|
|
2110
1615
|
};
|
|
2111
|
-
|
|
1616
|
+
const serializeAws_json1_1NamespaceFilters = (input, context) => {
|
|
2112
1617
|
return input
|
|
2113
|
-
.filter(
|
|
2114
|
-
.map(
|
|
1618
|
+
.filter((e) => e != null)
|
|
1619
|
+
.map((entry) => {
|
|
2115
1620
|
return serializeAws_json1_1NamespaceFilter(entry, context);
|
|
2116
1621
|
});
|
|
2117
1622
|
};
|
|
2118
|
-
|
|
2119
|
-
return
|
|
1623
|
+
const serializeAws_json1_1OperationFilter = (input, context) => {
|
|
1624
|
+
return {
|
|
1625
|
+
...(input.Condition != null && { Condition: input.Condition }),
|
|
1626
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1627
|
+
...(input.Values != null && { Values: serializeAws_json1_1FilterValues(input.Values, context) }),
|
|
1628
|
+
};
|
|
2120
1629
|
};
|
|
2121
|
-
|
|
1630
|
+
const serializeAws_json1_1OperationFilters = (input, context) => {
|
|
2122
1631
|
return input
|
|
2123
|
-
.filter(
|
|
2124
|
-
.map(
|
|
1632
|
+
.filter((e) => e != null)
|
|
1633
|
+
.map((entry) => {
|
|
2125
1634
|
return serializeAws_json1_1OperationFilter(entry, context);
|
|
2126
1635
|
});
|
|
2127
1636
|
};
|
|
2128
|
-
|
|
2129
|
-
return
|
|
2130
|
-
|
|
2131
|
-
|
|
1637
|
+
const serializeAws_json1_1PrivateDnsNamespaceChange = (input, context) => {
|
|
1638
|
+
return {
|
|
1639
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1640
|
+
...(input.Properties != null && {
|
|
1641
|
+
Properties: serializeAws_json1_1PrivateDnsNamespacePropertiesChange(input.Properties, context),
|
|
1642
|
+
}),
|
|
1643
|
+
};
|
|
2132
1644
|
};
|
|
2133
|
-
|
|
2134
|
-
return
|
|
2135
|
-
|
|
2136
|
-
|
|
1645
|
+
const serializeAws_json1_1PrivateDnsNamespaceProperties = (input, context) => {
|
|
1646
|
+
return {
|
|
1647
|
+
...(input.DnsProperties != null && {
|
|
1648
|
+
DnsProperties: serializeAws_json1_1PrivateDnsPropertiesMutable(input.DnsProperties, context),
|
|
1649
|
+
}),
|
|
1650
|
+
};
|
|
2137
1651
|
};
|
|
2138
|
-
|
|
2139
|
-
return
|
|
2140
|
-
|
|
2141
|
-
|
|
1652
|
+
const serializeAws_json1_1PrivateDnsNamespacePropertiesChange = (input, context) => {
|
|
1653
|
+
return {
|
|
1654
|
+
...(input.DnsProperties != null && {
|
|
1655
|
+
DnsProperties: serializeAws_json1_1PrivateDnsPropertiesMutableChange(input.DnsProperties, context),
|
|
1656
|
+
}),
|
|
1657
|
+
};
|
|
2142
1658
|
};
|
|
2143
|
-
|
|
2144
|
-
return
|
|
1659
|
+
const serializeAws_json1_1PrivateDnsPropertiesMutable = (input, context) => {
|
|
1660
|
+
return {
|
|
1661
|
+
...(input.SOA != null && { SOA: serializeAws_json1_1SOA(input.SOA, context) }),
|
|
1662
|
+
};
|
|
2145
1663
|
};
|
|
2146
|
-
|
|
2147
|
-
return
|
|
1664
|
+
const serializeAws_json1_1PrivateDnsPropertiesMutableChange = (input, context) => {
|
|
1665
|
+
return {
|
|
1666
|
+
...(input.SOA != null && { SOA: serializeAws_json1_1SOAChange(input.SOA, context) }),
|
|
1667
|
+
};
|
|
2148
1668
|
};
|
|
2149
|
-
|
|
2150
|
-
return
|
|
2151
|
-
|
|
2152
|
-
|
|
1669
|
+
const serializeAws_json1_1PublicDnsNamespaceChange = (input, context) => {
|
|
1670
|
+
return {
|
|
1671
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1672
|
+
...(input.Properties != null && {
|
|
1673
|
+
Properties: serializeAws_json1_1PublicDnsNamespacePropertiesChange(input.Properties, context),
|
|
1674
|
+
}),
|
|
1675
|
+
};
|
|
2153
1676
|
};
|
|
2154
|
-
|
|
2155
|
-
return
|
|
2156
|
-
|
|
2157
|
-
|
|
1677
|
+
const serializeAws_json1_1PublicDnsNamespaceProperties = (input, context) => {
|
|
1678
|
+
return {
|
|
1679
|
+
...(input.DnsProperties != null && {
|
|
1680
|
+
DnsProperties: serializeAws_json1_1PublicDnsPropertiesMutable(input.DnsProperties, context),
|
|
1681
|
+
}),
|
|
1682
|
+
};
|
|
2158
1683
|
};
|
|
2159
|
-
|
|
2160
|
-
return
|
|
2161
|
-
|
|
2162
|
-
|
|
1684
|
+
const serializeAws_json1_1PublicDnsNamespacePropertiesChange = (input, context) => {
|
|
1685
|
+
return {
|
|
1686
|
+
...(input.DnsProperties != null && {
|
|
1687
|
+
DnsProperties: serializeAws_json1_1PublicDnsPropertiesMutableChange(input.DnsProperties, context),
|
|
1688
|
+
}),
|
|
1689
|
+
};
|
|
2163
1690
|
};
|
|
2164
|
-
|
|
2165
|
-
return
|
|
1691
|
+
const serializeAws_json1_1PublicDnsPropertiesMutable = (input, context) => {
|
|
1692
|
+
return {
|
|
1693
|
+
...(input.SOA != null && { SOA: serializeAws_json1_1SOA(input.SOA, context) }),
|
|
1694
|
+
};
|
|
2166
1695
|
};
|
|
2167
|
-
|
|
2168
|
-
return
|
|
1696
|
+
const serializeAws_json1_1PublicDnsPropertiesMutableChange = (input, context) => {
|
|
1697
|
+
return {
|
|
1698
|
+
...(input.SOA != null && { SOA: serializeAws_json1_1SOAChange(input.SOA, context) }),
|
|
1699
|
+
};
|
|
2169
1700
|
};
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
1701
|
+
const serializeAws_json1_1RegisterInstanceRequest = (input, context) => {
|
|
1702
|
+
return {
|
|
1703
|
+
...(input.Attributes != null && { Attributes: serializeAws_json1_1Attributes(input.Attributes, context) }),
|
|
1704
|
+
CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(),
|
|
1705
|
+
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
1706
|
+
...(input.ServiceId != null && { ServiceId: input.ServiceId }),
|
|
1707
|
+
};
|
|
2173
1708
|
};
|
|
2174
|
-
|
|
2175
|
-
return
|
|
2176
|
-
|
|
2177
|
-
|
|
1709
|
+
const serializeAws_json1_1ServiceChange = (input, context) => {
|
|
1710
|
+
return {
|
|
1711
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1712
|
+
...(input.DnsConfig != null && { DnsConfig: serializeAws_json1_1DnsConfigChange(input.DnsConfig, context) }),
|
|
1713
|
+
...(input.HealthCheckConfig != null && {
|
|
1714
|
+
HealthCheckConfig: serializeAws_json1_1HealthCheckConfig(input.HealthCheckConfig, context),
|
|
1715
|
+
}),
|
|
1716
|
+
};
|
|
2178
1717
|
};
|
|
2179
|
-
|
|
2180
|
-
return
|
|
1718
|
+
const serializeAws_json1_1ServiceFilter = (input, context) => {
|
|
1719
|
+
return {
|
|
1720
|
+
...(input.Condition != null && { Condition: input.Condition }),
|
|
1721
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1722
|
+
...(input.Values != null && { Values: serializeAws_json1_1FilterValues(input.Values, context) }),
|
|
1723
|
+
};
|
|
2181
1724
|
};
|
|
2182
|
-
|
|
1725
|
+
const serializeAws_json1_1ServiceFilters = (input, context) => {
|
|
2183
1726
|
return input
|
|
2184
|
-
.filter(
|
|
2185
|
-
.map(
|
|
1727
|
+
.filter((e) => e != null)
|
|
1728
|
+
.map((entry) => {
|
|
2186
1729
|
return serializeAws_json1_1ServiceFilter(entry, context);
|
|
2187
1730
|
});
|
|
2188
1731
|
};
|
|
2189
|
-
|
|
2190
|
-
return
|
|
1732
|
+
const serializeAws_json1_1SOA = (input, context) => {
|
|
1733
|
+
return {
|
|
1734
|
+
...(input.TTL != null && { TTL: input.TTL }),
|
|
1735
|
+
};
|
|
2191
1736
|
};
|
|
2192
|
-
|
|
2193
|
-
return
|
|
1737
|
+
const serializeAws_json1_1SOAChange = (input, context) => {
|
|
1738
|
+
return {
|
|
1739
|
+
...(input.TTL != null && { TTL: input.TTL }),
|
|
1740
|
+
};
|
|
2194
1741
|
};
|
|
2195
|
-
|
|
2196
|
-
return
|
|
1742
|
+
const serializeAws_json1_1Tag = (input, context) => {
|
|
1743
|
+
return {
|
|
1744
|
+
...(input.Key != null && { Key: input.Key }),
|
|
1745
|
+
...(input.Value != null && { Value: input.Value }),
|
|
1746
|
+
};
|
|
2197
1747
|
};
|
|
2198
|
-
|
|
1748
|
+
const serializeAws_json1_1TagKeyList = (input, context) => {
|
|
2199
1749
|
return input
|
|
2200
|
-
.filter(
|
|
2201
|
-
.map(
|
|
1750
|
+
.filter((e) => e != null)
|
|
1751
|
+
.map((entry) => {
|
|
2202
1752
|
return entry;
|
|
2203
1753
|
});
|
|
2204
1754
|
};
|
|
2205
|
-
|
|
1755
|
+
const serializeAws_json1_1TagList = (input, context) => {
|
|
2206
1756
|
return input
|
|
2207
|
-
.filter(
|
|
2208
|
-
.map(
|
|
1757
|
+
.filter((e) => e != null)
|
|
1758
|
+
.map((entry) => {
|
|
2209
1759
|
return serializeAws_json1_1Tag(entry, context);
|
|
2210
1760
|
});
|
|
2211
1761
|
};
|
|
2212
|
-
|
|
2213
|
-
return
|
|
1762
|
+
const serializeAws_json1_1TagResourceRequest = (input, context) => {
|
|
1763
|
+
return {
|
|
1764
|
+
...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
|
|
1765
|
+
...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
1766
|
+
};
|
|
2214
1767
|
};
|
|
2215
|
-
|
|
2216
|
-
return
|
|
1768
|
+
const serializeAws_json1_1UntagResourceRequest = (input, context) => {
|
|
1769
|
+
return {
|
|
1770
|
+
...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
|
|
1771
|
+
...(input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
|
|
1772
|
+
};
|
|
2217
1773
|
};
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
1774
|
+
const serializeAws_json1_1UpdateHttpNamespaceRequest = (input, context) => {
|
|
1775
|
+
return {
|
|
1776
|
+
...(input.Id != null && { Id: input.Id }),
|
|
1777
|
+
...(input.Namespace != null && { Namespace: serializeAws_json1_1HttpNamespaceChange(input.Namespace, context) }),
|
|
1778
|
+
UpdaterRequestId: input.UpdaterRequestId ?? generateIdempotencyToken(),
|
|
1779
|
+
};
|
|
2221
1780
|
};
|
|
2222
|
-
|
|
2223
|
-
return
|
|
1781
|
+
const serializeAws_json1_1UpdateInstanceCustomHealthStatusRequest = (input, context) => {
|
|
1782
|
+
return {
|
|
1783
|
+
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
1784
|
+
...(input.ServiceId != null && { ServiceId: input.ServiceId }),
|
|
1785
|
+
...(input.Status != null && { Status: input.Status }),
|
|
1786
|
+
};
|
|
2224
1787
|
};
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
1788
|
+
const serializeAws_json1_1UpdatePrivateDnsNamespaceRequest = (input, context) => {
|
|
1789
|
+
return {
|
|
1790
|
+
...(input.Id != null && { Id: input.Id }),
|
|
1791
|
+
...(input.Namespace != null && {
|
|
1792
|
+
Namespace: serializeAws_json1_1PrivateDnsNamespaceChange(input.Namespace, context),
|
|
1793
|
+
}),
|
|
1794
|
+
UpdaterRequestId: input.UpdaterRequestId ?? generateIdempotencyToken(),
|
|
1795
|
+
};
|
|
2230
1796
|
};
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
1797
|
+
const serializeAws_json1_1UpdatePublicDnsNamespaceRequest = (input, context) => {
|
|
1798
|
+
return {
|
|
1799
|
+
...(input.Id != null && { Id: input.Id }),
|
|
1800
|
+
...(input.Namespace != null && {
|
|
1801
|
+
Namespace: serializeAws_json1_1PublicDnsNamespaceChange(input.Namespace, context),
|
|
1802
|
+
}),
|
|
1803
|
+
UpdaterRequestId: input.UpdaterRequestId ?? generateIdempotencyToken(),
|
|
1804
|
+
};
|
|
2236
1805
|
};
|
|
2237
|
-
|
|
2238
|
-
return
|
|
1806
|
+
const serializeAws_json1_1UpdateServiceRequest = (input, context) => {
|
|
1807
|
+
return {
|
|
1808
|
+
...(input.Id != null && { Id: input.Id }),
|
|
1809
|
+
...(input.Service != null && { Service: serializeAws_json1_1ServiceChange(input.Service, context) }),
|
|
1810
|
+
};
|
|
2239
1811
|
};
|
|
2240
|
-
|
|
2241
|
-
return Object.entries(output).reduce(
|
|
2242
|
-
var _b;
|
|
2243
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1812
|
+
const deserializeAws_json1_1Attributes = (output, context) => {
|
|
1813
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2244
1814
|
if (value === null) {
|
|
2245
1815
|
return acc;
|
|
2246
1816
|
}
|
|
2247
|
-
return
|
|
1817
|
+
return {
|
|
1818
|
+
...acc,
|
|
1819
|
+
[key]: __expectString(value),
|
|
1820
|
+
};
|
|
2248
1821
|
}, {});
|
|
2249
1822
|
};
|
|
2250
|
-
|
|
1823
|
+
const deserializeAws_json1_1CreateHttpNamespaceResponse = (output, context) => {
|
|
2251
1824
|
return {
|
|
2252
1825
|
OperationId: __expectString(output.OperationId),
|
|
2253
1826
|
};
|
|
2254
1827
|
};
|
|
2255
|
-
|
|
1828
|
+
const deserializeAws_json1_1CreatePrivateDnsNamespaceResponse = (output, context) => {
|
|
2256
1829
|
return {
|
|
2257
1830
|
OperationId: __expectString(output.OperationId),
|
|
2258
1831
|
};
|
|
2259
1832
|
};
|
|
2260
|
-
|
|
1833
|
+
const deserializeAws_json1_1CreatePublicDnsNamespaceResponse = (output, context) => {
|
|
2261
1834
|
return {
|
|
2262
1835
|
OperationId: __expectString(output.OperationId),
|
|
2263
1836
|
};
|
|
2264
1837
|
};
|
|
2265
|
-
|
|
1838
|
+
const deserializeAws_json1_1CreateServiceResponse = (output, context) => {
|
|
2266
1839
|
return {
|
|
2267
1840
|
Service: output.Service != null ? deserializeAws_json1_1Service(output.Service, context) : undefined,
|
|
2268
1841
|
};
|
|
2269
1842
|
};
|
|
2270
|
-
|
|
1843
|
+
const deserializeAws_json1_1CustomHealthNotFound = (output, context) => {
|
|
2271
1844
|
return {
|
|
2272
1845
|
Message: __expectString(output.Message),
|
|
2273
1846
|
};
|
|
2274
1847
|
};
|
|
2275
|
-
|
|
1848
|
+
const deserializeAws_json1_1DeleteNamespaceResponse = (output, context) => {
|
|
2276
1849
|
return {
|
|
2277
1850
|
OperationId: __expectString(output.OperationId),
|
|
2278
1851
|
};
|
|
2279
1852
|
};
|
|
2280
|
-
|
|
1853
|
+
const deserializeAws_json1_1DeleteServiceResponse = (output, context) => {
|
|
2281
1854
|
return {};
|
|
2282
1855
|
};
|
|
2283
|
-
|
|
1856
|
+
const deserializeAws_json1_1DeregisterInstanceResponse = (output, context) => {
|
|
2284
1857
|
return {
|
|
2285
1858
|
OperationId: __expectString(output.OperationId),
|
|
2286
1859
|
};
|
|
2287
1860
|
};
|
|
2288
|
-
|
|
1861
|
+
const deserializeAws_json1_1DiscoverInstancesResponse = (output, context) => {
|
|
2289
1862
|
return {
|
|
2290
1863
|
Instances: output.Instances != null ? deserializeAws_json1_1HttpInstanceSummaryList(output.Instances, context) : undefined,
|
|
2291
1864
|
};
|
|
2292
1865
|
};
|
|
2293
|
-
|
|
1866
|
+
const deserializeAws_json1_1DnsConfig = (output, context) => {
|
|
2294
1867
|
return {
|
|
2295
1868
|
DnsRecords: output.DnsRecords != null ? deserializeAws_json1_1DnsRecordList(output.DnsRecords, context) : undefined,
|
|
2296
1869
|
NamespaceId: __expectString(output.NamespaceId),
|
|
2297
1870
|
RoutingPolicy: __expectString(output.RoutingPolicy),
|
|
2298
1871
|
};
|
|
2299
1872
|
};
|
|
2300
|
-
|
|
1873
|
+
const deserializeAws_json1_1DnsProperties = (output, context) => {
|
|
2301
1874
|
return {
|
|
2302
1875
|
HostedZoneId: __expectString(output.HostedZoneId),
|
|
2303
1876
|
SOA: output.SOA != null ? deserializeAws_json1_1SOA(output.SOA, context) : undefined,
|
|
2304
1877
|
};
|
|
2305
1878
|
};
|
|
2306
|
-
|
|
1879
|
+
const deserializeAws_json1_1DnsRecord = (output, context) => {
|
|
2307
1880
|
return {
|
|
2308
1881
|
TTL: __expectLong(output.TTL),
|
|
2309
1882
|
Type: __expectString(output.Type),
|
|
2310
1883
|
};
|
|
2311
1884
|
};
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
.filter(
|
|
2315
|
-
.map(
|
|
1885
|
+
const deserializeAws_json1_1DnsRecordList = (output, context) => {
|
|
1886
|
+
const retVal = (output || [])
|
|
1887
|
+
.filter((e) => e != null)
|
|
1888
|
+
.map((entry) => {
|
|
2316
1889
|
if (entry === null) {
|
|
2317
1890
|
return null;
|
|
2318
1891
|
}
|
|
@@ -2320,51 +1893,51 @@ var deserializeAws_json1_1DnsRecordList = function (output, context) {
|
|
|
2320
1893
|
});
|
|
2321
1894
|
return retVal;
|
|
2322
1895
|
};
|
|
2323
|
-
|
|
1896
|
+
const deserializeAws_json1_1DuplicateRequest = (output, context) => {
|
|
2324
1897
|
return {
|
|
2325
1898
|
DuplicateOperationId: __expectString(output.DuplicateOperationId),
|
|
2326
1899
|
Message: __expectString(output.Message),
|
|
2327
1900
|
};
|
|
2328
1901
|
};
|
|
2329
|
-
|
|
1902
|
+
const deserializeAws_json1_1GetInstanceResponse = (output, context) => {
|
|
2330
1903
|
return {
|
|
2331
1904
|
Instance: output.Instance != null ? deserializeAws_json1_1Instance(output.Instance, context) : undefined,
|
|
2332
1905
|
};
|
|
2333
1906
|
};
|
|
2334
|
-
|
|
1907
|
+
const deserializeAws_json1_1GetInstancesHealthStatusResponse = (output, context) => {
|
|
2335
1908
|
return {
|
|
2336
1909
|
NextToken: __expectString(output.NextToken),
|
|
2337
1910
|
Status: output.Status != null ? deserializeAws_json1_1InstanceHealthStatusMap(output.Status, context) : undefined,
|
|
2338
1911
|
};
|
|
2339
1912
|
};
|
|
2340
|
-
|
|
1913
|
+
const deserializeAws_json1_1GetNamespaceResponse = (output, context) => {
|
|
2341
1914
|
return {
|
|
2342
1915
|
Namespace: output.Namespace != null ? deserializeAws_json1_1Namespace(output.Namespace, context) : undefined,
|
|
2343
1916
|
};
|
|
2344
1917
|
};
|
|
2345
|
-
|
|
1918
|
+
const deserializeAws_json1_1GetOperationResponse = (output, context) => {
|
|
2346
1919
|
return {
|
|
2347
1920
|
Operation: output.Operation != null ? deserializeAws_json1_1Operation(output.Operation, context) : undefined,
|
|
2348
1921
|
};
|
|
2349
1922
|
};
|
|
2350
|
-
|
|
1923
|
+
const deserializeAws_json1_1GetServiceResponse = (output, context) => {
|
|
2351
1924
|
return {
|
|
2352
1925
|
Service: output.Service != null ? deserializeAws_json1_1Service(output.Service, context) : undefined,
|
|
2353
1926
|
};
|
|
2354
1927
|
};
|
|
2355
|
-
|
|
1928
|
+
const deserializeAws_json1_1HealthCheckConfig = (output, context) => {
|
|
2356
1929
|
return {
|
|
2357
1930
|
FailureThreshold: __expectInt32(output.FailureThreshold),
|
|
2358
1931
|
ResourcePath: __expectString(output.ResourcePath),
|
|
2359
1932
|
Type: __expectString(output.Type),
|
|
2360
1933
|
};
|
|
2361
1934
|
};
|
|
2362
|
-
|
|
1935
|
+
const deserializeAws_json1_1HealthCheckCustomConfig = (output, context) => {
|
|
2363
1936
|
return {
|
|
2364
1937
|
FailureThreshold: __expectInt32(output.FailureThreshold),
|
|
2365
1938
|
};
|
|
2366
1939
|
};
|
|
2367
|
-
|
|
1940
|
+
const deserializeAws_json1_1HttpInstanceSummary = (output, context) => {
|
|
2368
1941
|
return {
|
|
2369
1942
|
Attributes: output.Attributes != null ? deserializeAws_json1_1Attributes(output.Attributes, context) : undefined,
|
|
2370
1943
|
HealthStatus: __expectString(output.HealthStatus),
|
|
@@ -2373,10 +1946,10 @@ var deserializeAws_json1_1HttpInstanceSummary = function (output, context) {
|
|
|
2373
1946
|
ServiceName: __expectString(output.ServiceName),
|
|
2374
1947
|
};
|
|
2375
1948
|
};
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
.filter(
|
|
2379
|
-
.map(
|
|
1949
|
+
const deserializeAws_json1_1HttpInstanceSummaryList = (output, context) => {
|
|
1950
|
+
const retVal = (output || [])
|
|
1951
|
+
.filter((e) => e != null)
|
|
1952
|
+
.map((entry) => {
|
|
2380
1953
|
if (entry === null) {
|
|
2381
1954
|
return null;
|
|
2382
1955
|
}
|
|
@@ -2384,43 +1957,44 @@ var deserializeAws_json1_1HttpInstanceSummaryList = function (output, context) {
|
|
|
2384
1957
|
});
|
|
2385
1958
|
return retVal;
|
|
2386
1959
|
};
|
|
2387
|
-
|
|
1960
|
+
const deserializeAws_json1_1HttpProperties = (output, context) => {
|
|
2388
1961
|
return {
|
|
2389
1962
|
HttpName: __expectString(output.HttpName),
|
|
2390
1963
|
};
|
|
2391
1964
|
};
|
|
2392
|
-
|
|
1965
|
+
const deserializeAws_json1_1Instance = (output, context) => {
|
|
2393
1966
|
return {
|
|
2394
1967
|
Attributes: output.Attributes != null ? deserializeAws_json1_1Attributes(output.Attributes, context) : undefined,
|
|
2395
1968
|
CreatorRequestId: __expectString(output.CreatorRequestId),
|
|
2396
1969
|
Id: __expectString(output.Id),
|
|
2397
1970
|
};
|
|
2398
1971
|
};
|
|
2399
|
-
|
|
2400
|
-
return Object.entries(output).reduce(
|
|
2401
|
-
var _b;
|
|
2402
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1972
|
+
const deserializeAws_json1_1InstanceHealthStatusMap = (output, context) => {
|
|
1973
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2403
1974
|
if (value === null) {
|
|
2404
1975
|
return acc;
|
|
2405
1976
|
}
|
|
2406
|
-
return
|
|
1977
|
+
return {
|
|
1978
|
+
...acc,
|
|
1979
|
+
[key]: __expectString(value),
|
|
1980
|
+
};
|
|
2407
1981
|
}, {});
|
|
2408
1982
|
};
|
|
2409
|
-
|
|
1983
|
+
const deserializeAws_json1_1InstanceNotFound = (output, context) => {
|
|
2410
1984
|
return {
|
|
2411
1985
|
Message: __expectString(output.Message),
|
|
2412
1986
|
};
|
|
2413
1987
|
};
|
|
2414
|
-
|
|
1988
|
+
const deserializeAws_json1_1InstanceSummary = (output, context) => {
|
|
2415
1989
|
return {
|
|
2416
1990
|
Attributes: output.Attributes != null ? deserializeAws_json1_1Attributes(output.Attributes, context) : undefined,
|
|
2417
1991
|
Id: __expectString(output.Id),
|
|
2418
1992
|
};
|
|
2419
1993
|
};
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
.filter(
|
|
2423
|
-
.map(
|
|
1994
|
+
const deserializeAws_json1_1InstanceSummaryList = (output, context) => {
|
|
1995
|
+
const retVal = (output || [])
|
|
1996
|
+
.filter((e) => e != null)
|
|
1997
|
+
.map((entry) => {
|
|
2424
1998
|
if (entry === null) {
|
|
2425
1999
|
return null;
|
|
2426
2000
|
}
|
|
@@ -2428,41 +2002,41 @@ var deserializeAws_json1_1InstanceSummaryList = function (output, context) {
|
|
|
2428
2002
|
});
|
|
2429
2003
|
return retVal;
|
|
2430
2004
|
};
|
|
2431
|
-
|
|
2005
|
+
const deserializeAws_json1_1InvalidInput = (output, context) => {
|
|
2432
2006
|
return {
|
|
2433
2007
|
Message: __expectString(output.Message),
|
|
2434
2008
|
};
|
|
2435
2009
|
};
|
|
2436
|
-
|
|
2010
|
+
const deserializeAws_json1_1ListInstancesResponse = (output, context) => {
|
|
2437
2011
|
return {
|
|
2438
2012
|
Instances: output.Instances != null ? deserializeAws_json1_1InstanceSummaryList(output.Instances, context) : undefined,
|
|
2439
2013
|
NextToken: __expectString(output.NextToken),
|
|
2440
2014
|
};
|
|
2441
2015
|
};
|
|
2442
|
-
|
|
2016
|
+
const deserializeAws_json1_1ListNamespacesResponse = (output, context) => {
|
|
2443
2017
|
return {
|
|
2444
2018
|
Namespaces: output.Namespaces != null ? deserializeAws_json1_1NamespaceSummariesList(output.Namespaces, context) : undefined,
|
|
2445
2019
|
NextToken: __expectString(output.NextToken),
|
|
2446
2020
|
};
|
|
2447
2021
|
};
|
|
2448
|
-
|
|
2022
|
+
const deserializeAws_json1_1ListOperationsResponse = (output, context) => {
|
|
2449
2023
|
return {
|
|
2450
2024
|
NextToken: __expectString(output.NextToken),
|
|
2451
2025
|
Operations: output.Operations != null ? deserializeAws_json1_1OperationSummaryList(output.Operations, context) : undefined,
|
|
2452
2026
|
};
|
|
2453
2027
|
};
|
|
2454
|
-
|
|
2028
|
+
const deserializeAws_json1_1ListServicesResponse = (output, context) => {
|
|
2455
2029
|
return {
|
|
2456
2030
|
NextToken: __expectString(output.NextToken),
|
|
2457
2031
|
Services: output.Services != null ? deserializeAws_json1_1ServiceSummariesList(output.Services, context) : undefined,
|
|
2458
2032
|
};
|
|
2459
2033
|
};
|
|
2460
|
-
|
|
2034
|
+
const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
|
|
2461
2035
|
return {
|
|
2462
2036
|
Tags: output.Tags != null ? deserializeAws_json1_1TagList(output.Tags, context) : undefined,
|
|
2463
2037
|
};
|
|
2464
2038
|
};
|
|
2465
|
-
|
|
2039
|
+
const deserializeAws_json1_1Namespace = (output, context) => {
|
|
2466
2040
|
return {
|
|
2467
2041
|
Arn: __expectString(output.Arn),
|
|
2468
2042
|
CreateDate: output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined,
|
|
@@ -2475,28 +2049,28 @@ var deserializeAws_json1_1Namespace = function (output, context) {
|
|
|
2475
2049
|
Type: __expectString(output.Type),
|
|
2476
2050
|
};
|
|
2477
2051
|
};
|
|
2478
|
-
|
|
2052
|
+
const deserializeAws_json1_1NamespaceAlreadyExists = (output, context) => {
|
|
2479
2053
|
return {
|
|
2480
2054
|
CreatorRequestId: __expectString(output.CreatorRequestId),
|
|
2481
2055
|
Message: __expectString(output.Message),
|
|
2482
2056
|
NamespaceId: __expectString(output.NamespaceId),
|
|
2483
2057
|
};
|
|
2484
2058
|
};
|
|
2485
|
-
|
|
2059
|
+
const deserializeAws_json1_1NamespaceNotFound = (output, context) => {
|
|
2486
2060
|
return {
|
|
2487
2061
|
Message: __expectString(output.Message),
|
|
2488
2062
|
};
|
|
2489
2063
|
};
|
|
2490
|
-
|
|
2064
|
+
const deserializeAws_json1_1NamespaceProperties = (output, context) => {
|
|
2491
2065
|
return {
|
|
2492
2066
|
DnsProperties: output.DnsProperties != null ? deserializeAws_json1_1DnsProperties(output.DnsProperties, context) : undefined,
|
|
2493
2067
|
HttpProperties: output.HttpProperties != null ? deserializeAws_json1_1HttpProperties(output.HttpProperties, context) : undefined,
|
|
2494
2068
|
};
|
|
2495
2069
|
};
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
.filter(
|
|
2499
|
-
.map(
|
|
2070
|
+
const deserializeAws_json1_1NamespaceSummariesList = (output, context) => {
|
|
2071
|
+
const retVal = (output || [])
|
|
2072
|
+
.filter((e) => e != null)
|
|
2073
|
+
.map((entry) => {
|
|
2500
2074
|
if (entry === null) {
|
|
2501
2075
|
return null;
|
|
2502
2076
|
}
|
|
@@ -2504,7 +2078,7 @@ var deserializeAws_json1_1NamespaceSummariesList = function (output, context) {
|
|
|
2504
2078
|
});
|
|
2505
2079
|
return retVal;
|
|
2506
2080
|
};
|
|
2507
|
-
|
|
2081
|
+
const deserializeAws_json1_1NamespaceSummary = (output, context) => {
|
|
2508
2082
|
return {
|
|
2509
2083
|
Arn: __expectString(output.Arn),
|
|
2510
2084
|
CreateDate: output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined,
|
|
@@ -2516,7 +2090,7 @@ var deserializeAws_json1_1NamespaceSummary = function (output, context) {
|
|
|
2516
2090
|
Type: __expectString(output.Type),
|
|
2517
2091
|
};
|
|
2518
2092
|
};
|
|
2519
|
-
|
|
2093
|
+
const deserializeAws_json1_1Operation = (output, context) => {
|
|
2520
2094
|
return {
|
|
2521
2095
|
CreateDate: output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined,
|
|
2522
2096
|
ErrorCode: __expectString(output.ErrorCode),
|
|
@@ -2528,21 +2102,21 @@ var deserializeAws_json1_1Operation = function (output, context) {
|
|
|
2528
2102
|
UpdateDate: output.UpdateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateDate))) : undefined,
|
|
2529
2103
|
};
|
|
2530
2104
|
};
|
|
2531
|
-
|
|
2105
|
+
const deserializeAws_json1_1OperationNotFound = (output, context) => {
|
|
2532
2106
|
return {
|
|
2533
2107
|
Message: __expectString(output.Message),
|
|
2534
2108
|
};
|
|
2535
2109
|
};
|
|
2536
|
-
|
|
2110
|
+
const deserializeAws_json1_1OperationSummary = (output, context) => {
|
|
2537
2111
|
return {
|
|
2538
2112
|
Id: __expectString(output.Id),
|
|
2539
2113
|
Status: __expectString(output.Status),
|
|
2540
2114
|
};
|
|
2541
2115
|
};
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
.filter(
|
|
2545
|
-
.map(
|
|
2116
|
+
const deserializeAws_json1_1OperationSummaryList = (output, context) => {
|
|
2117
|
+
const retVal = (output || [])
|
|
2118
|
+
.filter((e) => e != null)
|
|
2119
|
+
.map((entry) => {
|
|
2546
2120
|
if (entry === null) {
|
|
2547
2121
|
return null;
|
|
2548
2122
|
}
|
|
@@ -2550,42 +2124,43 @@ var deserializeAws_json1_1OperationSummaryList = function (output, context) {
|
|
|
2550
2124
|
});
|
|
2551
2125
|
return retVal;
|
|
2552
2126
|
};
|
|
2553
|
-
|
|
2554
|
-
return Object.entries(output).reduce(
|
|
2555
|
-
var _b;
|
|
2556
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2127
|
+
const deserializeAws_json1_1OperationTargetsMap = (output, context) => {
|
|
2128
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2557
2129
|
if (value === null) {
|
|
2558
2130
|
return acc;
|
|
2559
2131
|
}
|
|
2560
|
-
return
|
|
2132
|
+
return {
|
|
2133
|
+
...acc,
|
|
2134
|
+
[key]: __expectString(value),
|
|
2135
|
+
};
|
|
2561
2136
|
}, {});
|
|
2562
2137
|
};
|
|
2563
|
-
|
|
2138
|
+
const deserializeAws_json1_1RegisterInstanceResponse = (output, context) => {
|
|
2564
2139
|
return {
|
|
2565
2140
|
OperationId: __expectString(output.OperationId),
|
|
2566
2141
|
};
|
|
2567
2142
|
};
|
|
2568
|
-
|
|
2143
|
+
const deserializeAws_json1_1RequestLimitExceeded = (output, context) => {
|
|
2569
2144
|
return {
|
|
2570
2145
|
Message: __expectString(output.Message),
|
|
2571
2146
|
};
|
|
2572
2147
|
};
|
|
2573
|
-
|
|
2148
|
+
const deserializeAws_json1_1ResourceInUse = (output, context) => {
|
|
2574
2149
|
return {
|
|
2575
2150
|
Message: __expectString(output.Message),
|
|
2576
2151
|
};
|
|
2577
2152
|
};
|
|
2578
|
-
|
|
2153
|
+
const deserializeAws_json1_1ResourceLimitExceeded = (output, context) => {
|
|
2579
2154
|
return {
|
|
2580
2155
|
Message: __expectString(output.Message),
|
|
2581
2156
|
};
|
|
2582
2157
|
};
|
|
2583
|
-
|
|
2158
|
+
const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
|
|
2584
2159
|
return {
|
|
2585
2160
|
Message: __expectString(output.Message),
|
|
2586
2161
|
};
|
|
2587
2162
|
};
|
|
2588
|
-
|
|
2163
|
+
const deserializeAws_json1_1Service = (output, context) => {
|
|
2589
2164
|
return {
|
|
2590
2165
|
Arn: __expectString(output.Arn),
|
|
2591
2166
|
CreateDate: output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined,
|
|
@@ -2605,22 +2180,22 @@ var deserializeAws_json1_1Service = function (output, context) {
|
|
|
2605
2180
|
Type: __expectString(output.Type),
|
|
2606
2181
|
};
|
|
2607
2182
|
};
|
|
2608
|
-
|
|
2183
|
+
const deserializeAws_json1_1ServiceAlreadyExists = (output, context) => {
|
|
2609
2184
|
return {
|
|
2610
2185
|
CreatorRequestId: __expectString(output.CreatorRequestId),
|
|
2611
2186
|
Message: __expectString(output.Message),
|
|
2612
2187
|
ServiceId: __expectString(output.ServiceId),
|
|
2613
2188
|
};
|
|
2614
2189
|
};
|
|
2615
|
-
|
|
2190
|
+
const deserializeAws_json1_1ServiceNotFound = (output, context) => {
|
|
2616
2191
|
return {
|
|
2617
2192
|
Message: __expectString(output.Message),
|
|
2618
2193
|
};
|
|
2619
2194
|
};
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
.filter(
|
|
2623
|
-
.map(
|
|
2195
|
+
const deserializeAws_json1_1ServiceSummariesList = (output, context) => {
|
|
2196
|
+
const retVal = (output || [])
|
|
2197
|
+
.filter((e) => e != null)
|
|
2198
|
+
.map((entry) => {
|
|
2624
2199
|
if (entry === null) {
|
|
2625
2200
|
return null;
|
|
2626
2201
|
}
|
|
@@ -2628,7 +2203,7 @@ var deserializeAws_json1_1ServiceSummariesList = function (output, context) {
|
|
|
2628
2203
|
});
|
|
2629
2204
|
return retVal;
|
|
2630
2205
|
};
|
|
2631
|
-
|
|
2206
|
+
const deserializeAws_json1_1ServiceSummary = (output, context) => {
|
|
2632
2207
|
return {
|
|
2633
2208
|
Arn: __expectString(output.Arn),
|
|
2634
2209
|
CreateDate: output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined,
|
|
@@ -2646,21 +2221,21 @@ var deserializeAws_json1_1ServiceSummary = function (output, context) {
|
|
|
2646
2221
|
Type: __expectString(output.Type),
|
|
2647
2222
|
};
|
|
2648
2223
|
};
|
|
2649
|
-
|
|
2224
|
+
const deserializeAws_json1_1SOA = (output, context) => {
|
|
2650
2225
|
return {
|
|
2651
2226
|
TTL: __expectLong(output.TTL),
|
|
2652
2227
|
};
|
|
2653
2228
|
};
|
|
2654
|
-
|
|
2229
|
+
const deserializeAws_json1_1Tag = (output, context) => {
|
|
2655
2230
|
return {
|
|
2656
2231
|
Key: __expectString(output.Key),
|
|
2657
2232
|
Value: __expectString(output.Value),
|
|
2658
2233
|
};
|
|
2659
2234
|
};
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
.filter(
|
|
2663
|
-
.map(
|
|
2235
|
+
const deserializeAws_json1_1TagList = (output, context) => {
|
|
2236
|
+
const retVal = (output || [])
|
|
2237
|
+
.filter((e) => e != null)
|
|
2238
|
+
.map((entry) => {
|
|
2664
2239
|
if (entry === null) {
|
|
2665
2240
|
return null;
|
|
2666
2241
|
}
|
|
@@ -2668,107 +2243,84 @@ var deserializeAws_json1_1TagList = function (output, context) {
|
|
|
2668
2243
|
});
|
|
2669
2244
|
return retVal;
|
|
2670
2245
|
};
|
|
2671
|
-
|
|
2246
|
+
const deserializeAws_json1_1TagResourceResponse = (output, context) => {
|
|
2672
2247
|
return {};
|
|
2673
2248
|
};
|
|
2674
|
-
|
|
2249
|
+
const deserializeAws_json1_1TooManyTagsException = (output, context) => {
|
|
2675
2250
|
return {
|
|
2676
2251
|
Message: __expectString(output.Message),
|
|
2677
2252
|
ResourceName: __expectString(output.ResourceName),
|
|
2678
2253
|
};
|
|
2679
2254
|
};
|
|
2680
|
-
|
|
2255
|
+
const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
|
|
2681
2256
|
return {};
|
|
2682
2257
|
};
|
|
2683
|
-
|
|
2258
|
+
const deserializeAws_json1_1UpdateHttpNamespaceResponse = (output, context) => {
|
|
2684
2259
|
return {
|
|
2685
2260
|
OperationId: __expectString(output.OperationId),
|
|
2686
2261
|
};
|
|
2687
2262
|
};
|
|
2688
|
-
|
|
2263
|
+
const deserializeAws_json1_1UpdatePrivateDnsNamespaceResponse = (output, context) => {
|
|
2689
2264
|
return {
|
|
2690
2265
|
OperationId: __expectString(output.OperationId),
|
|
2691
2266
|
};
|
|
2692
2267
|
};
|
|
2693
|
-
|
|
2268
|
+
const deserializeAws_json1_1UpdatePublicDnsNamespaceResponse = (output, context) => {
|
|
2694
2269
|
return {
|
|
2695
2270
|
OperationId: __expectString(output.OperationId),
|
|
2696
2271
|
};
|
|
2697
2272
|
};
|
|
2698
|
-
|
|
2273
|
+
const deserializeAws_json1_1UpdateServiceResponse = (output, context) => {
|
|
2699
2274
|
return {
|
|
2700
2275
|
OperationId: __expectString(output.OperationId),
|
|
2701
2276
|
};
|
|
2702
2277
|
};
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
});
|
|
2711
|
-
};
|
|
2712
|
-
var collectBody = function (streamBody, context) {
|
|
2713
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
2278
|
+
const deserializeMetadata = (output) => ({
|
|
2279
|
+
httpStatusCode: output.statusCode,
|
|
2280
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
2281
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2282
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
2283
|
+
});
|
|
2284
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
2714
2285
|
if (streamBody instanceof Uint8Array) {
|
|
2715
2286
|
return Promise.resolve(streamBody);
|
|
2716
2287
|
}
|
|
2717
2288
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2718
2289
|
};
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
};
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
if (resolvedHostname !== undefined) {
|
|
2738
|
-
contents.hostname = resolvedHostname;
|
|
2739
|
-
}
|
|
2740
|
-
if (body !== undefined) {
|
|
2741
|
-
contents.body = body;
|
|
2742
|
-
}
|
|
2743
|
-
return [2, new __HttpRequest(contents)];
|
|
2744
|
-
}
|
|
2745
|
-
});
|
|
2746
|
-
}); };
|
|
2747
|
-
var parseBody = function (streamBody, context) {
|
|
2748
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
2749
|
-
if (encoded.length) {
|
|
2750
|
-
return JSON.parse(encoded);
|
|
2751
|
-
}
|
|
2752
|
-
return {};
|
|
2753
|
-
});
|
|
2290
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2291
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
2292
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2293
|
+
const contents = {
|
|
2294
|
+
protocol,
|
|
2295
|
+
hostname,
|
|
2296
|
+
port,
|
|
2297
|
+
method: "POST",
|
|
2298
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
2299
|
+
headers,
|
|
2300
|
+
};
|
|
2301
|
+
if (resolvedHostname !== undefined) {
|
|
2302
|
+
contents.hostname = resolvedHostname;
|
|
2303
|
+
}
|
|
2304
|
+
if (body !== undefined) {
|
|
2305
|
+
contents.body = body;
|
|
2306
|
+
}
|
|
2307
|
+
return new __HttpRequest(contents);
|
|
2754
2308
|
};
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
2771
|
-
var cleanValue = rawValue;
|
|
2309
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2310
|
+
if (encoded.length) {
|
|
2311
|
+
return JSON.parse(encoded);
|
|
2312
|
+
}
|
|
2313
|
+
return {};
|
|
2314
|
+
});
|
|
2315
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
2316
|
+
const value = await parseBody(errorBody, context);
|
|
2317
|
+
value.message = value.message ?? value.Message;
|
|
2318
|
+
return value;
|
|
2319
|
+
};
|
|
2320
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
2321
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2322
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
2323
|
+
let cleanValue = rawValue;
|
|
2772
2324
|
if (typeof cleanValue === "number") {
|
|
2773
2325
|
cleanValue = cleanValue.toString();
|
|
2774
2326
|
}
|
|
@@ -2783,7 +2335,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
2783
2335
|
}
|
|
2784
2336
|
return cleanValue;
|
|
2785
2337
|
};
|
|
2786
|
-
|
|
2338
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2787
2339
|
if (headerKey !== undefined) {
|
|
2788
2340
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2789
2341
|
}
|