@aws-sdk/client-resource-groups 3.474.0 → 3.477.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.
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateGroupQueryCommand = exports.de_UpdateGroupCommand = exports.de_UpdateAccountSettingsCommand = exports.de_UntagCommand = exports.de_UngroupResourcesCommand = exports.de_TagCommand = exports.de_SearchResourcesCommand = exports.de_PutGroupConfigurationCommand = exports.de_ListGroupsCommand = exports.de_ListGroupResourcesCommand = exports.de_GroupResourcesCommand = exports.de_GetTagsCommand = exports.de_GetGroupQueryCommand = exports.de_GetGroupConfigurationCommand = exports.de_GetGroupCommand = exports.de_GetAccountSettingsCommand = exports.de_DeleteGroupCommand = exports.de_CreateGroupCommand = exports.se_UpdateGroupQueryCommand = exports.se_UpdateGroupCommand = exports.se_UpdateAccountSettingsCommand = exports.se_UntagCommand = exports.se_UngroupResourcesCommand = exports.se_TagCommand = exports.se_SearchResourcesCommand = exports.se_PutGroupConfigurationCommand = exports.se_ListGroupsCommand = exports.se_ListGroupResourcesCommand = exports.se_GroupResourcesCommand = exports.se_GetTagsCommand = exports.se_GetGroupQueryCommand = exports.se_GetGroupConfigurationCommand = exports.se_GetGroupCommand = exports.se_GetAccountSettingsCommand = exports.se_DeleteGroupCommand = exports.se_CreateGroupCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const ResourceGroupsServiceException_1 = require("../models/ResourceGroupsServiceException");
8
8
  const se_CreateGroupCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  "content-type": "application/json",
12
12
  };
13
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/groups";
13
+ b.bp("/groups");
14
14
  let body;
15
15
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
16
  Configuration: (_) => (0, smithy_client_1._json)(_),
@@ -19,168 +19,112 @@ const se_CreateGroupCommand = async (input, context) => {
19
19
  ResourceQuery: (_) => (0, smithy_client_1._json)(_),
20
20
  Tags: (_) => (0, smithy_client_1._json)(_),
21
21
  }));
22
- return new protocol_http_1.HttpRequest({
23
- protocol,
24
- hostname,
25
- port,
26
- method: "POST",
27
- headers,
28
- path: resolvedPath,
29
- body,
30
- });
22
+ b.m("POST").h(headers).b(body);
23
+ return b.build();
31
24
  };
32
25
  exports.se_CreateGroupCommand = se_CreateGroupCommand;
33
26
  const se_DeleteGroupCommand = async (input, context) => {
34
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
27
+ const b = (0, core_1.requestBuilder)(input, context);
35
28
  const headers = {
36
29
  "content-type": "application/json",
37
30
  };
38
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-group";
31
+ b.bp("/delete-group");
39
32
  let body;
40
33
  body = JSON.stringify((0, smithy_client_1.take)(input, {
41
34
  Group: [],
42
35
  GroupName: [],
43
36
  }));
44
- return new protocol_http_1.HttpRequest({
45
- protocol,
46
- hostname,
47
- port,
48
- method: "POST",
49
- headers,
50
- path: resolvedPath,
51
- body,
52
- });
37
+ b.m("POST").h(headers).b(body);
38
+ return b.build();
53
39
  };
54
40
  exports.se_DeleteGroupCommand = se_DeleteGroupCommand;
55
41
  const se_GetAccountSettingsCommand = async (input, context) => {
56
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
42
+ const b = (0, core_1.requestBuilder)(input, context);
57
43
  const headers = {
58
44
  "content-type": "application/json",
59
45
  };
60
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-account-settings";
46
+ b.bp("/get-account-settings");
61
47
  let body;
62
48
  body = "";
63
- return new protocol_http_1.HttpRequest({
64
- protocol,
65
- hostname,
66
- port,
67
- method: "POST",
68
- headers,
69
- path: resolvedPath,
70
- body,
71
- });
49
+ b.m("POST").h(headers).b(body);
50
+ return b.build();
72
51
  };
