| 1 | import type * as ssm from "@distilled.cloud/aws/ssm-contacts"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `ssm-contacts:ListPreviewRotationShifts`. |
| 7 | * |
| 8 | * Preview the shifts a hypothetical rotation configuration would produce |
| 9 | * before creating or updating a rotation. Takes members, a time zone, |
| 10 | * and recurrence settings directly, so it is account-scoped. |
| 11 | * Provide the implementation with |
| 12 | * `Effect.provide(AWS.SSMContacts.ListPreviewRotationShiftsHttp)`. |
| 13 | * ### Managing On-Call Rotations |
| 14 | * **Example:** Preview a Rotation Schedule |
| 15 | * ```typescript |
| 16 | * const listPreviewRotationShifts = |
| 17 | * yield* AWS.SSMContacts.ListPreviewRotationShifts(); |
| 18 | * |
| 19 | * const { RotationShifts } = yield* listPreviewRotationShifts({ |
| 20 | * EndTime: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), |
| 21 | * Members: ["alice", "bob"], |
| 22 | * TimeZoneId: "America/Los_Angeles", |
| 23 | * Recurrence: { |
| 24 | * NumberOfOnCalls: 1, |
| 25 | * RecurrenceMultiplier: 1, |
| 26 | * DailySettings: [{ HourOfDay: 9, MinuteOfHour: 0 }], |
| 27 | * }, |
| 28 | * }); |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface ListPreviewRotationShifts extends Binding.Service< |
| 34 | ListPreviewRotationShifts, |
| 35 | "AWS.SSMContacts.ListPreviewRotationShifts", |
| 36 | () => Effect.Effect< |
| 37 | ( |
| 38 | request: ssm.ListPreviewRotationShiftsRequest, |
| 39 | ) => Effect.Effect< |
| 40 | ssm.ListPreviewRotationShiftsResult, |
| 41 | ssm.ListPreviewRotationShiftsError |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | export const ListPreviewRotationShifts = |
| 46 | Binding.Service<ListPreviewRotationShifts>( |
| 47 | "AWS.SSMContacts.ListPreviewRotationShifts", |
| 48 | ); |