@aws-sdk/client-controlcatalog 3.928.0 → 3.930.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 (30) hide show
  1. package/dist-cjs/index.js +456 -442
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/ControlCatalogClient.js +2 -0
  4. package/dist-es/commands/GetControlCommand.js +3 -9
  5. package/dist-es/commands/ListCommonControlsCommand.js +3 -9
  6. package/dist-es/commands/ListControlMappingsCommand.js +3 -9
  7. package/dist-es/commands/ListControlsCommand.js +3 -9
  8. package/dist-es/commands/ListDomainsCommand.js +3 -9
  9. package/dist-es/commands/ListObjectivesCommand.js +3 -9
  10. package/dist-es/models/models_0.js +0 -10
  11. package/dist-es/runtimeConfig.shared.js +2 -0
  12. package/dist-es/schemas/schemas_0.js +440 -0
  13. package/dist-types/ControlCatalogClient.d.ts +10 -1
  14. package/dist-types/models/models_0.d.ts +4 -1
  15. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  16. package/dist-types/runtimeConfig.d.ts +1 -0
  17. package/dist-types/runtimeConfig.native.d.ts +1 -0
  18. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  19. package/dist-types/schemas/schemas_0.d.ts +63 -0
  20. package/dist-types/ts3.4/ControlCatalogClient.d.ts +4 -0
  21. package/dist-types/ts3.4/models/models_0.d.ts +0 -1
  22. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  23. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  24. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  25. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  26. package/dist-types/ts3.4/schemas/schemas_0.d.ts +68 -0
  27. package/package.json +33 -33
  28. package/dist-es/protocols/Aws_restJson1.js +0 -380
  29. package/dist-types/protocols/Aws_restJson1.d.ts +0 -56
  30. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -77
