| 1 | import type * as SVC from "@distilled.cloud/aws/kinesis-analytics-v2"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Application } from "./Application.ts"; |
| 5 | |
| 6 | export interface CreateApplicationSnapshotRequest extends Omit< |
| 7 | SVC.CreateApplicationSnapshotRequest, |
| 8 | "ApplicationName" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `kinesisanalytics:CreateApplicationSnapshot` — takes |
| 13 | * a snapshot (Flink savepoint) of the bound application's state on demand, |
| 14 | * e.g. a scheduled backup ahead of a deploy. The application must be |
| 15 | * `RUNNING` with snapshots enabled; poll the result with |
| 16 | * {@link DescribeApplicationSnapshot}. |
| 17 | * ### Managing Snapshots |
| 18 | * **Example:** Take a savepoint before a deploy |
| 19 | * ```typescript |
| 20 | * const createSnapshot = yield* AWS.KinesisAnalyticsV2.CreateApplicationSnapshot(app); |
| 21 | * |
| 22 | * yield* createSnapshot({ SnapshotName: "pre-deploy" }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface CreateApplicationSnapshot extends Binding.Service< |
| 28 | CreateApplicationSnapshot, |
| 29 | "AWS.KinesisAnalyticsV2.CreateApplicationSnapshot", |
| 30 | <A extends Application>( |
| 31 | application: A, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request: CreateApplicationSnapshotRequest, |
| 35 | ) => Effect.Effect< |
| 36 | SVC.CreateApplicationSnapshotResponse, |
| 37 | SVC.CreateApplicationSnapshotError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const CreateApplicationSnapshot = |
| 42 | Binding.Service<CreateApplicationSnapshot>( |
| 43 | "AWS.KinesisAnalyticsV2.CreateApplicationSnapshot", |
| 44 | ); |