@aws-sdk/client-efs 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,14 +1,14 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { EFSServiceException as __BaseException } from "../models/EFSServiceException";
5
5
  import { AccessPointAlreadyExists, AccessPointLimitExceeded, AccessPointNotFound, AvailabilityZonesMismatch, BadRequest, ConflictException, DependencyTimeout, FileSystemAlreadyExists, FileSystemInUse, FileSystemLimitExceeded, FileSystemNotFound, IncorrectFileSystemLifeCycleState, IncorrectMountTargetState, InsufficientThroughputCapacity, InternalServerError, InvalidPolicyException, IpAddressInUse, MountTargetConflict, MountTargetNotFound, NetworkInterfaceLimitExceeded, NoFreeAddressesInSubnet, PolicyNotFound, ReplicationAlreadyExists, ReplicationNotFound, SecurityGroupLimitExceeded, SecurityGroupNotFound, SubnetNotFound, ThrottlingException, ThroughputLimitExceeded, TooManyRequests, UnsupportedAvailabilityZone, ValidationException, } from "../models/models_0";
6
6
  export const se_CreateAccessPointCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/access-points";
11
+ b.bp("/2015-02-01/access-points");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -17,22 +17,15 @@ export const se_CreateAccessPointCommand = async (input, context) => {
17
17
  RootDirectory: (_) => _json(_),
18
18
  Tags: (_) => _json(_),
19
19
  }));
20
- return new __HttpRequest({
21
- protocol,
22
- hostname,
23
- port,
24
- method: "POST",
25
- headers,
26
- path: resolvedPath,
27
- body,
28
- });
20
+ b.m("POST").h(headers).b(body);
21
+ return b.build();
29
22
  };
30
23
  export const se_CreateFileSystemCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = rb(input, context);
32
25
  const headers = {
33
26
  "content-type": "application/json",
34
27
  };
35
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/file-systems";
28
+ b.bp("/2015-02-01/file-systems");
36
29
  let body;
37
30
  body = JSON.stringify(take(input, {
38
31
  AvailabilityZoneName: [],
@@ -45,22 +38,15 @@ export const se_CreateFileSystemCommand = async (input, context) => {
45
38
  Tags: (_) => _json(_),
46
39
  ThroughputMode: [],
47
40
  }));
48
- return new __HttpRequest({
49
- protocol,
50
- hostname,
51
- port,
52
- method: "POST",
53
- headers,
54
- path: resolvedPath,
55
- body,
56
- });
41
+ b.m("POST").h(headers).b(body);
42
+ return b.build();
57
43
  };
