| 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:GetKxScalingGroup` — reads a scaling group's status, host type, and the clusters placed on it in the bound environment. |
| 8 | * Provide the implementation with |
| 9 | * `Effect.provide(AWS.FinSpace.GetKxScalingGroupHttp)`. |
| 10 | * ### Managing Scaling Groups |
| 11 | * **Example:** Poll a Scaling Group to Active |
| 12 | * ```typescript |
| 13 | * const getScalingGroup = yield* AWS.FinSpace.GetKxScalingGroup(kdb); |
| 14 | * |
| 15 | * const group = yield* getScalingGroup({ scalingGroupName: "shared-hosts" }); |
| 16 | * if (group.status === "ACTIVE") { |
| 17 | * yield* Effect.log(`clusters: ${group.clusters?.join(", ")}`); |
| 18 | * } |
| 19 | * ``` |
| 20 | * |
| 21 | * @binding |
| 22 | */ |
| 23 | export interface GetKxScalingGroup extends Binding.Service< |
| 24 | GetKxScalingGroup, |
| 25 | "AWS.FinSpace.GetKxScalingGroup", |
| 26 | <K extends KxEnvironment>( |
| 27 | environment: K, |
| 28 | ) => Effect.Effect< |
| 29 | ( |
| 30 | request: Omit<SVC.GetKxScalingGroupRequest, "environmentId">, |
| 31 | ) => Effect.Effect< |
| 32 | SVC.GetKxScalingGroupResponse, |
| 33 | SVC.GetKxScalingGroupError |
| 34 | > |
| 35 | > |
| 36 | > {} |
| 37 | export const GetKxScalingGroup = Binding.Service<GetKxScalingGroup>( |
| 38 | "AWS.FinSpace.GetKxScalingGroup", |
| 39 | ); |