@aws-sdk/client-controlcatalog 3.621.0 → 3.623.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 (45) hide show
  1. package/README.md +16 -0
  2. package/dist-cjs/ControlCatalog.js +4 -0
  3. package/dist-cjs/ControlCatalogClient.js +12 -18
  4. package/dist-cjs/commands/GetControlCommand.js +28 -0
  5. package/dist-cjs/commands/ListControlsCommand.js +28 -0
  6. package/dist-cjs/commands/index.js +2 -0
  7. package/dist-cjs/models/models_0.js +24 -1
  8. package/dist-cjs/pagination/ListControlsPaginator.js +7 -0
  9. package/dist-cjs/pagination/index.js +1 -0
  10. package/dist-cjs/protocols/Aws_restJson1.js +79 -1
  11. package/dist-es/ControlCatalog.js +4 -0
  12. package/dist-es/ControlCatalogClient.js +12 -18
  13. package/dist-es/commands/GetControlCommand.js +24 -0
  14. package/dist-es/commands/ListControlsCommand.js +24 -0
  15. package/dist-es/commands/index.js +2 -0
  16. package/dist-es/models/models_0.js +22 -0
  17. package/dist-es/pagination/ListControlsPaginator.js +4 -0
  18. package/dist-es/pagination/index.js +1 -0
  19. package/dist-es/protocols/Aws_restJson1.js +75 -1
  20. package/dist-types/ControlCatalog.d.ts +15 -0
  21. package/dist-types/ControlCatalogClient.d.ts +6 -6
  22. package/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
  23. package/dist-types/commands/GetControlCommand.d.ts +85 -0
  24. package/dist-types/commands/ListControlsCommand.d.ts +80 -0
  25. package/dist-types/commands/index.d.ts +2 -0
  26. package/dist-types/models/models_0.d.ts +164 -0
  27. package/dist-types/pagination/ListControlsPaginator.d.ts +7 -0
  28. package/dist-types/pagination/index.d.ts +1 -0
  29. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  30. package/dist-types/runtimeConfig.browser.d.ts +2 -2
  31. package/dist-types/runtimeConfig.d.ts +2 -2
  32. package/dist-types/runtimeConfig.native.d.ts +2 -2
  33. package/dist-types/ts3.4/ControlCatalog.d.ts +35 -0
  34. package/dist-types/ts3.4/ControlCatalogClient.d.ts +18 -8
  35. package/dist-types/ts3.4/commands/GetControlCommand.d.ts +36 -0
  36. package/dist-types/ts3.4/commands/ListControlsCommand.d.ts +36 -0
  37. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  38. package/dist-types/ts3.4/models/models_0.d.ts +47 -0
  39. package/dist-types/ts3.4/pagination/ListControlsPaginator.d.ts +11 -0
  40. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  41. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  42. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
  43. package/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
  44. package/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
  45. package/package.json +10 -10
package/README.md CHANGED
@@ -230,6 +230,14 @@ see LICENSE for more information.
230
230
 
231
231
  ## Client Commands (Operations List)
232
232
 
233
+ <details>
234
+ <summary>
235
+ GetControl
236
+ </summary>
237
+
238
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/controlcatalog/command/GetControlCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-controlcatalog/Interface/GetControlCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-controlcatalog/Interface/GetControlCommandOutput/)
239
+
240
+ </details>
233
241
  <details>
234
242
  <summary>
235
243
  ListCommonControls
@@ -237,6 +245,14 @@ ListCommonControls
237
245
 
238
246
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/controlcatalog/command/ListCommonControlsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-controlcatalog/Interface/ListCommonControlsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-controlcatalog/Interface/ListCommonControlsCommandOutput/)
239
247
 
248
+ </details>
249
+ <details>
250
+ <summary>
251
+ ListControls
252
+ </summary>
253
+
254
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/controlcatalog/command/ListControlsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-controlcatalog/Interface/ListControlsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-controlcatalog/Interface/ListControlsCommandOutput/)
255
+
240
256
  </details>
241
257
  <details>
242
258
  <summary>
@@ -2,12 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ControlCatalog = void 0;
4
4
  const smithy_client_1 = require("@smithy/smithy-client");
5
+ const GetControlCommand_1 = require("./commands/GetControlCommand");
5
6
  const ListCommonControlsCommand_1 = require("./commands/ListCommonControlsCommand");
7
+ const ListControlsCommand_1 = require("./commands/ListControlsCommand");
6
8
  const ListDomainsCommand_1 = require("./commands/ListDomainsCommand");
