@aws-sdk/client-resource-groups 3.245.0 → 3.252.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +8 -10
  2. package/dist-cjs/ResourceGroups.js +30 -0
  3. package/dist-cjs/commands/GetAccountSettingsCommand.js +46 -0
  4. package/dist-cjs/commands/UpdateAccountSettingsCommand.js +46 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/endpoint/ruleset.js +3 -3
  7. package/dist-cjs/models/models_0.js +31 -2
  8. package/dist-cjs/protocols/Aws_restJson1.js +142 -1
  9. package/dist-es/ResourceGroups.js +30 -0
  10. package/dist-es/commands/GetAccountSettingsCommand.js +42 -0
  11. package/dist-es/commands/UpdateAccountSettingsCommand.js +42 -0
  12. package/dist-es/commands/index.js +2 -0
  13. package/dist-es/endpoint/ruleset.js +3 -3
  14. package/dist-es/models/models_0.js +25 -0
  15. package/dist-es/protocols/Aws_restJson1.js +137 -0
  16. package/dist-types/ResourceGroups.d.ts +120 -84
  17. package/dist-types/ResourceGroupsClient.d.ts +18 -18
  18. package/dist-types/commands/CreateGroupCommand.d.ts +7 -7
  19. package/dist-types/commands/DeleteGroupCommand.d.ts +3 -3
  20. package/dist-types/commands/GetAccountSettingsCommand.d.ts +37 -0
  21. package/dist-types/commands/GetGroupCommand.d.ts +3 -3
  22. package/dist-types/commands/GetGroupConfigurationCommand.d.ts +5 -6
  23. package/dist-types/commands/GetGroupQueryCommand.d.ts +3 -3
  24. package/dist-types/commands/GetTagsCommand.d.ts +3 -3
  25. package/dist-types/commands/GroupResourcesCommand.d.ts +21 -3
  26. package/dist-types/commands/ListGroupResourcesCommand.d.ts +6 -6
  27. package/dist-types/commands/ListGroupsCommand.d.ts +4 -4
  28. package/dist-types/commands/PutGroupConfigurationCommand.d.ts +3 -3
  29. package/dist-types/commands/SearchResourcesCommand.d.ts +9 -9
  30. package/dist-types/commands/TagCommand.d.ts +5 -5
  31. package/dist-types/commands/UngroupResourcesCommand.d.ts +7 -4
  32. package/dist-types/commands/UntagCommand.d.ts +3 -3
  33. package/dist-types/commands/UpdateAccountSettingsCommand.d.ts +41 -0
  34. package/dist-types/commands/UpdateGroupCommand.d.ts +3 -3
  35. package/dist-types/commands/UpdateGroupQueryCommand.d.ts +3 -3
  36. package/dist-types/commands/index.d.ts +2 -0
  37. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  38. package/dist-types/models/models_0.d.ts +251 -207
  39. package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
  40. package/dist-types/ts3.4/ResourceGroups.d.ts +34 -0
  41. package/dist-types/ts3.4/ResourceGroupsClient.d.ts +12 -0
  42. package/dist-types/ts3.4/commands/GetAccountSettingsCommand.d.ts +34 -0
  43. package/dist-types/ts3.4/commands/UpdateAccountSettingsCommand.d.ts +41 -0
  44. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  45. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  46. package/dist-types/ts3.4/models/models_0.d.ts +41 -0
  47. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  48. package/package.json +4 -4
package/README.md CHANGED
@@ -9,22 +9,20 @@
9
9
 
10
10
  AWS SDK for JavaScript ResourceGroups Client for Node.js, Browser and React Native.
11
11
 
12
- <fullname>AWS Resource Groups</fullname>
13
-
14
- <p>AWS Resource Groups lets you organize AWS resources such as Amazon EC2 instances, Amazon Relational Database Service
15
- databases, and Amazon S3 buckets into groups using criteria that you define as tags. A
12
+ <p>Resource Groups lets you organize Amazon Web Services resources such as Amazon Elastic Compute Cloud instances, Amazon Relational Database Service
13
+ databases, and Amazon Simple Storage Service buckets into groups using criteria that you define as tags. A
16
14
  resource group is a collection of resources that match the resource types specified in a
17
15
  query, and share one or more tags or portions of tags. You can create a group of
18
16
  resources based on their roles in your cloud infrastructure, lifecycle stages, regions,
19
17
  application layers, or virtually any criteria. Resource Groups enable you to automate management
20
- tasks, such as those in AWS Systems Manager Automation documents, on tag-related resources in
21
- AWS Systems Manager. Groups of tagged resources also let you quickly view a custom console in
22
- AWS Systems Manager that shows AWS Config compliance and other monitoring data about member
18
+ tasks, such as those in Amazon Web Services Systems Manager Automation documents, on tag-related resources in
19
+ Amazon Web Services Systems Manager. Groups of tagged resources also let you quickly view a custom console in
20
+ Amazon Web Services Systems Manager that shows Config compliance and other monitoring data about member
23
21
  resources.</p>
24
22
  <p>To create a resource group, build a resource query, and specify tags that identify the
25
23
  criteria that members of the group have in common. Tags are key-value pairs.</p>
