| 1 | import type * as SVC from "@distilled.cloud/aws/databrew"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Project } from "./Project.ts"; |
| 5 | |
| 6 | export interface StartProjectSessionRequest extends Omit< |
| 7 | SVC.StartProjectSessionRequest, |
| 8 | "Name" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `databrew:StartProjectSession` — opens an interactive |
| 13 | * session on the bound DataBrew project. The response's `ClientSessionId` |
| 14 | * (a `Redacted` session token) authenticates subsequent |
| 15 | * {@link SendProjectSessionAction} calls. |
| 16 | * |
| 17 | * Interactive sessions are billed per 30-minute session. |
| 18 | * ### Interactive Sessions |
| 19 | * **Example:** Open a Session |
| 20 | * ```typescript |
| 21 | * const startProjectSession = yield* AWS.DataBrew.StartProjectSession(project); |
| 22 | * |
| 23 | * const { ClientSessionId } = yield* startProjectSession({ |
| 24 | * AssumeControl: true, |
| 25 | * }); |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface StartProjectSession extends Binding.Service< |
| 31 | StartProjectSession, |
| 32 | "AWS.DataBrew.StartProjectSession", |
| 33 | <P extends Project>( |
| 34 | project: P, |
| 35 | ) => Effect.Effect< |
| 36 | ( |
| 37 | request?: StartProjectSessionRequest, |
| 38 | ) => Effect.Effect< |
| 39 | SVC.StartProjectSessionResponse, |
| 40 | SVC.StartProjectSessionError |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | export const StartProjectSession = Binding.Service<StartProjectSession>( |
| 45 | "AWS.DataBrew.StartProjectSession", |
| 46 | ); |