| 1 | import type * as SVC from "@distilled.cloud/aws/finspace"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { KxEnvironment } from "./KxEnvironment.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `finspace:UpdateKxVolume` — changes a volume's description or NAS_1 size/throughput in the bound environment. |
| 8 | * Provide the implementation with |
| 9 | * `Effect.provide(AWS.FinSpace.UpdateKxVolumeHttp)`. |
| 10 | * ### Managing Volumes |
| 11 | * **Example:** Grow a Volume |
| 12 | * ```typescript |
| 13 | * const updateVolume = yield* AWS.FinSpace.UpdateKxVolume(kdb); |
| 14 | * |
| 15 | * yield* updateVolume({ |
| 16 | * volumeName: "tp-logs", |
| 17 | * nas1Configuration: { type: "SSD_250", size: 2400 }, |
| 18 | * clientToken: crypto.randomUUID(), |
| 19 | * }); |
| 20 | * ``` |
| 21 | * |
| 22 | * @binding |
| 23 | */ |
| 24 | export interface UpdateKxVolume extends Binding.Service< |
| 25 | UpdateKxVolume, |
| 26 | "AWS.FinSpace.UpdateKxVolume", |
| 27 | <K extends KxEnvironment>( |
| 28 | environment: K, |
| 29 | ) => Effect.Effect< |
| 30 | ( |
| 31 | request: Omit<SVC.UpdateKxVolumeRequest, "environmentId">, |
| 32 | ) => Effect.Effect<SVC.UpdateKxVolumeResponse, SVC.UpdateKxVolumeError> |
| 33 | > |
| 34 | > {} |
| 35 | export const UpdateKxVolume = Binding.Service<UpdateKxVolume>( |
| 36 | "AWS.FinSpace.UpdateKxVolume", |
| 37 | ); |