@effect-aws/client-opensearch-serverless 1.1.0 → 1.9.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 (69) hide show
  1. package/Errors/package.json +6 -0
  2. package/LICENSE +1 -1
  3. package/OpenSearchServerlessClientInstance/package.json +6 -0
  4. package/OpenSearchServerlessService/package.json +6 -0
  5. package/OpenSearchServerlessServiceConfig/package.json +6 -0
  6. package/{lib → dist/cjs}/Errors.d.ts +6 -11
  7. package/dist/cjs/Errors.d.ts.map +1 -0
  8. package/dist/cjs/Errors.js +14 -0
  9. package/dist/cjs/Errors.js.map +1 -0
  10. package/dist/cjs/OpenSearchServerlessClientInstance.d.ts +24 -0
  11. package/dist/cjs/OpenSearchServerlessClientInstance.d.ts.map +1 -0
  12. package/dist/cjs/OpenSearchServerlessClientInstance.js +50 -0
  13. package/dist/cjs/OpenSearchServerlessClientInstance.js.map +1 -0
  14. package/{lib → dist/cjs}/OpenSearchServerlessService.d.ts +16 -38
  15. package/dist/cjs/OpenSearchServerlessService.d.ts.map +1 -0
  16. package/dist/cjs/OpenSearchServerlessService.js +93 -0
  17. package/dist/cjs/OpenSearchServerlessService.js.map +1 -0
  18. package/dist/cjs/OpenSearchServerlessServiceConfig.d.ts +25 -0
  19. package/dist/cjs/OpenSearchServerlessServiceConfig.d.ts.map +1 -0
  20. package/dist/cjs/OpenSearchServerlessServiceConfig.js +35 -0
  21. package/dist/cjs/OpenSearchServerlessServiceConfig.js.map +1 -0
  22. package/dist/cjs/index.d.ts +39 -0
  23. package/dist/cjs/index.d.ts.map +1 -0
  24. package/dist/cjs/index.js +56 -0
  25. package/dist/cjs/index.js.map +1 -0
  26. package/dist/dts/Errors.d.ts +13 -0
  27. package/dist/dts/Errors.d.ts.map +1 -0
  28. package/dist/dts/OpenSearchServerlessClientInstance.d.ts +24 -0
  29. package/dist/dts/OpenSearchServerlessClientInstance.d.ts.map +1 -0
  30. package/dist/dts/OpenSearchServerlessService.d.ts +228 -0
  31. package/dist/dts/OpenSearchServerlessService.d.ts.map +1 -0
  32. package/dist/dts/OpenSearchServerlessServiceConfig.d.ts +25 -0
  33. package/dist/dts/OpenSearchServerlessServiceConfig.d.ts.map +1 -0
  34. package/dist/dts/index.d.ts +39 -0
  35. package/dist/dts/index.d.ts.map +1 -0
  36. package/dist/esm/Errors.js +11 -0
  37. package/dist/esm/Errors.js.map +1 -0
  38. package/dist/esm/OpenSearchServerlessClientInstance.js +23 -0
  39. package/dist/esm/OpenSearchServerlessClientInstance.js.map +1 -0
  40. package/dist/esm/OpenSearchServerlessService.js +66 -0
  41. package/dist/esm/OpenSearchServerlessService.js.map +1 -0
  42. package/dist/esm/OpenSearchServerlessServiceConfig.js +31 -0
  43. package/dist/esm/OpenSearchServerlessServiceConfig.js.map +1 -0
  44. package/dist/esm/index.js +27 -0
  45. package/dist/esm/index.js.map +1 -0
  46. package/dist/esm/package.json +4 -0
  47. package/package.json +60 -43
  48. package/src/Errors.ts +29 -0
  49. package/src/OpenSearchServerlessClientInstance.ts +33 -0
  50. package/src/OpenSearchServerlessService.ts +636 -0
  51. package/src/OpenSearchServerlessServiceConfig.ts +54 -0
  52. package/src/index.ts +44 -0
  53. package/CHANGELOG.md +0 -19
  54. package/docgen.json +0 -8
  55. package/lib/Errors.js +0 -14
  56. package/lib/OpenSearchServerlessClientInstance.d.ts +0 -31
  57. package/lib/OpenSearchServerlessClientInstance.js +0 -57
  58. package/lib/OpenSearchServerlessClientInstanceConfig.d.ts +0 -23
  59. package/lib/OpenSearchServerlessClientInstanceConfig.js +0 -44
  60. package/lib/OpenSearchServerlessService.js +0 -125
  61. package/lib/esm/Errors.js +0 -11
  62. package/lib/esm/OpenSearchServerlessClientInstance.js +0 -30
  63. package/lib/esm/OpenSearchServerlessClientInstanceConfig.js +0 -40
  64. package/lib/esm/OpenSearchServerlessService.js +0 -121
  65. package/lib/esm/index.js +0 -5
  66. package/lib/index.d.ts +0 -4
  67. package/lib/index.js +0 -21
  68. package/project.json +0 -77
  69. package/vitest.config.ts +0 -3
