| 1 | import type * as appsignals from "@distilled.cloud/aws/application-signals"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { ServiceLevelObjective } from "./ServiceLevelObjective.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `ListServiceLevelObjectiveExclusionWindows` request with `Id` injected |
| 8 | * from the bound {@link ServiceLevelObjective}. |
| 9 | */ |
| 10 | export interface ListExclusionWindowsRequest extends Omit< |
| 11 | appsignals.ListServiceLevelObjectiveExclusionWindowsInput, |
| 12 | "Id" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for |
| 17 | * `application-signals:ListServiceLevelObjectiveExclusionWindows`, scoped |
| 18 | * to one {@link ServiceLevelObjective}. |
| 19 | * |
| 20 | * Lists the exclusion (maintenance) windows configured on the bound SLO. |
| 21 | * Provide the implementation with |
| 22 | * `Effect.provide(AWS.ApplicationSignals.ListServiceLevelObjectiveExclusionWindowsHttp)`. |
| 23 | * ### Managing Exclusion Windows |
| 24 | * **Example:** List the SLO's Exclusion Windows |
| 25 | * ```typescript |
| 26 | * // init — bind the operation to the SLO |
| 27 | * const listExclusionWindows = |
| 28 | * yield* AWS.ApplicationSignals.ListServiceLevelObjectiveExclusionWindows(slo); |
| 29 | * |
| 30 | * // runtime — the SLO's ARN is injected as Id |
| 31 | * const page = yield* listExclusionWindows(); |
| 32 | * yield* Effect.log(`${page.ExclusionWindows.length} windows`); |
| 33 | * ``` |
| 34 | * |
| 35 | * @binding |
| 36 | */ |
| 37 | export interface ListServiceLevelObjectiveExclusionWindows extends Binding.Service< |
| 38 | ListServiceLevelObjectiveExclusionWindows, |
| 39 | "AWS.ApplicationSignals.ListServiceLevelObjectiveExclusionWindows", |
| 40 | ( |
| 41 | slo: ServiceLevelObjective, |
| 42 | ) => Effect.Effect< |
| 43 | ( |
| 44 | request?: ListExclusionWindowsRequest, |
| 45 | ) => Effect.Effect< |
| 46 | appsignals.ListServiceLevelObjectiveExclusionWindowsOutput, |
| 47 | appsignals.ListServiceLevelObjectiveExclusionWindowsError |
| 48 | > |
| 49 | > |
| 50 | > {} |
| 51 | |
| 52 | export const ListServiceLevelObjectiveExclusionWindows = |
| 53 | Binding.Service<ListServiceLevelObjectiveExclusionWindows>( |
| 54 | "AWS.ApplicationSignals.ListServiceLevelObjectiveExclusionWindows", |
| 55 | ); |