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 * Request for {@link GenerateEmbedUrlForRegisteredUser}. `AwsAccountId` is
8 * injected from the bound dashboard's ARN; `ExperienceConfiguration`
9 * defaults to embedding the bound dashboard when omitted.
10 */
11export interface GenerateEmbedUrlForRegisteredUserRequest extends Omit<
12 quicksight.GenerateEmbedUrlForRegisteredUserRequest,
13 "AwsAccountId" | "ExperienceConfiguration"
14> {
15 /**
16 * The Quick Sight experience to embed.
17 * @default the bound dashboard
18 */
19 ExperienceConfiguration?: quicksight.RegisteredUserEmbeddingExperienceConfiguration;
20}
21
22/**
23 * Runtime binding for `quicksight:GenerateEmbedUrlForRegisteredUser`.
24 *
25 * Generates a single-use embed URL for a registered QuickSight user, defaulting
26 * the embedded experience to the bound {@link Dashboard}. The URL contains a
27 * temporary bearer token valid for 5 minutes; the resulting session lasts
28 * 15 minutes to 10 hours (`SessionLifetimeInMinutes`). Provide the
29 * implementation with
30 * `Effect.provide(AWS.QuickSight.GenerateEmbedUrlForRegisteredUserHttp)`.
31 * ### Embedding Dashboards
32 * **Example:** Embed The Bound Dashboard For A Registered User
33 * ```typescript
34 * // init — bind the operation to the dashboard
35 * const generateEmbedUrl =
36 * yield* AWS.QuickSight.GenerateEmbedUrlForRegisteredUser(dashboard);
37 *
38 * // runtime — the embed experience defaults to the bound dashboard
39 * const { EmbedUrl } = yield* generateEmbedUrl({
40 * UserArn: userArn,
41 * SessionLifetimeInMinutes: 60,
42 * });
43 * ```
44 *
45 * @binding
46 */
47export interface GenerateEmbedUrlForRegisteredUser extends Binding.Service<
48 GenerateEmbedUrlForRegisteredUser,
49 "AWS.QuickSight.GenerateEmbedUrlForRegisteredUser",
50 (
51 dashboard: Dashboard,
52 ) => Effect.Effect<
53 (
54 request: GenerateEmbedUrlForRegisteredUserRequest,
55 ) => Effect.Effect<
56 quicksight.GenerateEmbedUrlForRegisteredUserResponse,
57 quicksight.GenerateEmbedUrlForRegisteredUserError
58 >
59 >
60> {}
61export const GenerateEmbedUrlForRegisteredUser =
62 Binding.Service<GenerateEmbedUrlForRegisteredUser>(
63 "AWS.QuickSight.GenerateEmbedUrlForRegisteredUser",
64 );