73
52
  exports.se_GetAccountSettingsCommand = se_GetAccountSettingsCommand;
74
53
  const se_GetGroupCommand = async (input, context) => {
75
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
54
+ const b = (0, core_1.requestBuilder)(input, context);
76
55
  const headers = {
77
56
  "content-type": "application/json",
78
57
  };
79
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group";
58
+ b.bp("/get-group");
80
59
  let body;
81
60
  body = JSON.stringify((0, smithy_client_1.take)(input, {
82
61
  Group: [],
83
62
  GroupName: [],
84
63
  }));
85
- return new protocol_http_1.HttpRequest({
86
- protocol,
87
- hostname,
88
- port,
89
- method: "POST",
90
- headers,
91
- path: resolvedPath,
92
- body,
93
- });
64
+ b.m("POST").h(headers).b(body);
65
+ return b.build();
94
66
  };
95
67
  exports.se_GetGroupCommand = se_GetGroupCommand;
96
68
  const se_GetGroupConfigurationCommand = async (input, context) => {
97
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
69
+ const b = (0, core_1.requestBuilder)(input, context);
98
70
  const headers = {
99
71
  "content-type": "application/json",
100
72
  };
101
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group-configuration";
73
+ b.bp("/get-group-configuration");
102
74
  let body;
103
75
  body = JSON.stringify((0, smithy_client_1.take)(input, {
104
76
  Group: [],
105
77
  }));
106
- return new protocol_http_1.HttpRequest({
107
- protocol,
108
- hostname,
109
- port,
110
- method: "POST",
111
- headers,
112
- path: resolvedPath,
113
- body,
114
- });
78
+ b.m("POST").h(headers).b(body);
79
+ return b.build();
115
80
  };
116
81
  exports.se_GetGroupConfigurationCommand = se_GetGroupConfigurationCommand;
117
82
  const se_GetGroupQueryCommand = async (input, context) => {
118
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
83
+ const b = (0, core_1.requestBuilder)(input, context);
119
84
  const headers = {
120
85
  "content-type": "application/json",
121
86
  };
122
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group-query";
87
+ b.bp("/get-group-query");
123
88
  let body;
124
89
  body = JSON.stringify((0, smithy_client_1.take)(input, {
125
90
  Group: [],
126
91
  GroupName: [],
127
92
  }));
128
- return new protocol_http_1.HttpRequest({
129
- protocol,
130
- hostname,
131
- port,
132
- method: "POST",
133
- headers,
134
- path: resolvedPath,
135
- body,
136
- });
93
+ b.m("POST").h(headers).b(body);
94
+ return b.build();
137
95
  };
138
96
  exports.se_GetGroupQueryCommand = se_GetGroupQueryCommand;
139
97
  const se_GetTagsCommand = async (input, context) => {
140
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
98
+ const b = (0, core_1.requestBuilder)(input, context);
141
99
  const headers = {};
142
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
143
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
100
+ b.bp("/resources/{Arn}/tags");
101
+ b.p("Arn", () => input.Arn, "{Arn}", false);
144
102
  let body;
145
- return new protocol_http_1.HttpRequest({
146
- protocol,
147
- hostname,
148
- port,
149
- method: "GET",
150
- headers,
151
- path: resolvedPath,
152
- body,
153
- });
103
+ b.m("GET").h(headers).b(body);
104
+ return b.build();
154
105
  };
155
106
  exports.se_GetTagsCommand = se_GetTagsCommand;
156
107
  const se_GroupResourcesCommand = async (input, context) => {
157
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
108
+ const b = (0, core_1.requestBuilder)(input, context);
158
109
  const headers = {
159
110
  "content-type": "application/json",
160
111
  };
161
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group-resources";
112
+ b.bp("/group-resources");
162
113
  let body;
163
114
  body = JSON.stringify((0, smithy_client_1.take)(input, {
164
115
  Group: [],
165
116
  ResourceArns: (_) => (0, smithy_client_1._json)(_),
166
117
  }));
167
- return new protocol_http_1.HttpRequest({
168
- protocol,
169
- hostname,
170
- port,
171
- method: "POST",
172
- headers,
173
- path: resolvedPath,
174
- body,
175
- });
118
+ b.m("POST").h(headers).b(body);
119
+ return b.build();
176
120
  };
