@aws-sdk/client-controltower 3.181.0 → 3.183.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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-controltower
9
+
10
+
11
+
12
+
13
+
6
14
  # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
7
15
 
8
16
 
@@ -1,70 +1,63 @@
1
- import { __extends } from "tslib";
2
1
  import { DisableControlCommand, } from "./commands/DisableControlCommand";
3
2
  import { EnableControlCommand, } from "./commands/EnableControlCommand";
4
3
  import { GetControlOperationCommand, } from "./commands/GetControlOperationCommand";
5
4
  import { ListEnabledControlsCommand, } from "./commands/ListEnabledControlsCommand";
6
5
  import { ControlTowerClient } from "./ControlTowerClient";
7
- var ControlTower = (function (_super) {
8
- __extends(ControlTower, _super);
9
- function ControlTower() {
10
- return _super !== null && _super.apply(this, arguments) || this;
11
- }
12
- ControlTower.prototype.disableControl = function (args, optionsOrCb, cb) {
13
- var command = new DisableControlCommand(args);
6
+ export class ControlTower extends ControlTowerClient {
7
+ disableControl(args, optionsOrCb, cb) {
8
+ const command = new DisableControlCommand(args);
14
9
  if (typeof optionsOrCb === "function") {
15
10
  this.send(command, optionsOrCb);
16
11
  }
17
12
  else if (typeof cb === "function") {
18
13
  if (typeof optionsOrCb !== "object")
19
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
14
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
20
15
  this.send(command, optionsOrCb || {}, cb);
21
16
  }
22
17
  else {
23
18
  return this.send(command, optionsOrCb);
24
19
  }
25
- };
26
- ControlTower.prototype.enableControl = function (args, optionsOrCb, cb) {
27
- var command = new EnableControlCommand(args);
20
+ }
21
+ enableControl(args, optionsOrCb, cb) {
22
+ const command = new EnableControlCommand(args);
28
23
  if (typeof optionsOrCb === "function") {
29
24
  this.send(command, optionsOrCb);
30
25
  }
31
26
  else if (typeof cb === "function") {
32
27
  if (typeof optionsOrCb !== "object")
33
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
28
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
34
29
  this.send(command, optionsOrCb || {}, cb);
35
30
  }
36
31
  else {
37
32
  return this.send(command, optionsOrCb);
38
33
  }
39
- };
40
- ControlTower.prototype.getControlOperation = function (args, optionsOrCb, cb) {
41
- var command = new GetControlOperationCommand(args);
34
+ }
35
+ getControlOperation(args, optionsOrCb, cb) {
36
+ const command = new GetControlOperationCommand(args);
42
37
  if (typeof optionsOrCb === "function") {
43
38
  this.send(command, optionsOrCb);
44
39
  }
45
40
  else if (typeof cb === "function") {
46
41
  if (typeof optionsOrCb !== "object")
47
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
42
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
48
43
  this.send(command, optionsOrCb || {}, cb);
49
44
  }
50
45
  else {
51
46
  return this.send(command, optionsOrCb);
52
47
  }
53
- };
54
- ControlTower.prototype.listEnabledControls = function (args, optionsOrCb, cb) {
55
- var command = new ListEnabledControlsCommand(args);
48
+ }
49
+ listEnabledControls(args, optionsOrCb, cb) {
50
+ const command = new ListEnabledControlsCommand(args);
56
51
  if (typeof optionsOrCb === "function") {
57
52
  this.send(command, optionsOrCb);
58
53
  }
59
54
  else if (typeof cb === "function") {
60
55
  if (typeof optionsOrCb !== "object")
61
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
56
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
62
57
  this.send(command, optionsOrCb || {}, cb);
63
58
  }
64
59
  else {
65
60
  return this.send(command, optionsOrCb);
66
61
  }
67
- };
68
- return ControlTower;
69
- }(ControlTowerClient));
70
- export { ControlTower };
62
+ }
63
+ }
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
2
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
3
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
9
8
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
10
9
  import { Client as __Client, } from "@aws-sdk/smithy-client";
