@aws-sdk/client-ram 3.476.0 → 3.478.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 (55) hide show
  1. package/dist-cjs/pagination/GetResourcePoliciesPaginator.js +2 -24
  2. package/dist-cjs/pagination/GetResourceShareAssociationsPaginator.js +2 -24
  3. package/dist-cjs/pagination/GetResourceShareInvitationsPaginator.js +2 -24
  4. package/dist-cjs/pagination/GetResourceSharesPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListPendingInvitationResourcesPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListPermissionAssociationsPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListPermissionVersionsPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListPermissionsPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListPrincipalsPaginator.js +2 -24
  10. package/dist-cjs/pagination/ListReplacePermissionAssociationsWorkPaginator.js +2 -24
  11. package/dist-cjs/pagination/ListResourceSharePermissionsPaginator.js +2 -24
  12. package/dist-cjs/pagination/ListResourceTypesPaginator.js +2 -24
  13. package/dist-cjs/pagination/ListResourcesPaginator.js +2 -24
  14. package/dist-cjs/protocols/Aws_restJson1.js +149 -390
  15. package/dist-es/pagination/GetResourcePoliciesPaginator.js +2 -23
  16. package/dist-es/pagination/GetResourceShareAssociationsPaginator.js +2 -23
  17. package/dist-es/pagination/GetResourceShareInvitationsPaginator.js +2 -23
  18. package/dist-es/pagination/GetResourceSharesPaginator.js +2 -23
  19. package/dist-es/pagination/ListPendingInvitationResourcesPaginator.js +2 -23
  20. package/dist-es/pagination/ListPermissionAssociationsPaginator.js +2 -23
  21. package/dist-es/pagination/ListPermissionVersionsPaginator.js +2 -23
  22. package/dist-es/pagination/ListPermissionsPaginator.js +2 -23
  23. package/dist-es/pagination/ListPrincipalsPaginator.js +2 -23
  24. package/dist-es/pagination/ListReplacePermissionAssociationsWorkPaginator.js +2 -23
  25. package/dist-es/pagination/ListResourceSharePermissionsPaginator.js +2 -23
  26. package/dist-es/pagination/ListResourceTypesPaginator.js +2 -23
  27. package/dist-es/pagination/ListResourcesPaginator.js +2 -23
  28. package/dist-es/protocols/Aws_restJson1.js +149 -390
  29. package/dist-types/pagination/GetResourcePoliciesPaginator.d.ts +1 -1
  30. package/dist-types/pagination/GetResourceShareAssociationsPaginator.d.ts +1 -1
  31. package/dist-types/pagination/GetResourceShareInvitationsPaginator.d.ts +1 -1
  32. package/dist-types/pagination/GetResourceSharesPaginator.d.ts +1 -1
  33. package/dist-types/pagination/ListPendingInvitationResourcesPaginator.d.ts +1 -1
  34. package/dist-types/pagination/ListPermissionAssociationsPaginator.d.ts +1 -1
  35. package/dist-types/pagination/ListPermissionVersionsPaginator.d.ts +1 -1
  36. package/dist-types/pagination/ListPermissionsPaginator.d.ts +1 -1
  37. package/dist-types/pagination/ListPrincipalsPaginator.d.ts +1 -1
  38. package/dist-types/pagination/ListReplacePermissionAssociationsWorkPaginator.d.ts +1 -1
  39. package/dist-types/pagination/ListResourceSharePermissionsPaginator.d.ts +1 -1
  40. package/dist-types/pagination/ListResourceTypesPaginator.d.ts +1 -1
  41. package/dist-types/pagination/ListResourcesPaginator.d.ts +1 -1
  42. package/dist-types/ts3.4/pagination/GetResourcePoliciesPaginator.d.ts +3 -3
  43. package/dist-types/ts3.4/pagination/GetResourceShareAssociationsPaginator.d.ts +3 -3
  44. package/dist-types/ts3.4/pagination/GetResourceShareInvitationsPaginator.d.ts +3 -3
  45. package/dist-types/ts3.4/pagination/GetResourceSharesPaginator.d.ts +3 -3
  46. package/dist-types/ts3.4/pagination/ListPendingInvitationResourcesPaginator.d.ts +3 -3
  47. package/dist-types/ts3.4/pagination/ListPermissionAssociationsPaginator.d.ts +3 -3
  48. package/dist-types/ts3.4/pagination/ListPermissionVersionsPaginator.d.ts +3 -3
  49. package/dist-types/ts3.4/pagination/ListPermissionsPaginator.d.ts +3 -3
  50. package/dist-types/ts3.4/pagination/ListPrincipalsPaginator.d.ts +3 -3
  51. package/dist-types/ts3.4/pagination/ListReplacePermissionAssociationsWorkPaginator.d.ts +3 -3
  52. package/dist-types/ts3.4/pagination/ListResourceSharePermissionsPaginator.d.ts +3 -3
  53. package/dist-types/ts3.4/pagination/ListResourceTypesPaginator.d.ts +3 -3
  54. package/dist-types/ts3.4/pagination/ListResourcesPaginator.d.ts +3 -3
  55. package/package.json +7 -6