177
121
  exports.se_GroupResourcesCommand = se_GroupResourcesCommand;
178
122
  const se_ListGroupResourcesCommand = async (input, context) => {
179
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
123
+ const b = (0, core_1.requestBuilder)(input, context);
180
124
  const headers = {
181
125
  "content-type": "application/json",
182
126
  };
183
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-group-resources";
127
+ b.bp("/list-group-resources");
184
128
  let body;
185
129
  body = JSON.stringify((0, smithy_client_1.take)(input, {
186
130
  Filters: (_) => (0, smithy_client_1._json)(_),
@@ -189,219 +133,148 @@ const se_ListGroupResourcesCommand = async (input, context) => {
189
133
  MaxResults: [],
190
134
  NextToken: [],
191
135
  }));
192
- return new protocol_http_1.HttpRequest({
193
- protocol,
194
- hostname,
195
- port,
196
- method: "POST",
197
- headers,
198
- path: resolvedPath,
199
- body,
200
- });
136
+ b.m("POST").h(headers).b(body);
137
+ return b.build();
201
138
  };
202
139
  exports.se_ListGroupResourcesCommand = se_ListGroupResourcesCommand;
203
140
  const se_ListGroupsCommand = async (input, context) => {
204
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
141
+ const b = (0, core_1.requestBuilder)(input, context);
205
142
  const headers = {
206
143
  "content-type": "application/json",
207
144
  };
208
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/groups-list";
145
+ b.bp("/groups-list");
209
146
  const query = (0, smithy_client_1.map)({
210
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
211
- nextToken: [, input.NextToken],
147
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
148
+ [_nT]: [, input[_NT]],
212
149
  });
213
150
  let body;
214
151
  body = JSON.stringify((0, smithy_client_1.take)(input, {
215
152
  Filters: (_) => (0, smithy_client_1._json)(_),
216
153
  }));
217
- return new protocol_http_1.HttpRequest({
218
- protocol,
219
- hostname,
220
- port,
221
- method: "POST",
222
- headers,
223
- path: resolvedPath,
224
- query,
225
- body,
226
- });
154
+ b.m("POST").h(headers).q(query).b(body);
155
+ return b.build();
227
156
  };
228
157
  exports.se_ListGroupsCommand = se_ListGroupsCommand;
229
158
  const se_PutGroupConfigurationCommand = async (input, context) => {
230
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
159
+ const b = (0, core_1.requestBuilder)(input, context);
231
160
  const headers = {
232
161
  "content-type": "application/json",
233
162
  };
234
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-group-configuration";
163
+ b.bp("/put-group-configuration");
235
164
  let body;
236
165
  body = JSON.stringify((0, smithy_client_1.take)(input, {
237
166
  Configuration: (_) => (0, smithy_client_1._json)(_),
238
167
  Group: [],
239
168
  }));
240
- return new protocol_http_1.HttpRequest({
241
- protocol,
242
- hostname,
243
- port,
244
- method: "POST",
245
- headers,
246
- path: resolvedPath,
247
- body,
248
- });
169
+ b.m("POST").h(headers).b(body);
170
+ return b.build();
249
171
  };
250
172
  exports.se_PutGroupConfigurationCommand = se_PutGroupConfigurationCommand;
251
173
  const se_SearchResourcesCommand = async (input, context) => {
252
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
174
+ const b = (0, core_1.requestBuilder)(input, context);
253
175
  const headers = {
254
176
  "content-type": "application/json",
255
177
  };
256
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/search";
178
+ b.bp("/resources/search");
257
179
  let body;
258
180
  body = JSON.stringify((0, smithy_client_1.take)(input, {
259
181
  MaxResults: [],
260
182
  NextToken: [],
261
183
  ResourceQuery: (_) => (0, smithy_client_1._json)(_),
262
184
  }));
263
- return new protocol_http_1.HttpRequest({
264
- protocol,
265
- hostname,
266
- port,
267
- method: "POST",
268
- headers,
269
- path: resolvedPath,
270
- body,
271
- });
185
+ b.m("POST").h(headers).b(body);
186
+ return b.build();
272
187
  };
273
188
  exports.se_SearchResourcesCommand = se_SearchResourcesCommand;
274
189
  const se_TagCommand = async (input, context) => {
275
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
190
+ const b = (0, core_1.requestBuilder)(input, context);
276
191
  const headers = {
277
192
  "content-type": "application/json",
278
193
  };
279
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
280
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
194
+ b.bp("/resources/{Arn}/tags");
195
+ b.p("Arn", () => input.Arn, "{Arn}", false);
281
196
  let body;
282
197
  body = JSON.stringify((0, smithy_client_1.take)(input, {
283
198
  Tags: (_) => (0, smithy_client_1._json)(_),
284
199
  }));
285
- return new protocol_http_1.HttpRequest({
286
- protocol,
287
- hostname,
288
- port,
289
- method: "PUT",
290
- headers,
291
- path: resolvedPath,
292
- body,
293
- });
200
+ b.m("PUT").h(headers).b(body);
201
+ return b.build();
294
202
  };
295
203
  exports.se_TagCommand = se_TagCommand;
296
204
  const se_UngroupResourcesCommand = async (input, context) => {
297
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
205
+ const b = (0, core_1.requestBuilder)(input, context);
298
206
  const headers = {
299
207
  "content-type": "application/json",
300
208
  };
301
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ungroup-resources";
209
+ b.bp("/ungroup-resources");
302
210
  let body;
303
211
  body = JSON.stringify((0, smithy_client_1.take)(input, {
304
212
  Group: [],
305
213
  ResourceArns: (_) => (0, smithy_client_1._json)(_),
306
214
  }));
307
- return new protocol_http_1.HttpRequest({
308
- protocol,
309
- hostname,
310
- port,
311
- method: "POST",
312
- headers,
313
- path: resolvedPath,
314
- body,
315
- });
215
+ b.m("POST").h(headers).b(body);
216
+ return b.build();
316
217
  };
317
218
  exports.se_UngroupResourcesCommand = se_UngroupResourcesCommand;
318
219
  const se_UntagCommand = async (input, context) => {
319
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
220
+ const b = (0, core_1.requestBuilder)(input, context);
320
221
  const headers = {
321
222
  "content-type": "application/json",
322
223
  };
323
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
324
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
224
+ b.bp("/resources/{Arn}/tags");
225
+ b.p("Arn", () => input.Arn, "{Arn}", false);
325
226
  let body;
326
227
  body = JSON.stringify((0, smithy_client_1.take)(input, {
327
228
  Keys: (_) => (0, smithy_client_1._json)(_),
328
229
  }));
329
- return new protocol_http_1.HttpRequest({
330
- protocol,
331
- hostname,
332
- port,
333
- method: "PATCH",
334
- headers,
335
- path: resolvedPath,
336
- body,
337
- });
230
+ b.m("PATCH").h(headers).b(body);
231
+ return b.build();
338
232
  };
339
233
  exports.se_UntagCommand = se_UntagCommand;
340
234
  const se_UpdateAccountSettingsCommand = async (input, context) => {
341
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
235
+ const b = (0, core_1.requestBuilder)(input, context);
342
236
  const headers = {
343
237
  "content-type": "application/json",
344
238
  };
345
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-account-settings";
239
+ b.bp("/update-account-settings");
346
240
  let body;
347
241
  body = JSON.stringify((0, smithy_client_1.take)(input, {
348
242
  GroupLifecycleEventsDesiredStatus: [],
349
243
  }));
350
- return new protocol_http_1.HttpRequest({
351
- protocol,
352
- hostname,
353
- port,
354
- method: "POST",
355
- headers,
356
- path: resolvedPath,
357
- body,
358
- });
244
+ b.m("POST").h(headers).b(body);
245
+ return b.build();
359
246
  };
360
247
  exports.se_UpdateAccountSettingsCommand = se_UpdateAccountSettingsCommand;
361
248
  const se_UpdateGroupCommand = async (input, context) => {
362
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
249
+ const b = (0, core_1.requestBuilder)(input, context);
363
250
  const headers = {
364
251
  "content-type": "application/json",
365
252
  };
366
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-group";
253
+ b.bp("/update-group");
367
254
  let body;
368
255
  body = JSON.stringify((0, smithy_client_1.take)(input, {
369
256
  Description: [],
370
257
  Group: [],
371
258
  GroupName: [],
372
259
  }));
373
- return new protocol_http_1.HttpRequest({
374
- protocol,
375
- hostname,
376
- port,
377
- method: "POST",
378
- headers,
379
- path: resolvedPath,
380
- body,
381
- });
260
+ b.m("POST").h(headers).b(body);
261
+ return b.build();
382
262
  };
383
263
  exports.se_UpdateGroupCommand = se_UpdateGroupCommand;
384
264
  const se_UpdateGroupQueryCommand = async (input, context) => {
385
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
265
+ const b = (0, core_1.requestBuilder)(input, context);
386
266
  const headers = {
387
267
  "content-type": "application/json",
388
268
  };
389
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-group-query";
269
+ b.bp("/update-group-query");
390
270
  let body;
391
271
  body = JSON.stringify((0, smithy_client_1.take)(input, {
392
272
  Group: [],
393
273
  GroupName: [],
394
274
  ResourceQuery: (_) => (0, smithy_client_1._json)(_),
395
275
  }));
396
- return new protocol_http_1.HttpRequest({
397
- protocol,
398
- hostname,
399
- port,
400
- method: "POST",
401
- headers,
402
- path: resolvedPath,
403
- body,
404
- });
276
+ b.m("POST").h(headers).b(body);
277
+ return b.build();
405
278
  };
406
279
  exports.se_UpdateGroupQueryCommand = se_UpdateGroupQueryCommand;
407
280
  const de_CreateGroupCommand = async (output, context) => {
@@ -1394,6 +1267,10 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1394
1267
  value !== "" &&
1395
1268
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1396
1269
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1270
+ const _MR = "MaxResults";
1271
+ const _NT = "NextToken";
1272
+ const _mR = "maxResults";
1273
+ const _nT = "nextToken";
1397
1274
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1398
1275
  if (encoded.length) {
1399
1276
  return JSON.parse(encoded);
@@ -1,13 +1,13 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { BadRequestException, ForbiddenException, InternalServerErrorException, MethodNotAllowedException, NotFoundException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
4
4
  import { ResourceGroupsServiceException as __BaseException } from "../models/ResourceGroupsServiceException";
5
5
  export const se_CreateGroupCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  "content-type": "application/json",
9
9
  };
10
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/groups";
10
+ b.bp("/groups");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  Configuration: (_) => _json(_),
@@ -16,160 +16,104 @@ export const se_CreateGroupCommand = async (input, context) => {
16
16
  ResourceQuery: (_) => _json(_),
17
17
  Tags: (_) => _json(_),
18
18
  }));
19
- return new __HttpRequest({
20
- protocol,
21
- hostname,
22
- port,
23
- method: "POST",
24
- headers,
25
- path: resolvedPath,
26
- body,
27
- });
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
28
21
  };