7
9
  const ListObjectivesCommand_1 = require("./commands/ListObjectivesCommand");
8
10
  const ControlCatalogClient_1 = require("./ControlCatalogClient");
9
11
  const commands = {
12
+ GetControlCommand: GetControlCommand_1.GetControlCommand,
10
13
  ListCommonControlsCommand: ListCommonControlsCommand_1.ListCommonControlsCommand,
14
+ ListControlsCommand: ListControlsCommand_1.ListControlsCommand,
11
15
  ListDomainsCommand: ListDomainsCommand_1.ListDomainsCommand,
12
16
  ListObjectivesCommand: ListObjectivesCommand_1.ListObjectivesCommand,
13
17
  };
@@ -20,37 +20,31 @@ class ControlCatalogClient extends smithy_client_1.Client {
20
20
  constructor(...[configuration]) {
21
21
  const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
22
22
  const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
23
- const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);
24
- const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
25
- const _config_4 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_3);
26
- const _config_5 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_4);
27
- const _config_6 = (0, middleware_retry_1.resolveRetryConfig)(_config_5);
23
+ const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);
24
+ const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);
25
+ const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);
26
+ const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
27
+ const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);
28
28
  const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
29
29
  const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
30
30
  super(_config_8);
31
31
  this.config = _config_8;
32
- this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
33
- this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
34
- this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
35
32
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
36
33
  this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
37
34
  this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
35
+ this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
36
+ this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
37
+ this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
38
38
  this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
39
- httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
40
- identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
39
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultControlCatalogHttpAuthSchemeParametersProvider,
40
+ identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({
41
+ "aws.auth#sigv4": config.credentials,
42
+ }),
41
43
  }));
42
44
  this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
43
45
  }
44
46
  destroy() {
45
47
  super.destroy();
46
48
  }
47
- getDefaultHttpAuthSchemeParametersProvider() {
48
- return httpAuthSchemeProvider_1.defaultControlCatalogHttpAuthSchemeParametersProvider;
49
- }
50
- getIdentityProviderConfigProvider() {
51
- return async (config) => new core_1.DefaultIdentityProviderConfig({
52
- "aws.auth#sigv4": config.credentials,
53
- });
54
- }
55
49
  }
56
50
  exports.ControlCatalogClient = ControlCatalogClient;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetControlCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
