| 1 | import type * as memorydb from "@distilled.cloud/aws/memorydb"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `BatchUpdateCluster` operation (IAM action |
| 7 | * `memorydb:BatchUpdateCluster`). |
| 8 | * |
| 9 | * Applies a service update (security patch, engine upgrade) to a list of |
| 10 | * clusters — pair with {@link DescribeServiceUpdates} to build patch |
| 11 | * automation that applies available updates inside a maintenance window. |
| 12 | * Clusters that cannot take the update are returned in |
| 13 | * `UnprocessedClusters` (with the reason) rather than failing the call. |
| 14 | * Provide the implementation with |
| 15 | * `Effect.provide(AWS.MemoryDB.BatchUpdateClusterHttp)`. |
| 16 | * ### Applying Service Updates |
| 17 | * **Example:** Apply a Service Update to Clusters |
| 18 | * ```typescript |
| 19 | * const batchUpdateCluster = yield* MemoryDB.BatchUpdateCluster(); |
| 20 | * |
| 21 | * const result = yield* batchUpdateCluster({ |
| 22 | * ClusterNames: [clusterName], |
| 23 | * ServiceUpdate: { ServiceUpdateNameToApply: updateName }, |
| 24 | * }); |
| 25 | * // result.ProcessedClusters / result.UnprocessedClusters |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface BatchUpdateCluster extends Binding.Service< |
| 31 | BatchUpdateCluster, |
| 32 | "AWS.MemoryDB.BatchUpdateCluster", |
| 33 | () => Effect.Effect< |
| 34 | ( |
| 35 | request: memorydb.BatchUpdateClusterRequest, |
| 36 | ) => Effect.Effect< |
| 37 | memorydb.BatchUpdateClusterResponse, |
| 38 | memorydb.BatchUpdateClusterError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | export const BatchUpdateCluster = Binding.Service<BatchUpdateCluster>( |
| 43 | "AWS.MemoryDB.BatchUpdateCluster", |
| 44 | ); |