@@ -1,34 +1,27 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
2
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { IdempotentParameterMismatchException, InvalidClientTokenException, InvalidMaxResultsException, InvalidNextTokenException, InvalidParameterException, InvalidPolicyException, InvalidResourceTypeException, InvalidStateTransitionException, MalformedArnException, MalformedPolicyTemplateException, MissingRequiredParameterException, OperationNotPermittedException, PermissionAlreadyExistsException, PermissionLimitExceededException, PermissionVersionsLimitExceededException, ResourceArnNotFoundException, ResourceShareInvitationAlreadyAcceptedException, ResourceShareInvitationAlreadyRejectedException, ResourceShareInvitationArnNotFoundException, ResourceShareInvitationExpiredException, ResourceShareLimitExceededException, ServerInternalException, ServiceUnavailableException, TagLimitExceededException, TagPolicyViolationException, ThrottlingException, UnknownResourceException, UnmatchedPolicyPermissionException, } from "../models/models_0";
4
4
  import { RAMServiceException as __BaseException } from "../models/RAMServiceException";
5
5
  export const se_AcceptResourceShareInvitationCommand = 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 || ""}` + "/acceptresourceshareinvitation";
10
+ b.bp("/acceptresourceshareinvitation");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  clientToken: [],
14
14
  resourceShareInvitationArn: [],
15
15
  }));
16
- return new __HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "POST",
21
- headers,
22
- path: resolvedPath,
23
- body,
24
- });
16
+ b.m("POST").h(headers).b(body);
17
+ return b.build();
25
18
  };
26
19
  export const se_AssociateResourceShareCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = rb(input, context);
28
21
  const headers = {
29
22
  "content-type": "application/json",
30
23
  };
31
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associateresourceshare";
24
+ b.bp("/associateresourceshare");
32
25
  let body;
33
26
  body = JSON.stringify(take(input, {
34
27
  clientToken: [],
@@ -37,22 +30,15 @@ export const se_AssociateResourceShareCommand = async (input, context) => {
37
30
  resourceShareArn: [],
38
31
  sources: (_) => _json(_),
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_AssociateResourceSharePermissionCommand = 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 || ""}` + "/associateresourcesharepermission";
41
+ b.bp("/associateresourcesharepermission");
56
42
  let body;
57
43
  body = JSON.stringify(take(input, {
58
44
  clientToken: [],
@@ -61,22 +47,15 @@ export const se_AssociateResourceSharePermissionCommand = async (input, context)
61
47
  replace: [],
62
48
  resourceShareArn: [],
63
49
  }));
64
- return new __HttpRequest({
65
- protocol,
66
- hostname,
67
- port,
68
- method: "POST",
69
- headers,
70
- path: resolvedPath,
71
- body,
72
- });
50
+ b.m("POST").h(headers).b(body);
51
+ return b.build();
73
52
  };