29
22
  export const se_DeleteGroupCommand = async (input, context) => {
30
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
23
+ const b = rb(input, context);
31
24
  const headers = {
32
25
  "content-type": "application/json",
33
26
  };
34
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-group";
27
+ b.bp("/delete-group");
35
28
  let body;
36
29
  body = JSON.stringify(take(input, {
37
30
  Group: [],
38
31
  GroupName: [],
39
32
  }));
40
- return new __HttpRequest({
41
- protocol,
42
- hostname,
43
- port,
44
- method: "POST",
45
- headers,
46
- path: resolvedPath,
47
- body,
48
- });
33
+ b.m("POST").h(headers).b(body);
34
+ return b.build();
49
35
  };
50
36
  export const se_GetAccountSettingsCommand = async (input, context) => {
51
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const b = rb(input, context);
52
38
  const headers = {
53
39
  "content-type": "application/json",
54
40
  };
55
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-account-settings";
41
+ b.bp("/get-account-settings");
56
42
  let body;
57
43
  body = "";
58
- return new __HttpRequest({
59
- protocol,
60
- hostname,
61
- port,
62
- method: "POST",
63
- headers,
64
- path: resolvedPath,
65
- body,
66
- });
44
+ b.m("POST").h(headers).b(body);
45
+ return b.build();
67
46
  };