10
+ class GetControlCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("ControlCatalog", "GetControl", {})
22
+ .n("ControlCatalogClient", "GetControlCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_restJson1_1.se_GetControlCommand)
25
+ .de(Aws_restJson1_1.de_GetControlCommand)
26
+ .build() {
27
+ }
28
+ exports.GetControlCommand = GetControlCommand;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListControlsCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
10
+ class ListControlsCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("ControlCatalog", "ListControls", {})
22
+ .n("ControlCatalogClient", "ListControlsCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_restJson1_1.se_ListControlsCommand)
25
+ .de(Aws_restJson1_1.de_ListControlsCommand)
26
+ .build() {
27
+ }
28
+ exports.ListControlsCommand = ListControlsCommand;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./GetControlCommand"), exports);
4
5
  tslib_1.__exportStar(require("./ListCommonControlsCommand"), exports);
6
+ tslib_1.__exportStar(require("./ListControlsCommand"), exports);
5
7
  tslib_1.__exportStar(require("./ListDomainsCommand"), exports);
6
8
  tslib_1.__exportStar(require("./ListObjectivesCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ValidationException = exports.ThrottlingException = exports.InternalServerException = exports.AccessDeniedException = void 0;
3
+ exports.ResourceNotFoundException = exports.ControlScope = exports.ControlBehavior = exports.ValidationException = exports.ThrottlingException = exports.InternalServerException = exports.AccessDeniedException = void 0;
4
4
  const ControlCatalogServiceException_1 = require("./ControlCatalogServiceException");
5
5
  class AccessDeniedException extends ControlCatalogServiceException_1.ControlCatalogServiceException {
6
6
  constructor(opts) {
@@ -62,3 +62,26 @@ class ValidationException extends ControlCatalogServiceException_1.ControlCatalo
62
62
  }
63
63
  }
64
64
  exports.ValidationException = ValidationException;
65
+ exports.ControlBehavior = {
66
+ DETECTIVE: "DETECTIVE",
67
+ PREVENTIVE: "PREVENTIVE",
68
+ PROACTIVE: "PROACTIVE",
69
+ };
70
+ exports.ControlScope = {
71
+ GLOBAL: "GLOBAL",
72
+ REGIONAL: "REGIONAL",
73
+ };
74
+ class ResourceNotFoundException extends ControlCatalogServiceException_1.ControlCatalogServiceException {
75
+ constructor(opts) {
76
+ super({
77
+ name: "ResourceNotFoundException",
78
+ $fault: "client",
79
+ ...opts,
80
+ });
81
+ this.name = "ResourceNotFoundException";
82
+ this.$fault = "client";
83
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
84
+ this.Message = opts.Message;
85
+ }
86
+ }
87
+ exports.ResourceNotFoundException = ResourceNotFoundException;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListControls = void 0;
4
+ const core_1 = require("@smithy/core");
5
+ const ListControlsCommand_1 = require("../commands/ListControlsCommand");
6
+ const ControlCatalogClient_1 = require("../ControlCatalogClient");
7
+ exports.paginateListControls = (0, core_1.createPaginator)(ControlCatalogClient_1.ControlCatalogClient, ListControlsCommand_1.ListControlsCommand, "NextToken", "NextToken", "MaxResults");
@@ -3,5 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./Interfaces"), exports);
5
5
  tslib_1.__exportStar(require("./ListCommonControlsPaginator"), exports);
6
+ tslib_1.__exportStar(require("./ListControlsPaginator"), exports);
6
7
  tslib_1.__exportStar(require("./ListDomainsPaginator"), exports);
7
8
  tslib_1.__exportStar(require("./ListObjectivesPaginator"), exports);
@@ -1,11 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_ListObjectivesCommand = exports.de_ListDomainsCommand = exports.de_ListCommonControlsCommand = exports.se_ListObjectivesCommand = exports.se_ListDomainsCommand = exports.se_ListCommonControlsCommand = void 0;
3
+ exports.de_ListObjectivesCommand = exports.de_ListDomainsCommand = exports.de_ListControlsCommand = exports.de_ListCommonControlsCommand = exports.de_GetControlCommand = exports.se_ListObjectivesCommand = exports.se_ListDomainsCommand = exports.se_ListControlsCommand = exports.se_ListCommonControlsCommand = exports.se_GetControlCommand = void 0;
4
4
  const core_1 = require("@aws-sdk/core");
5
5
  const core_2 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const ControlCatalogServiceException_1 = require("../models/ControlCatalogServiceException");
8
8
  const models_0_1 = require("../models/models_0");
9
+ const se_GetControlCommand = async (input, context) => {
10
+ const b = (0, core_2.requestBuilder)(input, context);
11
+ const headers = {
12
+ "content-type": "application/json",
13
+ };
14
+ b.bp("/get-control");
15
+ let body;
16
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
17
+ ControlArn: [],
18
+ }));
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
21
+ };
22
+ exports.se_GetControlCommand = se_GetControlCommand;
9
23
  const se_ListCommonControlsCommand = async (input, context) => {
10
24
  const b = (0, core_2.requestBuilder)(input, context);
11
25
  const headers = {
@@ -24,6 +38,19 @@ const se_ListCommonControlsCommand = async (input, context) => {
24
38
  return b.build();
25
39
  };
26
40
  exports.se_ListCommonControlsCommand = se_ListCommonControlsCommand;
41
+ const se_ListControlsCommand = async (input, context) => {
42
+ const b = (0, core_2.requestBuilder)(input, context);
43
+ const headers = {};
44
+ b.bp("/list-controls");
45
+ const query = (0, smithy_client_1.map)({
46
+ [_nT]: [, input[_NT]],
47
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
48
+ });
49
+ let body;
50
+ b.m("POST").h(headers).q(query).b(body);
51
+ return b.build();
52
+ };
53
+ exports.se_ListControlsCommand = se_ListControlsCommand;
27
54
  const se_ListDomainsCommand = async (input, context) => {
28
55
  const b = (0, core_2.requestBuilder)(input, context);
29
56
  const headers = {};
@@ -55,6 +82,25 @@ const se_ListObjectivesCommand = async (input, context) => {
55
82
  return b.build();
56
83
  };
57
84
  exports.se_ListObjectivesCommand = se_ListObjectivesCommand;
85
+ const de_GetControlCommand = async (output, context) => {
86
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
87
+ return de_CommandError(output, context);
88
+ }
89
+ const contents = (0, smithy_client_1.map)({
90
+ $metadata: deserializeMetadata(output),
91
+ });
92
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
93
+ const doc = (0, smithy_client_1.take)(data, {
94
+ Arn: smithy_client_1.expectString,
95
+ Behavior: smithy_client_1.expectString,
96
+ Description: smithy_client_1.expectString,
97
+ Name: smithy_client_1.expectString,
98
+ RegionConfiguration: smithy_client_1._json,
99
+ });
100
+ Object.assign(contents, doc);
101
+ return contents;
102
+ };
103
+ exports.de_GetControlCommand = de_GetControlCommand;
58
104
  const de_ListCommonControlsCommand = async (output, context) => {
59
105
  if (output.statusCode !== 200 && output.statusCode >= 300) {
60
106
  return de_CommandError(output, context);
@@ -71,6 +117,22 @@ const de_ListCommonControlsCommand = async (output, context) => {
71
117
  return contents;
72
118
  };
73
119
  exports.de_ListCommonControlsCommand = de_ListCommonControlsCommand;
120
+ const de_ListControlsCommand = async (output, context) => {
121
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
122
+ return de_CommandError(output, context);
123
+ }
124
+ const contents = (0, smithy_client_1.map)({
125
+ $metadata: deserializeMetadata(output),
126
+ });
127
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
128
+ const doc = (0, smithy_client_1.take)(data, {
129
+ Controls: smithy_client_1._json,
130
+ NextToken: smithy_client_1.expectString,
131
+ });
132
+ Object.assign(contents, doc);
133
+ return contents;
134
+ };
135
+ exports.de_ListControlsCommand = de_ListControlsCommand;
74
136
  const de_ListDomainsCommand = async (output, context) => {
75
137
  if (output.statusCode !== 200 && output.statusCode >= 300) {
76
138
  return de_CommandError(output, context);
@@ -116,6 +178,9 @@ const de_CommandError = async (output, context) => {
116
178
  case "InternalServerException":
117
179
  case "com.amazonaws.controlcatalog#InternalServerException":
118
180
  throw await de_InternalServerExceptionRes(parsedOutput, context);
181
+ case "ResourceNotFoundException":
182
+ case "com.amazonaws.controlcatalog#ResourceNotFoundException":
183
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
119
184
  case "ThrottlingException":
120
185
  case "com.amazonaws.controlcatalog#ThrottlingException":
121
186
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
@@ -158,6 +223,19 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
158
223
  });
159
224
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
160
225
  };
226
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
227
+ const contents = (0, smithy_client_1.map)({});
228
+ const data = parsedOutput.body;
229
+ const doc = (0, smithy_client_1.take)(data, {
230
+ Message: smithy_client_1.expectString,
231
+ });
232
+ Object.assign(contents, doc);
233
+ const exception = new models_0_1.ResourceNotFoundException({
234
+ $metadata: deserializeMetadata(parsedOutput),
235
+ ...contents,
236
+ });
237
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
238
+ };
161
239
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
162
240
  const contents = (0, smithy_client_1.map)({});
163
241
  const data = parsedOutput.body;
@@ -1,10 +1,14 @@
1
1
  import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { GetControlCommand } from "./commands/GetControlCommand";
2
3
  import { ListCommonControlsCommand, } from "./commands/ListCommonControlsCommand";
4
+ import { ListControlsCommand, } from "./commands/ListControlsCommand";
3
5
  import { ListDomainsCommand } from "./commands/ListDomainsCommand";
4
6
  import { ListObjectivesCommand, } from "./commands/ListObjectivesCommand";
5
7
  import { ControlCatalogClient } from "./ControlCatalogClient";
6
8
  const commands = {
9
+ GetControlCommand,
7
10
  ListCommonControlsCommand,
11
+ ListControlsCommand,
8
12
  ListDomainsCommand,
9
13
  ListObjectivesCommand,
10
14
  };
@@ -17,36 +17,30 @@ export class ControlCatalogClient extends __Client {
17
17
  constructor(...[configuration]) {
18
18
  const _config_0 = __getRuntimeConfig(configuration || {});
19
19
  const _config_1 = resolveClientEndpointParameters(_config_0);
20
- const _config_2 = resolveRegionConfig(_config_1);
21
- const _config_3 = resolveEndpointConfig(_config_2);
22
- const _config_4 = resolveHostHeaderConfig(_config_3);
23
- const _config_5 = resolveUserAgentConfig(_config_4);
24
- const _config_6 = resolveRetryConfig(_config_5);
20
+ const _config_2 = resolveUserAgentConfig(_config_1);
21
+ const _config_3 = resolveRetryConfig(_config_2);
22
+ const _config_4 = resolveRegionConfig(_config_3);
23
+ const _config_5 = resolveHostHeaderConfig(_config_4);
24
+ const _config_6 = resolveEndpointConfig(_config_5);
25
25
  const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
26
26
  const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
27
27
  super(_config_8);
28
28
  this.config = _config_8;
29
- this.middlewareStack.use(getHostHeaderPlugin(this.config));
30
- this.middlewareStack.use(getLoggerPlugin(this.config));
31
- this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
32
29
  this.middlewareStack.use(getUserAgentPlugin(this.config));
33
30
  this.middlewareStack.use(getRetryPlugin(this.config));
34
31
  this.middlewareStack.use(getContentLengthPlugin(this.config));
32
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
33
+ this.middlewareStack.use(getLoggerPlugin(this.config));
34
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
35
35
  this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
36
- httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
37
- identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
36
+ httpAuthSchemeParametersProvider: defaultControlCatalogHttpAuthSchemeParametersProvider,
37
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
38
+ "aws.auth#sigv4": config.credentials,
39
+ }),
38
40
  }));
