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 `DescribeWorkspaceAuthentication` operation (IAM
8 * action `grafana:DescribeWorkspaceAuthentication`), scoped to one
9 * {@link Workspace}.
10 *
11 * Reads the workspace's authentication configuration — the enabled providers
12 * (`AWS_SSO`, `SAML`) and, for SAML, the IdP metadata, assertion-attribute
13 * mapping, and role values. Provide the implementation with
14 * `Effect.provide(AWS.Grafana.DescribeWorkspaceAuthenticationHttp)`.
15 * ### Managing Authentication
16 * **Example:** Inspect the SAML Configuration Status
17 * ```typescript
18 * const describeAuth = yield* Grafana.DescribeWorkspaceAuthentication(workspace);
19 *
20 * const { authentication } = yield* describeAuth();
21 * // authentication.providers → ["SAML"]
22 * // authentication.saml?.status → "CONFIGURED" | "NOT_CONFIGURED"
23 * ```
24 *
25 * @binding
26 */
27export interface DescribeWorkspaceAuthentication extends Binding.Service<
28 DescribeWorkspaceAuthentication,
29 "AWS.Grafana.DescribeWorkspaceAuthentication",
30 (
31 workspace: Workspace,
32 ) => Effect.Effect<
33 () => Effect.Effect<
34 grafana.DescribeWorkspaceAuthenticationResponse,
35 grafana.DescribeWorkspaceAuthenticationError
36 >
37 >
38> {}
39export const DescribeWorkspaceAuthentication =
40 Binding.Service<DescribeWorkspaceAuthentication>(
41 "AWS.Grafana.DescribeWorkspaceAuthentication",
42 );