68
47
  export const se_GetGroupCommand = async (input, context) => {
69
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
48
+ const b = rb(input, context);
70
49
  const headers = {
71
50
  "content-type": "application/json",
72
51
  };
73
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group";
52
+ b.bp("/get-group");
74
53
  let body;
75
54
  body = JSON.stringify(take(input, {
76
55
  Group: [],
77
56
  GroupName: [],
78
57
  }));
79
- return new __HttpRequest({
80
- protocol,
81
- hostname,
82
- port,
83
- method: "POST",
84
- headers,
85
- path: resolvedPath,
86
- body,
87
- });
58
+ b.m("POST").h(headers).b(body);
59
+ return b.build();
88
60
  };
89
61
  export const se_GetGroupConfigurationCommand = async (input, context) => {
90
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
62
+ const b = rb(input, context);
91
63
  const headers = {
92
64
  "content-type": "application/json",
93
65
  };
94
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group-configuration";
66
+ b.bp("/get-group-configuration");
95
67
  let body;
96
68
  body = JSON.stringify(take(input, {
97
69
  Group: [],
98
70
  }));
99
- return new __HttpRequest({
100
- protocol,
101
- hostname,
102
- port,
103
- method: "POST",
104
- headers,
105
- path: resolvedPath,
106
- body,
107
- });
71
+ b.m("POST").h(headers).b(body);
72
+ return b.build();
108
73
  };
