1import type * as SVC from "@distilled.cloud/aws/finspace";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { KxEnvironment } from "./KxEnvironment.ts";
5
6/**
7 * Runtime binding for `finspace:GetKxConnectionString` — retrieves a signed connection string a kdb user can use to connect to a cluster in the bound environment. The returned `signedConnectionString` embeds a SigV4 signature and is surfaced as `Redacted`.
8 * Provide the implementation with
9 * `Effect.provide(AWS.FinSpace.GetKxConnectionStringHttp)`.
10 * ### Connecting to Clusters
11 * **Example:** Connect a User to a Cluster
12 * ```typescript
13 * const getConnectionString = yield* AWS.FinSpace.GetKxConnectionString(kdb);
14 *
15 * const { signedConnectionString } = yield* getConnectionString({
16 * userArn: user.userArn,
17 * clusterName: "hdb",
18 * });
19 * const value = Redacted.value(signedConnectionString!);
20 * ```
21 *
22 * @binding
23 */
24export interface GetKxConnectionString extends Binding.Service<
25 GetKxConnectionString,
26 "AWS.FinSpace.GetKxConnectionString",
27 <K extends KxEnvironment>(
28 environment: K,
29 ) => Effect.Effect<
30 (
31 request: Omit<SVC.GetKxConnectionStringRequest, "environmentId">,
32 ) => Effect.Effect<
33 SVC.GetKxConnectionStringResponse,
34 SVC.GetKxConnectionStringError
35 >
36 >
37> {}
38export const GetKxConnectionString = Binding.Service<GetKxConnectionString>(
39 "AWS.FinSpace.GetKxConnectionString",
40);