@aws-sdk/client-resource-groups 3.180.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +22 -16
  3. package/dist-es/ResourceGroups.js +66 -73
  4. package/dist-es/ResourceGroupsClient.js +22 -28
  5. package/dist-es/commands/CreateGroupCommand.js +21 -28
  6. package/dist-es/commands/DeleteGroupCommand.js +21 -28
  7. package/dist-es/commands/GetGroupCommand.js +21 -28
  8. package/dist-es/commands/GetGroupConfigurationCommand.js +21 -28
  9. package/dist-es/commands/GetGroupQueryCommand.js +21 -28
  10. package/dist-es/commands/GetTagsCommand.js +21 -28
  11. package/dist-es/commands/GroupResourcesCommand.js +21 -28
  12. package/dist-es/commands/ListGroupResourcesCommand.js +21 -28
  13. package/dist-es/commands/ListGroupsCommand.js +21 -28
  14. package/dist-es/commands/PutGroupConfigurationCommand.js +21 -28
  15. package/dist-es/commands/SearchResourcesCommand.js +21 -28
  16. package/dist-es/commands/TagCommand.js +21 -28
  17. package/dist-es/commands/UngroupResourcesCommand.js +21 -28
  18. package/dist-es/commands/UntagCommand.js +21 -28
  19. package/dist-es/commands/UpdateGroupCommand.js +21 -28
  20. package/dist-es/commands/UpdateGroupQueryCommand.js +21 -28
  21. package/dist-es/endpoints.js +8 -8
  22. package/dist-es/models/ResourceGroupsServiceException.js +5 -10
  23. package/dist-es/models/models_0.js +225 -132
  24. package/dist-es/pagination/ListGroupResourcesPaginator.js +25 -68
  25. package/dist-es/pagination/ListGroupsPaginator.js +25 -68
  26. package/dist-es/pagination/SearchResourcesPaginator.js +25 -68
  27. package/dist-es/protocols/Aws_restJson1.js +1373 -1853
  28. package/dist-es/runtimeConfig.browser.js +26 -12
  29. package/dist-es/runtimeConfig.js +30 -12
  30. package/dist-es/runtimeConfig.native.js +8 -5
  31. package/dist-es/runtimeConfig.shared.js +8 -11
  32. package/package.json +33 -33
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
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-resource-groups
9
+
10
+
11
+
12
+
13
+
14
+ # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
20
+ * **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
7
27
 
8
28
  **Note:** Version bump only for package @aws-sdk/client-resource-groups