@@ -0,0 +1,636 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import {
5
+ BatchGetCollectionCommand,
6
+ type BatchGetCollectionCommandInput,
7
+ type BatchGetCollectionCommandOutput,
8
+ BatchGetEffectiveLifecyclePolicyCommand,
9
+ type BatchGetEffectiveLifecyclePolicyCommandInput,
10
+ type BatchGetEffectiveLifecyclePolicyCommandOutput,
11
+ BatchGetLifecyclePolicyCommand,
12
+ type BatchGetLifecyclePolicyCommandInput,
13
+ type BatchGetLifecyclePolicyCommandOutput,
14
+ BatchGetVpcEndpointCommand,
15
+ type BatchGetVpcEndpointCommandInput,
16
+ type BatchGetVpcEndpointCommandOutput,
17
+ CreateAccessPolicyCommand,
18
+ type CreateAccessPolicyCommandInput,
19
+ type CreateAccessPolicyCommandOutput,
20
+ CreateCollectionCommand,
21
+ type CreateCollectionCommandInput,
22
+ type CreateCollectionCommandOutput,
23
+ CreateLifecyclePolicyCommand,
24
+ type CreateLifecyclePolicyCommandInput,
25
+ type CreateLifecyclePolicyCommandOutput,
26
+ CreateSecurityConfigCommand,
27
+ type CreateSecurityConfigCommandInput,
28
+ type CreateSecurityConfigCommandOutput,
29
+ CreateSecurityPolicyCommand,
30
+ type CreateSecurityPolicyCommandInput,
31
+ type CreateSecurityPolicyCommandOutput,
32
+ CreateVpcEndpointCommand,
33
+ type CreateVpcEndpointCommandInput,
34
+ type CreateVpcEndpointCommandOutput,
35
+ DeleteAccessPolicyCommand,
36
+ type DeleteAccessPolicyCommandInput,
37
+ type DeleteAccessPolicyCommandOutput,
38
+ DeleteCollectionCommand,
39
+ type DeleteCollectionCommandInput,
40
+ type DeleteCollectionCommandOutput,
41
+ DeleteLifecyclePolicyCommand,
42
+ type DeleteLifecyclePolicyCommandInput,
43
+ type DeleteLifecyclePolicyCommandOutput,
44
+ DeleteSecurityConfigCommand,
45
+ type DeleteSecurityConfigCommandInput,
46
+ type DeleteSecurityConfigCommandOutput,
47
+ DeleteSecurityPolicyCommand,
48
+ type DeleteSecurityPolicyCommandInput,
49
+ type DeleteSecurityPolicyCommandOutput,
50
+ DeleteVpcEndpointCommand,
51
+ type DeleteVpcEndpointCommandInput,
52
+ type DeleteVpcEndpointCommandOutput,
53
+ GetAccessPolicyCommand,
54
+ type GetAccessPolicyCommandInput,
55
+ type GetAccessPolicyCommandOutput,
56
+ GetAccountSettingsCommand,
57
+ type GetAccountSettingsCommandInput,
58
+ type GetAccountSettingsCommandOutput,
59
+ GetPoliciesStatsCommand,
60
+ type GetPoliciesStatsCommandInput,
61
+ type GetPoliciesStatsCommandOutput,
62
+ GetSecurityConfigCommand,
63
+ type GetSecurityConfigCommandInput,
64
+ type GetSecurityConfigCommandOutput,
65
+ GetSecurityPolicyCommand,
66
+ type GetSecurityPolicyCommandInput,
67
+ type GetSecurityPolicyCommandOutput,
68
+ ListAccessPoliciesCommand,
69
+ type ListAccessPoliciesCommandInput,
70
+ type ListAccessPoliciesCommandOutput,
71
+ ListCollectionsCommand,
72
+ type ListCollectionsCommandInput,
73
+ type ListCollectionsCommandOutput,
74
+ ListLifecyclePoliciesCommand,
75
+ type ListLifecyclePoliciesCommandInput,
76
+ type ListLifecyclePoliciesCommandOutput,
77
+ ListSecurityConfigsCommand,
78
+ type ListSecurityConfigsCommandInput,
79
+ type ListSecurityConfigsCommandOutput,
80
+ ListSecurityPoliciesCommand,
81
+ type ListSecurityPoliciesCommandInput,
82
+ type ListSecurityPoliciesCommandOutput,
83
+ ListTagsForResourceCommand,
84
+ type ListTagsForResourceCommandInput,
85
+ type ListTagsForResourceCommandOutput,
86
+ ListVpcEndpointsCommand,
87
+ type ListVpcEndpointsCommandInput,
88
+ type ListVpcEndpointsCommandOutput,
89
+ type OpenSearchServerlessClient,
90
+ type OpenSearchServerlessClientConfig,
91
+ TagResourceCommand,
92
+ type TagResourceCommandInput,
93
+ type TagResourceCommandOutput,
94
+ UntagResourceCommand,
95
+ type UntagResourceCommandInput,
96
+ type UntagResourceCommandOutput,
97
+ UpdateAccessPolicyCommand,
98
+ type UpdateAccessPolicyCommandInput,
99
+ type UpdateAccessPolicyCommandOutput,
100
+ UpdateAccountSettingsCommand,
101
+ type UpdateAccountSettingsCommandInput,
102
+ type UpdateAccountSettingsCommandOutput,
103
+ UpdateCollectionCommand,
104
+ type UpdateCollectionCommandInput,
105
+ type UpdateCollectionCommandOutput,
106
+ UpdateLifecyclePolicyCommand,
107
+ type UpdateLifecyclePolicyCommandInput,
108
+ type UpdateLifecyclePolicyCommandOutput,
109
+ UpdateSecurityConfigCommand,
110
+ type UpdateSecurityConfigCommandInput,
111
+ type UpdateSecurityConfigCommandOutput,
112
+ UpdateSecurityPolicyCommand,
113
+ type UpdateSecurityPolicyCommandInput,
114
+ type UpdateSecurityPolicyCommandOutput,
115
+ UpdateVpcEndpointCommand,
116
+ type UpdateVpcEndpointCommandInput,
117
+ type UpdateVpcEndpointCommandOutput,
118
+ } from "@aws-sdk/client-opensearchserverless";
119
+ import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons";
120
+ import { Service } from "@effect-aws/commons";
121
+ import { Effect, Layer } from "effect";
122
+ import type {
123
+ ConflictError,
124
+ InternalServerError,
125
+ OcuLimitExceededError,
126
+ ResourceNotFoundError,
127
+ ServiceQuotaExceededError,
128
+ ValidationError,
129
+ } from "./Errors.js";
130
+ import { AllServiceErrors } from "./Errors.js";
131
+ import * as Instance from "./OpenSearchServerlessClientInstance.js";
132
+ import * as OpenSearchServerlessServiceConfig from "./OpenSearchServerlessServiceConfig.js";
133
+
134
+ const commands = {
135
+ BatchGetCollectionCommand,
136
+ BatchGetEffectiveLifecyclePolicyCommand,
137
+ BatchGetLifecyclePolicyCommand,
138
+ BatchGetVpcEndpointCommand,
139
+ CreateAccessPolicyCommand,
140
+ CreateCollectionCommand,
141
+ CreateLifecyclePolicyCommand,
142
+ CreateSecurityConfigCommand,
143
+ CreateSecurityPolicyCommand,
144
+ CreateVpcEndpointCommand,
145
+ DeleteAccessPolicyCommand,
146
+ DeleteCollectionCommand,
147
+ DeleteLifecyclePolicyCommand,
148
+ DeleteSecurityConfigCommand,
149
+ DeleteSecurityPolicyCommand,
150
+ DeleteVpcEndpointCommand,
151
+ GetAccessPolicyCommand,
152
+ GetAccountSettingsCommand,
153
+ GetPoliciesStatsCommand,
154
+ GetSecurityConfigCommand,
155
+ GetSecurityPolicyCommand,
156
+ ListAccessPoliciesCommand,
157
+ ListCollectionsCommand,
158
+ ListLifecyclePoliciesCommand,
159
+ ListSecurityConfigsCommand,
160
+ ListSecurityPoliciesCommand,
161
+ ListTagsForResourceCommand,
162
+ ListVpcEndpointsCommand,
163
+ TagResourceCommand,
164
+ UntagResourceCommand,
165
+ UpdateAccessPolicyCommand,
166
+ UpdateAccountSettingsCommand,
167
+ UpdateCollectionCommand,
168
+ UpdateLifecyclePolicyCommand,
169
+ UpdateSecurityConfigCommand,
170
+ UpdateSecurityPolicyCommand,
171
+ UpdateVpcEndpointCommand,
172
+ };
173
+
174
+ interface OpenSearchServerlessService$ {
175
+ readonly _: unique symbol;
176
+
177
+ /**
178
+ * @see {@link BatchGetCollectionCommand}
179
+ */
180
+ batchGetCollection(
181
+ args: BatchGetCollectionCommandInput,
182
+ options?: HttpHandlerOptions,
183
+ ): Effect.Effect<
184
+ BatchGetCollectionCommandOutput,
185
+ SdkError | InternalServerError | ValidationError
186
+ >;
187
+
188
+ /**
189
+ * @see {@link BatchGetEffectiveLifecyclePolicyCommand}
190
+ */
191
+ batchGetEffectiveLifecyclePolicy(
192
+ args: BatchGetEffectiveLifecyclePolicyCommandInput,
193
+ options?: HttpHandlerOptions,
194
+ ): Effect.Effect<
195
+ BatchGetEffectiveLifecyclePolicyCommandOutput,
196
+ SdkError | InternalServerError | ValidationError
197
+ >;
198
+
199
+ /**
200
+ * @see {@link BatchGetLifecyclePolicyCommand}
201
+ */
202
+ batchGetLifecyclePolicy(
203
+ args: BatchGetLifecyclePolicyCommandInput,
204
+ options?: HttpHandlerOptions,
205
+ ): Effect.Effect<
206
+ BatchGetLifecyclePolicyCommandOutput,
207
+ SdkError | InternalServerError | ValidationError
208
+ >;
209
+
210
+ /**
211
+ * @see {@link BatchGetVpcEndpointCommand}
212
+ */
213
+ batchGetVpcEndpoint(
214
+ args: BatchGetVpcEndpointCommandInput,
215
+ options?: HttpHandlerOptions,
216
+ ): Effect.Effect<
217
+ BatchGetVpcEndpointCommandOutput,
218
+ SdkError | InternalServerError | ValidationError
219
+ >;
220
+
221
+ /**
222
+ * @see {@link CreateAccessPolicyCommand}
223
+ */
224
+ createAccessPolicy(
225
+ args: CreateAccessPolicyCommandInput,
226
+ options?: HttpHandlerOptions,
227
+ ): Effect.Effect<
228
+ CreateAccessPolicyCommandOutput,
229
+ SdkError | ConflictError | InternalServerError | ServiceQuotaExceededError | ValidationError
230
+ >;
231
+
232
+ /**
233
+ * @see {@link CreateCollectionCommand}
234
+ */
235
+ createCollection(
236
+ args: CreateCollectionCommandInput,
237
+ options?: HttpHandlerOptions,
238
+ ): Effect.Effect<
239
+ CreateCollectionCommandOutput,
240
+ SdkError | ConflictError | InternalServerError | OcuLimitExceededError | ServiceQuotaExceededError | ValidationError
241
+ >;
242
+
243
+ /**
244
+ * @see {@link CreateLifecyclePolicyCommand}
245
+ */
246
+ createLifecyclePolicy(
247
+ args: CreateLifecyclePolicyCommandInput,
248
+ options?: HttpHandlerOptions,
249
+ ): Effect.Effect<
250
+ CreateLifecyclePolicyCommandOutput,
251
+ SdkError | ConflictError | InternalServerError | ServiceQuotaExceededError | ValidationError
252
+ >;
253
+
254
+ /**
255
+ * @see {@link CreateSecurityConfigCommand}
256
+ */
257
+ createSecurityConfig(
258
+ args: CreateSecurityConfigCommandInput,
259
+ options?: HttpHandlerOptions,
260
+ ): Effect.Effect<
261
+ CreateSecurityConfigCommandOutput,
262
+ SdkError | ConflictError | InternalServerError | ServiceQuotaExceededError | ValidationError
263
+ >;
264
+
265
+ /**
266
+ * @see {@link CreateSecurityPolicyCommand}
267
+ */
268
+ createSecurityPolicy(
269
+ args: CreateSecurityPolicyCommandInput,
270
+ options?: HttpHandlerOptions,
271
+ ): Effect.Effect<
272
+ CreateSecurityPolicyCommandOutput,
273
+ SdkError | ConflictError | InternalServerError | ServiceQuotaExceededError | ValidationError
274
+ >;
275
+
276
+ /**
277
+ * @see {@link CreateVpcEndpointCommand}
278
+ */
279
+ createVpcEndpoint(
280
+ args: CreateVpcEndpointCommandInput,
281
+ options?: HttpHandlerOptions,
282
+ ): Effect.Effect<
283
+ CreateVpcEndpointCommandOutput,
284
+ SdkError | ConflictError | InternalServerError | ServiceQuotaExceededError | ValidationError
285
+ >;
286
+
287
+ /**
288
+ * @see {@link DeleteAccessPolicyCommand}
289
+ */
290
+ deleteAccessPolicy(
291
+ args: DeleteAccessPolicyCommandInput,
292
+ options?: HttpHandlerOptions,
293
+ ): Effect.Effect<
294
+ DeleteAccessPolicyCommandOutput,
295
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ValidationError
296
+ >;
297
+
298
+ /**
299
+ * @see {@link DeleteCollectionCommand}
300
+ */
301
+ deleteCollection(
302
+ args: DeleteCollectionCommandInput,
303
+ options?: HttpHandlerOptions,
304
+ ): Effect.Effect<
305
+ DeleteCollectionCommandOutput,
306
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ValidationError
307
+ >;
308
+
309
+ /**
310
+ * @see {@link DeleteLifecyclePolicyCommand}
311
+ */
312
+ deleteLifecyclePolicy(
313
+ args: DeleteLifecyclePolicyCommandInput,
314
+ options?: HttpHandlerOptions,
315
+ ): Effect.Effect<
316
+ DeleteLifecyclePolicyCommandOutput,
317
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ValidationError
318
+ >;
319
+
320
+ /**
321
+ * @see {@link DeleteSecurityConfigCommand}
322
+ */
323
+ deleteSecurityConfig(
324
+ args: DeleteSecurityConfigCommandInput,
325
+ options?: HttpHandlerOptions,
326
+ ): Effect.Effect<
327
+ DeleteSecurityConfigCommandOutput,
328
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ValidationError
329
+ >;
330
+
331
+ /**
332
+ * @see {@link DeleteSecurityPolicyCommand}
333
+ */
334
+ deleteSecurityPolicy(
335
+ args: DeleteSecurityPolicyCommandInput,
336
+ options?: HttpHandlerOptions,
337
+ ): Effect.Effect<
338
+ DeleteSecurityPolicyCommandOutput,
339
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ValidationError
340
+ >;
341
+
342
+ /**
343
+ * @see {@link DeleteVpcEndpointCommand}
344
+ */
345
+ deleteVpcEndpoint(
346
+ args: DeleteVpcEndpointCommandInput,
347
+ options?: HttpHandlerOptions,
348
+ ): Effect.Effect<
349
+ DeleteVpcEndpointCommandOutput,
350
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ValidationError
351
+ >;
352
+
353
+ /**
354
+ * @see {@link GetAccessPolicyCommand}
355
+ */
356
+ getAccessPolicy(
357
+ args: GetAccessPolicyCommandInput,
358
+ options?: HttpHandlerOptions,
359
+ ): Effect.Effect<
360
+ GetAccessPolicyCommandOutput,
361
+ SdkError | InternalServerError | ResourceNotFoundError | ValidationError
362
+ >;
363
+
364
+ /**
365
+ * @see {@link GetAccountSettingsCommand}
366
+ */
367
+ getAccountSettings(
368
+ args: GetAccountSettingsCommandInput,
369
+ options?: HttpHandlerOptions,
370
+ ): Effect.Effect<
371
+ GetAccountSettingsCommandOutput,
372
+ SdkError | InternalServerError | ValidationError
373
+ >;
374
+
375
+ /**
376
+ * @see {@link GetPoliciesStatsCommand}
377
+ */
378
+ getPoliciesStats(
379
+ args: GetPoliciesStatsCommandInput,
380
+ options?: HttpHandlerOptions,
381
+ ): Effect.Effect<
382
+ GetPoliciesStatsCommandOutput,
383
+ SdkError | InternalServerError
384
+ >;
385
+
386
+ /**
387
+ * @see {@link GetSecurityConfigCommand}
388
+ */
389
+ getSecurityConfig(
390
+ args: GetSecurityConfigCommandInput,
391
+ options?: HttpHandlerOptions,
392
+ ): Effect.Effect<
393
+ GetSecurityConfigCommandOutput,
394
+ SdkError | InternalServerError | ResourceNotFoundError | ValidationError
395
+ >;
396
+
397
+ /**
398
+ * @see {@link GetSecurityPolicyCommand}
399
+ */
400
+ getSecurityPolicy(
401
+ args: GetSecurityPolicyCommandInput,
402
+ options?: HttpHandlerOptions,
403
+ ): Effect.Effect<
404
+ GetSecurityPolicyCommandOutput,
405
+ SdkError | InternalServerError | ResourceNotFoundError | ValidationError
406
+ >;
407
+
408
+ /**
409
+ * @see {@link ListAccessPoliciesCommand}
410
+ */
411
+ listAccessPolicies(
412
+ args: ListAccessPoliciesCommandInput,
413
+ options?: HttpHandlerOptions,
414
+ ): Effect.Effect<
415
+ ListAccessPoliciesCommandOutput,
416
+ SdkError | InternalServerError | ValidationError
417
+ >;
418
+
419
+ /**
420
+ * @see {@link ListCollectionsCommand}
421
+ */
422
+ listCollections(
423
+ args: ListCollectionsCommandInput,
424
+ options?: HttpHandlerOptions,
425
+ ): Effect.Effect<
426
+ ListCollectionsCommandOutput,
427
+ SdkError | InternalServerError | ValidationError
428
+ >;
429
+
430
+ /**
431
+ * @see {@link ListLifecyclePoliciesCommand}
432
+ */
433
+ listLifecyclePolicies(
434
+ args: ListLifecyclePoliciesCommandInput,
435
+ options?: HttpHandlerOptions,
436
+ ): Effect.Effect<
437
+ ListLifecyclePoliciesCommandOutput,
438
+ SdkError | InternalServerError | ValidationError
439
+ >;
440
+
441
+ /**
442
+ * @see {@link ListSecurityConfigsCommand}
443
+ */
444
+ listSecurityConfigs(
445
+ args: ListSecurityConfigsCommandInput,
446
+ options?: HttpHandlerOptions,
447
+ ): Effect.Effect<
448
+ ListSecurityConfigsCommandOutput,
449
+ SdkError | InternalServerError | ValidationError
450
+ >;
451
+
452
+ /**
453
+ * @see {@link ListSecurityPoliciesCommand}
454
+ */
455
+ listSecurityPolicies(
456
+ args: ListSecurityPoliciesCommandInput,
457
+ options?: HttpHandlerOptions,
458
+ ): Effect.Effect<
459
+ ListSecurityPoliciesCommandOutput,
460
+ SdkError | InternalServerError | ValidationError
461
+ >;
462
+
463
+ /**
464
+ * @see {@link ListTagsForResourceCommand}
465
+ */
466
+ listTagsForResource(
467
+ args: ListTagsForResourceCommandInput,
468
+ options?: HttpHandlerOptions,
469
+ ): Effect.Effect<
470
+ ListTagsForResourceCommandOutput,
471
+ SdkError | InternalServerError | ResourceNotFoundError | ValidationError
472
+ >;
473
+
474
+ /**
475
+ * @see {@link ListVpcEndpointsCommand}
476
+ */
477
+ listVpcEndpoints(
478
+ args: ListVpcEndpointsCommandInput,
479
+ options?: HttpHandlerOptions,
480
+ ): Effect.Effect<
481
+ ListVpcEndpointsCommandOutput,
482
+ SdkError | InternalServerError | ValidationError
483
+ >;
484
+
485
+ /**
486
+ * @see {@link TagResourceCommand}
487
+ */
488
+ tagResource(
489
+ args: TagResourceCommandInput,
490
+ options?: HttpHandlerOptions,
491
+ ): Effect.Effect<
492
+ TagResourceCommandOutput,
493
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ValidationError
494
+ >;
495
+
496
+ /**
497
+ * @see {@link UntagResourceCommand}
498
+ */
499
+ untagResource(
500
+ args: UntagResourceCommandInput,
501
+ options?: HttpHandlerOptions,
502
+ ): Effect.Effect<
503
+ UntagResourceCommandOutput,
504
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ValidationError
505
+ >;
506
+
507
+ /**
508
+ * @see {@link UpdateAccessPolicyCommand}
509
+ */
510
+ updateAccessPolicy(
511
+ args: UpdateAccessPolicyCommandInput,
512
+ options?: HttpHandlerOptions,
513
+ ): Effect.Effect<
514
+ UpdateAccessPolicyCommandOutput,
515
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ValidationError
516
+ >;
517
+
518
+ /**
519
+ * @see {@link UpdateAccountSettingsCommand}
520
+ */
521
+ updateAccountSettings(
522
+ args: UpdateAccountSettingsCommandInput,
523
+ options?: HttpHandlerOptions,
524
+ ): Effect.Effect<
525
+ UpdateAccountSettingsCommandOutput,
526
+ SdkError | InternalServerError | ValidationError
527
+ >;
528
+
529
+ /**
530
+ * @see {@link UpdateCollectionCommand}
531
+ */
532
+ updateCollection(
533
+ args: UpdateCollectionCommandInput,
534
+ options?: HttpHandlerOptions,
535
+ ): Effect.Effect<
536
+ UpdateCollectionCommandOutput,
537
+ SdkError | ConflictError | InternalServerError | ValidationError
538
+ >;
539
+
540
+ /**
541
+ * @see {@link UpdateLifecyclePolicyCommand}
542
+ */
543
+ updateLifecyclePolicy(
544
+ args: UpdateLifecyclePolicyCommandInput,
545
+ options?: HttpHandlerOptions,
546
+ ): Effect.Effect<
547
+ UpdateLifecyclePolicyCommandOutput,
548
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ValidationError
549
+ >;
550
+
551
+ /**
552
+ * @see {@link UpdateSecurityConfigCommand}
553
+ */
554
+ updateSecurityConfig(
555
+ args: UpdateSecurityConfigCommandInput,
556
+ options?: HttpHandlerOptions,
557
+ ): Effect.Effect<
558
+ UpdateSecurityConfigCommandOutput,
559
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ValidationError
560
+ >;
561
+
562
+ /**
563
+ * @see {@link UpdateSecurityPolicyCommand}
564
+ */
565
+ updateSecurityPolicy(
566
+ args: UpdateSecurityPolicyCommandInput,
567
+ options?: HttpHandlerOptions,
568
+ ): Effect.Effect<
569
+ UpdateSecurityPolicyCommandOutput,
570
+ SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ValidationError
571
+ >;
572
+
573
+ /**
574
+ * @see {@link UpdateVpcEndpointCommand}
575
+ */
576
+ updateVpcEndpoint(
577
+ args: UpdateVpcEndpointCommandInput,
578
+ options?: HttpHandlerOptions,
579
+ ): Effect.Effect<
580
+ UpdateVpcEndpointCommandOutput,
581
+ SdkError | ConflictError | InternalServerError | ValidationError
582
+ >;
583
+ }
584
+
585
+ /**
586
+ * @since 1.0.0
587
+ * @category constructors
588
+ */
589
+ export const makeOpenSearchServerlessService = Effect.gen(function*() {
590
+ const client = yield* Instance.OpenSearchServerlessClientInstance;
591
+
592
+ return Service.fromClientAndCommands<OpenSearchServerlessService$>(client, commands, AllServiceErrors);
593
+ });
594
+
595
+ /**
596
+ * @since 1.0.0
597
+ * @category models
598
+ */
599
+ export class OpenSearchServerlessService
600
+ extends Effect.Tag("@effect-aws/client-opensearch-serverless/OpenSearchServerlessService")<
601
+ OpenSearchServerlessService,
602
+ OpenSearchServerlessService$
603
+ >()
604
+ {
605
+ static readonly defaultLayer = Layer.effect(this, makeOpenSearchServerlessService).pipe(
606
+ Layer.provide(Instance.layer),
607
+ );
608
+ static readonly layer = (config: OpenSearchServerlessService.Config) =>
609
+ Layer.effect(this, makeOpenSearchServerlessService).pipe(
610
+ Layer.provide(Instance.layer),
611
+ Layer.provide(OpenSearchServerlessServiceConfig.setOpenSearchServerlessServiceConfig(config)),
612
+ );
613
+ static readonly baseLayer = (
614
+ evaluate: (defaultConfig: OpenSearchServerlessClientConfig) => OpenSearchServerlessClient,
615
+ ) =>
616
+ Layer.effect(this, makeOpenSearchServerlessService).pipe(
617
+ Layer.provide(
618
+ Layer.effect(
619
+ Instance.OpenSearchServerlessClientInstance,
620
+ Effect.map(OpenSearchServerlessServiceConfig.toOpenSearchServerlessClientConfig, evaluate),
621
+ ),
622
+ ),
623
+ );
624
+ }
625
+
626
+ /**
627
+ * @since 1.0.0
628
+ */
629
+ export declare namespace OpenSearchServerlessService {
630
+ /**
631
+ * @since 1.0.0
632
+ */
633
+ export interface Config extends Omit<OpenSearchServerlessClientConfig, "logger"> {
634
+ readonly logger?: ServiceLogger.ServiceLoggerConstructorProps | true;
635
+ }
636
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type { OpenSearchServerlessClientConfig } from "@aws-sdk/client-opensearchserverless";
5
+ import { ServiceLogger } from "@effect-aws/commons";
6
+ import { Effect, FiberRef, Layer } from "effect";
7
+ import { dual } from "effect/Function";
8
+ import { globalValue } from "effect/GlobalValue";
9
+ import type { OpenSearchServerlessService } from "./OpenSearchServerlessService.js";
10
+
11
+ /**
12
+ * @since 1.0.0
13
+ * @category opensearch-serverless service config
14
+ */
15
+ const currentOpenSearchServerlessServiceConfig = globalValue(
16
+ "@effect-aws/client-opensearch-serverless/currentOpenSearchServerlessServiceConfig",
17
+ () => FiberRef.unsafeMake<OpenSearchServerlessService.Config>({}),
18
+ );
19
+
20
+ /**
21
+ * @since 1.0.0
22
+ * @category opensearch-serverless service config
23
+ */
24
+ export const withOpenSearchServerlessServiceConfig: {
25
+ (config: OpenSearchServerlessService.Config): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
26
+ <A, E, R>(effect: Effect.Effect<A, E, R>, config: OpenSearchServerlessService.Config): Effect.Effect<A, E, R>;
27
+ } = dual(
28
+ 2,
29
+ <A, E, R>(effect: Effect.Effect<A, E, R>, config: OpenSearchServerlessService.Config): Effect.Effect<A, E, R> =>
30
+ Effect.locally(effect, currentOpenSearchServerlessServiceConfig, config),
31
+ );
32
+
33
+ /**
34
+ * @since 1.0.0
35
+ * @category opensearch-serverless service config
36
+ */
37
+ export const setOpenSearchServerlessServiceConfig = (config: OpenSearchServerlessService.Config) =>
38
+ Layer.locallyScoped(currentOpenSearchServerlessServiceConfig, config);
39
+
40
+ /**
41
+ * @since 1.0.0
42
+ * @category adapters
43
+ */
44
+ export const toOpenSearchServerlessClientConfig: Effect.Effect<OpenSearchServerlessClientConfig> = Effect.gen(
45
+ function*() {
46
+ const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentOpenSearchServerlessServiceConfig);
47
+
48
+ const logger = serviceLogger === true
49
+ ? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
50
+ : (serviceLogger ? yield* ServiceLogger.toClientLogger(ServiceLogger.make(serviceLogger)) : undefined);
51
+
52
+ return { logger, ...config };
53
+ },
54
+ );