@aws-sdk/client-cloudcontrol 3.490.0 → 3.496.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/CloudControl.js +1 -27
- package/dist-cjs/CloudControlClient.js +1 -43
- package/dist-cjs/commands/CancelResourceRequestCommand.js +1 -29
- package/dist-cjs/commands/CreateResourceCommand.js +1 -29
- package/dist-cjs/commands/DeleteResourceCommand.js +1 -29
- package/dist-cjs/commands/GetResourceCommand.js +1 -29
- package/dist-cjs/commands/GetResourceRequestStatusCommand.js +1 -29
- package/dist-cjs/commands/ListResourceRequestsCommand.js +1 -29
- package/dist-cjs/commands/ListResourcesCommand.js +1 -29
- package/dist-cjs/commands/UpdateResourceCommand.js +1 -29
- package/dist-cjs/commands/index.js +1 -11
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1830 -12
- package/dist-cjs/models/CloudControlServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -400
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListResourceRequestsPaginator.js +1 -7
- package/dist-cjs/pagination/ListResourcesPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -6
- package/dist-cjs/protocols/Aws_json1_0.js +1 -925
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/dist-cjs/waiters/index.js +1 -4
- package/dist-cjs/waiters/waitForResourceRequestSuccess.js +1 -54
- package/package.json +41 -41
|
@@ -1,925 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateResourceCommand = exports.de_ListResourcesCommand = exports.de_ListResourceRequestsCommand = exports.de_GetResourceRequestStatusCommand = exports.de_GetResourceCommand = exports.de_DeleteResourceCommand = exports.de_CreateResourceCommand = exports.de_CancelResourceRequestCommand = exports.se_UpdateResourceCommand = exports.se_ListResourcesCommand = exports.se_ListResourceRequestsCommand = exports.se_GetResourceRequestStatusCommand = exports.se_GetResourceCommand = exports.se_DeleteResourceCommand = exports.se_CreateResourceCommand = exports.se_CancelResourceRequestCommand = void 0;
|
|
4
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const uuid_1 = require("uuid");
|
|
7
|
-
const CloudControlServiceException_1 = require("../models/CloudControlServiceException");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const se_CancelResourceRequestCommand = async (input, context) => {
|
|
10
|
-
const headers = sharedHeaders("CancelResourceRequest");
|
|
11
|
-
let body;
|
|
12
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
13
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
14
|
-
};
|
|
15
|
-
exports.se_CancelResourceRequestCommand = se_CancelResourceRequestCommand;
|
|
16
|
-
const se_CreateResourceCommand = async (input, context) => {
|
|
17
|
-
const headers = sharedHeaders("CreateResource");
|
|
18
|
-
let body;
|
|
19
|
-
body = JSON.stringify(se_CreateResourceInput(input, context));
|
|
20
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
21
|
-
};
|
|
22
|
-
exports.se_CreateResourceCommand = se_CreateResourceCommand;
|
|
23
|
-
const se_DeleteResourceCommand = async (input, context) => {
|
|
24
|
-
const headers = sharedHeaders("DeleteResource");
|
|
25
|
-
let body;
|
|
26
|
-
body = JSON.stringify(se_DeleteResourceInput(input, context));
|
|
27
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
28
|
-
};
|
|
29
|
-
exports.se_DeleteResourceCommand = se_DeleteResourceCommand;
|
|
30
|
-
const se_GetResourceCommand = async (input, context) => {
|
|
31
|
-
const headers = sharedHeaders("GetResource");
|
|
32
|
-
let body;
|
|
33
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
34
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
-
};
|
|
36
|
-
exports.se_GetResourceCommand = se_GetResourceCommand;
|
|
37
|
-
const se_GetResourceRequestStatusCommand = async (input, context) => {
|
|
38
|
-
const headers = sharedHeaders("GetResourceRequestStatus");
|
|
39
|
-
let body;
|
|
40
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
41
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
|
-
};
|
|
43
|
-
exports.se_GetResourceRequestStatusCommand = se_GetResourceRequestStatusCommand;
|
|
44
|
-
const se_ListResourceRequestsCommand = async (input, context) => {
|
|
45
|
-
const headers = sharedHeaders("ListResourceRequests");
|
|
46
|
-
let body;
|
|
47
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
48
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
-
};
|
|
50
|
-
exports.se_ListResourceRequestsCommand = se_ListResourceRequestsCommand;
|
|
51
|
-
const se_ListResourcesCommand = async (input, context) => {
|
|
52
|
-
const headers = sharedHeaders("ListResources");
|
|
53
|
-
let body;
|
|
54
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
55
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
56
|
-
};
|
|
57
|
-
exports.se_ListResourcesCommand = se_ListResourcesCommand;
|
|
58
|
-
const se_UpdateResourceCommand = async (input, context) => {
|
|
59
|
-
const headers = sharedHeaders("UpdateResource");
|
|
60
|
-
let body;
|
|
61
|
-
body = JSON.stringify(se_UpdateResourceInput(input, context));
|
|
62
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
63
|
-
};
|
|
64
|
-
exports.se_UpdateResourceCommand = se_UpdateResourceCommand;
|
|
65
|
-
const de_CancelResourceRequestCommand = async (output, context) => {
|
|
66
|
-
if (output.statusCode >= 300) {
|
|
67
|
-
return de_CancelResourceRequestCommandError(output, context);
|
|
68
|
-
}
|
|
69
|
-
const data = await parseBody(output.body, context);
|
|
70
|
-
let contents = {};
|
|
71
|
-
contents = de_CancelResourceRequestOutput(data, context);
|
|
72
|
-
const response = {
|
|
73
|
-
$metadata: deserializeMetadata(output),
|
|
74
|
-
...contents,
|
|
75
|
-
};
|
|
76
|
-
return response;
|
|
77
|
-
};
|
|
78
|
-
exports.de_CancelResourceRequestCommand = de_CancelResourceRequestCommand;
|
|
79
|
-
const de_CancelResourceRequestCommandError = async (output, context) => {
|
|
80
|
-
const parsedOutput = {
|
|
81
|
-
...output,
|
|
82
|
-
body: await parseErrorBody(output.body, context),
|
|
83
|
-
};
|
|
84
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
85
|
-
switch (errorCode) {
|
|
86
|
-
case "ConcurrentModificationException":
|
|
87
|
-
case "com.amazonaws.cloudcontrol#ConcurrentModificationException":
|
|
88
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
89
|
-
case "RequestTokenNotFoundException":
|
|
90
|
-
case "com.amazonaws.cloudcontrol#RequestTokenNotFoundException":
|
|
91
|
-
throw await de_RequestTokenNotFoundExceptionRes(parsedOutput, context);
|
|
92
|
-
default:
|
|
93
|
-
const parsedBody = parsedOutput.body;
|
|
94
|
-
return throwDefaultError({
|
|
95
|
-
output,
|
|
96
|
-
parsedBody,
|
|
97
|
-
errorCode,
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
const de_CreateResourceCommand = async (output, context) => {
|
|
102
|
-
if (output.statusCode >= 300) {
|
|
103
|
-
return de_CreateResourceCommandError(output, context);
|
|
104
|
-
}
|
|
105
|
-
const data = await parseBody(output.body, context);
|
|
106
|
-
let contents = {};
|
|
107
|
-
contents = de_CreateResourceOutput(data, context);
|
|
108
|
-
const response = {
|
|
109
|
-
$metadata: deserializeMetadata(output),
|
|
110
|
-
...contents,
|
|
111
|
-
};
|
|
112
|
-
return response;
|
|
113
|
-
};
|
|
114
|
-
exports.de_CreateResourceCommand = de_CreateResourceCommand;
|
|
115
|
-
const de_CreateResourceCommandError = async (output, context) => {
|
|
116
|
-
const parsedOutput = {
|
|
117
|
-
...output,
|
|
118
|
-
body: await parseErrorBody(output.body, context),
|
|
119
|
-
};
|
|
120
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
121
|
-
switch (errorCode) {
|
|
122
|
-
case "AlreadyExistsException":
|
|
123
|
-
case "com.amazonaws.cloudcontrol#AlreadyExistsException":
|
|
124
|
-
throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
|
|
125
|
-
case "ClientTokenConflictException":
|
|
126
|
-
case "com.amazonaws.cloudcontrol#ClientTokenConflictException":
|
|
127
|
-
throw await de_ClientTokenConflictExceptionRes(parsedOutput, context);
|
|
128
|
-
case "ConcurrentOperationException":
|
|
129
|
-
case "com.amazonaws.cloudcontrol#ConcurrentOperationException":
|
|
130
|
-
throw await de_ConcurrentOperationExceptionRes(parsedOutput, context);
|
|
131
|
-
case "GeneralServiceException":
|
|
132
|
-
case "com.amazonaws.cloudcontrol#GeneralServiceException":
|
|
133
|
-
throw await de_GeneralServiceExceptionRes(parsedOutput, context);
|
|
134
|
-
case "HandlerFailureException":
|
|
135
|
-
case "com.amazonaws.cloudcontrol#HandlerFailureException":
|
|
136
|
-
throw await de_HandlerFailureExceptionRes(parsedOutput, context);
|
|
137
|
-
case "HandlerInternalFailureException":
|
|
138
|
-
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
|
|
139
|
-
throw await de_HandlerInternalFailureExceptionRes(parsedOutput, context);
|
|
140
|
-
case "InvalidCredentialsException":
|
|
141
|
-
case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
|
|
142
|
-
throw await de_InvalidCredentialsExceptionRes(parsedOutput, context);
|
|
143
|
-
case "InvalidRequestException":
|
|
144
|
-
case "com.amazonaws.cloudcontrol#InvalidRequestException":
|
|
145
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
146
|
-
case "NetworkFailureException":
|
|
147
|
-
case "com.amazonaws.cloudcontrol#NetworkFailureException":
|
|
148
|
-
throw await de_NetworkFailureExceptionRes(parsedOutput, context);
|
|
149
|
-
case "NotStabilizedException":
|
|
150
|
-
case "com.amazonaws.cloudcontrol#NotStabilizedException":
|
|
151
|
-
throw await de_NotStabilizedExceptionRes(parsedOutput, context);
|
|
152
|
-
case "NotUpdatableException":
|
|
153
|
-
case "com.amazonaws.cloudcontrol#NotUpdatableException":
|
|
154
|
-
throw await de_NotUpdatableExceptionRes(parsedOutput, context);
|
|
155
|
-
case "PrivateTypeException":
|
|
156
|
-
case "com.amazonaws.cloudcontrol#PrivateTypeException":
|
|
157
|
-
throw await de_PrivateTypeExceptionRes(parsedOutput, context);
|
|
158
|
-
case "ResourceConflictException":
|
|
159
|
-
case "com.amazonaws.cloudcontrol#ResourceConflictException":
|
|
160
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
161
|
-
case "ResourceNotFoundException":
|
|
162
|
-
case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
|
|
163
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
164
|
-
case "ServiceInternalErrorException":
|
|
165
|
-
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
|
|
166
|
-
throw await de_ServiceInternalErrorExceptionRes(parsedOutput, context);
|
|
167
|
-
case "ServiceLimitExceededException":
|
|
168
|
-
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
|
|
169
|
-
throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
|
|
170
|
-
case "ThrottlingException":
|
|
171
|
-
case "com.amazonaws.cloudcontrol#ThrottlingException":
|
|
172
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
173
|
-
case "TypeNotFoundException":
|
|
174
|
-
case "com.amazonaws.cloudcontrol#TypeNotFoundException":
|
|
175
|
-
throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
|
|
176
|
-
case "UnsupportedActionException":
|
|
177
|
-
case "com.amazonaws.cloudcontrol#UnsupportedActionException":
|
|
178
|
-
throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
|
|
179
|
-
default:
|
|
180
|
-
const parsedBody = parsedOutput.body;
|
|
181
|
-
return throwDefaultError({
|
|
182
|
-
output,
|
|
183
|
-
parsedBody,
|
|
184
|
-
errorCode,
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
const de_DeleteResourceCommand = async (output, context) => {
|
|
189
|
-
if (output.statusCode >= 300) {
|
|
190
|
-
return de_DeleteResourceCommandError(output, context);
|
|
191
|
-
}
|
|
192
|
-
const data = await parseBody(output.body, context);
|
|
193
|
-
let contents = {};
|
|
194
|
-
contents = de_DeleteResourceOutput(data, context);
|
|
195
|
-
const response = {
|
|
196
|
-
$metadata: deserializeMetadata(output),
|
|
197
|
-
...contents,
|
|
198
|
-
};
|
|
199
|
-
return response;
|
|
200
|
-
};
|
|
201
|
-
exports.de_DeleteResourceCommand = de_DeleteResourceCommand;
|
|
202
|
-
const de_DeleteResourceCommandError = async (output, context) => {
|
|
203
|
-
const parsedOutput = {
|
|
204
|
-
...output,
|
|
205
|
-
body: await parseErrorBody(output.body, context),
|
|
206
|
-
};
|
|
207
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
208
|
-
switch (errorCode) {
|
|
209
|
-
case "AlreadyExistsException":
|
|
210
|
-
case "com.amazonaws.cloudcontrol#AlreadyExistsException":
|
|
211
|
-
throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
|
|
212
|
-
case "ClientTokenConflictException":
|
|
213
|
-
case "com.amazonaws.cloudcontrol#ClientTokenConflictException":
|
|
214
|
-
throw await de_ClientTokenConflictExceptionRes(parsedOutput, context);
|
|
215
|
-
case "ConcurrentOperationException":
|
|
216
|
-
case "com.amazonaws.cloudcontrol#ConcurrentOperationException":
|
|
217
|
-
throw await de_ConcurrentOperationExceptionRes(parsedOutput, context);
|
|
218
|
-
case "GeneralServiceException":
|
|
219
|
-
case "com.amazonaws.cloudcontrol#GeneralServiceException":
|
|
220
|
-
throw await de_GeneralServiceExceptionRes(parsedOutput, context);
|
|
221
|
-
case "HandlerFailureException":
|
|
222
|
-
case "com.amazonaws.cloudcontrol#HandlerFailureException":
|
|
223
|
-
throw await de_HandlerFailureExceptionRes(parsedOutput, context);
|
|
224
|
-
case "HandlerInternalFailureException":
|
|
225
|
-
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
|
|
226
|
-
throw await de_HandlerInternalFailureExceptionRes(parsedOutput, context);
|
|
227
|
-
case "InvalidCredentialsException":
|
|
228
|
-
case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
|
|
229
|
-
throw await de_InvalidCredentialsExceptionRes(parsedOutput, context);
|
|
230
|
-
case "InvalidRequestException":
|
|
231
|
-
case "com.amazonaws.cloudcontrol#InvalidRequestException":
|
|
232
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
233
|
-
case "NetworkFailureException":
|
|
234
|
-
case "com.amazonaws.cloudcontrol#NetworkFailureException":
|
|
235
|
-
throw await de_NetworkFailureExceptionRes(parsedOutput, context);
|
|
236
|
-
case "NotStabilizedException":
|
|
237
|
-
case "com.amazonaws.cloudcontrol#NotStabilizedException":
|
|
238
|
-
throw await de_NotStabilizedExceptionRes(parsedOutput, context);
|
|
239
|
-
case "NotUpdatableException":
|
|
240
|
-
case "com.amazonaws.cloudcontrol#NotUpdatableException":
|
|
241
|
-
throw await de_NotUpdatableExceptionRes(parsedOutput, context);
|
|
242
|
-
case "PrivateTypeException":
|
|
243
|
-
case "com.amazonaws.cloudcontrol#PrivateTypeException":
|
|
244
|
-
throw await de_PrivateTypeExceptionRes(parsedOutput, context);
|
|
245
|
-
case "ResourceConflictException":
|
|
246
|
-
case "com.amazonaws.cloudcontrol#ResourceConflictException":
|
|
247
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
248
|
-
case "ResourceNotFoundException":
|
|
249
|
-
case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
|
|
250
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
251
|
-
case "ServiceInternalErrorException":
|
|
252
|
-
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
|
|
253
|
-
throw await de_ServiceInternalErrorExceptionRes(parsedOutput, context);
|
|
254
|
-
case "ServiceLimitExceededException":
|
|
255
|
-
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
|
|
256
|
-
throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
|
|
257
|
-
case "ThrottlingException":
|
|
258
|
-
case "com.amazonaws.cloudcontrol#ThrottlingException":
|
|
259
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
260
|
-
case "TypeNotFoundException":
|
|
261
|
-
case "com.amazonaws.cloudcontrol#TypeNotFoundException":
|
|
262
|
-
throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
|
|
263
|
-
case "UnsupportedActionException":
|
|
264
|
-
case "com.amazonaws.cloudcontrol#UnsupportedActionException":
|
|
265
|
-
throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
|
|
266
|
-
default:
|
|
267
|
-
const parsedBody = parsedOutput.body;
|
|
268
|
-
return throwDefaultError({
|
|
269
|
-
output,
|
|
270
|
-
parsedBody,
|
|
271
|
-
errorCode,
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
const de_GetResourceCommand = async (output, context) => {
|
|
276
|
-
if (output.statusCode >= 300) {
|
|
277
|
-
return de_GetResourceCommandError(output, context);
|
|
278
|
-
}
|
|
279
|
-
const data = await parseBody(output.body, context);
|
|
280
|
-
let contents = {};
|
|
281
|
-
contents = (0, smithy_client_1._json)(data);
|
|
282
|
-
const response = {
|
|
283
|
-
$metadata: deserializeMetadata(output),
|
|
284
|
-
...contents,
|
|
285
|
-
};
|
|
286
|
-
return response;
|
|
287
|
-
};
|
|
288
|
-
exports.de_GetResourceCommand = de_GetResourceCommand;
|
|
289
|
-
const de_GetResourceCommandError = async (output, context) => {
|
|
290
|
-
const parsedOutput = {
|
|
291
|
-
...output,
|
|
292
|
-
body: await parseErrorBody(output.body, context),
|
|
293
|
-
};
|
|
294
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
295
|
-
switch (errorCode) {
|
|
296
|
-
case "AlreadyExistsException":
|
|
297
|
-
case "com.amazonaws.cloudcontrol#AlreadyExistsException":
|
|
298
|
-
throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
|
|
299
|
-
case "GeneralServiceException":
|
|
300
|
-
case "com.amazonaws.cloudcontrol#GeneralServiceException":
|
|
301
|
-
throw await de_GeneralServiceExceptionRes(parsedOutput, context);
|
|
302
|
-
case "HandlerFailureException":
|
|
303
|
-
case "com.amazonaws.cloudcontrol#HandlerFailureException":
|
|
304
|
-
throw await de_HandlerFailureExceptionRes(parsedOutput, context);
|
|
305
|
-
case "HandlerInternalFailureException":
|
|
306
|
-
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
|
|
307
|
-
throw await de_HandlerInternalFailureExceptionRes(parsedOutput, context);
|
|
308
|
-
case "InvalidCredentialsException":
|
|
309
|
-
case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
|
|
310
|
-
throw await de_InvalidCredentialsExceptionRes(parsedOutput, context);
|
|
311
|
-
case "InvalidRequestException":
|
|
312
|
-
case "com.amazonaws.cloudcontrol#InvalidRequestException":
|
|
313
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
314
|
-
case "NetworkFailureException":
|
|
315
|
-
case "com.amazonaws.cloudcontrol#NetworkFailureException":
|
|
316
|
-
throw await de_NetworkFailureExceptionRes(parsedOutput, context);
|
|
317
|
-
case "NotStabilizedException":
|
|
318
|
-
case "com.amazonaws.cloudcontrol#NotStabilizedException":
|
|
319
|
-
throw await de_NotStabilizedExceptionRes(parsedOutput, context);
|
|
320
|
-
case "NotUpdatableException":
|
|
321
|
-
case "com.amazonaws.cloudcontrol#NotUpdatableException":
|
|
322
|
-
throw await de_NotUpdatableExceptionRes(parsedOutput, context);
|
|
323
|
-
case "PrivateTypeException":
|
|
324
|
-
case "com.amazonaws.cloudcontrol#PrivateTypeException":
|
|
325
|
-
throw await de_PrivateTypeExceptionRes(parsedOutput, context);
|
|
326
|
-
case "ResourceConflictException":
|
|
327
|
-
case "com.amazonaws.cloudcontrol#ResourceConflictException":
|
|
328
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
329
|
-
case "ResourceNotFoundException":
|
|
330
|
-
case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
|
|
331
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
332
|
-
case "ServiceInternalErrorException":
|
|
333
|
-
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
|
|
334
|
-
throw await de_ServiceInternalErrorExceptionRes(parsedOutput, context);
|
|
335
|
-
case "ServiceLimitExceededException":
|
|
336
|
-
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
|
|
337
|
-
throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
|
|
338
|
-
case "ThrottlingException":
|
|
339
|
-
case "com.amazonaws.cloudcontrol#ThrottlingException":
|
|
340
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
341
|
-
case "TypeNotFoundException":
|
|
342
|
-
case "com.amazonaws.cloudcontrol#TypeNotFoundException":
|
|
343
|
-
throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
|
|
344
|
-
case "UnsupportedActionException":
|
|
345
|
-
case "com.amazonaws.cloudcontrol#UnsupportedActionException":
|
|
346
|
-
throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
|
|
347
|
-
default:
|
|
348
|
-
const parsedBody = parsedOutput.body;
|
|
349
|
-
return throwDefaultError({
|
|
350
|
-
output,
|
|
351
|
-
parsedBody,
|
|
352
|
-
errorCode,
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
const de_GetResourceRequestStatusCommand = async (output, context) => {
|
|
357
|
-
if (output.statusCode >= 300) {
|
|
358
|
-
return de_GetResourceRequestStatusCommandError(output, context);
|
|
359
|
-
}
|
|
360
|
-
const data = await parseBody(output.body, context);
|
|
361
|
-
let contents = {};
|
|
362
|
-
contents = de_GetResourceRequestStatusOutput(data, context);
|
|
363
|
-
const response = {
|
|
364
|
-
$metadata: deserializeMetadata(output),
|
|
365
|
-
...contents,
|
|
366
|
-
};
|
|
367
|
-
return response;
|
|
368
|
-
};
|
|
369
|
-
exports.de_GetResourceRequestStatusCommand = de_GetResourceRequestStatusCommand;
|
|
370
|
-
const de_GetResourceRequestStatusCommandError = async (output, context) => {
|
|
371
|
-
const parsedOutput = {
|
|
372
|
-
...output,
|
|
373
|
-
body: await parseErrorBody(output.body, context),
|
|
374
|
-
};
|
|
375
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
376
|
-
switch (errorCode) {
|
|
377
|
-
case "RequestTokenNotFoundException":
|
|
378
|
-
case "com.amazonaws.cloudcontrol#RequestTokenNotFoundException":
|
|
379
|
-
throw await de_RequestTokenNotFoundExceptionRes(parsedOutput, context);
|
|
380
|
-
default:
|
|
381
|
-
const parsedBody = parsedOutput.body;
|
|
382
|
-
return throwDefaultError({
|
|
383
|
-
output,
|
|
384
|
-
parsedBody,
|
|
385
|
-
errorCode,
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
const de_ListResourceRequestsCommand = async (output, context) => {
|
|
390
|
-
if (output.statusCode >= 300) {
|
|
391
|
-
return de_ListResourceRequestsCommandError(output, context);
|
|
392
|
-
}
|
|
393
|
-
const data = await parseBody(output.body, context);
|
|
394
|
-
let contents = {};
|
|
395
|
-
contents = de_ListResourceRequestsOutput(data, context);
|
|
396
|
-
const response = {
|
|
397
|
-
$metadata: deserializeMetadata(output),
|
|
398
|
-
...contents,
|
|
399
|
-
};
|
|
400
|
-
return response;
|
|
401
|
-
};
|
|
402
|
-
exports.de_ListResourceRequestsCommand = de_ListResourceRequestsCommand;
|
|
403
|
-
const de_ListResourceRequestsCommandError = async (output, context) => {
|
|
404
|
-
const parsedOutput = {
|
|
405
|
-
...output,
|
|
406
|
-
body: await parseErrorBody(output.body, context),
|
|
407
|
-
};
|
|
408
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
409
|
-
const parsedBody = parsedOutput.body;
|
|
410
|
-
return throwDefaultError({
|
|
411
|
-
output,
|
|
412
|
-
parsedBody,
|
|
413
|
-
errorCode,
|
|
414
|
-
});
|
|
415
|
-
};
|
|
416
|
-
const de_ListResourcesCommand = async (output, context) => {
|
|
417
|
-
if (output.statusCode >= 300) {
|
|
418
|
-
return de_ListResourcesCommandError(output, context);
|
|
419
|
-
}
|
|
420
|
-
const data = await parseBody(output.body, context);
|
|
421
|
-
let contents = {};
|
|
422
|
-
contents = (0, smithy_client_1._json)(data);
|
|
423
|
-
const response = {
|
|
424
|
-
$metadata: deserializeMetadata(output),
|
|
425
|
-
...contents,
|
|
426
|
-
};
|
|
427
|
-
return response;
|
|
428
|
-
};
|
|
429
|
-
exports.de_ListResourcesCommand = de_ListResourcesCommand;
|
|
430
|
-
const de_ListResourcesCommandError = async (output, context) => {
|
|
431
|
-
const parsedOutput = {
|
|
432
|
-
...output,
|
|
433
|
-
body: await parseErrorBody(output.body, context),
|
|
434
|
-
};
|
|
435
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
436
|
-
switch (errorCode) {
|
|
437
|
-
case "AlreadyExistsException":
|
|
438
|
-
case "com.amazonaws.cloudcontrol#AlreadyExistsException":
|
|
439
|
-
throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
|
|
440
|
-
case "GeneralServiceException":
|
|
441
|
-
case "com.amazonaws.cloudcontrol#GeneralServiceException":
|
|
442
|
-
throw await de_GeneralServiceExceptionRes(parsedOutput, context);
|
|
443
|
-
case "HandlerFailureException":
|
|
444
|
-
case "com.amazonaws.cloudcontrol#HandlerFailureException":
|
|
445
|
-
throw await de_HandlerFailureExceptionRes(parsedOutput, context);
|
|
446
|
-
case "HandlerInternalFailureException":
|
|
447
|
-
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
|
|
448
|
-
throw await de_HandlerInternalFailureExceptionRes(parsedOutput, context);
|
|
449
|
-
case "InvalidCredentialsException":
|
|
450
|
-
case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
|
|
451
|
-
throw await de_InvalidCredentialsExceptionRes(parsedOutput, context);
|
|
452
|
-
case "InvalidRequestException":
|
|
453
|
-
case "com.amazonaws.cloudcontrol#InvalidRequestException":
|
|
454
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
455
|
-
case "NetworkFailureException":
|
|
456
|
-
case "com.amazonaws.cloudcontrol#NetworkFailureException":
|
|
457
|
-
throw await de_NetworkFailureExceptionRes(parsedOutput, context);
|
|
458
|
-
case "NotStabilizedException":
|
|
459
|
-
case "com.amazonaws.cloudcontrol#NotStabilizedException":
|
|
460
|
-
throw await de_NotStabilizedExceptionRes(parsedOutput, context);
|
|
461
|
-
case "NotUpdatableException":
|
|
462
|
-
case "com.amazonaws.cloudcontrol#NotUpdatableException":
|
|
463
|
-
throw await de_NotUpdatableExceptionRes(parsedOutput, context);
|
|
464
|
-
case "PrivateTypeException":
|
|
465
|
-
case "com.amazonaws.cloudcontrol#PrivateTypeException":
|
|
466
|
-
throw await de_PrivateTypeExceptionRes(parsedOutput, context);
|
|
467
|
-
case "ResourceConflictException":
|
|
468
|
-
case "com.amazonaws.cloudcontrol#ResourceConflictException":
|
|
469
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
470
|
-
case "ResourceNotFoundException":
|
|
471
|
-
case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
|
|
472
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
473
|
-
case "ServiceInternalErrorException":
|
|
474
|
-
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
|
|
475
|
-
throw await de_ServiceInternalErrorExceptionRes(parsedOutput, context);
|
|
476
|
-
case "ServiceLimitExceededException":
|
|
477
|
-
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
|
|
478
|
-
throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
|
|
479
|
-
case "ThrottlingException":
|
|
480
|
-
case "com.amazonaws.cloudcontrol#ThrottlingException":
|
|
481
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
482
|
-
case "TypeNotFoundException":
|
|
483
|
-
case "com.amazonaws.cloudcontrol#TypeNotFoundException":
|
|
484
|
-
throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
|
|
485
|
-
case "UnsupportedActionException":
|
|
486
|
-
case "com.amazonaws.cloudcontrol#UnsupportedActionException":
|
|
487
|
-
throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
|
|
488
|
-
default:
|
|
489
|
-
const parsedBody = parsedOutput.body;
|
|
490
|
-
return throwDefaultError({
|
|
491
|
-
output,
|
|
492
|
-
parsedBody,
|
|
493
|
-
errorCode,
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
const de_UpdateResourceCommand = async (output, context) => {
|
|
498
|
-
if (output.statusCode >= 300) {
|
|
499
|
-
return de_UpdateResourceCommandError(output, context);
|
|
500
|
-
}
|
|
501
|
-
const data = await parseBody(output.body, context);
|
|
502
|
-
let contents = {};
|
|
503
|
-
contents = de_UpdateResourceOutput(data, context);
|
|
504
|
-
const response = {
|
|
505
|
-
$metadata: deserializeMetadata(output),
|
|
506
|
-
...contents,
|
|
507
|
-
};
|
|
508
|
-
return response;
|
|
509
|
-
};
|
|
510
|
-
exports.de_UpdateResourceCommand = de_UpdateResourceCommand;
|
|
511
|
-
const de_UpdateResourceCommandError = async (output, context) => {
|
|
512
|
-
const parsedOutput = {
|
|
513
|
-
...output,
|
|
514
|
-
body: await parseErrorBody(output.body, context),
|
|
515
|
-
};
|
|
516
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
517
|
-
switch (errorCode) {
|
|
518
|
-
case "AlreadyExistsException":
|
|
519
|
-
case "com.amazonaws.cloudcontrol#AlreadyExistsException":
|
|
520
|
-
throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
|
|
521
|
-
case "ClientTokenConflictException":
|
|
522
|
-
case "com.amazonaws.cloudcontrol#ClientTokenConflictException":
|
|
523
|
-
throw await de_ClientTokenConflictExceptionRes(parsedOutput, context);
|
|
524
|
-
case "ConcurrentOperationException":
|
|
525
|
-
case "com.amazonaws.cloudcontrol#ConcurrentOperationException":
|
|
526
|
-
throw await de_ConcurrentOperationExceptionRes(parsedOutput, context);
|
|
527
|
-
case "GeneralServiceException":
|
|
528
|
-
case "com.amazonaws.cloudcontrol#GeneralServiceException":
|
|
529
|
-
throw await de_GeneralServiceExceptionRes(parsedOutput, context);
|
|
530
|
-
case "HandlerFailureException":
|
|
531
|
-
case "com.amazonaws.cloudcontrol#HandlerFailureException":
|
|
532
|
-
throw await de_HandlerFailureExceptionRes(parsedOutput, context);
|
|
533
|
-
case "HandlerInternalFailureException":
|
|
534
|
-
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
|
|
535
|
-
throw await de_HandlerInternalFailureExceptionRes(parsedOutput, context);
|
|
536
|
-
case "InvalidCredentialsException":
|
|
537
|
-
case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
|
|
538
|
-
throw await de_InvalidCredentialsExceptionRes(parsedOutput, context);
|
|
539
|
-
case "InvalidRequestException":
|
|
540
|
-
case "com.amazonaws.cloudcontrol#InvalidRequestException":
|
|
541
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
542
|
-
case "NetworkFailureException":
|
|
543
|
-
case "com.amazonaws.cloudcontrol#NetworkFailureException":
|
|
544
|
-
throw await de_NetworkFailureExceptionRes(parsedOutput, context);
|
|
545
|
-
case "NotStabilizedException":
|
|
546
|
-
case "com.amazonaws.cloudcontrol#NotStabilizedException":
|
|
547
|
-
throw await de_NotStabilizedExceptionRes(parsedOutput, context);
|
|
548
|
-
case "NotUpdatableException":
|
|
549
|
-
case "com.amazonaws.cloudcontrol#NotUpdatableException":
|
|
550
|
-
throw await de_NotUpdatableExceptionRes(parsedOutput, context);
|
|
551
|
-
case "PrivateTypeException":
|
|
552
|
-
case "com.amazonaws.cloudcontrol#PrivateTypeException":
|
|
553
|
-
throw await de_PrivateTypeExceptionRes(parsedOutput, context);
|
|
554
|
-
case "ResourceConflictException":
|
|
555
|
-
case "com.amazonaws.cloudcontrol#ResourceConflictException":
|
|
556
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
557
|
-
case "ResourceNotFoundException":
|
|
558
|
-
case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
|
|
559
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
560
|
-
case "ServiceInternalErrorException":
|
|
561
|
-
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
|
|
562
|
-
throw await de_ServiceInternalErrorExceptionRes(parsedOutput, context);
|
|
563
|
-
case "ServiceLimitExceededException":
|
|
564
|
-
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
|
|
565
|
-
throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
|
|
566
|
-
case "ThrottlingException":
|
|
567
|
-
case "com.amazonaws.cloudcontrol#ThrottlingException":
|
|
568
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
569
|
-
case "TypeNotFoundException":
|
|
570
|
-
case "com.amazonaws.cloudcontrol#TypeNotFoundException":
|
|
571
|
-
throw await de_TypeNotFoundExceptionRes(parsedOutput, context);
|
|
572
|
-
case "UnsupportedActionException":
|
|
573
|
-
case "com.amazonaws.cloudcontrol#UnsupportedActionException":
|
|
574
|
-
throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
|
|
575
|
-
default:
|
|
576
|
-
const parsedBody = parsedOutput.body;
|
|
577
|
-
return throwDefaultError({
|
|
578
|
-
output,
|
|
579
|
-
parsedBody,
|
|
580
|
-
errorCode,
|
|
581
|
-
});
|
|
582
|
-
}
|
|
583
|
-
};
|
|
584
|
-
const de_AlreadyExistsExceptionRes = async (parsedOutput, context) => {
|
|
585
|
-
const body = parsedOutput.body;
|
|
586
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
587
|
-
const exception = new models_0_1.AlreadyExistsException({
|
|
588
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
589
|
-
...deserialized,
|
|
590
|
-
});
|
|
591
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
592
|
-
};
|
|
593
|
-
const de_ClientTokenConflictExceptionRes = async (parsedOutput, context) => {
|
|
594
|
-
const body = parsedOutput.body;
|
|
595
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
596
|
-
const exception = new models_0_1.ClientTokenConflictException({
|
|
597
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
598
|
-
...deserialized,
|
|
599
|
-
});
|
|
600
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
601
|
-
};
|
|
602
|
-
const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
603
|
-
const body = parsedOutput.body;
|
|
604
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
605
|
-
const exception = new models_0_1.ConcurrentModificationException({
|
|
606
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
607
|
-
...deserialized,
|
|
608
|
-
});
|
|
609
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
610
|
-
};
|
|
611
|
-
const de_ConcurrentOperationExceptionRes = async (parsedOutput, context) => {
|
|
612
|
-
const body = parsedOutput.body;
|
|
613
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
614
|
-
const exception = new models_0_1.ConcurrentOperationException({
|
|
615
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
616
|
-
...deserialized,
|
|
617
|
-
});
|
|
618
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
619
|
-
};
|
|
620
|
-
const de_GeneralServiceExceptionRes = async (parsedOutput, context) => {
|
|
621
|
-
const body = parsedOutput.body;
|
|
622
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
623
|
-
const exception = new models_0_1.GeneralServiceException({
|
|
624
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
625
|
-
...deserialized,
|
|
626
|
-
});
|
|
627
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
628
|
-
};
|
|
629
|
-
const de_HandlerFailureExceptionRes = async (parsedOutput, context) => {
|
|
630
|
-
const body = parsedOutput.body;
|
|
631
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
632
|
-
const exception = new models_0_1.HandlerFailureException({
|
|
633
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
634
|
-
...deserialized,
|
|
635
|
-
});
|
|
636
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
637
|
-
};
|
|
638
|
-
const de_HandlerInternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
639
|
-
const body = parsedOutput.body;
|
|
640
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
641
|
-
const exception = new models_0_1.HandlerInternalFailureException({
|
|
642
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
643
|
-
...deserialized,
|
|
644
|
-
});
|
|
645
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
646
|
-
};
|
|
647
|
-
const de_InvalidCredentialsExceptionRes = async (parsedOutput, context) => {
|
|
648
|
-
const body = parsedOutput.body;
|
|
649
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
650
|
-
const exception = new models_0_1.InvalidCredentialsException({
|
|
651
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
652
|
-
...deserialized,
|
|
653
|
-
});
|
|
654
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
655
|
-
};
|
|
656
|
-
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
657
|
-
const body = parsedOutput.body;
|
|
658
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
659
|
-
const exception = new models_0_1.InvalidRequestException({
|
|
660
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
661
|
-
...deserialized,
|
|
662
|
-
});
|
|
663
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
664
|
-
};
|
|
665
|
-
const de_NetworkFailureExceptionRes = async (parsedOutput, context) => {
|
|
666
|
-
const body = parsedOutput.body;
|
|
667
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
668
|
-
const exception = new models_0_1.NetworkFailureException({
|
|
669
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
670
|
-
...deserialized,
|
|
671
|
-
});
|
|
672
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
673
|
-
};
|
|
674
|
-
const de_NotStabilizedExceptionRes = async (parsedOutput, context) => {
|
|
675
|
-
const body = parsedOutput.body;
|
|
676
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
677
|
-
const exception = new models_0_1.NotStabilizedException({
|
|
678
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
679
|
-
...deserialized,
|
|
680
|
-
});
|
|
681
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
682
|
-
};
|
|
683
|
-
const de_NotUpdatableExceptionRes = async (parsedOutput, context) => {
|
|
684
|
-
const body = parsedOutput.body;
|
|
685
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
686
|
-
const exception = new models_0_1.NotUpdatableException({
|
|
687
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
688
|
-
...deserialized,
|
|
689
|
-
});
|
|
690
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
691
|
-
};
|
|
692
|
-
const de_PrivateTypeExceptionRes = async (parsedOutput, context) => {
|
|
693
|
-
const body = parsedOutput.body;
|
|
694
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
695
|
-
const exception = new models_0_1.PrivateTypeException({
|
|
696
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
697
|
-
...deserialized,
|
|
698
|
-
});
|
|
699
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
700
|
-
};
|
|
701
|
-
const de_RequestTokenNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
702
|
-
const body = parsedOutput.body;
|
|
703
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
704
|
-
const exception = new models_0_1.RequestTokenNotFoundException({
|
|
705
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
706
|
-
...deserialized,
|
|
707
|
-
});
|
|
708
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
709
|
-
};
|
|
710
|
-
const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
|
|
711
|
-
const body = parsedOutput.body;
|
|
712
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
713
|
-
const exception = new models_0_1.ResourceConflictException({
|
|
714
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
715
|
-
...deserialized,
|
|
716
|
-
});
|
|
717
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
718
|
-
};
|
|
719
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
720
|
-
const body = parsedOutput.body;
|
|
721
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
722
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
723
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
724
|
-
...deserialized,
|
|
725
|
-
});
|
|
726
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
727
|
-
};
|
|
728
|
-
const de_ServiceInternalErrorExceptionRes = async (parsedOutput, context) => {
|
|
729
|
-
const body = parsedOutput.body;
|
|
730
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
731
|
-
const exception = new models_0_1.ServiceInternalErrorException({
|
|
732
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
733
|
-
...deserialized,
|
|
734
|
-
});
|
|
735
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
736
|
-
};
|
|
737
|
-
const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
738
|
-
const body = parsedOutput.body;
|
|
739
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
740
|
-
const exception = new models_0_1.ServiceLimitExceededException({
|
|
741
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
742
|
-
...deserialized,
|
|
743
|
-
});
|
|
744
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
745
|
-
};
|
|
746
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
747
|
-
const body = parsedOutput.body;
|
|
748
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
749
|
-
const exception = new models_0_1.ThrottlingException({
|
|
750
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
751
|
-
...deserialized,
|
|
752
|
-
});
|
|
753
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
754
|
-
};
|
|
755
|
-
const de_TypeNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
756
|
-
const body = parsedOutput.body;
|
|
757
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
758
|
-
const exception = new models_0_1.TypeNotFoundException({
|
|
759
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
760
|
-
...deserialized,
|
|
761
|
-
});
|
|
762
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
763
|
-
};
|
|
764
|
-
const de_UnsupportedActionExceptionRes = async (parsedOutput, context) => {
|
|
765
|
-
const body = parsedOutput.body;
|
|
766
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
767
|
-
const exception = new models_0_1.UnsupportedActionException({
|
|
768
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
769
|
-
...deserialized,
|
|
770
|
-
});
|
|
771
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
772
|
-
};
|
|
773
|
-
const se_CreateResourceInput = (input, context) => {
|
|
774
|
-
return (0, smithy_client_1.take)(input, {
|
|
775
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
776
|
-
DesiredState: [],
|
|
777
|
-
RoleArn: [],
|
|
778
|
-
TypeName: [],
|
|
779
|
-
TypeVersionId: [],
|
|
780
|
-
});
|
|
781
|
-
};
|
|
782
|
-
const se_DeleteResourceInput = (input, context) => {
|
|
783
|
-
return (0, smithy_client_1.take)(input, {
|
|
784
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
785
|
-
Identifier: [],
|
|
786
|
-
RoleArn: [],
|
|
787
|
-
TypeName: [],
|
|
788
|
-
TypeVersionId: [],
|
|
789
|
-
});
|
|
790
|
-
};
|
|
791
|
-
const se_UpdateResourceInput = (input, context) => {
|
|
792
|
-
return (0, smithy_client_1.take)(input, {
|
|
793
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
794
|
-
Identifier: [],
|
|
795
|
-
PatchDocument: [],
|
|
796
|
-
RoleArn: [],
|
|
797
|
-
TypeName: [],
|
|
798
|
-
TypeVersionId: [],
|
|
799
|
-
});
|
|
800
|
-
};
|
|
801
|
-
const de_CancelResourceRequestOutput = (output, context) => {
|
|
802
|
-
return (0, smithy_client_1.take)(output, {
|
|
803
|
-
ProgressEvent: (_) => de_ProgressEvent(_, context),
|
|
804
|
-
});
|
|
805
|
-
};
|
|
806
|
-
const de_CreateResourceOutput = (output, context) => {
|
|
807
|
-
return (0, smithy_client_1.take)(output, {
|
|
808
|
-
ProgressEvent: (_) => de_ProgressEvent(_, context),
|
|
809
|
-
});
|
|
810
|
-
};
|
|
811
|
-
const de_DeleteResourceOutput = (output, context) => {
|
|
812
|
-
return (0, smithy_client_1.take)(output, {
|
|
813
|
-
ProgressEvent: (_) => de_ProgressEvent(_, context),
|
|
814
|
-
});
|
|
815
|
-
};
|
|
816
|
-
const de_GetResourceRequestStatusOutput = (output, context) => {
|
|
817
|
-
return (0, smithy_client_1.take)(output, {
|
|
818
|
-
ProgressEvent: (_) => de_ProgressEvent(_, context),
|
|
819
|
-
});
|
|
820
|
-
};
|
|
821
|
-
const de_ListResourceRequestsOutput = (output, context) => {
|
|
822
|
-
return (0, smithy_client_1.take)(output, {
|
|
823
|
-
NextToken: smithy_client_1.expectString,
|
|
824
|
-
ResourceRequestStatusSummaries: (_) => de_ResourceRequestStatusSummaries(_, context),
|
|
825
|
-
});
|
|
826
|
-
};
|
|
827
|
-
const de_ProgressEvent = (output, context) => {
|
|
828
|
-
return (0, smithy_client_1.take)(output, {
|
|
829
|
-
ErrorCode: smithy_client_1.expectString,
|
|
830
|
-
EventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
831
|
-
Identifier: smithy_client_1.expectString,
|
|
832
|
-
Operation: smithy_client_1.expectString,
|
|
833
|
-
OperationStatus: smithy_client_1.expectString,
|
|
834
|
-
RequestToken: smithy_client_1.expectString,
|
|
835
|
-
ResourceModel: smithy_client_1.expectString,
|
|
836
|
-
RetryAfter: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
837
|
-
StatusMessage: smithy_client_1.expectString,
|
|
838
|
-
TypeName: smithy_client_1.expectString,
|
|
839
|
-
});
|
|
840
|
-
};
|
|
841
|
-
const de_ResourceRequestStatusSummaries = (output, context) => {
|
|
842
|
-
const retVal = (output || [])
|
|
843
|
-
.filter((e) => e != null)
|
|
844
|
-
.map((entry) => {
|
|
845
|
-
return de_ProgressEvent(entry, context);
|
|
846
|
-
});
|
|
847
|
-
return retVal;
|
|
848
|
-
};
|
|
849
|
-
const de_UpdateResourceOutput = (output, context) => {
|
|
850
|
-
return (0, smithy_client_1.take)(output, {
|
|
851
|
-
ProgressEvent: (_) => de_ProgressEvent(_, context),
|
|
852
|
-
});
|
|
853
|
-
};
|
|
854
|
-
const deserializeMetadata = (output) => ({
|
|
855
|
-
httpStatusCode: output.statusCode,
|
|
856
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
857
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
858
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
859
|
-
});
|
|
860
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
861
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(CloudControlServiceException_1.CloudControlServiceException);
|
|
862
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
863
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
864
|
-
const contents = {
|
|
865
|
-
protocol,
|
|
866
|
-
hostname,
|
|
867
|
-
port,
|
|
868
|
-
method: "POST",
|
|
869
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
870
|
-
headers,
|
|
871
|
-
};
|
|
872
|
-
if (resolvedHostname !== undefined) {
|
|
873
|
-
contents.hostname = resolvedHostname;
|
|
874
|
-
}
|
|
875
|
-
if (body !== undefined) {
|
|
876
|
-
contents.body = body;
|
|
877
|
-
}
|
|
878
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
879
|
-
};
|
|
880
|
-
function sharedHeaders(operation) {
|
|
881
|
-
return {
|
|
882
|
-
"content-type": "application/x-amz-json-1.0",
|
|
883
|
-
"x-amz-target": `CloudApiService.${operation}`,
|
|
884
|
-
};
|
|
885
|
-
}
|
|
886
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
887
|
-
if (encoded.length) {
|
|
888
|
-
return JSON.parse(encoded);
|
|
889
|
-
}
|
|
890
|
-
return {};
|
|
891
|
-
});
|
|
892
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
893
|
-
const value = await parseBody(errorBody, context);
|
|
894
|
-
value.message = value.message ?? value.Message;
|
|
895
|
-
return value;
|
|
896
|
-
};
|
|
897
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
898
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
899
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
900
|
-
let cleanValue = rawValue;
|
|
901
|
-
if (typeof cleanValue === "number") {
|
|
902
|
-
cleanValue = cleanValue.toString();
|
|
903
|
-
}
|
|
904
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
905
|
-
cleanValue = cleanValue.split(",")[0];
|
|
906
|
-
}
|
|
907
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
908
|
-
cleanValue = cleanValue.split(":")[0];
|
|
909
|
-
}
|
|
910
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
911
|
-
cleanValue = cleanValue.split("#")[1];
|
|
912
|
-
}
|
|
913
|
-
return cleanValue;
|
|
914
|
-
};
|
|
915
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
916
|
-
if (headerKey !== undefined) {
|
|
917
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
918
|
-
}
|
|
919
|
-
if (data.code !== undefined) {
|
|
920
|
-
return sanitizeErrorCode(data.code);
|
|
921
|
-
}
|
|
922
|
-
if (data["__type"] !== undefined) {
|
|
923
|
-
return sanitizeErrorCode(data["__type"]);
|
|
924
|
-
}
|
|
925
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|