11
10
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
12
- var ControlTowerClient = (function (_super) {
13
- __extends(ControlTowerClient, _super);
14
- function ControlTowerClient(configuration) {
15
- var _this = this;
16
- var _config_0 = __getRuntimeConfig(configuration);
17
- var _config_1 = resolveRegionConfig(_config_0);
18
- var _config_2 = resolveEndpointsConfig(_config_1);
19
- var _config_3 = resolveRetryConfig(_config_2);
20
- var _config_4 = resolveHostHeaderConfig(_config_3);
21
- var _config_5 = resolveAwsAuthConfig(_config_4);
22
- var _config_6 = resolveUserAgentConfig(_config_5);
23
- _this = _super.call(this, _config_6) || this;
24
- _this.config = _config_6;
25
- _this.middlewareStack.use(getRetryPlugin(_this.config));
26
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
27
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
28
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
30
- _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
31
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
32
- return _this;
11
+ export class ControlTowerClient extends __Client {
12
+ constructor(configuration) {
13
+ const _config_0 = __getRuntimeConfig(configuration);
14
+ const _config_1 = resolveRegionConfig(_config_0);
15
+ const _config_2 = resolveEndpointsConfig(_config_1);
16
+ const _config_3 = resolveRetryConfig(_config_2);
17
+ const _config_4 = resolveHostHeaderConfig(_config_3);
18
+ const _config_5 = resolveAwsAuthConfig(_config_4);
19
+ const _config_6 = resolveUserAgentConfig(_config_5);
20
+ super(_config_6);
21
+ this.config = _config_6;
22
+ this.middlewareStack.use(getRetryPlugin(this.config));
23
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
24
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
25
+ this.middlewareStack.use(getLoggerPlugin(this.config));
26
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
27
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
28
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
33
29
  }
34
- ControlTowerClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return ControlTowerClient;
38
- }(__Client));
39
- export { ControlTowerClient };
30
+ destroy() {
31
+ super.destroy();
32
+ }
33
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { DisableControlInputFilterSensitiveLog, DisableControlOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1DisableControlCommand, serializeAws_restJson1DisableControlCommand, } from "../protocols/Aws_restJson1";
6
- var DisableControlCommand = (function (_super) {
7
- __extends(DisableControlCommand, _super);
8
- function DisableControlCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class DisableControlCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- DisableControlCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "ControlTowerClient";
18
- var commandName = "DisableControlCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "ControlTowerClient";
15
+ const commandName = "DisableControlCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: DisableControlInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: DisableControlOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- DisableControlCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1DisableControlCommand(input, context);
33
- };
34
- DisableControlCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1DisableControlCommand(output, context);
36
- };
37
- return DisableControlCommand;
38
- }($Command));
39
- export { DisableControlCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { EnableControlInputFilterSensitiveLog, EnableControlOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1EnableControlCommand, serializeAws_restJson1EnableControlCommand, } from "../protocols/Aws_restJson1";
6
- var EnableControlCommand = (function (_super) {
7
- __extends(EnableControlCommand, _super);
8
- function EnableControlCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class EnableControlCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- EnableControlCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "ControlTowerClient";
18
- var commandName = "EnableControlCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "ControlTowerClient";
15
+ const commandName = "EnableControlCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: EnableControlInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: EnableControlOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- EnableControlCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1EnableControlCommand(input, context);
33
- };
34
- EnableControlCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1EnableControlCommand(output, context);
36
- };
37
- return EnableControlCommand;
38
- }($Command));
39
- export { EnableControlCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { GetControlOperationInputFilterSensitiveLog, GetControlOperationOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1GetControlOperationCommand, serializeAws_restJson1GetControlOperationCommand, } from "../protocols/Aws_restJson1";
6
- var GetControlOperationCommand = (function (_super) {
7
- __extends(GetControlOperationCommand, _super);
8
- function GetControlOperationCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class GetControlOperationCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- GetControlOperationCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "ControlTowerClient";
18
- var commandName = "GetControlOperationCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "ControlTowerClient";
15
+ const commandName = "GetControlOperationCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: GetControlOperationInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: GetControlOperationOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- GetControlOperationCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1GetControlOperationCommand(input, context);
33
- };
34
- GetControlOperationCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1GetControlOperationCommand(output, context);
36
- };
37
- return GetControlOperationCommand;
38
- }($Command));
39
- export { GetControlOperationCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { ListEnabledControlsInputFilterSensitiveLog, ListEnabledControlsOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1ListEnabledControlsCommand, serializeAws_restJson1ListEnabledControlsCommand, } from "../protocols/Aws_restJson1";
6
- var ListEnabledControlsCommand = (function (_super) {
7
- __extends(ListEnabledControlsCommand, _super);
8
- function ListEnabledControlsCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class ListEnabledControlsCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- ListEnabledControlsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "ControlTowerClient";
18
- var commandName = "ListEnabledControlsCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "ControlTowerClient";
15
+ const commandName = "ListEnabledControlsCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: ListEnabledControlsInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: ListEnabledControlsOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- ListEnabledControlsCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1ListEnabledControlsCommand(input, context);
33
- };
34
- ListEnabledControlsCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1ListEnabledControlsCommand(output, context);
36
- };
37
- return ListEnabledControlsCommand;
38
- }($Command));
39
- export { ListEnabledControlsCommand };
31
+ }
32
+ }
@@ -1,6 +1,5 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
- var regionHash = {
2
+ const regionHash = {
4
3
  "ca-central-1": {
5
4
  variants: [
6
5
  {
@@ -34,7 +33,7 @@ var regionHash = {
34
33
  ],
35
34
  },
36
35
  };
37
- var partitionHash = {
36
+ const partitionHash = {
38
37
  aws: {
39
38
  regions: [
40
39
  "af-south-1",
@@ -158,8 +157,9 @@ var partitionHash = {
158
157
  ],
159
158
  },
160
159
  };
161
- export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
162
- return __generator(this, function (_a) {
163
- return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "controltower", regionHash: regionHash, partitionHash: partitionHash }))];
164
- });
165
- }); };
160
+ export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
161
+ ...options,
162
+ signingService: "controltower",
163
+ regionHash,
164
+ partitionHash,
165
+ });
@@ -1,12 +1,7 @@
1
- import { __extends } from "tslib";
2
1
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
- var ControlTowerServiceException = (function (_super) {
4
- __extends(ControlTowerServiceException, _super);
5
- function ControlTowerServiceException(options) {
6
- var _this = _super.call(this, options) || this;
7
- Object.setPrototypeOf(_this, ControlTowerServiceException.prototype);
8
- return _this;
2
+ export class ControlTowerServiceException extends __ServiceException {
3
+ constructor(options) {
4
+ super(options);
5
+ Object.setPrototypeOf(this, ControlTowerServiceException.prototype);
9
6
  }
10
- return ControlTowerServiceException;
11
- }(__ServiceException));
12
- export { ControlTowerServiceException };
7
+ }