@aws-sdk/client-controlcatalog 3.893.0 → 3.894.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -1,11 +1,884 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ControlCatalogServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./ControlCatalogClient"), exports);
6
- tslib_1.__exportStar(require("./ControlCatalog"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./pagination"), exports);
9
- tslib_1.__exportStar(require("./models"), exports);
10
- var ControlCatalogServiceException_1 = require("./models/ControlCatalogServiceException");
11
- Object.defineProperty(exports, "ControlCatalogServiceException", { enumerable: true, get: function () { return ControlCatalogServiceException_1.ControlCatalogServiceException; } });
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 index_exports = {};
23
+ __export(index_exports, {
24
+ AccessDeniedException: () => AccessDeniedException,
25
+ ControlBehavior: () => ControlBehavior,
26
+ ControlCatalog: () => ControlCatalog,
27
+ ControlCatalogClient: () => ControlCatalogClient,
28
+ ControlCatalogServiceException: () => ControlCatalogServiceException,
29
+ ControlScope: () => ControlScope,
30
+ ControlSeverity: () => ControlSeverity,
31
+ GetControlCommand: () => GetControlCommand,
32
+ InternalServerException: () => InternalServerException,
33
+ ListCommonControlsCommand: () => ListCommonControlsCommand,
34
+ ListControlMappingsCommand: () => ListControlMappingsCommand,
35
+ ListControlsCommand: () => ListControlsCommand,
36
+ ListDomainsCommand: () => ListDomainsCommand,
37
+ ListObjectivesCommand: () => ListObjectivesCommand,
38
+ Mapping: () => Mapping,
39
+ MappingType: () => MappingType,
40
+ ResourceNotFoundException: () => ResourceNotFoundException,
41
+ ThrottlingException: () => ThrottlingException,
42
+ ValidationException: () => ValidationException,
43
+ __Client: () => import_smithy_client.Client,
44
+ paginateListCommonControls: () => paginateListCommonControls,
45
+ paginateListControlMappings: () => paginateListControlMappings,
46
+ paginateListControls: () => paginateListControls,
47
+ paginateListDomains: () => paginateListDomains,
48
+ paginateListObjectives: () => paginateListObjectives
49
+ });
50
+ module.exports = __toCommonJS(index_exports);
51
+
52
+ // src/ControlCatalogClient.ts
53
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
54
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
55
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
56
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
57
+ var import_config_resolver = require("@smithy/config-resolver");
58
+ var import_core = require("@smithy/core");
59
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
60
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
61
+ var import_middleware_retry = require("@smithy/middleware-retry");
62
+
63
+ var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
64
+
65
+ // src/endpoint/EndpointParameters.ts
66
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
67
+ return Object.assign(options, {
68
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
69
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
70
+ defaultSigningName: "controlcatalog"
71
+ });
72
+ }, "resolveClientEndpointParameters");
73
+ var commonParams = {
74
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
75
+ Endpoint: { type: "builtInParams", name: "endpoint" },
76
+ Region: { type: "builtInParams", name: "region" },
77
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
78
+ };
79
+
80
+ // src/ControlCatalogClient.ts
81
+ var import_runtimeConfig = require("././runtimeConfig");
82
+
83
+ // src/runtimeExtensions.ts
84
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
85
+ var import_protocol_http = require("@smithy/protocol-http");
86
+ var import_smithy_client = require("@smithy/smithy-client");
87
+
88
+ // src/auth/httpAuthExtensionConfiguration.ts
89
+ var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
90
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
91
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
92
+ let _credentials = runtimeConfig.credentials;
93
+ return {
94
+ setHttpAuthScheme(httpAuthScheme) {
95
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
96
+ if (index === -1) {
97
+ _httpAuthSchemes.push(httpAuthScheme);
98
+ } else {
99
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
100
+ }
101
+ },
102
+ httpAuthSchemes() {
103
+ return _httpAuthSchemes;
104
+ },
105
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
106
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
107
+ },
108
+ httpAuthSchemeProvider() {
109
+ return _httpAuthSchemeProvider;
110
+ },
111
+ setCredentials(credentials) {
112
+ _credentials = credentials;
113
+ },
114
+ credentials() {
115
+ return _credentials;
116
+ }
117
+ };
118
+ }, "getHttpAuthExtensionConfiguration");
119
+ var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
120
+ return {
121
+ httpAuthSchemes: config.httpAuthSchemes(),
122
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
123
+ credentials: config.credentials()
124
+ };
125
+ }, "resolveHttpAuthRuntimeConfig");
126
+
127
+ // src/runtimeExtensions.ts
128
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
129
+ const extensionConfiguration = Object.assign(
130
+ (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
131
+ (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
132
+ (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
133
+ getHttpAuthExtensionConfiguration(runtimeConfig)
134
+ );
135
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
136
+ return Object.assign(
137
+ runtimeConfig,
138
+ (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
139
+ (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
140
+ (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
141
+ resolveHttpAuthRuntimeConfig(extensionConfiguration)
142
+ );
143
+ }, "resolveRuntimeExtensions");
144
+
145
+ // src/ControlCatalogClient.ts
146
+ var ControlCatalogClient = class extends import_smithy_client.Client {
147
+ static {
148
+ __name(this, "ControlCatalogClient");
149
+ }
150
+ /**
151
+ * The resolved configuration of ControlCatalogClient class. This is resolved and normalized from the {@link ControlCatalogClientConfig | constructor configuration interface}.
152
+ */
153
+ config;
154
+ constructor(...[configuration]) {
155
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
156
+ super(_config_0);
157
+ this.initConfig = _config_0;
158
+ const _config_1 = resolveClientEndpointParameters(_config_0);
159
+ const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
160
+ const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
161
+ const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
162
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
163
+ const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
164
+ const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
165
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
166
+ this.config = _config_8;
167
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
168
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
169
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
170
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
171
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
172
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
173
+ this.middlewareStack.use(
174
+ (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
175
+ httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultControlCatalogHttpAuthSchemeParametersProvider,
176
+ identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
177
+ "aws.auth#sigv4": config.credentials
178
+ }), "identityProviderConfigProvider")
179
+ })
180
+ );
181
+ this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
182
+ }
183
+ /**
184
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
185
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
186
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
187
+ */
188
+ destroy() {
189
+ super.destroy();
190
+ }
191
+ };
192
+
193
+ // src/ControlCatalog.ts
194
+
195
+
196
+ // src/commands/GetControlCommand.ts
197
+
198
+ var import_middleware_serde = require("@smithy/middleware-serde");
199
+
200
+
201
+ // src/protocols/Aws_restJson1.ts
202
+ var import_core2 = require("@aws-sdk/core");
203
+
204
+
205
+
206
+ // src/models/ControlCatalogServiceException.ts
207
+
208
+ var ControlCatalogServiceException = class _ControlCatalogServiceException extends import_smithy_client.ServiceException {
209
+ static {
210
+ __name(this, "ControlCatalogServiceException");
211
+ }
212
+ /**
213
+ * @internal
214
+ */
215
+ constructor(options) {
216
+ super(options);
217
+ Object.setPrototypeOf(this, _ControlCatalogServiceException.prototype);
218
+ }
219
+ };
220
+
221
+ // src/models/models_0.ts
222
+ var AccessDeniedException = class _AccessDeniedException extends ControlCatalogServiceException {
223
+ static {
224
+ __name(this, "AccessDeniedException");
225
+ }
226
+ name = "AccessDeniedException";
227
+ $fault = "client";
228
+ Message;
229
+ /**
230
+ * @internal
231
+ */
232
+ constructor(opts) {
233
+ super({
234
+ name: "AccessDeniedException",
235
+ $fault: "client",
236
+ ...opts
237
+ });
238
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
239
+ this.Message = opts.Message;
240
+ }
241
+ };
242
+ var InternalServerException = class _InternalServerException extends ControlCatalogServiceException {
243
+ static {
244
+ __name(this, "InternalServerException");
245
+ }
246
+ name = "InternalServerException";
247
+ $fault = "server";
248
+ $retryable = {};
249
+ Message;
250
+ /**
251
+ * @internal
252
+ */
253
+ constructor(opts) {
254
+ super({
255
+ name: "InternalServerException",
256
+ $fault: "server",
257
+ ...opts
258
+ });
259
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
260
+ this.Message = opts.Message;
261
+ }
262
+ };
263
+ var ThrottlingException = class _ThrottlingException extends ControlCatalogServiceException {
264
+ static {
265
+ __name(this, "ThrottlingException");
266
+ }
267
+ name = "ThrottlingException";
268
+ $fault = "client";
269
+ $retryable = {
270
+ throttling: true
271
+ };
272
+ Message;
273
+ /**
274
+ * @internal
275
+ */
276
+ constructor(opts) {
277
+ super({
278
+ name: "ThrottlingException",
279
+ $fault: "client",
280
+ ...opts
281
+ });
282
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
283
+ this.Message = opts.Message;
284
+ }
285
+ };
286
+ var ValidationException = class _ValidationException extends ControlCatalogServiceException {
287
+ static {
288
+ __name(this, "ValidationException");
289
+ }
290
+ name = "ValidationException";
291
+ $fault = "client";
292
+ Message;
293
+ /**
294
+ * @internal
295
+ */
296
+ constructor(opts) {
297
+ super({
298
+ name: "ValidationException",
299
+ $fault: "client",
300
+ ...opts
301
+ });
302
+ Object.setPrototypeOf(this, _ValidationException.prototype);
303
+ this.Message = opts.Message;
304
+ }
305
+ };
306
+ var ControlBehavior = {
307
+ DETECTIVE: "DETECTIVE",
308
+ PREVENTIVE: "PREVENTIVE",
309
+ PROACTIVE: "PROACTIVE"
310
+ };
311
+ var ControlScope = {
312
+ GLOBAL: "GLOBAL",
313
+ REGIONAL: "REGIONAL"
314
+ };
315
+ var ControlSeverity = {
316
+ CRITICAL: "CRITICAL",
317
+ HIGH: "HIGH",
318
+ LOW: "LOW",
319
+ MEDIUM: "MEDIUM"
320
+ };
321
+ var ResourceNotFoundException = class _ResourceNotFoundException extends ControlCatalogServiceException {
322
+ static {
323
+ __name(this, "ResourceNotFoundException");
324
+ }
325
+ name = "ResourceNotFoundException";
326
+ $fault = "client";
327
+ Message;
328
+ /**
329
+ * @internal
330
+ */
331
+ constructor(opts) {
332
+ super({
333
+ name: "ResourceNotFoundException",
334
+ $fault: "client",
335
+ ...opts
336
+ });
337
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
338
+ this.Message = opts.Message;
339
+ }
340
+ };
341
+ var MappingType = {
342
+ COMMON_CONTROL: "COMMON_CONTROL",
343
+ FRAMEWORK: "FRAMEWORK"
344
+ };
345
+ var Mapping;
346
+ ((Mapping2) => {
347
+ Mapping2.visit = /* @__PURE__ */ __name((value, visitor) => {
348
+ if (value.Framework !== void 0) return visitor.Framework(value.Framework);
349
+ if (value.CommonControl !== void 0) return visitor.CommonControl(value.CommonControl);
350
+ return visitor._(value.$unknown[0], value.$unknown[1]);
351
+ }, "visit");
352
+ })(Mapping || (Mapping = {}));
353
+
354
+ // src/protocols/Aws_restJson1.ts
355
+ var se_GetControlCommand = /* @__PURE__ */ __name(async (input, context) => {
356
+ const b = (0, import_core.requestBuilder)(input, context);
357
+ const headers = {
358
+ "content-type": "application/json"
359
+ };
360
+ b.bp("/get-control");
361
+ let body;
362
+ body = JSON.stringify(
363
+ (0, import_smithy_client.take)(input, {
364
+ ControlArn: []
365
+ })
366
+ );
367
+ b.m("POST").h(headers).b(body);
368
+ return b.build();
369
+ }, "se_GetControlCommand");
370
+ var se_ListCommonControlsCommand = /* @__PURE__ */ __name(async (input, context) => {
371
+ const b = (0, import_core.requestBuilder)(input, context);
372
+ const headers = {
373
+ "content-type": "application/json"
374
+ };
375
+ b.bp("/common-controls");
376
+ const query = (0, import_smithy_client.map)({
377
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
378
+ [_nT]: [, input[_NT]]
379
+ });
380
+ let body;
381
+ body = JSON.stringify(
382
+ (0, import_smithy_client.take)(input, {
383
+ CommonControlFilter: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "CommonControlFilter")
384
+ })
385
+ );
386
+ b.m("POST").h(headers).q(query).b(body);
387
+ return b.build();
388
+ }, "se_ListCommonControlsCommand");
389
+ var se_ListControlMappingsCommand = /* @__PURE__ */ __name(async (input, context) => {
390
+ const b = (0, import_core.requestBuilder)(input, context);
391
+ const headers = {
392
+ "content-type": "application/json"
393
+ };
394
+ b.bp("/list-control-mappings");
395
+ const query = (0, import_smithy_client.map)({
396
+ [_nT]: [, input[_NT]],
397
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()]
398
+ });
399
+ let body;
400
+ body = JSON.stringify(
401
+ (0, import_smithy_client.take)(input, {
402
+ Filter: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Filter")
403
+ })
404
+ );
405
+ b.m("POST").h(headers).q(query).b(body);
406
+ return b.build();
407
+ }, "se_ListControlMappingsCommand");
408
+ var se_ListControlsCommand = /* @__PURE__ */ __name(async (input, context) => {
409
+ const b = (0, import_core.requestBuilder)(input, context);
410
+ const headers = {
411
+ "content-type": "application/json"
412
+ };
413
+ b.bp("/list-controls");
414
+ const query = (0, import_smithy_client.map)({
415
+ [_nT]: [, input[_NT]],
416
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()]
417
+ });
418
+ let body;
419
+ body = JSON.stringify(
420
+ (0, import_smithy_client.take)(input, {
421
+ Filter: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Filter")
422
+ })
423
+ );
424
+ b.m("POST").h(headers).q(query).b(body);
425
+ return b.build();
426
+ }, "se_ListControlsCommand");
427
+ var se_ListDomainsCommand = /* @__PURE__ */ __name(async (input, context) => {
428
+ const b = (0, import_core.requestBuilder)(input, context);
429
+ const headers = {};
430
+ b.bp("/domains");
431
+ const query = (0, import_smithy_client.map)({
432
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
433
+ [_nT]: [, input[_NT]]
434
+ });
435
+ let body;
436
+ b.m("POST").h(headers).q(query).b(body);
437
+ return b.build();
438
+ }, "se_ListDomainsCommand");
439
+ var se_ListObjectivesCommand = /* @__PURE__ */ __name(async (input, context) => {
440
+ const b = (0, import_core.requestBuilder)(input, context);
441
+ const headers = {
442
+ "content-type": "application/json"
443
+ };
444
+ b.bp("/objectives");
445
+ const query = (0, import_smithy_client.map)({
446
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
447
+ [_nT]: [, input[_NT]]
448
+ });
449
+ let body;
450
+ body = JSON.stringify(
451
+ (0, import_smithy_client.take)(input, {
452
+ ObjectiveFilter: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "ObjectiveFilter")
453
+ })
454
+ );
455
+ b.m("POST").h(headers).q(query).b(body);
456
+ return b.build();
457
+ }, "se_ListObjectivesCommand");
458
+ var de_GetControlCommand = /* @__PURE__ */ __name(async (output, context) => {
459
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
460
+ return de_CommandError(output, context);
461
+ }
462
+ const contents = (0, import_smithy_client.map)({
463
+ $metadata: deserializeMetadata(output)
464
+ });
465
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
466
+ const doc = (0, import_smithy_client.take)(data, {
467
+ Aliases: import_smithy_client._json,
468
+ Arn: import_smithy_client.expectString,
469
+ Behavior: import_smithy_client.expectString,
470
+ CreateTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreateTime"),
471
+ Description: import_smithy_client.expectString,
472
+ GovernedResources: import_smithy_client._json,
473
+ Implementation: import_smithy_client._json,
474
+ Name: import_smithy_client.expectString,
475
+ Parameters: import_smithy_client._json,
476
+ RegionConfiguration: import_smithy_client._json,
477
+ Severity: import_smithy_client.expectString
478
+ });
479
+ Object.assign(contents, doc);
480
+ return contents;
481
+ }, "de_GetControlCommand");
482
+ var de_ListCommonControlsCommand = /* @__PURE__ */ __name(async (output, context) => {
483
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
484
+ return de_CommandError(output, context);
485
+ }
486
+ const contents = (0, import_smithy_client.map)({
487
+ $metadata: deserializeMetadata(output)
488
+ });
489
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
490
+ const doc = (0, import_smithy_client.take)(data, {
491
+ CommonControls: /* @__PURE__ */ __name((_) => de_CommonControlSummaryList(_, context), "CommonControls"),
492
+ NextToken: import_smithy_client.expectString
493
+ });
494
+ Object.assign(contents, doc);
495
+ return contents;
496
+ }, "de_ListCommonControlsCommand");
497
+ var de_ListControlMappingsCommand = /* @__PURE__ */ __name(async (output, context) => {
498
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
499
+ return de_CommandError(output, context);
500
+ }
501
+ const contents = (0, import_smithy_client.map)({
502
+ $metadata: deserializeMetadata(output)
503
+ });
504
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
505
+ const doc = (0, import_smithy_client.take)(data, {
506
+ ControlMappings: import_smithy_client._json,
507
+ NextToken: import_smithy_client.expectString
508
+ });
509
+ Object.assign(contents, doc);
510
+ return contents;
511
+ }, "de_ListControlMappingsCommand");
512
+ var de_ListControlsCommand = /* @__PURE__ */ __name(async (output, context) => {
513
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
514
+ return de_CommandError(output, context);
515
+ }
516
+ const contents = (0, import_smithy_client.map)({
517
+ $metadata: deserializeMetadata(output)
518
+ });
519
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
520
+ const doc = (0, import_smithy_client.take)(data, {
521
+ Controls: /* @__PURE__ */ __name((_) => de_Controls(_, context), "Controls"),
522
+ NextToken: import_smithy_client.expectString
523
+ });
524
+ Object.assign(contents, doc);
525
+ return contents;
526
+ }, "de_ListControlsCommand");
527
+ var de_ListDomainsCommand = /* @__PURE__ */ __name(async (output, context) => {
528
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
529
+ return de_CommandError(output, context);
530
+ }
531
+ const contents = (0, import_smithy_client.map)({
532
+ $metadata: deserializeMetadata(output)
533
+ });
534
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
535
+ const doc = (0, import_smithy_client.take)(data, {
536
+ Domains: /* @__PURE__ */ __name((_) => de_DomainSummaryList(_, context), "Domains"),
537
+ NextToken: import_smithy_client.expectString
538
+ });
539
+ Object.assign(contents, doc);
540
+ return contents;
541
+ }, "de_ListDomainsCommand");
542
+ var de_ListObjectivesCommand = /* @__PURE__ */ __name(async (output, context) => {
543
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
544
+ return de_CommandError(output, context);
545
+ }
546
+ const contents = (0, import_smithy_client.map)({
547
+ $metadata: deserializeMetadata(output)
548
+ });
549
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
550
+ const doc = (0, import_smithy_client.take)(data, {
551
+ NextToken: import_smithy_client.expectString,
552
+ Objectives: /* @__PURE__ */ __name((_) => de_ObjectiveSummaryList(_, context), "Objectives")
553
+ });
554
+ Object.assign(contents, doc);
555
+ return contents;
556
+ }, "de_ListObjectivesCommand");
557
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
558
+ const parsedOutput = {
559
+ ...output,
560
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
561
+ };
562
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
563
+ switch (errorCode) {
564
+ case "AccessDeniedException":
565
+ case "com.amazonaws.controlcatalog#AccessDeniedException":
566
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
567
+ case "InternalServerException":
568
+ case "com.amazonaws.controlcatalog#InternalServerException":
569
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
570
+ case "ResourceNotFoundException":
571
+ case "com.amazonaws.controlcatalog#ResourceNotFoundException":
572
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
573
+ case "ThrottlingException":
574
+ case "com.amazonaws.controlcatalog#ThrottlingException":
575
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
576
+ case "ValidationException":
577
+ case "com.amazonaws.controlcatalog#ValidationException":
578
+ throw await de_ValidationExceptionRes(parsedOutput, context);
579
+ default:
580
+ const parsedBody = parsedOutput.body;
581
+ return throwDefaultError({
582
+ output,
583
+ parsedBody,
584
+ errorCode
585
+ });
586
+ }
587
+ }, "de_CommandError");
588
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(ControlCatalogServiceException);
589
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
590
+ const contents = (0, import_smithy_client.map)({});
591
+ const data = parsedOutput.body;
592
+ const doc = (0, import_smithy_client.take)(data, {
593
+ Message: import_smithy_client.expectString
594
+ });
595
+ Object.assign(contents, doc);
596
+ const exception = new AccessDeniedException({
597
+ $metadata: deserializeMetadata(parsedOutput),
598
+ ...contents
599
+ });
600
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
601
+ }, "de_AccessDeniedExceptionRes");
602
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
603
+ const contents = (0, import_smithy_client.map)({});
604
+ const data = parsedOutput.body;
605
+ const doc = (0, import_smithy_client.take)(data, {
606
+ Message: import_smithy_client.expectString
607
+ });
608
+ Object.assign(contents, doc);
609
+ const exception = new InternalServerException({
610
+ $metadata: deserializeMetadata(parsedOutput),
611
+ ...contents
612
+ });
613
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
614
+ }, "de_InternalServerExceptionRes");
615
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
616
+ const contents = (0, import_smithy_client.map)({});
617
+ const data = parsedOutput.body;
618
+ const doc = (0, import_smithy_client.take)(data, {
619
+ Message: import_smithy_client.expectString
620
+ });
621
+ Object.assign(contents, doc);
622
+ const exception = new ResourceNotFoundException({
623
+ $metadata: deserializeMetadata(parsedOutput),
624
+ ...contents
625
+ });
626
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
627
+ }, "de_ResourceNotFoundExceptionRes");
628
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
629
+ const contents = (0, import_smithy_client.map)({});
630
+ const data = parsedOutput.body;
631
+ const doc = (0, import_smithy_client.take)(data, {
632
+ Message: import_smithy_client.expectString
633
+ });
634
+ Object.assign(contents, doc);
635
+ const exception = new ThrottlingException({
636
+ $metadata: deserializeMetadata(parsedOutput),
637
+ ...contents
638
+ });
639
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
640
+ }, "de_ThrottlingExceptionRes");
641
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
642
+ const contents = (0, import_smithy_client.map)({});
643
+ const data = parsedOutput.body;
644
+ const doc = (0, import_smithy_client.take)(data, {
645
+ Message: import_smithy_client.expectString
646
+ });
647
+ Object.assign(contents, doc);
648
+ const exception = new ValidationException({
649
+ $metadata: deserializeMetadata(parsedOutput),
650
+ ...contents
651
+ });
652
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
653
+ }, "de_ValidationExceptionRes");
654
+ var de_CommonControlSummary = /* @__PURE__ */ __name((output, context) => {
655
+ return (0, import_smithy_client.take)(output, {
656
+ Arn: import_smithy_client.expectString,
657
+ CreateTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreateTime"),
658
+ Description: import_smithy_client.expectString,
659
+ Domain: import_smithy_client._json,
660
+ LastUpdateTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LastUpdateTime"),
661
+ Name: import_smithy_client.expectString,
662
+ Objective: import_smithy_client._json
663
+ });
664
+ }, "de_CommonControlSummary");
665
+ var de_CommonControlSummaryList = /* @__PURE__ */ __name((output, context) => {
666
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
667
+ return de_CommonControlSummary(entry, context);
668
+ });
669
+ return retVal;
670
+ }, "de_CommonControlSummaryList");
671
+ var de_Controls = /* @__PURE__ */ __name((output, context) => {
672
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
673
+ return de_ControlSummary(entry, context);
674
+ });
675
+ return retVal;
676
+ }, "de_Controls");
677
+ var de_ControlSummary = /* @__PURE__ */ __name((output, context) => {
678
+ return (0, import_smithy_client.take)(output, {
679
+ Aliases: import_smithy_client._json,
680
+ Arn: import_smithy_client.expectString,
681
+ Behavior: import_smithy_client.expectString,
682
+ CreateTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreateTime"),
683
+ Description: import_smithy_client.expectString,
684
+ GovernedResources: import_smithy_client._json,
685
+ Implementation: import_smithy_client._json,
686
+ Name: import_smithy_client.expectString,
687
+ Severity: import_smithy_client.expectString
688
+ });
689
+ }, "de_ControlSummary");
690
+ var de_DomainSummary = /* @__PURE__ */ __name((output, context) => {
691
+ return (0, import_smithy_client.take)(output, {
692
+ Arn: import_smithy_client.expectString,
693
+ CreateTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreateTime"),
694
+ Description: import_smithy_client.expectString,
695
+ LastUpdateTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LastUpdateTime"),
696
+ Name: import_smithy_client.expectString
697
+ });
698
+ }, "de_DomainSummary");
699
+ var de_DomainSummaryList = /* @__PURE__ */ __name((output, context) => {
700
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
701
+ return de_DomainSummary(entry, context);
702
+ });
703
+ return retVal;
704
+ }, "de_DomainSummaryList");
705
+ var de_ObjectiveSummary = /* @__PURE__ */ __name((output, context) => {
706
+ return (0, import_smithy_client.take)(output, {
707
+ Arn: import_smithy_client.expectString,
708
+ CreateTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreateTime"),
709
+ Description: import_smithy_client.expectString,
710
+ Domain: import_smithy_client._json,
711
+ LastUpdateTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LastUpdateTime"),
712
+ Name: import_smithy_client.expectString
713
+ });
714
+ }, "de_ObjectiveSummary");
715
+ var de_ObjectiveSummaryList = /* @__PURE__ */ __name((output, context) => {
716
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
717
+ return de_ObjectiveSummary(entry, context);
718
+ });
719
+ return retVal;
720
+ }, "de_ObjectiveSummaryList");
721
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
722
+ httpStatusCode: output.statusCode,
723
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
724
+ extendedRequestId: output.headers["x-amz-id-2"],
725
+ cfId: output.headers["x-amz-cf-id"]
726
+ }), "deserializeMetadata");
727
+ var _MR = "MaxResults";
728
+ var _NT = "NextToken";
729
+ var _mR = "maxResults";
730
+ var _nT = "nextToken";
731
+
732
+ // src/commands/GetControlCommand.ts
733
+ var GetControlCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
734
+ return [
735
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
736
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
737
+ ];
738
+ }).s("ControlCatalog", "GetControl", {}).n("ControlCatalogClient", "GetControlCommand").f(void 0, void 0).ser(se_GetControlCommand).de(de_GetControlCommand).build() {
739
+ static {
740
+ __name(this, "GetControlCommand");
741
+ }
742
+ };
743
+
744
+ // src/commands/ListCommonControlsCommand.ts
745
+
746
+
747
+
748
+ var ListCommonControlsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
749
+ return [
750
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
751
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
752
+ ];
753
+ }).s("ControlCatalog", "ListCommonControls", {}).n("ControlCatalogClient", "ListCommonControlsCommand").f(void 0, void 0).ser(se_ListCommonControlsCommand).de(de_ListCommonControlsCommand).build() {
754
+ static {
755
+ __name(this, "ListCommonControlsCommand");
756
+ }
757
+ };
758
+
759
+ // src/commands/ListControlMappingsCommand.ts
760
+
761
+
762
+
763
+ var ListControlMappingsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
764
+ return [
765
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
766
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
767
+ ];
768
+ }).s("ControlCatalog", "ListControlMappings", {}).n("ControlCatalogClient", "ListControlMappingsCommand").f(void 0, void 0).ser(se_ListControlMappingsCommand).de(de_ListControlMappingsCommand).build() {
769
+ static {
770
+ __name(this, "ListControlMappingsCommand");
771
+ }
772
+ };
773
+
774
+ // src/commands/ListControlsCommand.ts
775
+
776
+
777
+
778
+ var ListControlsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
779
+ return [
780
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
781
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
782
+ ];
783
+ }).s("ControlCatalog", "ListControls", {}).n("ControlCatalogClient", "ListControlsCommand").f(void 0, void 0).ser(se_ListControlsCommand).de(de_ListControlsCommand).build() {
784
+ static {
785
+ __name(this, "ListControlsCommand");
786
+ }
787
+ };
788
+
789
+ // src/commands/ListDomainsCommand.ts
790
+
791
+
792
+
793
+ var ListDomainsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
794
+ return [
795
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
796
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
797
+ ];
798
+ }).s("ControlCatalog", "ListDomains", {}).n("ControlCatalogClient", "ListDomainsCommand").f(void 0, void 0).ser(se_ListDomainsCommand).de(de_ListDomainsCommand).build() {
799
+ static {
800
+ __name(this, "ListDomainsCommand");
801
+ }
802
+ };
803
+
804
+ // src/commands/ListObjectivesCommand.ts
805
+
806
+
807
+
808
+ var ListObjectivesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
809
+ return [
810
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
811
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
812
+ ];
813
+ }).s("ControlCatalog", "ListObjectives", {}).n("ControlCatalogClient", "ListObjectivesCommand").f(void 0, void 0).ser(se_ListObjectivesCommand).de(de_ListObjectivesCommand).build() {
814
+ static {
815
+ __name(this, "ListObjectivesCommand");
816
+ }
817
+ };
818
+
819
+ // src/ControlCatalog.ts
820
+ var commands = {
821
+ GetControlCommand,
822
+ ListCommonControlsCommand,
823
+ ListControlMappingsCommand,
824
+ ListControlsCommand,
825
+ ListDomainsCommand,
826
+ ListObjectivesCommand
827
+ };
828
+ var ControlCatalog = class extends ControlCatalogClient {
829
+ static {
830
+ __name(this, "ControlCatalog");
831
+ }
832
+ };
833
+ (0, import_smithy_client.createAggregatedClient)(commands, ControlCatalog);
834
+
835
+ // src/pagination/ListCommonControlsPaginator.ts
836
+
837
+ var paginateListCommonControls = (0, import_core.createPaginator)(ControlCatalogClient, ListCommonControlsCommand, "NextToken", "NextToken", "MaxResults");
838
+
839
+ // src/pagination/ListControlMappingsPaginator.ts
840
+
841
+ var paginateListControlMappings = (0, import_core.createPaginator)(ControlCatalogClient, ListControlMappingsCommand, "NextToken", "NextToken", "MaxResults");
842
+
843
+ // src/pagination/ListControlsPaginator.ts
844
+
845
+ var paginateListControls = (0, import_core.createPaginator)(ControlCatalogClient, ListControlsCommand, "NextToken", "NextToken", "MaxResults");
846
+
847
+ // src/pagination/ListDomainsPaginator.ts
848
+
849
+ var paginateListDomains = (0, import_core.createPaginator)(ControlCatalogClient, ListDomainsCommand, "NextToken", "NextToken", "MaxResults");
850
+
851
+ // src/pagination/ListObjectivesPaginator.ts
852
+
853
+ var paginateListObjectives = (0, import_core.createPaginator)(ControlCatalogClient, ListObjectivesCommand, "NextToken", "NextToken", "MaxResults");
854
+ // Annotate the CommonJS export names for ESM import in node:
855
+
856
+ 0 && (module.exports = {
857
+ ControlCatalogServiceException,
858
+ __Client,
859
+ ControlCatalogClient,
860
+ ControlCatalog,
861
+ $Command,
862
+ GetControlCommand,
863
+ ListCommonControlsCommand,
864
+ ListControlMappingsCommand,
865
+ ListControlsCommand,
866
+ ListDomainsCommand,
867
+ ListObjectivesCommand,
868
+ paginateListCommonControls,
869
+ paginateListControlMappings,
870
+ paginateListControls,
871
+ paginateListDomains,
872
+ paginateListObjectives,
873
+ AccessDeniedException,
874
+ InternalServerException,
875
+ ThrottlingException,
876
+ ValidationException,
877
+ ControlBehavior,
878
+ ControlScope,
879
+ ControlSeverity,
880
+ ResourceNotFoundException,
881
+ MappingType,
882
+ Mapping
883
+ });
884
+