@aws-sdk/client-amp 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.
Files changed (48) hide show
  1. package/dist-cjs/Amp.js +1 -63
  2. package/dist-cjs/AmpClient.js +1 -43
  3. package/dist-cjs/commands/CreateAlertManagerDefinitionCommand.js +1 -28
  4. package/dist-cjs/commands/CreateLoggingConfigurationCommand.js +1 -28
  5. package/dist-cjs/commands/CreateRuleGroupsNamespaceCommand.js +1 -28
  6. package/dist-cjs/commands/CreateScraperCommand.js +1 -28
  7. package/dist-cjs/commands/CreateWorkspaceCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteAlertManagerDefinitionCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteLoggingConfigurationCommand.js +1 -28
  10. package/dist-cjs/commands/DeleteRuleGroupsNamespaceCommand.js +1 -28
  11. package/dist-cjs/commands/DeleteScraperCommand.js +1 -28
  12. package/dist-cjs/commands/DeleteWorkspaceCommand.js +1 -28
  13. package/dist-cjs/commands/DescribeAlertManagerDefinitionCommand.js +1 -28
  14. package/dist-cjs/commands/DescribeLoggingConfigurationCommand.js +1 -28
  15. package/dist-cjs/commands/DescribeRuleGroupsNamespaceCommand.js +1 -28
  16. package/dist-cjs/commands/DescribeScraperCommand.js +1 -28
  17. package/dist-cjs/commands/DescribeWorkspaceCommand.js +1 -28
  18. package/dist-cjs/commands/GetDefaultScraperConfigurationCommand.js +1 -28
  19. package/dist-cjs/commands/ListRuleGroupsNamespacesCommand.js +1 -28
  20. package/dist-cjs/commands/ListScrapersCommand.js +1 -28
  21. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  22. package/dist-cjs/commands/ListWorkspacesCommand.js +1 -28
  23. package/dist-cjs/commands/PutAlertManagerDefinitionCommand.js +1 -28
  24. package/dist-cjs/commands/PutRuleGroupsNamespaceCommand.js +1 -28
  25. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  26. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  27. package/dist-cjs/commands/UpdateLoggingConfigurationCommand.js +1 -28
  28. package/dist-cjs/commands/UpdateWorkspaceAliasCommand.js +1 -28
  29. package/dist-cjs/commands/index.js +1 -29
  30. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  31. package/dist-cjs/extensionConfiguration.js +1 -2
  32. package/dist-cjs/index.js +3030 -12
  33. package/dist-cjs/models/AmpServiceException.js +1 -12
  34. package/dist-cjs/models/index.js +1 -4
  35. package/dist-cjs/models/models_0.js +1 -179
  36. package/dist-cjs/pagination/Interfaces.js +1 -2
  37. package/dist-cjs/pagination/ListRuleGroupsNamespacesPaginator.js +1 -7
  38. package/dist-cjs/pagination/ListScrapersPaginator.js +1 -7
  39. package/dist-cjs/pagination/ListWorkspacesPaginator.js +1 -7
  40. package/dist-cjs/pagination/index.js +1 -7
  41. package/dist-cjs/protocols/Aws_restJson1.js +1 -1890
  42. package/dist-cjs/runtimeExtensions.js +1 -22
  43. package/dist-cjs/waiters/index.js +1 -7
  44. package/dist-cjs/waiters/waitForScraperActive.js +1 -45
  45. package/dist-cjs/waiters/waitForScraperDeleted.js +1 -39
  46. package/dist-cjs/waiters/waitForWorkspaceActive.js +1 -54
  47. package/dist-cjs/waiters/waitForWorkspaceDeleted.js +1 -39
  48. package/package.json +41 -41
