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

main
ts 45 lines 1.47 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 `DeleteWorkspaceServiceAccountToken` operation
8 * (IAM action `grafana:DeleteWorkspaceServiceAccountToken`), scoped to one
9 * {@link Workspace}.
10 *
11 * Revokes a service account API token — the other half of a token-rotation
12 * loop. Provide the implementation with
13 * `Effect.provide(AWS.Grafana.DeleteWorkspaceServiceAccountTokenHttp)`.
14 * ### Managing Service Accounts
15 * **Example:** Revoke a Rotated-Out Token
16 * ```typescript
17 * const deleteToken =
18 * yield* Grafana.DeleteWorkspaceServiceAccountToken(workspace);
19 *
20 * yield* deleteToken({
21 * serviceAccountId: account.id,
22 * tokenId: staleToken.id,
23 * });
24 * ```
25 *
26 * @binding
27 */
28 export interface DeleteWorkspaceServiceAccountToken extends Binding.Service<
29 DeleteWorkspaceServiceAccountToken,
30 "AWS.Grafana.DeleteWorkspaceServiceAccountToken",
31 (
32 workspace: Workspace,
33 ) => Effect.Effect<
34 (
35 request: Omit<grafana.DeleteWorkspaceServiceAccountTokenRequest, "workspaceId">,
36 ) => Effect.Effect<
37 grafana.DeleteWorkspaceServiceAccountTokenResponse,
38 grafana.DeleteWorkspaceServiceAccountTokenError
39 >
40 >
41 > {}
42 export const DeleteWorkspaceServiceAccountToken =
43 Binding.Service<DeleteWorkspaceServiceAccountToken>(
44 "AWS.Grafana.DeleteWorkspaceServiceAccountToken",
45 );