109
74
  export const se_GetGroupQueryCommand = async (input, context) => {
110
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
75
+ const b = rb(input, context);
111
76
  const headers = {
112
77
  "content-type": "application/json",
113
78
  };
114
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group-query";
79
+ b.bp("/get-group-query");
115
80
  let body;
116
81
  body = JSON.stringify(take(input, {
117
82
  Group: [],
118
83
  GroupName: [],
119
84
  }));
120
- return new __HttpRequest({
121
- protocol,
122
- hostname,
123
- port,
124
- method: "POST",
125
- headers,
126
- path: resolvedPath,
127
- body,
128
- });
85
+ b.m("POST").h(headers).b(body);
86
+ return b.build();
129
87
  };
130
88
  export const se_GetTagsCommand = async (input, context) => {
131
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = rb(input, context);
132
90
  const headers = {};
133
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
134
- resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
91
+ b.bp("/resources/{Arn}/tags");
92
+ b.p("Arn", () => input.Arn, "{Arn}", false);
135
93
  let body;
136
- return new __HttpRequest({
137
- protocol,
138
- hostname,
139
- port,
140
- method: "GET",
141
- headers,
142
- path: resolvedPath,
143
- body,
144
- });
94
+ b.m("GET").h(headers).b(body);
95
+ return b.build();
145
96
  };
146
97
  export const se_GroupResourcesCommand = async (input, context) => {
147
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
98
+ const b = rb(input, context);
148
99
  const headers = {
149
100
  "content-type": "application/json",
150
101
  };
151
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group-resources";
102
+ b.bp("/group-resources");
152
103
  let body;
153
104
  body = JSON.stringify(take(input, {
154
105
  Group: [],
155
106
  ResourceArns: (_) => _json(_),
156
107
  }));
157
- return new __HttpRequest({
158
- protocol,
159
- hostname,
160
- port,
161
- method: "POST",
162
- headers,
163
- path: resolvedPath,
164
- body,
165
- });
108
+ b.m("POST").h(headers).b(body);
109
+ return b.build();
166
110
  };