package/dist-cjs/index.js CHANGED
@@ -1,13 +1,3031 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AmpServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./AmpClient"), exports);
6
- tslib_1.__exportStar(require("./Amp"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./pagination"), exports);
9
- tslib_1.__exportStar(require("./waiters"), exports);
10
- tslib_1.__exportStar(require("./models"), exports);
11
- require("@aws-sdk/util-endpoints");
12
- var AmpServiceException_1 = require("./models/AmpServiceException");
13
- Object.defineProperty(exports, "AmpServiceException", { enumerable: true, get: function () { return AmpServiceException_1.AmpServiceException; } });
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
+ AccessDeniedException: () => AccessDeniedException,
25
+ AlertManagerDefinitionStatusCode: () => AlertManagerDefinitionStatusCode,
26
+ Amp: () => Amp,
27
+ AmpClient: () => AmpClient,
28
+ AmpServiceException: () => AmpServiceException,
29
+ ConflictException: () => ConflictException,
30
+ CreateAlertManagerDefinitionCommand: () => CreateAlertManagerDefinitionCommand,
31
+ CreateLoggingConfigurationCommand: () => CreateLoggingConfigurationCommand,
32
+ CreateRuleGroupsNamespaceCommand: () => CreateRuleGroupsNamespaceCommand,
33
+ CreateScraperCommand: () => CreateScraperCommand,
34
+ CreateWorkspaceCommand: () => CreateWorkspaceCommand,
35
+ DeleteAlertManagerDefinitionCommand: () => DeleteAlertManagerDefinitionCommand,
36
+ DeleteLoggingConfigurationCommand: () => DeleteLoggingConfigurationCommand,
37
+ DeleteRuleGroupsNamespaceCommand: () => DeleteRuleGroupsNamespaceCommand,
38
+ DeleteScraperCommand: () => DeleteScraperCommand,
39
+ DeleteWorkspaceCommand: () => DeleteWorkspaceCommand,
40
+ DescribeAlertManagerDefinitionCommand: () => DescribeAlertManagerDefinitionCommand,
41
+ DescribeLoggingConfigurationCommand: () => DescribeLoggingConfigurationCommand,
42
+ DescribeRuleGroupsNamespaceCommand: () => DescribeRuleGroupsNamespaceCommand,
43
+ DescribeScraperCommand: () => DescribeScraperCommand,
44
+ DescribeWorkspaceCommand: () => DescribeWorkspaceCommand,
45
+ Destination: () => Destination,
46
+ GetDefaultScraperConfigurationCommand: () => GetDefaultScraperConfigurationCommand,
47
+ InternalServerException: () => InternalServerException,
48
+ ListRuleGroupsNamespacesCommand: () => ListRuleGroupsNamespacesCommand,
49
+ ListScrapersCommand: () => ListScrapersCommand,
50
+ ListTagsForResourceCommand: () => ListTagsForResourceCommand,
51
+ ListWorkspacesCommand: () => ListWorkspacesCommand,
52
+ LoggingConfigurationStatusCode: () => LoggingConfigurationStatusCode,
53
+ PutAlertManagerDefinitionCommand: () => PutAlertManagerDefinitionCommand,
54
+ PutRuleGroupsNamespaceCommand: () => PutRuleGroupsNamespaceCommand,
55
+ ResourceNotFoundException: () => ResourceNotFoundException,
56
+ RuleGroupsNamespaceStatusCode: () => RuleGroupsNamespaceStatusCode,
57
+ ScrapeConfiguration: () => ScrapeConfiguration,
58
+ ScraperStatusCode: () => ScraperStatusCode,
59
+ ServiceQuotaExceededException: () => ServiceQuotaExceededException,
60
+ Source: () => Source,
61
+ TagResourceCommand: () => TagResourceCommand,
62
+ ThrottlingException: () => ThrottlingException,
63
+ UntagResourceCommand: () => UntagResourceCommand,
64
+ UpdateLoggingConfigurationCommand: () => UpdateLoggingConfigurationCommand,
65
+ UpdateWorkspaceAliasCommand: () => UpdateWorkspaceAliasCommand,
66
+ ValidationException: () => ValidationException,
67
+ ValidationExceptionReason: () => ValidationExceptionReason,
68
+ WorkspaceStatusCode: () => WorkspaceStatusCode,
69
+ __Client: () => import_smithy_client.Client,
70
+ paginateListRuleGroupsNamespaces: () => paginateListRuleGroupsNamespaces,
71
+ paginateListScrapers: () => paginateListScrapers,
72
+ paginateListWorkspaces: () => paginateListWorkspaces,
73
+ waitForScraperActive: () => waitForScraperActive,
74
+ waitForScraperDeleted: () => waitForScraperDeleted,
75
+ waitForWorkspaceActive: () => waitForWorkspaceActive,
76
+ waitForWorkspaceDeleted: () => waitForWorkspaceDeleted,
77
+ waitUntilScraperActive: () => waitUntilScraperActive,
78
+ waitUntilScraperDeleted: () => waitUntilScraperDeleted,
79
+ waitUntilWorkspaceActive: () => waitUntilWorkspaceActive,
80
+ waitUntilWorkspaceDeleted: () => waitUntilWorkspaceDeleted
81
+ });
82
+ module.exports = __toCommonJS(src_exports);
83
+
84
+ // src/AmpClient.ts
85
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
86
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
87
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
88
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
89
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
90
+ var import_config_resolver = require("@smithy/config-resolver");
91
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
92
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
93
+ var import_middleware_retry = require("@smithy/middleware-retry");
94
+
95
+
96
+ // src/endpoint/EndpointParameters.ts
97
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
98
+ return {
99
+ ...options,
100
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
101
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
102
+ defaultSigningName: "aps"
103
+ };
104
+ }, "resolveClientEndpointParameters");
105
+ var commonParams = {
106
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
107
+ Endpoint: { type: "builtInParams", name: "endpoint" },
108
+ Region: { type: "builtInParams", name: "region" },
109
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
110
+ };
111
+
112
+ // src/AmpClient.ts
113
+ var import_runtimeConfig = require("././runtimeConfig");
114
+
115
+ // src/runtimeExtensions.ts
116
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
117
+ var import_protocol_http = require("@smithy/protocol-http");
118
+ var import_smithy_client = require("@smithy/smithy-client");
119
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
120
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
121
+ const extensionConfiguration = {
122
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
123
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
124
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
125
+ };
126
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
127
+ return {
128
+ ...runtimeConfig,
129
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
130
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
131
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
132
+ };
133
+ }, "resolveRuntimeExtensions");
134
+
135
+ // src/AmpClient.ts
136
+ var _AmpClient = class _AmpClient extends import_smithy_client.Client {
137
+ constructor(...[configuration]) {
138
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
139
+ const _config_1 = resolveClientEndpointParameters(_config_0);
140
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
141
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
142
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
143
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
144
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
145
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
146
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
147
+ super(_config_8);
148
+ this.config = _config_8;
149
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
150
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
151
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
152
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
153
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
154
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
155
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
156
+ }
157
+ /**
158
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
159
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
160
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
161
+ */
162
+ destroy() {
163
+ super.destroy();
164
+ }
165
+ };
166
+ __name(_AmpClient, "AmpClient");
167
+ var AmpClient = _AmpClient;
168
+
169
+ // src/Amp.ts
170
+
171
+
172
+ // src/commands/CreateAlertManagerDefinitionCommand.ts
173
+
174
+ var import_middleware_serde = require("@smithy/middleware-serde");
175
+
176
+ var import_types = require("@smithy/types");
177
+
178
+ // src/protocols/Aws_restJson1.ts
179
+ var import_core = require("@aws-sdk/core");
180
+ var import_core2 = require("@smithy/core");
181
+
182
+ var import_uuid = require("uuid");
183
+
184
+ // src/models/AmpServiceException.ts
185
+
186
+ var _AmpServiceException = class _AmpServiceException extends import_smithy_client.ServiceException {
187
+ /**
188
+ * @internal
189
+ */
190
+ constructor(options) {
191
+ super(options);
192
+ Object.setPrototypeOf(this, _AmpServiceException.prototype);
193
+ }
194
+ };
195
+ __name(_AmpServiceException, "AmpServiceException");
196
+ var AmpServiceException = _AmpServiceException;
197
+
198
+ // src/models/models_0.ts
199
+ var _AccessDeniedException = class _AccessDeniedException extends AmpServiceException {
200
+ /**
201
+ * @internal
202
+ */
203
+ constructor(opts) {
204
+ super({
205
+ name: "AccessDeniedException",
206
+ $fault: "client",
207
+ ...opts
208
+ });
209
+ this.name = "AccessDeniedException";
210
+ this.$fault = "client";
211
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
212
+ }
213
+ };
214
+ __name(_AccessDeniedException, "AccessDeniedException");
215
+ var AccessDeniedException = _AccessDeniedException;
216
+ var _ConflictException = class _ConflictException extends AmpServiceException {
217
+ /**
218
+ * @internal
219
+ */
220
+ constructor(opts) {
221
+ super({
222
+ name: "ConflictException",
223
+ $fault: "client",
224
+ ...opts
225
+ });
226
+ this.name = "ConflictException";
227
+ this.$fault = "client";
228
+ Object.setPrototypeOf(this, _ConflictException.prototype);
229
+ this.resourceId = opts.resourceId;
230
+ this.resourceType = opts.resourceType;
231
+ }
232
+ };
233
+ __name(_ConflictException, "ConflictException");
234
+ var ConflictException = _ConflictException;
235
+ var AlertManagerDefinitionStatusCode = {
236
+ /**
237
+ * Definition has been created/updated. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE.
238
+ */
239
+ ACTIVE: "ACTIVE",
240
+ /**
241
+ * Definition is being created. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE.
242
+ */
243
+ CREATING: "CREATING",
244
+ /**
245
+ * Definition creation failed.
246
+ */
247
+ CREATION_FAILED: "CREATION_FAILED",
248
+ /**
249
+ * Definition is being deleting. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE.
250
+ */
251
+ DELETING: "DELETING",
252
+ /**
253
+ * Definition update failed.
254
+ */
255
+ UPDATE_FAILED: "UPDATE_FAILED",
256
+ /**
257
+ * Definition is being updated. Update/Deletion is disallowed until definition is ACTIVE and workspace status is ACTIVE.
258
+ */
259
+ UPDATING: "UPDATING"
260
+ };
261
+ var _InternalServerException = class _InternalServerException extends AmpServiceException {
262
+ /**
263
+ * @internal
264
+ */
265
+ constructor(opts) {
266
+ super({
267
+ name: "InternalServerException",
268
+ $fault: "server",
269
+ ...opts
270
+ });
271
+ this.name = "InternalServerException";
272
+ this.$fault = "server";
273
+ this.$retryable = {};
274
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
275
+ this.retryAfterSeconds = opts.retryAfterSeconds;
276
+ }
277
+ };
278
+ __name(_InternalServerException, "InternalServerException");
279
+ var InternalServerException = _InternalServerException;
280
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends AmpServiceException {
281
+ /**
282
+ * @internal
283
+ */
284
+ constructor(opts) {
285
+ super({
286
+ name: "ResourceNotFoundException",
287
+ $fault: "client",
288
+ ...opts
289
+ });
290
+ this.name = "ResourceNotFoundException";
291
+ this.$fault = "client";
292
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
293
+ this.resourceId = opts.resourceId;
294
+ this.resourceType = opts.resourceType;
295
+ }
296
+ };
297
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
298
+ var ResourceNotFoundException = _ResourceNotFoundException;
299
+ var _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends AmpServiceException {
300
+ /**
301
+ * @internal
302
+ */
303
+ constructor(opts) {
304
+ super({
305
+ name: "ServiceQuotaExceededException",
306
+ $fault: "client",
307
+ ...opts
308
+ });
309
+ this.name = "ServiceQuotaExceededException";
310
+ this.$fault = "client";
311
+ Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
312
+ this.resourceId = opts.resourceId;
313
+ this.resourceType = opts.resourceType;
314
+ this.serviceCode = opts.serviceCode;
315
+ this.quotaCode = opts.quotaCode;
316
+ }
317
+ };
318
+ __name(_ServiceQuotaExceededException, "ServiceQuotaExceededException");
319
+ var ServiceQuotaExceededException = _ServiceQuotaExceededException;
320
+ var _ThrottlingException = class _ThrottlingException extends AmpServiceException {
321
+ /**
322
+ * @internal
323
+ */
324
+ constructor(opts) {
325
+ super({
326
+ name: "ThrottlingException",
327
+ $fault: "client",
328
+ ...opts
329
+ });
330
+ this.name = "ThrottlingException";
331
+ this.$fault = "client";
332
+ this.$retryable = {};
333
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
334
+ this.serviceCode = opts.serviceCode;
335
+ this.quotaCode = opts.quotaCode;
336
+ this.retryAfterSeconds = opts.retryAfterSeconds;
337
+ }
338
+ };
339
+ __name(_ThrottlingException, "ThrottlingException");
340
+ var ThrottlingException = _ThrottlingException;
341
+ var ValidationExceptionReason = {
342
+ CANNOT_PARSE: "CANNOT_PARSE",
343
+ FIELD_VALIDATION_FAILED: "FIELD_VALIDATION_FAILED",
344
+ OTHER: "OTHER",
345
+ UNKNOWN_OPERATION: "UNKNOWN_OPERATION"
346
+ };
347
+ var _ValidationException = class _ValidationException extends AmpServiceException {
348
+ /**
349
+ * @internal
350
+ */
351
+ constructor(opts) {
352
+ super({
353
+ name: "ValidationException",
354
+ $fault: "client",
355
+ ...opts
356
+ });
357
+ this.name = "ValidationException";
358
+ this.$fault = "client";
359
+ Object.setPrototypeOf(this, _ValidationException.prototype);
360
+ this.reason = opts.reason;
361
+ this.fieldList = opts.fieldList;
362
+ }
363
+ };
364
+ __name(_ValidationException, "ValidationException");
365
+ var ValidationException = _ValidationException;
366
+ var Destination;
367
+ ((Destination3) => {
368
+ Destination3.visit = /* @__PURE__ */ __name((value, visitor) => {
369
+ if (value.ampConfiguration !== void 0)
370
+ return visitor.ampConfiguration(value.ampConfiguration);
371
+ return visitor._(value.$unknown[0], value.$unknown[1]);
372
+ }, "visit");
373
+ })(Destination || (Destination = {}));
374
+ var ScrapeConfiguration;
375
+ ((ScrapeConfiguration2) => {
376
+ ScrapeConfiguration2.visit = /* @__PURE__ */ __name((value, visitor) => {
377
+ if (value.configurationBlob !== void 0)
378
+ return visitor.configurationBlob(value.configurationBlob);
379
+ return visitor._(value.$unknown[0], value.$unknown[1]);
380
+ }, "visit");
381
+ })(ScrapeConfiguration || (ScrapeConfiguration = {}));
382
+ var Source;
383
+ ((Source3) => {
384
+ Source3.visit = /* @__PURE__ */ __name((value, visitor) => {
385
+ if (value.eksConfiguration !== void 0)
386
+ return visitor.eksConfiguration(value.eksConfiguration);
387
+ return visitor._(value.$unknown[0], value.$unknown[1]);
388
+ }, "visit");
389
+ })(Source || (Source = {}));
390
+ var ScraperStatusCode = {
391
+ /**
392
+ * Scraper has been created and is usable.
393
+ */
394
+ ACTIVE: "ACTIVE",
395
+ /**
396
+ * Scraper is being created. Deletion is disallowed until status is ACTIVE.
397
+ */
398
+ CREATING: "CREATING",
399
+ /**
400
+ * Scraper creation failed.
401
+ */
402
+ CREATION_FAILED: "CREATION_FAILED",
403
+ /**
404
+ * Scraper is being deleted. Deletions are allowed only when status is ACTIVE.
405
+ */
406
+ DELETING: "DELETING",
407
+ /**
408
+ * Scraper deletion failed.
409
+ */
410
+ DELETION_FAILED: "DELETION_FAILED"
411
+ };
412
+ var WorkspaceStatusCode = {
413
+ /**
414
+ * Workspace has been created and is usable.
415
+ */
416
+ ACTIVE: "ACTIVE",
417
+ /**
418
+ * Workspace is being created. Deletion is disallowed until status is ACTIVE.
419
+ */
420
+ CREATING: "CREATING",
421
+ /**
422
+ * Workspace creation failed. Refer to WorkspaceStatus.failureReason for more details.
423
+ */
424
+ CREATION_FAILED: "CREATION_FAILED",
425
+ /**
426
+ * Workspace is being deleted. Deletions are allowed only when status is ACTIVE.
427
+ */
428
+ DELETING: "DELETING",
429
+ /**
430
+ * Workspace is being updated. Updates are allowed only when status is ACTIVE.
431
+ */
432
+ UPDATING: "UPDATING"
433
+ };
434
+ var LoggingConfigurationStatusCode = {
435
+ /**
436
+ * Logging configuration has been created/updated. Update/Deletion is disallowed until logging configuration is ACTIVE and workspace status is ACTIVE.
437
+ */
438
+ ACTIVE: "ACTIVE",
439
+ /**
440
+ * Logging configuration is being created. Update/Deletion is disallowed until logging configuration is ACTIVE and workspace status is ACTIVE.
441
+ */
442
+ CREATING: "CREATING",
443
+ /**
444
+ * Logging configuration creation failed.
445
+ */
446
+ CREATION_FAILED: "CREATION_FAILED",
447
+ /**
448
+ * Logging configuration is being deleting. Update/Deletion is disallowed until logging configuration is ACTIVE and workspace status is ACTIVE.
449
+ */
450
+ DELETING: "DELETING",
451
+ /**
452
+ * Logging configuration update failed.
453
+ */
454
+ UPDATE_FAILED: "UPDATE_FAILED",
455
+ /**
456
+ * Logging configuration is being updated. Update/Deletion is disallowed until logging configuration is ACTIVE and workspace status is ACTIVE.
457
+ */
458
+ UPDATING: "UPDATING"
459
+ };
460
+ var RuleGroupsNamespaceStatusCode = {
461
+ /**
462
+ * Namespace has been created/updated. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE.
463
+ */
464
+ ACTIVE: "ACTIVE",
465
+ /**
466
+ * Namespace is being created. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE.
467
+ */
468
+ CREATING: "CREATING",
469
+ /**
470
+ * Namespace creation failed.
471
+ */
472
+ CREATION_FAILED: "CREATION_FAILED",
473
+ /**
474
+ * Namespace is being deleting. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE.
475
+ */
476
+ DELETING: "DELETING",
477
+ /**
478
+ * Namespace update failed.
479
+ */
480
+ UPDATE_FAILED: "UPDATE_FAILED",
481
+ /**
482
+ * Namespace is being updated. Update/Deletion is disallowed until namespace is ACTIVE and workspace status is ACTIVE.
483
+ */
484
+ UPDATING: "UPDATING"
485
+ };
486
+
487
+ // src/protocols/Aws_restJson1.ts
488
+ var se_CreateAlertManagerDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
489
+ const b = (0, import_core2.requestBuilder)(input, context);
490
+ const headers = {
491
+ "content-type": "application/json"
492
+ };
493
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
494
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
495
+ let body;
496
+ body = JSON.stringify(
497
+ (0, import_smithy_client.take)(input, {
498
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
499
+ data: (_) => context.base64Encoder(_)
500
+ })
501
+ );
502
+ b.m("POST").h(headers).b(body);
503
+ return b.build();
504
+ }, "se_CreateAlertManagerDefinitionCommand");
505
+ var se_CreateLoggingConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
506
+ const b = (0, import_core2.requestBuilder)(input, context);
507
+ const headers = {
508
+ "content-type": "application/json"
509
+ };
510
+ b.bp("/workspaces/{workspaceId}/logging");
511
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
512
+ let body;
513
+ body = JSON.stringify(
514
+ (0, import_smithy_client.take)(input, {
515
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
516
+ logGroupArn: []
517
+ })
518
+ );
519
+ b.m("POST").h(headers).b(body);
520
+ return b.build();
521
+ }, "se_CreateLoggingConfigurationCommand");
522
+ var se_CreateRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (input, context) => {
523
+ const b = (0, import_core2.requestBuilder)(input, context);
524
+ const headers = {
525
+ "content-type": "application/json"
526
+ };
527
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces");
528
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
529
+ let body;
530
+ body = JSON.stringify(
531
+ (0, import_smithy_client.take)(input, {
532
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
533
+ data: (_) => context.base64Encoder(_),
534
+ name: [],
535
+ tags: (_) => (0, import_smithy_client._json)(_)
536
+ })
537
+ );
538
+ b.m("POST").h(headers).b(body);
539
+ return b.build();
540
+ }, "se_CreateRuleGroupsNamespaceCommand");
541
+ var se_CreateScraperCommand = /* @__PURE__ */ __name(async (input, context) => {
542
+ const b = (0, import_core2.requestBuilder)(input, context);
543
+ const headers = {
544
+ "content-type": "application/json"
545
+ };
546
+ b.bp("/scrapers");
547
+ let body;
548
+ body = JSON.stringify(
549
+ (0, import_smithy_client.take)(input, {
550
+ alias: [],
551
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
552
+ destination: (_) => (0, import_smithy_client._json)(_),
553
+ scrapeConfiguration: (_) => se_ScrapeConfiguration(_, context),
554
+ source: (_) => (0, import_smithy_client._json)(_),
555
+ tags: (_) => (0, import_smithy_client._json)(_)
556
+ })
557
+ );
558
+ b.m("POST").h(headers).b(body);
559
+ return b.build();
560
+ }, "se_CreateScraperCommand");
561
+ var se_CreateWorkspaceCommand = /* @__PURE__ */ __name(async (input, context) => {
562
+ const b = (0, import_core2.requestBuilder)(input, context);
563
+ const headers = {
564
+ "content-type": "application/json"
565
+ };
566
+ b.bp("/workspaces");
567
+ let body;
568
+ body = JSON.stringify(
569
+ (0, import_smithy_client.take)(input, {
570
+ alias: [],
571
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
572
+ kmsKeyArn: [],
573
+ tags: (_) => (0, import_smithy_client._json)(_)
574
+ })
575
+ );
576
+ b.m("POST").h(headers).b(body);
577
+ return b.build();
578
+ }, "se_CreateWorkspaceCommand");
579
+ var se_DeleteAlertManagerDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
580
+ const b = (0, import_core2.requestBuilder)(input, context);
581
+ const headers = {};
582
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
583
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
584
+ const query = (0, import_smithy_client.map)({
585
+ [_cT]: [, input[_cT] ?? (0, import_uuid.v4)()]
586
+ });
587
+ let body;
588
+ b.m("DELETE").h(headers).q(query).b(body);
589
+ return b.build();
590
+ }, "se_DeleteAlertManagerDefinitionCommand");
591
+ var se_DeleteLoggingConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
592
+ const b = (0, import_core2.requestBuilder)(input, context);
593
+ const headers = {};
594
+ b.bp("/workspaces/{workspaceId}/logging");
595
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
596
+ const query = (0, import_smithy_client.map)({
597
+ [_cT]: [, input[_cT] ?? (0, import_uuid.v4)()]
598
+ });
599
+ let body;
600
+ b.m("DELETE").h(headers).q(query).b(body);
601
+ return b.build();
602
+ }, "se_DeleteLoggingConfigurationCommand");
603
+ var se_DeleteRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (input, context) => {
604
+ const b = (0, import_core2.requestBuilder)(input, context);
605
+ const headers = {};
606
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
607
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
608
+ b.p("name", () => input.name, "{name}", false);
609
+ const query = (0, import_smithy_client.map)({
610
+ [_cT]: [, input[_cT] ?? (0, import_uuid.v4)()]
611
+ });
612
+ let body;
613
+ b.m("DELETE").h(headers).q(query).b(body);
614
+ return b.build();
615
+ }, "se_DeleteRuleGroupsNamespaceCommand");
616
+ var se_DeleteScraperCommand = /* @__PURE__ */ __name(async (input, context) => {
617
+ const b = (0, import_core2.requestBuilder)(input, context);
618
+ const headers = {};
619
+ b.bp("/scrapers/{scraperId}");
620
+ b.p("scraperId", () => input.scraperId, "{scraperId}", false);
621
+ const query = (0, import_smithy_client.map)({
622
+ [_cT]: [, input[_cT] ?? (0, import_uuid.v4)()]
623
+ });
624
+ let body;
625
+ b.m("DELETE").h(headers).q(query).b(body);
626
+ return b.build();
627
+ }, "se_DeleteScraperCommand");
628
+ var se_DeleteWorkspaceCommand = /* @__PURE__ */ __name(async (input, context) => {
629
+ const b = (0, import_core2.requestBuilder)(input, context);
630
+ const headers = {};
631
+ b.bp("/workspaces/{workspaceId}");
632
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
633
+ const query = (0, import_smithy_client.map)({
634
+ [_cT]: [, input[_cT] ?? (0, import_uuid.v4)()]
635
+ });
636
+ let body;
637
+ b.m("DELETE").h(headers).q(query).b(body);
638
+ return b.build();
639
+ }, "se_DeleteWorkspaceCommand");
640
+ var se_DescribeAlertManagerDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
641
+ const b = (0, import_core2.requestBuilder)(input, context);
642
+ const headers = {};
643
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
644
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
645
+ let body;
646
+ b.m("GET").h(headers).b(body);
647
+ return b.build();
648
+ }, "se_DescribeAlertManagerDefinitionCommand");
649
+ var se_DescribeLoggingConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
650
+ const b = (0, import_core2.requestBuilder)(input, context);
651
+ const headers = {};
652
+ b.bp("/workspaces/{workspaceId}/logging");
653
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
654
+ let body;
655
+ b.m("GET").h(headers).b(body);
656
+ return b.build();
657
+ }, "se_DescribeLoggingConfigurationCommand");
658
+ var se_DescribeRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (input, context) => {
659
+ const b = (0, import_core2.requestBuilder)(input, context);
660
+ const headers = {};
661
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
662
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
663
+ b.p("name", () => input.name, "{name}", false);
664
+ let body;
665
+ b.m("GET").h(headers).b(body);
666
+ return b.build();
667
+ }, "se_DescribeRuleGroupsNamespaceCommand");
668
+ var se_DescribeScraperCommand = /* @__PURE__ */ __name(async (input, context) => {
669
+ const b = (0, import_core2.requestBuilder)(input, context);
670
+ const headers = {};
671
+ b.bp("/scrapers/{scraperId}");
672
+ b.p("scraperId", () => input.scraperId, "{scraperId}", false);
673
+ let body;
674
+ b.m("GET").h(headers).b(body);
675
+ return b.build();
676
+ }, "se_DescribeScraperCommand");
677
+ var se_DescribeWorkspaceCommand = /* @__PURE__ */ __name(async (input, context) => {
678
+ const b = (0, import_core2.requestBuilder)(input, context);
679
+ const headers = {};
680
+ b.bp("/workspaces/{workspaceId}");
681
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
682
+ let body;
683
+ b.m("GET").h(headers).b(body);
684
+ return b.build();
685
+ }, "se_DescribeWorkspaceCommand");
686
+ var se_GetDefaultScraperConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
687
+ const b = (0, import_core2.requestBuilder)(input, context);
688
+ const headers = {
689
+ "content-type": "application/json"
690
+ };
691
+ b.bp("/scraperconfiguration");
692
+ let body;
693
+ body = "";
694
+ b.m("GET").h(headers).b(body);
695
+ return b.build();
696
+ }, "se_GetDefaultScraperConfigurationCommand");
697
+ var se_ListRuleGroupsNamespacesCommand = /* @__PURE__ */ __name(async (input, context) => {
698
+ const b = (0, import_core2.requestBuilder)(input, context);
699
+ const headers = {};
700
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces");
701
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
702
+ const query = (0, import_smithy_client.map)({
703
+ [_n]: [, input[_n]],
704
+ [_nT]: [, input[_nT]],
705
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()]
706
+ });
707
+ let body;
708
+ b.m("GET").h(headers).q(query).b(body);
709
+ return b.build();
710
+ }, "se_ListRuleGroupsNamespacesCommand");
711
+ var se_ListScrapersCommand = /* @__PURE__ */ __name(async (input, context) => {
712
+ const b = (0, import_core2.requestBuilder)(input, context);
713
+ const headers = {};
714
+ b.bp("/scrapers");
715
+ const query = (0, import_smithy_client.map)({
716
+ ...(0, import_smithy_client.convertMap)(input.filters),
717
+ [_nT]: [, input[_nT]],
718
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()]
719
+ });
720
+ let body;
721
+ b.m("GET").h(headers).q(query).b(body);
722
+ return b.build();
723
+ }, "se_ListScrapersCommand");
724
+ var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
725
+ const b = (0, import_core2.requestBuilder)(input, context);
726
+ const headers = {};
727
+ b.bp("/tags/{resourceArn}");
728
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
729
+ let body;
730
+ b.m("GET").h(headers).b(body);
731
+ return b.build();
732
+ }, "se_ListTagsForResourceCommand");
733
+ var se_ListWorkspacesCommand = /* @__PURE__ */ __name(async (input, context) => {
734
+ const b = (0, import_core2.requestBuilder)(input, context);
735
+ const headers = {};
736
+ b.bp("/workspaces");
737
+ const query = (0, import_smithy_client.map)({
738
+ [_nT]: [, input[_nT]],
739
+ [_a]: [, input[_a]],
740
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()]
741
+ });
742
+ let body;
743
+ b.m("GET").h(headers).q(query).b(body);
744
+ return b.build();
745
+ }, "se_ListWorkspacesCommand");
746
+ var se_PutAlertManagerDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
747
+ const b = (0, import_core2.requestBuilder)(input, context);
748
+ const headers = {
749
+ "content-type": "application/json"
750
+ };
751
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
752
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
753
+ let body;
754
+ body = JSON.stringify(
755
+ (0, import_smithy_client.take)(input, {
756
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
757
+ data: (_) => context.base64Encoder(_)
758
+ })
759
+ );
760
+ b.m("PUT").h(headers).b(body);
761
+ return b.build();
762
+ }, "se_PutAlertManagerDefinitionCommand");
763
+ var se_PutRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (input, context) => {
764
+ const b = (0, import_core2.requestBuilder)(input, context);
765
+ const headers = {
766
+ "content-type": "application/json"
767
+ };
768
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
769
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
770
+ b.p("name", () => input.name, "{name}", false);
771
+ let body;
772
+ body = JSON.stringify(
773
+ (0, import_smithy_client.take)(input, {
774
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
775
+ data: (_) => context.base64Encoder(_)
776
+ })
777
+ );
778
+ b.m("PUT").h(headers).b(body);
779
+ return b.build();
780
+ }, "se_PutRuleGroupsNamespaceCommand");
781
+ var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
782
+ const b = (0, import_core2.requestBuilder)(input, context);
783
+ const headers = {
784
+ "content-type": "application/json"
785
+ };
786
+ b.bp("/tags/{resourceArn}");
787
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
788
+ let body;
789
+ body = JSON.stringify(
790
+ (0, import_smithy_client.take)(input, {
791
+ tags: (_) => (0, import_smithy_client._json)(_)
792
+ })
793
+ );
794
+ b.m("POST").h(headers).b(body);
795
+ return b.build();
796
+ }, "se_TagResourceCommand");
797
+ var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
798
+ const b = (0, import_core2.requestBuilder)(input, context);
799
+ const headers = {};
800
+ b.bp("/tags/{resourceArn}");
801
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
802
+ const query = (0, import_smithy_client.map)({
803
+ [_tK]: [
804
+ (0, import_smithy_client.expectNonNull)(input.tagKeys, `tagKeys`) != null,
805
+ () => (input[_tK] || []).map((_entry) => _entry)
806
+ ]
807
+ });
808
+ let body;
809
+ b.m("DELETE").h(headers).q(query).b(body);
810
+ return b.build();
811
+ }, "se_UntagResourceCommand");
812
+ var se_UpdateLoggingConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
813
+ const b = (0, import_core2.requestBuilder)(input, context);
814
+ const headers = {
815
+ "content-type": "application/json"
816
+ };
817
+ b.bp("/workspaces/{workspaceId}/logging");
818
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
819
+ let body;
820
+ body = JSON.stringify(
821
+ (0, import_smithy_client.take)(input, {
822
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
823
+ logGroupArn: []
824
+ })
825
+ );
826
+ b.m("PUT").h(headers).b(body);
827
+ return b.build();
828
+ }, "se_UpdateLoggingConfigurationCommand");
829
+ var se_UpdateWorkspaceAliasCommand = /* @__PURE__ */ __name(async (input, context) => {
830
+ const b = (0, import_core2.requestBuilder)(input, context);
831
+ const headers = {
832
+ "content-type": "application/json"
833
+ };
834
+ b.bp("/workspaces/{workspaceId}/alias");
835
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
836
+ let body;
837
+ body = JSON.stringify(
838
+ (0, import_smithy_client.take)(input, {
839
+ alias: [],
840
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()]
841
+ })
842
+ );
843
+ b.m("POST").h(headers).b(body);
844
+ return b.build();
845
+ }, "se_UpdateWorkspaceAliasCommand");
846
+ var de_CreateAlertManagerDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
847
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
848
+ return de_CreateAlertManagerDefinitionCommandError(output, context);
849
+ }
850
+ const contents = (0, import_smithy_client.map)({
851
+ $metadata: deserializeMetadata(output)
852
+ });
853
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
854
+ const doc = (0, import_smithy_client.take)(data, {
855
+ status: import_smithy_client._json
856
+ });
857
+ Object.assign(contents, doc);
858
+ return contents;
859
+ }, "de_CreateAlertManagerDefinitionCommand");
860
+ var de_CreateAlertManagerDefinitionCommandError = /* @__PURE__ */ __name(async (output, context) => {
861
+ const parsedOutput = {
862
+ ...output,
863
+ body: await parseErrorBody(output.body, context)
864
+ };
865
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
866
+ switch (errorCode) {
867
+ case "AccessDeniedException":
868
+ case "com.amazonaws.amp#AccessDeniedException":
869
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
870
+ case "ConflictException":
871
+ case "com.amazonaws.amp#ConflictException":
872
+ throw await de_ConflictExceptionRes(parsedOutput, context);
873
+ case "InternalServerException":
874
+ case "com.amazonaws.amp#InternalServerException":
875
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
876
+ case "ResourceNotFoundException":
877
+ case "com.amazonaws.amp#ResourceNotFoundException":
878
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
879
+ case "ServiceQuotaExceededException":
880
+ case "com.amazonaws.amp#ServiceQuotaExceededException":
881
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
882
+ case "ThrottlingException":
883
+ case "com.amazonaws.amp#ThrottlingException":
884
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
885
+ case "ValidationException":
886
+ case "com.amazonaws.amp#ValidationException":
887
+ throw await de_ValidationExceptionRes(parsedOutput, context);
888
+ default:
889
+ const parsedBody = parsedOutput.body;
890
+ return throwDefaultError({
891
+ output,
892
+ parsedBody,
893
+ errorCode
894
+ });
895
+ }
896
+ }, "de_CreateAlertManagerDefinitionCommandError");
897
+ var de_CreateLoggingConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
898
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
899
+ return de_CreateLoggingConfigurationCommandError(output, context);
900
+ }
901
+ const contents = (0, import_smithy_client.map)({
902
+ $metadata: deserializeMetadata(output)
903
+ });
904
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
905
+ const doc = (0, import_smithy_client.take)(data, {
906
+ status: import_smithy_client._json
907
+ });
908
+ Object.assign(contents, doc);
909
+ return contents;
910
+ }, "de_CreateLoggingConfigurationCommand");
911
+ var de_CreateLoggingConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
912
+ const parsedOutput = {
913
+ ...output,
914
+ body: await parseErrorBody(output.body, context)
915
+ };
916
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
917
+ switch (errorCode) {
918
+ case "AccessDeniedException":
919
+ case "com.amazonaws.amp#AccessDeniedException":
920
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
921
+ case "InternalServerException":
922
+ case "com.amazonaws.amp#InternalServerException":
923
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
924
+ case "ResourceNotFoundException":
925
+ case "com.amazonaws.amp#ResourceNotFoundException":
926
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
927
+ case "ValidationException":
928
+ case "com.amazonaws.amp#ValidationException":
929
+ throw await de_ValidationExceptionRes(parsedOutput, context);
930
+ default:
931
+ const parsedBody = parsedOutput.body;
932
+ return throwDefaultError({
933
+ output,
934
+ parsedBody,
935
+ errorCode
936
+ });
937
+ }
938
+ }, "de_CreateLoggingConfigurationCommandError");
939
+ var de_CreateRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (output, context) => {
940
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
941
+ return de_CreateRuleGroupsNamespaceCommandError(output, context);
942
+ }
943
+ const contents = (0, import_smithy_client.map)({
944
+ $metadata: deserializeMetadata(output)
945
+ });
946
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
947
+ const doc = (0, import_smithy_client.take)(data, {
948
+ arn: import_smithy_client.expectString,
949
+ name: import_smithy_client.expectString,
950
+ status: import_smithy_client._json,
951
+ tags: import_smithy_client._json
952
+ });
953
+ Object.assign(contents, doc);
954
+ return contents;
955
+ }, "de_CreateRuleGroupsNamespaceCommand");
956
+ var de_CreateRuleGroupsNamespaceCommandError = /* @__PURE__ */ __name(async (output, context) => {
957
+ const parsedOutput = {
958
+ ...output,
959
+ body: await parseErrorBody(output.body, context)
960
+ };
961
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
962
+ switch (errorCode) {
963
+ case "AccessDeniedException":
964
+ case "com.amazonaws.amp#AccessDeniedException":
965
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
966
+ case "ConflictException":
967
+ case "com.amazonaws.amp#ConflictException":
968
+ throw await de_ConflictExceptionRes(parsedOutput, context);
969
+ case "InternalServerException":
970
+ case "com.amazonaws.amp#InternalServerException":
971
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
972
+ case "ResourceNotFoundException":
973
+ case "com.amazonaws.amp#ResourceNotFoundException":
974
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
975
+ case "ServiceQuotaExceededException":
976
+ case "com.amazonaws.amp#ServiceQuotaExceededException":
977
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
978
+ case "ThrottlingException":
979
+ case "com.amazonaws.amp#ThrottlingException":
980
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
981
+ case "ValidationException":
982
+ case "com.amazonaws.amp#ValidationException":
983
+ throw await de_ValidationExceptionRes(parsedOutput, context);
984
+ default:
985
+ const parsedBody = parsedOutput.body;
986
+ return throwDefaultError({
987
+ output,
988
+ parsedBody,
989
+ errorCode
990
+ });
991
+ }
992
+ }, "de_CreateRuleGroupsNamespaceCommandError");
993
+ var de_CreateScraperCommand = /* @__PURE__ */ __name(async (output, context) => {
994
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
995
+ return de_CreateScraperCommandError(output, context);
996
+ }
997
+ const contents = (0, import_smithy_client.map)({
998
+ $metadata: deserializeMetadata(output)
999
+ });
1000
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1001
+ const doc = (0, import_smithy_client.take)(data, {
1002
+ arn: import_smithy_client.expectString,
1003
+ scraperId: import_smithy_client.expectString,
1004
+ status: import_smithy_client._json,
1005
+ tags: import_smithy_client._json
1006
+ });
1007
+ Object.assign(contents, doc);
1008
+ return contents;
1009
+ }, "de_CreateScraperCommand");
1010
+ var de_CreateScraperCommandError = /* @__PURE__ */ __name(async (output, context) => {
1011
+ const parsedOutput = {
1012
+ ...output,
1013
+ body: await parseErrorBody(output.body, context)
1014
+ };
1015
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1016
+ switch (errorCode) {
1017
+ case "AccessDeniedException":
1018
+ case "com.amazonaws.amp#AccessDeniedException":
1019
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1020
+ case "ConflictException":
1021
+ case "com.amazonaws.amp#ConflictException":
1022
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1023
+ case "InternalServerException":
1024
+ case "com.amazonaws.amp#InternalServerException":
1025
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1026
+ case "ResourceNotFoundException":
1027
+ case "com.amazonaws.amp#ResourceNotFoundException":
1028
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1029
+ case "ServiceQuotaExceededException":
1030
+ case "com.amazonaws.amp#ServiceQuotaExceededException":
1031
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1032
+ case "ThrottlingException":
1033
+ case "com.amazonaws.amp#ThrottlingException":
1034
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1035
+ case "ValidationException":
1036
+ case "com.amazonaws.amp#ValidationException":
1037
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1038
+ default:
1039
+ const parsedBody = parsedOutput.body;
1040
+ return throwDefaultError({
1041
+ output,
1042
+ parsedBody,
1043
+ errorCode
1044
+ });
1045
+ }
1046
+ }, "de_CreateScraperCommandError");
1047
+ var de_CreateWorkspaceCommand = /* @__PURE__ */ __name(async (output, context) => {
1048
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1049
+ return de_CreateWorkspaceCommandError(output, context);
1050
+ }
1051
+ const contents = (0, import_smithy_client.map)({
1052
+ $metadata: deserializeMetadata(output)
1053
+ });
1054
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1055
+ const doc = (0, import_smithy_client.take)(data, {
1056
+ arn: import_smithy_client.expectString,
1057
+ kmsKeyArn: import_smithy_client.expectString,
1058
+ status: import_smithy_client._json,
1059
+ tags: import_smithy_client._json,
1060
+ workspaceId: import_smithy_client.expectString
1061
+ });
1062
+ Object.assign(contents, doc);
1063
+ return contents;
1064
+ }, "de_CreateWorkspaceCommand");
1065
+ var de_CreateWorkspaceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1066
+ const parsedOutput = {
1067
+ ...output,
1068
+ body: await parseErrorBody(output.body, context)
1069
+ };
1070
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1071
+ switch (errorCode) {
1072
+ case "AccessDeniedException":
1073
+ case "com.amazonaws.amp#AccessDeniedException":
1074
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1075
+ case "ConflictException":
1076
+ case "com.amazonaws.amp#ConflictException":
1077
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1078
+ case "InternalServerException":
1079
+ case "com.amazonaws.amp#InternalServerException":
1080
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1081
+ case "ServiceQuotaExceededException":
1082
+ case "com.amazonaws.amp#ServiceQuotaExceededException":
1083
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1084
+ case "ThrottlingException":
1085
+ case "com.amazonaws.amp#ThrottlingException":
1086
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1087
+ case "ValidationException":
1088
+ case "com.amazonaws.amp#ValidationException":
1089
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1090
+ default:
1091
+ const parsedBody = parsedOutput.body;
1092
+ return throwDefaultError({
1093
+ output,
1094
+ parsedBody,
1095
+ errorCode
1096
+ });
1097
+ }
1098
+ }, "de_CreateWorkspaceCommandError");
1099
+ var de_DeleteAlertManagerDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
1100
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1101
+ return de_DeleteAlertManagerDefinitionCommandError(output, context);
1102
+ }
1103
+ const contents = (0, import_smithy_client.map)({
1104
+ $metadata: deserializeMetadata(output)
1105
+ });
1106
+ await (0, import_smithy_client.collectBody)(output.body, context);
1107
+ return contents;
1108
+ }, "de_DeleteAlertManagerDefinitionCommand");
1109
+ var de_DeleteAlertManagerDefinitionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1110
+ const parsedOutput = {
1111
+ ...output,
1112
+ body: await parseErrorBody(output.body, context)
1113
+ };
1114
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1115
+ switch (errorCode) {
1116
+ case "AccessDeniedException":
1117
+ case "com.amazonaws.amp#AccessDeniedException":
1118
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1119
+ case "ConflictException":
1120
+ case "com.amazonaws.amp#ConflictException":
1121
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1122
+ case "InternalServerException":
1123
+ case "com.amazonaws.amp#InternalServerException":
1124
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1125
+ case "ResourceNotFoundException":
1126
+ case "com.amazonaws.amp#ResourceNotFoundException":
1127
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1128
+ case "ThrottlingException":
1129
+ case "com.amazonaws.amp#ThrottlingException":
1130
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1131
+ case "ValidationException":
1132
+ case "com.amazonaws.amp#ValidationException":
1133
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1134
+ default:
1135
+ const parsedBody = parsedOutput.body;
1136
+ return throwDefaultError({
1137
+ output,
1138
+ parsedBody,
1139
+ errorCode
1140
+ });
1141
+ }
1142
+ }, "de_DeleteAlertManagerDefinitionCommandError");
1143
+ var de_DeleteLoggingConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
1144
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1145
+ return de_DeleteLoggingConfigurationCommandError(output, context);
1146
+ }
1147
+ const contents = (0, import_smithy_client.map)({
1148
+ $metadata: deserializeMetadata(output)
1149
+ });
1150
+ await (0, import_smithy_client.collectBody)(output.body, context);
1151
+ return contents;
1152
+ }, "de_DeleteLoggingConfigurationCommand");
1153
+ var de_DeleteLoggingConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1154
+ const parsedOutput = {
1155
+ ...output,
1156
+ body: await parseErrorBody(output.body, context)
1157
+ };
1158
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1159
+ switch (errorCode) {
1160
+ case "AccessDeniedException":
1161
+ case "com.amazonaws.amp#AccessDeniedException":
1162
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1163
+ case "ConflictException":
1164
+ case "com.amazonaws.amp#ConflictException":
1165
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1166
+ case "InternalServerException":
1167
+ case "com.amazonaws.amp#InternalServerException":
1168
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1169
+ case "ResourceNotFoundException":
1170
+ case "com.amazonaws.amp#ResourceNotFoundException":
1171
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1172
+ case "ValidationException":
1173
+ case "com.amazonaws.amp#ValidationException":
1174
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1175
+ default:
1176
+ const parsedBody = parsedOutput.body;
1177
+ return throwDefaultError({
1178
+ output,
1179
+ parsedBody,
1180
+ errorCode
1181
+ });
1182
+ }
1183
+ }, "de_DeleteLoggingConfigurationCommandError");
1184
+ var de_DeleteRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (output, context) => {
1185
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1186
+ return de_DeleteRuleGroupsNamespaceCommandError(output, context);
1187
+ }
1188
+ const contents = (0, import_smithy_client.map)({
1189
+ $metadata: deserializeMetadata(output)
1190
+ });
1191
+ await (0, import_smithy_client.collectBody)(output.body, context);
1192
+ return contents;
1193
+ }, "de_DeleteRuleGroupsNamespaceCommand");
1194
+ var de_DeleteRuleGroupsNamespaceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1195
+ const parsedOutput = {
1196
+ ...output,
1197
+ body: await parseErrorBody(output.body, context)
1198
+ };
1199
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1200
+ switch (errorCode) {
1201
+ case "AccessDeniedException":
1202
+ case "com.amazonaws.amp#AccessDeniedException":
1203
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1204
+ case "ConflictException":
1205
+ case "com.amazonaws.amp#ConflictException":
1206
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1207
+ case "InternalServerException":
1208
+ case "com.amazonaws.amp#InternalServerException":
1209
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1210
+ case "ResourceNotFoundException":
1211
+ case "com.amazonaws.amp#ResourceNotFoundException":
1212
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1213
+ case "ThrottlingException":
1214
+ case "com.amazonaws.amp#ThrottlingException":
1215
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1216
+ case "ValidationException":
1217
+ case "com.amazonaws.amp#ValidationException":
1218
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1219
+ default:
1220
+ const parsedBody = parsedOutput.body;
1221
+ return throwDefaultError({
1222
+ output,
1223
+ parsedBody,
1224
+ errorCode
1225
+ });
1226
+ }
1227
+ }, "de_DeleteRuleGroupsNamespaceCommandError");
1228
+ var de_DeleteScraperCommand = /* @__PURE__ */ __name(async (output, context) => {
1229
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1230
+ return de_DeleteScraperCommandError(output, context);
1231
+ }
1232
+ const contents = (0, import_smithy_client.map)({
1233
+ $metadata: deserializeMetadata(output)
1234
+ });
1235
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1236
+ const doc = (0, import_smithy_client.take)(data, {
1237
+ scraperId: import_smithy_client.expectString,
1238
+ status: import_smithy_client._json
1239
+ });
1240
+ Object.assign(contents, doc);
1241
+ return contents;
1242
+ }, "de_DeleteScraperCommand");
1243
+ var de_DeleteScraperCommandError = /* @__PURE__ */ __name(async (output, context) => {
1244
+ const parsedOutput = {
1245
+ ...output,
1246
+ body: await parseErrorBody(output.body, context)
1247
+ };
1248
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1249
+ switch (errorCode) {
1250
+ case "AccessDeniedException":
1251
+ case "com.amazonaws.amp#AccessDeniedException":
1252
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1253
+ case "ConflictException":
1254
+ case "com.amazonaws.amp#ConflictException":
1255
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1256
+ case "InternalServerException":
1257
+ case "com.amazonaws.amp#InternalServerException":
1258
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1259
+ case "ResourceNotFoundException":
1260
+ case "com.amazonaws.amp#ResourceNotFoundException":
1261
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1262
+ case "ThrottlingException":
1263
+ case "com.amazonaws.amp#ThrottlingException":
1264
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1265
+ case "ValidationException":
1266
+ case "com.amazonaws.amp#ValidationException":
1267
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1268
+ default:
1269
+ const parsedBody = parsedOutput.body;
1270
+ return throwDefaultError({
1271
+ output,
1272
+ parsedBody,
1273
+ errorCode
1274
+ });
1275
+ }
1276
+ }, "de_DeleteScraperCommandError");
1277
+ var de_DeleteWorkspaceCommand = /* @__PURE__ */ __name(async (output, context) => {
1278
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1279
+ return de_DeleteWorkspaceCommandError(output, context);
1280
+ }
1281
+ const contents = (0, import_smithy_client.map)({
1282
+ $metadata: deserializeMetadata(output)
1283
+ });
1284
+ await (0, import_smithy_client.collectBody)(output.body, context);
1285
+ return contents;
1286
+ }, "de_DeleteWorkspaceCommand");
1287
+ var de_DeleteWorkspaceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1288
+ const parsedOutput = {
1289
+ ...output,
1290
+ body: await parseErrorBody(output.body, context)
1291
+ };
1292
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1293
+ switch (errorCode) {
1294
+ case "AccessDeniedException":
1295
+ case "com.amazonaws.amp#AccessDeniedException":
1296
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1297
+ case "ConflictException":
1298
+ case "com.amazonaws.amp#ConflictException":
1299
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1300
+ case "InternalServerException":
1301
+ case "com.amazonaws.amp#InternalServerException":
1302
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1303
+ case "ResourceNotFoundException":
1304
+ case "com.amazonaws.amp#ResourceNotFoundException":
1305
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1306
+ case "ThrottlingException":
1307
+ case "com.amazonaws.amp#ThrottlingException":
1308
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1309
+ case "ValidationException":
1310
+ case "com.amazonaws.amp#ValidationException":
1311
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1312
+ default:
1313
+ const parsedBody = parsedOutput.body;
1314
+ return throwDefaultError({
1315
+ output,
1316
+ parsedBody,
1317
+ errorCode
1318
+ });
1319
+ }
1320
+ }, "de_DeleteWorkspaceCommandError");
1321
+ var de_DescribeAlertManagerDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
1322
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1323
+ return de_DescribeAlertManagerDefinitionCommandError(output, context);
1324
+ }
1325
+ const contents = (0, import_smithy_client.map)({
1326
+ $metadata: deserializeMetadata(output)
1327
+ });
1328
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1329
+ const doc = (0, import_smithy_client.take)(data, {
1330
+ alertManagerDefinition: (_) => de_AlertManagerDefinitionDescription(_, context)
1331
+ });
1332
+ Object.assign(contents, doc);
1333
+ return contents;
1334
+ }, "de_DescribeAlertManagerDefinitionCommand");
1335
+ var de_DescribeAlertManagerDefinitionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1336
+ const parsedOutput = {
1337
+ ...output,
1338
+ body: await parseErrorBody(output.body, context)
1339
+ };
1340
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1341
+ switch (errorCode) {
1342
+ case "AccessDeniedException":
1343
+ case "com.amazonaws.amp#AccessDeniedException":
1344
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1345
+ case "InternalServerException":
1346
+ case "com.amazonaws.amp#InternalServerException":
1347
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1348
+ case "ResourceNotFoundException":
1349
+ case "com.amazonaws.amp#ResourceNotFoundException":
1350
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1351
+ case "ThrottlingException":
1352
+ case "com.amazonaws.amp#ThrottlingException":
1353
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1354
+ case "ValidationException":
1355
+ case "com.amazonaws.amp#ValidationException":
1356
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1357
+ default:
1358
+ const parsedBody = parsedOutput.body;
1359
+ return throwDefaultError({
1360
+ output,
1361
+ parsedBody,
1362
+ errorCode
1363
+ });
1364
+ }
1365
+ }, "de_DescribeAlertManagerDefinitionCommandError");
1366
+ var de_DescribeLoggingConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
1367
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1368
+ return de_DescribeLoggingConfigurationCommandError(output, context);
1369
+ }
1370
+ const contents = (0, import_smithy_client.map)({
1371
+ $metadata: deserializeMetadata(output)
1372
+ });
1373
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1374
+ const doc = (0, import_smithy_client.take)(data, {
1375
+ loggingConfiguration: (_) => de_LoggingConfigurationMetadata(_, context)
1376
+ });
1377
+ Object.assign(contents, doc);
1378
+ return contents;
1379
+ }, "de_DescribeLoggingConfigurationCommand");
1380
+ var de_DescribeLoggingConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1381
+ const parsedOutput = {
1382
+ ...output,
1383
+ body: await parseErrorBody(output.body, context)
1384
+ };
1385
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1386
+ switch (errorCode) {
1387
+ case "AccessDeniedException":
1388
+ case "com.amazonaws.amp#AccessDeniedException":
1389
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1390
+ case "InternalServerException":
1391
+ case "com.amazonaws.amp#InternalServerException":
1392
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1393
+ case "ResourceNotFoundException":
1394
+ case "com.amazonaws.amp#ResourceNotFoundException":
1395
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1396
+ case "ValidationException":
1397
+ case "com.amazonaws.amp#ValidationException":
1398
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1399
+ default:
1400
+ const parsedBody = parsedOutput.body;
1401
+ return throwDefaultError({
1402
+ output,
1403
+ parsedBody,
1404
+ errorCode
1405
+ });
1406
+ }
1407
+ }, "de_DescribeLoggingConfigurationCommandError");
1408
+ var de_DescribeRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (output, context) => {
1409
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1410
+ return de_DescribeRuleGroupsNamespaceCommandError(output, context);
1411
+ }
1412
+ const contents = (0, import_smithy_client.map)({
1413
+ $metadata: deserializeMetadata(output)
1414
+ });
1415
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1416
+ const doc = (0, import_smithy_client.take)(data, {
1417
+ ruleGroupsNamespace: (_) => de_RuleGroupsNamespaceDescription(_, context)
1418
+ });
1419
+ Object.assign(contents, doc);
1420
+ return contents;
1421
+ }, "de_DescribeRuleGroupsNamespaceCommand");
1422
+ var de_DescribeRuleGroupsNamespaceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1423
+ const parsedOutput = {
1424
+ ...output,
1425
+ body: await parseErrorBody(output.body, context)
1426
+ };
1427
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1428
+ switch (errorCode) {
1429
+ case "AccessDeniedException":
1430
+ case "com.amazonaws.amp#AccessDeniedException":
1431
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1432
+ case "InternalServerException":
1433
+ case "com.amazonaws.amp#InternalServerException":
1434
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1435
+ case "ResourceNotFoundException":
1436
+ case "com.amazonaws.amp#ResourceNotFoundException":
1437
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1438
+ case "ThrottlingException":
1439
+ case "com.amazonaws.amp#ThrottlingException":
1440
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1441
+ case "ValidationException":
1442
+ case "com.amazonaws.amp#ValidationException":
1443
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1444
+ default:
1445
+ const parsedBody = parsedOutput.body;
1446
+ return throwDefaultError({
1447
+ output,
1448
+ parsedBody,
1449
+ errorCode
1450
+ });
1451
+ }
1452
+ }, "de_DescribeRuleGroupsNamespaceCommandError");
1453
+ var de_DescribeScraperCommand = /* @__PURE__ */ __name(async (output, context) => {
1454
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1455
+ return de_DescribeScraperCommandError(output, context);
1456
+ }
1457
+ const contents = (0, import_smithy_client.map)({
1458
+ $metadata: deserializeMetadata(output)
1459
+ });
1460
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1461
+ const doc = (0, import_smithy_client.take)(data, {
1462
+ scraper: (_) => de_ScraperDescription(_, context)
1463
+ });
1464
+ Object.assign(contents, doc);
1465
+ return contents;
1466
+ }, "de_DescribeScraperCommand");
1467
+ var de_DescribeScraperCommandError = /* @__PURE__ */ __name(async (output, context) => {
1468
+ const parsedOutput = {
1469
+ ...output,
1470
+ body: await parseErrorBody(output.body, context)
1471
+ };
1472
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1473
+ switch (errorCode) {
1474
+ case "AccessDeniedException":
1475
+ case "com.amazonaws.amp#AccessDeniedException":
1476
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1477
+ case "InternalServerException":
1478
+ case "com.amazonaws.amp#InternalServerException":
1479
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1480
+ case "ResourceNotFoundException":
1481
+ case "com.amazonaws.amp#ResourceNotFoundException":
1482
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1483
+ case "ThrottlingException":
1484
+ case "com.amazonaws.amp#ThrottlingException":
1485
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1486
+ case "ValidationException":
1487
+ case "com.amazonaws.amp#ValidationException":
1488
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1489
+ default:
1490
+ const parsedBody = parsedOutput.body;
1491
+ return throwDefaultError({
1492
+ output,
1493
+ parsedBody,
1494
+ errorCode
1495
+ });
1496
+ }
1497
+ }, "de_DescribeScraperCommandError");
1498
+ var de_DescribeWorkspaceCommand = /* @__PURE__ */ __name(async (output, context) => {
1499
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1500
+ return de_DescribeWorkspaceCommandError(output, context);
1501
+ }
1502
+ const contents = (0, import_smithy_client.map)({
1503
+ $metadata: deserializeMetadata(output)
1504
+ });
1505
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1506
+ const doc = (0, import_smithy_client.take)(data, {
1507
+ workspace: (_) => de_WorkspaceDescription(_, context)
1508
+ });
1509
+ Object.assign(contents, doc);
1510
+ return contents;
1511
+ }, "de_DescribeWorkspaceCommand");
1512
+ var de_DescribeWorkspaceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1513
+ const parsedOutput = {
1514
+ ...output,
1515
+ body: await parseErrorBody(output.body, context)
1516
+ };
1517
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1518
+ switch (errorCode) {
1519
+ case "AccessDeniedException":
1520
+ case "com.amazonaws.amp#AccessDeniedException":
1521
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1522
+ case "InternalServerException":
1523
+ case "com.amazonaws.amp#InternalServerException":
1524
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1525
+ case "ResourceNotFoundException":
1526
+ case "com.amazonaws.amp#ResourceNotFoundException":
1527
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1528
+ case "ThrottlingException":
1529
+ case "com.amazonaws.amp#ThrottlingException":
1530
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1531
+ case "ValidationException":
1532
+ case "com.amazonaws.amp#ValidationException":
1533
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1534
+ default:
1535
+ const parsedBody = parsedOutput.body;
1536
+ return throwDefaultError({
1537
+ output,
1538
+ parsedBody,
1539
+ errorCode
1540
+ });
1541
+ }
1542
+ }, "de_DescribeWorkspaceCommandError");
1543
+ var de_GetDefaultScraperConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
1544
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1545
+ return de_GetDefaultScraperConfigurationCommandError(output, context);
1546
+ }
1547
+ const contents = (0, import_smithy_client.map)({
1548
+ $metadata: deserializeMetadata(output)
1549
+ });
1550
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1551
+ const doc = (0, import_smithy_client.take)(data, {
1552
+ configuration: context.base64Decoder
1553
+ });
1554
+ Object.assign(contents, doc);
1555
+ return contents;
1556
+ }, "de_GetDefaultScraperConfigurationCommand");
1557
+ var de_GetDefaultScraperConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1558
+ const parsedOutput = {
1559
+ ...output,
1560
+ body: await parseErrorBody(output.body, context)
1561
+ };
1562
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1563
+ switch (errorCode) {
1564
+ case "AccessDeniedException":
1565
+ case "com.amazonaws.amp#AccessDeniedException":
1566
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1567
+ case "InternalServerException":
1568
+ case "com.amazonaws.amp#InternalServerException":
1569
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1570
+ case "ThrottlingException":
1571
+ case "com.amazonaws.amp#ThrottlingException":
1572
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1573
+ default:
1574
+ const parsedBody = parsedOutput.body;
1575
+ return throwDefaultError({
1576
+ output,
1577
+ parsedBody,
1578
+ errorCode
1579
+ });
1580
+ }
1581
+ }, "de_GetDefaultScraperConfigurationCommandError");
1582
+ var de_ListRuleGroupsNamespacesCommand = /* @__PURE__ */ __name(async (output, context) => {
1583
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1584
+ return de_ListRuleGroupsNamespacesCommandError(output, context);
1585
+ }
1586
+ const contents = (0, import_smithy_client.map)({
1587
+ $metadata: deserializeMetadata(output)
1588
+ });
1589
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1590
+ const doc = (0, import_smithy_client.take)(data, {
1591
+ nextToken: import_smithy_client.expectString,
1592
+ ruleGroupsNamespaces: (_) => de_RuleGroupsNamespaceSummaryList(_, context)
1593
+ });
1594
+ Object.assign(contents, doc);
1595
+ return contents;
1596
+ }, "de_ListRuleGroupsNamespacesCommand");
1597
+ var de_ListRuleGroupsNamespacesCommandError = /* @__PURE__ */ __name(async (output, context) => {
1598
+ const parsedOutput = {
1599
+ ...output,
1600
+ body: await parseErrorBody(output.body, context)
1601
+ };
1602
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1603
+ switch (errorCode) {
1604
+ case "AccessDeniedException":
1605
+ case "com.amazonaws.amp#AccessDeniedException":
1606
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1607
+ case "InternalServerException":
1608
+ case "com.amazonaws.amp#InternalServerException":
1609
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1610
+ case "ResourceNotFoundException":
1611
+ case "com.amazonaws.amp#ResourceNotFoundException":
1612
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1613
+ case "ThrottlingException":
1614
+ case "com.amazonaws.amp#ThrottlingException":
1615
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1616
+ case "ValidationException":
1617
+ case "com.amazonaws.amp#ValidationException":
1618
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1619
+ default:
1620
+ const parsedBody = parsedOutput.body;
1621
+ return throwDefaultError({
1622
+ output,
1623
+ parsedBody,
1624
+ errorCode
1625
+ });
1626
+ }
1627
+ }, "de_ListRuleGroupsNamespacesCommandError");
1628
+ var de_ListScrapersCommand = /* @__PURE__ */ __name(async (output, context) => {
1629
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1630
+ return de_ListScrapersCommandError(output, context);
1631
+ }
1632
+ const contents = (0, import_smithy_client.map)({
1633
+ $metadata: deserializeMetadata(output)
1634
+ });
1635
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1636
+ const doc = (0, import_smithy_client.take)(data, {
1637
+ nextToken: import_smithy_client.expectString,
1638
+ scrapers: (_) => de_ScraperSummaryList(_, context)
1639
+ });
1640
+ Object.assign(contents, doc);
1641
+ return contents;
1642
+ }, "de_ListScrapersCommand");
1643
+ var de_ListScrapersCommandError = /* @__PURE__ */ __name(async (output, context) => {
1644
+ const parsedOutput = {
1645
+ ...output,
1646
+ body: await parseErrorBody(output.body, context)
1647
+ };
1648
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1649
+ switch (errorCode) {
1650
+ case "AccessDeniedException":
1651
+ case "com.amazonaws.amp#AccessDeniedException":
1652
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1653
+ case "InternalServerException":
1654
+ case "com.amazonaws.amp#InternalServerException":
1655
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1656
+ case "ThrottlingException":
1657
+ case "com.amazonaws.amp#ThrottlingException":
1658
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1659
+ case "ValidationException":
1660
+ case "com.amazonaws.amp#ValidationException":
1661
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1662
+ default:
1663
+ const parsedBody = parsedOutput.body;
1664
+ return throwDefaultError({
1665
+ output,
1666
+ parsedBody,
1667
+ errorCode
1668
+ });
1669
+ }
1670
+ }, "de_ListScrapersCommandError");
1671
+ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1672
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1673
+ return de_ListTagsForResourceCommandError(output, context);
1674
+ }
1675
+ const contents = (0, import_smithy_client.map)({
1676
+ $metadata: deserializeMetadata(output)
1677
+ });
1678
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1679
+ const doc = (0, import_smithy_client.take)(data, {
1680
+ tags: import_smithy_client._json
1681
+ });
1682
+ Object.assign(contents, doc);
1683
+ return contents;
1684
+ }, "de_ListTagsForResourceCommand");
1685
+ var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1686
+ const parsedOutput = {
1687
+ ...output,
1688
+ body: await parseErrorBody(output.body, context)
1689
+ };
1690
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1691
+ switch (errorCode) {
1692
+ case "AccessDeniedException":
1693
+ case "com.amazonaws.amp#AccessDeniedException":
1694
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1695
+ case "InternalServerException":
1696
+ case "com.amazonaws.amp#InternalServerException":
1697
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1698
+ case "ResourceNotFoundException":
1699
+ case "com.amazonaws.amp#ResourceNotFoundException":
1700
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1701
+ case "ThrottlingException":
1702
+ case "com.amazonaws.amp#ThrottlingException":
1703
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1704
+ case "ValidationException":
1705
+ case "com.amazonaws.amp#ValidationException":
1706
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1707
+ default:
1708
+ const parsedBody = parsedOutput.body;
1709
+ return throwDefaultError({
1710
+ output,
1711
+ parsedBody,
1712
+ errorCode
1713
+ });
1714
+ }
1715
+ }, "de_ListTagsForResourceCommandError");
1716
+ var de_ListWorkspacesCommand = /* @__PURE__ */ __name(async (output, context) => {
1717
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1718
+ return de_ListWorkspacesCommandError(output, context);
1719
+ }
1720
+ const contents = (0, import_smithy_client.map)({
1721
+ $metadata: deserializeMetadata(output)
1722
+ });
1723
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1724
+ const doc = (0, import_smithy_client.take)(data, {
1725
+ nextToken: import_smithy_client.expectString,
1726
+ workspaces: (_) => de_WorkspaceSummaryList(_, context)
1727
+ });
1728
+ Object.assign(contents, doc);
1729
+ return contents;
1730
+ }, "de_ListWorkspacesCommand");
1731
+ var de_ListWorkspacesCommandError = /* @__PURE__ */ __name(async (output, context) => {
1732
+ const parsedOutput = {
1733
+ ...output,
1734
+ body: await parseErrorBody(output.body, context)
1735
+ };
1736
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1737
+ switch (errorCode) {
1738
+ case "AccessDeniedException":
1739
+ case "com.amazonaws.amp#AccessDeniedException":
1740
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1741
+ case "InternalServerException":
1742
+ case "com.amazonaws.amp#InternalServerException":
1743
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1744
+ case "ThrottlingException":
1745
+ case "com.amazonaws.amp#ThrottlingException":
1746
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1747
+ case "ValidationException":
1748
+ case "com.amazonaws.amp#ValidationException":
1749
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1750
+ default:
1751
+ const parsedBody = parsedOutput.body;
1752
+ return throwDefaultError({
1753
+ output,
1754
+ parsedBody,
1755
+ errorCode
1756
+ });
1757
+ }
1758
+ }, "de_ListWorkspacesCommandError");
1759
+ var de_PutAlertManagerDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
1760
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1761
+ return de_PutAlertManagerDefinitionCommandError(output, context);
1762
+ }
1763
+ const contents = (0, import_smithy_client.map)({
1764
+ $metadata: deserializeMetadata(output)
1765
+ });
1766
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1767
+ const doc = (0, import_smithy_client.take)(data, {
1768
+ status: import_smithy_client._json
1769
+ });
1770
+ Object.assign(contents, doc);
1771
+ return contents;
1772
+ }, "de_PutAlertManagerDefinitionCommand");
1773
+ var de_PutAlertManagerDefinitionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1774
+ const parsedOutput = {
1775
+ ...output,
1776
+ body: await parseErrorBody(output.body, context)
1777
+ };
1778
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1779
+ switch (errorCode) {
1780
+ case "AccessDeniedException":
1781
+ case "com.amazonaws.amp#AccessDeniedException":
1782
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1783
+ case "ConflictException":
1784
+ case "com.amazonaws.amp#ConflictException":
1785
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1786
+ case "InternalServerException":
1787
+ case "com.amazonaws.amp#InternalServerException":
1788
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1789
+ case "ResourceNotFoundException":
1790
+ case "com.amazonaws.amp#ResourceNotFoundException":
1791
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1792
+ case "ServiceQuotaExceededException":
1793
+ case "com.amazonaws.amp#ServiceQuotaExceededException":
1794
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1795
+ case "ThrottlingException":
1796
+ case "com.amazonaws.amp#ThrottlingException":
1797
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1798
+ case "ValidationException":
1799
+ case "com.amazonaws.amp#ValidationException":
1800
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1801
+ default:
1802
+ const parsedBody = parsedOutput.body;
1803
+ return throwDefaultError({
1804
+ output,
1805
+ parsedBody,
1806
+ errorCode
1807
+ });
1808
+ }
1809
+ }, "de_PutAlertManagerDefinitionCommandError");
1810
+ var de_PutRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (output, context) => {
1811
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1812
+ return de_PutRuleGroupsNamespaceCommandError(output, context);
1813
+ }
1814
+ const contents = (0, import_smithy_client.map)({
1815
+ $metadata: deserializeMetadata(output)
1816
+ });
1817
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1818
+ const doc = (0, import_smithy_client.take)(data, {
1819
+ arn: import_smithy_client.expectString,
1820
+ name: import_smithy_client.expectString,
1821
+ status: import_smithy_client._json,
1822
+ tags: import_smithy_client._json
1823
+ });
1824
+ Object.assign(contents, doc);
1825
+ return contents;
1826
+ }, "de_PutRuleGroupsNamespaceCommand");
1827
+ var de_PutRuleGroupsNamespaceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1828
+ const parsedOutput = {
1829
+ ...output,
1830
+ body: await parseErrorBody(output.body, context)
1831
+ };
1832
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1833
+ switch (errorCode) {
1834
+ case "AccessDeniedException":
1835
+ case "com.amazonaws.amp#AccessDeniedException":
1836
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1837
+ case "ConflictException":
1838
+ case "com.amazonaws.amp#ConflictException":
1839
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1840
+ case "InternalServerException":
1841
+ case "com.amazonaws.amp#InternalServerException":
1842
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1843
+ case "ResourceNotFoundException":
1844
+ case "com.amazonaws.amp#ResourceNotFoundException":
1845
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1846
+ case "ServiceQuotaExceededException":
1847
+ case "com.amazonaws.amp#ServiceQuotaExceededException":
1848
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1849
+ case "ThrottlingException":
1850
+ case "com.amazonaws.amp#ThrottlingException":
1851
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1852
+ case "ValidationException":
1853
+ case "com.amazonaws.amp#ValidationException":
1854
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1855
+ default:
1856
+ const parsedBody = parsedOutput.body;
1857
+ return throwDefaultError({
1858
+ output,
1859
+ parsedBody,
1860
+ errorCode
1861
+ });
1862
+ }
1863
+ }, "de_PutRuleGroupsNamespaceCommandError");
1864
+ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1865
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1866
+ return de_TagResourceCommandError(output, context);
1867
+ }
1868
+ const contents = (0, import_smithy_client.map)({
1869
+ $metadata: deserializeMetadata(output)
1870
+ });
1871
+ await (0, import_smithy_client.collectBody)(output.body, context);
1872
+ return contents;
1873
+ }, "de_TagResourceCommand");
1874
+ var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1875
+ const parsedOutput = {
1876
+ ...output,
1877
+ body: await parseErrorBody(output.body, context)
1878
+ };
1879
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1880
+ switch (errorCode) {
1881
+ case "AccessDeniedException":
1882
+ case "com.amazonaws.amp#AccessDeniedException":
1883
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1884
+ case "InternalServerException":
1885
+ case "com.amazonaws.amp#InternalServerException":
1886
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1887
+ case "ResourceNotFoundException":
1888
+ case "com.amazonaws.amp#ResourceNotFoundException":
1889
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1890
+ case "ThrottlingException":
1891
+ case "com.amazonaws.amp#ThrottlingException":
1892
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1893
+ case "ValidationException":
1894
+ case "com.amazonaws.amp#ValidationException":
1895
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1896
+ default:
1897
+ const parsedBody = parsedOutput.body;
1898
+ return throwDefaultError({
1899
+ output,
1900
+ parsedBody,
1901
+ errorCode
1902
+ });
1903
+ }
1904
+ }, "de_TagResourceCommandError");
1905
+ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1906
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1907
+ return de_UntagResourceCommandError(output, context);
1908
+ }
1909
+ const contents = (0, import_smithy_client.map)({
1910
+ $metadata: deserializeMetadata(output)
1911
+ });
1912
+ await (0, import_smithy_client.collectBody)(output.body, context);
1913
+ return contents;
1914
+ }, "de_UntagResourceCommand");
1915
+ var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1916
+ const parsedOutput = {
1917
+ ...output,
1918
+ body: await parseErrorBody(output.body, context)
1919
+ };
1920
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1921
+ switch (errorCode) {
1922
+ case "AccessDeniedException":
1923
+ case "com.amazonaws.amp#AccessDeniedException":
1924
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1925
+ case "InternalServerException":
1926
+ case "com.amazonaws.amp#InternalServerException":
1927
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1928
+ case "ResourceNotFoundException":
1929
+ case "com.amazonaws.amp#ResourceNotFoundException":
1930
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1931
+ case "ThrottlingException":
1932
+ case "com.amazonaws.amp#ThrottlingException":
1933
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1934
+ case "ValidationException":
1935
+ case "com.amazonaws.amp#ValidationException":
1936
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1937
+ default:
1938
+ const parsedBody = parsedOutput.body;
1939
+ return throwDefaultError({
1940
+ output,
1941
+ parsedBody,
1942
+ errorCode
1943
+ });
1944
+ }
1945
+ }, "de_UntagResourceCommandError");
1946
+ var de_UpdateLoggingConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
1947
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1948
+ return de_UpdateLoggingConfigurationCommandError(output, context);
1949
+ }
1950
+ const contents = (0, import_smithy_client.map)({
1951
+ $metadata: deserializeMetadata(output)
1952
+ });
1953
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1954
+ const doc = (0, import_smithy_client.take)(data, {
1955
+ status: import_smithy_client._json
1956
+ });
1957
+ Object.assign(contents, doc);
1958
+ return contents;
1959
+ }, "de_UpdateLoggingConfigurationCommand");
1960
+ var de_UpdateLoggingConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1961
+ const parsedOutput = {
1962
+ ...output,
1963
+ body: await parseErrorBody(output.body, context)
1964
+ };
1965
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1966
+ switch (errorCode) {
1967
+ case "AccessDeniedException":
1968
+ case "com.amazonaws.amp#AccessDeniedException":
1969
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1970
+ case "ConflictException":
1971
+ case "com.amazonaws.amp#ConflictException":
1972
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1973
+ case "InternalServerException":
1974
+ case "com.amazonaws.amp#InternalServerException":
1975
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1976
+ case "ResourceNotFoundException":
1977
+ case "com.amazonaws.amp#ResourceNotFoundException":
1978
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1979
+ case "ValidationException":
1980
+ case "com.amazonaws.amp#ValidationException":
1981
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1982
+ default:
1983
+ const parsedBody = parsedOutput.body;
1984
+ return throwDefaultError({
1985
+ output,
1986
+ parsedBody,
1987
+ errorCode
1988
+ });
1989
+ }
1990
+ }, "de_UpdateLoggingConfigurationCommandError");
1991
+ var de_UpdateWorkspaceAliasCommand = /* @__PURE__ */ __name(async (output, context) => {
1992
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
1993
+ return de_UpdateWorkspaceAliasCommandError(output, context);
1994
+ }
1995
+ const contents = (0, import_smithy_client.map)({
1996
+ $metadata: deserializeMetadata(output)
1997
+ });
1998
+ await (0, import_smithy_client.collectBody)(output.body, context);
1999
+ return contents;
2000
+ }, "de_UpdateWorkspaceAliasCommand");
2001
+ var de_UpdateWorkspaceAliasCommandError = /* @__PURE__ */ __name(async (output, context) => {
2002
+ const parsedOutput = {
2003
+ ...output,
2004
+ body: await parseErrorBody(output.body, context)
2005
+ };
2006
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2007
+ switch (errorCode) {
2008
+ case "AccessDeniedException":
2009
+ case "com.amazonaws.amp#AccessDeniedException":
2010
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2011
+ case "ConflictException":
2012
+ case "com.amazonaws.amp#ConflictException":
2013
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2014
+ case "InternalServerException":
2015
+ case "com.amazonaws.amp#InternalServerException":
2016
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2017
+ case "ResourceNotFoundException":
2018
+ case "com.amazonaws.amp#ResourceNotFoundException":
2019
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2020
+ case "ServiceQuotaExceededException":
2021
+ case "com.amazonaws.amp#ServiceQuotaExceededException":
2022
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2023
+ case "ThrottlingException":
2024
+ case "com.amazonaws.amp#ThrottlingException":
2025
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2026
+ case "ValidationException":
2027
+ case "com.amazonaws.amp#ValidationException":
2028
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2029
+ default:
2030
+ const parsedBody = parsedOutput.body;
2031
+ return throwDefaultError({
2032
+ output,
2033
+ parsedBody,
2034
+ errorCode
2035
+ });
2036
+ }
2037
+ }, "de_UpdateWorkspaceAliasCommandError");
2038
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(AmpServiceException);
2039
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2040
+ const contents = (0, import_smithy_client.map)({});
2041
+ const data = parsedOutput.body;
2042
+ const doc = (0, import_smithy_client.take)(data, {
2043
+ message: import_smithy_client.expectString
2044
+ });
2045
+ Object.assign(contents, doc);
2046
+ const exception = new AccessDeniedException({
2047
+ $metadata: deserializeMetadata(parsedOutput),
2048
+ ...contents
2049
+ });
2050
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
2051
+ }, "de_AccessDeniedExceptionRes");
2052
+ var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2053
+ const contents = (0, import_smithy_client.map)({});
2054
+ const data = parsedOutput.body;
2055
+ const doc = (0, import_smithy_client.take)(data, {
2056
+ message: import_smithy_client.expectString,
2057
+ resourceId: import_smithy_client.expectString,
2058
+ resourceType: import_smithy_client.expectString
2059
+ });
2060
+ Object.assign(contents, doc);
2061
+ const exception = new ConflictException({
2062
+ $metadata: deserializeMetadata(parsedOutput),
2063
+ ...contents
2064
+ });
2065
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
2066
+ }, "de_ConflictExceptionRes");
2067
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2068
+ const contents = (0, import_smithy_client.map)({
2069
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, import_smithy_client.strictParseInt32)(parsedOutput.headers[_ra])]
2070
+ });
2071
+ const data = parsedOutput.body;
2072
+ const doc = (0, import_smithy_client.take)(data, {
2073
+ message: import_smithy_client.expectString
2074
+ });
2075
+ Object.assign(contents, doc);
2076
+ const exception = new InternalServerException({
2077
+ $metadata: deserializeMetadata(parsedOutput),
2078
+ ...contents
2079
+ });
2080
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
2081
+ }, "de_InternalServerExceptionRes");
2082
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2083
+ const contents = (0, import_smithy_client.map)({});
2084
+ const data = parsedOutput.body;
2085
+ const doc = (0, import_smithy_client.take)(data, {
2086
+ message: import_smithy_client.expectString,
2087
+ resourceId: import_smithy_client.expectString,
2088
+ resourceType: import_smithy_client.expectString
2089
+ });
2090
+ Object.assign(contents, doc);
2091
+ const exception = new ResourceNotFoundException({
2092
+ $metadata: deserializeMetadata(parsedOutput),
2093
+ ...contents
2094
+ });
2095
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
2096
+ }, "de_ResourceNotFoundExceptionRes");
2097
+ var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2098
+ const contents = (0, import_smithy_client.map)({});
2099
+ const data = parsedOutput.body;
2100
+ const doc = (0, import_smithy_client.take)(data, {
2101
+ message: import_smithy_client.expectString,
2102
+ quotaCode: import_smithy_client.expectString,
2103
+ resourceId: import_smithy_client.expectString,
2104
+ resourceType: import_smithy_client.expectString,
2105
+ serviceCode: import_smithy_client.expectString
2106
+ });
2107
+ Object.assign(contents, doc);
2108
+ const exception = new ServiceQuotaExceededException({
2109
+ $metadata: deserializeMetadata(parsedOutput),
2110
+ ...contents
2111
+ });
2112
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
2113
+ }, "de_ServiceQuotaExceededExceptionRes");
2114
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2115
+ const contents = (0, import_smithy_client.map)({
2116
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, import_smithy_client.strictParseInt32)(parsedOutput.headers[_ra])]
2117
+ });
2118
+ const data = parsedOutput.body;
2119
+ const doc = (0, import_smithy_client.take)(data, {
2120
+ message: import_smithy_client.expectString,
2121
+ quotaCode: import_smithy_client.expectString,
2122
+ serviceCode: import_smithy_client.expectString
2123
+ });
2124
+ Object.assign(contents, doc);
2125
+ const exception = new ThrottlingException({
2126
+ $metadata: deserializeMetadata(parsedOutput),
2127
+ ...contents
2128
+ });
2129
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
2130
+ }, "de_ThrottlingExceptionRes");
2131
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2132
+ const contents = (0, import_smithy_client.map)({});
2133
+ const data = parsedOutput.body;
2134
+ const doc = (0, import_smithy_client.take)(data, {
2135
+ fieldList: import_smithy_client._json,
2136
+ message: import_smithy_client.expectString,
2137
+ reason: import_smithy_client.expectString
2138
+ });
2139
+ Object.assign(contents, doc);
2140
+ const exception = new ValidationException({
2141
+ $metadata: deserializeMetadata(parsedOutput),
2142
+ ...contents
2143
+ });
2144
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
2145
+ }, "de_ValidationExceptionRes");
2146
+ var se_ScrapeConfiguration = /* @__PURE__ */ __name((input, context) => {
2147
+ return ScrapeConfiguration.visit(input, {
2148
+ configurationBlob: (value) => ({ configurationBlob: context.base64Encoder(value) }),
2149
+ _: (name, value) => ({ name: value })
2150
+ });
2151
+ }, "se_ScrapeConfiguration");
2152
+ var de_AlertManagerDefinitionDescription = /* @__PURE__ */ __name((output, context) => {
2153
+ return (0, import_smithy_client.take)(output, {
2154
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2155
+ data: context.base64Decoder,
2156
+ modifiedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2157
+ status: import_smithy_client._json
2158
+ });
2159
+ }, "de_AlertManagerDefinitionDescription");
2160
+ var de_LoggingConfigurationMetadata = /* @__PURE__ */ __name((output, context) => {
2161
+ return (0, import_smithy_client.take)(output, {
2162
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2163
+ logGroupArn: import_smithy_client.expectString,
2164
+ modifiedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2165
+ status: import_smithy_client._json,
2166
+ workspace: import_smithy_client.expectString
2167
+ });
2168
+ }, "de_LoggingConfigurationMetadata");
2169
+ var de_RuleGroupsNamespaceDescription = /* @__PURE__ */ __name((output, context) => {
2170
+ return (0, import_smithy_client.take)(output, {
2171
+ arn: import_smithy_client.expectString,
2172
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2173
+ data: context.base64Decoder,
2174
+ modifiedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2175
+ name: import_smithy_client.expectString,
2176
+ status: import_smithy_client._json,
2177
+ tags: import_smithy_client._json
2178
+ });
2179
+ }, "de_RuleGroupsNamespaceDescription");
2180
+ var de_RuleGroupsNamespaceSummary = /* @__PURE__ */ __name((output, context) => {
2181
+ return (0, import_smithy_client.take)(output, {
2182
+ arn: import_smithy_client.expectString,
2183
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2184
+ modifiedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2185
+ name: import_smithy_client.expectString,
2186
+ status: import_smithy_client._json,
2187
+ tags: import_smithy_client._json
2188
+ });
2189
+ }, "de_RuleGroupsNamespaceSummary");
2190
+ var de_RuleGroupsNamespaceSummaryList = /* @__PURE__ */ __name((output, context) => {
2191
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2192
+ return de_RuleGroupsNamespaceSummary(entry, context);
2193
+ });
2194
+ return retVal;
2195
+ }, "de_RuleGroupsNamespaceSummaryList");
2196
+ var de_ScrapeConfiguration = /* @__PURE__ */ __name((output, context) => {
2197
+ if (output.configurationBlob != null) {
2198
+ return {
2199
+ configurationBlob: context.base64Decoder(output.configurationBlob)
2200
+ };
2201
+ }
2202
+ return { $unknown: Object.entries(output)[0] };
2203
+ }, "de_ScrapeConfiguration");
2204
+ var de_ScraperDescription = /* @__PURE__ */ __name((output, context) => {
2205
+ return (0, import_smithy_client.take)(output, {
2206
+ alias: import_smithy_client.expectString,
2207
+ arn: import_smithy_client.expectString,
2208
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2209
+ destination: (_) => (0, import_smithy_client._json)((0, import_core.awsExpectUnion)(_)),
2210
+ lastModifiedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2211
+ roleArn: import_smithy_client.expectString,
2212
+ scrapeConfiguration: (_) => de_ScrapeConfiguration((0, import_core.awsExpectUnion)(_), context),
2213
+ scraperId: import_smithy_client.expectString,
2214
+ source: (_) => (0, import_smithy_client._json)((0, import_core.awsExpectUnion)(_)),
2215
+ status: import_smithy_client._json,
2216
+ statusReason: import_smithy_client.expectString,
2217
+ tags: import_smithy_client._json
2218
+ });
2219
+ }, "de_ScraperDescription");
2220
+ var de_ScraperSummary = /* @__PURE__ */ __name((output, context) => {
2221
+ return (0, import_smithy_client.take)(output, {
2222
+ alias: import_smithy_client.expectString,
2223
+ arn: import_smithy_client.expectString,
2224
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2225
+ destination: (_) => (0, import_smithy_client._json)((0, import_core.awsExpectUnion)(_)),
2226
+ lastModifiedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2227
+ roleArn: import_smithy_client.expectString,
2228
+ scraperId: import_smithy_client.expectString,
2229
+ source: (_) => (0, import_smithy_client._json)((0, import_core.awsExpectUnion)(_)),
2230
+ status: import_smithy_client._json,
2231
+ statusReason: import_smithy_client.expectString,
2232
+ tags: import_smithy_client._json
2233
+ });
2234
+ }, "de_ScraperSummary");
2235
+ var de_ScraperSummaryList = /* @__PURE__ */ __name((output, context) => {
2236
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2237
+ return de_ScraperSummary(entry, context);
2238
+ });
2239
+ return retVal;
2240
+ }, "de_ScraperSummaryList");
2241
+ var de_WorkspaceDescription = /* @__PURE__ */ __name((output, context) => {
2242
+ return (0, import_smithy_client.take)(output, {
2243
+ alias: import_smithy_client.expectString,
2244
+ arn: import_smithy_client.expectString,
2245
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2246
+ kmsKeyArn: import_smithy_client.expectString,
2247
+ prometheusEndpoint: import_smithy_client.expectString,
2248
+ status: import_smithy_client._json,
2249
+ tags: import_smithy_client._json,
2250
+ workspaceId: import_smithy_client.expectString
2251
+ });
2252
+ }, "de_WorkspaceDescription");
2253
+ var de_WorkspaceSummary = /* @__PURE__ */ __name((output, context) => {
2254
+ return (0, import_smithy_client.take)(output, {
2255
+ alias: import_smithy_client.expectString,
2256
+ arn: import_smithy_client.expectString,
2257
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2258
+ kmsKeyArn: import_smithy_client.expectString,
2259
+ status: import_smithy_client._json,
2260
+ tags: import_smithy_client._json,
2261
+ workspaceId: import_smithy_client.expectString
2262
+ });
2263
+ }, "de_WorkspaceSummary");
2264
+ var de_WorkspaceSummaryList = /* @__PURE__ */ __name((output, context) => {
2265
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2266
+ return de_WorkspaceSummary(entry, context);
2267
+ });
2268
+ return retVal;
2269
+ }, "de_WorkspaceSummaryList");
2270
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
2271
+ httpStatusCode: output.statusCode,
2272
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2273
+ extendedRequestId: output.headers["x-amz-id-2"],
2274
+ cfId: output.headers["x-amz-cf-id"]
2275
+ }), "deserializeMetadata");
2276
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
2277
+ var _a = "alias";
2278
+ var _cT = "clientToken";
2279
+ var _mR = "maxResults";
2280
+ var _n = "name";
2281
+ var _nT = "nextToken";
2282
+ var _rAS = "retryAfterSeconds";
2283
+ var _ra = "retry-after";
2284
+ var _tK = "tagKeys";
2285
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2286
+ if (encoded.length) {
2287
+ return JSON.parse(encoded);
2288
+ }
2289
+ return {};
2290
+ }), "parseBody");
2291
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
2292
+ const value = await parseBody(errorBody, context);
2293
+ value.message = value.message ?? value.Message;
2294
+ return value;
2295
+ }, "parseErrorBody");
2296
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
2297
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
2298
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
2299
+ let cleanValue = rawValue;
2300
+ if (typeof cleanValue === "number") {
2301
+ cleanValue = cleanValue.toString();
2302
+ }
2303
+ if (cleanValue.indexOf(",") >= 0) {
2304
+ cleanValue = cleanValue.split(",")[0];
2305
+ }
2306
+ if (cleanValue.indexOf(":") >= 0) {
2307
+ cleanValue = cleanValue.split(":")[0];
2308
+ }
2309
+ if (cleanValue.indexOf("#") >= 0) {
2310
+ cleanValue = cleanValue.split("#")[1];
2311
+ }
2312
+ return cleanValue;
2313
+ }, "sanitizeErrorCode");
2314
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
2315
+ if (headerKey !== void 0) {
2316
+ return sanitizeErrorCode(output.headers[headerKey]);
2317
+ }
2318
+ if (data.code !== void 0) {
2319
+ return sanitizeErrorCode(data.code);
2320
+ }
2321
+ if (data["__type"] !== void 0) {
2322
+ return sanitizeErrorCode(data["__type"]);
2323
+ }
2324
+ }, "loadRestJsonErrorCode");
2325
+
2326
+ // src/commands/CreateAlertManagerDefinitionCommand.ts
2327
+ var _CreateAlertManagerDefinitionCommand = class _CreateAlertManagerDefinitionCommand extends import_smithy_client.Command.classBuilder().ep({
2328
+ ...commonParams
2329
+ }).m(function(Command, cs, config, o) {
2330
+ return [
2331
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2332
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2333
+ ];
2334
+ }).s("AmazonPrometheusService", "CreateAlertManagerDefinition", {}).n("AmpClient", "CreateAlertManagerDefinitionCommand").f(void 0, void 0).ser(se_CreateAlertManagerDefinitionCommand).de(de_CreateAlertManagerDefinitionCommand).build() {
2335
+ };
2336
+ __name(_CreateAlertManagerDefinitionCommand, "CreateAlertManagerDefinitionCommand");
2337
+ var CreateAlertManagerDefinitionCommand = _CreateAlertManagerDefinitionCommand;
2338
+
2339
+ // src/commands/CreateLoggingConfigurationCommand.ts
2340
+
2341
+
2342
+
2343
+
2344
+ var _CreateLoggingConfigurationCommand = class _CreateLoggingConfigurationCommand extends import_smithy_client.Command.classBuilder().ep({
2345
+ ...commonParams
2346
+ }).m(function(Command, cs, config, o) {
2347
+ return [
2348
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2349
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2350
+ ];
2351
+ }).s("AmazonPrometheusService", "CreateLoggingConfiguration", {}).n("AmpClient", "CreateLoggingConfigurationCommand").f(void 0, void 0).ser(se_CreateLoggingConfigurationCommand).de(de_CreateLoggingConfigurationCommand).build() {
2352
+ };
2353
+ __name(_CreateLoggingConfigurationCommand, "CreateLoggingConfigurationCommand");
2354
+ var CreateLoggingConfigurationCommand = _CreateLoggingConfigurationCommand;
2355
+
2356
+ // src/commands/CreateRuleGroupsNamespaceCommand.ts
2357
+
2358
+
2359
+
2360
+
2361
+ var _CreateRuleGroupsNamespaceCommand = class _CreateRuleGroupsNamespaceCommand extends import_smithy_client.Command.classBuilder().ep({
2362
+ ...commonParams
2363
+ }).m(function(Command, cs, config, o) {
2364
+ return [
2365
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2366
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2367
+ ];
2368
+ }).s("AmazonPrometheusService", "CreateRuleGroupsNamespace", {}).n("AmpClient", "CreateRuleGroupsNamespaceCommand").f(void 0, void 0).ser(se_CreateRuleGroupsNamespaceCommand).de(de_CreateRuleGroupsNamespaceCommand).build() {
2369
+ };
2370
+ __name(_CreateRuleGroupsNamespaceCommand, "CreateRuleGroupsNamespaceCommand");
2371
+ var CreateRuleGroupsNamespaceCommand = _CreateRuleGroupsNamespaceCommand;
2372
+
2373
+ // src/commands/CreateScraperCommand.ts
2374
+
2375
+
2376
+
2377
+
2378
+ var _CreateScraperCommand = class _CreateScraperCommand extends import_smithy_client.Command.classBuilder().ep({
2379
+ ...commonParams
2380
+ }).m(function(Command, cs, config, o) {
2381
+ return [
2382
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2383
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2384
+ ];
2385
+ }).s("AmazonPrometheusService", "CreateScraper", {}).n("AmpClient", "CreateScraperCommand").f(void 0, void 0).ser(se_CreateScraperCommand).de(de_CreateScraperCommand).build() {
2386
+ };
2387
+ __name(_CreateScraperCommand, "CreateScraperCommand");
2388
+ var CreateScraperCommand = _CreateScraperCommand;
2389
+
2390
+ // src/commands/CreateWorkspaceCommand.ts
2391
+
2392
+
2393
+
2394
+
2395
+ var _CreateWorkspaceCommand = class _CreateWorkspaceCommand extends import_smithy_client.Command.classBuilder().ep({
2396
+ ...commonParams
2397
+ }).m(function(Command, cs, config, o) {
2398
+ return [
2399
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2400
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2401
+ ];
2402
+ }).s("AmazonPrometheusService", "CreateWorkspace", {}).n("AmpClient", "CreateWorkspaceCommand").f(void 0, void 0).ser(se_CreateWorkspaceCommand).de(de_CreateWorkspaceCommand).build() {
2403
+ };
2404
+ __name(_CreateWorkspaceCommand, "CreateWorkspaceCommand");
2405
+ var CreateWorkspaceCommand = _CreateWorkspaceCommand;
2406
+
2407
+ // src/commands/DeleteAlertManagerDefinitionCommand.ts
2408
+
2409
+
2410
+
2411
+
2412
+ var _DeleteAlertManagerDefinitionCommand = class _DeleteAlertManagerDefinitionCommand extends import_smithy_client.Command.classBuilder().ep({
2413
+ ...commonParams
2414
+ }).m(function(Command, cs, config, o) {
2415
+ return [
2416
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2417
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2418
+ ];
2419
+ }).s("AmazonPrometheusService", "DeleteAlertManagerDefinition", {}).n("AmpClient", "DeleteAlertManagerDefinitionCommand").f(void 0, void 0).ser(se_DeleteAlertManagerDefinitionCommand).de(de_DeleteAlertManagerDefinitionCommand).build() {
2420
+ };
2421
+ __name(_DeleteAlertManagerDefinitionCommand, "DeleteAlertManagerDefinitionCommand");
2422
+ var DeleteAlertManagerDefinitionCommand = _DeleteAlertManagerDefinitionCommand;
2423
+
2424
+ // src/commands/DeleteLoggingConfigurationCommand.ts
2425
+
2426
+
2427
+
2428
+
2429
+ var _DeleteLoggingConfigurationCommand = class _DeleteLoggingConfigurationCommand extends import_smithy_client.Command.classBuilder().ep({
2430
+ ...commonParams
2431
+ }).m(function(Command, cs, config, o) {
2432
+ return [
2433
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2434
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2435
+ ];
2436
+ }).s("AmazonPrometheusService", "DeleteLoggingConfiguration", {}).n("AmpClient", "DeleteLoggingConfigurationCommand").f(void 0, void 0).ser(se_DeleteLoggingConfigurationCommand).de(de_DeleteLoggingConfigurationCommand).build() {
2437
+ };
2438
+ __name(_DeleteLoggingConfigurationCommand, "DeleteLoggingConfigurationCommand");
2439
+ var DeleteLoggingConfigurationCommand = _DeleteLoggingConfigurationCommand;
2440
+
2441
+ // src/commands/DeleteRuleGroupsNamespaceCommand.ts
2442
+
2443
+
2444
+
2445
+
2446
+ var _DeleteRuleGroupsNamespaceCommand = class _DeleteRuleGroupsNamespaceCommand extends import_smithy_client.Command.classBuilder().ep({
2447
+ ...commonParams
2448
+ }).m(function(Command, cs, config, o) {
2449
+ return [
2450
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2451
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2452
+ ];
2453
+ }).s("AmazonPrometheusService", "DeleteRuleGroupsNamespace", {}).n("AmpClient", "DeleteRuleGroupsNamespaceCommand").f(void 0, void 0).ser(se_DeleteRuleGroupsNamespaceCommand).de(de_DeleteRuleGroupsNamespaceCommand).build() {
2454
+ };
2455
+ __name(_DeleteRuleGroupsNamespaceCommand, "DeleteRuleGroupsNamespaceCommand");
2456
+ var DeleteRuleGroupsNamespaceCommand = _DeleteRuleGroupsNamespaceCommand;
2457
+
2458
+ // src/commands/DeleteScraperCommand.ts
2459
+
2460
+
2461
+
2462
+
2463
+ var _DeleteScraperCommand = class _DeleteScraperCommand extends import_smithy_client.Command.classBuilder().ep({
2464
+ ...commonParams
2465
+ }).m(function(Command, cs, config, o) {
2466
+ return [
2467
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2468
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2469
+ ];
2470
+ }).s("AmazonPrometheusService", "DeleteScraper", {}).n("AmpClient", "DeleteScraperCommand").f(void 0, void 0).ser(se_DeleteScraperCommand).de(de_DeleteScraperCommand).build() {
2471
+ };
2472
+ __name(_DeleteScraperCommand, "DeleteScraperCommand");
2473
+ var DeleteScraperCommand = _DeleteScraperCommand;
2474
+
2475
+ // src/commands/DeleteWorkspaceCommand.ts
2476
+
2477
+
2478
+
2479
+
2480
+ var _DeleteWorkspaceCommand = class _DeleteWorkspaceCommand extends import_smithy_client.Command.classBuilder().ep({
2481
+ ...commonParams
2482
+ }).m(function(Command, cs, config, o) {
2483
+ return [
2484
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2485
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2486
+ ];
2487
+ }).s("AmazonPrometheusService", "DeleteWorkspace", {}).n("AmpClient", "DeleteWorkspaceCommand").f(void 0, void 0).ser(se_DeleteWorkspaceCommand).de(de_DeleteWorkspaceCommand).build() {
2488
+ };
2489
+ __name(_DeleteWorkspaceCommand, "DeleteWorkspaceCommand");
2490
+ var DeleteWorkspaceCommand = _DeleteWorkspaceCommand;
2491
+
2492
+ // src/commands/DescribeAlertManagerDefinitionCommand.ts
2493
+
2494
+
2495
+
2496
+
2497
+ var _DescribeAlertManagerDefinitionCommand = class _DescribeAlertManagerDefinitionCommand extends import_smithy_client.Command.classBuilder().ep({
2498
+ ...commonParams
2499
+ }).m(function(Command, cs, config, o) {
2500
+ return [
2501
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2502
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2503
+ ];
2504
+ }).s("AmazonPrometheusService", "DescribeAlertManagerDefinition", {}).n("AmpClient", "DescribeAlertManagerDefinitionCommand").f(void 0, void 0).ser(se_DescribeAlertManagerDefinitionCommand).de(de_DescribeAlertManagerDefinitionCommand).build() {
2505
+ };
2506
+ __name(_DescribeAlertManagerDefinitionCommand, "DescribeAlertManagerDefinitionCommand");
2507
+ var DescribeAlertManagerDefinitionCommand = _DescribeAlertManagerDefinitionCommand;
2508
+
2509
+ // src/commands/DescribeLoggingConfigurationCommand.ts
2510
+
2511
+
2512
+
2513
+
2514
+ var _DescribeLoggingConfigurationCommand = class _DescribeLoggingConfigurationCommand extends import_smithy_client.Command.classBuilder().ep({
2515
+ ...commonParams
2516
+ }).m(function(Command, cs, config, o) {
2517
+ return [
2518
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2519
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2520
+ ];
2521
+ }).s("AmazonPrometheusService", "DescribeLoggingConfiguration", {}).n("AmpClient", "DescribeLoggingConfigurationCommand").f(void 0, void 0).ser(se_DescribeLoggingConfigurationCommand).de(de_DescribeLoggingConfigurationCommand).build() {
2522
+ };
2523
+ __name(_DescribeLoggingConfigurationCommand, "DescribeLoggingConfigurationCommand");
2524
+ var DescribeLoggingConfigurationCommand = _DescribeLoggingConfigurationCommand;
2525
+
2526
+ // src/commands/DescribeRuleGroupsNamespaceCommand.ts
2527
+
2528
+
2529
+
2530
+
2531
+ var _DescribeRuleGroupsNamespaceCommand = class _DescribeRuleGroupsNamespaceCommand extends import_smithy_client.Command.classBuilder().ep({
2532
+ ...commonParams
2533
+ }).m(function(Command, cs, config, o) {
2534
+ return [
2535
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2536
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2537
+ ];
2538
+ }).s("AmazonPrometheusService", "DescribeRuleGroupsNamespace", {}).n("AmpClient", "DescribeRuleGroupsNamespaceCommand").f(void 0, void 0).ser(se_DescribeRuleGroupsNamespaceCommand).de(de_DescribeRuleGroupsNamespaceCommand).build() {
2539
+ };
2540
+ __name(_DescribeRuleGroupsNamespaceCommand, "DescribeRuleGroupsNamespaceCommand");
2541
+ var DescribeRuleGroupsNamespaceCommand = _DescribeRuleGroupsNamespaceCommand;
2542
+
2543
+ // src/commands/DescribeScraperCommand.ts
2544
+
2545
+
2546
+
2547
+
2548
+ var _DescribeScraperCommand = class _DescribeScraperCommand extends import_smithy_client.Command.classBuilder().ep({
2549
+ ...commonParams
2550
+ }).m(function(Command, cs, config, o) {
2551
+ return [
2552
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2553
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2554
+ ];
2555
+ }).s("AmazonPrometheusService", "DescribeScraper", {}).n("AmpClient", "DescribeScraperCommand").f(void 0, void 0).ser(se_DescribeScraperCommand).de(de_DescribeScraperCommand).build() {
2556
+ };
2557
+ __name(_DescribeScraperCommand, "DescribeScraperCommand");
2558
+ var DescribeScraperCommand = _DescribeScraperCommand;
2559
+
2560
+ // src/commands/DescribeWorkspaceCommand.ts
2561
+
2562
+
2563
+
2564
+
2565
+ var _DescribeWorkspaceCommand = class _DescribeWorkspaceCommand extends import_smithy_client.Command.classBuilder().ep({
2566
+ ...commonParams
2567
+ }).m(function(Command, cs, config, o) {
2568
+ return [
2569
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2570
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2571
+ ];
2572
+ }).s("AmazonPrometheusService", "DescribeWorkspace", {}).n("AmpClient", "DescribeWorkspaceCommand").f(void 0, void 0).ser(se_DescribeWorkspaceCommand).de(de_DescribeWorkspaceCommand).build() {
2573
+ };
2574
+ __name(_DescribeWorkspaceCommand, "DescribeWorkspaceCommand");
2575
+ var DescribeWorkspaceCommand = _DescribeWorkspaceCommand;
2576
+
2577
+ // src/commands/GetDefaultScraperConfigurationCommand.ts
2578
+
2579
+
2580
+
2581
+
2582
+ var _GetDefaultScraperConfigurationCommand = class _GetDefaultScraperConfigurationCommand extends import_smithy_client.Command.classBuilder().ep({
2583
+ ...commonParams
2584
+ }).m(function(Command, cs, config, o) {
2585
+ return [
2586
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2587
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2588
+ ];
2589
+ }).s("AmazonPrometheusService", "GetDefaultScraperConfiguration", {}).n("AmpClient", "GetDefaultScraperConfigurationCommand").f(void 0, void 0).ser(se_GetDefaultScraperConfigurationCommand).de(de_GetDefaultScraperConfigurationCommand).build() {
2590
+ };
2591
+ __name(_GetDefaultScraperConfigurationCommand, "GetDefaultScraperConfigurationCommand");
2592
+ var GetDefaultScraperConfigurationCommand = _GetDefaultScraperConfigurationCommand;
2593
+
2594
+ // src/commands/ListRuleGroupsNamespacesCommand.ts
2595
+
2596
+
2597
+
2598
+
2599
+ var _ListRuleGroupsNamespacesCommand = class _ListRuleGroupsNamespacesCommand extends import_smithy_client.Command.classBuilder().ep({
2600
+ ...commonParams
2601
+ }).m(function(Command, cs, config, o) {
2602
+ return [
2603
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2604
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2605
+ ];
2606
+ }).s("AmazonPrometheusService", "ListRuleGroupsNamespaces", {}).n("AmpClient", "ListRuleGroupsNamespacesCommand").f(void 0, void 0).ser(se_ListRuleGroupsNamespacesCommand).de(de_ListRuleGroupsNamespacesCommand).build() {
2607
+ };
2608
+ __name(_ListRuleGroupsNamespacesCommand, "ListRuleGroupsNamespacesCommand");
2609
+ var ListRuleGroupsNamespacesCommand = _ListRuleGroupsNamespacesCommand;
2610
+
2611
+ // src/commands/ListScrapersCommand.ts
2612
+
2613
+
2614
+
2615
+
2616
+ var _ListScrapersCommand = class _ListScrapersCommand extends import_smithy_client.Command.classBuilder().ep({
2617
+ ...commonParams
2618
+ }).m(function(Command, cs, config, o) {
2619
+ return [
2620
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2621
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2622
+ ];
2623
+ }).s("AmazonPrometheusService", "ListScrapers", {}).n("AmpClient", "ListScrapersCommand").f(void 0, void 0).ser(se_ListScrapersCommand).de(de_ListScrapersCommand).build() {
2624
+ };
2625
+ __name(_ListScrapersCommand, "ListScrapersCommand");
2626
+ var ListScrapersCommand = _ListScrapersCommand;
2627
+
2628
+ // src/commands/ListTagsForResourceCommand.ts
2629
+
2630
+
2631
+
2632
+
2633
+ var _ListTagsForResourceCommand = class _ListTagsForResourceCommand extends import_smithy_client.Command.classBuilder().ep({
2634
+ ...commonParams
2635
+ }).m(function(Command, cs, config, o) {
2636
+ return [
2637
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2638
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2639
+ ];
2640
+ }).s("AmazonPrometheusService", "ListTagsForResource", {}).n("AmpClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
2641
+ };
2642
+ __name(_ListTagsForResourceCommand, "ListTagsForResourceCommand");
2643
+ var ListTagsForResourceCommand = _ListTagsForResourceCommand;
2644
+
2645
+ // src/commands/ListWorkspacesCommand.ts
2646
+
2647
+
2648
+
2649
+
2650
+ var _ListWorkspacesCommand = class _ListWorkspacesCommand extends import_smithy_client.Command.classBuilder().ep({
2651
+ ...commonParams
2652
+ }).m(function(Command, cs, config, o) {
2653
+ return [
2654
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2655
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2656
+ ];
2657
+ }).s("AmazonPrometheusService", "ListWorkspaces", {}).n("AmpClient", "ListWorkspacesCommand").f(void 0, void 0).ser(se_ListWorkspacesCommand).de(de_ListWorkspacesCommand).build() {
2658
+ };
2659
+ __name(_ListWorkspacesCommand, "ListWorkspacesCommand");
2660
+ var ListWorkspacesCommand = _ListWorkspacesCommand;
2661
+
2662
+ // src/commands/PutAlertManagerDefinitionCommand.ts
2663
+
2664
+
2665
+
2666
+
2667
+ var _PutAlertManagerDefinitionCommand = class _PutAlertManagerDefinitionCommand extends import_smithy_client.Command.classBuilder().ep({
2668
+ ...commonParams
2669
+ }).m(function(Command, cs, config, o) {
2670
+ return [
2671
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2672
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2673
+ ];
2674
+ }).s("AmazonPrometheusService", "PutAlertManagerDefinition", {}).n("AmpClient", "PutAlertManagerDefinitionCommand").f(void 0, void 0).ser(se_PutAlertManagerDefinitionCommand).de(de_PutAlertManagerDefinitionCommand).build() {
2675
+ };
2676
+ __name(_PutAlertManagerDefinitionCommand, "PutAlertManagerDefinitionCommand");
2677
+ var PutAlertManagerDefinitionCommand = _PutAlertManagerDefinitionCommand;
2678
+
2679
+ // src/commands/PutRuleGroupsNamespaceCommand.ts
2680
+
2681
+
2682
+
2683
+
2684
+ var _PutRuleGroupsNamespaceCommand = class _PutRuleGroupsNamespaceCommand extends import_smithy_client.Command.classBuilder().ep({
2685
+ ...commonParams
2686
+ }).m(function(Command, cs, config, o) {
2687
+ return [
2688
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2689
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2690
+ ];
2691
+ }).s("AmazonPrometheusService", "PutRuleGroupsNamespace", {}).n("AmpClient", "PutRuleGroupsNamespaceCommand").f(void 0, void 0).ser(se_PutRuleGroupsNamespaceCommand).de(de_PutRuleGroupsNamespaceCommand).build() {
2692
+ };
2693
+ __name(_PutRuleGroupsNamespaceCommand, "PutRuleGroupsNamespaceCommand");
2694
+ var PutRuleGroupsNamespaceCommand = _PutRuleGroupsNamespaceCommand;
2695
+
2696
+ // src/commands/TagResourceCommand.ts
2697
+
2698
+
2699
+
2700
+
2701
+ var _TagResourceCommand = class _TagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
2702
+ ...commonParams
2703
+ }).m(function(Command, cs, config, o) {
2704
+ return [
2705
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2706
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2707
+ ];
2708
+ }).s("AmazonPrometheusService", "TagResource", {}).n("AmpClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
2709
+ };
2710
+ __name(_TagResourceCommand, "TagResourceCommand");
2711
+ var TagResourceCommand = _TagResourceCommand;
2712
+
2713
+ // src/commands/UntagResourceCommand.ts
2714
+
2715
+
2716
+
2717
+
2718
+ var _UntagResourceCommand = class _UntagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
2719
+ ...commonParams
2720
+ }).m(function(Command, cs, config, o) {
2721
+ return [
2722
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2723
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2724
+ ];
2725
+ }).s("AmazonPrometheusService", "UntagResource", {}).n("AmpClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
2726
+ };
2727
+ __name(_UntagResourceCommand, "UntagResourceCommand");
2728
+ var UntagResourceCommand = _UntagResourceCommand;
2729
+
2730
+ // src/commands/UpdateLoggingConfigurationCommand.ts
2731
+
2732
+
2733
+
2734
+
2735
+ var _UpdateLoggingConfigurationCommand = class _UpdateLoggingConfigurationCommand extends import_smithy_client.Command.classBuilder().ep({
2736
+ ...commonParams
2737
+ }).m(function(Command, cs, config, o) {
2738
+ return [
2739
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2740
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2741
+ ];
2742
+ }).s("AmazonPrometheusService", "UpdateLoggingConfiguration", {}).n("AmpClient", "UpdateLoggingConfigurationCommand").f(void 0, void 0).ser(se_UpdateLoggingConfigurationCommand).de(de_UpdateLoggingConfigurationCommand).build() {
2743
+ };
2744
+ __name(_UpdateLoggingConfigurationCommand, "UpdateLoggingConfigurationCommand");
2745
+ var UpdateLoggingConfigurationCommand = _UpdateLoggingConfigurationCommand;
2746
+
2747
+ // src/commands/UpdateWorkspaceAliasCommand.ts
2748
+
2749
+
2750
+
2751
+
2752
+ var _UpdateWorkspaceAliasCommand = class _UpdateWorkspaceAliasCommand extends import_smithy_client.Command.classBuilder().ep({
2753
+ ...commonParams
2754
+ }).m(function(Command, cs, config, o) {
2755
+ return [
2756
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2757
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2758
+ ];
2759
+ }).s("AmazonPrometheusService", "UpdateWorkspaceAlias", {}).n("AmpClient", "UpdateWorkspaceAliasCommand").f(void 0, void 0).ser(se_UpdateWorkspaceAliasCommand).de(de_UpdateWorkspaceAliasCommand).build() {
2760
+ };
2761
+ __name(_UpdateWorkspaceAliasCommand, "UpdateWorkspaceAliasCommand");
2762
+ var UpdateWorkspaceAliasCommand = _UpdateWorkspaceAliasCommand;
2763
+
2764
+ // src/Amp.ts
2765
+ var commands = {
2766
+ CreateAlertManagerDefinitionCommand,
2767
+ CreateLoggingConfigurationCommand,
2768
+ CreateRuleGroupsNamespaceCommand,
2769
+ CreateScraperCommand,
2770
+ CreateWorkspaceCommand,
2771
+ DeleteAlertManagerDefinitionCommand,
2772
+ DeleteLoggingConfigurationCommand,
2773
+ DeleteRuleGroupsNamespaceCommand,
2774
+ DeleteScraperCommand,
2775
+ DeleteWorkspaceCommand,
2776
+ DescribeAlertManagerDefinitionCommand,
2777
+ DescribeLoggingConfigurationCommand,
2778
+ DescribeRuleGroupsNamespaceCommand,
2779
+ DescribeScraperCommand,
2780
+ DescribeWorkspaceCommand,
2781
+ GetDefaultScraperConfigurationCommand,
2782
+ ListRuleGroupsNamespacesCommand,
2783
+ ListScrapersCommand,
2784
+ ListTagsForResourceCommand,
2785
+ ListWorkspacesCommand,
2786
+ PutAlertManagerDefinitionCommand,
2787
+ PutRuleGroupsNamespaceCommand,
2788
+ TagResourceCommand,
2789
+ UntagResourceCommand,
2790
+ UpdateLoggingConfigurationCommand,
2791
+ UpdateWorkspaceAliasCommand
2792
+ };
2793
+ var _Amp = class _Amp extends AmpClient {
2794
+ };
2795
+ __name(_Amp, "Amp");
2796
+ var Amp = _Amp;
2797
+ (0, import_smithy_client.createAggregatedClient)(commands, Amp);
2798
+
2799
+ // src/pagination/ListRuleGroupsNamespacesPaginator.ts
2800
+ var import_core3 = require("@smithy/core");
2801
+ var paginateListRuleGroupsNamespaces = (0, import_core3.createPaginator)(AmpClient, ListRuleGroupsNamespacesCommand, "nextToken", "nextToken", "maxResults");
2802
+
2803
+ // src/pagination/ListScrapersPaginator.ts
2804
+ var import_core4 = require("@smithy/core");
2805
+ var paginateListScrapers = (0, import_core4.createPaginator)(AmpClient, ListScrapersCommand, "nextToken", "nextToken", "maxResults");
2806
+
2807
+ // src/pagination/ListWorkspacesPaginator.ts
2808
+ var import_core5 = require("@smithy/core");
2809
+ var paginateListWorkspaces = (0, import_core5.createPaginator)(AmpClient, ListWorkspacesCommand, "nextToken", "nextToken", "maxResults");
2810
+
2811
+ // src/waiters/waitForScraperActive.ts
2812
+ var import_util_waiter = require("@smithy/util-waiter");
2813
+ var checkState = /* @__PURE__ */ __name(async (client, input) => {
2814
+ let reason;
2815
+ try {
2816
+ const result = await client.send(new DescribeScraperCommand(input));
2817
+ reason = result;
2818
+ try {
2819
+ const returnComparator = /* @__PURE__ */ __name(() => {
2820
+ return result.scraper.status.statusCode;
2821
+ }, "returnComparator");
2822
+ if (returnComparator() === "ACTIVE") {
2823
+ return { state: import_util_waiter.WaiterState.SUCCESS, reason };
2824
+ }
2825
+ } catch (e) {
2826
+ }
2827
+ try {
2828
+ const returnComparator = /* @__PURE__ */ __name(() => {
2829
+ return result.scraper.status.statusCode;
2830
+ }, "returnComparator");
2831
+ if (returnComparator() === "CREATION_FAILED") {
2832
+ return { state: import_util_waiter.WaiterState.FAILURE, reason };
2833
+ }
2834
+ } catch (e) {
2835
+ }
2836
+ } catch (exception) {
2837
+ reason = exception;
2838
+ }
2839
+ return { state: import_util_waiter.WaiterState.RETRY, reason };
2840
+ }, "checkState");
2841
+ var waitForScraperActive = /* @__PURE__ */ __name(async (params, input) => {
2842
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
2843
+ return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
2844
+ }, "waitForScraperActive");
2845
+ var waitUntilScraperActive = /* @__PURE__ */ __name(async (params, input) => {
2846
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
2847
+ const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
2848
+ return (0, import_util_waiter.checkExceptions)(result);
2849
+ }, "waitUntilScraperActive");
2850
+
2851
+ // src/waiters/waitForScraperDeleted.ts
2852
+
2853
+ var checkState2 = /* @__PURE__ */ __name(async (client, input) => {
2854
+ let reason;
2855
+ try {
2856
+ const result = await client.send(new DescribeScraperCommand(input));
2857
+ reason = result;
2858
+ try {
2859
+ const returnComparator = /* @__PURE__ */ __name(() => {
2860
+ return result.scraper.status.statusCode;
2861
+ }, "returnComparator");
2862
+ if (returnComparator() === "DELETION_FAILED") {
2863
+ return { state: import_util_waiter.WaiterState.FAILURE, reason };
2864
+ }
2865
+ } catch (e) {
2866
+ }
2867
+ } catch (exception) {
2868
+ reason = exception;
2869
+ if (exception.name && exception.name == "ResourceNotFoundException") {
2870
+ return { state: import_util_waiter.WaiterState.SUCCESS, reason };
2871
+ }
2872
+ }
2873
+ return { state: import_util_waiter.WaiterState.RETRY, reason };
2874
+ }, "checkState");
2875
+ var waitForScraperDeleted = /* @__PURE__ */ __name(async (params, input) => {
2876
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
2877
+ return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
2878
+ }, "waitForScraperDeleted");
2879
+ var waitUntilScraperDeleted = /* @__PURE__ */ __name(async (params, input) => {
2880
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
2881
+ const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
2882
+ return (0, import_util_waiter.checkExceptions)(result);
2883
+ }, "waitUntilScraperDeleted");
2884
+
2885
+ // src/waiters/waitForWorkspaceActive.ts
2886
+
2887
+ var checkState3 = /* @__PURE__ */ __name(async (client, input) => {
2888
+ let reason;
2889
+ try {
2890
+ const result = await client.send(new DescribeWorkspaceCommand(input));
2891
+ reason = result;
2892
+ try {
2893
+ const returnComparator = /* @__PURE__ */ __name(() => {
2894
+ return result.workspace.status.statusCode;
2895
+ }, "returnComparator");
2896
+ if (returnComparator() === "ACTIVE") {
2897
+ return { state: import_util_waiter.WaiterState.SUCCESS, reason };
2898
+ }
2899
+ } catch (e) {
2900
+ }
2901
+ try {
2902
+ const returnComparator = /* @__PURE__ */ __name(() => {
2903
+ return result.workspace.status.statusCode;
2904
+ }, "returnComparator");
2905
+ if (returnComparator() === "UPDATING") {
2906
+ return { state: import_util_waiter.WaiterState.RETRY, reason };
2907
+ }
2908
+ } catch (e) {
2909
+ }
2910
+ try {
2911
+ const returnComparator = /* @__PURE__ */ __name(() => {
2912
+ return result.workspace.status.statusCode;
2913
+ }, "returnComparator");
2914
+ if (returnComparator() === "CREATING") {
2915
+ return { state: import_util_waiter.WaiterState.RETRY, reason };
2916
+ }
2917
+ } catch (e) {
2918
+ }
2919
+ } catch (exception) {
2920
+ reason = exception;
2921
+ }
2922
+ return { state: import_util_waiter.WaiterState.RETRY, reason };
2923
+ }, "checkState");
2924
+ var waitForWorkspaceActive = /* @__PURE__ */ __name(async (params, input) => {
2925
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
2926
+ return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3);
2927
+ }, "waitForWorkspaceActive");
2928
+ var waitUntilWorkspaceActive = /* @__PURE__ */ __name(async (params, input) => {
2929
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
2930
+ const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3);
2931
+ return (0, import_util_waiter.checkExceptions)(result);
2932
+ }, "waitUntilWorkspaceActive");
2933
+
2934
+ // src/waiters/waitForWorkspaceDeleted.ts
2935
+
2936
+ var checkState4 = /* @__PURE__ */ __name(async (client, input) => {
2937
+ let reason;
2938
+ try {
2939
+ const result = await client.send(new DescribeWorkspaceCommand(input));
2940
+ reason = result;
2941
+ try {
2942
+ const returnComparator = /* @__PURE__ */ __name(() => {
2943
+ return result.workspace.status.statusCode;
2944
+ }, "returnComparator");
2945
+ if (returnComparator() === "DELETING") {
2946
+ return { state: import_util_waiter.WaiterState.RETRY, reason };
2947
+ }
2948
+ } catch (e) {
2949
+ }
2950
+ } catch (exception) {
2951
+ reason = exception;
2952
+ if (exception.name && exception.name == "ResourceNotFoundException") {
2953
+ return { state: import_util_waiter.WaiterState.SUCCESS, reason };
2954
+ }
2955
+ }
2956
+ return { state: import_util_waiter.WaiterState.RETRY, reason };
2957
+ }, "checkState");
2958
+ var waitForWorkspaceDeleted = /* @__PURE__ */ __name(async (params, input) => {
2959
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
2960
+ return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4);
2961
+ }, "waitForWorkspaceDeleted");
2962
+ var waitUntilWorkspaceDeleted = /* @__PURE__ */ __name(async (params, input) => {
2963
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
2964
+ const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4);
2965
+ return (0, import_util_waiter.checkExceptions)(result);
2966
+ }, "waitUntilWorkspaceDeleted");
2967
+
2968
+ // src/index.ts
2969
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
2970
+ // Annotate the CommonJS export names for ESM import in node:
2971
+
2972
+ 0 && (module.exports = {
2973
+ AccessDeniedException,
2974
+ AlertManagerDefinitionStatusCode,
2975
+ Amp,
2976
+ AmpClient,
2977
+ AmpServiceException,
2978
+ ConflictException,
2979
+ CreateAlertManagerDefinitionCommand,
2980
+ CreateLoggingConfigurationCommand,
2981
+ CreateRuleGroupsNamespaceCommand,
2982
+ CreateScraperCommand,
2983
+ CreateWorkspaceCommand,
2984
+ DeleteAlertManagerDefinitionCommand,
2985
+ DeleteLoggingConfigurationCommand,
2986
+ DeleteRuleGroupsNamespaceCommand,
2987
+ DeleteScraperCommand,
2988
+ DeleteWorkspaceCommand,
2989
+ DescribeAlertManagerDefinitionCommand,
2990
+ DescribeLoggingConfigurationCommand,
2991
+ DescribeRuleGroupsNamespaceCommand,
2992
+ DescribeScraperCommand,
2993
+ DescribeWorkspaceCommand,
2994
+ Destination,
2995
+ GetDefaultScraperConfigurationCommand,
2996
+ InternalServerException,
2997
+ ListRuleGroupsNamespacesCommand,
2998
+ ListScrapersCommand,
2999
+ ListTagsForResourceCommand,
3000
+ ListWorkspacesCommand,
3001
+ LoggingConfigurationStatusCode,
3002
+ PutAlertManagerDefinitionCommand,
3003
+ PutRuleGroupsNamespaceCommand,
3004
+ ResourceNotFoundException,
3005
+ RuleGroupsNamespaceStatusCode,
3006
+ ScrapeConfiguration,
3007
+ ScraperStatusCode,
3008
+ ServiceQuotaExceededException,
3009
+ Source,
3010
+ TagResourceCommand,
3011
+ ThrottlingException,
3012
+ UntagResourceCommand,
3013
+ UpdateLoggingConfigurationCommand,
3014
+ UpdateWorkspaceAliasCommand,
3015
+ ValidationException,
3016
+ ValidationExceptionReason,
3017
+ WorkspaceStatusCode,
3018
+ __Client,
3019
+ paginateListRuleGroupsNamespaces,
3020
+ paginateListScrapers,
3021
+ paginateListWorkspaces,
3022
+ waitForScraperActive,
3023
+ waitForScraperDeleted,
3024
+ waitForWorkspaceActive,
3025
+ waitForWorkspaceDeleted,
3026
+ waitUntilScraperActive,
3027
+ waitUntilScraperDeleted,
3028
+ waitUntilWorkspaceActive,
3029
+ waitUntilWorkspaceDeleted
3030
+ });
3031
+