1import type * as incidents from "@distilled.cloud/aws/ssm-incidents";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `ssm-incidents:CreateTimelineEvent`.
7 *
8 * Adds a custom event to an incident's timeline — automation can annotate the
9 * incident as it works (diagnosis steps, mitigation actions, links). Timeline
10 * events live under runtime incident-record ARNs, so the deploy-time grant is
11 * account-level (`Resource: "*"`).
12 * Provide the implementation with
13 * `Effect.provide(AWS.SSMIncidents.CreateTimelineEventHttp)`.
14 * ### Timeline Events
15 * **Example:** Annotate An Incident
16 * ```typescript
17 * // init
18 * const createTimelineEvent = yield* AWS.SSMIncidents.CreateTimelineEvent();
19 *
20 * // runtime
21 * const { eventId } = yield* createTimelineEvent({
22 * incidentRecordArn,
23 * eventTime: new Date(),
24 * eventType: "Custom Event",
25 * eventData: JSON.stringify({ note: "traffic shifted to us-west-2" }),
26 * });
27 * ```
28 *
29 * @binding
30 */
31export interface CreateTimelineEvent extends Binding.Service<
32 CreateTimelineEvent,
33 "AWS.SSMIncidents.CreateTimelineEvent",
34 () => Effect.Effect<
35 (
36 request: incidents.CreateTimelineEventInput,
37 ) => Effect.Effect<
38 incidents.CreateTimelineEventOutput,
39 incidents.CreateTimelineEventError
40 >
41 >
42> {}
43export const CreateTimelineEvent = Binding.Service<CreateTimelineEvent>(
44 "AWS.SSMIncidents.CreateTimelineEvent",
45);