| 1 | import type * as dax from "@distilled.cloud/aws/dax"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Cluster } from "./Cluster.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for the `RebootNode` operation (IAM action |
| 8 | * `dax:RebootNode`), scoped to one {@link Cluster}. |
| 9 | * |
| 10 | * Reboots a single node of the bound DAX cluster — restarts the DAX engine |
| 11 | * process without flushing the cache contents. The node id comes from |
| 12 | * `DescribeClusters` (e.g. `my-cluster-a`). Provide the implementation with |
| 13 | * `Effect.provide(AWS.DAX.RebootNodeHttp)`. |
| 14 | * ### Operating a Cluster |
| 15 | * **Example:** Reboot an Unhealthy Node |
| 16 | * ```typescript |
| 17 | * const rebootNode = yield* DAX.RebootNode(cluster); |
| 18 | * |
| 19 | * const result = yield* rebootNode({ NodeId: nodeId }); |
| 20 | * // result.Cluster?.Nodes → the node reports status "rebooting" |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface RebootNode extends Binding.Service< |
| 26 | RebootNode, |
| 27 | "AWS.DAX.RebootNode", |
| 28 | ( |
| 29 | cluster: Cluster, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request: Omit<dax.RebootNodeRequest, "ClusterName">, |
| 33 | ) => Effect.Effect<dax.RebootNodeResponse, dax.RebootNodeError> |
| 34 | > |
| 35 | > {} |
| 36 | export const RebootNode = Binding.Service<RebootNode>("AWS.DAX.RebootNode"); |