@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
package/dist-cjs/index.js
CHANGED
|
@@ -1,11 +1,1065 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
CreateLifecyclePolicyCommand: () => CreateLifecyclePolicyCommand,
|
|
25
|
+
DLM: () => DLM,
|
|
26
|
+
DLMClient: () => DLMClient,
|
|
27
|
+
DLMServiceException: () => DLMServiceException,
|
|
28
|
+
DefaultPoliciesTypeValues: () => DefaultPoliciesTypeValues,
|
|
29
|
+
DefaultPolicyTypeValues: () => DefaultPolicyTypeValues,
|
|
30
|
+
DeleteLifecyclePolicyCommand: () => DeleteLifecyclePolicyCommand,
|
|
31
|
+
EventSourceValues: () => EventSourceValues,
|
|
32
|
+
EventTypeValues: () => EventTypeValues,
|
|
33
|
+
ExecutionHandlerServiceValues: () => ExecutionHandlerServiceValues,
|
|
34
|
+
GetLifecyclePoliciesCommand: () => GetLifecyclePoliciesCommand,
|
|
35
|
+
GetLifecyclePolicyCommand: () => GetLifecyclePolicyCommand,
|
|
36
|
+
GettablePolicyStateValues: () => GettablePolicyStateValues,
|
|
37
|
+
InternalServerException: () => InternalServerException,
|
|
38
|
+
IntervalUnitValues: () => IntervalUnitValues,
|
|
39
|
+
InvalidRequestException: () => InvalidRequestException,
|
|
40
|
+
LimitExceededException: () => LimitExceededException,
|
|
41
|
+
ListTagsForResourceCommand: () => ListTagsForResourceCommand,
|
|
42
|
+
LocationValues: () => LocationValues,
|
|
43
|
+
PolicyLanguageValues: () => PolicyLanguageValues,
|
|
44
|
+
PolicyTypeValues: () => PolicyTypeValues,
|
|
45
|
+
ResourceLocationValues: () => ResourceLocationValues,
|
|
46
|
+
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
47
|
+
ResourceTypeValues: () => ResourceTypeValues,
|
|
48
|
+
RetentionIntervalUnitValues: () => RetentionIntervalUnitValues,
|
|
49
|
+
SettablePolicyStateValues: () => SettablePolicyStateValues,
|
|
50
|
+
StageValues: () => StageValues,
|
|
51
|
+
TagResourceCommand: () => TagResourceCommand,
|
|
52
|
+
UntagResourceCommand: () => UntagResourceCommand,
|
|
53
|
+
UpdateLifecyclePolicyCommand: () => UpdateLifecyclePolicyCommand,
|
|
54
|
+
__Client: () => import_smithy_client.Client
|
|
55
|
+
});
|
|
56
|
+
module.exports = __toCommonJS(src_exports);
|
|
57
|
+
|
|
58
|
+
// src/DLMClient.ts
|
|
59
|
+
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
60
|
+
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
61
|
+
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
62
|
+
var import_middleware_signing = require("@aws-sdk/middleware-signing");
|
|
63
|
+
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
64
|
+
var import_config_resolver = require("@smithy/config-resolver");
|
|
65
|
+
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
66
|
+
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
67
|
+
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
// src/endpoint/EndpointParameters.ts
|
|
71
|
+
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
72
|
+
return {
|
|
73
|
+
...options,
|
|
74
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
75
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
76
|
+
defaultSigningName: "dlm"
|
|
77
|
+
};
|
|
78
|
+
}, "resolveClientEndpointParameters");
|
|
79
|
+
var commonParams = {
|
|
80
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
81
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
82
|
+
Region: { type: "builtInParams", name: "region" },
|
|
83
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
// src/DLMClient.ts
|
|
87
|
+
var import_runtimeConfig = require("././runtimeConfig");
|
|
88
|
+
|
|
89
|
+
// src/runtimeExtensions.ts
|
|
90
|
+
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
|
|
91
|
+
var import_protocol_http = require("@smithy/protocol-http");
|
|
92
|
+
var import_smithy_client = require("@smithy/smithy-client");
|
|
93
|
+
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
94
|
+
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
95
|
+
const extensionConfiguration = {
|
|
96
|
+
...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
97
|
+
...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
98
|
+
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
|
|
99
|
+
};
|
|
100
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
101
|
+
return {
|
|
102
|
+
...runtimeConfig,
|
|
103
|
+
...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
104
|
+
...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
105
|
+
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
|
|
106
|
+
};
|
|
107
|
+
}, "resolveRuntimeExtensions");
|
|
108
|
+
|
|
109
|
+
// src/DLMClient.ts
|
|
110
|
+
var _DLMClient = class _DLMClient extends import_smithy_client.Client {
|
|
111
|
+
constructor(...[configuration]) {
|
|
112
|
+
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
113
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
114
|
+
const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
|
|
115
|
+
const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
|
|
116
|
+
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
|
|
117
|
+
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
118
|
+
const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
|
|
119
|
+
const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
|
|
120
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
|
|
121
|
+
super(_config_8);
|
|
122
|
+
this.config = _config_8;
|
|
123
|
+
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
124
|
+
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
125
|
+
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
126
|
+
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
127
|
+
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
128
|
+
this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
|
|
129
|
+
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
133
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
134
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
135
|
+
*/
|
|
136
|
+
destroy() {
|
|
137
|
+
super.destroy();
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
__name(_DLMClient, "DLMClient");
|
|
141
|
+
var DLMClient = _DLMClient;
|
|
142
|
+
|
|
143
|
+
// src/DLM.ts
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
// src/commands/CreateLifecyclePolicyCommand.ts
|
|
147
|
+
|
|
148
|
+
var import_middleware_serde = require("@smithy/middleware-serde");
|
|
149
|
+
|
|
150
|
+
var import_types = require("@smithy/types");
|
|
151
|
+
|
|
152
|
+
// src/protocols/Aws_restJson1.ts
|
|
153
|
+
var import_core = require("@smithy/core");
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
// src/models/DLMServiceException.ts
|
|
157
|
+
|
|
158
|
+
var _DLMServiceException = class _DLMServiceException extends import_smithy_client.ServiceException {
|
|
159
|
+
/**
|
|
160
|
+
* @internal
|
|
161
|
+
*/
|
|
162
|
+
constructor(options) {
|
|
163
|
+
super(options);
|
|
164
|
+
Object.setPrototypeOf(this, _DLMServiceException.prototype);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
__name(_DLMServiceException, "DLMServiceException");
|
|
168
|
+
var DLMServiceException = _DLMServiceException;
|
|
169
|
+
|
|
170
|
+
// src/models/models_0.ts
|
|
171
|
+
var RetentionIntervalUnitValues = {
|
|
172
|
+
DAYS: "DAYS",
|
|
173
|
+
MONTHS: "MONTHS",
|
|
174
|
+
WEEKS: "WEEKS",
|
|
175
|
+
YEARS: "YEARS"
|
|
176
|
+
};
|
|
177
|
+
var DefaultPolicyTypeValues = {
|
|
178
|
+
INSTANCE: "INSTANCE",
|
|
179
|
+
VOLUME: "VOLUME"
|
|
180
|
+
};
|
|
181
|
+
var EventTypeValues = {
|
|
182
|
+
SHARE_SNAPSHOT: "shareSnapshot"
|
|
183
|
+
};
|
|
184
|
+
var EventSourceValues = {
|
|
185
|
+
MANAGED_CWE: "MANAGED_CWE"
|
|
186
|
+
};
|
|
187
|
+
var PolicyLanguageValues = {
|
|
188
|
+
SIMPLIFIED: "SIMPLIFIED",
|
|
189
|
+
STANDARD: "STANDARD"
|
|
190
|
+
};
|
|
191
|
+
var PolicyTypeValues = {
|
|
192
|
+
EBS_SNAPSHOT_MANAGEMENT: "EBS_SNAPSHOT_MANAGEMENT",
|
|
193
|
+
EVENT_BASED_POLICY: "EVENT_BASED_POLICY",
|
|
194
|
+
IMAGE_MANAGEMENT: "IMAGE_MANAGEMENT"
|
|
195
|
+
};
|
|
196
|
+
var ResourceLocationValues = {
|
|
197
|
+
CLOUD: "CLOUD",
|
|
198
|
+
OUTPOST: "OUTPOST"
|
|
199
|
+
};
|
|
200
|
+
var ResourceTypeValues = {
|
|
201
|
+
INSTANCE: "INSTANCE",
|
|
202
|
+
VOLUME: "VOLUME"
|
|
203
|
+
};
|
|
204
|
+
var IntervalUnitValues = {
|
|
205
|
+
HOURS: "HOURS"
|
|
206
|
+
};
|
|
207
|
+
var LocationValues = {
|
|
208
|
+
CLOUD: "CLOUD",
|
|
209
|
+
OUTPOST_LOCAL: "OUTPOST_LOCAL"
|
|
210
|
+
};
|
|
211
|
+
var ExecutionHandlerServiceValues = {
|
|
212
|
+
AWS_SYSTEMS_MANAGER: "AWS_SYSTEMS_MANAGER"
|
|
213
|
+
};
|
|
214
|
+
var StageValues = {
|
|
215
|
+
POST: "POST",
|
|
216
|
+
PRE: "PRE"
|
|
217
|
+
};
|
|
218
|
+
var SettablePolicyStateValues = {
|
|
219
|
+
DISABLED: "DISABLED",
|
|
220
|
+
ENABLED: "ENABLED"
|
|
221
|
+
};
|
|
222
|
+
var _InternalServerException = class _InternalServerException extends DLMServiceException {
|
|
223
|
+
/**
|
|
224
|
+
* @internal
|
|
225
|
+
*/
|
|
226
|
+
constructor(opts) {
|
|
227
|
+
super({
|
|
228
|
+
name: "InternalServerException",
|
|
229
|
+
$fault: "server",
|
|
230
|
+
...opts
|
|
231
|
+
});
|
|
232
|
+
this.name = "InternalServerException";
|
|
233
|
+
this.$fault = "server";
|
|
234
|
+
Object.setPrototypeOf(this, _InternalServerException.prototype);
|
|
235
|
+
this.Message = opts.Message;
|
|
236
|
+
this.Code = opts.Code;
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
__name(_InternalServerException, "InternalServerException");
|
|
240
|
+
var InternalServerException = _InternalServerException;
|
|
241
|
+
var _InvalidRequestException = class _InvalidRequestException extends DLMServiceException {
|
|
242
|
+
/**
|
|
243
|
+
* @internal
|
|
244
|
+
*/
|
|
245
|
+
constructor(opts) {
|
|
246
|
+
super({
|
|
247
|
+
name: "InvalidRequestException",
|
|
248
|
+
$fault: "client",
|
|
249
|
+
...opts
|
|
250
|
+
});
|
|
251
|
+
this.name = "InvalidRequestException";
|
|
252
|
+
this.$fault = "client";
|
|
253
|
+
Object.setPrototypeOf(this, _InvalidRequestException.prototype);
|
|
254
|
+
this.Message = opts.Message;
|
|
255
|
+
this.Code = opts.Code;
|
|
256
|
+
this.RequiredParameters = opts.RequiredParameters;
|
|
257
|
+
this.MutuallyExclusiveParameters = opts.MutuallyExclusiveParameters;
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
__name(_InvalidRequestException, "InvalidRequestException");
|
|
261
|
+
var InvalidRequestException = _InvalidRequestException;
|
|
262
|
+
var _LimitExceededException = class _LimitExceededException extends DLMServiceException {
|
|
263
|
+
/**
|
|
264
|
+
* @internal
|
|
265
|
+
*/
|
|
266
|
+
constructor(opts) {
|
|
267
|
+
super({
|
|
268
|
+
name: "LimitExceededException",
|
|
269
|
+
$fault: "client",
|
|
270
|
+
...opts
|
|
271
|
+
});
|
|
272
|
+
this.name = "LimitExceededException";
|
|
273
|
+
this.$fault = "client";
|
|
274
|
+
Object.setPrototypeOf(this, _LimitExceededException.prototype);
|
|
275
|
+
this.Message = opts.Message;
|
|
276
|
+
this.Code = opts.Code;
|
|
277
|
+
this.ResourceType = opts.ResourceType;
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
__name(_LimitExceededException, "LimitExceededException");
|
|
281
|
+
var LimitExceededException = _LimitExceededException;
|
|
282
|
+
var DefaultPoliciesTypeValues = {
|
|
283
|
+
ALL: "ALL",
|
|
284
|
+
INSTANCE: "INSTANCE",
|
|
285
|
+
VOLUME: "VOLUME"
|
|
286
|
+
};
|
|
287
|
+
var _ResourceNotFoundException = class _ResourceNotFoundException extends DLMServiceException {
|
|
288
|
+
/**
|
|
289
|
+
* @internal
|
|
290
|
+
*/
|
|
291
|
+
constructor(opts) {
|
|
292
|
+
super({
|
|
293
|
+
name: "ResourceNotFoundException",
|
|
294
|
+
$fault: "client",
|
|
295
|
+
...opts
|
|
296
|
+
});
|
|
297
|
+
this.name = "ResourceNotFoundException";
|
|
298
|
+
this.$fault = "client";
|
|
299
|
+
Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
|
|
300
|
+
this.Message = opts.Message;
|
|
301
|
+
this.Code = opts.Code;
|
|
302
|
+
this.ResourceType = opts.ResourceType;
|
|
303
|
+
this.ResourceIds = opts.ResourceIds;
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
__name(_ResourceNotFoundException, "ResourceNotFoundException");
|
|
307
|
+
var ResourceNotFoundException = _ResourceNotFoundException;
|
|
308
|
+
var GettablePolicyStateValues = {
|
|
309
|
+
DISABLED: "DISABLED",
|
|
310
|
+
ENABLED: "ENABLED",
|
|
311
|
+
ERROR: "ERROR"
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
// src/protocols/Aws_restJson1.ts
|
|
315
|
+
var se_CreateLifecyclePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
316
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
317
|
+
const headers = {
|
|
318
|
+
"content-type": "application/json"
|
|
319
|
+
};
|
|
320
|
+
b.bp("/policies");
|
|
321
|
+
let body;
|
|
322
|
+
body = JSON.stringify(
|
|
323
|
+
(0, import_smithy_client.take)(input, {
|
|
324
|
+
CopyTags: [],
|
|
325
|
+
CreateInterval: [],
|
|
326
|
+
CrossRegionCopyTargets: (_) => (0, import_smithy_client._json)(_),
|
|
327
|
+
DefaultPolicy: [],
|
|
328
|
+
Description: [],
|
|
329
|
+
Exclusions: (_) => (0, import_smithy_client._json)(_),
|
|
330
|
+
ExecutionRoleArn: [],
|
|
331
|
+
ExtendDeletion: [],
|
|
332
|
+
PolicyDetails: (_) => (0, import_smithy_client._json)(_),
|
|
333
|
+
RetainInterval: [],
|
|
334
|
+
State: [],
|
|
335
|
+
Tags: (_) => (0, import_smithy_client._json)(_)
|
|
336
|
+
})
|
|
337
|
+
);
|
|
338
|
+
b.m("POST").h(headers).b(body);
|
|
339
|
+
return b.build();
|
|
340
|
+
}, "se_CreateLifecyclePolicyCommand");
|
|
341
|
+
var se_DeleteLifecyclePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
342
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
343
|
+
const headers = {};
|
|
344
|
+
b.bp("/policies/{PolicyId}");
|
|
345
|
+
b.p("PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
346
|
+
let body;
|
|
347
|
+
b.m("DELETE").h(headers).b(body);
|
|
348
|
+
return b.build();
|
|
349
|
+
}, "se_DeleteLifecyclePolicyCommand");
|
|
350
|
+
var se_GetLifecyclePoliciesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
351
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
352
|
+
const headers = {};
|
|
353
|
+
b.bp("/policies");
|
|
354
|
+
const query = (0, import_smithy_client.map)({
|
|
355
|
+
[_pI]: [() => input.PolicyIds !== void 0, () => (input[_PI] || []).map((_entry) => _entry)],
|
|
356
|
+
[_s]: [, input[_S]],
|
|
357
|
+
[_rT]: [() => input.ResourceTypes !== void 0, () => (input[_RT] || []).map((_entry) => _entry)],
|
|
358
|
+
[_tT]: [() => input.TargetTags !== void 0, () => (input[_TT] || []).map((_entry) => _entry)],
|
|
359
|
+
[_tTA]: [() => input.TagsToAdd !== void 0, () => (input[_TTA] || []).map((_entry) => _entry)],
|
|
360
|
+
[_dPT]: [, input[_DPT]]
|
|
361
|
+
});
|
|
362
|
+
let body;
|
|
363
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
364
|
+
return b.build();
|
|
365
|
+
}, "se_GetLifecyclePoliciesCommand");
|
|
366
|
+
var se_GetLifecyclePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
367
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
368
|
+
const headers = {};
|
|
369
|
+
b.bp("/policies/{PolicyId}");
|
|
370
|
+
b.p("PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
371
|
+
let body;
|
|
372
|
+
b.m("GET").h(headers).b(body);
|
|
373
|
+
return b.build();
|
|
374
|
+
}, "se_GetLifecyclePolicyCommand");
|
|
375
|
+
var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
376
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
377
|
+
const headers = {};
|
|
378
|
+
b.bp("/tags/{ResourceArn}");
|
|
379
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
380
|
+
let body;
|
|
381
|
+
b.m("GET").h(headers).b(body);
|
|
382
|
+
return b.build();
|
|
383
|
+
}, "se_ListTagsForResourceCommand");
|
|
384
|
+
var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
385
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
386
|
+
const headers = {
|
|
387
|
+
"content-type": "application/json"
|
|
388
|
+
};
|
|
389
|
+
b.bp("/tags/{ResourceArn}");
|
|
390
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
391
|
+
let body;
|
|
392
|
+
body = JSON.stringify(
|
|
393
|
+
(0, import_smithy_client.take)(input, {
|
|
394
|
+
Tags: (_) => (0, import_smithy_client._json)(_)
|
|
395
|
+
})
|
|
396
|
+
);
|
|
397
|
+
b.m("POST").h(headers).b(body);
|
|
398
|
+
return b.build();
|
|
399
|
+
}, "se_TagResourceCommand");
|
|
400
|
+
var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
401
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
402
|
+
const headers = {};
|
|
403
|
+
b.bp("/tags/{ResourceArn}");
|
|
404
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
405
|
+
const query = (0, import_smithy_client.map)({
|
|
406
|
+
[_tK]: [
|
|
407
|
+
(0, import_smithy_client.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
408
|
+
() => (input[_TK] || []).map((_entry) => _entry)
|
|
409
|
+
]
|
|
410
|
+
});
|
|
411
|
+
let body;
|
|
412
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
413
|
+
return b.build();
|
|
414
|
+
}, "se_UntagResourceCommand");
|
|
415
|
+
var se_UpdateLifecyclePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
416
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
417
|
+
const headers = {
|
|
418
|
+
"content-type": "application/json"
|
|
419
|
+
};
|
|
420
|
+
b.bp("/policies/{PolicyId}");
|
|
421
|
+
b.p("PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
422
|
+
let body;
|
|
423
|
+
body = JSON.stringify(
|
|
424
|
+
(0, import_smithy_client.take)(input, {
|
|
425
|
+
CopyTags: [],
|
|
426
|
+
CreateInterval: [],
|
|
427
|
+
CrossRegionCopyTargets: (_) => (0, import_smithy_client._json)(_),
|
|
428
|
+
Description: [],
|
|
429
|
+
Exclusions: (_) => (0, import_smithy_client._json)(_),
|
|
430
|
+
ExecutionRoleArn: [],
|
|
431
|
+
ExtendDeletion: [],
|
|
432
|
+
PolicyDetails: (_) => (0, import_smithy_client._json)(_),
|
|
433
|
+
RetainInterval: [],
|
|
434
|
+
State: []
|
|
435
|
+
})
|
|
436
|
+
);
|
|
437
|
+
b.m("PATCH").h(headers).b(body);
|
|
438
|
+
return b.build();
|
|
439
|
+
}, "se_UpdateLifecyclePolicyCommand");
|
|
440
|
+
var de_CreateLifecyclePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
441
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
442
|
+
return de_CreateLifecyclePolicyCommandError(output, context);
|
|
443
|
+
}
|
|
444
|
+
const contents = (0, import_smithy_client.map)({
|
|
445
|
+
$metadata: deserializeMetadata(output)
|
|
446
|
+
});
|
|
447
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
448
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
449
|
+
PolicyId: import_smithy_client.expectString
|
|
450
|
+
});
|
|
451
|
+
Object.assign(contents, doc);
|
|
452
|
+
return contents;
|
|
453
|
+
}, "de_CreateLifecyclePolicyCommand");
|
|
454
|
+
var de_CreateLifecyclePolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
455
|
+
const parsedOutput = {
|
|
456
|
+
...output,
|
|
457
|
+
body: await parseErrorBody(output.body, context)
|
|
458
|
+
};
|
|
459
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
460
|
+
switch (errorCode) {
|
|
461
|
+
case "InternalServerException":
|
|
462
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
463
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
464
|
+
case "InvalidRequestException":
|
|
465
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
466
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
467
|
+
case "LimitExceededException":
|
|
468
|
+
case "com.amazonaws.dlm#LimitExceededException":
|
|
469
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
470
|
+
default:
|
|
471
|
+
const parsedBody = parsedOutput.body;
|
|
472
|
+
return throwDefaultError({
|
|
473
|
+
output,
|
|
474
|
+
parsedBody,
|
|
475
|
+
errorCode
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
}, "de_CreateLifecyclePolicyCommandError");
|
|
479
|
+
var de_DeleteLifecyclePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
480
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
481
|
+
return de_DeleteLifecyclePolicyCommandError(output, context);
|
|
482
|
+
}
|
|
483
|
+
const contents = (0, import_smithy_client.map)({
|
|
484
|
+
$metadata: deserializeMetadata(output)
|
|
485
|
+
});
|
|
486
|
+
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
487
|
+
return contents;
|
|
488
|
+
}, "de_DeleteLifecyclePolicyCommand");
|
|
489
|
+
var de_DeleteLifecyclePolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
490
|
+
const parsedOutput = {
|
|
491
|
+
...output,
|
|
492
|
+
body: await parseErrorBody(output.body, context)
|
|
493
|
+
};
|
|
494
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
495
|
+
switch (errorCode) {
|
|
496
|
+
case "InternalServerException":
|
|
497
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
498
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
499
|
+
case "LimitExceededException":
|
|
500
|
+
case "com.amazonaws.dlm#LimitExceededException":
|
|
501
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
502
|
+
case "ResourceNotFoundException":
|
|
503
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
504
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
505
|
+
default:
|
|
506
|
+
const parsedBody = parsedOutput.body;
|
|
507
|
+
return throwDefaultError({
|
|
508
|
+
output,
|
|
509
|
+
parsedBody,
|
|
510
|
+
errorCode
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
}, "de_DeleteLifecyclePolicyCommandError");
|
|
514
|
+
var de_GetLifecyclePoliciesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
515
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
516
|
+
return de_GetLifecyclePoliciesCommandError(output, context);
|
|
517
|
+
}
|
|
518
|
+
const contents = (0, import_smithy_client.map)({
|
|
519
|
+
$metadata: deserializeMetadata(output)
|
|
520
|
+
});
|
|
521
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
522
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
523
|
+
Policies: import_smithy_client._json
|
|
524
|
+
});
|
|
525
|
+
Object.assign(contents, doc);
|
|
526
|
+
return contents;
|
|
527
|
+
}, "de_GetLifecyclePoliciesCommand");
|
|
528
|
+
var de_GetLifecyclePoliciesCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
529
|
+
const parsedOutput = {
|
|
530
|
+
...output,
|
|
531
|
+
body: await parseErrorBody(output.body, context)
|
|
532
|
+
};
|
|
533
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
534
|
+
switch (errorCode) {
|
|
535
|
+
case "InternalServerException":
|
|
536
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
537
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
538
|
+
case "InvalidRequestException":
|
|
539
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
540
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
541
|
+
case "LimitExceededException":
|
|
542
|
+
case "com.amazonaws.dlm#LimitExceededException":
|
|
543
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
544
|
+
case "ResourceNotFoundException":
|
|
545
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
546
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
547
|
+
default:
|
|
548
|
+
const parsedBody = parsedOutput.body;
|
|
549
|
+
return throwDefaultError({
|
|
550
|
+
output,
|
|
551
|
+
parsedBody,
|
|
552
|
+
errorCode
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
}, "de_GetLifecyclePoliciesCommandError");
|
|
556
|
+
var de_GetLifecyclePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
557
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
558
|
+
return de_GetLifecyclePolicyCommandError(output, context);
|
|
559
|
+
}
|
|
560
|
+
const contents = (0, import_smithy_client.map)({
|
|
561
|
+
$metadata: deserializeMetadata(output)
|
|
562
|
+
});
|
|
563
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
564
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
565
|
+
Policy: (_) => de_LifecyclePolicy(_, context)
|
|
566
|
+
});
|
|
567
|
+
Object.assign(contents, doc);
|
|
568
|
+
return contents;
|
|
569
|
+
}, "de_GetLifecyclePolicyCommand");
|
|
570
|
+
var de_GetLifecyclePolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
571
|
+
const parsedOutput = {
|
|
572
|
+
...output,
|
|
573
|
+
body: await parseErrorBody(output.body, context)
|
|
574
|
+
};
|
|
575
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
576
|
+
switch (errorCode) {
|
|
577
|
+
case "InternalServerException":
|
|
578
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
579
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
580
|
+
case "LimitExceededException":
|
|
581
|
+
case "com.amazonaws.dlm#LimitExceededException":
|
|
582
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
583
|
+
case "ResourceNotFoundException":
|
|
584
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
585
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
586
|
+
default:
|
|
587
|
+
const parsedBody = parsedOutput.body;
|
|
588
|
+
return throwDefaultError({
|
|
589
|
+
output,
|
|
590
|
+
parsedBody,
|
|
591
|
+
errorCode
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
}, "de_GetLifecyclePolicyCommandError");
|
|
595
|
+
var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
596
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
597
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
598
|
+
}
|
|
599
|
+
const contents = (0, import_smithy_client.map)({
|
|
600
|
+
$metadata: deserializeMetadata(output)
|
|
601
|
+
});
|
|
602
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
603
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
604
|
+
Tags: import_smithy_client._json
|
|
605
|
+
});
|
|
606
|
+
Object.assign(contents, doc);
|
|
607
|
+
return contents;
|
|
608
|
+
}, "de_ListTagsForResourceCommand");
|
|
609
|
+
var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
610
|
+
const parsedOutput = {
|
|
611
|
+
...output,
|
|
612
|
+
body: await parseErrorBody(output.body, context)
|
|
613
|
+
};
|
|
614
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
615
|
+
switch (errorCode) {
|
|
616
|
+
case "InternalServerException":
|
|
617
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
618
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
619
|
+
case "InvalidRequestException":
|
|
620
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
621
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
622
|
+
case "ResourceNotFoundException":
|
|
623
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
624
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
625
|
+
default:
|
|
626
|
+
const parsedBody = parsedOutput.body;
|
|
627
|
+
return throwDefaultError({
|
|
628
|
+
output,
|
|
629
|
+
parsedBody,
|
|
630
|
+
errorCode
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
}, "de_ListTagsForResourceCommandError");
|
|
634
|
+
var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
635
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
636
|
+
return de_TagResourceCommandError(output, context);
|
|
637
|
+
}
|
|
638
|
+
const contents = (0, import_smithy_client.map)({
|
|
639
|
+
$metadata: deserializeMetadata(output)
|
|
640
|
+
});
|
|
641
|
+
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
642
|
+
return contents;
|
|
643
|
+
}, "de_TagResourceCommand");
|
|
644
|
+
var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
645
|
+
const parsedOutput = {
|
|
646
|
+
...output,
|
|
647
|
+
body: await parseErrorBody(output.body, context)
|
|
648
|
+
};
|
|
649
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
650
|
+
switch (errorCode) {
|
|
651
|
+
case "InternalServerException":
|
|
652
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
653
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
654
|
+
case "InvalidRequestException":
|
|
655
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
656
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
657
|
+
case "ResourceNotFoundException":
|
|
658
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
659
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
660
|
+
default:
|
|
661
|
+
const parsedBody = parsedOutput.body;
|
|
662
|
+
return throwDefaultError({
|
|
663
|
+
output,
|
|
664
|
+
parsedBody,
|
|
665
|
+
errorCode
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
}, "de_TagResourceCommandError");
|
|
669
|
+
var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
670
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
671
|
+
return de_UntagResourceCommandError(output, context);
|
|
672
|
+
}
|
|
673
|
+
const contents = (0, import_smithy_client.map)({
|
|
674
|
+
$metadata: deserializeMetadata(output)
|
|
675
|
+
});
|
|
676
|
+
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
677
|
+
return contents;
|
|
678
|
+
}, "de_UntagResourceCommand");
|
|
679
|
+
var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
680
|
+
const parsedOutput = {
|
|
681
|
+
...output,
|
|
682
|
+
body: await parseErrorBody(output.body, context)
|
|
683
|
+
};
|
|
684
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
685
|
+
switch (errorCode) {
|
|
686
|
+
case "InternalServerException":
|
|
687
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
688
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
689
|
+
case "InvalidRequestException":
|
|
690
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
691
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
692
|
+
case "ResourceNotFoundException":
|
|
693
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
694
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
695
|
+
default:
|
|
696
|
+
const parsedBody = parsedOutput.body;
|
|
697
|
+
return throwDefaultError({
|
|
698
|
+
output,
|
|
699
|
+
parsedBody,
|
|
700
|
+
errorCode
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
}, "de_UntagResourceCommandError");
|
|
704
|
+
var de_UpdateLifecyclePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
705
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
706
|
+
return de_UpdateLifecyclePolicyCommandError(output, context);
|
|
707
|
+
}
|
|
708
|
+
const contents = (0, import_smithy_client.map)({
|
|
709
|
+
$metadata: deserializeMetadata(output)
|
|
710
|
+
});
|
|
711
|
+
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
712
|
+
return contents;
|
|
713
|
+
}, "de_UpdateLifecyclePolicyCommand");
|
|
714
|
+
var de_UpdateLifecyclePolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
715
|
+
const parsedOutput = {
|
|
716
|
+
...output,
|
|
717
|
+
body: await parseErrorBody(output.body, context)
|
|
718
|
+
};
|
|
719
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
720
|
+
switch (errorCode) {
|
|
721
|
+
case "InternalServerException":
|
|
722
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
723
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
724
|
+
case "InvalidRequestException":
|
|
725
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
726
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
727
|
+
case "LimitExceededException":
|
|
728
|
+
case "com.amazonaws.dlm#LimitExceededException":
|
|
729
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
730
|
+
case "ResourceNotFoundException":
|
|
731
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
732
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
733
|
+
default:
|
|
734
|
+
const parsedBody = parsedOutput.body;
|
|
735
|
+
return throwDefaultError({
|
|
736
|
+
output,
|
|
737
|
+
parsedBody,
|
|
738
|
+
errorCode
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
}, "de_UpdateLifecyclePolicyCommandError");
|
|
742
|
+
var throwDefaultError = (0, import_smithy_client.withBaseException)(DLMServiceException);
|
|
743
|
+
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
744
|
+
const contents = (0, import_smithy_client.map)({});
|
|
745
|
+
const data = parsedOutput.body;
|
|
746
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
747
|
+
Code: import_smithy_client.expectString,
|
|
748
|
+
Message: import_smithy_client.expectString
|
|
749
|
+
});
|
|
750
|
+
Object.assign(contents, doc);
|
|
751
|
+
const exception = new InternalServerException({
|
|
752
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
753
|
+
...contents
|
|
754
|
+
});
|
|
755
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
756
|
+
}, "de_InternalServerExceptionRes");
|
|
757
|
+
var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
758
|
+
const contents = (0, import_smithy_client.map)({});
|
|
759
|
+
const data = parsedOutput.body;
|
|
760
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
761
|
+
Code: import_smithy_client.expectString,
|
|
762
|
+
Message: import_smithy_client.expectString,
|
|
763
|
+
MutuallyExclusiveParameters: import_smithy_client._json,
|
|
764
|
+
RequiredParameters: import_smithy_client._json
|
|
765
|
+
});
|
|
766
|
+
Object.assign(contents, doc);
|
|
767
|
+
const exception = new InvalidRequestException({
|
|
768
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
769
|
+
...contents
|
|
770
|
+
});
|
|
771
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
772
|
+
}, "de_InvalidRequestExceptionRes");
|
|
773
|
+
var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
774
|
+
const contents = (0, import_smithy_client.map)({});
|
|
775
|
+
const data = parsedOutput.body;
|
|
776
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
777
|
+
Code: import_smithy_client.expectString,
|
|
778
|
+
Message: import_smithy_client.expectString,
|
|
779
|
+
ResourceType: import_smithy_client.expectString
|
|
780
|
+
});
|
|
781
|
+
Object.assign(contents, doc);
|
|
782
|
+
const exception = new LimitExceededException({
|
|
783
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
784
|
+
...contents
|
|
785
|
+
});
|
|
786
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
787
|
+
}, "de_LimitExceededExceptionRes");
|
|
788
|
+
var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
789
|
+
const contents = (0, import_smithy_client.map)({});
|
|
790
|
+
const data = parsedOutput.body;
|
|
791
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
792
|
+
Code: import_smithy_client.expectString,
|
|
793
|
+
Message: import_smithy_client.expectString,
|
|
794
|
+
ResourceIds: import_smithy_client._json,
|
|
795
|
+
ResourceType: import_smithy_client.expectString
|
|
796
|
+
});
|
|
797
|
+
Object.assign(contents, doc);
|
|
798
|
+
const exception = new ResourceNotFoundException({
|
|
799
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
800
|
+
...contents
|
|
801
|
+
});
|
|
802
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
803
|
+
}, "de_ResourceNotFoundExceptionRes");
|
|
804
|
+
var de_LifecyclePolicy = /* @__PURE__ */ __name((output, context) => {
|
|
805
|
+
return (0, import_smithy_client.take)(output, {
|
|
806
|
+
DateCreated: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
807
|
+
DateModified: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
808
|
+
DefaultPolicy: import_smithy_client.expectBoolean,
|
|
809
|
+
Description: import_smithy_client.expectString,
|
|
810
|
+
ExecutionRoleArn: import_smithy_client.expectString,
|
|
811
|
+
PolicyArn: import_smithy_client.expectString,
|
|
812
|
+
PolicyDetails: import_smithy_client._json,
|
|
813
|
+
PolicyId: import_smithy_client.expectString,
|
|
814
|
+
State: import_smithy_client.expectString,
|
|
815
|
+
StatusMessage: import_smithy_client.expectString,
|
|
816
|
+
Tags: import_smithy_client._json
|
|
817
|
+
});
|
|
818
|
+
}, "de_LifecyclePolicy");
|
|
819
|
+
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
820
|
+
httpStatusCode: output.statusCode,
|
|
821
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
822
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
823
|
+
cfId: output.headers["x-amz-cf-id"]
|
|
824
|
+
}), "deserializeMetadata");
|
|
825
|
+
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
826
|
+
var _DPT = "DefaultPolicyType";
|
|
827
|
+
var _PI = "PolicyIds";
|
|
828
|
+
var _RT = "ResourceTypes";
|
|
829
|
+
var _S = "State";
|
|
830
|
+
var _TK = "TagKeys";
|
|
831
|
+
var _TT = "TargetTags";
|
|
832
|
+
var _TTA = "TagsToAdd";
|
|
833
|
+
var _dPT = "defaultPolicyType";
|
|
834
|
+
var _pI = "policyIds";
|
|
835
|
+
var _rT = "resourceTypes";
|
|
836
|
+
var _s = "state";
|
|
837
|
+
var _tK = "tagKeys";
|
|
838
|
+
var _tT = "targetTags";
|
|
839
|
+
var _tTA = "tagsToAdd";
|
|
840
|
+
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
841
|
+
if (encoded.length) {
|
|
842
|
+
return JSON.parse(encoded);
|
|
843
|
+
}
|
|
844
|
+
return {};
|
|
845
|
+
}), "parseBody");
|
|
846
|
+
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
847
|
+
const value = await parseBody(errorBody, context);
|
|
848
|
+
value.message = value.message ?? value.Message;
|
|
849
|
+
return value;
|
|
850
|
+
}, "parseErrorBody");
|
|
851
|
+
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
852
|
+
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
853
|
+
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
854
|
+
let cleanValue = rawValue;
|
|
855
|
+
if (typeof cleanValue === "number") {
|
|
856
|
+
cleanValue = cleanValue.toString();
|
|
857
|
+
}
|
|
858
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
859
|
+
cleanValue = cleanValue.split(",")[0];
|
|
860
|
+
}
|
|
861
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
862
|
+
cleanValue = cleanValue.split(":")[0];
|
|
863
|
+
}
|
|
864
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
865
|
+
cleanValue = cleanValue.split("#")[1];
|
|
866
|
+
}
|
|
867
|
+
return cleanValue;
|
|
868
|
+
}, "sanitizeErrorCode");
|
|
869
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
870
|
+
if (headerKey !== void 0) {
|
|
871
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
872
|
+
}
|
|
873
|
+
if (data.code !== void 0) {
|
|
874
|
+
return sanitizeErrorCode(data.code);
|
|
875
|
+
}
|
|
876
|
+
if (data["__type"] !== void 0) {
|
|
877
|
+
return sanitizeErrorCode(data["__type"]);
|
|
878
|
+
}
|
|
879
|
+
}, "loadRestJsonErrorCode");
|
|
880
|
+
|
|
881
|
+
// src/commands/CreateLifecyclePolicyCommand.ts
|
|
882
|
+
var _CreateLifecyclePolicyCommand = class _CreateLifecyclePolicyCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
883
|
+
...commonParams
|
|
884
|
+
}).m(function(Command, cs, config, o) {
|
|
885
|
+
return [
|
|
886
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
887
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
888
|
+
];
|
|
889
|
+
}).s("dlm_20180112", "CreateLifecyclePolicy", {}).n("DLMClient", "CreateLifecyclePolicyCommand").f(void 0, void 0).ser(se_CreateLifecyclePolicyCommand).de(de_CreateLifecyclePolicyCommand).build() {
|
|
890
|
+
};
|
|
891
|
+
__name(_CreateLifecyclePolicyCommand, "CreateLifecyclePolicyCommand");
|
|
892
|
+
var CreateLifecyclePolicyCommand = _CreateLifecyclePolicyCommand;
|
|
893
|
+
|
|
894
|
+
// src/commands/DeleteLifecyclePolicyCommand.ts
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
var _DeleteLifecyclePolicyCommand = class _DeleteLifecyclePolicyCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
900
|
+
...commonParams
|
|
901
|
+
}).m(function(Command, cs, config, o) {
|
|
902
|
+
return [
|
|
903
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
904
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
905
|
+
];
|
|
906
|
+
}).s("dlm_20180112", "DeleteLifecyclePolicy", {}).n("DLMClient", "DeleteLifecyclePolicyCommand").f(void 0, void 0).ser(se_DeleteLifecyclePolicyCommand).de(de_DeleteLifecyclePolicyCommand).build() {
|
|
907
|
+
};
|
|
908
|
+
__name(_DeleteLifecyclePolicyCommand, "DeleteLifecyclePolicyCommand");
|
|
909
|
+
var DeleteLifecyclePolicyCommand = _DeleteLifecyclePolicyCommand;
|
|
910
|
+
|
|
911
|
+
// src/commands/GetLifecyclePoliciesCommand.ts
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
var _GetLifecyclePoliciesCommand = class _GetLifecyclePoliciesCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
917
|
+
...commonParams
|
|
918
|
+
}).m(function(Command, cs, config, o) {
|
|
919
|
+
return [
|
|
920
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
921
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
922
|
+
];
|
|
923
|
+
}).s("dlm_20180112", "GetLifecyclePolicies", {}).n("DLMClient", "GetLifecyclePoliciesCommand").f(void 0, void 0).ser(se_GetLifecyclePoliciesCommand).de(de_GetLifecyclePoliciesCommand).build() {
|
|
924
|
+
};
|
|
925
|
+
__name(_GetLifecyclePoliciesCommand, "GetLifecyclePoliciesCommand");
|
|
926
|
+
var GetLifecyclePoliciesCommand = _GetLifecyclePoliciesCommand;
|
|
927
|
+
|
|
928
|
+
// src/commands/GetLifecyclePolicyCommand.ts
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
var _GetLifecyclePolicyCommand = class _GetLifecyclePolicyCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
934
|
+
...commonParams
|
|
935
|
+
}).m(function(Command, cs, config, o) {
|
|
936
|
+
return [
|
|
937
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
938
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
939
|
+
];
|
|
940
|
+
}).s("dlm_20180112", "GetLifecyclePolicy", {}).n("DLMClient", "GetLifecyclePolicyCommand").f(void 0, void 0).ser(se_GetLifecyclePolicyCommand).de(de_GetLifecyclePolicyCommand).build() {
|
|
941
|
+
};
|
|
942
|
+
__name(_GetLifecyclePolicyCommand, "GetLifecyclePolicyCommand");
|
|
943
|
+
var GetLifecyclePolicyCommand = _GetLifecyclePolicyCommand;
|
|
944
|
+
|
|
945
|
+
// src/commands/ListTagsForResourceCommand.ts
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
var _ListTagsForResourceCommand = class _ListTagsForResourceCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
951
|
+
...commonParams
|
|
952
|
+
}).m(function(Command, cs, config, o) {
|
|
953
|
+
return [
|
|
954
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
955
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
956
|
+
];
|
|
957
|
+
}).s("dlm_20180112", "ListTagsForResource", {}).n("DLMClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
|
|
958
|
+
};
|
|
959
|
+
__name(_ListTagsForResourceCommand, "ListTagsForResourceCommand");
|
|
960
|
+
var ListTagsForResourceCommand = _ListTagsForResourceCommand;
|
|
961
|
+
|
|
962
|
+
// src/commands/TagResourceCommand.ts
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
var _TagResourceCommand = class _TagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
968
|
+
...commonParams
|
|
969
|
+
}).m(function(Command, cs, config, o) {
|
|
970
|
+
return [
|
|
971
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
972
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
973
|
+
];
|
|
974
|
+
}).s("dlm_20180112", "TagResource", {}).n("DLMClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
|
|
975
|
+
};
|
|
976
|
+
__name(_TagResourceCommand, "TagResourceCommand");
|
|
977
|
+
var TagResourceCommand = _TagResourceCommand;
|
|
978
|
+
|
|
979
|
+
// src/commands/UntagResourceCommand.ts
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
var _UntagResourceCommand = class _UntagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
985
|
+
...commonParams
|
|
986
|
+
}).m(function(Command, cs, config, o) {
|
|
987
|
+
return [
|
|
988
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
989
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
990
|
+
];
|
|
991
|
+
}).s("dlm_20180112", "UntagResource", {}).n("DLMClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
|
|
992
|
+
};
|
|
993
|
+
__name(_UntagResourceCommand, "UntagResourceCommand");
|
|
994
|
+
var UntagResourceCommand = _UntagResourceCommand;
|
|
995
|
+
|
|
996
|
+
// src/commands/UpdateLifecyclePolicyCommand.ts
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
var _UpdateLifecyclePolicyCommand = class _UpdateLifecyclePolicyCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1002
|
+
...commonParams
|
|
1003
|
+
}).m(function(Command, cs, config, o) {
|
|
1004
|
+
return [
|
|
1005
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1006
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1007
|
+
];
|
|
1008
|
+
}).s("dlm_20180112", "UpdateLifecyclePolicy", {}).n("DLMClient", "UpdateLifecyclePolicyCommand").f(void 0, void 0).ser(se_UpdateLifecyclePolicyCommand).de(de_UpdateLifecyclePolicyCommand).build() {
|
|
1009
|
+
};
|
|
1010
|
+
__name(_UpdateLifecyclePolicyCommand, "UpdateLifecyclePolicyCommand");
|
|
1011
|
+
var UpdateLifecyclePolicyCommand = _UpdateLifecyclePolicyCommand;
|
|
1012
|
+
|
|
1013
|
+
// src/DLM.ts
|
|
1014
|
+
var commands = {
|
|
1015
|
+
CreateLifecyclePolicyCommand,
|
|
1016
|
+
DeleteLifecyclePolicyCommand,
|
|
1017
|
+
GetLifecyclePoliciesCommand,
|
|
1018
|
+
GetLifecyclePolicyCommand,
|
|
1019
|
+
ListTagsForResourceCommand,
|
|
1020
|
+
TagResourceCommand,
|
|
1021
|
+
UntagResourceCommand,
|
|
1022
|
+
UpdateLifecyclePolicyCommand
|
|
1023
|
+
};
|
|
1024
|
+
var _DLM = class _DLM extends DLMClient {
|
|
1025
|
+
};
|
|
1026
|
+
__name(_DLM, "DLM");
|
|
1027
|
+
var DLM = _DLM;
|
|
1028
|
+
(0, import_smithy_client.createAggregatedClient)(commands, DLM);
|
|
1029
|
+
|
|
1030
|
+
// src/index.ts
|
|
1031
|
+
var import_util_endpoints = require("@aws-sdk/util-endpoints");
|
|
1032
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1033
|
+
0 && (module.exports = {
|
|
1034
|
+
CreateLifecyclePolicyCommand,
|
|
1035
|
+
DLM,
|
|
1036
|
+
DLMClient,
|
|
1037
|
+
DLMServiceException,
|
|
1038
|
+
DefaultPoliciesTypeValues,
|
|
1039
|
+
DefaultPolicyTypeValues,
|
|
1040
|
+
DeleteLifecyclePolicyCommand,
|
|
1041
|
+
EventSourceValues,
|
|
1042
|
+
EventTypeValues,
|
|
1043
|
+
ExecutionHandlerServiceValues,
|
|
1044
|
+
GetLifecyclePoliciesCommand,
|
|
1045
|
+
GetLifecyclePolicyCommand,
|
|
1046
|
+
GettablePolicyStateValues,
|
|
1047
|
+
InternalServerException,
|
|
1048
|
+
IntervalUnitValues,
|
|
1049
|
+
InvalidRequestException,
|
|
1050
|
+
LimitExceededException,
|
|
1051
|
+
ListTagsForResourceCommand,
|
|
1052
|
+
LocationValues,
|
|
1053
|
+
PolicyLanguageValues,
|
|
1054
|
+
PolicyTypeValues,
|
|
1055
|
+
ResourceLocationValues,
|
|
1056
|
+
ResourceNotFoundException,
|
|
1057
|
+
ResourceTypeValues,
|
|
1058
|
+
RetentionIntervalUnitValues,
|
|
1059
|
+
SettablePolicyStateValues,
|
|
1060
|
+
StageValues,
|
|
1061
|
+
TagResourceCommand,
|
|
1062
|
+
UntagResourceCommand,
|
|
1063
|
+
UpdateLifecyclePolicyCommand,
|
|
1064
|
+
__Client
|
|
1065
|
+
});
|