The best way to control Claude Code, Codex and more from any computer or phone

main
ts 39 lines 1.36 KB
Raw
1 import type * as grafana from "@distilled.cloud/aws/grafana";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Workspace } from "./Workspace.ts";
5
6 /**
7 * Runtime binding for the `AssociateLicense` operation (IAM action
8 * `grafana:AssociateLicense`), scoped to one {@link Workspace}.
9 *
10 * Assigns a Grafana Enterprise license to the workspace. Pass a valid
11 * Grafana Labs token as `grafanaToken` when upgrading to `ENTERPRISE`.
12 * Upgrading incurs additional fees. Provide the implementation with
13 * `Effect.provide(AWS.Grafana.AssociateLicenseHttp)`.
14 * ### Managing Licenses
15 * **Example:** Upgrade to Grafana Enterprise
16 * ```typescript
17 * const associateLicense = yield* Grafana.AssociateLicense(workspace);
18 *
19 * const { workspace: ws } = yield* associateLicense({
20 * licenseType: "ENTERPRISE",
21 * grafanaToken: token,
22 * });
23 * // ws.licenseType → "ENTERPRISE"
24 * ```
25 *
26 * @binding
27 */
28 export interface AssociateLicense extends Binding.Service<
29 AssociateLicense,
30 "AWS.Grafana.AssociateLicense",
31 (
32 workspace: Workspace,
33 ) => Effect.Effect<
34 (
35 request: Omit<grafana.AssociateLicenseRequest, "workspaceId">,
36 ) => Effect.Effect<grafana.AssociateLicenseResponse, grafana.AssociateLicenseError>
37 >
38 > {}
39 export const AssociateLicense = Binding.Service<AssociateLicense>("AWS.Grafana.AssociateLicense");