1import type * as grafana from "@distilled.cloud/aws/grafana";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Workspace } from "./Workspace.ts";
5
6/**
7 * Runtime binding for the `DeleteWorkspaceServiceAccount` operation (IAM
8 * action `grafana:DeleteWorkspaceServiceAccount`), scoped to one
9 * {@link Workspace}.
10 *
11 * Deletes a Grafana service account from the workspace. Any API tokens
12 * minted for the account stop working immediately. Provide the
13 * implementation with
14 * `Effect.provide(AWS.Grafana.DeleteWorkspaceServiceAccountHttp)`.
15 * ### Managing Service Accounts
16 * **Example:** Delete a Service Account
17 * ```typescript
18 * const deleteServiceAccount =
19 * yield* Grafana.DeleteWorkspaceServiceAccount(workspace);
20 *
21 * yield* deleteServiceAccount({ serviceAccountId: account.id });
22 * ```
23 *
24 * @binding
25 */
26export interface DeleteWorkspaceServiceAccount extends Binding.Service<
27 DeleteWorkspaceServiceAccount,
28 "AWS.Grafana.DeleteWorkspaceServiceAccount",
29 (
30 workspace: Workspace,
31 ) => Effect.Effect<
32 (
33 request: Omit<
34 grafana.DeleteWorkspaceServiceAccountRequest,
35 "workspaceId"
36 >,
37 ) => Effect.Effect<
38 grafana.DeleteWorkspaceServiceAccountResponse,
39 grafana.DeleteWorkspaceServiceAccountError
40 >
41 >
42> {}
43export const DeleteWorkspaceServiceAccount =
44 Binding.Service<DeleteWorkspaceServiceAccount>(
45 "AWS.Grafana.DeleteWorkspaceServiceAccount",
46 );