| 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:CreateKxScalingGroup` — provisions a shared compute host in the bound environment that multiple kdb clusters can be placed on. |
| 8 | * Provide the implementation with |
| 9 | * `Effect.provide(AWS.FinSpace.CreateKxScalingGroupHttp)`. |
| 10 | * ### Managing Scaling Groups |
| 11 | * **Example:** Provision a Scaling Group |
| 12 | * ```typescript |
| 13 | * const createScalingGroup = yield* AWS.FinSpace.CreateKxScalingGroup(kdb); |
| 14 | * |
| 15 | * const group = yield* createScalingGroup({ |
| 16 | * scalingGroupName: "shared-hosts", |
| 17 | * hostType: "kx.sg.4xlarge", |
| 18 | * availabilityZoneId: "use1-az2", |
| 19 | * clientToken: crypto.randomUUID(), |
| 20 | * }); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface CreateKxScalingGroup extends Binding.Service< |
| 26 | CreateKxScalingGroup, |
| 27 | "AWS.FinSpace.CreateKxScalingGroup", |
| 28 | <K extends KxEnvironment>( |
| 29 | environment: K, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request: Omit<SVC.CreateKxScalingGroupRequest, "environmentId">, |
| 33 | ) => Effect.Effect< |
| 34 | SVC.CreateKxScalingGroupResponse, |
| 35 | SVC.CreateKxScalingGroupError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const CreateKxScalingGroup = Binding.Service<CreateKxScalingGroup>( |
| 40 | "AWS.FinSpace.CreateKxScalingGroup", |
| 41 | ); |