| 1 | import type * as opensearch from "@distilled.cloud/aws/opensearch"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `ListVersions` operation (IAM action |
| 7 | * `es:ListVersions`). |
| 8 | * |
| 9 | * Lists every OpenSearch and Elasticsearch version the service supports — e.g. to validate an upgrade target before calling the upgrade API. Provide the implementation with |
| 10 | * `Effect.provide(AWS.OpenSearch.ListVersionsHttp)`. |
| 11 | * ### Engine Catalog |
| 12 | * **Example:** List Supported Engine Versions |
| 13 | * ```typescript |
| 14 | * const listVersions = yield* OpenSearch.ListVersions(); |
| 15 | * |
| 16 | * const result = yield* listVersions(); |
| 17 | * // result.Versions → ["OpenSearch_2.19", …] |
| 18 | * ``` |
| 19 | * |
| 20 | * @binding |
| 21 | */ |
| 22 | export interface ListVersions extends Binding.Service< |
| 23 | ListVersions, |
| 24 | "AWS.OpenSearch.ListVersions", |
| 25 | () => Effect.Effect< |
| 26 | ( |
| 27 | request?: opensearch.ListVersionsRequest, |
| 28 | ) => Effect.Effect< |
| 29 | opensearch.ListVersionsResponse, |
| 30 | opensearch.ListVersionsError |
| 31 | > |
| 32 | > |
| 33 | > {} |
| 34 | export const ListVersions = Binding.Service<ListVersions>( |
| 35 | "AWS.OpenSearch.ListVersions", |
| 36 | ); |