@aws-sdk/client-servicediscovery 3.489.0 → 3.495.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/dist-cjs/ServiceDiscovery.js +1 -65
- package/dist-cjs/ServiceDiscoveryClient.js +1 -43
- package/dist-cjs/commands/CreateHttpNamespaceCommand.js +1 -28
- package/dist-cjs/commands/CreatePrivateDnsNamespaceCommand.js +1 -28
- package/dist-cjs/commands/CreatePublicDnsNamespaceCommand.js +1 -28
- package/dist-cjs/commands/CreateServiceCommand.js +1 -28
- package/dist-cjs/commands/DeleteNamespaceCommand.js +1 -28
- package/dist-cjs/commands/DeleteServiceCommand.js +1 -28
- package/dist-cjs/commands/DeregisterInstanceCommand.js +1 -28
- package/dist-cjs/commands/DiscoverInstancesCommand.js +1 -28
- package/dist-cjs/commands/DiscoverInstancesRevisionCommand.js +1 -28
- package/dist-cjs/commands/GetInstanceCommand.js +1 -28
- package/dist-cjs/commands/GetInstancesHealthStatusCommand.js +1 -28
- package/dist-cjs/commands/GetNamespaceCommand.js +1 -28
- package/dist-cjs/commands/GetOperationCommand.js +1 -28
- package/dist-cjs/commands/GetServiceCommand.js +1 -28
- package/dist-cjs/commands/ListInstancesCommand.js +1 -28
- package/dist-cjs/commands/ListNamespacesCommand.js +1 -28
- package/dist-cjs/commands/ListOperationsCommand.js +1 -28
- package/dist-cjs/commands/ListServicesCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/RegisterInstanceCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateHttpNamespaceCommand.js +1 -28
- package/dist-cjs/commands/UpdateInstanceCustomHealthStatusCommand.js +1 -28
- package/dist-cjs/commands/UpdatePrivateDnsNamespaceCommand.js +1 -28
- package/dist-cjs/commands/UpdatePublicDnsNamespaceCommand.js +1 -28
- package/dist-cjs/commands/UpdateServiceCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -30
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2730 -11
- package/dist-cjs/models/ServiceDiscoveryServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -289
- package/dist-cjs/pagination/GetInstancesHealthStatusPaginator.js +1 -7
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListInstancesPaginator.js +1 -7
- package/dist-cjs/pagination/ListNamespacesPaginator.js +1 -7
- package/dist-cjs/pagination/ListOperationsPaginator.js +1 -7
- package/dist-cjs/pagination/ListServicesPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -9
- package/dist-cjs/protocols/Aws_json1_1.js +1 -1665
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1665 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateHttpNamespaceCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_RegisterInstanceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListServicesCommand = exports.de_ListOperationsCommand = exports.de_ListNamespacesCommand = exports.de_ListInstancesCommand = exports.de_GetServiceCommand = exports.de_GetOperationCommand = exports.de_GetNamespaceCommand = exports.de_GetInstancesHealthStatusCommand = exports.de_GetInstanceCommand = exports.de_DiscoverInstancesRevisionCommand = exports.de_DiscoverInstancesCommand = exports.de_DeregisterInstanceCommand = exports.de_DeleteServiceCommand = exports.de_DeleteNamespaceCommand = exports.de_CreateServiceCommand = exports.de_CreatePublicDnsNamespaceCommand = exports.de_CreatePrivateDnsNamespaceCommand = exports.de_CreateHttpNamespaceCommand = exports.se_UpdateServiceCommand = exports.se_UpdatePublicDnsNamespaceCommand = exports.se_UpdatePrivateDnsNamespaceCommand = exports.se_UpdateInstanceCustomHealthStatusCommand = exports.se_UpdateHttpNamespaceCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_RegisterInstanceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListServicesCommand = exports.se_ListOperationsCommand = exports.se_ListNamespacesCommand = exports.se_ListInstancesCommand = exports.se_GetServiceCommand = exports.se_GetOperationCommand = exports.se_GetNamespaceCommand = exports.se_GetInstancesHealthStatusCommand = exports.se_GetInstanceCommand = exports.se_DiscoverInstancesRevisionCommand = exports.se_DiscoverInstancesCommand = exports.se_DeregisterInstanceCommand = exports.se_DeleteServiceCommand = exports.se_DeleteNamespaceCommand = exports.se_CreateServiceCommand = exports.se_CreatePublicDnsNamespaceCommand = exports.se_CreatePrivateDnsNamespaceCommand = exports.se_CreateHttpNamespaceCommand = void 0;
|
|
4
|
-
exports.de_UpdateServiceCommand = exports.de_UpdatePublicDnsNamespaceCommand = exports.de_UpdatePrivateDnsNamespaceCommand = exports.de_UpdateInstanceCustomHealthStatusCommand = void 0;
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const uuid_1 = require("uuid");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const ServiceDiscoveryServiceException_1 = require("../models/ServiceDiscoveryServiceException");
|
|
10
|
-
const se_CreateHttpNamespaceCommand = async (input, context) => {
|
|
11
|
-
const headers = sharedHeaders("CreateHttpNamespace");
|
|
12
|
-
let body;
|
|
13
|
-
body = JSON.stringify(se_CreateHttpNamespaceRequest(input, context));
|
|
14
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
15
|
-
};
|
|
16
|
-
exports.se_CreateHttpNamespaceCommand = se_CreateHttpNamespaceCommand;
|
|
17
|
-
const se_CreatePrivateDnsNamespaceCommand = async (input, context) => {
|
|
18
|
-
const headers = sharedHeaders("CreatePrivateDnsNamespace");
|
|
19
|
-
let body;
|
|
20
|
-
body = JSON.stringify(se_CreatePrivateDnsNamespaceRequest(input, context));
|
|
21
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
-
};
|
|
23
|
-
exports.se_CreatePrivateDnsNamespaceCommand = se_CreatePrivateDnsNamespaceCommand;
|
|
24
|
-
const se_CreatePublicDnsNamespaceCommand = async (input, context) => {
|
|
25
|
-
const headers = sharedHeaders("CreatePublicDnsNamespace");
|
|
26
|
-
let body;
|
|
27
|
-
body = JSON.stringify(se_CreatePublicDnsNamespaceRequest(input, context));
|
|
28
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
|
-
};
|
|
30
|
-
exports.se_CreatePublicDnsNamespaceCommand = se_CreatePublicDnsNamespaceCommand;
|
|
31
|
-
const se_CreateServiceCommand = async (input, context) => {
|
|
32
|
-
const headers = sharedHeaders("CreateService");
|
|
33
|
-
let body;
|
|
34
|
-
body = JSON.stringify(se_CreateServiceRequest(input, context));
|
|
35
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
-
};
|
|
37
|
-
exports.se_CreateServiceCommand = se_CreateServiceCommand;
|
|
38
|
-
const se_DeleteNamespaceCommand = async (input, context) => {
|
|
39
|
-
const headers = sharedHeaders("DeleteNamespace");
|
|
40
|
-
let body;
|
|
41
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
42
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
43
|
-
};
|
|
44
|
-
exports.se_DeleteNamespaceCommand = se_DeleteNamespaceCommand;
|
|
45
|
-
const se_DeleteServiceCommand = async (input, context) => {
|
|
46
|
-
const headers = sharedHeaders("DeleteService");
|
|
47
|
-
let body;
|
|
48
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
49
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
50
|
-
};
|
|
51
|
-
exports.se_DeleteServiceCommand = se_DeleteServiceCommand;
|
|
52
|
-
const se_DeregisterInstanceCommand = async (input, context) => {
|
|
53
|
-
const headers = sharedHeaders("DeregisterInstance");
|
|
54
|
-
let body;
|
|
55
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
56
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
57
|
-
};
|
|
58
|
-
exports.se_DeregisterInstanceCommand = se_DeregisterInstanceCommand;
|
|
59
|
-
const se_DiscoverInstancesCommand = async (input, context) => {
|
|
60
|
-
const headers = sharedHeaders("DiscoverInstances");
|
|
61
|
-
let body;
|
|
62
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
63
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
64
|
-
if (context.disableHostPrefix !== true) {
|
|
65
|
-
resolvedHostname = "data-" + resolvedHostname;
|
|
66
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
67
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
|
|
71
|
-
};
|
|
72
|
-
exports.se_DiscoverInstancesCommand = se_DiscoverInstancesCommand;
|
|
73
|
-
const se_DiscoverInstancesRevisionCommand = async (input, context) => {
|
|
74
|
-
const headers = sharedHeaders("DiscoverInstancesRevision");
|
|
75
|
-
let body;
|
|
76
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
77
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
78
|
-
if (context.disableHostPrefix !== true) {
|
|
79
|
-
resolvedHostname = "data-" + resolvedHostname;
|
|
80
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
81
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
|
|
85
|
-
};
|
|
86
|
-
exports.se_DiscoverInstancesRevisionCommand = se_DiscoverInstancesRevisionCommand;
|
|
87
|
-
const se_GetInstanceCommand = async (input, context) => {
|
|
88
|
-
const headers = sharedHeaders("GetInstance");
|
|
89
|
-
let body;
|
|
90
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
91
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
92
|
-
};
|
|
93
|
-
exports.se_GetInstanceCommand = se_GetInstanceCommand;
|
|
94
|
-
const se_GetInstancesHealthStatusCommand = async (input, context) => {
|
|
95
|
-
const headers = sharedHeaders("GetInstancesHealthStatus");
|
|
96
|
-
let body;
|
|
97
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
98
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
99
|
-
};
|
|
100
|
-
exports.se_GetInstancesHealthStatusCommand = se_GetInstancesHealthStatusCommand;
|
|
101
|
-
const se_GetNamespaceCommand = async (input, context) => {
|
|
102
|
-
const headers = sharedHeaders("GetNamespace");
|
|
103
|
-
let body;
|
|
104
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
105
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
106
|
-
};
|
|
107
|
-
exports.se_GetNamespaceCommand = se_GetNamespaceCommand;
|
|
108
|
-
const se_GetOperationCommand = async (input, context) => {
|
|
109
|
-
const headers = sharedHeaders("GetOperation");
|
|
110
|
-
let body;
|
|
111
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
112
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
113
|
-
};
|
|
114
|
-
exports.se_GetOperationCommand = se_GetOperationCommand;
|
|
115
|
-
const se_GetServiceCommand = async (input, context) => {
|
|
116
|
-
const headers = sharedHeaders("GetService");
|
|
117
|
-
let body;
|
|
118
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
119
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
120
|
-
};
|
|
121
|
-
exports.se_GetServiceCommand = se_GetServiceCommand;
|
|
122
|
-
const se_ListInstancesCommand = async (input, context) => {
|
|
123
|
-
const headers = sharedHeaders("ListInstances");
|
|
124
|
-
let body;
|
|
125
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
126
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
127
|
-
};
|
|
128
|
-
exports.se_ListInstancesCommand = se_ListInstancesCommand;
|
|
129
|
-
const se_ListNamespacesCommand = async (input, context) => {
|
|
130
|
-
const headers = sharedHeaders("ListNamespaces");
|
|
131
|
-
let body;
|
|
132
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
133
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
134
|
-
};
|
|
135
|
-
exports.se_ListNamespacesCommand = se_ListNamespacesCommand;
|
|
136
|
-
const se_ListOperationsCommand = async (input, context) => {
|
|
137
|
-
const headers = sharedHeaders("ListOperations");
|
|
138
|
-
let body;
|
|
139
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
140
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
141
|
-
};
|
|
142
|
-
exports.se_ListOperationsCommand = se_ListOperationsCommand;
|
|
143
|
-
const se_ListServicesCommand = async (input, context) => {
|
|
144
|
-
const headers = sharedHeaders("ListServices");
|
|
145
|
-
let body;
|
|
146
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
147
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
148
|
-
};
|
|
149
|
-
exports.se_ListServicesCommand = se_ListServicesCommand;
|
|
150
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
151
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
152
|
-
let body;
|
|
153
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
154
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
155
|
-
};
|
|
156
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
157
|
-
const se_RegisterInstanceCommand = async (input, context) => {
|
|
158
|
-
const headers = sharedHeaders("RegisterInstance");
|
|
159
|
-
let body;
|
|
160
|
-
body = JSON.stringify(se_RegisterInstanceRequest(input, context));
|
|
161
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
162
|
-
};
|
|
163
|
-
exports.se_RegisterInstanceCommand = se_RegisterInstanceCommand;
|
|
164
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
165
|
-
const headers = sharedHeaders("TagResource");
|
|
166
|
-
let body;
|
|
167
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
168
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
169
|
-
};
|
|
170
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
171
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
172
|
-
const headers = sharedHeaders("UntagResource");
|
|
173
|
-
let body;
|
|
174
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
175
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
176
|
-
};
|
|
177
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
178
|
-
const se_UpdateHttpNamespaceCommand = async (input, context) => {
|
|
179
|
-
const headers = sharedHeaders("UpdateHttpNamespace");
|
|
180
|
-
let body;
|
|
181
|
-
body = JSON.stringify(se_UpdateHttpNamespaceRequest(input, context));
|
|
182
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
183
|
-
};
|
|
184
|
-
exports.se_UpdateHttpNamespaceCommand = se_UpdateHttpNamespaceCommand;
|
|
185
|
-
const se_UpdateInstanceCustomHealthStatusCommand = async (input, context) => {
|
|
186
|
-
const headers = sharedHeaders("UpdateInstanceCustomHealthStatus");
|
|
187
|
-
let body;
|
|
188
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
189
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
190
|
-
};
|
|
191
|
-
exports.se_UpdateInstanceCustomHealthStatusCommand = se_UpdateInstanceCustomHealthStatusCommand;
|
|
192
|
-
const se_UpdatePrivateDnsNamespaceCommand = async (input, context) => {
|
|
193
|
-
const headers = sharedHeaders("UpdatePrivateDnsNamespace");
|
|
194
|
-
let body;
|
|
195
|
-
body = JSON.stringify(se_UpdatePrivateDnsNamespaceRequest(input, context));
|
|
196
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
197
|
-
};
|
|
198
|
-
exports.se_UpdatePrivateDnsNamespaceCommand = se_UpdatePrivateDnsNamespaceCommand;
|
|
199
|
-
const se_UpdatePublicDnsNamespaceCommand = async (input, context) => {
|
|
200
|
-
const headers = sharedHeaders("UpdatePublicDnsNamespace");
|
|
201
|
-
let body;
|
|
202
|
-
body = JSON.stringify(se_UpdatePublicDnsNamespaceRequest(input, context));
|
|
203
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
204
|
-
};
|
|
205
|
-
exports.se_UpdatePublicDnsNamespaceCommand = se_UpdatePublicDnsNamespaceCommand;
|
|
206
|
-
const se_UpdateServiceCommand = async (input, context) => {
|
|
207
|
-
const headers = sharedHeaders("UpdateService");
|
|
208
|
-
let body;
|
|
209
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
210
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
211
|
-
};
|
|
212
|
-
exports.se_UpdateServiceCommand = se_UpdateServiceCommand;
|
|
213
|
-
const de_CreateHttpNamespaceCommand = async (output, context) => {
|
|
214
|
-
if (output.statusCode >= 300) {
|
|
215
|
-
return de_CreateHttpNamespaceCommandError(output, context);
|
|
216
|
-
}
|
|
217
|
-
const data = await parseBody(output.body, context);
|
|
218
|
-
let contents = {};
|
|
219
|
-
contents = (0, smithy_client_1._json)(data);
|
|
220
|
-
const response = {
|
|
221
|
-
$metadata: deserializeMetadata(output),
|
|
222
|
-
...contents,
|
|
223
|
-
};
|
|
224
|
-
return response;
|
|
225
|
-
};
|
|
226
|
-
exports.de_CreateHttpNamespaceCommand = de_CreateHttpNamespaceCommand;
|
|
227
|
-
const de_CreateHttpNamespaceCommandError = async (output, context) => {
|
|
228
|
-
const parsedOutput = {
|
|
229
|
-
...output,
|
|
230
|
-
body: await parseErrorBody(output.body, context),
|
|
231
|
-
};
|
|
232
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
233
|
-
switch (errorCode) {
|
|
234
|
-
case "DuplicateRequest":
|
|
235
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
236
|
-
throw await de_DuplicateRequestRes(parsedOutput, context);
|
|
237
|
-
case "InvalidInput":
|
|
238
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
239
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
240
|
-
case "NamespaceAlreadyExists":
|
|
241
|
-
case "com.amazonaws.servicediscovery#NamespaceAlreadyExists":
|
|
242
|
-
throw await de_NamespaceAlreadyExistsRes(parsedOutput, context);
|
|
243
|
-
case "ResourceLimitExceeded":
|
|
244
|
-
case "com.amazonaws.servicediscovery#ResourceLimitExceeded":
|
|
245
|
-
throw await de_ResourceLimitExceededRes(parsedOutput, context);
|
|
246
|
-
case "TooManyTagsException":
|
|
247
|
-
case "com.amazonaws.servicediscovery#TooManyTagsException":
|
|
248
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
249
|
-
default:
|
|
250
|
-
const parsedBody = parsedOutput.body;
|
|
251
|
-
return throwDefaultError({
|
|
252
|
-
output,
|
|
253
|
-
parsedBody,
|
|
254
|
-
errorCode,
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
const de_CreatePrivateDnsNamespaceCommand = async (output, context) => {
|
|
259
|
-
if (output.statusCode >= 300) {
|
|
260
|
-
return de_CreatePrivateDnsNamespaceCommandError(output, context);
|
|
261
|
-
}
|
|
262
|
-
const data = await parseBody(output.body, context);
|
|
263
|
-
let contents = {};
|
|
264
|
-
contents = (0, smithy_client_1._json)(data);
|
|
265
|
-
const response = {
|
|
266
|
-
$metadata: deserializeMetadata(output),
|
|
267
|
-
...contents,
|
|
268
|
-
};
|
|
269
|
-
return response;
|
|
270
|
-
};
|
|
271
|
-
exports.de_CreatePrivateDnsNamespaceCommand = de_CreatePrivateDnsNamespaceCommand;
|
|
272
|
-
const de_CreatePrivateDnsNamespaceCommandError = async (output, context) => {
|
|
273
|
-
const parsedOutput = {
|
|
274
|
-
...output,
|
|
275
|
-
body: await parseErrorBody(output.body, context),
|
|
276
|
-
};
|
|
277
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
278
|
-
switch (errorCode) {
|
|
279
|
-
case "DuplicateRequest":
|
|
280
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
281
|
-
throw await de_DuplicateRequestRes(parsedOutput, context);
|
|
282
|
-
case "InvalidInput":
|
|
283
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
284
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
285
|
-
case "NamespaceAlreadyExists":
|
|
286
|
-
case "com.amazonaws.servicediscovery#NamespaceAlreadyExists":
|
|
287
|
-
throw await de_NamespaceAlreadyExistsRes(parsedOutput, context);
|
|
288
|
-
case "ResourceLimitExceeded":
|
|
289
|
-
case "com.amazonaws.servicediscovery#ResourceLimitExceeded":
|
|
290
|
-
throw await de_ResourceLimitExceededRes(parsedOutput, context);
|
|
291
|
-
case "TooManyTagsException":
|
|
292
|
-
case "com.amazonaws.servicediscovery#TooManyTagsException":
|
|
293
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
294
|
-
default:
|
|
295
|
-
const parsedBody = parsedOutput.body;
|
|
296
|
-
return throwDefaultError({
|
|
297
|
-
output,
|
|
298
|
-
parsedBody,
|
|
299
|
-
errorCode,
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
};
|
|
303
|
-
const de_CreatePublicDnsNamespaceCommand = async (output, context) => {
|
|
304
|
-
if (output.statusCode >= 300) {
|
|
305
|
-
return de_CreatePublicDnsNamespaceCommandError(output, context);
|
|
306
|
-
}
|
|
307
|
-
const data = await parseBody(output.body, context);
|
|
308
|
-
let contents = {};
|
|
309
|
-
contents = (0, smithy_client_1._json)(data);
|
|
310
|
-
const response = {
|
|
311
|
-
$metadata: deserializeMetadata(output),
|
|
312
|
-
...contents,
|
|
313
|
-
};
|
|
314
|
-
return response;
|
|
315
|
-
};
|
|
316
|
-
exports.de_CreatePublicDnsNamespaceCommand = de_CreatePublicDnsNamespaceCommand;
|
|
317
|
-
const de_CreatePublicDnsNamespaceCommandError = async (output, context) => {
|
|
318
|
-
const parsedOutput = {
|
|
319
|
-
...output,
|
|
320
|
-
body: await parseErrorBody(output.body, context),
|
|
321
|
-
};
|
|
322
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
323
|
-
switch (errorCode) {
|
|
324
|
-
case "DuplicateRequest":
|
|
325
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
326
|
-
throw await de_DuplicateRequestRes(parsedOutput, context);
|
|
327
|
-
case "InvalidInput":
|
|
328
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
329
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
330
|
-
case "NamespaceAlreadyExists":
|
|
331
|
-
case "com.amazonaws.servicediscovery#NamespaceAlreadyExists":
|
|
332
|
-
throw await de_NamespaceAlreadyExistsRes(parsedOutput, context);
|
|
333
|
-
case "ResourceLimitExceeded":
|
|
334
|
-
case "com.amazonaws.servicediscovery#ResourceLimitExceeded":
|
|
335
|
-
throw await de_ResourceLimitExceededRes(parsedOutput, context);
|
|
336
|
-
case "TooManyTagsException":
|
|
337
|
-
case "com.amazonaws.servicediscovery#TooManyTagsException":
|
|
338
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
339
|
-
default:
|
|
340
|
-
const parsedBody = parsedOutput.body;
|
|
341
|
-
return throwDefaultError({
|
|
342
|
-
output,
|
|
343
|
-
parsedBody,
|
|
344
|
-
errorCode,
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
|
-
const de_CreateServiceCommand = async (output, context) => {
|
|
349
|
-
if (output.statusCode >= 300) {
|
|
350
|
-
return de_CreateServiceCommandError(output, context);
|
|
351
|
-
}
|
|
352
|
-
const data = await parseBody(output.body, context);
|
|
353
|
-
let contents = {};
|
|
354
|
-
contents = de_CreateServiceResponse(data, context);
|
|
355
|
-
const response = {
|
|
356
|
-
$metadata: deserializeMetadata(output),
|
|
357
|
-
...contents,
|
|
358
|
-
};
|
|
359
|
-
return response;
|
|
360
|
-
};
|
|
361
|
-
exports.de_CreateServiceCommand = de_CreateServiceCommand;
|
|
362
|
-
const de_CreateServiceCommandError = async (output, context) => {
|
|
363
|
-
const parsedOutput = {
|
|
364
|
-
...output,
|
|
365
|
-
body: await parseErrorBody(output.body, context),
|
|
366
|
-
};
|
|
367
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
368
|
-
switch (errorCode) {
|
|
369
|
-
case "InvalidInput":
|
|
370
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
371
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
372
|
-
case "NamespaceNotFound":
|
|
373
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
374
|
-
throw await de_NamespaceNotFoundRes(parsedOutput, context);
|
|
375
|
-
case "ResourceLimitExceeded":
|
|
376
|
-
case "com.amazonaws.servicediscovery#ResourceLimitExceeded":
|
|
377
|
-
throw await de_ResourceLimitExceededRes(parsedOutput, context);
|
|
378
|
-
case "ServiceAlreadyExists":
|
|
379
|
-
case "com.amazonaws.servicediscovery#ServiceAlreadyExists":
|
|
380
|
-
throw await de_ServiceAlreadyExistsRes(parsedOutput, context);
|
|
381
|
-
case "TooManyTagsException":
|
|
382
|
-
case "com.amazonaws.servicediscovery#TooManyTagsException":
|
|
383
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
384
|
-
default:
|
|
385
|
-
const parsedBody = parsedOutput.body;
|
|
386
|
-
return throwDefaultError({
|
|
387
|
-
output,
|
|
388
|
-
parsedBody,
|
|
389
|
-
errorCode,
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
const de_DeleteNamespaceCommand = async (output, context) => {
|
|
394
|
-
if (output.statusCode >= 300) {
|
|
395
|
-
return de_DeleteNamespaceCommandError(output, context);
|
|
396
|
-
}
|
|
397
|
-
const data = await parseBody(output.body, context);
|
|
398
|
-
let contents = {};
|
|
399
|
-
contents = (0, smithy_client_1._json)(data);
|
|
400
|
-
const response = {
|
|
401
|
-
$metadata: deserializeMetadata(output),
|
|
402
|
-
...contents,
|
|
403
|
-
};
|
|
404
|
-
return response;
|
|
405
|
-
};
|
|
406
|
-
exports.de_DeleteNamespaceCommand = de_DeleteNamespaceCommand;
|
|
407
|
-
const de_DeleteNamespaceCommandError = async (output, context) => {
|
|
408
|
-
const parsedOutput = {
|
|
409
|
-
...output,
|
|
410
|
-
body: await parseErrorBody(output.body, context),
|
|
411
|
-
};
|
|
412
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
413
|
-
switch (errorCode) {
|
|
414
|
-
case "DuplicateRequest":
|
|
415
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
416
|
-
throw await de_DuplicateRequestRes(parsedOutput, context);
|
|
417
|
-
case "InvalidInput":
|
|
418
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
419
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
420
|
-
case "NamespaceNotFound":
|
|
421
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
422
|
-
throw await de_NamespaceNotFoundRes(parsedOutput, context);
|
|
423
|
-
case "ResourceInUse":
|
|
424
|
-
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
425
|
-
throw await de_ResourceInUseRes(parsedOutput, context);
|
|
426
|
-
default:
|
|
427
|
-
const parsedBody = parsedOutput.body;
|
|
428
|
-
return throwDefaultError({
|
|
429
|
-
output,
|
|
430
|
-
parsedBody,
|
|
431
|
-
errorCode,
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
const de_DeleteServiceCommand = async (output, context) => {
|
|
436
|
-
if (output.statusCode >= 300) {
|
|
437
|
-
return de_DeleteServiceCommandError(output, context);
|
|
438
|
-
}
|
|
439
|
-
const data = await parseBody(output.body, context);
|
|
440
|
-
let contents = {};
|
|
441
|
-
contents = (0, smithy_client_1._json)(data);
|
|
442
|
-
const response = {
|
|
443
|
-
$metadata: deserializeMetadata(output),
|
|
444
|
-
...contents,
|
|
445
|
-
};
|
|
446
|
-
return response;
|
|
447
|
-
};
|
|
448
|
-
exports.de_DeleteServiceCommand = de_DeleteServiceCommand;
|
|
449
|
-
const de_DeleteServiceCommandError = async (output, context) => {
|
|
450
|
-
const parsedOutput = {
|
|
451
|
-
...output,
|
|
452
|
-
body: await parseErrorBody(output.body, context),
|
|
453
|
-
};
|
|
454
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
455
|
-
switch (errorCode) {
|
|
456
|
-
case "InvalidInput":
|
|
457
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
458
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
459
|
-
case "ResourceInUse":
|
|
460
|
-
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
461
|
-
throw await de_ResourceInUseRes(parsedOutput, context);
|
|
462
|
-
case "ServiceNotFound":
|
|
463
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
464
|
-
throw await de_ServiceNotFoundRes(parsedOutput, context);
|
|
465
|
-
default:
|
|
466
|
-
const parsedBody = parsedOutput.body;
|
|
467
|
-
return throwDefaultError({
|
|
468
|
-
output,
|
|
469
|
-
parsedBody,
|
|
470
|
-
errorCode,
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
const de_DeregisterInstanceCommand = async (output, context) => {
|
|
475
|
-
if (output.statusCode >= 300) {
|
|
476
|
-
return de_DeregisterInstanceCommandError(output, context);
|
|
477
|
-
}
|
|
478
|
-
const data = await parseBody(output.body, context);
|
|
479
|
-
let contents = {};
|
|
480
|
-
contents = (0, smithy_client_1._json)(data);
|
|
481
|
-
const response = {
|
|
482
|
-
$metadata: deserializeMetadata(output),
|
|
483
|
-
...contents,
|
|
484
|
-
};
|
|
485
|
-
return response;
|
|
486
|
-
};
|
|
487
|
-
exports.de_DeregisterInstanceCommand = de_DeregisterInstanceCommand;
|
|
488
|
-
const de_DeregisterInstanceCommandError = async (output, context) => {
|
|
489
|
-
const parsedOutput = {
|
|
490
|
-
...output,
|
|
491
|
-
body: await parseErrorBody(output.body, context),
|
|
492
|
-
};
|
|
493
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
494
|
-
switch (errorCode) {
|
|
495
|
-
case "DuplicateRequest":
|
|
496
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
497
|
-
throw await de_DuplicateRequestRes(parsedOutput, context);
|
|
498
|
-
case "InstanceNotFound":
|
|
499
|
-
case "com.amazonaws.servicediscovery#InstanceNotFound":
|
|
500
|
-
throw await de_InstanceNotFoundRes(parsedOutput, context);
|
|
501
|
-
case "InvalidInput":
|
|
502
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
503
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
504
|
-
case "ResourceInUse":
|
|
505
|
-
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
506
|
-
throw await de_ResourceInUseRes(parsedOutput, context);
|
|
507
|
-
case "ServiceNotFound":
|
|
508
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
509
|
-
throw await de_ServiceNotFoundRes(parsedOutput, context);
|
|
510
|
-
default:
|
|
511
|
-
const parsedBody = parsedOutput.body;
|
|
512
|
-
return throwDefaultError({
|
|
513
|
-
output,
|
|
514
|
-
parsedBody,
|
|
515
|
-
errorCode,
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
};
|
|
519
|
-
const de_DiscoverInstancesCommand = async (output, context) => {
|
|
520
|
-
if (output.statusCode >= 300) {
|
|
521
|
-
return de_DiscoverInstancesCommandError(output, context);
|
|
522
|
-
}
|
|
523
|
-
const data = await parseBody(output.body, context);
|
|
524
|
-
let contents = {};
|
|
525
|
-
contents = (0, smithy_client_1._json)(data);
|
|
526
|
-
const response = {
|
|
527
|
-
$metadata: deserializeMetadata(output),
|
|
528
|
-
...contents,
|
|
529
|
-
};
|
|
530
|
-
return response;
|
|
531
|
-
};
|
|
532
|
-
exports.de_DiscoverInstancesCommand = de_DiscoverInstancesCommand;
|
|
533
|
-
const de_DiscoverInstancesCommandError = async (output, context) => {
|
|
534
|
-
const parsedOutput = {
|
|
535
|
-
...output,
|
|
536
|
-
body: await parseErrorBody(output.body, context),
|
|
537
|
-
};
|
|
538
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
539
|
-
switch (errorCode) {
|
|
540
|
-
case "InvalidInput":
|
|
541
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
542
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
543
|
-
case "NamespaceNotFound":
|
|
544
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
545
|
-
throw await de_NamespaceNotFoundRes(parsedOutput, context);
|
|
546
|
-
case "RequestLimitExceeded":
|
|
547
|
-
case "com.amazonaws.servicediscovery#RequestLimitExceeded":
|
|
548
|
-
throw await de_RequestLimitExceededRes(parsedOutput, context);
|
|
549
|
-
case "ServiceNotFound":
|
|
550
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
551
|
-
throw await de_ServiceNotFoundRes(parsedOutput, context);
|
|
552
|
-
default:
|
|
553
|
-
const parsedBody = parsedOutput.body;
|
|
554
|
-
return throwDefaultError({
|
|
555
|
-
output,
|
|
556
|
-
parsedBody,
|
|
557
|
-
errorCode,
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
const de_DiscoverInstancesRevisionCommand = async (output, context) => {
|
|
562
|
-
if (output.statusCode >= 300) {
|
|
563
|
-
return de_DiscoverInstancesRevisionCommandError(output, context);
|
|
564
|
-
}
|
|
565
|
-
const data = await parseBody(output.body, context);
|
|
566
|
-
let contents = {};
|
|
567
|
-
contents = (0, smithy_client_1._json)(data);
|
|
568
|
-
const response = {
|
|
569
|
-
$metadata: deserializeMetadata(output),
|
|
570
|
-
...contents,
|
|
571
|
-
};
|
|
572
|
-
return response;
|
|
573
|
-
};
|
|
574
|
-
exports.de_DiscoverInstancesRevisionCommand = de_DiscoverInstancesRevisionCommand;
|
|
575
|
-
const de_DiscoverInstancesRevisionCommandError = async (output, context) => {
|
|
576
|
-
const parsedOutput = {
|
|
577
|
-
...output,
|
|
578
|
-
body: await parseErrorBody(output.body, context),
|
|
579
|
-
};
|
|
580
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
581
|
-
switch (errorCode) {
|
|
582
|
-
case "InvalidInput":
|
|
583
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
584
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
585
|
-
case "NamespaceNotFound":
|
|
586
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
587
|
-
throw await de_NamespaceNotFoundRes(parsedOutput, context);
|
|
588
|
-
case "RequestLimitExceeded":
|
|
589
|
-
case "com.amazonaws.servicediscovery#RequestLimitExceeded":
|
|
590
|
-
throw await de_RequestLimitExceededRes(parsedOutput, context);
|
|
591
|
-
case "ServiceNotFound":
|
|
592
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
593
|
-
throw await de_ServiceNotFoundRes(parsedOutput, context);
|
|
594
|
-
default:
|
|
595
|
-
const parsedBody = parsedOutput.body;
|
|
596
|
-
return throwDefaultError({
|
|
597
|
-
output,
|
|
598
|
-
parsedBody,
|
|
599
|
-
errorCode,
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
};
|
|
603
|
-
const de_GetInstanceCommand = async (output, context) => {
|
|
604
|
-
if (output.statusCode >= 300) {
|
|
605
|
-
return de_GetInstanceCommandError(output, context);
|
|
606
|
-
}
|
|
607
|
-
const data = await parseBody(output.body, context);
|
|
608
|
-
let contents = {};
|
|
609
|
-
contents = (0, smithy_client_1._json)(data);
|
|
610
|
-
const response = {
|
|
611
|
-
$metadata: deserializeMetadata(output),
|
|
612
|
-
...contents,
|
|
613
|
-
};
|
|
614
|
-
return response;
|
|
615
|
-
};
|
|
616
|
-
exports.de_GetInstanceCommand = de_GetInstanceCommand;
|
|
617
|
-
const de_GetInstanceCommandError = async (output, context) => {
|
|
618
|
-
const parsedOutput = {
|
|
619
|
-
...output,
|
|
620
|
-
body: await parseErrorBody(output.body, context),
|
|
621
|
-
};
|
|
622
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
623
|
-
switch (errorCode) {
|
|
624
|
-
case "InstanceNotFound":
|
|
625
|
-
case "com.amazonaws.servicediscovery#InstanceNotFound":
|
|
626
|
-
throw await de_InstanceNotFoundRes(parsedOutput, context);
|
|
627
|
-
case "InvalidInput":
|
|
628
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
629
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
630
|
-
case "ServiceNotFound":
|
|
631
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
632
|
-
throw await de_ServiceNotFoundRes(parsedOutput, context);
|
|
633
|
-
default:
|
|
634
|
-
const parsedBody = parsedOutput.body;
|
|
635
|
-
return throwDefaultError({
|
|
636
|
-
output,
|
|
637
|
-
parsedBody,
|
|
638
|
-
errorCode,
|
|
639
|
-
});
|
|
640
|
-
}
|
|
641
|
-
};
|
|
642
|
-
const de_GetInstancesHealthStatusCommand = async (output, context) => {
|
|
643
|
-
if (output.statusCode >= 300) {
|
|
644
|
-
return de_GetInstancesHealthStatusCommandError(output, context);
|
|
645
|
-
}
|
|
646
|
-
const data = await parseBody(output.body, context);
|
|
647
|
-
let contents = {};
|
|
648
|
-
contents = (0, smithy_client_1._json)(data);
|
|
649
|
-
const response = {
|
|
650
|
-
$metadata: deserializeMetadata(output),
|
|
651
|
-
...contents,
|
|
652
|
-
};
|
|
653
|
-
return response;
|
|
654
|
-
};
|
|
655
|
-
exports.de_GetInstancesHealthStatusCommand = de_GetInstancesHealthStatusCommand;
|
|
656
|
-
const de_GetInstancesHealthStatusCommandError = async (output, context) => {
|
|
657
|
-
const parsedOutput = {
|
|
658
|
-
...output,
|
|
659
|
-
body: await parseErrorBody(output.body, context),
|
|
660
|
-
};
|
|
661
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
662
|
-
switch (errorCode) {
|
|
663
|
-
case "InstanceNotFound":
|
|
664
|
-
case "com.amazonaws.servicediscovery#InstanceNotFound":
|
|
665
|
-
throw await de_InstanceNotFoundRes(parsedOutput, context);
|
|
666
|
-
case "InvalidInput":
|
|
667
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
668
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
669
|
-
case "ServiceNotFound":
|
|
670
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
671
|
-
throw await de_ServiceNotFoundRes(parsedOutput, context);
|
|
672
|
-
default:
|
|
673
|
-
const parsedBody = parsedOutput.body;
|
|
674
|
-
return throwDefaultError({
|
|
675
|
-
output,
|
|
676
|
-
parsedBody,
|
|
677
|
-
errorCode,
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
};
|
|
681
|
-
const de_GetNamespaceCommand = async (output, context) => {
|
|
682
|
-
if (output.statusCode >= 300) {
|
|
683
|
-
return de_GetNamespaceCommandError(output, context);
|
|
684
|
-
}
|
|
685
|
-
const data = await parseBody(output.body, context);
|
|
686
|
-
let contents = {};
|
|
687
|
-
contents = de_GetNamespaceResponse(data, context);
|
|
688
|
-
const response = {
|
|
689
|
-
$metadata: deserializeMetadata(output),
|
|
690
|
-
...contents,
|
|
691
|
-
};
|
|
692
|
-
return response;
|
|
693
|
-
};
|
|
694
|
-
exports.de_GetNamespaceCommand = de_GetNamespaceCommand;
|
|
695
|
-
const de_GetNamespaceCommandError = async (output, context) => {
|
|
696
|
-
const parsedOutput = {
|
|
697
|
-
...output,
|
|
698
|
-
body: await parseErrorBody(output.body, context),
|
|
699
|
-
};
|
|
700
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
701
|
-
switch (errorCode) {
|
|
702
|
-
case "InvalidInput":
|
|
703
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
704
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
705
|
-
case "NamespaceNotFound":
|
|
706
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
707
|
-
throw await de_NamespaceNotFoundRes(parsedOutput, context);
|
|
708
|
-
default:
|
|
709
|
-
const parsedBody = parsedOutput.body;
|
|
710
|
-
return throwDefaultError({
|
|
711
|
-
output,
|
|
712
|
-
parsedBody,
|
|
713
|
-
errorCode,
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
|
-
};
|
|
717
|
-
const de_GetOperationCommand = async (output, context) => {
|
|
718
|
-
if (output.statusCode >= 300) {
|
|
719
|
-
return de_GetOperationCommandError(output, context);
|
|
720
|
-
}
|
|
721
|
-
const data = await parseBody(output.body, context);
|
|
722
|
-
let contents = {};
|
|
723
|
-
contents = de_GetOperationResponse(data, context);
|
|
724
|
-
const response = {
|
|
725
|
-
$metadata: deserializeMetadata(output),
|
|
726
|
-
...contents,
|
|
727
|
-
};
|
|
728
|
-
return response;
|
|
729
|
-
};
|
|
730
|
-
exports.de_GetOperationCommand = de_GetOperationCommand;
|
|
731
|
-
const de_GetOperationCommandError = async (output, context) => {
|
|
732
|
-
const parsedOutput = {
|
|
733
|
-
...output,
|
|
734
|
-
body: await parseErrorBody(output.body, context),
|
|
735
|
-
};
|
|
736
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
737
|
-
switch (errorCode) {
|
|
738
|
-
case "InvalidInput":
|
|
739
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
740
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
741
|
-
case "OperationNotFound":
|
|
742
|
-
case "com.amazonaws.servicediscovery#OperationNotFound":
|
|
743
|
-
throw await de_OperationNotFoundRes(parsedOutput, context);
|
|
744
|
-
default:
|
|
745
|
-
const parsedBody = parsedOutput.body;
|
|
746
|
-
return throwDefaultError({
|
|
747
|
-
output,
|
|
748
|
-
parsedBody,
|
|
749
|
-
errorCode,
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
};
|
|
753
|
-
const de_GetServiceCommand = async (output, context) => {
|
|
754
|
-
if (output.statusCode >= 300) {
|
|
755
|
-
return de_GetServiceCommandError(output, context);
|
|
756
|
-
}
|
|
757
|
-
const data = await parseBody(output.body, context);
|
|
758
|
-
let contents = {};
|
|
759
|
-
contents = de_GetServiceResponse(data, context);
|
|
760
|
-
const response = {
|
|
761
|
-
$metadata: deserializeMetadata(output),
|
|
762
|
-
...contents,
|
|
763
|
-
};
|
|
764
|
-
return response;
|
|
765
|
-
};
|
|
766
|
-
exports.de_GetServiceCommand = de_GetServiceCommand;
|
|
767
|
-
const de_GetServiceCommandError = async (output, context) => {
|
|
768
|
-
const parsedOutput = {
|
|
769
|
-
...output,
|
|
770
|
-
body: await parseErrorBody(output.body, context),
|
|
771
|
-
};
|
|
772
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
773
|
-
switch (errorCode) {
|
|
774
|
-
case "InvalidInput":
|
|
775
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
776
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
777
|
-
case "ServiceNotFound":
|
|
778
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
779
|
-
throw await de_ServiceNotFoundRes(parsedOutput, context);
|
|
780
|
-
default:
|
|
781
|
-
const parsedBody = parsedOutput.body;
|
|
782
|
-
return throwDefaultError({
|
|
783
|
-
output,
|
|
784
|
-
parsedBody,
|
|
785
|
-
errorCode,
|
|
786
|
-
});
|
|
787
|
-
}
|
|
788
|
-
};
|
|
789
|
-
const de_ListInstancesCommand = async (output, context) => {
|
|
790
|
-
if (output.statusCode >= 300) {
|
|
791
|
-
return de_ListInstancesCommandError(output, context);
|
|
792
|
-
}
|
|
793
|
-
const data = await parseBody(output.body, context);
|
|
794
|
-
let contents = {};
|
|
795
|
-
contents = (0, smithy_client_1._json)(data);
|
|
796
|
-
const response = {
|
|
797
|
-
$metadata: deserializeMetadata(output),
|
|
798
|
-
...contents,
|
|
799
|
-
};
|
|
800
|
-
return response;
|
|
801
|
-
};
|
|
802
|
-
exports.de_ListInstancesCommand = de_ListInstancesCommand;
|
|
803
|
-
const de_ListInstancesCommandError = async (output, context) => {
|
|
804
|
-
const parsedOutput = {
|
|
805
|
-
...output,
|
|
806
|
-
body: await parseErrorBody(output.body, context),
|
|
807
|
-
};
|
|
808
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
809
|
-
switch (errorCode) {
|
|
810
|
-
case "InvalidInput":
|
|
811
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
812
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
813
|
-
case "ServiceNotFound":
|
|
814
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
815
|
-
throw await de_ServiceNotFoundRes(parsedOutput, context);
|
|
816
|
-
default:
|
|
817
|
-
const parsedBody = parsedOutput.body;
|
|
818
|
-
return throwDefaultError({
|
|
819
|
-
output,
|
|
820
|
-
parsedBody,
|
|
821
|
-
errorCode,
|
|
822
|
-
});
|
|
823
|
-
}
|
|
824
|
-
};
|
|
825
|
-
const de_ListNamespacesCommand = async (output, context) => {
|
|
826
|
-
if (output.statusCode >= 300) {
|
|
827
|
-
return de_ListNamespacesCommandError(output, context);
|
|
828
|
-
}
|
|
829
|
-
const data = await parseBody(output.body, context);
|
|
830
|
-
let contents = {};
|
|
831
|
-
contents = de_ListNamespacesResponse(data, context);
|
|
832
|
-
const response = {
|
|
833
|
-
$metadata: deserializeMetadata(output),
|
|
834
|
-
...contents,
|
|
835
|
-
};
|
|
836
|
-
return response;
|
|
837
|
-
};
|
|
838
|
-
exports.de_ListNamespacesCommand = de_ListNamespacesCommand;
|
|
839
|
-
const de_ListNamespacesCommandError = async (output, context) => {
|
|
840
|
-
const parsedOutput = {
|
|
841
|
-
...output,
|
|
842
|
-
body: await parseErrorBody(output.body, context),
|
|
843
|
-
};
|
|
844
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
845
|
-
switch (errorCode) {
|
|
846
|
-
case "InvalidInput":
|
|
847
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
848
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
849
|
-
default:
|
|
850
|
-
const parsedBody = parsedOutput.body;
|
|
851
|
-
return throwDefaultError({
|
|
852
|
-
output,
|
|
853
|
-
parsedBody,
|
|
854
|
-
errorCode,
|
|
855
|
-
});
|
|
856
|
-
}
|
|
857
|
-
};
|
|
858
|
-
const de_ListOperationsCommand = async (output, context) => {
|
|
859
|
-
if (output.statusCode >= 300) {
|
|
860
|
-
return de_ListOperationsCommandError(output, context);
|
|
861
|
-
}
|
|
862
|
-
const data = await parseBody(output.body, context);
|
|
863
|
-
let contents = {};
|
|
864
|
-
contents = (0, smithy_client_1._json)(data);
|
|
865
|
-
const response = {
|
|
866
|
-
$metadata: deserializeMetadata(output),
|
|
867
|
-
...contents,
|
|
868
|
-
};
|
|
869
|
-
return response;
|
|
870
|
-
};
|
|
871
|
-
exports.de_ListOperationsCommand = de_ListOperationsCommand;
|
|
872
|
-
const de_ListOperationsCommandError = async (output, context) => {
|
|
873
|
-
const parsedOutput = {
|
|
874
|
-
...output,
|
|
875
|
-
body: await parseErrorBody(output.body, context),
|
|
876
|
-
};
|
|
877
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
878
|
-
switch (errorCode) {
|
|
879
|
-
case "InvalidInput":
|
|
880
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
881
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
882
|
-
default:
|
|
883
|
-
const parsedBody = parsedOutput.body;
|
|
884
|
-
return throwDefaultError({
|
|
885
|
-
output,
|
|
886
|
-
parsedBody,
|
|
887
|
-
errorCode,
|
|
888
|
-
});
|
|
889
|
-
}
|
|
890
|
-
};
|
|
891
|
-
const de_ListServicesCommand = async (output, context) => {
|
|
892
|
-
if (output.statusCode >= 300) {
|
|
893
|
-
return de_ListServicesCommandError(output, context);
|
|
894
|
-
}
|
|
895
|
-
const data = await parseBody(output.body, context);
|
|
896
|
-
let contents = {};
|
|
897
|
-
contents = de_ListServicesResponse(data, context);
|
|
898
|
-
const response = {
|
|
899
|
-
$metadata: deserializeMetadata(output),
|
|
900
|
-
...contents,
|
|
901
|
-
};
|
|
902
|
-
return response;
|
|
903
|
-
};
|
|
904
|
-
exports.de_ListServicesCommand = de_ListServicesCommand;
|
|
905
|
-
const de_ListServicesCommandError = async (output, context) => {
|
|
906
|
-
const parsedOutput = {
|
|
907
|
-
...output,
|
|
908
|
-
body: await parseErrorBody(output.body, context),
|
|
909
|
-
};
|
|
910
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
911
|
-
switch (errorCode) {
|
|
912
|
-
case "InvalidInput":
|
|
913
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
914
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
915
|
-
default:
|
|
916
|
-
const parsedBody = parsedOutput.body;
|
|
917
|
-
return throwDefaultError({
|
|
918
|
-
output,
|
|
919
|
-
parsedBody,
|
|
920
|
-
errorCode,
|
|
921
|
-
});
|
|
922
|
-
}
|
|
923
|
-
};
|
|
924
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
925
|
-
if (output.statusCode >= 300) {
|
|
926
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
927
|
-
}
|
|
928
|
-
const data = await parseBody(output.body, context);
|
|
929
|
-
let contents = {};
|
|
930
|
-
contents = (0, smithy_client_1._json)(data);
|
|
931
|
-
const response = {
|
|
932
|
-
$metadata: deserializeMetadata(output),
|
|
933
|
-
...contents,
|
|
934
|
-
};
|
|
935
|
-
return response;
|
|
936
|
-
};
|
|
937
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
938
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
939
|
-
const parsedOutput = {
|
|
940
|
-
...output,
|
|
941
|
-
body: await parseErrorBody(output.body, context),
|
|
942
|
-
};
|
|
943
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
944
|
-
switch (errorCode) {
|
|
945
|
-
case "InvalidInput":
|
|
946
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
947
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
948
|
-
case "ResourceNotFoundException":
|
|
949
|
-
case "com.amazonaws.servicediscovery#ResourceNotFoundException":
|
|
950
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
951
|
-
default:
|
|
952
|
-
const parsedBody = parsedOutput.body;
|
|
953
|
-
return throwDefaultError({
|
|
954
|
-
output,
|
|
955
|
-
parsedBody,
|
|
956
|
-
errorCode,
|
|
957
|
-
});
|
|
958
|
-
}
|
|
959
|
-
};
|
|
960
|
-
const de_RegisterInstanceCommand = async (output, context) => {
|
|
961
|
-
if (output.statusCode >= 300) {
|
|
962
|
-
return de_RegisterInstanceCommandError(output, context);
|
|
963
|
-
}
|
|
964
|
-
const data = await parseBody(output.body, context);
|
|
965
|
-
let contents = {};
|
|
966
|
-
contents = (0, smithy_client_1._json)(data);
|
|
967
|
-
const response = {
|
|
968
|
-
$metadata: deserializeMetadata(output),
|
|
969
|
-
...contents,
|
|
970
|
-
};
|
|
971
|
-
return response;
|
|
972
|
-
};
|
|
973
|
-
exports.de_RegisterInstanceCommand = de_RegisterInstanceCommand;
|
|
974
|
-
const de_RegisterInstanceCommandError = async (output, context) => {
|
|
975
|
-
const parsedOutput = {
|
|
976
|
-
...output,
|
|
977
|
-
body: await parseErrorBody(output.body, context),
|
|
978
|
-
};
|
|
979
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
980
|
-
switch (errorCode) {
|
|
981
|
-
case "DuplicateRequest":
|
|
982
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
983
|
-
throw await de_DuplicateRequestRes(parsedOutput, context);
|
|
984
|
-
case "InvalidInput":
|
|
985
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
986
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
987
|
-
case "ResourceInUse":
|
|
988
|
-
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
989
|
-
throw await de_ResourceInUseRes(parsedOutput, context);
|
|
990
|
-
case "ResourceLimitExceeded":
|
|
991
|
-
case "com.amazonaws.servicediscovery#ResourceLimitExceeded":
|
|
992
|
-
throw await de_ResourceLimitExceededRes(parsedOutput, context);
|
|
993
|
-
case "ServiceNotFound":
|
|
994
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
995
|
-
throw await de_ServiceNotFoundRes(parsedOutput, context);
|
|
996
|
-
default:
|
|
997
|
-
const parsedBody = parsedOutput.body;
|
|
998
|
-
return throwDefaultError({
|
|
999
|
-
output,
|
|
1000
|
-
parsedBody,
|
|
1001
|
-
errorCode,
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
|
-
};
|
|
1005
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
1006
|
-
if (output.statusCode >= 300) {
|
|
1007
|
-
return de_TagResourceCommandError(output, context);
|
|
1008
|
-
}
|
|
1009
|
-
const data = await parseBody(output.body, context);
|
|
1010
|
-
let contents = {};
|
|
1011
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1012
|
-
const response = {
|
|
1013
|
-
$metadata: deserializeMetadata(output),
|
|
1014
|
-
...contents,
|
|
1015
|
-
};
|
|
1016
|
-
return response;
|
|
1017
|
-
};
|
|
1018
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1019
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1020
|
-
const parsedOutput = {
|
|
1021
|
-
...output,
|
|
1022
|
-
body: await parseErrorBody(output.body, context),
|
|
1023
|
-
};
|
|
1024
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1025
|
-
switch (errorCode) {
|
|
1026
|
-
case "InvalidInput":
|
|
1027
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1028
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
1029
|
-
case "ResourceNotFoundException":
|
|
1030
|
-
case "com.amazonaws.servicediscovery#ResourceNotFoundException":
|
|
1031
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1032
|
-
case "TooManyTagsException":
|
|
1033
|
-
case "com.amazonaws.servicediscovery#TooManyTagsException":
|
|
1034
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
1035
|
-
default:
|
|
1036
|
-
const parsedBody = parsedOutput.body;
|
|
1037
|
-
return throwDefaultError({
|
|
1038
|
-
output,
|
|
1039
|
-
parsedBody,
|
|
1040
|
-
errorCode,
|
|
1041
|
-
});
|
|
1042
|
-
}
|
|
1043
|
-
};
|
|
1044
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
1045
|
-
if (output.statusCode >= 300) {
|
|
1046
|
-
return de_UntagResourceCommandError(output, context);
|
|
1047
|
-
}
|
|
1048
|
-
const data = await parseBody(output.body, context);
|
|
1049
|
-
let contents = {};
|
|
1050
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1051
|
-
const response = {
|
|
1052
|
-
$metadata: deserializeMetadata(output),
|
|
1053
|
-
...contents,
|
|
1054
|
-
};
|
|
1055
|
-
return response;
|
|
1056
|
-
};
|
|
1057
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1058
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1059
|
-
const parsedOutput = {
|
|
1060
|
-
...output,
|
|
1061
|
-
body: await parseErrorBody(output.body, context),
|
|
1062
|
-
};
|
|
1063
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1064
|
-
switch (errorCode) {
|
|
1065
|
-
case "InvalidInput":
|
|
1066
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1067
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
1068
|
-
case "ResourceNotFoundException":
|
|
1069
|
-
case "com.amazonaws.servicediscovery#ResourceNotFoundException":
|
|
1070
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1071
|
-
default:
|
|
1072
|
-
const parsedBody = parsedOutput.body;
|
|
1073
|
-
return throwDefaultError({
|
|
1074
|
-
output,
|
|
1075
|
-
parsedBody,
|
|
1076
|
-
errorCode,
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
};
|
|
1080
|
-
const de_UpdateHttpNamespaceCommand = async (output, context) => {
|
|
1081
|
-
if (output.statusCode >= 300) {
|
|
1082
|
-
return de_UpdateHttpNamespaceCommandError(output, context);
|
|
1083
|
-
}
|
|
1084
|
-
const data = await parseBody(output.body, context);
|
|
1085
|
-
let contents = {};
|
|
1086
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1087
|
-
const response = {
|
|
1088
|
-
$metadata: deserializeMetadata(output),
|
|
1089
|
-
...contents,
|
|
1090
|
-
};
|
|
1091
|
-
return response;
|
|
1092
|
-
};
|
|
1093
|
-
exports.de_UpdateHttpNamespaceCommand = de_UpdateHttpNamespaceCommand;
|
|
1094
|
-
const de_UpdateHttpNamespaceCommandError = async (output, context) => {
|
|
1095
|
-
const parsedOutput = {
|
|
1096
|
-
...output,
|
|
1097
|
-
body: await parseErrorBody(output.body, context),
|
|
1098
|
-
};
|
|
1099
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1100
|
-
switch (errorCode) {
|
|
1101
|
-
case "DuplicateRequest":
|
|
1102
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
1103
|
-
throw await de_DuplicateRequestRes(parsedOutput, context);
|
|
1104
|
-
case "InvalidInput":
|
|
1105
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1106
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
1107
|
-
case "NamespaceNotFound":
|
|
1108
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
1109
|
-
throw await de_NamespaceNotFoundRes(parsedOutput, context);
|
|
1110
|
-
case "ResourceInUse":
|
|
1111
|
-
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
1112
|
-
throw await de_ResourceInUseRes(parsedOutput, context);
|
|
1113
|
-
default:
|
|
1114
|
-
const parsedBody = parsedOutput.body;
|
|
1115
|
-
return throwDefaultError({
|
|
1116
|
-
output,
|
|
1117
|
-
parsedBody,
|
|
1118
|
-
errorCode,
|
|
1119
|
-
});
|
|
1120
|
-
}
|
|
1121
|
-
};
|
|
1122
|
-
const de_UpdateInstanceCustomHealthStatusCommand = async (output, context) => {
|
|
1123
|
-
if (output.statusCode >= 300) {
|
|
1124
|
-
return de_UpdateInstanceCustomHealthStatusCommandError(output, context);
|
|
1125
|
-
}
|
|
1126
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1127
|
-
const response = {
|
|
1128
|
-
$metadata: deserializeMetadata(output),
|
|
1129
|
-
};
|
|
1130
|
-
return response;
|
|
1131
|
-
};
|
|
1132
|
-
exports.de_UpdateInstanceCustomHealthStatusCommand = de_UpdateInstanceCustomHealthStatusCommand;
|
|
1133
|
-
const de_UpdateInstanceCustomHealthStatusCommandError = async (output, context) => {
|
|
1134
|
-
const parsedOutput = {
|
|
1135
|
-
...output,
|
|
1136
|
-
body: await parseErrorBody(output.body, context),
|
|
1137
|
-
};
|
|
1138
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1139
|
-
switch (errorCode) {
|
|
1140
|
-
case "CustomHealthNotFound":
|
|
1141
|
-
case "com.amazonaws.servicediscovery#CustomHealthNotFound":
|
|
1142
|
-
throw await de_CustomHealthNotFoundRes(parsedOutput, context);
|
|
1143
|
-
case "InstanceNotFound":
|
|
1144
|
-
case "com.amazonaws.servicediscovery#InstanceNotFound":
|
|
1145
|
-
throw await de_InstanceNotFoundRes(parsedOutput, context);
|
|
1146
|
-
case "InvalidInput":
|
|
1147
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1148
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
1149
|
-
case "ServiceNotFound":
|
|
1150
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
1151
|
-
throw await de_ServiceNotFoundRes(parsedOutput, context);
|
|
1152
|
-
default:
|
|
1153
|
-
const parsedBody = parsedOutput.body;
|
|
1154
|
-
return throwDefaultError({
|
|
1155
|
-
output,
|
|
1156
|
-
parsedBody,
|
|
1157
|
-
errorCode,
|
|
1158
|
-
});
|
|
1159
|
-
}
|
|
1160
|
-
};
|
|
1161
|
-
const de_UpdatePrivateDnsNamespaceCommand = async (output, context) => {
|
|
1162
|
-
if (output.statusCode >= 300) {
|
|
1163
|
-
return de_UpdatePrivateDnsNamespaceCommandError(output, context);
|
|
1164
|
-
}
|
|
1165
|
-
const data = await parseBody(output.body, context);
|
|
1166
|
-
let contents = {};
|
|
1167
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1168
|
-
const response = {
|
|
1169
|
-
$metadata: deserializeMetadata(output),
|
|
1170
|
-
...contents,
|
|
1171
|
-
};
|
|
1172
|
-
return response;
|
|
1173
|
-
};
|
|
1174
|
-
exports.de_UpdatePrivateDnsNamespaceCommand = de_UpdatePrivateDnsNamespaceCommand;
|
|
1175
|
-
const de_UpdatePrivateDnsNamespaceCommandError = async (output, context) => {
|
|
1176
|
-
const parsedOutput = {
|
|
1177
|
-
...output,
|
|
1178
|
-
body: await parseErrorBody(output.body, context),
|
|
1179
|
-
};
|
|
1180
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1181
|
-
switch (errorCode) {
|
|
1182
|
-
case "DuplicateRequest":
|
|
1183
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
1184
|
-
throw await de_DuplicateRequestRes(parsedOutput, context);
|
|
1185
|
-
case "InvalidInput":
|
|
1186
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1187
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
1188
|
-
case "NamespaceNotFound":
|
|
1189
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
1190
|
-
throw await de_NamespaceNotFoundRes(parsedOutput, context);
|
|
1191
|
-
case "ResourceInUse":
|
|
1192
|
-
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
1193
|
-
throw await de_ResourceInUseRes(parsedOutput, context);
|
|
1194
|
-
default:
|
|
1195
|
-
const parsedBody = parsedOutput.body;
|
|
1196
|
-
return throwDefaultError({
|
|
1197
|
-
output,
|
|
1198
|
-
parsedBody,
|
|
1199
|
-
errorCode,
|
|
1200
|
-
});
|
|
1201
|
-
}
|
|
1202
|
-
};
|
|
1203
|
-
const de_UpdatePublicDnsNamespaceCommand = async (output, context) => {
|
|
1204
|
-
if (output.statusCode >= 300) {
|
|
1205
|
-
return de_UpdatePublicDnsNamespaceCommandError(output, context);
|
|
1206
|
-
}
|
|
1207
|
-
const data = await parseBody(output.body, context);
|
|
1208
|
-
let contents = {};
|
|
1209
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1210
|
-
const response = {
|
|
1211
|
-
$metadata: deserializeMetadata(output),
|
|
1212
|
-
...contents,
|
|
1213
|
-
};
|
|
1214
|
-
return response;
|
|
1215
|
-
};
|
|
1216
|
-
exports.de_UpdatePublicDnsNamespaceCommand = de_UpdatePublicDnsNamespaceCommand;
|
|
1217
|
-
const de_UpdatePublicDnsNamespaceCommandError = async (output, context) => {
|
|
1218
|
-
const parsedOutput = {
|
|
1219
|
-
...output,
|
|
1220
|
-
body: await parseErrorBody(output.body, context),
|
|
1221
|
-
};
|
|
1222
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1223
|
-
switch (errorCode) {
|
|
1224
|
-
case "DuplicateRequest":
|
|
1225
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
1226
|
-
throw await de_DuplicateRequestRes(parsedOutput, context);
|
|
1227
|
-
case "InvalidInput":
|
|
1228
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1229
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
1230
|
-
case "NamespaceNotFound":
|
|
1231
|
-
case "com.amazonaws.servicediscovery#NamespaceNotFound":
|
|
1232
|
-
throw await de_NamespaceNotFoundRes(parsedOutput, context);
|
|
1233
|
-
case "ResourceInUse":
|
|
1234
|
-
case "com.amazonaws.servicediscovery#ResourceInUse":
|
|
1235
|
-
throw await de_ResourceInUseRes(parsedOutput, context);
|
|
1236
|
-
default:
|
|
1237
|
-
const parsedBody = parsedOutput.body;
|
|
1238
|
-
return throwDefaultError({
|
|
1239
|
-
output,
|
|
1240
|
-
parsedBody,
|
|
1241
|
-
errorCode,
|
|
1242
|
-
});
|
|
1243
|
-
}
|
|
1244
|
-
};
|
|
1245
|
-
const de_UpdateServiceCommand = async (output, context) => {
|
|
1246
|
-
if (output.statusCode >= 300) {
|
|
1247
|
-
return de_UpdateServiceCommandError(output, context);
|
|
1248
|
-
}
|
|
1249
|
-
const data = await parseBody(output.body, context);
|
|
1250
|
-
let contents = {};
|
|
1251
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1252
|
-
const response = {
|
|
1253
|
-
$metadata: deserializeMetadata(output),
|
|
1254
|
-
...contents,
|
|
1255
|
-
};
|
|
1256
|
-
return response;
|
|
1257
|
-
};
|
|
1258
|
-
exports.de_UpdateServiceCommand = de_UpdateServiceCommand;
|
|
1259
|
-
const de_UpdateServiceCommandError = async (output, context) => {
|
|
1260
|
-
const parsedOutput = {
|
|
1261
|
-
...output,
|
|
1262
|
-
body: await parseErrorBody(output.body, context),
|
|
1263
|
-
};
|
|
1264
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1265
|
-
switch (errorCode) {
|
|
1266
|
-
case "DuplicateRequest":
|
|
1267
|
-
case "com.amazonaws.servicediscovery#DuplicateRequest":
|
|
1268
|
-
throw await de_DuplicateRequestRes(parsedOutput, context);
|
|
1269
|
-
case "InvalidInput":
|
|
1270
|
-
case "com.amazonaws.servicediscovery#InvalidInput":
|
|
1271
|
-
throw await de_InvalidInputRes(parsedOutput, context);
|
|
1272
|
-
case "ServiceNotFound":
|
|
1273
|
-
case "com.amazonaws.servicediscovery#ServiceNotFound":
|
|
1274
|
-
throw await de_ServiceNotFoundRes(parsedOutput, context);
|
|
1275
|
-
default:
|
|
1276
|
-
const parsedBody = parsedOutput.body;
|
|
1277
|
-
return throwDefaultError({
|
|
1278
|
-
output,
|
|
1279
|
-
parsedBody,
|
|
1280
|
-
errorCode,
|
|
1281
|
-
});
|
|
1282
|
-
}
|
|
1283
|
-
};
|
|
1284
|
-
const de_CustomHealthNotFoundRes = async (parsedOutput, context) => {
|
|
1285
|
-
const body = parsedOutput.body;
|
|
1286
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1287
|
-
const exception = new models_0_1.CustomHealthNotFound({
|
|
1288
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1289
|
-
...deserialized,
|
|
1290
|
-
});
|
|
1291
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1292
|
-
};
|
|
1293
|
-
const de_DuplicateRequestRes = async (parsedOutput, context) => {
|
|
1294
|
-
const body = parsedOutput.body;
|
|
1295
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1296
|
-
const exception = new models_0_1.DuplicateRequest({
|
|
1297
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1298
|
-
...deserialized,
|
|
1299
|
-
});
|
|
1300
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1301
|
-
};
|
|
1302
|
-
const de_InstanceNotFoundRes = async (parsedOutput, context) => {
|
|
1303
|
-
const body = parsedOutput.body;
|
|
1304
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1305
|
-
const exception = new models_0_1.InstanceNotFound({
|
|
1306
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1307
|
-
...deserialized,
|
|
1308
|
-
});
|
|
1309
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1310
|
-
};
|
|
1311
|
-
const de_InvalidInputRes = async (parsedOutput, context) => {
|
|
1312
|
-
const body = parsedOutput.body;
|
|
1313
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1314
|
-
const exception = new models_0_1.InvalidInput({
|
|
1315
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1316
|
-
...deserialized,
|
|
1317
|
-
});
|
|
1318
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1319
|
-
};
|
|
1320
|
-
const de_NamespaceAlreadyExistsRes = async (parsedOutput, context) => {
|
|
1321
|
-
const body = parsedOutput.body;
|
|
1322
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1323
|
-
const exception = new models_0_1.NamespaceAlreadyExists({
|
|
1324
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1325
|
-
...deserialized,
|
|
1326
|
-
});
|
|
1327
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1328
|
-
};
|
|
1329
|
-
const de_NamespaceNotFoundRes = async (parsedOutput, context) => {
|
|
1330
|
-
const body = parsedOutput.body;
|
|
1331
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1332
|
-
const exception = new models_0_1.NamespaceNotFound({
|
|
1333
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1334
|
-
...deserialized,
|
|
1335
|
-
});
|
|
1336
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1337
|
-
};
|
|
1338
|
-
const de_OperationNotFoundRes = async (parsedOutput, context) => {
|
|
1339
|
-
const body = parsedOutput.body;
|
|
1340
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1341
|
-
const exception = new models_0_1.OperationNotFound({
|
|
1342
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1343
|
-
...deserialized,
|
|
1344
|
-
});
|
|
1345
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1346
|
-
};
|
|
1347
|
-
const de_RequestLimitExceededRes = async (parsedOutput, context) => {
|
|
1348
|
-
const body = parsedOutput.body;
|
|
1349
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1350
|
-
const exception = new models_0_1.RequestLimitExceeded({
|
|
1351
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1352
|
-
...deserialized,
|
|
1353
|
-
});
|
|
1354
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1355
|
-
};
|
|
1356
|
-
const de_ResourceInUseRes = async (parsedOutput, context) => {
|
|
1357
|
-
const body = parsedOutput.body;
|
|
1358
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1359
|
-
const exception = new models_0_1.ResourceInUse({
|
|
1360
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1361
|
-
...deserialized,
|
|
1362
|
-
});
|
|
1363
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1364
|
-
};
|
|
1365
|
-
const de_ResourceLimitExceededRes = async (parsedOutput, context) => {
|
|
1366
|
-
const body = parsedOutput.body;
|
|
1367
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1368
|
-
const exception = new models_0_1.ResourceLimitExceeded({
|
|
1369
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1370
|
-
...deserialized,
|
|
1371
|
-
});
|
|
1372
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1373
|
-
};
|
|
1374
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1375
|
-
const body = parsedOutput.body;
|
|
1376
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1377
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1378
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1379
|
-
...deserialized,
|
|
1380
|
-
});
|
|
1381
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1382
|
-
};
|
|
1383
|
-
const de_ServiceAlreadyExistsRes = async (parsedOutput, context) => {
|
|
1384
|
-
const body = parsedOutput.body;
|
|
1385
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1386
|
-
const exception = new models_0_1.ServiceAlreadyExists({
|
|
1387
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1388
|
-
...deserialized,
|
|
1389
|
-
});
|
|
1390
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1391
|
-
};
|
|
1392
|
-
const de_ServiceNotFoundRes = async (parsedOutput, context) => {
|
|
1393
|
-
const body = parsedOutput.body;
|
|
1394
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1395
|
-
const exception = new models_0_1.ServiceNotFound({
|
|
1396
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1397
|
-
...deserialized,
|
|
1398
|
-
});
|
|
1399
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1400
|
-
};
|
|
1401
|
-
const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
1402
|
-
const body = parsedOutput.body;
|
|
1403
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1404
|
-
const exception = new models_0_1.TooManyTagsException({
|
|
1405
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1406
|
-
...deserialized,
|
|
1407
|
-
});
|
|
1408
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1409
|
-
};
|
|
1410
|
-
const se_CreateHttpNamespaceRequest = (input, context) => {
|
|
1411
|
-
return (0, smithy_client_1.take)(input, {
|
|
1412
|
-
CreatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1413
|
-
Description: [],
|
|
1414
|
-
Name: [],
|
|
1415
|
-
Tags: smithy_client_1._json,
|
|
1416
|
-
});
|
|
1417
|
-
};
|
|
1418
|
-
const se_CreatePrivateDnsNamespaceRequest = (input, context) => {
|
|
1419
|
-
return (0, smithy_client_1.take)(input, {
|
|
1420
|
-
CreatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1421
|
-
Description: [],
|
|
1422
|
-
Name: [],
|
|
1423
|
-
Properties: smithy_client_1._json,
|
|
1424
|
-
Tags: smithy_client_1._json,
|
|
1425
|
-
Vpc: [],
|
|
1426
|
-
});
|
|
1427
|
-
};
|
|
1428
|
-
const se_CreatePublicDnsNamespaceRequest = (input, context) => {
|
|
1429
|
-
return (0, smithy_client_1.take)(input, {
|
|
1430
|
-
CreatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1431
|
-
Description: [],
|
|
1432
|
-
Name: [],
|
|
1433
|
-
Properties: smithy_client_1._json,
|
|
1434
|
-
Tags: smithy_client_1._json,
|
|
1435
|
-
});
|
|
1436
|
-
};
|
|
1437
|
-
const se_CreateServiceRequest = (input, context) => {
|
|
1438
|
-
return (0, smithy_client_1.take)(input, {
|
|
1439
|
-
CreatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1440
|
-
Description: [],
|
|
1441
|
-
DnsConfig: smithy_client_1._json,
|
|
1442
|
-
HealthCheckConfig: smithy_client_1._json,
|
|
1443
|
-
HealthCheckCustomConfig: smithy_client_1._json,
|
|
1444
|
-
Name: [],
|
|
1445
|
-
NamespaceId: [],
|
|
1446
|
-
Tags: smithy_client_1._json,
|
|
1447
|
-
Type: [],
|
|
1448
|
-
});
|
|
1449
|
-
};
|
|
1450
|
-
const se_RegisterInstanceRequest = (input, context) => {
|
|
1451
|
-
return (0, smithy_client_1.take)(input, {
|
|
1452
|
-
Attributes: smithy_client_1._json,
|
|
1453
|
-
CreatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1454
|
-
InstanceId: [],
|
|
1455
|
-
ServiceId: [],
|
|
1456
|
-
});
|
|
1457
|
-
};
|
|
1458
|
-
const se_UpdateHttpNamespaceRequest = (input, context) => {
|
|
1459
|
-
return (0, smithy_client_1.take)(input, {
|
|
1460
|
-
Id: [],
|
|
1461
|
-
Namespace: smithy_client_1._json,
|
|
1462
|
-
UpdaterRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1463
|
-
});
|
|
1464
|
-
};
|
|
1465
|
-
const se_UpdatePrivateDnsNamespaceRequest = (input, context) => {
|
|
1466
|
-
return (0, smithy_client_1.take)(input, {
|
|
1467
|
-
Id: [],
|
|
1468
|
-
Namespace: smithy_client_1._json,
|
|
1469
|
-
UpdaterRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1470
|
-
});
|
|
1471
|
-
};
|
|
1472
|
-
const se_UpdatePublicDnsNamespaceRequest = (input, context) => {
|
|
1473
|
-
return (0, smithy_client_1.take)(input, {
|
|
1474
|
-
Id: [],
|
|
1475
|
-
Namespace: smithy_client_1._json,
|
|
1476
|
-
UpdaterRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1477
|
-
});
|
|
1478
|
-
};
|
|
1479
|
-
const de_CreateServiceResponse = (output, context) => {
|
|
1480
|
-
return (0, smithy_client_1.take)(output, {
|
|
1481
|
-
Service: (_) => de_Service(_, context),
|
|
1482
|
-
});
|
|
1483
|
-
};
|
|
1484
|
-
const de_GetNamespaceResponse = (output, context) => {
|
|
1485
|
-
return (0, smithy_client_1.take)(output, {
|
|
1486
|
-
Namespace: (_) => de_Namespace(_, context),
|
|
1487
|
-
});
|
|
1488
|
-
};
|
|
1489
|
-
const de_GetOperationResponse = (output, context) => {
|
|
1490
|
-
return (0, smithy_client_1.take)(output, {
|
|
1491
|
-
Operation: (_) => de_Operation(_, context),
|
|
1492
|
-
});
|
|
1493
|
-
};
|
|
1494
|
-
const de_GetServiceResponse = (output, context) => {
|
|
1495
|
-
return (0, smithy_client_1.take)(output, {
|
|
1496
|
-
Service: (_) => de_Service(_, context),
|
|
1497
|
-
});
|
|
1498
|
-
};
|
|
1499
|
-
const de_ListNamespacesResponse = (output, context) => {
|
|
1500
|
-
return (0, smithy_client_1.take)(output, {
|
|
1501
|
-
Namespaces: (_) => de_NamespaceSummariesList(_, context),
|
|
1502
|
-
NextToken: smithy_client_1.expectString,
|
|
1503
|
-
});
|
|
1504
|
-
};
|
|
1505
|
-
const de_ListServicesResponse = (output, context) => {
|
|
1506
|
-
return (0, smithy_client_1.take)(output, {
|
|
1507
|
-
NextToken: smithy_client_1.expectString,
|
|
1508
|
-
Services: (_) => de_ServiceSummariesList(_, context),
|
|
1509
|
-
});
|
|
1510
|
-
};
|
|
1511
|
-
const de_Namespace = (output, context) => {
|
|
1512
|
-
return (0, smithy_client_1.take)(output, {
|
|
1513
|
-
Arn: smithy_client_1.expectString,
|
|
1514
|
-
CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1515
|
-
CreatorRequestId: smithy_client_1.expectString,
|
|
1516
|
-
Description: smithy_client_1.expectString,
|
|
1517
|
-
Id: smithy_client_1.expectString,
|
|
1518
|
-
Name: smithy_client_1.expectString,
|
|
1519
|
-
Properties: smithy_client_1._json,
|
|
1520
|
-
ServiceCount: smithy_client_1.expectInt32,
|
|
1521
|
-
Type: smithy_client_1.expectString,
|
|
1522
|
-
});
|
|
1523
|
-
};
|
|
1524
|
-
const de_NamespaceSummariesList = (output, context) => {
|
|
1525
|
-
const retVal = (output || [])
|
|
1526
|
-
.filter((e) => e != null)
|
|
1527
|
-
.map((entry) => {
|
|
1528
|
-
return de_NamespaceSummary(entry, context);
|
|
1529
|
-
});
|
|
1530
|
-
return retVal;
|
|
1531
|
-
};
|
|
1532
|
-
const de_NamespaceSummary = (output, context) => {
|
|
1533
|
-
return (0, smithy_client_1.take)(output, {
|
|
1534
|
-
Arn: smithy_client_1.expectString,
|
|
1535
|
-
CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1536
|
-
Description: smithy_client_1.expectString,
|
|
1537
|
-
Id: smithy_client_1.expectString,
|
|
1538
|
-
Name: smithy_client_1.expectString,
|
|
1539
|
-
Properties: smithy_client_1._json,
|
|
1540
|
-
ServiceCount: smithy_client_1.expectInt32,
|
|
1541
|
-
Type: smithy_client_1.expectString,
|
|
1542
|
-
});
|
|
1543
|
-
};
|
|
1544
|
-
const de_Operation = (output, context) => {
|
|
1545
|
-
return (0, smithy_client_1.take)(output, {
|
|
1546
|
-
CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1547
|
-
ErrorCode: smithy_client_1.expectString,
|
|
1548
|
-
ErrorMessage: smithy_client_1.expectString,
|
|
1549
|
-
Id: smithy_client_1.expectString,
|
|
1550
|
-
Status: smithy_client_1.expectString,
|
|
1551
|
-
Targets: smithy_client_1._json,
|
|
1552
|
-
Type: smithy_client_1.expectString,
|
|
1553
|
-
UpdateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1554
|
-
});
|
|
1555
|
-
};
|
|
1556
|
-
const de_Service = (output, context) => {
|
|
1557
|
-
return (0, smithy_client_1.take)(output, {
|
|
1558
|
-
Arn: smithy_client_1.expectString,
|
|
1559
|
-
CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1560
|
-
CreatorRequestId: smithy_client_1.expectString,
|
|
1561
|
-
Description: smithy_client_1.expectString,
|
|
1562
|
-
DnsConfig: smithy_client_1._json,
|
|
1563
|
-
HealthCheckConfig: smithy_client_1._json,
|
|
1564
|
-
HealthCheckCustomConfig: smithy_client_1._json,
|
|
1565
|
-
Id: smithy_client_1.expectString,
|
|
1566
|
-
InstanceCount: smithy_client_1.expectInt32,
|
|
1567
|
-
Name: smithy_client_1.expectString,
|
|
1568
|
-
NamespaceId: smithy_client_1.expectString,
|
|
1569
|
-
Type: smithy_client_1.expectString,
|
|
1570
|
-
});
|
|
1571
|
-
};
|
|
1572
|
-
const de_ServiceSummariesList = (output, context) => {
|
|
1573
|
-
const retVal = (output || [])
|
|
1574
|
-
.filter((e) => e != null)
|
|
1575
|
-
.map((entry) => {
|
|
1576
|
-
return de_ServiceSummary(entry, context);
|
|
1577
|
-
});
|
|
1578
|
-
return retVal;
|
|
1579
|
-
};
|
|
1580
|
-
const de_ServiceSummary = (output, context) => {
|
|
1581
|
-
return (0, smithy_client_1.take)(output, {
|
|
1582
|
-
Arn: smithy_client_1.expectString,
|
|
1583
|
-
CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1584
|
-
Description: smithy_client_1.expectString,
|
|
1585
|
-
DnsConfig: smithy_client_1._json,
|
|
1586
|
-
HealthCheckConfig: smithy_client_1._json,
|
|
1587
|
-
HealthCheckCustomConfig: smithy_client_1._json,
|
|
1588
|
-
Id: smithy_client_1.expectString,
|
|
1589
|
-
InstanceCount: smithy_client_1.expectInt32,
|
|
1590
|
-
Name: smithy_client_1.expectString,
|
|
1591
|
-
Type: smithy_client_1.expectString,
|
|
1592
|
-
});
|
|
1593
|
-
};
|
|
1594
|
-
const deserializeMetadata = (output) => ({
|
|
1595
|
-
httpStatusCode: output.statusCode,
|
|
1596
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1597
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1598
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1599
|
-
});
|
|
1600
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1601
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException);
|
|
1602
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1603
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1604
|
-
const contents = {
|
|
1605
|
-
protocol,
|
|
1606
|
-
hostname,
|
|
1607
|
-
port,
|
|
1608
|
-
method: "POST",
|
|
1609
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1610
|
-
headers,
|
|
1611
|
-
};
|
|
1612
|
-
if (resolvedHostname !== undefined) {
|
|
1613
|
-
contents.hostname = resolvedHostname;
|
|
1614
|
-
}
|
|
1615
|
-
if (body !== undefined) {
|
|
1616
|
-
contents.body = body;
|
|
1617
|
-
}
|
|
1618
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
1619
|
-
};
|
|
1620
|
-
function sharedHeaders(operation) {
|
|
1621
|
-
return {
|
|
1622
|
-
"content-type": "application/x-amz-json-1.1",
|
|
1623
|
-
"x-amz-target": `Route53AutoNaming_v20170314.${operation}`,
|
|
1624
|
-
};
|
|
1625
|
-
}
|
|
1626
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1627
|
-
if (encoded.length) {
|
|
1628
|
-
return JSON.parse(encoded);
|
|
1629
|
-
}
|
|
1630
|
-
return {};
|
|
1631
|
-
});
|
|
1632
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1633
|
-
const value = await parseBody(errorBody, context);
|
|
1634
|
-
value.message = value.message ?? value.Message;
|
|
1635
|
-
return value;
|
|
1636
|
-
};
|
|
1637
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1638
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1639
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1640
|
-
let cleanValue = rawValue;
|
|
1641
|
-
if (typeof cleanValue === "number") {
|
|
1642
|
-
cleanValue = cleanValue.toString();
|
|
1643
|
-
}
|
|
1644
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1645
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1646
|
-
}
|
|
1647
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1648
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1649
|
-
}
|
|
1650
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1651
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1652
|
-
}
|
|
1653
|
-
return cleanValue;
|
|
1654
|
-
};
|
|
1655
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1656
|
-
if (headerKey !== undefined) {
|
|
1657
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1658
|
-
}
|
|
1659
|
-
if (data.code !== undefined) {
|
|
1660
|
-
return sanitizeErrorCode(data.code);
|
|
1661
|
-
}
|
|
1662
|
-
if (data["__type"] !== undefined) {
|
|
1663
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1664
|
-
}
|
|
1665
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|