@@ -1,380 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { ControlCatalogServiceException as __BaseException } from "../models/ControlCatalogServiceException";
5
- import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
6
- export const se_GetControlCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = {
9
- "content-type": "application/json",
10
- };
11
- b.bp("/get-control");
12
- let body;
13
- body = JSON.stringify(take(input, {
14
- ControlArn: [],
15
- }));
16
- b.m("POST").h(headers).b(body);
17
- return b.build();
18
- };
19
- export const se_ListCommonControlsCommand = async (input, context) => {
20
- const b = rb(input, context);
21
- const headers = {
22
- "content-type": "application/json",
23
- };
24
- b.bp("/common-controls");
25
- const query = map({
26
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
27
- [_nT]: [, input[_NT]],
28
- });
29
- let body;
30
- body = JSON.stringify(take(input, {
31
- CommonControlFilter: (_) => _json(_),
32
- }));
33
- b.m("POST").h(headers).q(query).b(body);
34
- return b.build();
35
- };
36
- export const se_ListControlMappingsCommand = async (input, context) => {
37
- const b = rb(input, context);
38
- const headers = {
39
- "content-type": "application/json",
40
- };
41
- b.bp("/list-control-mappings");
42
- const query = map({
43
- [_nT]: [, input[_NT]],
44
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
45
- });
46
- let body;
47
- body = JSON.stringify(take(input, {
48
- Filter: (_) => _json(_),
49
- }));
50
- b.m("POST").h(headers).q(query).b(body);
51
- return b.build();
52
- };
53
- export const se_ListControlsCommand = async (input, context) => {
54
- const b = rb(input, context);
55
- const headers = {
56
- "content-type": "application/json",
57
- };
58
- b.bp("/list-controls");
59
- const query = map({
60
- [_nT]: [, input[_NT]],
61
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
62
- });
63
- let body;
64
- body = JSON.stringify(take(input, {
65
- Filter: (_) => _json(_),
66
- }));
67
- b.m("POST").h(headers).q(query).b(body);
68
- return b.build();
69
- };
70
- export const se_ListDomainsCommand = async (input, context) => {
71
- const b = rb(input, context);
72
- const headers = {};
73
- b.bp("/domains");
74
- const query = map({
75
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
76
- [_nT]: [, input[_NT]],
77
- });
78
- let body;
79
- b.m("POST").h(headers).q(query).b(body);
80
- return b.build();
81
- };
82
- export const se_ListObjectivesCommand = async (input, context) => {
83
- const b = rb(input, context);
84
- const headers = {
85
- "content-type": "application/json",
86
- };
87
- b.bp("/objectives");
88
- const query = map({
89
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
90
- [_nT]: [, input[_NT]],
91
- });
92
- let body;
93
- body = JSON.stringify(take(input, {
94
- ObjectiveFilter: (_) => _json(_),
95
- }));
96
- b.m("POST").h(headers).q(query).b(body);
97
- return b.build();
98
- };
99
- export const de_GetControlCommand = async (output, context) => {
100
- if (output.statusCode !== 200 && output.statusCode >= 300) {
101
- return de_CommandError(output, context);
102
- }
103
- const contents = map({
104
- $metadata: deserializeMetadata(output),
105
- });
106
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
107
- const doc = take(data, {
108
- Aliases: _json,
109
- Arn: __expectString,
110
- Behavior: __expectString,
111
- CreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
112
- Description: __expectString,
113
- GovernedResources: _json,
114
- Implementation: _json,
115
- Name: __expectString,
116
- Parameters: _json,
117
- RegionConfiguration: _json,
118
- Severity: __expectString,
119
- });
120
- Object.assign(contents, doc);
121
- return contents;
122
- };
123
- export const de_ListCommonControlsCommand = async (output, context) => {
124
- if (output.statusCode !== 200 && output.statusCode >= 300) {
125
- return de_CommandError(output, context);
126
- }
127
- const contents = map({
128
- $metadata: deserializeMetadata(output),
129
- });
130
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
131
- const doc = take(data, {
132
- CommonControls: (_) => de_CommonControlSummaryList(_, context),
133
- NextToken: __expectString,
134
- });
135
- Object.assign(contents, doc);
136
- return contents;
137
- };
138
- export const de_ListControlMappingsCommand = async (output, context) => {
139
- if (output.statusCode !== 200 && output.statusCode >= 300) {
140
- return de_CommandError(output, context);
141
- }
142
- const contents = map({
143
- $metadata: deserializeMetadata(output),
144
- });
145
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
146
- const doc = take(data, {
147
- ControlMappings: _json,
148
- NextToken: __expectString,
149
- });
150
- Object.assign(contents, doc);
151
- return contents;
152
- };
153
- export const de_ListControlsCommand = async (output, context) => {
154
- if (output.statusCode !== 200 && output.statusCode >= 300) {
155
- return de_CommandError(output, context);
156
- }
157
- const contents = map({
158
- $metadata: deserializeMetadata(output),
159
- });
160
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
161
- const doc = take(data, {
162
- Controls: (_) => de_Controls(_, context),
163
- NextToken: __expectString,
164
- });
165
- Object.assign(contents, doc);
166
- return contents;
167
- };
168
- export const de_ListDomainsCommand = async (output, context) => {
169
- if (output.statusCode !== 200 && output.statusCode >= 300) {
170
- return de_CommandError(output, context);
171
- }
172
- const contents = map({
173
- $metadata: deserializeMetadata(output),
174
- });
175
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
176
- const doc = take(data, {
177
- Domains: (_) => de_DomainSummaryList(_, context),
178
- NextToken: __expectString,
179
- });
180
- Object.assign(contents, doc);
181
- return contents;
182
- };
183
- export const de_ListObjectivesCommand = async (output, context) => {
184
- if (output.statusCode !== 200 && output.statusCode >= 300) {
185
- return de_CommandError(output, context);
186
- }
187
- const contents = map({
188
- $metadata: deserializeMetadata(output),
189
- });
190
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
191
- const doc = take(data, {
192
- NextToken: __expectString,
193
- Objectives: (_) => de_ObjectiveSummaryList(_, context),
194
- });
195
- Object.assign(contents, doc);
196
- return contents;
197
- };
198
- const de_CommandError = async (output, context) => {
199
- const parsedOutput = {
200
- ...output,
201
- body: await parseErrorBody(output.body, context),
202
- };
203
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
204
- switch (errorCode) {
205
- case "AccessDeniedException":
206
- case "com.amazonaws.controlcatalog#AccessDeniedException":
207
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
208
- case "InternalServerException":
209
- case "com.amazonaws.controlcatalog#InternalServerException":
210
- throw await de_InternalServerExceptionRes(parsedOutput, context);
211
- case "ResourceNotFoundException":
212
- case "com.amazonaws.controlcatalog#ResourceNotFoundException":
213
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
214
- case "ThrottlingException":
215
- case "com.amazonaws.controlcatalog#ThrottlingException":
216
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
217
- case "ValidationException":
218
- case "com.amazonaws.controlcatalog#ValidationException":
219
- throw await de_ValidationExceptionRes(parsedOutput, context);
220
- default:
221
- const parsedBody = parsedOutput.body;
222
- return throwDefaultError({
223
- output,
224
- parsedBody,
225
- errorCode,
226
- });
227
- }
228
- };
229
- const throwDefaultError = withBaseException(__BaseException);
230
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
231
- const contents = map({});
232
- const data = parsedOutput.body;
233
- const doc = take(data, {
234
- Message: __expectString,
235
- });
236
- Object.assign(contents, doc);
237
- const exception = new AccessDeniedException({
238
- $metadata: deserializeMetadata(parsedOutput),
239
- ...contents,
240
- });
241
- return __decorateServiceException(exception, parsedOutput.body);
242
- };
243
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
244
- const contents = map({});
245
- const data = parsedOutput.body;
246
- const doc = take(data, {
247
- Message: __expectString,
248
- });
249
- Object.assign(contents, doc);
250
- const exception = new InternalServerException({
251
- $metadata: deserializeMetadata(parsedOutput),
252
- ...contents,
253
- });
254
- return __decorateServiceException(exception, parsedOutput.body);
255
- };
256
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
257
- const contents = map({});
258
- const data = parsedOutput.body;
259
- const doc = take(data, {
260
- Message: __expectString,
261
- });
262
- Object.assign(contents, doc);
263
- const exception = new ResourceNotFoundException({
264
- $metadata: deserializeMetadata(parsedOutput),
265
- ...contents,
266
- });
267
- return __decorateServiceException(exception, parsedOutput.body);
268
- };
269
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
270
- const contents = map({});
271
- const data = parsedOutput.body;
272
- const doc = take(data, {
273
- Message: __expectString,
274
- });
275
- Object.assign(contents, doc);
276
- const exception = new ThrottlingException({
277
- $metadata: deserializeMetadata(parsedOutput),
278
- ...contents,
279
- });
280
- return __decorateServiceException(exception, parsedOutput.body);
281
- };
282
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
283
- const contents = map({});
284
- const data = parsedOutput.body;
285
- const doc = take(data, {
286
- Message: __expectString,
287
- });
288
- Object.assign(contents, doc);
289
- const exception = new ValidationException({
290
- $metadata: deserializeMetadata(parsedOutput),
291
- ...contents,
292
- });
293
- return __decorateServiceException(exception, parsedOutput.body);
294
- };
295
- const de_CommonControlSummary = (output, context) => {
296
- return take(output, {
297
- Arn: __expectString,
298
- CreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
299
- Description: __expectString,
300
- Domain: _json,
301
- LastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
302
- Name: __expectString,
303
- Objective: _json,
304
- });
305
- };
306
- const de_CommonControlSummaryList = (output, context) => {
307
- const retVal = (output || [])
308
- .filter((e) => e != null)
309
- .map((entry) => {
310
- return de_CommonControlSummary(entry, context);
311
- });
312
- return retVal;
313
- };
314
- const de_Controls = (output, context) => {
315
- const retVal = (output || [])
316
- .filter((e) => e != null)
317
- .map((entry) => {
318
- return de_ControlSummary(entry, context);
319
- });
320
- return retVal;
321
- };
322
- const de_ControlSummary = (output, context) => {
323
- return take(output, {
324
- Aliases: _json,
325
- Arn: __expectString,
326
- Behavior: __expectString,
327
- CreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
328
- Description: __expectString,
329
- GovernedResources: _json,
330
- Implementation: _json,
331
- Name: __expectString,
332
- Severity: __expectString,
333
- });
334
- };
335
- const de_DomainSummary = (output, context) => {
336
- return take(output, {
337
- Arn: __expectString,
338
- CreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
339
- Description: __expectString,
340
- LastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
341
- Name: __expectString,
342
- });
343
- };
344
- const de_DomainSummaryList = (output, context) => {
345
- const retVal = (output || [])
346
- .filter((e) => e != null)
347
- .map((entry) => {
348
- return de_DomainSummary(entry, context);
349
- });
350
- return retVal;
351
- };
352
- const de_ObjectiveSummary = (output, context) => {
353
- return take(output, {
354
- Arn: __expectString,
355
- CreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
356
- Description: __expectString,
357
- Domain: _json,
358
- LastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
359
- Name: __expectString,
360
- });
361
- };
362
- const de_ObjectiveSummaryList = (output, context) => {
363
- const retVal = (output || [])
364
- .filter((e) => e != null)
365
- .map((entry) => {
366
- return de_ObjectiveSummary(entry, context);
367
- });
368
- return retVal;
369
- };
370
- const deserializeMetadata = (output) => ({
371
- httpStatusCode: output.statusCode,
372
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
373
- extendedRequestId: output.headers["x-amz-id-2"],
374
- cfId: output.headers["x-amz-cf-id"],
375
- });
376
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
377
- const _MR = "MaxResults";
378
- const _NT = "NextToken";
379
- const _mR = "maxResults";
380
- const _nT = "nextToken";
@@ -1,56 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
2
- import { SerdeContext as __SerdeContext } from "@smithy/types";
3
- import { GetControlCommandInput, GetControlCommandOutput } from "../commands/GetControlCommand";
4
- import { ListCommonControlsCommandInput, ListCommonControlsCommandOutput } from "../commands/ListCommonControlsCommand";
5
- import { ListControlMappingsCommandInput, ListControlMappingsCommandOutput } from "../commands/ListControlMappingsCommand";
6
- import { ListControlsCommandInput, ListControlsCommandOutput } from "../commands/ListControlsCommand";
7
- import { ListDomainsCommandInput, ListDomainsCommandOutput } from "../commands/ListDomainsCommand";
8
- import { ListObjectivesCommandInput, ListObjectivesCommandOutput } from "../commands/ListObjectivesCommand";
9
- /**
10
- * serializeAws_restJson1GetControlCommand
11
- */
12
- export declare const se_GetControlCommand: (input: GetControlCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
13
- /**
14
- * serializeAws_restJson1ListCommonControlsCommand
15
- */
16
- export declare const se_ListCommonControlsCommand: (input: ListCommonControlsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
17
- /**
18
- * serializeAws_restJson1ListControlMappingsCommand
19
- */
20
- export declare const se_ListControlMappingsCommand: (input: ListControlMappingsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
21
- /**
22
- * serializeAws_restJson1ListControlsCommand
23
- */
24
- export declare const se_ListControlsCommand: (input: ListControlsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
25
- /**
26
- * serializeAws_restJson1ListDomainsCommand
27
- */
28
- export declare const se_ListDomainsCommand: (input: ListDomainsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
29
- /**
30
- * serializeAws_restJson1ListObjectivesCommand
31
- */
32
- export declare const se_ListObjectivesCommand: (input: ListObjectivesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
33
- /**
34
- * deserializeAws_restJson1GetControlCommand
35
- */
36
- export declare const de_GetControlCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetControlCommandOutput>;
37
- /**
38
- * deserializeAws_restJson1ListCommonControlsCommand
39
- */
40
- export declare const de_ListCommonControlsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListCommonControlsCommandOutput>;
41
- /**
42
- * deserializeAws_restJson1ListControlMappingsCommand
43
- */
44
- export declare const de_ListControlMappingsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListControlMappingsCommandOutput>;
45
- /**
46
- * deserializeAws_restJson1ListControlsCommand
47
- */
48
- export declare const de_ListControlsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListControlsCommandOutput>;
49
- /**
50
- * deserializeAws_restJson1ListDomainsCommand
51
- */
52
- export declare const de_ListDomainsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListDomainsCommandOutput>;
53
- /**
54
- * deserializeAws_restJson1ListObjectivesCommand
55
- */
56
- export declare const de_ListObjectivesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListObjectivesCommandOutput>;
@@ -1,77 +0,0 @@
1
- import {
2
- HttpRequest as __HttpRequest,
3
- HttpResponse as __HttpResponse,
4
- } from "@smithy/protocol-http";
5
- import { SerdeContext as __SerdeContext } from "@smithy/types";
6
- import {
7
- GetControlCommandInput,
8
- GetControlCommandOutput,
9
- } from "../commands/GetControlCommand";
10
- import {
11
- ListCommonControlsCommandInput,
12
- ListCommonControlsCommandOutput,
13
- } from "../commands/ListCommonControlsCommand";
14
- import {
15
- ListControlMappingsCommandInput,
16
- ListControlMappingsCommandOutput,
17
- } from "../commands/ListControlMappingsCommand";
18
- import {
19
- ListControlsCommandInput,
20
- ListControlsCommandOutput,
21
- } from "../commands/ListControlsCommand";
22
- import {
23
- ListDomainsCommandInput,
24
- ListDomainsCommandOutput,
25
- } from "../commands/ListDomainsCommand";
26
- import {
27
- ListObjectivesCommandInput,
28
- ListObjectivesCommandOutput,
29
- } from "../commands/ListObjectivesCommand";
30
- export declare const se_GetControlCommand: (
31
- input: GetControlCommandInput,
32
- context: __SerdeContext
33
- ) => Promise<__HttpRequest>;
34
- export declare const se_ListCommonControlsCommand: (
35
- input: ListCommonControlsCommandInput,
36
- context: __SerdeContext
37
- ) => Promise<__HttpRequest>;
38
- export declare const se_ListControlMappingsCommand: (
39
- input: ListControlMappingsCommandInput,
40
- context: __SerdeContext
41
- ) => Promise<__HttpRequest>;
42
- export declare const se_ListControlsCommand: (
43
- input: ListControlsCommandInput,
44
- context: __SerdeContext
45
- ) => Promise<__HttpRequest>;
46
- export declare const se_ListDomainsCommand: (
47
- input: ListDomainsCommandInput,
48
- context: __SerdeContext
49
- ) => Promise<__HttpRequest>;
50
- export declare const se_ListObjectivesCommand: (
51
- input: ListObjectivesCommandInput,
52
- context: __SerdeContext
53
- ) => Promise<__HttpRequest>;
54
- export declare const de_GetControlCommand: (
55
- output: __HttpResponse,
56
- context: __SerdeContext
57
- ) => Promise<GetControlCommandOutput>;
58
- export declare const de_ListCommonControlsCommand: (
59
- output: __HttpResponse,
60
- context: __SerdeContext
61
- ) => Promise<ListCommonControlsCommandOutput>;
62
- export declare const de_ListControlMappingsCommand: (
63
- output: __HttpResponse,
64
- context: __SerdeContext
65
- ) => Promise<ListControlMappingsCommandOutput>;
66
- export declare const de_ListControlsCommand: (
67
- output: __HttpResponse,
68
- context: __SerdeContext
69
- ) => Promise<ListControlsCommandOutput>;
70
- export declare const de_ListDomainsCommand: (
71
- output: __HttpResponse,
72
- context: __SerdeContext
73
- ) => Promise<ListDomainsCommandOutput>;
74
- export declare const de_ListObjectivesCommand: (
75
- output: __HttpResponse,
76
- context: __SerdeContext
77
- ) => Promise<ListObjectivesCommandOutput>;