74
53
  export const se_CreatePermissionCommand = async (input, context) => {
75
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
54
+ const b = rb(input, context);
76
55
  const headers = {
77
56
  "content-type": "application/json",
78
57
  };
79
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createpermission";
58
+ b.bp("/createpermission");
80
59
  let body;
81
60
  body = JSON.stringify(take(input, {
82
61
  clientToken: [],
@@ -85,44 +64,30 @@ export const se_CreatePermissionCommand = async (input, context) => {
85
64
  resourceType: [],
86
65
  tags: (_) => _json(_),
87
66
  }));
88
- return new __HttpRequest({
89
- protocol,
90
- hostname,
91
- port,
92
- method: "POST",
93
- headers,
94
- path: resolvedPath,
95
- body,
96
- });
67
+ b.m("POST").h(headers).b(body);
68
+ return b.build();
97
69
  };
98
70
  export const se_CreatePermissionVersionCommand = async (input, context) => {
99
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
71
+ const b = rb(input, context);
100
72
  const headers = {
101
73
  "content-type": "application/json",
102
74
  };
103
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createpermissionversion";
75
+ b.bp("/createpermissionversion");
104
76
  let body;
105
77
  body = JSON.stringify(take(input, {
106
78
  clientToken: [],
107
79
  permissionArn: [],
108
80
  policyTemplate: [],
109
81
  }));
110
- return new __HttpRequest({
111
- protocol,
112
- hostname,
113
- port,
114
- method: "POST",
115
- headers,
116
- path: resolvedPath,
117
- body,
118
- });
82
+ b.m("POST").h(headers).b(body);
83
+ return b.build();
119
84
  };
120
85
  export const se_CreateResourceShareCommand = async (input, context) => {
121
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
86
+ const b = rb(input, context);
122
87
  const headers = {
123
88
  "content-type": "application/json",
124
89
  };
125
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createresourceshare";
90
+ b.bp("/createresourceshare");
126
91
  let body;
127
92
  body = JSON.stringify(take(input, {
128
93
  allowExternalPrincipals: [],
@@ -134,86 +99,52 @@ export const se_CreateResourceShareCommand = async (input, context) => {
134
99
  sources: (_) => _json(_),
135
100
  tags: (_) => _json(_),
136
101
  }));
137
- return new __HttpRequest({
138
- protocol,
139
- hostname,
140
- port,
141
- method: "POST",
142
- headers,
143
- path: resolvedPath,
144
- body,
145
- });
102
+ b.m("POST").h(headers).b(body);
103
+ return b.build();
146
104
  };
147
105
  export const se_DeletePermissionCommand = async (input, context) => {
148
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
106
+ const b = rb(input, context);
149
107
  const headers = {};
150
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deletepermission";
108
+ b.bp("/deletepermission");
151
109
  const query = map({
152
- permissionArn: [, __expectNonNull(input.permissionArn, `permissionArn`)],
153
- clientToken: [, input.clientToken],
110
+ [_pA]: [, __expectNonNull(input[_pA], `permissionArn`)],
111
+ [_cT]: [, input[_cT]],
154
112
  });
155
113
  let body;
156
- return new __HttpRequest({
157
- protocol,
158
- hostname,
159
- port,
160
- method: "DELETE",
161
- headers,
162
- path: resolvedPath,
163
- query,
164
- body,
165
- });
114
+ b.m("DELETE").h(headers).q(query).b(body);
115
+ return b.build();
166
116
  };
167
117
  export const se_DeletePermissionVersionCommand = async (input, context) => {
168
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
+ const b = rb(input, context);
169
119
  const headers = {};
170
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deletepermissionversion";
120
+ b.bp("/deletepermissionversion");
171
121
  const query = map({
172
- permissionArn: [, __expectNonNull(input.permissionArn, `permissionArn`)],
173
- permissionVersion: [
174
- __expectNonNull(input.permissionVersion, `permissionVersion`) != null,
175
- () => input.permissionVersion.toString(),
176
- ],
177
- clientToken: [, input.clientToken],
122
+ [_pA]: [, __expectNonNull(input[_pA], `permissionArn`)],
123
+ [_pV]: [__expectNonNull(input.permissionVersion, `permissionVersion`) != null, () => input[_pV].toString()],
124
+ [_cT]: [, input[_cT]],
178
125
  });
179
126
  let body;
180
- return new __HttpRequest({
181
- protocol,
182
- hostname,
183
- port,
184
- method: "DELETE",
185
- headers,
186
- path: resolvedPath,
187
- query,
188
- body,
189
- });
127
+ b.m("DELETE").h(headers).q(query).b(body);
128
+ return b.build();
190
129
  };
191
130
  export const se_DeleteResourceShareCommand = async (input, context) => {
192
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
131
+ const b = rb(input, context);
193
132
  const headers = {};
194
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteresourceshare";
133
+ b.bp("/deleteresourceshare");
195
134
  const query = map({
196
- resourceShareArn: [, __expectNonNull(input.resourceShareArn, `resourceShareArn`)],
197
- clientToken: [, input.clientToken],
135
+ [_rSA]: [, __expectNonNull(input[_rSA], `resourceShareArn`)],
136
+ [_cT]: [, input[_cT]],
198
137
  });
199
138
  let body;
200
- return new __HttpRequest({
201
- protocol,
202
- hostname,
203
- port,
204
- method: "DELETE",
205
- headers,
206
- path: resolvedPath,
207
- query,
208
- body,
209
- });
139
+ b.m("DELETE").h(headers).q(query).b(body);
140
+ return b.build();
210
141
  };
211
142
  export const se_DisassociateResourceShareCommand = async (input, context) => {
212
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
143
+ const b = rb(input, context);
213
144
  const headers = {
214
145
  "content-type": "application/json",
215
146
  };
216
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociateresourceshare";
147
+ b.bp("/disassociateresourceshare");
217
148
  let body;
218
149
  body = JSON.stringify(take(input, {
219
150
  clientToken: [],
@@ -222,83 +153,55 @@ export const se_DisassociateResourceShareCommand = async (input, context) => {
222
153
  resourceShareArn: [],
223
154
  sources: (_) => _json(_),
224
155
  }));
225
- return new __HttpRequest({
226
- protocol,
227
- hostname,
228
- port,
229
- method: "POST",
230
- headers,
231
- path: resolvedPath,
232
- body,
233
- });
156
+ b.m("POST").h(headers).b(body);
157
+ return b.build();
234
158
  };
235
159
  export const se_DisassociateResourceSharePermissionCommand = async (input, context) => {
236
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
160
+ const b = rb(input, context);
237
161
  const headers = {
238
162
  "content-type": "application/json",
239
163
  };
240
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociateresourcesharepermission";
164
+ b.bp("/disassociateresourcesharepermission");
241
165
  let body;
242
166
  body = JSON.stringify(take(input, {
243
167
  clientToken: [],
244
168
  permissionArn: [],
245
169
  resourceShareArn: [],
246
170
  }));
247
- return new __HttpRequest({
248
- protocol,
249
- hostname,
250
- port,
251
- method: "POST",
252
- headers,
253
- path: resolvedPath,
254
- body,
255
- });
171
+ b.m("POST").h(headers).b(body);
172
+ return b.build();
256
173
  };
257
174
  export const se_EnableSharingWithAwsOrganizationCommand = async (input, context) => {
258
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
175
+ const b = rb(input, context);
259
176
  const headers = {
260
177
  "content-type": "application/json",
261
178
  };
262
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enablesharingwithawsorganization";
179
+ b.bp("/enablesharingwithawsorganization");
263
180
  let body;
264
181
  body = "";
265
- return new __HttpRequest({
266
- protocol,
267
- hostname,
268
- port,
269
- method: "POST",
270
- headers,
271
- path: resolvedPath,
272
- body,
273
- });
182
+ b.m("POST").h(headers).b(body);
183
+ return b.build();
274
184
  };
275
185
  export const se_GetPermissionCommand = async (input, context) => {
276
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
186
+ const b = rb(input, context);
277
187
  const headers = {
278
188
  "content-type": "application/json",
279
189
  };
280
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getpermission";
190
+ b.bp("/getpermission");
281
191
  let body;
282
192
  body = JSON.stringify(take(input, {
283
193
  permissionArn: [],
284
194
  permissionVersion: [],
285
195
  }));
286
- return new __HttpRequest({
287
- protocol,
288
- hostname,
289
- port,
290
- method: "POST",
291
- headers,
292
- path: resolvedPath,
293
- body,
294
- });
196
+ b.m("POST").h(headers).b(body);
197
+ return b.build();
295
198
  };
296
199
  export const se_GetResourcePoliciesCommand = async (input, context) => {
297
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
200
+ const b = rb(input, context);
298
201
  const headers = {
299
202
  "content-type": "application/json",
300
203
  };
301
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourcepolicies";
204
+ b.bp("/getresourcepolicies");
302
205
  let body;
303
206
  body = JSON.stringify(take(input, {
304
207
  maxResults: [],
@@ -306,22 +209,15 @@ export const se_GetResourcePoliciesCommand = async (input, context) => {
306
209
  principal: [],
307
210
  resourceArns: (_) => _json(_),
308
211
  }));
309
- return new __HttpRequest({
310
- protocol,
311
- hostname,
312
- port,
313
- method: "POST",
314
- headers,
315
- path: resolvedPath,
316
- body,
317
- });
212
+ b.m("POST").h(headers).b(body);
213
+ return b.build();
318
214
  };
319
215
  export const se_GetResourceShareAssociationsCommand = async (input, context) => {
320
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
216
+ const b = rb(input, context);
321
217
  const headers = {
322
218
  "content-type": "application/json",
323
219
  };
324
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshareassociations";
220
+ b.bp("/getresourceshareassociations");
325
221
  let body;
326
222
  body = JSON.stringify(take(input, {
327
223
  associationStatus: [],
@@ -332,22 +228,15 @@ export const se_GetResourceShareAssociationsCommand = async (input, context) =>
332
228
  resourceArn: [],
333
229
  resourceShareArns: (_) => _json(_),
334
230
  }));
335
- return new __HttpRequest({
336
- protocol,
337
- hostname,
338
- port,
339
- method: "POST",
340
- headers,
341
- path: resolvedPath,
342
- body,
343
- });
231
+ b.m("POST").h(headers).b(body);
232
+ return b.build();
344
233
  };
345
234
  export const se_GetResourceShareInvitationsCommand = async (input, context) => {
346
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
235
+ const b = rb(input, context);
347
236
  const headers = {
348
237
  "content-type": "application/json",
349
238
  };
350
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshareinvitations";
239
+ b.bp("/getresourceshareinvitations");
351
240
  let body;
352
241
  body = JSON.stringify(take(input, {
353
242
  maxResults: [],
@@ -355,22 +244,15 @@ export const se_GetResourceShareInvitationsCommand = async (input, context) => {
355
244
  resourceShareArns: (_) => _json(_),
356
245
  resourceShareInvitationArns: (_) => _json(_),
357
246
  }));
358
- return new __HttpRequest({
359
- protocol,
360
- hostname,
361
- port,
362
- method: "POST",
363
- headers,
364
- path: resolvedPath,
365
- body,
366
- });
247
+ b.m("POST").h(headers).b(body);
248
+ return b.build();
367
249
  };
368
250
  export const se_GetResourceSharesCommand = async (input, context) => {
369
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
251
+ const b = rb(input, context);
370
252
  const headers = {
371
253
  "content-type": "application/json",
372
254
  };
373
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshares";
255
+ b.bp("/getresourceshares");
374
256
  let body;
375
257
  body = JSON.stringify(take(input, {
376
258
  maxResults: [],
@@ -383,22 +265,15 @@ export const se_GetResourceSharesCommand = async (input, context) => {
383
265
  resourceShareStatus: [],
384
266
  tagFilters: (_) => _json(_),
385
267
  }));
386
- return new __HttpRequest({
387
- protocol,
388
- hostname,
389
- port,
390
- method: "POST",
391
- headers,
392
- path: resolvedPath,
393
- body,
394
- });
268
+ b.m("POST").h(headers).b(body);
269
+ return b.build();
395
270
  };
396
271
  export const se_ListPendingInvitationResourcesCommand = async (input, context) => {
397
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
272
+ const b = rb(input, context);
398
273
  const headers = {
399
274
  "content-type": "application/json",
400
275
  };
401
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listpendinginvitationresources";
276
+ b.bp("/listpendinginvitationresources");
402
277
  let body;
403
278
  body = JSON.stringify(take(input, {
404
279
  maxResults: [],
@@ -406,22 +281,15 @@ export const se_ListPendingInvitationResourcesCommand = async (input, context) =
406
281
  resourceRegionScope: [],
407
282
  resourceShareInvitationArn: [],
408
283
  }));
409
- return new __HttpRequest({
410
- protocol,
411
- hostname,
412
- port,
413
- method: "POST",
414
- headers,
415
- path: resolvedPath,
416
- body,
417
- });
284
+ b.m("POST").h(headers).b(body);
285
+ return b.build();
418
286
  };
419
287
  export const se_ListPermissionAssociationsCommand = async (input, context) => {
420
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
288
+ const b = rb(input, context);
421
289
  const headers = {
422
290
  "content-type": "application/json",
423
291
  };
424
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listpermissionassociations";
292
+ b.bp("/listpermissionassociations");
425
293
  let body;
426
294
  body = JSON.stringify(take(input, {
427
295
  associationStatus: [],
@@ -433,22 +301,15 @@ export const se_ListPermissionAssociationsCommand = async (input, context) => {
433
301
  permissionVersion: [],
434
302
  resourceType: [],
435
303
  }));
436
- return new __HttpRequest({
437
- protocol,
438
- hostname,
439
- port,
440
- method: "POST",
441
- headers,
442
- path: resolvedPath,
443
- body,
444
- });
304
+ b.m("POST").h(headers).b(body);
305
+ return b.build();
445
306
  };
446
307
  export const se_ListPermissionsCommand = async (input, context) => {
447
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
308
+ const b = rb(input, context);
448
309
  const headers = {
449
310
  "content-type": "application/json",
450
311
  };
451
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listpermissions";
312
+ b.bp("/listpermissions");
452
313
  let body;
453
314
  body = JSON.stringify(take(input, {
454
315
  maxResults: [],
@@ -456,44 +317,30 @@ export const se_ListPermissionsCommand = async (input, context) => {
456
317
  permissionType: [],
457
318
  resourceType: [],
458
319
  }));
459
- return new __HttpRequest({
460
- protocol,
461
- hostname,
462
- port,
463
- method: "POST",
464
- headers,
465
- path: resolvedPath,
466
- body,
467
- });
320
+ b.m("POST").h(headers).b(body);
321
+ return b.build();
468
322
  };
469
323
  export const se_ListPermissionVersionsCommand = async (input, context) => {
470
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
324
+ const b = rb(input, context);
471
325
  const headers = {
472
326
  "content-type": "application/json",
473
327
  };
474
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listpermissionversions";
328
+ b.bp("/listpermissionversions");
475
329
  let body;
476
330
  body = JSON.stringify(take(input, {
477
331
  maxResults: [],
478
332
  nextToken: [],
479
333
  permissionArn: [],
480
334
  }));
481
- return new __HttpRequest({
482
- protocol,
483
- hostname,
484
- port,
485
- method: "POST",
486
- headers,
487
- path: resolvedPath,
488
- body,
489
- });
335
+ b.m("POST").h(headers).b(body);
336
+ return b.build();
490
337
  };
491
338
  export const se_ListPrincipalsCommand = async (input, context) => {
492
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
339
+ const b = rb(input, context);
493
340
  const headers = {
494
341
  "content-type": "application/json",
495
342
  };
496
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listprincipals";
343
+ b.bp("/listprincipals");
497
344
  let body;
498
345
  body = JSON.stringify(take(input, {
499
346
  maxResults: [],
@@ -504,22 +351,15 @@ export const se_ListPrincipalsCommand = async (input, context) => {
504
351
  resourceShareArns: (_) => _json(_),
505
352
  resourceType: [],
506
353
  }));
507
- return new __HttpRequest({
508
- protocol,
509
- hostname,
510
- port,
511
- method: "POST",
512
- headers,
513
- path: resolvedPath,
514
- body,
515
- });
354
+ b.m("POST").h(headers).b(body);
355
+ return b.build();
516
356
  };
517
357
  export const se_ListReplacePermissionAssociationsWorkCommand = async (input, context) => {
518
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
358
+ const b = rb(input, context);
519
359
  const headers = {
520
360
  "content-type": "application/json",
521
361
  };
522
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listreplacepermissionassociationswork";
362
+ b.bp("/listreplacepermissionassociationswork");
523
363
  let body;
524
364
  body = JSON.stringify(take(input, {
525
365
  maxResults: [],
@@ -527,22 +367,15 @@ export const se_ListReplacePermissionAssociationsWorkCommand = async (input, con
527
367
  status: [],
528
368
  workIds: (_) => _json(_),
529
369
  }));
530
- return new __HttpRequest({
531
- protocol,
532
- hostname,
533
- port,
534
- method: "POST",
535
- headers,
536
- path: resolvedPath,
537
- body,
538
- });
370
+ b.m("POST").h(headers).b(body);
371
+ return b.build();
539
372
  };
540
373
  export const se_ListResourcesCommand = async (input, context) => {
541
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
374
+ const b = rb(input, context);
542
375
  const headers = {
543
376
  "content-type": "application/json",
544
377
  };
545
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listresources";
378
+ b.bp("/listresources");
546
379
  let body;
547
380
  body = JSON.stringify(take(input, {
548
381
  maxResults: [],
@@ -554,128 +387,85 @@ export const se_ListResourcesCommand = async (input, context) => {
554
387
  resourceShareArns: (_) => _json(_),
555
388
  resourceType: [],
556
389
  }));
557
- return new __HttpRequest({
558
- protocol,
559
- hostname,
560
- port,
561
- method: "POST",
562
- headers,
563
- path: resolvedPath,
564
- body,
565
- });
390
+ b.m("POST").h(headers).b(body);
391
+ return b.build();
566
392
  };
567
393
  export const se_ListResourceSharePermissionsCommand = async (input, context) => {
568
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
394
+ const b = rb(input, context);
569
395
  const headers = {
570
396
  "content-type": "application/json",
571
397
  };
572
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listresourcesharepermissions";
398
+ b.bp("/listresourcesharepermissions");
573
399
  let body;
574
400
  body = JSON.stringify(take(input, {
575
401
  maxResults: [],
576
402
  nextToken: [],
577
403
  resourceShareArn: [],
578
404
  }));
579
- return new __HttpRequest({
580
- protocol,
581
- hostname,
582
- port,
583
- method: "POST",
584
- headers,
585
- path: resolvedPath,
586
- body,
587
- });
405
+ b.m("POST").h(headers).b(body);
406
+ return b.build();
588
407
  };
589
408
  export const se_ListResourceTypesCommand = async (input, context) => {
590
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
409
+ const b = rb(input, context);
591
410
  const headers = {
592
411
  "content-type": "application/json",
593
412
  };
594
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listresourcetypes";
413
+ b.bp("/listresourcetypes");
595
414
  let body;
596
415
  body = JSON.stringify(take(input, {
597
416
  maxResults: [],
598
417
  nextToken: [],
599
418
  resourceRegionScope: [],
600
419
  }));
601
- return new __HttpRequest({
602
- protocol,
603
- hostname,
604
- port,
605
- method: "POST",
606
- headers,
607
- path: resolvedPath,
608
- body,
609
- });
420
+ b.m("POST").h(headers).b(body);
421
+ return b.build();
610
422
  };
611
423
  export const se_PromotePermissionCreatedFromPolicyCommand = async (input, context) => {
612
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
424
+ const b = rb(input, context);
613
425
  const headers = {
614
426
  "content-type": "application/json",
615
427
  };
616
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/promotepermissioncreatedfrompolicy";
428
+ b.bp("/promotepermissioncreatedfrompolicy");
617
429
  let body;
618
430
  body = JSON.stringify(take(input, {
619
431
  clientToken: [],
620
432
  name: [],
621
433
  permissionArn: [],
622
434
  }));
623
- return new __HttpRequest({
624
- protocol,
625
- hostname,
626
- port,
627
- method: "POST",
628
- headers,
629
- path: resolvedPath,
630
- body,
631
- });
435
+ b.m("POST").h(headers).b(body);
436
+ return b.build();
632
437
  };
633
438
  export const se_PromoteResourceShareCreatedFromPolicyCommand = async (input, context) => {
634
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
439
+ const b = rb(input, context);
635
440
  const headers = {};
636
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/promoteresourcesharecreatedfrompolicy";
441
+ b.bp("/promoteresourcesharecreatedfrompolicy");
637
442
  const query = map({
638
- resourceShareArn: [, __expectNonNull(input.resourceShareArn, `resourceShareArn`)],
443
+ [_rSA]: [, __expectNonNull(input[_rSA], `resourceShareArn`)],
639
444
  });
640
445
  let body;
641
- return new __HttpRequest({
642
- protocol,
643
- hostname,
644
- port,
645
- method: "POST",
646
- headers,
647
- path: resolvedPath,
648
- query,
649
- body,
650
- });
446
+ b.m("POST").h(headers).q(query).b(body);
447
+ return b.build();
651
448
  };
652
449
  export const se_RejectResourceShareInvitationCommand = async (input, context) => {
653
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
450
+ const b = rb(input, context);
654
451
  const headers = {
655
452
  "content-type": "application/json",
656
453
  };
657
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rejectresourceshareinvitation";
454
+ b.bp("/rejectresourceshareinvitation");
658
455
  let body;
659
456
  body = JSON.stringify(take(input, {
660
457
  clientToken: [],
661
458
  resourceShareInvitationArn: [],
662
459
  }));
663
- return new __HttpRequest({
664
- protocol,
665
- hostname,
666
- port,
667
- method: "POST",
668
- headers,
669
- path: resolvedPath,
670
- body,
671
- });
460
+ b.m("POST").h(headers).b(body);
461
+ return b.build();
672
462
  };
673
463
  export const se_ReplacePermissionAssociationsCommand = async (input, context) => {
674
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
464
+ const b = rb(input, context);
675
465
  const headers = {
676
466
  "content-type": "application/json",
677
467
  };
678
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/replacepermissionassociations";
468
+ b.bp("/replacepermissionassociations");
679
469
  let body;
680
470
  body = JSON.stringify(take(input, {
681
471
  clientToken: [],
@@ -683,88 +473,60 @@ export const se_ReplacePermissionAssociationsCommand = async (input, context) =>
683
473
  fromPermissionVersion: [],
684
474
  toPermissionArn: [],
685
475
  }));
686
- return new __HttpRequest({
687
- protocol,
688
- hostname,
689
- port,
690
- method: "POST",
691
- headers,
692
- path: resolvedPath,
693
- body,
694
- });
476
+ b.m("POST").h(headers).b(body);
477
+ return b.build();
695
478
  };
696
479
  export const se_SetDefaultPermissionVersionCommand = async (input, context) => {
697
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
480
+ const b = rb(input, context);
698
481
  const headers = {
699
482
  "content-type": "application/json",
700
483
  };
701
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/setdefaultpermissionversion";
484
+ b.bp("/setdefaultpermissionversion");
702
485
  let body;
703
486
  body = JSON.stringify(take(input, {
704
487
  clientToken: [],
705
488
  permissionArn: [],
706
489
  permissionVersion: [],
707
490
  }));
708
- return new __HttpRequest({
709
- protocol,
710
- hostname,
711
- port,
712
- method: "POST",
713
- headers,
714
- path: resolvedPath,
715
- body,
716
- });
491
+ b.m("POST").h(headers).b(body);
492
+ return b.build();
717
493
  };
718
494
  export const se_TagResourceCommand = async (input, context) => {
719
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
495
+ const b = rb(input, context);
720
496
  const headers = {
721
497
  "content-type": "application/json",
722
498
  };
723
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tagresource";
499
+ b.bp("/tagresource");
724
500
  let body;
725
501
  body = JSON.stringify(take(input, {
726
502
  resourceArn: [],
727
503
  resourceShareArn: [],
728
504
  tags: (_) => _json(_),
729
505
  }));
730
- return new __HttpRequest({
731
- protocol,
732
- hostname,
733
- port,
734
- method: "POST",
735
- headers,
736
- path: resolvedPath,
737
- body,
738
- });
506
+ b.m("POST").h(headers).b(body);
507
+ return b.build();
739
508
  };
740
509
  export const se_UntagResourceCommand = async (input, context) => {
741
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
510
+ const b = rb(input, context);
742
511
  const headers = {
743
512
  "content-type": "application/json",
744
513
  };
745
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/untagresource";
514
+ b.bp("/untagresource");
746
515
  let body;
747
516
  body = JSON.stringify(take(input, {
748
517
  resourceArn: [],
749
518
  resourceShareArn: [],
750
519
  tagKeys: (_) => _json(_),
751
520
  }));
752
- return new __HttpRequest({
753
- protocol,
754
- hostname,
755
- port,
756
- method: "POST",
757
- headers,
758
- path: resolvedPath,
759
- body,
760
- });
521
+ b.m("POST").h(headers).b(body);
522
+ return b.build();
761
523
  };
762
524
  export const se_UpdateResourceShareCommand = async (input, context) => {
763
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
525
+ const b = rb(input, context);
764
526
  const headers = {
765
527
  "content-type": "application/json",
766
528
  };
767
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateresourceshare";
529
+ b.bp("/updateresourceshare");
768
530
  let body;
769
531
  body = JSON.stringify(take(input, {
770
532
  allowExternalPrincipals: [],
@@ -772,15 +534,8 @@ export const se_UpdateResourceShareCommand = async (input, context) => {
772
534
  name: [],
773
535
  resourceShareArn: [],
774
536
  }));
775
- return new __HttpRequest({
776
- protocol,
777
- hostname,
778
- port,
779
- method: "POST",
780
- headers,
781
- path: resolvedPath,
782
- body,
783
- });
537
+ b.m("POST").h(headers).b(body);
538
+ return b.build();
784
539
  };
785
540
  export const de_AcceptResourceShareInvitationCommand = async (output, context) => {
786
541
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3154,6 +2909,10 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
3154
2909
  value !== "" &&
3155
2910
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
3156
2911
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2912
+ const _cT = "clientToken";
2913
+ const _pA = "permissionArn";
2914
+ const _pV = "permissionVersion";
2915
+ const _rSA = "resourceShareArn";
3157
2916
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3158
2917
  if (encoded.length) {
3159
2918
  return JSON.parse(encoded);