@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
@@ -1,5 +1,6 @@
1
1
  export * from "./CreateGroupCommand";
2
2
  export * from "./DeleteGroupCommand";
3
+ export * from "./GetAccountSettingsCommand";
3
4
  export * from "./GetGroupCommand";
4
5
  export * from "./GetGroupConfigurationCommand";
5
6
  export * from "./GetGroupQueryCommand";
@@ -12,5 +13,6 @@ export * from "./SearchResourcesCommand";
12
13
  export * from "./TagCommand";
13
14
  export * from "./UngroupResourcesCommand";
14
15
  export * from "./UntagCommand";
16
+ export * from "./UpdateAccountSettingsCommand";
15
17
  export * from "./UpdateGroupCommand";
16
18
  export * from "./UpdateGroupQueryCommand";
@@ -1,4 +1,4 @@
1
- const s = "required", t = "fn", u = "argv", v = "ref";
2
- 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];
3
- 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 }] }] };
1
+ const t = "fn", u = "argv", v = "ref";
2
+ 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];
3
+ 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 }] }] };
4
4
  export const ruleSet = _data;
@@ -1,4 +1,16 @@
1
1
  import { ResourceGroupsServiceException as __BaseException } from "./ResourceGroupsServiceException";
2
+ export var GroupLifecycleEventsDesiredStatus;
3
+ (function (GroupLifecycleEventsDesiredStatus) {
4
+ GroupLifecycleEventsDesiredStatus["ACTIVE"] = "ACTIVE";
5
+ GroupLifecycleEventsDesiredStatus["INACTIVE"] = "INACTIVE";
6
+ })(GroupLifecycleEventsDesiredStatus || (GroupLifecycleEventsDesiredStatus = {}));
7
+ export var GroupLifecycleEventsStatus;
8
+ (function (GroupLifecycleEventsStatus) {
9
+ GroupLifecycleEventsStatus["ACTIVE"] = "ACTIVE";
10
+ GroupLifecycleEventsStatus["ERROR"] = "ERROR";
11
+ GroupLifecycleEventsStatus["INACTIVE"] = "INACTIVE";
12
+ GroupLifecycleEventsStatus["IN_PROGRESS"] = "IN_PROGRESS";
13
+ })(GroupLifecycleEventsStatus || (GroupLifecycleEventsStatus = {}));
2
14
  export class BadRequestException extends __BaseException {
3
15
  constructor(opts) {
4
16
  super({
@@ -96,6 +108,7 @@ export var QueryErrorCode;
96
108
  (function (QueryErrorCode) {
97
109
  QueryErrorCode["CLOUDFORMATION_STACK_INACTIVE"] = "CLOUDFORMATION_STACK_INACTIVE";
98
110
  QueryErrorCode["CLOUDFORMATION_STACK_NOT_EXISTING"] = "CLOUDFORMATION_STACK_NOT_EXISTING";
111
+ QueryErrorCode["CLOUDFORMATION_STACK_UNASSUMABLE_ROLE"] = "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE";
99
112
  })(QueryErrorCode || (QueryErrorCode = {}));
100
113
  export var ResourceStatusValue;
101
114
  (function (ResourceStatusValue) {
@@ -119,6 +132,9 @@ export var GroupFilterName;
119
132
  GroupFilterName["ConfigurationType"] = "configuration-type";
120
133
  GroupFilterName["ResourceType"] = "resource-type";
121
134
  })(GroupFilterName || (GroupFilterName = {}));
135
+ export const AccountSettingsFilterSensitiveLog = (obj) => ({
136
+ ...obj,
137
+ });
122
138
  export const GroupConfigurationParameterFilterSensitiveLog = (obj) => ({
123
139
  ...obj,
124
140
  });
@@ -146,6 +162,9 @@ export const DeleteGroupInputFilterSensitiveLog = (obj) => ({
146
162
  export const DeleteGroupOutputFilterSensitiveLog = (obj) => ({
147
163
  ...obj,
148
164
  });
165
+ export const GetAccountSettingsOutputFilterSensitiveLog = (obj) => ({
166
+ ...obj,
167
+ });
149
168
  export const GetGroupInputFilterSensitiveLog = (obj) => ({
150
169
  ...obj,
151
170
  });
@@ -248,6 +267,12 @@ export const UntagInputFilterSensitiveLog = (obj) => ({
248
267
  export const UntagOutputFilterSensitiveLog = (obj) => ({
249
268
  ...obj,
250
269
  });
270
+ export const UpdateAccountSettingsInputFilterSensitiveLog = (obj) => ({
271
+ ...obj,
272
+ });
273
+ export const UpdateAccountSettingsOutputFilterSensitiveLog = (obj) => ({
274
+ ...obj,
275
+ });
251
276
  export const UpdateGroupInputFilterSensitiveLog = (obj) => ({
252
277
  ...obj,
253
278
  });
@@ -51,6 +51,24 @@ export const serializeAws_restJson1DeleteGroupCommand = async (input, context) =
51
51
  body,
52
52
  });
53
53
  };
54
+ export const serializeAws_restJson1GetAccountSettingsCommand = async (input, context) => {
55
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
+ const headers = {
57
+ "content-type": "application/json",
58
+ };
59
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-account-settings";
60
+ let body;
61
+ body = "";
62
+ return new __HttpRequest({
63
+ protocol,
64
+ hostname,
65
+ port,
66
+ method: "POST",
67
+ headers,
68
+ path: resolvedPath,
69
+ body,
70
+ });
71
+ };
54
72
  export const serializeAws_restJson1GetGroupCommand = async (input, context) => {
55
73
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
74
  const headers = {
@@ -313,6 +331,28 @@ export const serializeAws_restJson1UntagCommand = async (input, context) => {
313
331
  body,
314
332
  });
315
333
  };
334
+ export const serializeAws_restJson1UpdateAccountSettingsCommand = async (input, context) => {
335
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
336
+ const headers = {
337
+ "content-type": "application/json",
338
+ };
339
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-account-settings";
340
+ let body;
341
+ body = JSON.stringify({
342
+ ...(input.GroupLifecycleEventsDesiredStatus != null && {
343
+ GroupLifecycleEventsDesiredStatus: input.GroupLifecycleEventsDesiredStatus,
344
+ }),
345
+ });
346
+ return new __HttpRequest({
347
+ protocol,
348
+ hostname,
349
+ port,
350
+ method: "POST",
351
+ headers,
352
+ path: resolvedPath,
353
+ body,
354
+ });
355
+ };
316
356
  export const serializeAws_restJson1UpdateGroupCommand = async (input, context) => {
317
357
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
318
358
  const headers = {
@@ -461,6 +501,51 @@ const deserializeAws_restJson1DeleteGroupCommandError = async (output, context)
461
501
  });
462
502
  }
463
503
  };
504
+ export const deserializeAws_restJson1GetAccountSettingsCommand = async (output, context) => {
505
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
506
+ return deserializeAws_restJson1GetAccountSettingsCommandError(output, context);
507
+ }
508
+ const contents = map({
509
+ $metadata: deserializeMetadata(output),
510
+ });
511
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
512
+ if (data.AccountSettings != null) {
513
+ contents.AccountSettings = deserializeAws_restJson1AccountSettings(data.AccountSettings, context);
514
+ }
515
+ return contents;
516
+ };
517
+ const deserializeAws_restJson1GetAccountSettingsCommandError = async (output, context) => {
518
+ const parsedOutput = {
519
+ ...output,
520
+ body: await parseErrorBody(output.body, context),
521
+ };
522
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
523
+ switch (errorCode) {
524
+ case "BadRequestException":
525
+ case "com.amazonaws.resourcegroups#BadRequestException":
526
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
527
+ case "ForbiddenException":
528
+ case "com.amazonaws.resourcegroups#ForbiddenException":
529
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
530
+ case "InternalServerErrorException":
531
+ case "com.amazonaws.resourcegroups#InternalServerErrorException":
532
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
533
+ case "MethodNotAllowedException":
534
+ case "com.amazonaws.resourcegroups#MethodNotAllowedException":
535
+ throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
536
+ case "TooManyRequestsException":
537
+ case "com.amazonaws.resourcegroups#TooManyRequestsException":
538
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
539
+ default:
540
+ const parsedBody = parsedOutput.body;
541
+ throwDefaultError({
542
+ output,
543
+ parsedBody,
544
+ exceptionCtor: __BaseException,
545
+ errorCode,
546
+ });
547
+ }
548
+ };
464
549
  export const deserializeAws_restJson1GetGroupCommand = async (output, context) => {
465
550
  if (output.statusCode !== 200 && output.statusCode >= 300) {
466
551
  return deserializeAws_restJson1GetGroupCommandError(output, context);
@@ -1076,6 +1161,51 @@ const deserializeAws_restJson1UntagCommandError = async (output, context) => {
1076
1161
  });
1077
1162
  }
1078
1163
  };
1164
+ export const deserializeAws_restJson1UpdateAccountSettingsCommand = async (output, context) => {
1165
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1166
+ return deserializeAws_restJson1UpdateAccountSettingsCommandError(output, context);
1167
+ }
1168
+ const contents = map({
1169
+ $metadata: deserializeMetadata(output),
1170
+ });
1171
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1172
+ if (data.AccountSettings != null) {
1173
+ contents.AccountSettings = deserializeAws_restJson1AccountSettings(data.AccountSettings, context);
1174
+ }
1175
+ return contents;
1176
+ };
1177
+ const deserializeAws_restJson1UpdateAccountSettingsCommandError = async (output, context) => {
1178
+ const parsedOutput = {
1179
+ ...output,
1180
+ body: await parseErrorBody(output.body, context),
1181
+ };
1182
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1183
+ switch (errorCode) {
1184
+ case "BadRequestException":
1185
+ case "com.amazonaws.resourcegroups#BadRequestException":
1186
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1187
+ case "ForbiddenException":
1188
+ case "com.amazonaws.resourcegroups#ForbiddenException":
1189
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1190
+ case "InternalServerErrorException":
1191
+ case "com.amazonaws.resourcegroups#InternalServerErrorException":
1192
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1193
+ case "MethodNotAllowedException":
1194
+ case "com.amazonaws.resourcegroups#MethodNotAllowedException":
1195
+ throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
1196
+ case "TooManyRequestsException":
1197
+ case "com.amazonaws.resourcegroups#TooManyRequestsException":
1198
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1199
+ default:
1200
+ const parsedBody = parsedOutput.body;
1201
+ throwDefaultError({
1202
+ output,
1203
+ parsedBody,
1204
+ exceptionCtor: __BaseException,
1205
+ errorCode,
1206
+ });
1207
+ }
1208
+ };
1079
1209
  export const deserializeAws_restJson1UpdateGroupCommand = async (output, context) => {
1080
1210
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1081
1211
  return deserializeAws_restJson1UpdateGroupCommandError(output, context);
@@ -1363,6 +1493,13 @@ const serializeAws_restJson1Tags = (input, context) => {
1363
1493
  return acc;
1364
1494
  }, {});
1365
1495
  };
1496
+ const deserializeAws_restJson1AccountSettings = (output, context) => {
1497
+ return {
1498
+ GroupLifecycleEventsDesiredStatus: __expectString(output.GroupLifecycleEventsDesiredStatus),
1499
+ GroupLifecycleEventsStatus: __expectString(output.GroupLifecycleEventsStatus),
1500
+ GroupLifecycleEventsStatusMessage: __expectString(output.GroupLifecycleEventsStatusMessage),
1501
+ };
1502
+ };
1366
1503
  const deserializeAws_restJson1FailedResource = (output, context) => {
1367
1504
  return {
1368
1505
  ErrorCode: __expectString(output.ErrorCode),