58
44
  export const se_CreateMountTargetCommand = async (input, context) => {
59
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
45
+ const b = rb(input, context);
60
46
  const headers = {
61
47
  "content-type": "application/json",
62
48
  };
63
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/mount-targets";
49
+ b.bp("/2015-02-01/mount-targets");
64
50
  let body;
65
51
  body = JSON.stringify(take(input, {
66
52
  FileSystemId: [],
@@ -68,578 +54,355 @@ export const se_CreateMountTargetCommand = async (input, context) => {
68
54
  SecurityGroups: (_) => _json(_),
69
55
  SubnetId: [],
70
56
  }));
71
- return new __HttpRequest({
72
- protocol,
73
- hostname,
74
- port,
75
- method: "POST",
76
- headers,
77
- path: resolvedPath,
78
- body,
79
- });
57
+ b.m("POST").h(headers).b(body);
58
+ return b.build();
80
59
  };
81
60
  export const se_CreateReplicationConfigurationCommand = async (input, context) => {
82
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
61
+ const b = rb(input, context);
83
62
  const headers = {
84
63
  "content-type": "application/json",
85
64
  };
86
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
87
- "/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration";
88
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceFileSystemId", () => input.SourceFileSystemId, "{SourceFileSystemId}", false);
65
+ b.bp("/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration");
66
+ b.p("SourceFileSystemId", () => input.SourceFileSystemId, "{SourceFileSystemId}", false);
89
67
  let body;
90
68
  body = JSON.stringify(take(input, {
91
69
  Destinations: (_) => _json(_),
92
70
  }));
93
- return new __HttpRequest({
94
- protocol,
95
- hostname,
96
- port,
97
- method: "POST",
98
- headers,
99
- path: resolvedPath,
100
- body,
101
- });
71
+ b.m("POST").h(headers).b(body);
72
+ return b.build();
102
73
  };
103
74
  export const se_CreateTagsCommand = async (input, context) => {
104
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
75
+ const b = rb(input, context);
105
76
  const headers = {
106
77
  "content-type": "application/json",
107
78
  };
108
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/create-tags/{FileSystemId}";
109
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
79
+ b.bp("/2015-02-01/create-tags/{FileSystemId}");
80
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
110
81
  let body;
111
82
  body = JSON.stringify(take(input, {
112
83
  Tags: (_) => _json(_),
113
84
  }));
114
- return new __HttpRequest({
115
- protocol,
116
- hostname,
117
- port,
118
- method: "POST",
119
- headers,
120
- path: resolvedPath,
121
- body,
122
- });
85
+ b.m("POST").h(headers).b(body);
86
+ return b.build();
123
87
  };
124
88
  export const se_DeleteAccessPointCommand = async (input, context) => {
125
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = rb(input, context);
126
90
  const headers = {};
127
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/access-points/{AccessPointId}";
128
- resolvedPath = __resolvedPath(resolvedPath, input, "AccessPointId", () => input.AccessPointId, "{AccessPointId}", false);
91
+ b.bp("/2015-02-01/access-points/{AccessPointId}");
92
+ b.p("AccessPointId", () => input.AccessPointId, "{AccessPointId}", false);
129
93
  let body;
130
- return new __HttpRequest({
131
- protocol,
132
- hostname,
133
- port,
134
- method: "DELETE",
135
- headers,
136
- path: resolvedPath,
137
- body,
138
- });
94
+ b.m("DELETE").h(headers).b(body);
95
+ return b.build();
139
96
  };
140
97
  export const se_DeleteFileSystemCommand = async (input, context) => {
141
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
98
+ const b = rb(input, context);
142
99
  const headers = {};
143
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/file-systems/{FileSystemId}";
144
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
100
+ b.bp("/2015-02-01/file-systems/{FileSystemId}");
101
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
145
102
  let body;
146
- return new __HttpRequest({
147
- protocol,
148
- hostname,
149
- port,
150
- method: "DELETE",
151
- headers,
152
- path: resolvedPath,
153
- body,
154
- });
103
+ b.m("DELETE").h(headers).b(body);
104
+ return b.build();
155
105
  };
156
106
  export const se_DeleteFileSystemPolicyCommand = async (input, context) => {
157
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
107
+ const b = rb(input, context);
158
108
  const headers = {};
159
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
160
- "/2015-02-01/file-systems/{FileSystemId}/policy";
161
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
109
+ b.bp("/2015-02-01/file-systems/{FileSystemId}/policy");
110
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
162
111
  let body;
163
- return new __HttpRequest({
164
- protocol,
165
- hostname,
166
- port,
167
- method: "DELETE",
168
- headers,
169
- path: resolvedPath,
170
- body,
171
- });
112
+ b.m("DELETE").h(headers).b(body);
113
+ return b.build();
172
114
  };
173
115
  export const se_DeleteMountTargetCommand = async (input, context) => {
174
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = rb(input, context);
175
117
  const headers = {};
176
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/mount-targets/{MountTargetId}";
177
- resolvedPath = __resolvedPath(resolvedPath, input, "MountTargetId", () => input.MountTargetId, "{MountTargetId}", false);
118
+ b.bp("/2015-02-01/mount-targets/{MountTargetId}");
119
+ b.p("MountTargetId", () => input.MountTargetId, "{MountTargetId}", false);
178
120
  let body;
179
- return new __HttpRequest({
180
- protocol,
181
- hostname,
182
- port,
183
- method: "DELETE",
184
- headers,
185
- path: resolvedPath,
186
- body,
187
- });
121
+ b.m("DELETE").h(headers).b(body);
122
+ return b.build();
188
123
  };
189
124
  export const se_DeleteReplicationConfigurationCommand = async (input, context) => {
190
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
+ const b = rb(input, context);
191
126
  const headers = {};
192
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
193
- "/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration";
194
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceFileSystemId", () => input.SourceFileSystemId, "{SourceFileSystemId}", false);
127
+ b.bp("/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration");
128
+ b.p("SourceFileSystemId", () => input.SourceFileSystemId, "{SourceFileSystemId}", false);
195
129
  let body;
196
- return new __HttpRequest({
197
- protocol,
198
- hostname,
199
- port,
200
- method: "DELETE",
201
- headers,
202
- path: resolvedPath,
203
- body,
204
- });
130
+ b.m("DELETE").h(headers).b(body);
131
+ return b.build();
205
132
  };
206
133
  export const se_DeleteTagsCommand = async (input, context) => {
207
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
134
+ const b = rb(input, context);
208
135
  const headers = {
209
136
  "content-type": "application/json",
210
137
  };
211
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/delete-tags/{FileSystemId}";
212
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
138
+ b.bp("/2015-02-01/delete-tags/{FileSystemId}");
139
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
213
140
  let body;
214
141
  body = JSON.stringify(take(input, {
215
142
  TagKeys: (_) => _json(_),
216
143
  }));
217
- return new __HttpRequest({
218
- protocol,
219
- hostname,
220
- port,
221
- method: "POST",
222
- headers,
223
- path: resolvedPath,
224
- body,
225
- });
144
+ b.m("POST").h(headers).b(body);
145
+ return b.build();
226
146
  };
227
147
  export const se_DescribeAccessPointsCommand = async (input, context) => {
228
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
148
+ const b = rb(input, context);
229
149
  const headers = {};
230
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/access-points";
150
+ b.bp("/2015-02-01/access-points");
231
151
  const query = map({
232
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
233
- NextToken: [, input.NextToken],
234
- AccessPointId: [, input.AccessPointId],
235
- FileSystemId: [, input.FileSystemId],
152
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
153
+ [_NT]: [, input[_NT]],
154
+ [_API]: [, input[_API]],
155
+ [_FSI]: [, input[_FSI]],
236
156
  });
237
157
  let body;
238
- return new __HttpRequest({
239
- protocol,
240
- hostname,
241
- port,
242
- method: "GET",
243
- headers,
244
- path: resolvedPath,
245
- query,
246
- body,
247
- });
158
+ b.m("GET").h(headers).q(query).b(body);
159
+ return b.build();
248
160
  };
249
161
  export const se_DescribeAccountPreferencesCommand = async (input, context) => {
250
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
162
+ const b = rb(input, context);
251
163
  const headers = {
252
164
  "content-type": "application/json",
253
165
  };
254
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/account-preferences";
166
+ b.bp("/2015-02-01/account-preferences");
255
167
  let body;
256
168
  body = JSON.stringify(take(input, {
257
169
  MaxResults: [],
258
170
  NextToken: [],
259
171
  }));
260
- return new __HttpRequest({
261
- protocol,
262
- hostname,
263
- port,
264
- method: "GET",
265
- headers,
266
- path: resolvedPath,
267
- body,
268
- });
172
+ b.m("GET").h(headers).b(body);
173
+ return b.build();
269
174
  };
270
175
  export const se_DescribeBackupPolicyCommand = async (input, context) => {
271
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
176
+ const b = rb(input, context);
272
177
  const headers = {};
273
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
274
- "/2015-02-01/file-systems/{FileSystemId}/backup-policy";
275
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
178
+ b.bp("/2015-02-01/file-systems/{FileSystemId}/backup-policy");
179
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
276
180
  let body;
277
- return new __HttpRequest({
278
- protocol,
279
- hostname,
280
- port,
281
- method: "GET",
282
- headers,
283
- path: resolvedPath,
284
- body,
285
- });
181
+ b.m("GET").h(headers).b(body);
182
+ return b.build();
286
183
  };
287
184
  export const se_DescribeFileSystemPolicyCommand = async (input, context) => {
288
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
185
+ const b = rb(input, context);
289
186
  const headers = {};
290
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
291
- "/2015-02-01/file-systems/{FileSystemId}/policy";
292
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
187
+ b.bp("/2015-02-01/file-systems/{FileSystemId}/policy");
188
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
293
189
  let body;
294
- return new __HttpRequest({
295
- protocol,
296
- hostname,
297
- port,
298
- method: "GET",
299
- headers,
300
- path: resolvedPath,
301
- body,
302
- });
190
+ b.m("GET").h(headers).b(body);
191
+ return b.build();
303
192
  };
304
193
  export const se_DescribeFileSystemsCommand = async (input, context) => {
305
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
194
+ const b = rb(input, context);
306
195
  const headers = {};
307
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/file-systems";
196
+ b.bp("/2015-02-01/file-systems");
308
197
  const query = map({
309
- MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
310
- Marker: [, input.Marker],
311
- CreationToken: [, input.CreationToken],
312
- FileSystemId: [, input.FileSystemId],
198
+ [_MI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
199
+ [_M]: [, input[_M]],
200
+ [_CT]: [, input[_CT]],
201
+ [_FSI]: [, input[_FSI]],
313
202
  });
314
203
  let body;
315
- return new __HttpRequest({
316
- protocol,
317
- hostname,
318
- port,
319
- method: "GET",
320
- headers,
321
- path: resolvedPath,
322
- query,
323
- body,
324
- });
204
+ b.m("GET").h(headers).q(query).b(body);
205
+ return b.build();
325
206
  };
326
207
  export const se_DescribeLifecycleConfigurationCommand = async (input, context) => {
327
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
208
+ const b = rb(input, context);
328
209
  const headers = {};
329
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
330
- "/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration";
331
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
210
+ b.bp("/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration");
211
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
332
212
  let body;
333
- return new __HttpRequest({
334
- protocol,
335
- hostname,
336
- port,
337
- method: "GET",
338
- headers,
339
- path: resolvedPath,
340
- body,
341
- });
213
+ b.m("GET").h(headers).b(body);
214
+ return b.build();
342
215
  };
343
216
  export const se_DescribeMountTargetsCommand = async (input, context) => {
344
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
217
+ const b = rb(input, context);
345
218
  const headers = {};
346
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/mount-targets";
219
+ b.bp("/2015-02-01/mount-targets");
347
220
  const query = map({
348
- MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
349
- Marker: [, input.Marker],
350
- FileSystemId: [, input.FileSystemId],
351
- MountTargetId: [, input.MountTargetId],
352
- AccessPointId: [, input.AccessPointId],
221
+ [_MI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
222
+ [_M]: [, input[_M]],
223
+ [_FSI]: [, input[_FSI]],
224
+ [_MTI]: [, input[_MTI]],
225
+ [_API]: [, input[_API]],
353
226
  });
354
227
  let body;
355
- return new __HttpRequest({
356
- protocol,
357
- hostname,
358
- port,
359
- method: "GET",
360
- headers,
361
- path: resolvedPath,
362
- query,
363
- body,
364
- });
228
+ b.m("GET").h(headers).q(query).b(body);
229
+ return b.build();
365
230
  };
366
231
  export const se_DescribeMountTargetSecurityGroupsCommand = async (input, context) => {
367
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
232
+ const b = rb(input, context);
368
233
  const headers = {};
369
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
370
- "/2015-02-01/mount-targets/{MountTargetId}/security-groups";
371
- resolvedPath = __resolvedPath(resolvedPath, input, "MountTargetId", () => input.MountTargetId, "{MountTargetId}", false);
234
+ b.bp("/2015-02-01/mount-targets/{MountTargetId}/security-groups");
235
+ b.p("MountTargetId", () => input.MountTargetId, "{MountTargetId}", false);
372
236
  let body;
373
- return new __HttpRequest({
374
- protocol,
375
- hostname,
376
- port,
377
- method: "GET",
378
- headers,
379
- path: resolvedPath,
380
- body,
381
- });
237
+ b.m("GET").h(headers).b(body);
238
+ return b.build();
382
239
  };
383
240
  export const se_DescribeReplicationConfigurationsCommand = async (input, context) => {
384
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
241
+ const b = rb(input, context);
385
242
  const headers = {};
386
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
387
- "/2015-02-01/file-systems/replication-configurations";
243
+ b.bp("/2015-02-01/file-systems/replication-configurations");
388
244
  const query = map({
389
- FileSystemId: [, input.FileSystemId],
390
- NextToken: [, input.NextToken],
391
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
245
+ [_FSI]: [, input[_FSI]],
246
+ [_NT]: [, input[_NT]],
247
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
392
248
  });
393
249
  let body;
394
- return new __HttpRequest({
395
- protocol,
396
- hostname,
397
- port,
398
- method: "GET",
399
- headers,
400
- path: resolvedPath,
401
- query,
402
- body,
403
- });
250
+ b.m("GET").h(headers).q(query).b(body);
251
+ return b.build();
404
252
  };
405
253
  export const se_DescribeTagsCommand = async (input, context) => {
406
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
254
+ const b = rb(input, context);
407
255
  const headers = {};
408
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/tags/{FileSystemId}";
409
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
256
+ b.bp("/2015-02-01/tags/{FileSystemId}");
257
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
410
258
  const query = map({
411
- MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
412
- Marker: [, input.Marker],
259
+ [_MI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
260
+ [_M]: [, input[_M]],
413
261
  });
414
262
  let body;
415
- return new __HttpRequest({
416
- protocol,
417
- hostname,
418
- port,
419
- method: "GET",
420
- headers,
421
- path: resolvedPath,
422
- query,
423
- body,
424
- });
263
+ b.m("GET").h(headers).q(query).b(body);
264
+ return b.build();
425
265
  };
426
266
  export const se_ListTagsForResourceCommand = async (input, context) => {
427
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
267
+ const b = rb(input, context);
428
268
  const headers = {};
429
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/resource-tags/{ResourceId}";
430
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
269
+ b.bp("/2015-02-01/resource-tags/{ResourceId}");
270
+ b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false);
431
271
  const query = map({
432
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
433
- NextToken: [, input.NextToken],
272
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
273
+ [_NT]: [, input[_NT]],
434
274
  });
435
275
  let body;
436
- return new __HttpRequest({
437
- protocol,
438
- hostname,
439
- port,
440
- method: "GET",
441
- headers,
442
- path: resolvedPath,
443
- query,
444
- body,
445
- });
276
+ b.m("GET").h(headers).q(query).b(body);
277
+ return b.build();
446
278
  };
447
279
  export const se_ModifyMountTargetSecurityGroupsCommand = async (input, context) => {
448
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
280
+ const b = rb(input, context);
449
281
  const headers = {
450
282
  "content-type": "application/json",
451
283
  };
452
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
453
- "/2015-02-01/mount-targets/{MountTargetId}/security-groups";
454
- resolvedPath = __resolvedPath(resolvedPath, input, "MountTargetId", () => input.MountTargetId, "{MountTargetId}", false);
284
+ b.bp("/2015-02-01/mount-targets/{MountTargetId}/security-groups");
285
+ b.p("MountTargetId", () => input.MountTargetId, "{MountTargetId}", false);
455
286
  let body;
456
287
  body = JSON.stringify(take(input, {
457
288
  SecurityGroups: (_) => _json(_),
458
289
  }));
459
- return new __HttpRequest({
460
- protocol,
461
- hostname,
462
- port,
463
- method: "PUT",
464
- headers,
465
- path: resolvedPath,
466
- body,
467
- });
290
+ b.m("PUT").h(headers).b(body);
291
+ return b.build();
468
292
  };
469
293
  export const se_PutAccountPreferencesCommand = async (input, context) => {
470
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
294
+ const b = rb(input, context);
471
295
  const headers = {
472
296
  "content-type": "application/json",
473
297
  };
474
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/account-preferences";
298
+ b.bp("/2015-02-01/account-preferences");
475
299
  let body;
476
300
  body = JSON.stringify(take(input, {
477
301
  ResourceIdType: [],
478
302
  }));
479
- return new __HttpRequest({
480
- protocol,
481
- hostname,
482
- port,
483
- method: "PUT",
484
- headers,
485
- path: resolvedPath,
486
- body,
487
- });
303
+ b.m("PUT").h(headers).b(body);
304
+ return b.build();
488
305
  };
489
306
  export const se_PutBackupPolicyCommand = async (input, context) => {
490
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
307
+ const b = rb(input, context);
491
308
  const headers = {
492
309
  "content-type": "application/json",
493
310
  };
494
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
495
- "/2015-02-01/file-systems/{FileSystemId}/backup-policy";
496
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
311
+ b.bp("/2015-02-01/file-systems/{FileSystemId}/backup-policy");
312
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
497
313
  let body;
498
314
  body = JSON.stringify(take(input, {
499
315
  BackupPolicy: (_) => _json(_),
500
316
  }));
501
- return new __HttpRequest({
502
- protocol,
503
- hostname,
504
- port,
505
- method: "PUT",
506
- headers,
507
- path: resolvedPath,
508
- body,
509
- });
317
+ b.m("PUT").h(headers).b(body);
318
+ return b.build();
510
319
  };
511
320
  export const se_PutFileSystemPolicyCommand = async (input, context) => {
512
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
321
+ const b = rb(input, context);
513
322
  const headers = {
514
323
  "content-type": "application/json",
515
324
  };
516
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
517
- "/2015-02-01/file-systems/{FileSystemId}/policy";
518
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
325
+ b.bp("/2015-02-01/file-systems/{FileSystemId}/policy");
326
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
519
327
  let body;
520
328
  body = JSON.stringify(take(input, {
521
329
  BypassPolicyLockoutSafetyCheck: [],
522
330
  Policy: [],
523
331
  }));
524
- return new __HttpRequest({
525
- protocol,
526
- hostname,
527
- port,
528
- method: "PUT",
529
- headers,
530
- path: resolvedPath,
531
- body,
532
- });
332
+ b.m("PUT").h(headers).b(body);
333
+ return b.build();
533
334
  };
534
335
  export const se_PutLifecycleConfigurationCommand = async (input, context) => {
535
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
336
+ const b = rb(input, context);
536
337
  const headers = {
537
338
  "content-type": "application/json",
538
339
  };
539
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
540
- "/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration";
541
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
340
+ b.bp("/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration");
341
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
542
342
  let body;
543
343
  body = JSON.stringify(take(input, {
544
344
  LifecyclePolicies: (_) => _json(_),
545
345
  }));
546
- return new __HttpRequest({
547
- protocol,
548
- hostname,
549
- port,
550
- method: "PUT",
551
- headers,
552
- path: resolvedPath,
553
- body,
554
- });
346
+ b.m("PUT").h(headers).b(body);
347
+ return b.build();
555
348
  };
556
349
  export const se_TagResourceCommand = async (input, context) => {
557
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
350
+ const b = rb(input, context);
558
351
  const headers = {
559
352
  "content-type": "application/json",
560
353
  };
561
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/resource-tags/{ResourceId}";
562
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
354
+ b.bp("/2015-02-01/resource-tags/{ResourceId}");
355
+ b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false);
563
356
  let body;
564
357
  body = JSON.stringify(take(input, {
565
358
  Tags: (_) => _json(_),
566
359
  }));
567
- return new __HttpRequest({
568
- protocol,
569
- hostname,
570
- port,
571
- method: "POST",
572
- headers,
573
- path: resolvedPath,
574
- body,
575
- });
360
+ b.m("POST").h(headers).b(body);
361
+ return b.build();
576
362
  };
577
363
  export const se_UntagResourceCommand = async (input, context) => {
578
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
364
+ const b = rb(input, context);
579
365
  const headers = {};
580
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/resource-tags/{ResourceId}";
581
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
366
+ b.bp("/2015-02-01/resource-tags/{ResourceId}");
367
+ b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false);
582
368
  const query = map({
583
- tagKeys: [
369
+ [_tK]: [
584
370
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
585
- () => (input.TagKeys || []).map((_entry) => _entry),
371
+ () => (input[_TK] || []).map((_entry) => _entry),
586
372
  ],
587
373
  });
588
374
  let body;
589
- return new __HttpRequest({
590
- protocol,
591
- hostname,
592
- port,
593
- method: "DELETE",
594
- headers,
595
- path: resolvedPath,
596
- query,
597
- body,
598
- });
375
+ b.m("DELETE").h(headers).q(query).b(body);
376
+ return b.build();
599
377
  };
600
378
  export const se_UpdateFileSystemCommand = async (input, context) => {
601
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
379
+ const b = rb(input, context);
602
380
  const headers = {
603
381
  "content-type": "application/json",
604
382
  };
605
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/file-systems/{FileSystemId}";
606
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
383
+ b.bp("/2015-02-01/file-systems/{FileSystemId}");
384
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
607
385
  let body;
608
386
  body = JSON.stringify(take(input, {
609
387
  ProvisionedThroughputInMibps: (_) => __serializeFloat(_),
610
388
  ThroughputMode: [],
611
389
  }));
612
- return new __HttpRequest({
613
- protocol,
614
- hostname,
615
- port,
616
- method: "PUT",
617
- headers,
618
- path: resolvedPath,
619
- body,
620
- });
390
+ b.m("PUT").h(headers).b(body);
391
+ return b.build();
621
392
  };
622
393
  export const se_UpdateFileSystemProtectionCommand = async (input, context) => {
623
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
394
+ const b = rb(input, context);
624
395
  const headers = {
625
396
  "content-type": "application/json",
626
397
  };
627
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
628
- "/2015-02-01/file-systems/{FileSystemId}/protection";
629
- resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
398
+ b.bp("/2015-02-01/file-systems/{FileSystemId}/protection");
399
+ b.p("FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
630
400
  let body;
631
401
  body = JSON.stringify(take(input, {
632
402
  ReplicationOverwriteProtection: [],
633
403
  }));
634
- return new __HttpRequest({
635
- protocol,
636
- hostname,
637
- port,
638
- method: "PUT",
639
- headers,
640
- path: resolvedPath,
641
- body,
642
- });
404
+ b.m("PUT").h(headers).b(body);
405
+ return b.build();
643
406
  };
644
407
  export const de_CreateAccessPointCommand = async (output, context) => {
645
408
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2583,6 +2346,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2583
2346
  value !== "" &&
2584
2347
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2585
2348
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2349
+ const _API = "AccessPointId";
2350
+ const _CT = "CreationToken";
2351
+ const _FSI = "FileSystemId";
2352
+ const _M = "Marker";
2353
+ const _MI = "MaxItems";
2354
+ const _MR = "MaxResults";
2355
+ const _MTI = "MountTargetId";
2356
+ const _NT = "NextToken";
2357
+ const _TK = "TagKeys";
2358
+ const _tK = "tagKeys";
2586
2359
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2587
2360
  if (encoded.length) {
2588
2361
  return JSON.parse(encoded);