1import type * as quicksight from "@distilled.cloud/aws/quicksight";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Dashboard } from "./Dashboard.ts";
5
6/**
7 * Runtime binding for `quicksight:DescribeDashboardSnapshotJobResult`.
8 *
9 * Fetches the result of a `COMPLETED` snapshot job on the bound
10 * {@link Dashboard} — the S3 destination or pre-signed download URLs of the
11 * generated files, or the error details of a `FAILED` job. `AwsAccountId`
12 * and `DashboardId` are injected from the binding. Provide the
13 * implementation with
14 * `Effect.provide(AWS.QuickSight.DescribeDashboardSnapshotJobResultHttp)`.
15 * ### Dashboard Snapshots
16 * **Example:** Download A Completed Snapshot
17 * ```typescript
18 * // init — bind the operation to the dashboard
19 * const describeSnapshotJobResult =
20 * yield* AWS.QuickSight.DescribeDashboardSnapshotJobResult(dashboard);
21 *
22 * // runtime
23 * const { Result } = yield* describeSnapshotJobResult({
24 * SnapshotJobId: jobId,
25 * });
26 * const url = Result?.AnonymousUsers?.[0]?.FileGroups?.[0]?.Files?.[0];
27 * ```
28 *
29 * @binding
30 */
31export interface DescribeDashboardSnapshotJobResult extends Binding.Service<
32 DescribeDashboardSnapshotJobResult,
33 "AWS.QuickSight.DescribeDashboardSnapshotJobResult",
34 (
35 dashboard: Dashboard,
36 ) => Effect.Effect<
37 (
38 request: Omit<
39 quicksight.DescribeDashboardSnapshotJobResultRequest,
40 "AwsAccountId" | "DashboardId"
41 >,
42 ) => Effect.Effect<
43 quicksight.DescribeDashboardSnapshotJobResultResponse,
44 quicksight.DescribeDashboardSnapshotJobResultError
45 >
46 >
47> {}
48export const DescribeDashboardSnapshotJobResult =
49 Binding.Service<DescribeDashboardSnapshotJobResult>(
50 "AWS.QuickSight.DescribeDashboardSnapshotJobResult",
51 );