26
- <p>For more information about Resource Groups, see the <a href="https://docs.aws.amazon.com/ARG/latest/userguide/welcome.html">AWS Resource Groups User Guide</a>.</p>
27
- <p>AWS Resource Groups uses a REST-compliant API that you can use to perform the following types of
24
+ <p>For more information about Resource Groups, see the <a href="https://docs.aws.amazon.com/ARG/latest/userguide/welcome.html">Resource Groups User Guide</a>.</p>
25
+ <p>Resource Groups uses a REST-compliant API that you can use to perform the following types of
28
26
  operations.</p>
29
27
  <ul>
30
28
  <li>
@@ -42,7 +40,7 @@ results</p>
42
40
  <p>Getting data about resources that are members of a group</p>
43
41
  </li>
44
42
  <li>
45
- <p>Searching AWS resources based on a resource query</p>
43
+ <p>Searching Amazon Web Services resources based on a resource query</p>
46
44
  </li>
47
45
  </ul>
48
46
 
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ResourceGroups = void 0;
4
4
  const CreateGroupCommand_1 = require("./commands/CreateGroupCommand");
5
5
  const DeleteGroupCommand_1 = require("./commands/DeleteGroupCommand");
6
+ const GetAccountSettingsCommand_1 = require("./commands/GetAccountSettingsCommand");
6
7
  const GetGroupCommand_1 = require("./commands/GetGroupCommand");
7
8
  const GetGroupConfigurationCommand_1 = require("./commands/GetGroupConfigurationCommand");
8
9
  const GetGroupQueryCommand_1 = require("./commands/GetGroupQueryCommand");
@@ -15,6 +16,7 @@ const SearchResourcesCommand_1 = require("./commands/SearchResourcesCommand");
15
16
  const TagCommand_1 = require("./commands/TagCommand");
16
17
  const UngroupResourcesCommand_1 = require("./commands/UngroupResourcesCommand");
17
18
  const UntagCommand_1 = require("./commands/UntagCommand");
19
+ const UpdateAccountSettingsCommand_1 = require("./commands/UpdateAccountSettingsCommand");
18
20
  const UpdateGroupCommand_1 = require("./commands/UpdateGroupCommand");
19
21
  const UpdateGroupQueryCommand_1 = require("./commands/UpdateGroupQueryCommand");
20
22
  const ResourceGroupsClient_1 = require("./ResourceGroupsClient");
@@ -47,6 +49,20 @@ class ResourceGroups extends ResourceGroupsClient_1.ResourceGroupsClient {
47
49
  return this.send(command, optionsOrCb);
48
50
  }
49
51
  }
52
+ getAccountSettings(args, optionsOrCb, cb) {
53
+ const command = new GetAccountSettingsCommand_1.GetAccountSettingsCommand(args);
54
+ if (typeof optionsOrCb === "function") {
55
+ this.send(command, optionsOrCb);
56
+ }
57
+ else if (typeof cb === "function") {
58
+ if (typeof optionsOrCb !== "object")
59
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
60
+ this.send(command, optionsOrCb || {}, cb);
61
+ }
62
+ else {
63
+ return this.send(command, optionsOrCb);
64
+ }
65
+ }
50
66
  getGroup(args, optionsOrCb, cb) {
51
67
  const command = new GetGroupCommand_1.GetGroupCommand(args);
52
68
  if (typeof optionsOrCb === "function") {
@@ -215,6 +231,20 @@ class ResourceGroups extends ResourceGroupsClient_1.ResourceGroupsClient {
215
231
  return this.send(command, optionsOrCb);
216
232
  }
217
233
  }
234
+ updateAccountSettings(args, optionsOrCb, cb) {
235
+ const command = new UpdateAccountSettingsCommand_1.UpdateAccountSettingsCommand(args);
236
+ if (typeof optionsOrCb === "function") {
237
+ this.send(command, optionsOrCb);
238
+ }
239
+ else if (typeof cb === "function") {
240
+ if (typeof optionsOrCb !== "object")
241
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
242
+ this.send(command, optionsOrCb || {}, cb);
243
+ }
244
+ else {
245
+ return this.send(command, optionsOrCb);
246
+ }
247
+ }
218
248
  updateGroup(args, optionsOrCb, cb) {
219
249
  const command = new UpdateGroupCommand_1.UpdateGroupCommand(args);
220
250
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetAccountSettingsCommand = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
9
+ class GetAccountSettingsCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetAccountSettingsCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "ResourceGroupsClient";
28
+ const commandName = "GetAccountSettingsCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: (input) => input,
34
+ outputFilterSensitiveLog: models_0_1.GetAccountSettingsOutputFilterSensitiveLog,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_restJson1_1.serializeAws_restJson1GetAccountSettingsCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_restJson1_1.deserializeAws_restJson1GetAccountSettingsCommand)(output, context);
44
+ }
45
+ }
46
+ exports.GetAccountSettingsCommand = GetAccountSettingsCommand;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateAccountSettingsCommand = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
9
+ class UpdateAccountSettingsCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UpdateAccountSettingsCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "ResourceGroupsClient";
28
+ const commandName = "UpdateAccountSettingsCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: models_0_1.UpdateAccountSettingsInputFilterSensitiveLog,
34
+ outputFilterSensitiveLog: models_0_1.UpdateAccountSettingsOutputFilterSensitiveLog,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_restJson1_1.serializeAws_restJson1UpdateAccountSettingsCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_restJson1_1.deserializeAws_restJson1UpdateAccountSettingsCommand)(output, context);
44
+ }
45
+ }
46
+ exports.UpdateAccountSettingsCommand = UpdateAccountSettingsCommand;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./CreateGroupCommand"), exports);
5
5
  tslib_1.__exportStar(require("./DeleteGroupCommand"), exports);
