The best way to control Claude Code, Codex and more from any computer or phone

main
ts 61 lines 1.95 KB
Raw
1 import type * as appsignals from "@distilled.cloud/aws/application-signals";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { ServiceLevelObjective } from "./ServiceLevelObjective.ts";
5
6 /**
7 * `BatchUpdateExclusionWindows` request with `SloIds` injected from the
8 * bound {@link ServiceLevelObjective}.
9 */
10 export interface UpdateExclusionWindowsRequest extends Omit<
11 appsignals.BatchUpdateExclusionWindowsInput,
12 "SloIds"
13 > {}
14
15 /**
16 * Runtime binding for `application-signals:BatchUpdateExclusionWindows`,
17 * scoped to one {@link ServiceLevelObjective}.
18 *
19 * Adds or removes exclusion (maintenance) windows on the bound SLO — for
20 * example, automation that excludes a deployment window from SLO
21 * attainment. Provide the implementation with
22 * `Effect.provide(AWS.ApplicationSignals.BatchUpdateExclusionWindowsHttp)`.
23 * ### Managing Exclusion Windows
24 * **Example:** Exclude a Maintenance Window
25 * ```typescript
26 * // init — bind the operation to the SLO
27 * const updateExclusionWindows =
28 * yield* AWS.ApplicationSignals.BatchUpdateExclusionWindows(slo);
29 *
30 * // runtime — the SLO's ARN is injected as SloIds
31 * yield* updateExclusionWindows({
32 * AddExclusionWindows: [
33 * {
34 * StartTime: new Date(),
35 * Window: { DurationUnit: "HOUR", Duration: 2 },
36 * Reason: "scheduled maintenance",
37 * },
38 * ],
39 * });
40 * ```
41 *
42 * @binding
43 */
44 export interface BatchUpdateExclusionWindows extends Binding.Service<
45 BatchUpdateExclusionWindows,
46 "AWS.ApplicationSignals.BatchUpdateExclusionWindows",
47 (
48 slo: ServiceLevelObjective,
49 ) => Effect.Effect<
50 (
51 request: UpdateExclusionWindowsRequest,
52 ) => Effect.Effect<
53 appsignals.BatchUpdateExclusionWindowsOutput,
54 appsignals.BatchUpdateExclusionWindowsError
55 >
56 >
57 > {}
58
59 export const BatchUpdateExclusionWindows = Binding.Service<BatchUpdateExclusionWindows>(
60 "AWS.ApplicationSignals.BatchUpdateExclusionWindows",
61 );