Skip to content

CreateTimelineEvent

Source: src/AWS/SSMIncidents/CreateTimelineEvent.ts

Runtime binding for ssm-incidents:CreateTimelineEvent.

Adds a custom event to an incident’s timeline — automation can annotate the incident as it works (diagnosis steps, mitigation actions, links). Timeline events live under runtime incident-record ARNs, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.CreateTimelineEventHttp).

// init
const createTimelineEvent = yield* AWS.SSMIncidents.CreateTimelineEvent();
// runtime
const { eventId } = yield* createTimelineEvent({
incidentRecordArn,
eventTime: new Date(),
eventType: "Custom Event",
eventData: JSON.stringify({ note: "traffic shifted to us-west-2" }),
});