6
+ tslib_1.__exportStar(require("./GetAccountSettingsCommand"), exports);
6
7
  tslib_1.__exportStar(require("./GetGroupCommand"), exports);
7
8
  tslib_1.__exportStar(require("./GetGroupConfigurationCommand"), exports);
8
9
  tslib_1.__exportStar(require("./GetGroupQueryCommand"), exports);
@@ -15,5 +16,6 @@ tslib_1.__exportStar(require("./SearchResourcesCommand"), exports);
15
16
  tslib_1.__exportStar(require("./TagCommand"), exports);
16
17
  tslib_1.__exportStar(require("./UngroupResourcesCommand"), exports);
17
18
  tslib_1.__exportStar(require("./UntagCommand"), exports);
19
+ tslib_1.__exportStar(require("./UpdateAccountSettingsCommand"), exports);
18
20
  tslib_1.__exportStar(require("./UpdateGroupCommand"), exports);
19
21
  tslib_1.__exportStar(require("./UpdateGroupQueryCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
- const s = "required", t = "fn", u = "argv", v = "ref";
5
- const a = "PartitionResult", b = "tree", c = "error", d = "endpoint", e = "getAttr", f = { [s]: false, "type": "String" }, g = { [s]: true, "default": false, "type": "Boolean" }, h = { [v]: "Endpoint" }, i = { [t]: "booleanEquals", [u]: [{ [v]: "UseFIPS" }, true] }, j = { [t]: "booleanEquals", [u]: [{ [v]: "UseDualStack" }, true] }, k = {}, l = { [t]: "booleanEquals", [u]: [true, { [t]: e, [u]: [{ [v]: a }, "supportsFIPS"] }] }, m = { [v]: a }, n = { [t]: "booleanEquals", [u]: [true, { [t]: e, [u]: [m, "supportsDualStack"] }] }, o = { "url": "https://resource-groups.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, p = [h], q = [i], r = [j];
6
- const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [t]: "aws.partition", [u]: [{ [v]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [t]: "isSet", [u]: p }, { [t]: "parseURL", [u]: p, assign: "url" }], type: b, rules: [{ conditions: q, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: r, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { conditions: [i, j], type: b, rules: [{ conditions: [l, n], type: b, rules: [{ endpoint: { url: "https://resource-groups-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: q, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ conditions: [{ [t]: "stringEquals", [u]: ["aws-us-gov", { [t]: e, [u]: [m, "name"] }] }], endpoint: o, type: d }, { endpoint: { url: "https://resource-groups-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: r, type: b, rules: [{ conditions: [n], type: b, rules: [{ endpoint: { url: "https://resource-groups.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: o, type: d }] }] };
4
+ const t = "fn", u = "argv", v = "ref";
5
+ const a = true, b = false, c = "String", d = "PartitionResult", e = "tree", f = "error", g = "endpoint", h = "getAttr", i = { "required": true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: "booleanEquals", [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: "booleanEquals", [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "booleanEquals", [u]: [true, { [t]: h, [u]: [{ [v]: d }, "supportsFIPS"] }] }, o = { [v]: d }, p = { [t]: "booleanEquals", [u]: [true, { [t]: h, [u]: [o, "supportsDualStack"] }] }, q = { "url": "https://resource-groups.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, r = [k], s = [l];
6
+ const _data = { version: "1.0", parameters: { Region: { required: a, type: c }, UseDualStack: i, UseFIPS: i, Endpoint: { required: b, type: c } }, rules: [{ conditions: [{ [t]: "aws.partition", [u]: [{ [v]: "Region" }], assign: d }], type: e, rules: [{ conditions: [{ [t]: "isSet", [u]: [j] }], type: e, rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: f }, { type: e, rules: [{ conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: f }, { endpoint: { url: j, properties: m, headers: m }, type: g }] }] }, { conditions: [k, l], type: e, rules: [{ conditions: [n, p], type: e, rules: [{ endpoint: { url: "https://resource-groups-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: g }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: f }] }, { conditions: r, type: e, rules: [{ conditions: [n], type: e, rules: [{ type: e, rules: [{ conditions: [{ [t]: "stringEquals", [u]: ["aws-us-gov", { [t]: h, [u]: [o, "name"] }] }], endpoint: q, type: g }, { endpoint: { url: "https://resource-groups-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: g }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: f }] }, { conditions: s, type: e, rules: [{ conditions: [p], type: e, rules: [{ endpoint: { url: "https://resource-groups.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: g }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: f }] }, { endpoint: q, type: g }] }] };
7
7
  exports.ruleSet = _data;
@@ -1,8 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SearchResourcesOutputFilterSensitiveLog = exports.SearchResourcesInputFilterSensitiveLog = exports.PutGroupConfigurationOutputFilterSensitiveLog = exports.PutGroupConfigurationInputFilterSensitiveLog = exports.ListGroupsOutputFilterSensitiveLog = exports.GroupIdentifierFilterSensitiveLog = exports.ListGroupsInputFilterSensitiveLog = exports.GroupFilterFilterSensitiveLog = exports.ListGroupResourcesOutputFilterSensitiveLog = exports.ListGroupResourcesItemFilterSensitiveLog = exports.ResourceStatusFilterSensitiveLog = exports.ResourceIdentifierFilterSensitiveLog = exports.QueryErrorFilterSensitiveLog = exports.ListGroupResourcesInputFilterSensitiveLog = exports.ResourceFilterFilterSensitiveLog = exports.GroupResourcesOutputFilterSensitiveLog = exports.PendingResourceFilterSensitiveLog = exports.FailedResourceFilterSensitiveLog = exports.GroupResourcesInputFilterSensitiveLog = exports.GetTagsOutputFilterSensitiveLog = exports.GetTagsInputFilterSensitiveLog = exports.GetGroupQueryOutputFilterSensitiveLog = exports.GroupQueryFilterSensitiveLog = exports.GetGroupQueryInputFilterSensitiveLog = exports.GetGroupConfigurationOutputFilterSensitiveLog = exports.GetGroupConfigurationInputFilterSensitiveLog = exports.GetGroupOutputFilterSensitiveLog = exports.GetGroupInputFilterSensitiveLog = exports.DeleteGroupOutputFilterSensitiveLog = exports.DeleteGroupInputFilterSensitiveLog = exports.CreateGroupOutputFilterSensitiveLog = exports.GroupConfigurationFilterSensitiveLog = exports.GroupFilterSensitiveLog = exports.CreateGroupInputFilterSensitiveLog = exports.ResourceQueryFilterSensitiveLog = exports.GroupConfigurationItemFilterSensitiveLog = exports.GroupConfigurationParameterFilterSensitiveLog = exports.GroupFilterName = exports.UnauthorizedException = exports.ResourceStatusValue = exports.QueryErrorCode = exports.ResourceFilterName = exports.NotFoundException = exports.TooManyRequestsException = exports.MethodNotAllowedException = exports.InternalServerErrorException = exports.ForbiddenException = exports.GroupConfigurationStatus = exports.QueryType = exports.BadRequestException = void 0;
4
- exports.UpdateGroupQueryOutputFilterSensitiveLog = exports.UpdateGroupQueryInputFilterSensitiveLog = exports.UpdateGroupOutputFilterSensitiveLog = exports.UpdateGroupInputFilterSensitiveLog = exports.UntagOutputFilterSensitiveLog = exports.UntagInputFilterSensitiveLog = exports.UngroupResourcesOutputFilterSensitiveLog = exports.UngroupResourcesInputFilterSensitiveLog = exports.TagOutputFilterSensitiveLog = exports.TagInputFilterSensitiveLog = void 0;
3
+ exports.ListGroupsOutputFilterSensitiveLog = exports.GroupIdentifierFilterSensitiveLog = exports.ListGroupsInputFilterSensitiveLog = exports.GroupFilterFilterSensitiveLog = exports.ListGroupResourcesOutputFilterSensitiveLog = exports.ListGroupResourcesItemFilterSensitiveLog = exports.ResourceStatusFilterSensitiveLog = exports.ResourceIdentifierFilterSensitiveLog = exports.QueryErrorFilterSensitiveLog = exports.ListGroupResourcesInputFilterSensitiveLog = exports.ResourceFilterFilterSensitiveLog = exports.GroupResourcesOutputFilterSensitiveLog = exports.PendingResourceFilterSensitiveLog = exports.FailedResourceFilterSensitiveLog = exports.GroupResourcesInputFilterSensitiveLog = exports.GetTagsOutputFilterSensitiveLog = exports.GetTagsInputFilterSensitiveLog = exports.GetGroupQueryOutputFilterSensitiveLog = exports.GroupQueryFilterSensitiveLog = exports.GetGroupQueryInputFilterSensitiveLog = exports.GetGroupConfigurationOutputFilterSensitiveLog = exports.GetGroupConfigurationInputFilterSensitiveLog = exports.GetGroupOutputFilterSensitiveLog = exports.GetGroupInputFilterSensitiveLog = exports.GetAccountSettingsOutputFilterSensitiveLog = exports.DeleteGroupOutputFilterSensitiveLog = exports.DeleteGroupInputFilterSensitiveLog = exports.CreateGroupOutputFilterSensitiveLog = exports.GroupConfigurationFilterSensitiveLog = exports.GroupFilterSensitiveLog = exports.CreateGroupInputFilterSensitiveLog = exports.ResourceQueryFilterSensitiveLog = exports.GroupConfigurationItemFilterSensitiveLog = exports.GroupConfigurationParameterFilterSensitiveLog = exports.AccountSettingsFilterSensitiveLog = exports.GroupFilterName = exports.UnauthorizedException = exports.ResourceStatusValue = exports.QueryErrorCode = exports.ResourceFilterName = exports.NotFoundException = exports.TooManyRequestsException = exports.MethodNotAllowedException = exports.InternalServerErrorException = exports.ForbiddenException = exports.GroupConfigurationStatus = exports.QueryType = exports.BadRequestException = exports.GroupLifecycleEventsStatus = exports.GroupLifecycleEventsDesiredStatus = void 0;
4
+ exports.UpdateGroupQueryOutputFilterSensitiveLog = exports.UpdateGroupQueryInputFilterSensitiveLog = exports.UpdateGroupOutputFilterSensitiveLog = exports.UpdateGroupInputFilterSensitiveLog = exports.UpdateAccountSettingsOutputFilterSensitiveLog = exports.UpdateAccountSettingsInputFilterSensitiveLog = exports.UntagOutputFilterSensitiveLog = exports.UntagInputFilterSensitiveLog = exports.UngroupResourcesOutputFilterSensitiveLog = exports.UngroupResourcesInputFilterSensitiveLog = exports.TagOutputFilterSensitiveLog = exports.TagInputFilterSensitiveLog = exports.SearchResourcesOutputFilterSensitiveLog = exports.SearchResourcesInputFilterSensitiveLog = exports.PutGroupConfigurationOutputFilterSensitiveLog = exports.PutGroupConfigurationInputFilterSensitiveLog = void 0;
5
5
  const ResourceGroupsServiceException_1 = require("./ResourceGroupsServiceException");
6
+ var GroupLifecycleEventsDesiredStatus;
7
+ (function (GroupLifecycleEventsDesiredStatus) {
8
+ GroupLifecycleEventsDesiredStatus["ACTIVE"] = "ACTIVE";
9
+ GroupLifecycleEventsDesiredStatus["INACTIVE"] = "INACTIVE";
10
+ })(GroupLifecycleEventsDesiredStatus = exports.GroupLifecycleEventsDesiredStatus || (exports.GroupLifecycleEventsDesiredStatus = {}));
11
+ var GroupLifecycleEventsStatus;
12
+ (function (GroupLifecycleEventsStatus) {
13
+ GroupLifecycleEventsStatus["ACTIVE"] = "ACTIVE";
14
+ GroupLifecycleEventsStatus["ERROR"] = "ERROR";
15
+ GroupLifecycleEventsStatus["INACTIVE"] = "INACTIVE";
16
+ GroupLifecycleEventsStatus["IN_PROGRESS"] = "IN_PROGRESS";
17
+ })(GroupLifecycleEventsStatus = exports.GroupLifecycleEventsStatus || (exports.GroupLifecycleEventsStatus = {}));
6
18
  class BadRequestException extends ResourceGroupsServiceException_1.ResourceGroupsServiceException {
7
19
  constructor(opts) {
8
20
  super({
@@ -106,6 +118,7 @@ var QueryErrorCode;
106
118
  (function (QueryErrorCode) {
107
119
  QueryErrorCode["CLOUDFORMATION_STACK_INACTIVE"] = "CLOUDFORMATION_STACK_INACTIVE";
108
120
  QueryErrorCode["CLOUDFORMATION_STACK_NOT_EXISTING"] = "CLOUDFORMATION_STACK_NOT_EXISTING";
121
+ QueryErrorCode["CLOUDFORMATION_STACK_UNASSUMABLE_ROLE"] = "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE";
109
122
  })(QueryErrorCode = exports.QueryErrorCode || (exports.QueryErrorCode = {}));
110
123
  var ResourceStatusValue;
111
124
  (function (ResourceStatusValue) {
@@ -130,6 +143,10 @@ var GroupFilterName;
130
143
  GroupFilterName["ConfigurationType"] = "configuration-type";
131
144
  GroupFilterName["ResourceType"] = "resource-type";
132
145
  })(GroupFilterName = exports.GroupFilterName || (exports.GroupFilterName = {}));
146
+ const AccountSettingsFilterSensitiveLog = (obj) => ({
147
+ ...obj,
148
+ });
149
+ exports.AccountSettingsFilterSensitiveLog = AccountSettingsFilterSensitiveLog;
133
150
  const GroupConfigurationParameterFilterSensitiveLog = (obj) => ({
134
151
  ...obj,
135
152
  });
@@ -166,6 +183,10 @@ const DeleteGroupOutputFilterSensitiveLog = (obj) => ({
166
183
  ...obj,
167
184
  });
168
185
  exports.DeleteGroupOutputFilterSensitiveLog = DeleteGroupOutputFilterSensitiveLog;
186
+ const GetAccountSettingsOutputFilterSensitiveLog = (obj) => ({
187
+ ...obj,
188
+ });
189
+ exports.GetAccountSettingsOutputFilterSensitiveLog = GetAccountSettingsOutputFilterSensitiveLog;
169
190
  const GetGroupInputFilterSensitiveLog = (obj) => ({
170
191
  ...obj,
171
192
  });
@@ -302,6 +323,14 @@ const UntagOutputFilterSensitiveLog = (obj) => ({
302
323
  ...obj,
303
324
  });
304
325
  exports.UntagOutputFilterSensitiveLog = UntagOutputFilterSensitiveLog;
326
+ const UpdateAccountSettingsInputFilterSensitiveLog = (obj) => ({
327
+ ...obj,
328
+ });
329
+ exports.UpdateAccountSettingsInputFilterSensitiveLog = UpdateAccountSettingsInputFilterSensitiveLog;
330
+ const UpdateAccountSettingsOutputFilterSensitiveLog = (obj) => ({
331
+ ...obj,
332
+ });
333
+ exports.UpdateAccountSettingsOutputFilterSensitiveLog = UpdateAccountSettingsOutputFilterSensitiveLog;
305
334
  const UpdateGroupInputFilterSensitiveLog = (obj) => ({
306
335
  ...obj,
307
336
  });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1UpdateGroupQueryCommand = exports.deserializeAws_restJson1UpdateGroupCommand = exports.deserializeAws_restJson1UntagCommand = exports.deserializeAws_restJson1UngroupResourcesCommand = exports.deserializeAws_restJson1TagCommand = exports.deserializeAws_restJson1SearchResourcesCommand = exports.deserializeAws_restJson1PutGroupConfigurationCommand = exports.deserializeAws_restJson1ListGroupsCommand = exports.deserializeAws_restJson1ListGroupResourcesCommand = exports.deserializeAws_restJson1GroupResourcesCommand = exports.deserializeAws_restJson1GetTagsCommand = exports.deserializeAws_restJson1GetGroupQueryCommand = exports.deserializeAws_restJson1GetGroupConfigurationCommand = exports.deserializeAws_restJson1GetGroupCommand = exports.deserializeAws_restJson1DeleteGroupCommand = exports.deserializeAws_restJson1CreateGroupCommand = exports.serializeAws_restJson1UpdateGroupQueryCommand = exports.serializeAws_restJson1UpdateGroupCommand = exports.serializeAws_restJson1UntagCommand = exports.serializeAws_restJson1UngroupResourcesCommand = exports.serializeAws_restJson1TagCommand = exports.serializeAws_restJson1SearchResourcesCommand = exports.serializeAws_restJson1PutGroupConfigurationCommand = exports.serializeAws_restJson1ListGroupsCommand = exports.serializeAws_restJson1ListGroupResourcesCommand = exports.serializeAws_restJson1GroupResourcesCommand = exports.serializeAws_restJson1GetTagsCommand = exports.serializeAws_restJson1GetGroupQueryCommand = exports.serializeAws_restJson1GetGroupConfigurationCommand = exports.serializeAws_restJson1GetGroupCommand = exports.serializeAws_restJson1DeleteGroupCommand = exports.serializeAws_restJson1CreateGroupCommand = void 0;
3
+ exports.deserializeAws_restJson1UpdateGroupQueryCommand = exports.deserializeAws_restJson1UpdateGroupCommand = exports.deserializeAws_restJson1UpdateAccountSettingsCommand = exports.deserializeAws_restJson1UntagCommand = exports.deserializeAws_restJson1UngroupResourcesCommand = exports.deserializeAws_restJson1TagCommand = exports.deserializeAws_restJson1SearchResourcesCommand = exports.deserializeAws_restJson1PutGroupConfigurationCommand = exports.deserializeAws_restJson1ListGroupsCommand = exports.deserializeAws_restJson1ListGroupResourcesCommand = exports.deserializeAws_restJson1GroupResourcesCommand = exports.deserializeAws_restJson1GetTagsCommand = exports.deserializeAws_restJson1GetGroupQueryCommand = exports.deserializeAws_restJson1GetGroupConfigurationCommand = exports.deserializeAws_restJson1GetGroupCommand = exports.deserializeAws_restJson1GetAccountSettingsCommand = exports.deserializeAws_restJson1DeleteGroupCommand = exports.deserializeAws_restJson1CreateGroupCommand = exports.serializeAws_restJson1UpdateGroupQueryCommand = exports.serializeAws_restJson1UpdateGroupCommand = exports.serializeAws_restJson1UpdateAccountSettingsCommand = exports.serializeAws_restJson1UntagCommand = exports.serializeAws_restJson1UngroupResourcesCommand = exports.serializeAws_restJson1TagCommand = exports.serializeAws_restJson1SearchResourcesCommand = exports.serializeAws_restJson1PutGroupConfigurationCommand = exports.serializeAws_restJson1ListGroupsCommand = exports.serializeAws_restJson1ListGroupResourcesCommand = exports.serializeAws_restJson1GroupResourcesCommand = exports.serializeAws_restJson1GetTagsCommand = exports.serializeAws_restJson1GetGroupQueryCommand = exports.serializeAws_restJson1GetGroupConfigurationCommand = exports.serializeAws_restJson1GetGroupCommand = exports.serializeAws_restJson1GetAccountSettingsCommand = exports.serializeAws_restJson1DeleteGroupCommand = exports.serializeAws_restJson1CreateGroupCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
@@ -56,6 +56,25 @@ const serializeAws_restJson1DeleteGroupCommand = async (input, context) => {
56
56
  });
57
57
  };
58
58
  exports.serializeAws_restJson1DeleteGroupCommand = serializeAws_restJson1DeleteGroupCommand;
59
+ const serializeAws_restJson1GetAccountSettingsCommand = async (input, context) => {
60
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
61
+ const headers = {
62
+ "content-type": "application/json",
63
+ };
64
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-account-settings";
65
+ let body;
66
+ body = "";
67
+ return new protocol_http_1.HttpRequest({
68
+ protocol,
69
+ hostname,
70
+ port,
71
+ method: "POST",
72
+ headers,
73
+ path: resolvedPath,
74
+ body,
75
+ });
76
+ };
77
+ exports.serializeAws_restJson1GetAccountSettingsCommand = serializeAws_restJson1GetAccountSettingsCommand;
59
78
  const serializeAws_restJson1GetGroupCommand = async (input, context) => {
60
79
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
61
80
  const headers = {
@@ -330,6 +349,29 @@ const serializeAws_restJson1UntagCommand = async (input, context) => {
330
349
  });
331
350
  };
332
351
  exports.serializeAws_restJson1UntagCommand = serializeAws_restJson1UntagCommand;
352
+ const serializeAws_restJson1UpdateAccountSettingsCommand = async (input, context) => {
353
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
354
+ const headers = {
355
+ "content-type": "application/json",
356
+ };
357
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-account-settings";
358
+ let body;
359
+ body = JSON.stringify({
360
+ ...(input.GroupLifecycleEventsDesiredStatus != null && {
361
+ GroupLifecycleEventsDesiredStatus: input.GroupLifecycleEventsDesiredStatus,
362
+ }),
363
+ });
364
+ return new protocol_http_1.HttpRequest({
365
+ protocol,
366
+ hostname,
367
+ port,
368
+ method: "POST",
369
+ headers,
370
+ path: resolvedPath,
371
+ body,
372
+ });
373
+ };
374
+ exports.serializeAws_restJson1UpdateAccountSettingsCommand = serializeAws_restJson1UpdateAccountSettingsCommand;
333
375
  const serializeAws_restJson1UpdateGroupCommand = async (input, context) => {
334
376
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
335
377
  const headers = {
@@ -482,6 +524,52 @@ const deserializeAws_restJson1DeleteGroupCommandError = async (output, context)
482
524
  });
483
525
  }
484
526
  };
527
+ const deserializeAws_restJson1GetAccountSettingsCommand = async (output, context) => {
528
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
529
+ return deserializeAws_restJson1GetAccountSettingsCommandError(output, context);
530
+ }
531
+ const contents = map({
532
+ $metadata: deserializeMetadata(output),
533
+ });
534
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
535
+ if (data.AccountSettings != null) {
536
+ contents.AccountSettings = deserializeAws_restJson1AccountSettings(data.AccountSettings, context);
537
+ }
538
+ return contents;
539
+ };
540
+ exports.deserializeAws_restJson1GetAccountSettingsCommand = deserializeAws_restJson1GetAccountSettingsCommand;
541
+ const deserializeAws_restJson1GetAccountSettingsCommandError = async (output, context) => {
542
+ const parsedOutput = {
543
+ ...output,
544
+ body: await parseErrorBody(output.body, context),
545
+ };
546
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
547
+ switch (errorCode) {
548
+ case "BadRequestException":
549
+ case "com.amazonaws.resourcegroups#BadRequestException":
550
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
551
+ case "ForbiddenException":
552
+ case "com.amazonaws.resourcegroups#ForbiddenException":
553
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
554
+ case "InternalServerErrorException":
555
+ case "com.amazonaws.resourcegroups#InternalServerErrorException":
556
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
557
+ case "MethodNotAllowedException":
558
+ case "com.amazonaws.resourcegroups#MethodNotAllowedException":
559
+ throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
560
+ case "TooManyRequestsException":
561
+ case "com.amazonaws.resourcegroups#TooManyRequestsException":
562
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
563
+ default:
564
+ const parsedBody = parsedOutput.body;
565
+ (0, smithy_client_1.throwDefaultError)({
566
+ output,
567
+ parsedBody,
568
+ exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
569
+ errorCode,
570
+ });
571
+ }
572
+ };
485
573
  const deserializeAws_restJson1GetGroupCommand = async (output, context) => {
486
574
  if (output.statusCode !== 200 && output.statusCode >= 300) {
487
575
  return deserializeAws_restJson1GetGroupCommandError(output, context);
@@ -1109,6 +1197,52 @@ const deserializeAws_restJson1UntagCommandError = async (output, context) => {
1109
1197
  });
1110
1198
  }
1111
1199
  };
1200
+ const deserializeAws_restJson1UpdateAccountSettingsCommand = async (output, context) => {
1201
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1202
+ return deserializeAws_restJson1UpdateAccountSettingsCommandError(output, context);
1203
+ }
1204
+ const contents = map({
1205
+ $metadata: deserializeMetadata(output),
1206
+ });
1207
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1208
+ if (data.AccountSettings != null) {
1209
+ contents.AccountSettings = deserializeAws_restJson1AccountSettings(data.AccountSettings, context);
1210
+ }
1211
+ return contents;
1212
+ };
1213
+ exports.deserializeAws_restJson1UpdateAccountSettingsCommand = deserializeAws_restJson1UpdateAccountSettingsCommand;
1214
+ const deserializeAws_restJson1UpdateAccountSettingsCommandError = async (output, context) => {
1215
+ const parsedOutput = {
1216
+ ...output,
1217
+ body: await parseErrorBody(output.body, context),
1218
+ };
1219
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1220
+ switch (errorCode) {
1221
+ case "BadRequestException":
1222
+ case "com.amazonaws.resourcegroups#BadRequestException":
1223
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1224
+ case "ForbiddenException":
1225
+ case "com.amazonaws.resourcegroups#ForbiddenException":
1226
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1227
+ case "InternalServerErrorException":
1228
+ case "com.amazonaws.resourcegroups#InternalServerErrorException":
1229
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1230
+ case "MethodNotAllowedException":
1231
+ case "com.amazonaws.resourcegroups#MethodNotAllowedException":
1232
+ throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
1233
+ case "TooManyRequestsException":
1234
+ case "com.amazonaws.resourcegroups#TooManyRequestsException":
1235
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1236
+ default:
1237
+ const parsedBody = parsedOutput.body;
1238
+ (0, smithy_client_1.throwDefaultError)({
1239
+ output,
1240
+ parsedBody,
1241
+ exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
1242
+ errorCode,
1243
+ });
1244
+ }
1245
+ };
1112
1246
  const deserializeAws_restJson1UpdateGroupCommand = async (output, context) => {
1113
1247
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1114
1248
  return deserializeAws_restJson1UpdateGroupCommandError(output, context);
@@ -1398,6 +1532,13 @@ const serializeAws_restJson1Tags = (input, context) => {
1398
1532
  return acc;
1399
1533
  }, {});
1400
1534
  };
1535
+ const deserializeAws_restJson1AccountSettings = (output, context) => {
1536
+ return {
1537
+ GroupLifecycleEventsDesiredStatus: (0, smithy_client_1.expectString)(output.GroupLifecycleEventsDesiredStatus),
1538
+ GroupLifecycleEventsStatus: (0, smithy_client_1.expectString)(output.GroupLifecycleEventsStatus),
1539
+ GroupLifecycleEventsStatusMessage: (0, smithy_client_1.expectString)(output.GroupLifecycleEventsStatusMessage),
1540
+ };
1541
+ };
1401
1542
  const deserializeAws_restJson1FailedResource = (output, context) => {
1402
1543
  return {
1403
1544
  ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
@@ -1,5 +1,6 @@
1
1
  import { CreateGroupCommand } from "./commands/CreateGroupCommand";
2
2
  import { DeleteGroupCommand } from "./commands/DeleteGroupCommand";
3
+ import { GetAccountSettingsCommand, } from "./commands/GetAccountSettingsCommand";
3
4
  import { GetGroupCommand } from "./commands/GetGroupCommand";
4
5
  import { GetGroupConfigurationCommand, } from "./commands/GetGroupConfigurationCommand";
5
6
  import { GetGroupQueryCommand, } from "./commands/GetGroupQueryCommand";
@@ -12,6 +13,7 @@ import { SearchResourcesCommand, } from "./commands/SearchResourcesCommand";
12
13
  import { TagCommand } from "./commands/TagCommand";
13
14
  import { UngroupResourcesCommand, } from "./commands/UngroupResourcesCommand";
14
15
  import { UntagCommand } from "./commands/UntagCommand";
16
+ import { UpdateAccountSettingsCommand, } from "./commands/UpdateAccountSettingsCommand";
15
17
  import { UpdateGroupCommand } from "./commands/UpdateGroupCommand";
16
18
  import { UpdateGroupQueryCommand, } from "./commands/UpdateGroupQueryCommand";
17
19
  import { ResourceGroupsClient } from "./ResourceGroupsClient";
@@ -44,6 +46,20 @@ export class ResourceGroups extends ResourceGroupsClient {
44
46
  return this.send(command, optionsOrCb);
45
47
  }
46
48
  }
49
+ getAccountSettings(args, optionsOrCb, cb) {
50
+ const command = new GetAccountSettingsCommand(args);
51
+ if (typeof optionsOrCb === "function") {
52
+ this.send(command, optionsOrCb);
53
+ }
54
+ else if (typeof cb === "function") {
55
+ if (typeof optionsOrCb !== "object")
56
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
57
+ this.send(command, optionsOrCb || {}, cb);
58
+ }
59
+ else {
60
+ return this.send(command, optionsOrCb);
61
+ }
62
+ }
47
63
  getGroup(args, optionsOrCb, cb) {
48
64
  const command = new GetGroupCommand(args);
49
65
  if (typeof optionsOrCb === "function") {
@@ -212,6 +228,20 @@ export class ResourceGroups extends ResourceGroupsClient {
212
228
  return this.send(command, optionsOrCb);
213
229
  }
214
230
  }
231
+ updateAccountSettings(args, optionsOrCb, cb) {
232
+ const command = new UpdateAccountSettingsCommand(args);
233
+ if (typeof optionsOrCb === "function") {
234
+ this.send(command, optionsOrCb);
235
+ }
236
+ else if (typeof cb === "function") {
237
+ if (typeof optionsOrCb !== "object")
238
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
239
+ this.send(command, optionsOrCb || {}, cb);
240
+ }
241
+ else {
242
+ return this.send(command, optionsOrCb);
243
+ }
244
+ }
215
245
  updateGroup(args, optionsOrCb, cb) {
216
246
  const command = new UpdateGroupCommand(args);
217
247
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { GetAccountSettingsOutputFilterSensitiveLog } from "../models/models_0";
5
+ import { deserializeAws_restJson1GetAccountSettingsCommand, serializeAws_restJson1GetAccountSettingsCommand, } from "../protocols/Aws_restJson1";
6
+ export class GetAccountSettingsCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, GetAccountSettingsCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "ResourceGroupsClient";
25
+ const commandName = "GetAccountSettingsCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (input) => input,
31
+ outputFilterSensitiveLog: GetAccountSettingsOutputFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1GetAccountSettingsCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1GetAccountSettingsCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { UpdateAccountSettingsInputFilterSensitiveLog, UpdateAccountSettingsOutputFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1UpdateAccountSettingsCommand, serializeAws_restJson1UpdateAccountSettingsCommand, } from "../protocols/Aws_restJson1";
6
+ export class UpdateAccountSettingsCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, UpdateAccountSettingsCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "ResourceGroupsClient";
25
+ const commandName = "UpdateAccountSettingsCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: UpdateAccountSettingsInputFilterSensitiveLog,
31
+ outputFilterSensitiveLog: UpdateAccountSettingsOutputFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1UpdateAccountSettingsCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1UpdateAccountSettingsCommand(output, context);
41
+ }
42
+ }