39
41
  this.middlewareStack.use(getHttpSigningPlugin(this.config));
40
42
  }
41
43
  destroy() {
42
44
  super.destroy();
43
45
  }
44
- getDefaultHttpAuthSchemeParametersProvider() {
45
- return defaultControlCatalogHttpAuthSchemeParametersProvider;
46
- }
47
- getIdentityProviderConfigProvider() {
48
- return async (config) => new DefaultIdentityProviderConfig({
49
- "aws.auth#sigv4": config.credentials,
50
- });
51
- }
52
46
  }
@@ -0,0 +1,24 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_GetControlCommand, se_GetControlCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class GetControlCommand extends $Command
8
+ .classBuilder()
9
+ .ep({
10
+ ...commonParams,
11
+ })
12
+ .m(function (Command, cs, config, o) {
13
+ return [
14
+ getSerdePlugin(config, this.serialize, this.deserialize),
15
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
16
+ ];
17
+ })
18
+ .s("ControlCatalog", "GetControl", {})
19
+ .n("ControlCatalogClient", "GetControlCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_GetControlCommand)
22
+ .de(de_GetControlCommand)
23
+ .build() {
24
+ }
@@ -0,0 +1,24 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_ListControlsCommand, se_ListControlsCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class ListControlsCommand extends $Command
8
+ .classBuilder()
9
+ .ep({
10
+ ...commonParams,
11
+ })
12
+ .m(function (Command, cs, config, o) {
13
+ return [
14
+ getSerdePlugin(config, this.serialize, this.deserialize),
15
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
16
+ ];
17
+ })
18
+ .s("ControlCatalog", "ListControls", {})
19
+ .n("ControlCatalogClient", "ListControlsCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_ListControlsCommand)
22
+ .de(de_ListControlsCommand)
23
+ .build() {
24
+ }
@@ -1,3 +1,5 @@
1
+ export * from "./GetControlCommand";
1
2
  export * from "./ListCommonControlsCommand";
3
+ export * from "./ListControlsCommand";
2
4
  export * from "./ListDomainsCommand";
3
5
  export * from "./ListObjectivesCommand";
@@ -55,3 +55,25 @@ export class ValidationException extends __BaseException {
55
55
  this.Message = opts.Message;
56
56
  }
57
57
  }
58
+ export const ControlBehavior = {
59
+ DETECTIVE: "DETECTIVE",
60
+ PREVENTIVE: "PREVENTIVE",
61
+ PROACTIVE: "PROACTIVE",
62
+ };
63
+ export const ControlScope = {
64
+ GLOBAL: "GLOBAL",
65
+ REGIONAL: "REGIONAL",
66
+ };
67
+ export class ResourceNotFoundException extends __BaseException {
68
+ constructor(opts) {
69
+ super({
70
+ name: "ResourceNotFoundException",
71
+ $fault: "client",
72
+ ...opts,
73
+ });
74
+ this.name = "ResourceNotFoundException";
75
+ this.$fault = "client";
76
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
77
+ this.Message = opts.Message;
78
+ }
79
+ }
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { ListControlsCommand, } from "../commands/ListControlsCommand";
3
+ import { ControlCatalogClient } from "../ControlCatalogClient";
4
+ export const paginateListControls = createPaginator(ControlCatalogClient, ListControlsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,4 +1,5 @@
1
1
  export * from "./Interfaces";
2
2
  export * from "./ListCommonControlsPaginator";
3
+ export * from "./ListControlsPaginator";
3
4
  export * from "./ListDomainsPaginator";
4
5
  export * from "./ListObjectivesPaginator";
@@ -2,7 +2,20 @@ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody a
2
2
  import { requestBuilder as rb } from "@smithy/core";
3
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
4
  import { ControlCatalogServiceException as __BaseException } from "../models/ControlCatalogServiceException";
5
- import { AccessDeniedException, InternalServerException, ThrottlingException, ValidationException, } from "../models/models_0";
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
+ };
6
19
  export const se_ListCommonControlsCommand = async (input, context) => {
7
20
  const b = rb(input, context);
8
21
  const headers = {
@@ -20,6 +33,18 @@ export const se_ListCommonControlsCommand = async (input, context) => {
20
33
  b.m("POST").h(headers).q(query).b(body);
21
34
  return b.build();
22
35
  };
36
+ export const se_ListControlsCommand = async (input, context) => {
37
+ const b = rb(input, context);
38
+ const headers = {};
39
+ b.bp("/list-controls");
40
+ const query = map({
41
+ [_nT]: [, input[_NT]],
42
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
43
+ });
44
+ let body;
45
+ b.m("POST").h(headers).q(query).b(body);
46
+ return b.build();
47
+ };
23
48
  export const se_ListDomainsCommand = async (input, context) => {
24
49
  const b = rb(input, context);
25
50
  const headers = {};
@@ -49,6 +74,24 @@ export const se_ListObjectivesCommand = async (input, context) => {
49
74
  b.m("POST").h(headers).q(query).b(body);
50
75
  return b.build();
51
76
  };
77
+ export const de_GetControlCommand = async (output, context) => {
78
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
79
+ return de_CommandError(output, context);
80
+ }
81
+ const contents = map({
82
+ $metadata: deserializeMetadata(output),
83
+ });
84
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
85
+ const doc = take(data, {
86
+ Arn: __expectString,
87
+ Behavior: __expectString,
88
+ Description: __expectString,
89
+ Name: __expectString,
90
+ RegionConfiguration: _json,
91
+ });
92
+ Object.assign(contents, doc);
93
+ return contents;
94
+ };
52
95
  export const de_ListCommonControlsCommand = async (output, context) => {
53
96
  if (output.statusCode !== 200 && output.statusCode >= 300) {
54
97
  return de_CommandError(output, context);
@@ -64,6 +107,21 @@ export const de_ListCommonControlsCommand = async (output, context) => {
64
107
  Object.assign(contents, doc);
65
108
  return contents;
66
109
  };
110
+ export const de_ListControlsCommand = async (output, context) => {
111
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
112
+ return de_CommandError(output, context);
113
+ }
114
+ const contents = map({
115
+ $metadata: deserializeMetadata(output),
116
+ });
117
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
118
+ const doc = take(data, {
119
+ Controls: _json,
120
+ NextToken: __expectString,
121
+ });
122
+ Object.assign(contents, doc);
123
+ return contents;
124
+ };
67
125
  export const de_ListDomainsCommand = async (output, context) => {
68
126
  if (output.statusCode !== 200 && output.statusCode >= 300) {
69
127
  return de_CommandError(output, context);
@@ -107,6 +165,9 @@ const de_CommandError = async (output, context) => {
107
165
  case "InternalServerException":
108
166
  case "com.amazonaws.controlcatalog#InternalServerException":
109
167
  throw await de_InternalServerExceptionRes(parsedOutput, context);
168
+ case "ResourceNotFoundException":
169
+ case "com.amazonaws.controlcatalog#ResourceNotFoundException":
170
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
110
171
  case "ThrottlingException":
111
172
  case "com.amazonaws.controlcatalog#ThrottlingException":
112
173
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
@@ -149,6 +210,19 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
149
210
  });
150
211
  return __decorateServiceException(exception, parsedOutput.body);
151
212
  };
213
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
214
+ const contents = map({});
215
+ const data = parsedOutput.body;
216
+ const doc = take(data, {
217
+ Message: __expectString,
218
+ });
219
+ Object.assign(contents, doc);
220
+ const exception = new ResourceNotFoundException({
221
+ $metadata: deserializeMetadata(parsedOutput),
222
+ ...contents,
223
+ });
224
+ return __decorateServiceException(exception, parsedOutput.body);
225
+ };
152
226
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
153
227
  const contents = map({});
154
228
  const data = parsedOutput.body;