@aws-sdk/client-dlm 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/DLM.js +1 -27
- package/dist-cjs/DLMClient.js +1 -43
- package/dist-cjs/commands/CreateLifecyclePolicyCommand.js +1 -28
- package/dist-cjs/commands/DeleteLifecyclePolicyCommand.js +1 -28
- package/dist-cjs/commands/GetLifecyclePoliciesCommand.js +1 -28
- package/dist-cjs/commands/GetLifecyclePolicyCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateLifecyclePolicyCommand.js +1 -28
- 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 +1064 -10
- package/dist-cjs/models/DLMServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -130
- package/dist-cjs/protocols/Aws_restJson1.js +1 -587
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,587 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateLifecyclePolicyCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_GetLifecyclePolicyCommand = exports.de_GetLifecyclePoliciesCommand = exports.de_DeleteLifecyclePolicyCommand = exports.de_CreateLifecyclePolicyCommand = exports.se_UpdateLifecyclePolicyCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_GetLifecyclePolicyCommand = exports.se_GetLifecyclePoliciesCommand = exports.se_DeleteLifecyclePolicyCommand = exports.se_CreateLifecyclePolicyCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const DLMServiceException_1 = require("../models/DLMServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_CreateLifecyclePolicyCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/json",
|
|
12
|
-
};
|
|
13
|
-
b.bp("/policies");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
-
CopyTags: [],
|
|
17
|
-
CreateInterval: [],
|
|
18
|
-
CrossRegionCopyTargets: (_) => (0, smithy_client_1._json)(_),
|
|
19
|
-
DefaultPolicy: [],
|
|
20
|
-
Description: [],
|
|
21
|
-
Exclusions: (_) => (0, smithy_client_1._json)(_),
|
|
22
|
-
ExecutionRoleArn: [],
|
|
23
|
-
ExtendDeletion: [],
|
|
24
|
-
PolicyDetails: (_) => (0, smithy_client_1._json)(_),
|
|
25
|
-
RetainInterval: [],
|
|
26
|
-
State: [],
|
|
27
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
28
|
-
}));
|
|
29
|
-
b.m("POST").h(headers).b(body);
|
|
30
|
-
return b.build();
|
|
31
|
-
};
|
|
32
|
-
exports.se_CreateLifecyclePolicyCommand = se_CreateLifecyclePolicyCommand;
|
|
33
|
-
const se_DeleteLifecyclePolicyCommand = async (input, context) => {
|
|
34
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
35
|
-
const headers = {};
|
|
36
|
-
b.bp("/policies/{PolicyId}");
|
|
37
|
-
b.p("PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
38
|
-
let body;
|
|
39
|
-
b.m("DELETE").h(headers).b(body);
|
|
40
|
-
return b.build();
|
|
41
|
-
};
|
|
42
|
-
exports.se_DeleteLifecyclePolicyCommand = se_DeleteLifecyclePolicyCommand;
|
|
43
|
-
const se_GetLifecyclePoliciesCommand = async (input, context) => {
|
|
44
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
45
|
-
const headers = {};
|
|
46
|
-
b.bp("/policies");
|
|
47
|
-
const query = (0, smithy_client_1.map)({
|
|
48
|
-
[_pI]: [() => input.PolicyIds !== void 0, () => (input[_PI] || []).map((_entry) => _entry)],
|
|
49
|
-
[_s]: [, input[_S]],
|
|
50
|
-
[_rT]: [() => input.ResourceTypes !== void 0, () => (input[_RT] || []).map((_entry) => _entry)],
|
|
51
|
-
[_tT]: [() => input.TargetTags !== void 0, () => (input[_TT] || []).map((_entry) => _entry)],
|
|
52
|
-
[_tTA]: [() => input.TagsToAdd !== void 0, () => (input[_TTA] || []).map((_entry) => _entry)],
|
|
53
|
-
[_dPT]: [, input[_DPT]],
|
|
54
|
-
});
|
|
55
|
-
let body;
|
|
56
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
57
|
-
return b.build();
|
|
58
|
-
};
|
|
59
|
-
exports.se_GetLifecyclePoliciesCommand = se_GetLifecyclePoliciesCommand;
|
|
60
|
-
const se_GetLifecyclePolicyCommand = async (input, context) => {
|
|
61
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
62
|
-
const headers = {};
|
|
63
|
-
b.bp("/policies/{PolicyId}");
|
|
64
|
-
b.p("PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
65
|
-
let body;
|
|
66
|
-
b.m("GET").h(headers).b(body);
|
|
67
|
-
return b.build();
|
|
68
|
-
};
|
|
69
|
-
exports.se_GetLifecyclePolicyCommand = se_GetLifecyclePolicyCommand;
|
|
70
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
71
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
72
|
-
const headers = {};
|
|
73
|
-
b.bp("/tags/{ResourceArn}");
|
|
74
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
75
|
-
let body;
|
|
76
|
-
b.m("GET").h(headers).b(body);
|
|
77
|
-
return b.build();
|
|
78
|
-
};
|
|
79
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
80
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
81
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
82
|
-
const headers = {
|
|
83
|
-
"content-type": "application/json",
|
|
84
|
-
};
|
|
85
|
-
b.bp("/tags/{ResourceArn}");
|
|
86
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
87
|
-
let body;
|
|
88
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
89
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
90
|
-
}));
|
|
91
|
-
b.m("POST").h(headers).b(body);
|
|
92
|
-
return b.build();
|
|
93
|
-
};
|
|
94
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
95
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
96
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
97
|
-
const headers = {};
|
|
98
|
-
b.bp("/tags/{ResourceArn}");
|
|
99
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
100
|
-
const query = (0, smithy_client_1.map)({
|
|
101
|
-
[_tK]: [
|
|
102
|
-
(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
103
|
-
() => (input[_TK] || []).map((_entry) => _entry),
|
|
104
|
-
],
|
|
105
|
-
});
|
|
106
|
-
let body;
|
|
107
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
108
|
-
return b.build();
|
|
109
|
-
};
|
|
110
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
111
|
-
const se_UpdateLifecyclePolicyCommand = async (input, context) => {
|
|
112
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
113
|
-
const headers = {
|
|
114
|
-
"content-type": "application/json",
|
|
115
|
-
};
|
|
116
|
-
b.bp("/policies/{PolicyId}");
|
|
117
|
-
b.p("PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
118
|
-
let body;
|
|
119
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
120
|
-
CopyTags: [],
|
|
121
|
-
CreateInterval: [],
|
|
122
|
-
CrossRegionCopyTargets: (_) => (0, smithy_client_1._json)(_),
|
|
123
|
-
Description: [],
|
|
124
|
-
Exclusions: (_) => (0, smithy_client_1._json)(_),
|
|
125
|
-
ExecutionRoleArn: [],
|
|
126
|
-
ExtendDeletion: [],
|
|
127
|
-
PolicyDetails: (_) => (0, smithy_client_1._json)(_),
|
|
128
|
-
RetainInterval: [],
|
|
129
|
-
State: [],
|
|
130
|
-
}));
|
|
131
|
-
b.m("PATCH").h(headers).b(body);
|
|
132
|
-
return b.build();
|
|
133
|
-
};
|
|
134
|
-
exports.se_UpdateLifecyclePolicyCommand = se_UpdateLifecyclePolicyCommand;
|
|
135
|
-
const de_CreateLifecyclePolicyCommand = async (output, context) => {
|
|
136
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
137
|
-
return de_CreateLifecyclePolicyCommandError(output, context);
|
|
138
|
-
}
|
|
139
|
-
const contents = (0, smithy_client_1.map)({
|
|
140
|
-
$metadata: deserializeMetadata(output),
|
|
141
|
-
});
|
|
142
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
143
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
144
|
-
PolicyId: smithy_client_1.expectString,
|
|
145
|
-
});
|
|
146
|
-
Object.assign(contents, doc);
|
|
147
|
-
return contents;
|
|
148
|
-
};
|
|
149
|
-
exports.de_CreateLifecyclePolicyCommand = de_CreateLifecyclePolicyCommand;
|
|
150
|
-
const de_CreateLifecyclePolicyCommandError = async (output, context) => {
|
|
151
|
-
const parsedOutput = {
|
|
152
|
-
...output,
|
|
153
|
-
body: await parseErrorBody(output.body, context),
|
|
154
|
-
};
|
|
155
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
156
|
-
switch (errorCode) {
|
|
157
|
-
case "InternalServerException":
|
|
158
|
-
case "com.amazonaws.dlm#InternalServerException":
|
|
159
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
160
|
-
case "InvalidRequestException":
|
|
161
|
-
case "com.amazonaws.dlm#InvalidRequestException":
|
|
162
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
163
|
-
case "LimitExceededException":
|
|
164
|
-
case "com.amazonaws.dlm#LimitExceededException":
|
|
165
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
166
|
-
default:
|
|
167
|
-
const parsedBody = parsedOutput.body;
|
|
168
|
-
return throwDefaultError({
|
|
169
|
-
output,
|
|
170
|
-
parsedBody,
|
|
171
|
-
errorCode,
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
const de_DeleteLifecyclePolicyCommand = async (output, context) => {
|
|
176
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
177
|
-
return de_DeleteLifecyclePolicyCommandError(output, context);
|
|
178
|
-
}
|
|
179
|
-
const contents = (0, smithy_client_1.map)({
|
|
180
|
-
$metadata: deserializeMetadata(output),
|
|
181
|
-
});
|
|
182
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
183
|
-
return contents;
|
|
184
|
-
};
|
|
185
|
-
exports.de_DeleteLifecyclePolicyCommand = de_DeleteLifecyclePolicyCommand;
|
|
186
|
-
const de_DeleteLifecyclePolicyCommandError = async (output, context) => {
|
|
187
|
-
const parsedOutput = {
|
|
188
|
-
...output,
|
|
189
|
-
body: await parseErrorBody(output.body, context),
|
|
190
|
-
};
|
|
191
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
192
|
-
switch (errorCode) {
|
|
193
|
-
case "InternalServerException":
|
|
194
|
-
case "com.amazonaws.dlm#InternalServerException":
|
|
195
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
196
|
-
case "LimitExceededException":
|
|
197
|
-
case "com.amazonaws.dlm#LimitExceededException":
|
|
198
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
199
|
-
case "ResourceNotFoundException":
|
|
200
|
-
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
201
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
202
|
-
default:
|
|
203
|
-
const parsedBody = parsedOutput.body;
|
|
204
|
-
return throwDefaultError({
|
|
205
|
-
output,
|
|
206
|
-
parsedBody,
|
|
207
|
-
errorCode,
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
const de_GetLifecyclePoliciesCommand = async (output, context) => {
|
|
212
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
213
|
-
return de_GetLifecyclePoliciesCommandError(output, context);
|
|
214
|
-
}
|
|
215
|
-
const contents = (0, smithy_client_1.map)({
|
|
216
|
-
$metadata: deserializeMetadata(output),
|
|
217
|
-
});
|
|
218
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
219
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
220
|
-
Policies: smithy_client_1._json,
|
|
221
|
-
});
|
|
222
|
-
Object.assign(contents, doc);
|
|
223
|
-
return contents;
|
|
224
|
-
};
|
|
225
|
-
exports.de_GetLifecyclePoliciesCommand = de_GetLifecyclePoliciesCommand;
|
|
226
|
-
const de_GetLifecyclePoliciesCommandError = async (output, context) => {
|
|
227
|
-
const parsedOutput = {
|
|
228
|
-
...output,
|
|
229
|
-
body: await parseErrorBody(output.body, context),
|
|
230
|
-
};
|
|
231
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
232
|
-
switch (errorCode) {
|
|
233
|
-
case "InternalServerException":
|
|
234
|
-
case "com.amazonaws.dlm#InternalServerException":
|
|
235
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
236
|
-
case "InvalidRequestException":
|
|
237
|
-
case "com.amazonaws.dlm#InvalidRequestException":
|
|
238
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
239
|
-
case "LimitExceededException":
|
|
240
|
-
case "com.amazonaws.dlm#LimitExceededException":
|
|
241
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
242
|
-
case "ResourceNotFoundException":
|
|
243
|
-
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
244
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
245
|
-
default:
|
|
246
|
-
const parsedBody = parsedOutput.body;
|
|
247
|
-
return throwDefaultError({
|
|
248
|
-
output,
|
|
249
|
-
parsedBody,
|
|
250
|
-
errorCode,
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
const de_GetLifecyclePolicyCommand = async (output, context) => {
|
|
255
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
256
|
-
return de_GetLifecyclePolicyCommandError(output, context);
|
|
257
|
-
}
|
|
258
|
-
const contents = (0, smithy_client_1.map)({
|
|
259
|
-
$metadata: deserializeMetadata(output),
|
|
260
|
-
});
|
|
261
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
262
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
263
|
-
Policy: (_) => de_LifecyclePolicy(_, context),
|
|
264
|
-
});
|
|
265
|
-
Object.assign(contents, doc);
|
|
266
|
-
return contents;
|
|
267
|
-
};
|
|
268
|
-
exports.de_GetLifecyclePolicyCommand = de_GetLifecyclePolicyCommand;
|
|
269
|
-
const de_GetLifecyclePolicyCommandError = async (output, context) => {
|
|
270
|
-
const parsedOutput = {
|
|
271
|
-
...output,
|
|
272
|
-
body: await parseErrorBody(output.body, context),
|
|
273
|
-
};
|
|
274
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
275
|
-
switch (errorCode) {
|
|
276
|
-
case "InternalServerException":
|
|
277
|
-
case "com.amazonaws.dlm#InternalServerException":
|
|
278
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
279
|
-
case "LimitExceededException":
|
|
280
|
-
case "com.amazonaws.dlm#LimitExceededException":
|
|
281
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
282
|
-
case "ResourceNotFoundException":
|
|
283
|
-
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
284
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
285
|
-
default:
|
|
286
|
-
const parsedBody = parsedOutput.body;
|
|
287
|
-
return throwDefaultError({
|
|
288
|
-
output,
|
|
289
|
-
parsedBody,
|
|
290
|
-
errorCode,
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
295
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
296
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
297
|
-
}
|
|
298
|
-
const contents = (0, smithy_client_1.map)({
|
|
299
|
-
$metadata: deserializeMetadata(output),
|
|
300
|
-
});
|
|
301
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
302
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
303
|
-
Tags: smithy_client_1._json,
|
|
304
|
-
});
|
|
305
|
-
Object.assign(contents, doc);
|
|
306
|
-
return contents;
|
|
307
|
-
};
|
|
308
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
309
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
310
|
-
const parsedOutput = {
|
|
311
|
-
...output,
|
|
312
|
-
body: await parseErrorBody(output.body, context),
|
|
313
|
-
};
|
|
314
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
315
|
-
switch (errorCode) {
|
|
316
|
-
case "InternalServerException":
|
|
317
|
-
case "com.amazonaws.dlm#InternalServerException":
|
|
318
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
319
|
-
case "InvalidRequestException":
|
|
320
|
-
case "com.amazonaws.dlm#InvalidRequestException":
|
|
321
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
322
|
-
case "ResourceNotFoundException":
|
|
323
|
-
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
324
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
325
|
-
default:
|
|
326
|
-
const parsedBody = parsedOutput.body;
|
|
327
|
-
return throwDefaultError({
|
|
328
|
-
output,
|
|
329
|
-
parsedBody,
|
|
330
|
-
errorCode,
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
335
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
336
|
-
return de_TagResourceCommandError(output, context);
|
|
337
|
-
}
|
|
338
|
-
const contents = (0, smithy_client_1.map)({
|
|
339
|
-
$metadata: deserializeMetadata(output),
|
|
340
|
-
});
|
|
341
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
342
|
-
return contents;
|
|
343
|
-
};
|
|
344
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
345
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
346
|
-
const parsedOutput = {
|
|
347
|
-
...output,
|
|
348
|
-
body: await parseErrorBody(output.body, context),
|
|
349
|
-
};
|
|
350
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
351
|
-
switch (errorCode) {
|
|
352
|
-
case "InternalServerException":
|
|
353
|
-
case "com.amazonaws.dlm#InternalServerException":
|
|
354
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
355
|
-
case "InvalidRequestException":
|
|
356
|
-
case "com.amazonaws.dlm#InvalidRequestException":
|
|
357
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
358
|
-
case "ResourceNotFoundException":
|
|
359
|
-
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
360
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
361
|
-
default:
|
|
362
|
-
const parsedBody = parsedOutput.body;
|
|
363
|
-
return throwDefaultError({
|
|
364
|
-
output,
|
|
365
|
-
parsedBody,
|
|
366
|
-
errorCode,
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
};
|
|
370
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
371
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
372
|
-
return de_UntagResourceCommandError(output, context);
|
|
373
|
-
}
|
|
374
|
-
const contents = (0, smithy_client_1.map)({
|
|
375
|
-
$metadata: deserializeMetadata(output),
|
|
376
|
-
});
|
|
377
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
378
|
-
return contents;
|
|
379
|
-
};
|
|
380
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
381
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
382
|
-
const parsedOutput = {
|
|
383
|
-
...output,
|
|
384
|
-
body: await parseErrorBody(output.body, context),
|
|
385
|
-
};
|
|
386
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
387
|
-
switch (errorCode) {
|
|
388
|
-
case "InternalServerException":
|
|
389
|
-
case "com.amazonaws.dlm#InternalServerException":
|
|
390
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
391
|
-
case "InvalidRequestException":
|
|
392
|
-
case "com.amazonaws.dlm#InvalidRequestException":
|
|
393
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
394
|
-
case "ResourceNotFoundException":
|
|
395
|
-
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
396
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
397
|
-
default:
|
|
398
|
-
const parsedBody = parsedOutput.body;
|
|
399
|
-
return throwDefaultError({
|
|
400
|
-
output,
|
|
401
|
-
parsedBody,
|
|
402
|
-
errorCode,
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
const de_UpdateLifecyclePolicyCommand = async (output, context) => {
|
|
407
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
408
|
-
return de_UpdateLifecyclePolicyCommandError(output, context);
|
|
409
|
-
}
|
|
410
|
-
const contents = (0, smithy_client_1.map)({
|
|
411
|
-
$metadata: deserializeMetadata(output),
|
|
412
|
-
});
|
|
413
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
414
|
-
return contents;
|
|
415
|
-
};
|
|
416
|
-
exports.de_UpdateLifecyclePolicyCommand = de_UpdateLifecyclePolicyCommand;
|
|
417
|
-
const de_UpdateLifecyclePolicyCommandError = async (output, context) => {
|
|
418
|
-
const parsedOutput = {
|
|
419
|
-
...output,
|
|
420
|
-
body: await parseErrorBody(output.body, context),
|
|
421
|
-
};
|
|
422
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
423
|
-
switch (errorCode) {
|
|
424
|
-
case "InternalServerException":
|
|
425
|
-
case "com.amazonaws.dlm#InternalServerException":
|
|
426
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
427
|
-
case "InvalidRequestException":
|
|
428
|
-
case "com.amazonaws.dlm#InvalidRequestException":
|
|
429
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
430
|
-
case "LimitExceededException":
|
|
431
|
-
case "com.amazonaws.dlm#LimitExceededException":
|
|
432
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
433
|
-
case "ResourceNotFoundException":
|
|
434
|
-
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
435
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
436
|
-
default:
|
|
437
|
-
const parsedBody = parsedOutput.body;
|
|
438
|
-
return throwDefaultError({
|
|
439
|
-
output,
|
|
440
|
-
parsedBody,
|
|
441
|
-
errorCode,
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(DLMServiceException_1.DLMServiceException);
|
|
446
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
447
|
-
const contents = (0, smithy_client_1.map)({});
|
|
448
|
-
const data = parsedOutput.body;
|
|
449
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
450
|
-
Code: smithy_client_1.expectString,
|
|
451
|
-
Message: smithy_client_1.expectString,
|
|
452
|
-
});
|
|
453
|
-
Object.assign(contents, doc);
|
|
454
|
-
const exception = new models_0_1.InternalServerException({
|
|
455
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
456
|
-
...contents,
|
|
457
|
-
});
|
|
458
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
459
|
-
};
|
|
460
|
-
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
461
|
-
const contents = (0, smithy_client_1.map)({});
|
|
462
|
-
const data = parsedOutput.body;
|
|
463
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
464
|
-
Code: smithy_client_1.expectString,
|
|
465
|
-
Message: smithy_client_1.expectString,
|
|
466
|
-
MutuallyExclusiveParameters: smithy_client_1._json,
|
|
467
|
-
RequiredParameters: smithy_client_1._json,
|
|
468
|
-
});
|
|
469
|
-
Object.assign(contents, doc);
|
|
470
|
-
const exception = new models_0_1.InvalidRequestException({
|
|
471
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
472
|
-
...contents,
|
|
473
|
-
});
|
|
474
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
475
|
-
};
|
|
476
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
477
|
-
const contents = (0, smithy_client_1.map)({});
|
|
478
|
-
const data = parsedOutput.body;
|
|
479
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
480
|
-
Code: smithy_client_1.expectString,
|
|
481
|
-
Message: smithy_client_1.expectString,
|
|
482
|
-
ResourceType: smithy_client_1.expectString,
|
|
483
|
-
});
|
|
484
|
-
Object.assign(contents, doc);
|
|
485
|
-
const exception = new models_0_1.LimitExceededException({
|
|
486
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
487
|
-
...contents,
|
|
488
|
-
});
|
|
489
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
490
|
-
};
|
|
491
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
492
|
-
const contents = (0, smithy_client_1.map)({});
|
|
493
|
-
const data = parsedOutput.body;
|
|
494
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
495
|
-
Code: smithy_client_1.expectString,
|
|
496
|
-
Message: smithy_client_1.expectString,
|
|
497
|
-
ResourceIds: smithy_client_1._json,
|
|
498
|
-
ResourceType: smithy_client_1.expectString,
|
|
499
|
-
});
|
|
500
|
-
Object.assign(contents, doc);
|
|
501
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
502
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
503
|
-
...contents,
|
|
504
|
-
});
|
|
505
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
506
|
-
};
|
|
507
|
-
const de_LifecyclePolicy = (output, context) => {
|
|
508
|
-
return (0, smithy_client_1.take)(output, {
|
|
509
|
-
DateCreated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
510
|
-
DateModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
511
|
-
DefaultPolicy: smithy_client_1.expectBoolean,
|
|
512
|
-
Description: smithy_client_1.expectString,
|
|
513
|
-
ExecutionRoleArn: smithy_client_1.expectString,
|
|
514
|
-
PolicyArn: smithy_client_1.expectString,
|
|
515
|
-
PolicyDetails: smithy_client_1._json,
|
|
516
|
-
PolicyId: smithy_client_1.expectString,
|
|
517
|
-
State: smithy_client_1.expectString,
|
|
518
|
-
StatusMessage: smithy_client_1.expectString,
|
|
519
|
-
Tags: smithy_client_1._json,
|
|
520
|
-
});
|
|
521
|
-
};
|
|
522
|
-
const deserializeMetadata = (output) => ({
|
|
523
|
-
httpStatusCode: output.statusCode,
|
|
524
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
525
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
526
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
527
|
-
});
|
|
528
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
529
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
530
|
-
value !== null &&
|
|
531
|
-
value !== "" &&
|
|
532
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
533
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
534
|
-
const _DPT = "DefaultPolicyType";
|
|
535
|
-
const _PI = "PolicyIds";
|
|
536
|
-
const _RT = "ResourceTypes";
|
|
537
|
-
const _S = "State";
|
|
538
|
-
const _TK = "TagKeys";
|
|
539
|
-
const _TT = "TargetTags";
|
|
540
|
-
const _TTA = "TagsToAdd";
|
|
541
|
-
const _dPT = "defaultPolicyType";
|
|
542
|
-
const _pI = "policyIds";
|
|
543
|
-
const _rT = "resourceTypes";
|
|
544
|
-
const _s = "state";
|
|
545
|
-
const _tK = "tagKeys";
|
|
546
|
-
const _tT = "targetTags";
|
|
547
|
-
const _tTA = "tagsToAdd";
|
|
548
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
549
|
-
if (encoded.length) {
|
|
550
|
-
return JSON.parse(encoded);
|
|
551
|
-
}
|
|
552
|
-
return {};
|
|
553
|
-
});
|
|
554
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
555
|
-
const value = await parseBody(errorBody, context);
|
|
556
|
-
value.message = value.message ?? value.Message;
|
|
557
|
-
return value;
|
|
558
|
-
};
|
|
559
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
560
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
561
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
562
|
-
let cleanValue = rawValue;
|
|
563
|
-
if (typeof cleanValue === "number") {
|
|
564
|
-
cleanValue = cleanValue.toString();
|
|
565
|
-
}
|
|
566
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
567
|
-
cleanValue = cleanValue.split(",")[0];
|
|
568
|
-
}
|
|
569
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
570
|
-
cleanValue = cleanValue.split(":")[0];
|
|
571
|
-
}
|
|
572
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
573
|
-
cleanValue = cleanValue.split("#")[1];
|
|
574
|
-
}
|
|
575
|
-
return cleanValue;
|
|
576
|
-
};
|
|
577
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
578
|
-
if (headerKey !== undefined) {
|
|
579
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
580
|
-
}
|
|
581
|
-
if (data.code !== undefined) {
|
|
582
|
-
return sanitizeErrorCode(data.code);
|
|
583
|
-
}
|
|
584
|
-
if (data["__type"] !== undefined) {
|
|
585
|
-
return sanitizeErrorCode(data["__type"]);
|
|
586
|
-
}
|
|
587
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
-
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const asPartial = (t) => t;
|
|
8
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
|
-
const extensionConfiguration = {
|
|
10
|
-
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
11
|
-
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
12
|
-
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
13
|
-
};
|
|
14
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
15
|
-
return {
|
|
16
|
-
...runtimeConfig,
|
|
17
|
-
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
18
|
-
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
19
|
-
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
|
1
|
+
module.exports = require("./index.js");
|