@@ -404,7 +404,7 @@ exports.deserializeAws_restJson1CreateGroupCommand = deserializeAws_restJson1Cre
404
404
  const deserializeAws_restJson1CreateGroupCommandError = async (output, context) => {
405
405
  const parsedOutput = {
406
406
  ...output,
407
- body: await parseBody(output.body, context),
407
+ body: await parseErrorBody(output.body, context),
408
408
  };
409
409
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
410
410
  switch (errorCode) {
@@ -450,7 +450,7 @@ exports.deserializeAws_restJson1DeleteGroupCommand = deserializeAws_restJson1Del
450
450
  const deserializeAws_restJson1DeleteGroupCommandError = async (output, context) => {
451
451
  const parsedOutput = {
452
452
  ...output,
453
- body: await parseBody(output.body, context),
453
+ body: await parseErrorBody(output.body, context),
454
454
  };
455
455
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
456
456
  switch (errorCode) {
@@ -499,7 +499,7 @@ exports.deserializeAws_restJson1GetGroupCommand = deserializeAws_restJson1GetGro
499
499
  const deserializeAws_restJson1GetGroupCommandError = async (output, context) => {
500
500
  const parsedOutput = {
501
501
  ...output,
502
- body: await parseBody(output.body, context),
502
+ body: await parseErrorBody(output.body, context),
503
503
  };
504
504
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
505
505
  switch (errorCode) {
@@ -548,7 +548,7 @@ exports.deserializeAws_restJson1GetGroupConfigurationCommand = deserializeAws_re
548
548
  const deserializeAws_restJson1GetGroupConfigurationCommandError = async (output, context) => {
549
549
  const parsedOutput = {
550
550
  ...output,
551
- body: await parseBody(output.body, context),
551
+ body: await parseErrorBody(output.body, context),
552
552
  };
553
553
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
554
554
  switch (errorCode) {
@@ -597,7 +597,7 @@ exports.deserializeAws_restJson1GetGroupQueryCommand = deserializeAws_restJson1G
597
597
  const deserializeAws_restJson1GetGroupQueryCommandError = async (output, context) => {
598
598
  const parsedOutput = {
599
599
  ...output,
600
- body: await parseBody(output.body, context),
600
+ body: await parseErrorBody(output.body, context),
601
601
  };
602
602
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
603
603
  switch (errorCode) {
@@ -649,7 +649,7 @@ exports.deserializeAws_restJson1GetTagsCommand = deserializeAws_restJson1GetTags
649
649
  const deserializeAws_restJson1GetTagsCommandError = async (output, context) => {
650
650
  const parsedOutput = {
651
651
  ...output,
652
- body: await parseBody(output.body, context),
652
+ body: await parseErrorBody(output.body, context),
653
653
  };
654
654
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
655
655
  switch (errorCode) {
@@ -704,7 +704,7 @@ exports.deserializeAws_restJson1GroupResourcesCommand = deserializeAws_restJson1
704
704
  const deserializeAws_restJson1GroupResourcesCommandError = async (output, context) => {
705
705
  const parsedOutput = {
706
706
  ...output,
707
- body: await parseBody(output.body, context),
707
+ body: await parseErrorBody(output.body, context),
708
708
  };
709
709
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
710
710
  switch (errorCode) {
@@ -762,7 +762,7 @@ exports.deserializeAws_restJson1ListGroupResourcesCommand = deserializeAws_restJ
762
762
  const deserializeAws_restJson1ListGroupResourcesCommandError = async (output, context) => {
763
763
  const parsedOutput = {
764
764
  ...output,
765
- body: await parseBody(output.body, context),
765
+ body: await parseErrorBody(output.body, context),
766
766
  };
767
767
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
768
768
  switch (errorCode) {
@@ -820,7 +820,7 @@ exports.deserializeAws_restJson1ListGroupsCommand = deserializeAws_restJson1List
820
820
  const deserializeAws_restJson1ListGroupsCommandError = async (output, context) => {
821
821
  const parsedOutput = {
822
822
  ...output,
823
- body: await parseBody(output.body, context),
823
+ body: await parseErrorBody(output.body, context),
824
824
  };
825
825
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
826
826
  switch (errorCode) {
@@ -863,7 +863,7 @@ exports.deserializeAws_restJson1PutGroupConfigurationCommand = deserializeAws_re
863
863
  const deserializeAws_restJson1PutGroupConfigurationCommandError = async (output, context) => {
864
864
  const parsedOutput = {
865
865
  ...output,
866
- body: await parseBody(output.body, context),
866
+ body: await parseErrorBody(output.body, context),
867
867
  };
868
868
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
869
869
  switch (errorCode) {
@@ -918,7 +918,7 @@ exports.deserializeAws_restJson1SearchResourcesCommand = deserializeAws_restJson
918
918
  const deserializeAws_restJson1SearchResourcesCommandError = async (output, context) => {
919
919
  const parsedOutput = {
920
920
  ...output,
921
- body: await parseBody(output.body, context),
921
+ body: await parseErrorBody(output.body, context),
922
922
  };
923
923
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
924
924
  switch (errorCode) {
@@ -970,7 +970,7 @@ exports.deserializeAws_restJson1TagCommand = deserializeAws_restJson1TagCommand;
970
970
  const deserializeAws_restJson1TagCommandError = async (output, context) => {
971
971
  const parsedOutput = {
972
972
  ...output,
973
- body: await parseBody(output.body, context),
973
+ body: await parseErrorBody(output.body, context),
974
974
  };
975
975
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
976
976
  switch (errorCode) {
@@ -1025,7 +1025,7 @@ exports.deserializeAws_restJson1UngroupResourcesCommand = deserializeAws_restJso
1025
1025
  const deserializeAws_restJson1UngroupResourcesCommandError = async (output, context) => {
1026
1026
  const parsedOutput = {
1027
1027
  ...output,
1028
- body: await parseBody(output.body, context),
1028
+ body: await parseErrorBody(output.body, context),
1029
1029
  };
1030
1030
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1031
1031
  switch (errorCode) {
@@ -1077,7 +1077,7 @@ exports.deserializeAws_restJson1UntagCommand = deserializeAws_restJson1UntagComm
1077
1077
  const deserializeAws_restJson1UntagCommandError = async (output, context) => {
1078
1078
  const parsedOutput = {
1079
1079
  ...output,
1080
- body: await parseBody(output.body, context),
1080
+ body: await parseErrorBody(output.body, context),
1081
1081
  };
1082
1082
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1083
1083
  switch (errorCode) {
@@ -1126,7 +1126,7 @@ exports.deserializeAws_restJson1UpdateGroupCommand = deserializeAws_restJson1Upd
1126
1126
  const deserializeAws_restJson1UpdateGroupCommandError = async (output, context) => {
1127
1127
  const parsedOutput = {
1128
1128
  ...output,
1129
- body: await parseBody(output.body, context),
1129
+ body: await parseErrorBody(output.body, context),
1130
1130
  };
1131
1131
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1132
1132
  switch (errorCode) {
@@ -1175,7 +1175,7 @@ exports.deserializeAws_restJson1UpdateGroupQueryCommand = deserializeAws_restJso
1175
1175
  const deserializeAws_restJson1UpdateGroupQueryCommandError = async (output, context) => {
1176
1176
  const parsedOutput = {
1177
1177
  ...output,
1178
- body: await parseBody(output.body, context),
1178
+ body: await parseErrorBody(output.body, context),
1179
1179
  };
1180
1180
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1181
1181
  switch (errorCode) {
@@ -1656,6 +1656,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1656
1656
  }
1657
1657
  return {};
1658
1658
  });
1659
+ const parseErrorBody = async (errorBody, context) => {
1660
+ var _a;
1661
+ const value = await parseBody(errorBody, context);
1662
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1663
+ return value;
1664
+ };
1659
1665
  const loadRestJsonErrorCode = (output, data) => {
1660
1666
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1661
1667
  const sanitizeErrorCode = (rawValue) => {
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { CreateGroupCommand } from "./commands/CreateGroupCommand";
3
2
  import { DeleteGroupCommand } from "./commands/DeleteGroupCommand";
4
3
  import { GetGroupCommand } from "./commands/GetGroupCommand";
@@ -16,235 +15,229 @@ import { UntagCommand } from "./commands/UntagCommand";
16
15
  import { UpdateGroupCommand } from "./commands/UpdateGroupCommand";
17
16
  import { UpdateGroupQueryCommand, } from "./commands/UpdateGroupQueryCommand";
18
17
  import { ResourceGroupsClient } from "./ResourceGroupsClient";
19
- var ResourceGroups = (function (_super) {
20
- __extends(ResourceGroups, _super);
21
- function ResourceGroups() {
22
- return _super !== null && _super.apply(this, arguments) || this;
23
- }
24
- ResourceGroups.prototype.createGroup = function (args, optionsOrCb, cb) {
25
- var command = new CreateGroupCommand(args);
18
+ export class ResourceGroups extends ResourceGroupsClient {
19
+ createGroup(args, optionsOrCb, cb) {
20
+ const command = new CreateGroupCommand(args);
26
21
  if (typeof optionsOrCb === "function") {
27
22
  this.send(command, optionsOrCb);
28
23
  }
29
24
  else if (typeof cb === "function") {
30
25
  if (typeof optionsOrCb !== "object")
31
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
26
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
32
27
  this.send(command, optionsOrCb || {}, cb);
33
28
  }
34
29
  else {
35
30
  return this.send(command, optionsOrCb);
36
31
  }
37
- };
38
- ResourceGroups.prototype.deleteGroup = function (args, optionsOrCb, cb) {
39
- var command = new DeleteGroupCommand(args);
32
+ }
33
+ deleteGroup(args, optionsOrCb, cb) {
34
+ const command = new DeleteGroupCommand(args);
40
35
  if (typeof optionsOrCb === "function") {
41
36
  this.send(command, optionsOrCb);
42
37
  }
43
38
  else if (typeof cb === "function") {
44
39
  if (typeof optionsOrCb !== "object")
45
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
40
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
46
41
  this.send(command, optionsOrCb || {}, cb);
47
42
  }
48
43
  else {
49
44
  return this.send(command, optionsOrCb);
50
45
  }
51
- };
52
- ResourceGroups.prototype.getGroup = function (args, optionsOrCb, cb) {
53
- var command = new GetGroupCommand(args);
46
+ }
47
+ getGroup(args, optionsOrCb, cb) {
48
+ const command = new GetGroupCommand(args);
54
49
  if (typeof optionsOrCb === "function") {
55
50
  this.send(command, optionsOrCb);
56
51
  }
57
52
  else if (typeof cb === "function") {
58
53
  if (typeof optionsOrCb !== "object")
59
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
54
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
60
55
  this.send(command, optionsOrCb || {}, cb);
61
56
  }
62
57
  else {
63
58
  return this.send(command, optionsOrCb);
64
59
  }
65
- };
66
- ResourceGroups.prototype.getGroupConfiguration = function (args, optionsOrCb, cb) {
67
- var command = new GetGroupConfigurationCommand(args);
60
+ }
61
+ getGroupConfiguration(args, optionsOrCb, cb) {
62
+ const command = new GetGroupConfigurationCommand(args);
68
63
  if (typeof optionsOrCb === "function") {
69
64
  this.send(command, optionsOrCb);
70
65
  }
71
66
  else if (typeof cb === "function") {
72
67
  if (typeof optionsOrCb !== "object")
73
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
68
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
74
69
  this.send(command, optionsOrCb || {}, cb);
75
70
  }
76
71
  else {
77
72
  return this.send(command, optionsOrCb);
78
73
  }
79
- };
80
- ResourceGroups.prototype.getGroupQuery = function (args, optionsOrCb, cb) {
81
- var command = new GetGroupQueryCommand(args);
74
+ }
75
+ getGroupQuery(args, optionsOrCb, cb) {
76
+ const command = new GetGroupQueryCommand(args);
82
77
  if (typeof optionsOrCb === "function") {
83
78
  this.send(command, optionsOrCb);
84
79
  }
85
80
  else if (typeof cb === "function") {
86
81
  if (typeof optionsOrCb !== "object")
87
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
82
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
88
83
  this.send(command, optionsOrCb || {}, cb);
89
84
  }
90
85
  else {
91
86
  return this.send(command, optionsOrCb);
92
87
  }
93
- };
94
- ResourceGroups.prototype.getTags = function (args, optionsOrCb, cb) {
95
- var command = new GetTagsCommand(args);
88
+ }
89
+ getTags(args, optionsOrCb, cb) {
90
+ const command = new GetTagsCommand(args);
96
91
  if (typeof optionsOrCb === "function") {
97
92
  this.send(command, optionsOrCb);
98
93
  }
99
94
  else if (typeof cb === "function") {
100
95
  if (typeof optionsOrCb !== "object")
101
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
96
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
102
97
  this.send(command, optionsOrCb || {}, cb);
103
98
  }
104
99
  else {
105
100
  return this.send(command, optionsOrCb);
106
101
  }
107
- };
108
- ResourceGroups.prototype.groupResources = function (args, optionsOrCb, cb) {
109
- var command = new GroupResourcesCommand(args);
102
+ }
103
+ groupResources(args, optionsOrCb, cb) {
104
+ const command = new GroupResourcesCommand(args);
110
105
  if (typeof optionsOrCb === "function") {
111
106
  this.send(command, optionsOrCb);
112
107
  }
113
108
  else if (typeof cb === "function") {
114
109
  if (typeof optionsOrCb !== "object")
115
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
110
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
116
111
  this.send(command, optionsOrCb || {}, cb);
117
112
  }
118
113
  else {
119
114
  return this.send(command, optionsOrCb);
120
115
  }
121
- };
122
- ResourceGroups.prototype.listGroupResources = function (args, optionsOrCb, cb) {
123
- var command = new ListGroupResourcesCommand(args);
116
+ }
117
+ listGroupResources(args, optionsOrCb, cb) {
118
+ const command = new ListGroupResourcesCommand(args);
124
119
  if (typeof optionsOrCb === "function") {
125
120
  this.send(command, optionsOrCb);
126
121
  }
127
122
  else if (typeof cb === "function") {
128
123
  if (typeof optionsOrCb !== "object")
129
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
124
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
130
125
  this.send(command, optionsOrCb || {}, cb);
131
126
  }
132
127
  else {
133
128
  return this.send(command, optionsOrCb);
134
129
  }
135
- };
136
- ResourceGroups.prototype.listGroups = function (args, optionsOrCb, cb) {
137
- var command = new ListGroupsCommand(args);
130
+ }
131
+ listGroups(args, optionsOrCb, cb) {
132
+ const command = new ListGroupsCommand(args);
138
133
  if (typeof optionsOrCb === "function") {
139
134
  this.send(command, optionsOrCb);
140
135
  }
141
136
  else if (typeof cb === "function") {
142
137
  if (typeof optionsOrCb !== "object")
143
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
138
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
144
139
  this.send(command, optionsOrCb || {}, cb);
145
140
  }
146
141
  else {
147
142
  return this.send(command, optionsOrCb);
148
143
  }
149
- };
150
- ResourceGroups.prototype.putGroupConfiguration = function (args, optionsOrCb, cb) {
151
- var command = new PutGroupConfigurationCommand(args);
144
+ }
145
+ putGroupConfiguration(args, optionsOrCb, cb) {
146
+ const command = new PutGroupConfigurationCommand(args);
152
147
  if (typeof optionsOrCb === "function") {
153
148
  this.send(command, optionsOrCb);
154
149
  }
155
150
  else if (typeof cb === "function") {
156
151
  if (typeof optionsOrCb !== "object")
157
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
152
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
158
153
  this.send(command, optionsOrCb || {}, cb);
159
154
  }
160
155
  else {
161
156
  return this.send(command, optionsOrCb);
162
157
  }
163
- };
164
- ResourceGroups.prototype.searchResources = function (args, optionsOrCb, cb) {
165
- var command = new SearchResourcesCommand(args);
158
+ }
159
+ searchResources(args, optionsOrCb, cb) {
160
+ const command = new SearchResourcesCommand(args);
166
161
  if (typeof optionsOrCb === "function") {
167
162
  this.send(command, optionsOrCb);
168
163
  }
169
164
  else if (typeof cb === "function") {
170
165
  if (typeof optionsOrCb !== "object")
171
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
166
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
172
167
  this.send(command, optionsOrCb || {}, cb);
173
168
  }
174
169
  else {
175
170
  return this.send(command, optionsOrCb);
176
171
  }
177
- };
178
- ResourceGroups.prototype.tag = function (args, optionsOrCb, cb) {
179
- var command = new TagCommand(args);
172
+ }
173
+ tag(args, optionsOrCb, cb) {
174
+ const command = new TagCommand(args);
180
175
  if (typeof optionsOrCb === "function") {
181
176
  this.send(command, optionsOrCb);
182
177
  }
183
178
  else if (typeof cb === "function") {
184
179
  if (typeof optionsOrCb !== "object")
185
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
180
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
186
181
  this.send(command, optionsOrCb || {}, cb);
187
182
  }
188
183
  else {
189
184
  return this.send(command, optionsOrCb);
190
185
  }
191
- };
192
- ResourceGroups.prototype.ungroupResources = function (args, optionsOrCb, cb) {
193
- var command = new UngroupResourcesCommand(args);
186
+ }
187
+ ungroupResources(args, optionsOrCb, cb) {
188
+ const command = new UngroupResourcesCommand(args);
194
189
  if (typeof optionsOrCb === "function") {
195
190
  this.send(command, optionsOrCb);
196
191
  }
197
192
  else if (typeof cb === "function") {
198
193
  if (typeof optionsOrCb !== "object")
199
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
194
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
200
195
  this.send(command, optionsOrCb || {}, cb);
201
196
  }
202
197
  else {
203
198
  return this.send(command, optionsOrCb);
204
199
  }
205
- };
206
- ResourceGroups.prototype.untag = function (args, optionsOrCb, cb) {
207
- var command = new UntagCommand(args);
200
+ }
201
+ untag(args, optionsOrCb, cb) {
202
+ const command = new UntagCommand(args);
208
203
  if (typeof optionsOrCb === "function") {
209
204
  this.send(command, optionsOrCb);
210
205
  }
211
206
  else if (typeof cb === "function") {
212
207
  if (typeof optionsOrCb !== "object")
213
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
208
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
214
209
  this.send(command, optionsOrCb || {}, cb);
215
210
  }
216
211
  else {
217
212
  return this.send(command, optionsOrCb);
218
213
  }
219
- };
220
- ResourceGroups.prototype.updateGroup = function (args, optionsOrCb, cb) {
221
- var command = new UpdateGroupCommand(args);
214
+ }
215
+ updateGroup(args, optionsOrCb, cb) {
216
+ const command = new UpdateGroupCommand(args);
222
217
  if (typeof optionsOrCb === "function") {
223
218
  this.send(command, optionsOrCb);
224
219
  }
225
220
  else if (typeof cb === "function") {
226
221
  if (typeof optionsOrCb !== "object")
227
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
222
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
228
223
  this.send(command, optionsOrCb || {}, cb);
229
224
  }
230
225
  else {
231
226
  return this.send(command, optionsOrCb);
232
227
  }
233
- };
234
- ResourceGroups.prototype.updateGroupQuery = function (args, optionsOrCb, cb) {
235
- var command = new UpdateGroupQueryCommand(args);
228
+ }
229
+ updateGroupQuery(args, optionsOrCb, cb) {
230
+ const command = new UpdateGroupQueryCommand(args);
236
231
  if (typeof optionsOrCb === "function") {
237
232
  this.send(command, optionsOrCb);
238
233
  }
239
234
  else if (typeof cb === "function") {
240
235
  if (typeof optionsOrCb !== "object")
241
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
236
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
242
237
  this.send(command, optionsOrCb || {}, cb);
243
238
  }
244
239
  else {
245
240
  return this.send(command, optionsOrCb);
246
241
  }
247
- };
248
- return ResourceGroups;
249
- }(ResourceGroupsClient));
250
- export { ResourceGroups };
242
+ }
243
+ }
@@ -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 ResourceGroupsClient = (function (_super) {
13
- __extends(ResourceGroupsClient, _super);
14
- function ResourceGroupsClient(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 ResourceGroupsClient 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
- ResourceGroupsClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return ResourceGroupsClient;
38
- }(__Client));
39
- export { ResourceGroupsClient };
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 { CreateGroupInputFilterSensitiveLog, CreateGroupOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1CreateGroupCommand, serializeAws_restJson1CreateGroupCommand, } from "../protocols/Aws_restJson1";
6
- var CreateGroupCommand = (function (_super) {
7
- __extends(CreateGroupCommand, _super);
8
- function CreateGroupCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CreateGroupCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CreateGroupCommand.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 = "ResourceGroupsClient";
18
- var commandName = "CreateGroupCommand";
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 = "ResourceGroupsClient";
15
+ const commandName = "CreateGroupCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CreateGroupInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CreateGroupOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CreateGroupCommand.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_restJson1CreateGroupCommand(input, context);
33
- };
34
- CreateGroupCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1CreateGroupCommand(output, context);
36
- };
37
- return CreateGroupCommand;
38
- }($Command));
39
- export { CreateGroupCommand };
31
+ }
32
+ }