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:StartDashboardSnapshotJob`.
8 *
9 * Starts an asynchronous snapshot job that exports the bound
10 * {@link Dashboard} as a PDF, CSV, or Excel file delivered to S3 or returned
11 * as a download URL. `AwsAccountId` and `DashboardId` are injected from the
12 * binding; poll the job with
13 * {@link DescribeDashboardSnapshotJob | AWS.QuickSight.DescribeDashboardSnapshotJob}.
14 * Provide the implementation with
15 * `Effect.provide(AWS.QuickSight.StartDashboardSnapshotJobHttp)`.
16 * ### Dashboard Snapshots
17 * **Example:** Start A PDF Snapshot
18 * ```typescript
19 * // init — bind the operation to the dashboard
20 * const startSnapshotJob =
21 * yield* AWS.QuickSight.StartDashboardSnapshotJob(dashboard);
22 *
23 * // runtime
24 * const { SnapshotJobId } = yield* startSnapshotJob({
25 * SnapshotJobId: crypto.randomUUID(),
26 * UserConfiguration: { AnonymousUsers: [] },
27 * SnapshotConfiguration: {
28 * FileGroups: [{ Files: [{ FormatType: "PDF" }] }],
29 * },
30 * });
31 * ```
32 *
33 * @binding
34 */
35export interface StartDashboardSnapshotJob extends Binding.Service<
36 StartDashboardSnapshotJob,
37 "AWS.QuickSight.StartDashboardSnapshotJob",
38 (
39 dashboard: Dashboard,
40 ) => Effect.Effect<
41 (
42 request: Omit<
43 quicksight.StartDashboardSnapshotJobRequest,
44 "AwsAccountId" | "DashboardId"
45 >,
46 ) => Effect.Effect<
47 quicksight.StartDashboardSnapshotJobResponse,
48 quicksight.StartDashboardSnapshotJobError
49 >
50 >
51> {}
52export const StartDashboardSnapshotJob =
53 Binding.Service<StartDashboardSnapshotJob>(
54 "AWS.QuickSight.StartDashboardSnapshotJob",
55 );