@aws-sdk/client-opensearchserverless 3.926.0 → 3.928.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 (62) hide show
  1. package/dist-cjs/index.js +1329 -1475
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/OpenSearchServerlessClient.js +2 -0
  4. package/dist-es/commands/BatchGetCollectionCommand.js +3 -9
  5. package/dist-es/commands/BatchGetEffectiveLifecyclePolicyCommand.js +3 -9
  6. package/dist-es/commands/BatchGetLifecyclePolicyCommand.js +3 -9
  7. package/dist-es/commands/BatchGetVpcEndpointCommand.js +3 -9
  8. package/dist-es/commands/CreateAccessPolicyCommand.js +3 -9
  9. package/dist-es/commands/CreateCollectionCommand.js +3 -9
  10. package/dist-es/commands/CreateIndexCommand.js +3 -9
  11. package/dist-es/commands/CreateLifecyclePolicyCommand.js +3 -9
  12. package/dist-es/commands/CreateSecurityConfigCommand.js +3 -9
  13. package/dist-es/commands/CreateSecurityPolicyCommand.js +3 -9
  14. package/dist-es/commands/CreateVpcEndpointCommand.js +3 -9
  15. package/dist-es/commands/DeleteAccessPolicyCommand.js +3 -9
  16. package/dist-es/commands/DeleteCollectionCommand.js +3 -9
  17. package/dist-es/commands/DeleteIndexCommand.js +3 -9
  18. package/dist-es/commands/DeleteLifecyclePolicyCommand.js +3 -9
  19. package/dist-es/commands/DeleteSecurityConfigCommand.js +3 -9
  20. package/dist-es/commands/DeleteSecurityPolicyCommand.js +3 -9
  21. package/dist-es/commands/DeleteVpcEndpointCommand.js +3 -9
  22. package/dist-es/commands/GetAccessPolicyCommand.js +3 -9
  23. package/dist-es/commands/GetAccountSettingsCommand.js +3 -9
  24. package/dist-es/commands/GetIndexCommand.js +3 -9
  25. package/dist-es/commands/GetPoliciesStatsCommand.js +3 -9
  26. package/dist-es/commands/GetSecurityConfigCommand.js +3 -9
  27. package/dist-es/commands/GetSecurityPolicyCommand.js +3 -9
  28. package/dist-es/commands/ListAccessPoliciesCommand.js +3 -9
  29. package/dist-es/commands/ListCollectionsCommand.js +3 -9
  30. package/dist-es/commands/ListLifecyclePoliciesCommand.js +3 -9
  31. package/dist-es/commands/ListSecurityConfigsCommand.js +3 -9
  32. package/dist-es/commands/ListSecurityPoliciesCommand.js +3 -9
  33. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  34. package/dist-es/commands/ListVpcEndpointsCommand.js +3 -9
  35. package/dist-es/commands/TagResourceCommand.js +3 -9
  36. package/dist-es/commands/UntagResourceCommand.js +3 -9
  37. package/dist-es/commands/UpdateAccessPolicyCommand.js +3 -9
  38. package/dist-es/commands/UpdateAccountSettingsCommand.js +3 -9
  39. package/dist-es/commands/UpdateCollectionCommand.js +3 -9
  40. package/dist-es/commands/UpdateIndexCommand.js +3 -9
  41. package/dist-es/commands/UpdateLifecyclePolicyCommand.js +3 -9
  42. package/dist-es/commands/UpdateSecurityConfigCommand.js +3 -9
  43. package/dist-es/commands/UpdateSecurityPolicyCommand.js +3 -9
  44. package/dist-es/commands/UpdateVpcEndpointCommand.js +3 -9
  45. package/dist-es/runtimeConfig.shared.js +7 -0
  46. package/dist-es/schemas/schemas_0.js +1235 -0
  47. package/dist-types/OpenSearchServerlessClient.d.ts +10 -1
  48. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  49. package/dist-types/runtimeConfig.d.ts +1 -0
  50. package/dist-types/runtimeConfig.native.d.ts +1 -0
  51. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  52. package/dist-types/schemas/schemas_0.d.ts +196 -0
  53. package/dist-types/ts3.4/OpenSearchServerlessClient.d.ts +4 -0
  54. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  55. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  56. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  57. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  58. package/dist-types/ts3.4/schemas/schemas_0.d.ts +201 -0
  59. package/package.json +5 -6
  60. package/dist-es/protocols/Aws_json1_0.js +0 -1174
  61. package/dist-types/protocols/Aws_json1_0.d.ts +0 -371
  62. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +0 -497