167
111
  export const se_ListGroupResourcesCommand = async (input, context) => {
168
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
112
+ const b = rb(input, context);
169
113
  const headers = {
170
114
  "content-type": "application/json",
171
115
  };
172
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-group-resources";
116
+ b.bp("/list-group-resources");
173
117
  let body;
174
118
  body = JSON.stringify(take(input, {
175
119
  Filters: (_) => _json(_),
@@ -178,210 +122,139 @@ export const se_ListGroupResourcesCommand = async (input, context) => {
178
122
  MaxResults: [],
179
123
  NextToken: [],
180
124
  }));
181
- return new __HttpRequest({
182
- protocol,
183
- hostname,
184
- port,
185
- method: "POST",
186
- headers,
187
- path: resolvedPath,
188
- body,
189
- });
125
+ b.m("POST").h(headers).b(body);
126
+ return b.build();
190
127
  };
191
128
  export const se_ListGroupsCommand = async (input, context) => {
192
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
129
+ const b = rb(input, context);
193
130
  const headers = {
194
131
  "content-type": "application/json",
195
132
  };
196
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/groups-list";
133
+ b.bp("/groups-list");
197
134
  const query = map({
198
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
199
- nextToken: [, input.NextToken],
135
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
136
+ [_nT]: [, input[_NT]],
200
137
  });
201
138
  let body;
202
139
  body = JSON.stringify(take(input, {
203
140
  Filters: (_) => _json(_),
204
141
  }));
205
- return new __HttpRequest({
206
- protocol,
207
- hostname,
208
- port,
209
- method: "POST",
210
- headers,
211
- path: resolvedPath,
212
- query,
213
- body,
214
- });
142
+ b.m("POST").h(headers).q(query).b(body);
143
+ return b.build();
215
144
  };
216
145
  export const se_PutGroupConfigurationCommand = async (input, context) => {
217
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
146
+ const b = rb(input, context);
218
147
  const headers = {
219
148
  "content-type": "application/json",
220
149
  };
221
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-group-configuration";
150
+ b.bp("/put-group-configuration");
222
151
  let body;
223
152
  body = JSON.stringify(take(input, {
224
153
  Configuration: (_) => _json(_),
225
154
  Group: [],
226
155
  }));
227
- return new __HttpRequest({
228
- protocol,
229
- hostname,
230
- port,
231
- method: "POST",
232
- headers,
233
- path: resolvedPath,
234
- body,
235
- });
156
+ b.m("POST").h(headers).b(body);
157
+ return b.build();
236
158
  };
237
159
  export const se_SearchResourcesCommand = async (input, context) => {
238
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
160
+ const b = rb(input, context);
239
161
  const headers = {
240
162
  "content-type": "application/json",
241
163
  };
242
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/search";
164
+ b.bp("/resources/search");
243
165
  let body;
244
166
  body = JSON.stringify(take(input, {
245
167
  MaxResults: [],
246
168
  NextToken: [],
247
169
  ResourceQuery: (_) => _json(_),
248
170
  }));
249
- return new __HttpRequest({
250
- protocol,
251
- hostname,
252
- port,
253
- method: "POST",
254
- headers,
255
- path: resolvedPath,
256
- body,
257
- });
171
+ b.m("POST").h(headers).b(body);
172
+ return b.build();
258
173
  };
259
174
  export const se_TagCommand = async (input, context) => {
260
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
175
+ const b = rb(input, context);
261
176
  const headers = {
262
177
  "content-type": "application/json",
263
178
  };
264
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
265
- resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
179
+ b.bp("/resources/{Arn}/tags");
180
+ b.p("Arn", () => input.Arn, "{Arn}", false);
266
181
  let body;
267
182
  body = JSON.stringify(take(input, {
268
183
  Tags: (_) => _json(_),
269
184
  }));
270
- return new __HttpRequest({
271
- protocol,
272
- hostname,
273
- port,
274
- method: "PUT",
275
- headers,
276
- path: resolvedPath,
277
- body,
278
- });
185
+ b.m("PUT").h(headers).b(body);
186
+ return b.build();
279
187
  };
280
188
  export const se_UngroupResourcesCommand = async (input, context) => {
281
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
189
+ const b = rb(input, context);
282
190
  const headers = {
283
191
  "content-type": "application/json",
284
192
  };
285
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ungroup-resources";
193
+ b.bp("/ungroup-resources");
286
194
  let body;
287
195
  body = JSON.stringify(take(input, {
288
196
  Group: [],
289
197
  ResourceArns: (_) => _json(_),
290
198
  }));
291
- return new __HttpRequest({
292
- protocol,
293
- hostname,
294
- port,
295
- method: "POST",
296
- headers,
297
- path: resolvedPath,
298
- body,
299
- });
199
+ b.m("POST").h(headers).b(body);
200
+ return b.build();
300
201
  };
301
202
  export const se_UntagCommand = async (input, context) => {
302
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
203
+ const b = rb(input, context);
303
204
  const headers = {
304
205
  "content-type": "application/json",
305
206
  };
306
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
307
- resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
207
+ b.bp("/resources/{Arn}/tags");
208
+ b.p("Arn", () => input.Arn, "{Arn}", false);
308
209
  let body;
309
210
  body = JSON.stringify(take(input, {
310
211
  Keys: (_) => _json(_),
311
212
  }));
312
- return new __HttpRequest({
313
- protocol,
314
- hostname,
315
- port,
316
- method: "PATCH",
317
- headers,
318
- path: resolvedPath,
319
- body,
320
- });
213
+ b.m("PATCH").h(headers).b(body);
214
+ return b.build();
321
215
  };
322
216
  export const se_UpdateAccountSettingsCommand = async (input, context) => {
323
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
217
+ const b = rb(input, context);
324
218
  const headers = {
325
219
  "content-type": "application/json",
326
220
  };
327
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-account-settings";
221
+ b.bp("/update-account-settings");
328
222
  let body;
329
223
  body = JSON.stringify(take(input, {
330
224
  GroupLifecycleEventsDesiredStatus: [],
331
225
  }));
332
- return new __HttpRequest({
333
- protocol,
334
- hostname,
335
- port,
336
- method: "POST",
337
- headers,
338
- path: resolvedPath,
339
- body,
340
- });
226
+ b.m("POST").h(headers).b(body);
227
+ return b.build();
341
228
  };
342
229
  export const se_UpdateGroupCommand = async (input, context) => {
343
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
230
+ const b = rb(input, context);
344
231
  const headers = {
345
232
  "content-type": "application/json",
346
233
  };
347
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-group";
234
+ b.bp("/update-group");
348
235
  let body;
349
236
  body = JSON.stringify(take(input, {
350
237
  Description: [],
351
238
  Group: [],
352
239
  GroupName: [],
353
240
  }));
354
- return new __HttpRequest({
355
- protocol,
356
- hostname,
357
- port,
358
- method: "POST",
359
- headers,
360
- path: resolvedPath,
361
- body,
362
- });
241
+ b.m("POST").h(headers).b(body);
242
+ return b.build();
363
243
  };
364
244
  export const se_UpdateGroupQueryCommand = async (input, context) => {
365
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
245
+ const b = rb(input, context);
366
246
  const headers = {
367
247
  "content-type": "application/json",
368
248
  };
369
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-group-query";
249
+ b.bp("/update-group-query");
370
250
  let body;
371
251
  body = JSON.stringify(take(input, {
372
252
  Group: [],
373
253
  GroupName: [],
374
254
  ResourceQuery: (_) => _json(_),
375
255
  }));
376
- return new __HttpRequest({
377
- protocol,
378
- hostname,
379
- port,
380
- method: "POST",
381
- headers,
382
- path: resolvedPath,
383
- body,
384
- });
256
+ b.m("POST").h(headers).b(body);
257
+ return b.build();
385
258
  };
386
259
  export const de_CreateGroupCommand = async (output, context) => {
387
260
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1355,6 +1228,10 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1355
1228
  value !== "" &&
1356
1229
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1357
1230
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1231
+ const _MR = "MaxResults";
1232
+ const _NT = "NextToken";
1233
+ const _mR = "maxResults";
1234
+ const _nT = "nextToken";
1358
1235
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1359
1236
  if (encoded.length) {
1360
1237
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-resource-groups",
3
3
  "description": "AWS SDK for JavaScript Resource Groups Client for Node.js, Browser and React Native",
4
- "version": "3.474.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.474.0",
24
- "@aws-sdk/core": "3.474.0",
25
- "@aws-sdk/credential-provider-node": "3.474.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",