@@ -1,1174 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectString as __expectString, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { ConflictException, InternalServerException, OcuLimitExceededException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
6
- import { OpenSearchServerlessServiceException as __BaseException } from "../models/OpenSearchServerlessServiceException";
7
- export const se_BatchGetCollectionCommand = async (input, context) => {
8
- const headers = sharedHeaders("BatchGetCollection");
9
- let body;
10
- body = JSON.stringify(_json(input));
11
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
12
- };
13
- export const se_BatchGetEffectiveLifecyclePolicyCommand = async (input, context) => {
14
- const headers = sharedHeaders("BatchGetEffectiveLifecyclePolicy");
15
- let body;
16
- body = JSON.stringify(_json(input));
17
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
18
- };
19
- export const se_BatchGetLifecyclePolicyCommand = async (input, context) => {
20
- const headers = sharedHeaders("BatchGetLifecyclePolicy");
21
- let body;
22
- body = JSON.stringify(_json(input));
23
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
24
- };
25
- export const se_BatchGetVpcEndpointCommand = async (input, context) => {
26
- const headers = sharedHeaders("BatchGetVpcEndpoint");
27
- let body;
28
- body = JSON.stringify(_json(input));
29
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
30
- };
31
- export const se_CreateAccessPolicyCommand = async (input, context) => {
32
- const headers = sharedHeaders("CreateAccessPolicy");
33
- let body;
34
- body = JSON.stringify(se_CreateAccessPolicyRequest(input, context));
35
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
- };
37
- export const se_CreateCollectionCommand = async (input, context) => {
38
- const headers = sharedHeaders("CreateCollection");
39
- let body;
40
- body = JSON.stringify(se_CreateCollectionRequest(input, context));
41
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
- };
43
- export const se_CreateIndexCommand = async (input, context) => {
44
- const headers = sharedHeaders("CreateIndex");
45
- let body;
46
- body = JSON.stringify(se_CreateIndexRequest(input, context));
47
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
- };
49
- export const se_CreateLifecyclePolicyCommand = async (input, context) => {
50
- const headers = sharedHeaders("CreateLifecyclePolicy");
51
- let body;
52
- body = JSON.stringify(se_CreateLifecyclePolicyRequest(input, context));
53
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
54
- };
55
- export const se_CreateSecurityConfigCommand = async (input, context) => {
56
- const headers = sharedHeaders("CreateSecurityConfig");
57
- let body;
58
- body = JSON.stringify(se_CreateSecurityConfigRequest(input, context));
59
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
60
- };
61
- export const se_CreateSecurityPolicyCommand = async (input, context) => {
62
- const headers = sharedHeaders("CreateSecurityPolicy");
63
- let body;
64
- body = JSON.stringify(se_CreateSecurityPolicyRequest(input, context));
65
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
66
- };
67
- export const se_CreateVpcEndpointCommand = async (input, context) => {
68
- const headers = sharedHeaders("CreateVpcEndpoint");
69
- let body;
70
- body = JSON.stringify(se_CreateVpcEndpointRequest(input, context));
71
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
72
- };
73
- export const se_DeleteAccessPolicyCommand = async (input, context) => {
74
- const headers = sharedHeaders("DeleteAccessPolicy");
75
- let body;
76
- body = JSON.stringify(se_DeleteAccessPolicyRequest(input, context));
77
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
- };
79
- export const se_DeleteCollectionCommand = async (input, context) => {
80
- const headers = sharedHeaders("DeleteCollection");
81
- let body;
82
- body = JSON.stringify(se_DeleteCollectionRequest(input, context));
83
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
- };
85
- export const se_DeleteIndexCommand = async (input, context) => {
86
- const headers = sharedHeaders("DeleteIndex");
87
- let body;
88
- body = JSON.stringify(_json(input));
89
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
90
- };
91
- export const se_DeleteLifecyclePolicyCommand = async (input, context) => {
92
- const headers = sharedHeaders("DeleteLifecyclePolicy");
93
- let body;
94
- body = JSON.stringify(se_DeleteLifecyclePolicyRequest(input, context));
95
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
96
- };
97
- export const se_DeleteSecurityConfigCommand = async (input, context) => {
98
- const headers = sharedHeaders("DeleteSecurityConfig");
99
- let body;
100
- body = JSON.stringify(se_DeleteSecurityConfigRequest(input, context));
101
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
102
- };
103
- export const se_DeleteSecurityPolicyCommand = async (input, context) => {
104
- const headers = sharedHeaders("DeleteSecurityPolicy");
105
- let body;
106
- body = JSON.stringify(se_DeleteSecurityPolicyRequest(input, context));
107
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
108
- };
109
- export const se_DeleteVpcEndpointCommand = async (input, context) => {
110
- const headers = sharedHeaders("DeleteVpcEndpoint");
111
- let body;
112
- body = JSON.stringify(se_DeleteVpcEndpointRequest(input, context));
113
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
114
- };
115
- export const se_GetAccessPolicyCommand = async (input, context) => {
116
- const headers = sharedHeaders("GetAccessPolicy");
117
- let body;
118
- body = JSON.stringify(_json(input));
119
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
120
- };
121
- export const se_GetAccountSettingsCommand = async (input, context) => {
122
- const headers = sharedHeaders("GetAccountSettings");
123
- let body;
124
- body = JSON.stringify(_json(input));
125
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
- };
127
- export const se_GetIndexCommand = async (input, context) => {
128
- const headers = sharedHeaders("GetIndex");
129
- let body;
130
- body = JSON.stringify(_json(input));
131
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
132
- };
133
- export const se_GetPoliciesStatsCommand = async (input, context) => {
134
- const headers = sharedHeaders("GetPoliciesStats");
135
- let body;
136
- body = JSON.stringify(_json(input));
137
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
138
- };
139
- export const se_GetSecurityConfigCommand = async (input, context) => {
140
- const headers = sharedHeaders("GetSecurityConfig");
141
- let body;
142
- body = JSON.stringify(_json(input));
143
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
144
- };
145
- export const se_GetSecurityPolicyCommand = async (input, context) => {
146
- const headers = sharedHeaders("GetSecurityPolicy");
147
- let body;
148
- body = JSON.stringify(_json(input));
149
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
150
- };
151
- export const se_ListAccessPoliciesCommand = async (input, context) => {
152
- const headers = sharedHeaders("ListAccessPolicies");
153
- let body;
154
- body = JSON.stringify(_json(input));
155
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
156
- };
157
- export const se_ListCollectionsCommand = async (input, context) => {
158
- const headers = sharedHeaders("ListCollections");
159
- let body;
160
- body = JSON.stringify(_json(input));
161
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
162
- };
163
- export const se_ListLifecyclePoliciesCommand = async (input, context) => {
164
- const headers = sharedHeaders("ListLifecyclePolicies");
165
- let body;
166
- body = JSON.stringify(_json(input));
167
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
- };
169
- export const se_ListSecurityConfigsCommand = async (input, context) => {
170
- const headers = sharedHeaders("ListSecurityConfigs");
171
- let body;
172
- body = JSON.stringify(_json(input));
173
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
174
- };
175
- export const se_ListSecurityPoliciesCommand = async (input, context) => {
176
- const headers = sharedHeaders("ListSecurityPolicies");
177
- let body;
178
- body = JSON.stringify(_json(input));
179
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
180
- };
181
- export const se_ListTagsForResourceCommand = async (input, context) => {
182
- const headers = sharedHeaders("ListTagsForResource");
183
- let body;
184
- body = JSON.stringify(_json(input));
185
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
186
- };
187
- export const se_ListVpcEndpointsCommand = async (input, context) => {
188
- const headers = sharedHeaders("ListVpcEndpoints");
189
- let body;
190
- body = JSON.stringify(_json(input));
191
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
192
- };
193
- export const se_TagResourceCommand = async (input, context) => {
194
- const headers = sharedHeaders("TagResource");
195
- let body;
196
- body = JSON.stringify(_json(input));
197
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
198
- };
199
- export const se_UntagResourceCommand = async (input, context) => {
200
- const headers = sharedHeaders("UntagResource");
201
- let body;
202
- body = JSON.stringify(_json(input));
203
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
204
- };
205
- export const se_UpdateAccessPolicyCommand = async (input, context) => {
206
- const headers = sharedHeaders("UpdateAccessPolicy");
207
- let body;
208
- body = JSON.stringify(se_UpdateAccessPolicyRequest(input, context));
209
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
- };
211
- export const se_UpdateAccountSettingsCommand = async (input, context) => {
212
- const headers = sharedHeaders("UpdateAccountSettings");
213
- let body;
214
- body = JSON.stringify(_json(input));
215
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
216
- };
217
- export const se_UpdateCollectionCommand = async (input, context) => {
218
- const headers = sharedHeaders("UpdateCollection");
219
- let body;
220
- body = JSON.stringify(se_UpdateCollectionRequest(input, context));
221
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
222
- };
223
- export const se_UpdateIndexCommand = async (input, context) => {
224
- const headers = sharedHeaders("UpdateIndex");
225
- let body;
226
- body = JSON.stringify(se_UpdateIndexRequest(input, context));
227
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
228
- };
229
- export const se_UpdateLifecyclePolicyCommand = async (input, context) => {
230
- const headers = sharedHeaders("UpdateLifecyclePolicy");
231
- let body;
232
- body = JSON.stringify(se_UpdateLifecyclePolicyRequest(input, context));
233
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
234
- };
235
- export const se_UpdateSecurityConfigCommand = async (input, context) => {
236
- const headers = sharedHeaders("UpdateSecurityConfig");
237
- let body;
238
- body = JSON.stringify(se_UpdateSecurityConfigRequest(input, context));
239
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
240
- };
241
- export const se_UpdateSecurityPolicyCommand = async (input, context) => {
242
- const headers = sharedHeaders("UpdateSecurityPolicy");
243
- let body;
244
- body = JSON.stringify(se_UpdateSecurityPolicyRequest(input, context));
245
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
246
- };
247
- export const se_UpdateVpcEndpointCommand = async (input, context) => {
248
- const headers = sharedHeaders("UpdateVpcEndpoint");
249
- let body;
250
- body = JSON.stringify(se_UpdateVpcEndpointRequest(input, context));
251
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
252
- };
253
- export const de_BatchGetCollectionCommand = async (output, context) => {
254
- if (output.statusCode >= 300) {
255
- return de_CommandError(output, context);
256
- }
257
- const data = await parseBody(output.body, context);
258
- let contents = {};
259
- contents = _json(data);
260
- const response = {
261
- $metadata: deserializeMetadata(output),
262
- ...contents,
263
- };
264
- return response;
265
- };
266
- export const de_BatchGetEffectiveLifecyclePolicyCommand = async (output, context) => {
267
- if (output.statusCode >= 300) {
268
- return de_CommandError(output, context);
269
- }
270
- const data = await parseBody(output.body, context);
271
- let contents = {};
272
- contents = _json(data);
273
- const response = {
274
- $metadata: deserializeMetadata(output),
275
- ...contents,
276
- };
277
- return response;
278
- };
279
- export const de_BatchGetLifecyclePolicyCommand = async (output, context) => {
280
- if (output.statusCode >= 300) {
281
- return de_CommandError(output, context);
282
- }
283
- const data = await parseBody(output.body, context);
284
- let contents = {};
285
- contents = de_BatchGetLifecyclePolicyResponse(data, context);
286
- const response = {
287
- $metadata: deserializeMetadata(output),
288
- ...contents,
289
- };
290
- return response;
291
- };
292
- export const de_BatchGetVpcEndpointCommand = async (output, context) => {
293
- if (output.statusCode >= 300) {
294
- return de_CommandError(output, context);
295
- }
296
- const data = await parseBody(output.body, context);
297
- let contents = {};
298
- contents = _json(data);
299
- const response = {
300
- $metadata: deserializeMetadata(output),
301
- ...contents,
302
- };
303
- return response;
304
- };
305
- export const de_CreateAccessPolicyCommand = async (output, context) => {
306
- if (output.statusCode >= 300) {
307
- return de_CommandError(output, context);
308
- }
309
- const data = await parseBody(output.body, context);
310
- let contents = {};
311
- contents = de_CreateAccessPolicyResponse(data, context);
312
- const response = {
313
- $metadata: deserializeMetadata(output),
314
- ...contents,
315
- };
316
- return response;
317
- };
318
- export const de_CreateCollectionCommand = async (output, context) => {
319
- if (output.statusCode >= 300) {
320
- return de_CommandError(output, context);
321
- }
322
- const data = await parseBody(output.body, context);
323
- let contents = {};
324
- contents = _json(data);
325
- const response = {
326
- $metadata: deserializeMetadata(output),
327
- ...contents,
328
- };
329
- return response;
330
- };
331
- export const de_CreateIndexCommand = async (output, context) => {
332
- if (output.statusCode >= 300) {
333
- return de_CommandError(output, context);
334
- }
335
- const data = await parseBody(output.body, context);
336
- let contents = {};
337
- contents = _json(data);
338
- const response = {
339
- $metadata: deserializeMetadata(output),
340
- ...contents,
341
- };
342
- return response;
343
- };
344
- export const de_CreateLifecyclePolicyCommand = async (output, context) => {
345
- if (output.statusCode >= 300) {
346
- return de_CommandError(output, context);
347
- }
348
- const data = await parseBody(output.body, context);
349
- let contents = {};
350
- contents = de_CreateLifecyclePolicyResponse(data, context);
351
- const response = {
352
- $metadata: deserializeMetadata(output),
353
- ...contents,
354
- };
355
- return response;
356
- };
357
- export const de_CreateSecurityConfigCommand = async (output, context) => {
358
- if (output.statusCode >= 300) {
359
- return de_CommandError(output, context);
360
- }
361
- const data = await parseBody(output.body, context);
362
- let contents = {};
363
- contents = _json(data);
364
- const response = {
365
- $metadata: deserializeMetadata(output),
366
- ...contents,
367
- };
368
- return response;
369
- };
370
- export const de_CreateSecurityPolicyCommand = async (output, context) => {
371
- if (output.statusCode >= 300) {
372
- return de_CommandError(output, context);
373
- }
374
- const data = await parseBody(output.body, context);
375
- let contents = {};
376
- contents = de_CreateSecurityPolicyResponse(data, context);
377
- const response = {
378
- $metadata: deserializeMetadata(output),
379
- ...contents,
380
- };
381
- return response;
382
- };
383
- export const de_CreateVpcEndpointCommand = async (output, context) => {
384
- if (output.statusCode >= 300) {
385
- return de_CommandError(output, context);
386
- }
387
- const data = await parseBody(output.body, context);
388
- let contents = {};
389
- contents = _json(data);
390
- const response = {
391
- $metadata: deserializeMetadata(output),
392
- ...contents,
393
- };
394
- return response;
395
- };
396
- export const de_DeleteAccessPolicyCommand = async (output, context) => {
397
- if (output.statusCode >= 300) {
398
- return de_CommandError(output, context);
399
- }
400
- const data = await parseBody(output.body, context);
401
- let contents = {};
402
- contents = _json(data);
403
- const response = {
404
- $metadata: deserializeMetadata(output),
405
- ...contents,
406
- };
407
- return response;
408
- };
409
- export const de_DeleteCollectionCommand = async (output, context) => {
410
- if (output.statusCode >= 300) {
411
- return de_CommandError(output, context);
412
- }
413
- const data = await parseBody(output.body, context);
414
- let contents = {};
415
- contents = _json(data);
416
- const response = {
417
- $metadata: deserializeMetadata(output),
418
- ...contents,
419
- };
420
- return response;
421
- };
422
- export const de_DeleteIndexCommand = async (output, context) => {
423
- if (output.statusCode >= 300) {
424
- return de_CommandError(output, context);
425
- }
426
- const data = await parseBody(output.body, context);
427
- let contents = {};
428
- contents = _json(data);
429
- const response = {
430
- $metadata: deserializeMetadata(output),
431
- ...contents,
432
- };
433
- return response;
434
- };
435
- export const de_DeleteLifecyclePolicyCommand = async (output, context) => {
436
- if (output.statusCode >= 300) {
437
- return de_CommandError(output, context);
438
- }
439
- const data = await parseBody(output.body, context);
440
- let contents = {};
441
- contents = _json(data);
442
- const response = {
443
- $metadata: deserializeMetadata(output),
444
- ...contents,
445
- };
446
- return response;
447
- };
448
- export const de_DeleteSecurityConfigCommand = async (output, context) => {
449
- if (output.statusCode >= 300) {
450
- return de_CommandError(output, context);
451
- }
452
- const data = await parseBody(output.body, context);
453
- let contents = {};
454
- contents = _json(data);
455
- const response = {
456
- $metadata: deserializeMetadata(output),
457
- ...contents,
458
- };
459
- return response;
460
- };
461
- export const de_DeleteSecurityPolicyCommand = async (output, context) => {
462
- if (output.statusCode >= 300) {
463
- return de_CommandError(output, context);
464
- }
465
- const data = await parseBody(output.body, context);
466
- let contents = {};
467
- contents = _json(data);
468
- const response = {
469
- $metadata: deserializeMetadata(output),
470
- ...contents,
471
- };
472
- return response;
473
- };
474
- export const de_DeleteVpcEndpointCommand = async (output, context) => {
475
- if (output.statusCode >= 300) {
476
- return de_CommandError(output, context);
477
- }
478
- const data = await parseBody(output.body, context);
479
- let contents = {};
480
- contents = _json(data);
481
- const response = {
482
- $metadata: deserializeMetadata(output),
483
- ...contents,
484
- };
485
- return response;
486
- };
487
- export const de_GetAccessPolicyCommand = async (output, context) => {
488
- if (output.statusCode >= 300) {
489
- return de_CommandError(output, context);
490
- }
491
- const data = await parseBody(output.body, context);
492
- let contents = {};
493
- contents = de_GetAccessPolicyResponse(data, context);
494
- const response = {
495
- $metadata: deserializeMetadata(output),
496
- ...contents,
497
- };
498
- return response;
499
- };
500
- export const de_GetAccountSettingsCommand = async (output, context) => {
501
- if (output.statusCode >= 300) {
502
- return de_CommandError(output, context);
503
- }
504
- const data = await parseBody(output.body, context);
505
- let contents = {};
506
- contents = _json(data);
507
- const response = {
508
- $metadata: deserializeMetadata(output),
509
- ...contents,
510
- };
511
- return response;
512
- };
513
- export const de_GetIndexCommand = async (output, context) => {
514
- if (output.statusCode >= 300) {
515
- return de_CommandError(output, context);
516
- }
517
- const data = await parseBody(output.body, context);
518
- let contents = {};
519
- contents = de_GetIndexResponse(data, context);
520
- const response = {
521
- $metadata: deserializeMetadata(output),
522
- ...contents,
523
- };
524
- return response;
525
- };
526
- export const de_GetPoliciesStatsCommand = async (output, context) => {
527
- if (output.statusCode >= 300) {
528
- return de_CommandError(output, context);
529
- }
530
- const data = await parseBody(output.body, context);
531
- let contents = {};
532
- contents = _json(data);
533
- const response = {
534
- $metadata: deserializeMetadata(output),
535
- ...contents,
536
- };
537
- return response;
538
- };
539
- export const de_GetSecurityConfigCommand = async (output, context) => {
540
- if (output.statusCode >= 300) {
541
- return de_CommandError(output, context);
542
- }
543
- const data = await parseBody(output.body, context);
544
- let contents = {};
545
- contents = _json(data);
546
- const response = {
547
- $metadata: deserializeMetadata(output),
548
- ...contents,
549
- };
550
- return response;
551
- };
552
- export const de_GetSecurityPolicyCommand = async (output, context) => {
553
- if (output.statusCode >= 300) {
554
- return de_CommandError(output, context);
555
- }
556
- const data = await parseBody(output.body, context);
557
- let contents = {};
558
- contents = de_GetSecurityPolicyResponse(data, context);
559
- const response = {
560
- $metadata: deserializeMetadata(output),
561
- ...contents,
562
- };
563
- return response;
564
- };
565
- export const de_ListAccessPoliciesCommand = async (output, context) => {
566
- if (output.statusCode >= 300) {
567
- return de_CommandError(output, context);
568
- }
569
- const data = await parseBody(output.body, context);
570
- let contents = {};
571
- contents = _json(data);
572
- const response = {
573
- $metadata: deserializeMetadata(output),
574
- ...contents,
575
- };
576
- return response;
577
- };
578
- export const de_ListCollectionsCommand = async (output, context) => {
579
- if (output.statusCode >= 300) {
580
- return de_CommandError(output, context);
581
- }
582
- const data = await parseBody(output.body, context);
583
- let contents = {};
584
- contents = _json(data);
585
- const response = {
586
- $metadata: deserializeMetadata(output),
587
- ...contents,
588
- };
589
- return response;
590
- };
591
- export const de_ListLifecyclePoliciesCommand = async (output, context) => {
592
- if (output.statusCode >= 300) {
593
- return de_CommandError(output, context);
594
- }
595
- const data = await parseBody(output.body, context);
596
- let contents = {};
597
- contents = _json(data);
598
- const response = {
599
- $metadata: deserializeMetadata(output),
600
- ...contents,
601
- };
602
- return response;
603
- };
604
- export const de_ListSecurityConfigsCommand = async (output, context) => {
605
- if (output.statusCode >= 300) {
606
- return de_CommandError(output, context);
607
- }
608
- const data = await parseBody(output.body, context);
609
- let contents = {};
610
- contents = _json(data);
611
- const response = {
612
- $metadata: deserializeMetadata(output),
613
- ...contents,
614
- };
615
- return response;
616
- };
617
- export const de_ListSecurityPoliciesCommand = async (output, context) => {
618
- if (output.statusCode >= 300) {
619
- return de_CommandError(output, context);
620
- }
621
- const data = await parseBody(output.body, context);
622
- let contents = {};
623
- contents = _json(data);
624
- const response = {
625
- $metadata: deserializeMetadata(output),
626
- ...contents,
627
- };
628
- return response;
629
- };
630
- export const de_ListTagsForResourceCommand = async (output, context) => {
631
- if (output.statusCode >= 300) {
632
- return de_CommandError(output, context);
633
- }
634
- const data = await parseBody(output.body, context);
635
- let contents = {};
636
- contents = _json(data);
637
- const response = {
638
- $metadata: deserializeMetadata(output),
639
- ...contents,
640
- };
641
- return response;
642
- };
643
- export const de_ListVpcEndpointsCommand = async (output, context) => {
644
- if (output.statusCode >= 300) {
645
- return de_CommandError(output, context);
646
- }
647
- const data = await parseBody(output.body, context);
648
- let contents = {};
649
- contents = _json(data);
650
- const response = {
651
- $metadata: deserializeMetadata(output),
652
- ...contents,
653
- };
654
- return response;
655
- };
656
- export const de_TagResourceCommand = async (output, context) => {
657
- if (output.statusCode >= 300) {
658
- return de_CommandError(output, context);
659
- }
660
- const data = await parseBody(output.body, context);
661
- let contents = {};
662
- contents = _json(data);
663
- const response = {
664
- $metadata: deserializeMetadata(output),
665
- ...contents,
666
- };
667
- return response;
668
- };
669
- export const de_UntagResourceCommand = async (output, context) => {
670
- if (output.statusCode >= 300) {
671
- return de_CommandError(output, context);
672
- }
673
- const data = await parseBody(output.body, context);
674
- let contents = {};
675
- contents = _json(data);
676
- const response = {
677
- $metadata: deserializeMetadata(output),
678
- ...contents,
679
- };
680
- return response;
681
- };
682
- export const de_UpdateAccessPolicyCommand = async (output, context) => {
683
- if (output.statusCode >= 300) {
684
- return de_CommandError(output, context);
685
- }
686
- const data = await parseBody(output.body, context);
687
- let contents = {};
688
- contents = de_UpdateAccessPolicyResponse(data, context);
689
- const response = {
690
- $metadata: deserializeMetadata(output),
691
- ...contents,
692
- };
693
- return response;
694
- };
695
- export const de_UpdateAccountSettingsCommand = async (output, context) => {
696
- if (output.statusCode >= 300) {
697
- return de_CommandError(output, context);
698
- }
699
- const data = await parseBody(output.body, context);
700
- let contents = {};
701
- contents = _json(data);
702
- const response = {
703
- $metadata: deserializeMetadata(output),
704
- ...contents,
705
- };
706
- return response;
707
- };
708
- export const de_UpdateCollectionCommand = async (output, context) => {
709
- if (output.statusCode >= 300) {
710
- return de_CommandError(output, context);
711
- }
712
- const data = await parseBody(output.body, context);
713
- let contents = {};
714
- contents = _json(data);
715
- const response = {
716
- $metadata: deserializeMetadata(output),
717
- ...contents,
718
- };
719
- return response;
720
- };
721
- export const de_UpdateIndexCommand = async (output, context) => {
722
- if (output.statusCode >= 300) {
723
- return de_CommandError(output, context);
724
- }
725
- const data = await parseBody(output.body, context);
726
- let contents = {};
727
- contents = _json(data);
728
- const response = {
729
- $metadata: deserializeMetadata(output),
730
- ...contents,
731
- };
732
- return response;
733
- };
734
- export const de_UpdateLifecyclePolicyCommand = async (output, context) => {
735
- if (output.statusCode >= 300) {
736
- return de_CommandError(output, context);
737
- }
738
- const data = await parseBody(output.body, context);
739
- let contents = {};
740
- contents = de_UpdateLifecyclePolicyResponse(data, context);
741
- const response = {
742
- $metadata: deserializeMetadata(output),
743
- ...contents,
744
- };
745
- return response;
746
- };
747
- export const de_UpdateSecurityConfigCommand = async (output, context) => {
748
- if (output.statusCode >= 300) {
749
- return de_CommandError(output, context);
750
- }
751
- const data = await parseBody(output.body, context);
752
- let contents = {};
753
- contents = _json(data);
754
- const response = {
755
- $metadata: deserializeMetadata(output),
756
- ...contents,
757
- };
758
- return response;
759
- };
760
- export const de_UpdateSecurityPolicyCommand = async (output, context) => {
761
- if (output.statusCode >= 300) {
762
- return de_CommandError(output, context);
763
- }
764
- const data = await parseBody(output.body, context);
765
- let contents = {};
766
- contents = de_UpdateSecurityPolicyResponse(data, context);
767
- const response = {
768
- $metadata: deserializeMetadata(output),
769
- ...contents,
770
- };
771
- return response;
772
- };
773
- export const de_UpdateVpcEndpointCommand = async (output, context) => {
774
- if (output.statusCode >= 300) {
775
- return de_CommandError(output, context);
776
- }
777
- const data = await parseBody(output.body, context);
778
- let contents = {};
779
- contents = _json(data);
780
- const response = {
781
- $metadata: deserializeMetadata(output),
782
- ...contents,
783
- };
784
- return response;
785
- };
786
- const de_CommandError = async (output, context) => {
787
- const parsedOutput = {
788
- ...output,
789
- body: await parseErrorBody(output.body, context),
790
- };
791
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
792
- switch (errorCode) {
793
- case "InternalServerException":
794
- case "com.amazonaws.opensearchserverless#InternalServerException":
795
- throw await de_InternalServerExceptionRes(parsedOutput, context);
796
- case "ValidationException":
797
- case "com.amazonaws.opensearchserverless#ValidationException":
798
- throw await de_ValidationExceptionRes(parsedOutput, context);
799
- case "ConflictException":
800
- case "com.amazonaws.opensearchserverless#ConflictException":
801
- throw await de_ConflictExceptionRes(parsedOutput, context);
802
- case "ServiceQuotaExceededException":
803
- case "com.amazonaws.opensearchserverless#ServiceQuotaExceededException":
804
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
805
- case "OcuLimitExceededException":
806
- case "com.amazonaws.opensearchserverless#OcuLimitExceededException":
807
- throw await de_OcuLimitExceededExceptionRes(parsedOutput, context);
808
- case "ResourceNotFoundException":
809
- case "com.amazonaws.opensearchserverless#ResourceNotFoundException":
810
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
811
- default:
812
- const parsedBody = parsedOutput.body;
813
- return throwDefaultError({
814
- output,
815
- parsedBody,
816
- errorCode,
817
- });
818
- }
819
- };
820
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
821
- const body = parsedOutput.body;
822
- const deserialized = _json(body);
823
- const exception = new ConflictException({
824
- $metadata: deserializeMetadata(parsedOutput),
825
- ...deserialized,
826
- });
827
- return __decorateServiceException(exception, body);
828
- };
829
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
830
- const body = parsedOutput.body;
831
- const deserialized = _json(body);
832
- const exception = new InternalServerException({
833
- $metadata: deserializeMetadata(parsedOutput),
834
- ...deserialized,
835
- });
836
- return __decorateServiceException(exception, body);
837
- };
838
- const de_OcuLimitExceededExceptionRes = async (parsedOutput, context) => {
839
- const body = parsedOutput.body;
840
- const deserialized = _json(body);
841
- const exception = new OcuLimitExceededException({
842
- $metadata: deserializeMetadata(parsedOutput),
843
- ...deserialized,
844
- });
845
- return __decorateServiceException(exception, body);
846
- };
847
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
848
- const body = parsedOutput.body;
849
- const deserialized = _json(body);
850
- const exception = new ResourceNotFoundException({
851
- $metadata: deserializeMetadata(parsedOutput),
852
- ...deserialized,
853
- });
854
- return __decorateServiceException(exception, body);
855
- };
856
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
857
- const body = parsedOutput.body;
858
- const deserialized = _json(body);
859
- const exception = new ServiceQuotaExceededException({
860
- $metadata: deserializeMetadata(parsedOutput),
861
- ...deserialized,
862
- });
863
- return __decorateServiceException(exception, body);
864
- };
865
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
866
- const body = parsedOutput.body;
867
- const deserialized = _json(body);
868
- const exception = new ValidationException({
869
- $metadata: deserializeMetadata(parsedOutput),
870
- ...deserialized,
871
- });
872
- return __decorateServiceException(exception, body);
873
- };
874
- const se_CreateAccessPolicyRequest = (input, context) => {
875
- return take(input, {
876
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
877
- description: [],
878
- name: [],
879
- policy: [],
880
- type: [],
881
- });
882
- };
883
- const se_CreateCollectionRequest = (input, context) => {
884
- return take(input, {
885
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
886
- description: [],
887
- name: [],
888
- standbyReplicas: [],
889
- tags: _json,
890
- type: [],
891
- });
892
- };
893
- const se_CreateIndexRequest = (input, context) => {
894
- return take(input, {
895
- id: [],
896
- indexName: [],
897
- indexSchema: (_) => se_IndexSchema(_, context),
898
- });
899
- };
900
- const se_CreateLifecyclePolicyRequest = (input, context) => {
901
- return take(input, {
902
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
903
- description: [],
904
- name: [],
905
- policy: [],
906
- type: [],
907
- });
908
- };
909
- const se_CreateSecurityConfigRequest = (input, context) => {
910
- return take(input, {
911
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
912
- description: [],
913
- iamFederationOptions: _json,
914
- iamIdentityCenterOptions: _json,
915
- name: [],
916
- samlOptions: _json,
917
- type: [],
918
- });
919
- };
920
- const se_CreateSecurityPolicyRequest = (input, context) => {
921
- return take(input, {
922
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
923
- description: [],
924
- name: [],
925
- policy: [],
926
- type: [],
927
- });
928
- };
929
- const se_CreateVpcEndpointRequest = (input, context) => {
930
- return take(input, {
931
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
932
- name: [],
933
- securityGroupIds: _json,
934
- subnetIds: _json,
935
- vpcId: [],
936
- });
937
- };
938
- const se_DeleteAccessPolicyRequest = (input, context) => {
939
- return take(input, {
940
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
941
- name: [],
942
- type: [],
943
- });
944
- };
945
- const se_DeleteCollectionRequest = (input, context) => {
946
- return take(input, {
947
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
948
- id: [],
949
- });
950
- };
951
- const se_DeleteLifecyclePolicyRequest = (input, context) => {
952
- return take(input, {
953
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
954
- name: [],
955
- type: [],
956
- });
957
- };
958
- const se_DeleteSecurityConfigRequest = (input, context) => {
959
- return take(input, {
960
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
961
- id: [],
962
- });
963
- };
964
- const se_DeleteSecurityPolicyRequest = (input, context) => {
965
- return take(input, {
966
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
967
- name: [],
968
- type: [],
969
- });
970
- };
971
- const se_DeleteVpcEndpointRequest = (input, context) => {
972
- return take(input, {
973
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
974
- id: [],
975
- });
976
- };
977
- const se_IndexSchema = (input, context) => {
978
- return input;
979
- };
980
- const se_UpdateAccessPolicyRequest = (input, context) => {
981
- return take(input, {
982
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
983
- description: [],
984
- name: [],
985
- policy: [],
986
- policyVersion: [],
987
- type: [],
988
- });
989
- };
990
- const se_UpdateCollectionRequest = (input, context) => {
991
- return take(input, {
992
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
993
- description: [],
994
- id: [],
995
- });
996
- };
997
- const se_UpdateIndexRequest = (input, context) => {
998
- return take(input, {
999
- id: [],
1000
- indexName: [],
1001
- indexSchema: (_) => se_IndexSchema(_, context),
1002
- });
1003
- };
1004
- const se_UpdateLifecyclePolicyRequest = (input, context) => {
1005
- return take(input, {
1006
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
1007
- description: [],
1008
- name: [],
1009
- policy: [],
1010
- policyVersion: [],
1011
- type: [],
1012
- });
1013
- };
1014
- const se_UpdateSecurityConfigRequest = (input, context) => {
1015
- return take(input, {
1016
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
1017
- configVersion: [],
1018
- description: [],
1019
- iamFederationOptions: _json,
1020
- iamIdentityCenterOptionsUpdates: _json,
1021
- id: [],
1022
- samlOptions: _json,
1023
- });
1024
- };
1025
- const se_UpdateSecurityPolicyRequest = (input, context) => {
1026
- return take(input, {
1027
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
1028
- description: [],
1029
- name: [],
1030
- policy: [],
1031
- policyVersion: [],
1032
- type: [],
1033
- });
1034
- };
1035
- const se_UpdateVpcEndpointRequest = (input, context) => {
1036
- return take(input, {
1037
- addSecurityGroupIds: _json,
1038
- addSubnetIds: _json,
1039
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
1040
- id: [],
1041
- removeSecurityGroupIds: _json,
1042
- removeSubnetIds: _json,
1043
- });
1044
- };
1045
- const de_AccessPolicyDetail = (output, context) => {
1046
- return take(output, {
1047
- createdDate: __expectLong,
1048
- description: __expectString,
1049
- lastModifiedDate: __expectLong,
1050
- name: __expectString,
1051
- policy: (_) => de_Document(_, context),
1052
- policyVersion: __expectString,
1053
- type: __expectString,
1054
- });
1055
- };
1056
- const de_BatchGetLifecyclePolicyResponse = (output, context) => {
1057
- return take(output, {
1058
- lifecyclePolicyDetails: (_) => de_LifecyclePolicyDetails(_, context),
1059
- lifecyclePolicyErrorDetails: _json,
1060
- });
1061
- };
1062
- const de_CreateAccessPolicyResponse = (output, context) => {
1063
- return take(output, {
1064
- accessPolicyDetail: (_) => de_AccessPolicyDetail(_, context),
1065
- });
1066
- };
1067
- const de_CreateLifecyclePolicyResponse = (output, context) => {
1068
- return take(output, {
1069
- lifecyclePolicyDetail: (_) => de_LifecyclePolicyDetail(_, context),
1070
- });
1071
- };
1072
- const de_CreateSecurityPolicyResponse = (output, context) => {
1073
- return take(output, {
1074
- securityPolicyDetail: (_) => de_SecurityPolicyDetail(_, context),
1075
- });
1076
- };
1077
- const de_GetAccessPolicyResponse = (output, context) => {
1078
- return take(output, {
1079
- accessPolicyDetail: (_) => de_AccessPolicyDetail(_, context),
1080
- });
1081
- };
1082
- const de_GetIndexResponse = (output, context) => {
1083
- return take(output, {
1084
- indexSchema: (_) => de_IndexSchema(_, context),
1085
- });
1086
- };
1087
- const de_GetSecurityPolicyResponse = (output, context) => {
1088
- return take(output, {
1089
- securityPolicyDetail: (_) => de_SecurityPolicyDetail(_, context),
1090
- });
1091
- };
1092
- const de_IndexSchema = (output, context) => {
1093
- return output;
1094
- };
1095
- const de_LifecyclePolicyDetail = (output, context) => {
1096
- return take(output, {
1097
- createdDate: __expectLong,
1098
- description: __expectString,
1099
- lastModifiedDate: __expectLong,
1100
- name: __expectString,
1101
- policy: (_) => de_Document(_, context),
1102
- policyVersion: __expectString,
1103
- type: __expectString,
1104
- });
1105
- };
1106
- const de_LifecyclePolicyDetails = (output, context) => {
1107
- const retVal = (output || [])
1108
- .filter((e) => e != null)
1109
- .map((entry) => {
1110
- return de_LifecyclePolicyDetail(entry, context);
1111
- });
1112
- return retVal;
1113
- };
1114
- const de_SecurityPolicyDetail = (output, context) => {
1115
- return take(output, {
1116
- createdDate: __expectLong,
1117
- description: __expectString,
1118
- lastModifiedDate: __expectLong,
1119
- name: __expectString,
1120
- policy: (_) => de_Document(_, context),
1121
- policyVersion: __expectString,
1122
- type: __expectString,
1123
- });
1124
- };
1125
- const de_UpdateAccessPolicyResponse = (output, context) => {
1126
- return take(output, {
1127
- accessPolicyDetail: (_) => de_AccessPolicyDetail(_, context),
1128
- });
1129
- };
1130
- const de_UpdateLifecyclePolicyResponse = (output, context) => {
1131
- return take(output, {
1132
- lifecyclePolicyDetail: (_) => de_LifecyclePolicyDetail(_, context),
1133
- });
1134
- };
1135
- const de_UpdateSecurityPolicyResponse = (output, context) => {
1136
- return take(output, {
1137
- securityPolicyDetail: (_) => de_SecurityPolicyDetail(_, context),
1138
- });
1139
- };
1140
- const de_Document = (output, context) => {
1141
- return output;
1142
- };
1143
- const deserializeMetadata = (output) => ({
1144
- httpStatusCode: output.statusCode,
1145
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1146
- extendedRequestId: output.headers["x-amz-id-2"],
1147
- cfId: output.headers["x-amz-cf-id"],
1148
- });
1149
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1150
- const throwDefaultError = withBaseException(__BaseException);
1151
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1152
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1153
- const contents = {
1154
- protocol,
1155
- hostname,
1156
- port,
1157
- method: "POST",
1158
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1159
- headers,
1160
- };
1161
- if (resolvedHostname !== undefined) {
1162
- contents.hostname = resolvedHostname;
1163
- }
1164
- if (body !== undefined) {
1165
- contents.body = body;
1166
- }
1167
- return new __HttpRequest(contents);
1168
- };
1169
- function sharedHeaders(operation) {
1170
- return {
1171
- "content-type": "application/x-amz-json-1.0",
1172
- "x-amz-target": `OpenSearchServerless.${operation}`,
1173
- };
1174
- }