AWS.SSMIncidents reference
BatchGetIncidentFindings
Section titled “BatchGetIncidentFindings”Source:
src/AWS/SSMIncidents/BatchGetIncidentFindings.ts
Runtime binding for ssm-incidents:BatchGetIncidentFindings.
Returns the details of the findings correlated with an incident — the
CodeDeploy deployment or CloudFormation stack update suspected of causing
it. Findings live under runtime incident-record ARNs, so the deploy-time
grant is account-level (Resource: "*").
Provide the implementation with
Effect.provide(AWS.SSMIncidents.BatchGetIncidentFindingsHttp).
BatchGetIncidentFindings: Findings
Section titled “BatchGetIncidentFindings: Findings”// initconst batchGetIncidentFindings = yield* AWS.SSMIncidents.BatchGetIncidentFindings();
// runtimeconst { findings } = yield* batchGetIncidentFindings({ incidentRecordArn, findingIds,});CreateTimelineEvent
Section titled “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).
CreateTimelineEvent: Timeline Events
Section titled “CreateTimelineEvent: Timeline Events”// initconst createTimelineEvent = yield* AWS.SSMIncidents.CreateTimelineEvent();
// runtimeconst { eventId } = yield* createTimelineEvent({ incidentRecordArn, eventTime: new Date(), eventType: "Custom Event", eventData: JSON.stringify({ note: "traffic shifted to us-west-2" }),});DeleteIncidentRecord
Section titled “DeleteIncidentRecord”Source:
src/AWS/SSMIncidents/DeleteIncidentRecord.ts
Runtime binding for ssm-incidents:DeleteIncidentRecord.
Deletes an incident record (idempotent — deleting a record that does not
exist succeeds). Incident-record ARNs only exist at runtime, so the
deploy-time grant is account-level (Resource: "*").
Provide the implementation with
Effect.provide(AWS.SSMIncidents.DeleteIncidentRecordHttp).
DeleteIncidentRecord: Updating Incident Records
Section titled “DeleteIncidentRecord: Updating Incident Records”// initconst deleteIncidentRecord = yield* AWS.SSMIncidents.DeleteIncidentRecord();
// runtimeyield* deleteIncidentRecord({ arn: incidentRecordArn });DeleteTimelineEvent
Section titled “DeleteTimelineEvent”Source:
src/AWS/SSMIncidents/DeleteTimelineEvent.ts
Runtime binding for ssm-incidents:DeleteTimelineEvent.
Deletes a custom timeline event from an incident (idempotent — deleting an
event that does not exist succeeds). 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.DeleteTimelineEventHttp).
DeleteTimelineEvent: Timeline Events
Section titled “DeleteTimelineEvent: Timeline Events”// initconst deleteTimelineEvent = yield* AWS.SSMIncidents.DeleteTimelineEvent();
// runtimeyield* deleteTimelineEvent({ incidentRecordArn, eventId });GetIncidentRecord
Section titled “GetIncidentRecord”Source:
src/AWS/SSMIncidents/GetIncidentRecord.ts
Runtime binding for ssm-incidents:GetIncidentRecord.
Returns the details of an incident record — title, impact, status, chat
channel, and notification targets. Incident-record ARNs only exist at
runtime, so the deploy-time grant is account-level (Resource: "*").
Provide the implementation with
Effect.provide(AWS.SSMIncidents.GetIncidentRecordHttp).
GetIncidentRecord: Reading Incident Records
Section titled “GetIncidentRecord: Reading Incident Records”// initconst getIncidentRecord = yield* AWS.SSMIncidents.GetIncidentRecord();
// runtimeconst { incidentRecord } = yield* getIncidentRecord({ arn: incidentRecordArn });GetTimelineEvent
Section titled “GetTimelineEvent”Source:
src/AWS/SSMIncidents/GetTimelineEvent.ts
Runtime binding for ssm-incidents:GetTimelineEvent.
Returns one timeline event of an incident by event id. 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.GetTimelineEventHttp).
GetTimelineEvent: Timeline Events
Section titled “GetTimelineEvent: Timeline Events”// initconst getTimelineEvent = yield* AWS.SSMIncidents.GetTimelineEvent();
// runtimeconst { event } = yield* getTimelineEvent({ incidentRecordArn, eventId });ListIncidentFindings
Section titled “ListIncidentFindings”Source:
src/AWS/SSMIncidents/ListIncidentFindings.ts
Runtime binding for ssm-incidents:ListIncidentFindings.
Lists the findings (CodeDeploy deployments and CloudFormation stack updates
around the incident’s start time) that Incident Manager correlated with an
incident. Findings live under runtime incident-record ARNs, so the
deploy-time grant is account-level (Resource: "*").
Provide the implementation with
Effect.provide(AWS.SSMIncidents.ListIncidentFindingsHttp).
ListIncidentFindings: Findings
Section titled “ListIncidentFindings: Findings”// initconst listIncidentFindings = yield* AWS.SSMIncidents.ListIncidentFindings();
// runtimeconst { findings } = yield* listIncidentFindings({ incidentRecordArn });ListIncidentRecords
Section titled “ListIncidentRecords”Source:
src/AWS/SSMIncidents/ListIncidentRecords.ts
Runtime binding for ssm-incidents:ListIncidentRecords.
Lists the incident records in the account — the incidents started from any
response plan. Incident records are runtime entities (their ARNs embed the
response-plan name and a UUID that only exist once an incident starts), so
the deploy-time grant is account-level (Resource: "*").
Provide the implementation with
Effect.provide(AWS.SSMIncidents.ListIncidentRecordsHttp).
ListIncidentRecords: Reading Incident Records
Section titled “ListIncidentRecords: Reading Incident Records”// initconst listIncidentRecords = yield* AWS.SSMIncidents.ListIncidentRecords();
// runtimeconst { incidentRecordSummaries } = yield* listIncidentRecords({ filters: [{ key: "status", condition: { equals: { stringValues: ["OPEN"] } } }],});ListRelatedItems
Section titled “ListRelatedItems”Source:
src/AWS/SSMIncidents/ListRelatedItems.ts
Runtime binding for ssm-incidents:ListRelatedItems.
Lists the related items of an incident — attached metrics, runbook
executions, parent tickets, and links. Related items live under runtime
incident-record ARNs, so the deploy-time grant is account-level
(Resource: "*").
Provide the implementation with
Effect.provide(AWS.SSMIncidents.ListRelatedItemsHttp).
ListRelatedItems: Related Items
Section titled “ListRelatedItems: Related Items”// initconst listRelatedItems = yield* AWS.SSMIncidents.ListRelatedItems();
// runtimeconst { relatedItems } = yield* listRelatedItems({ incidentRecordArn });ListTimelineEvents
Section titled “ListTimelineEvents”Source:
src/AWS/SSMIncidents/ListTimelineEvents.ts
Runtime binding for ssm-incidents:ListTimelineEvents.
Lists the timeline events of an incident, with optional filters and sorting.
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.ListTimelineEventsHttp).
ListTimelineEvents: Timeline Events
Section titled “ListTimelineEvents: Timeline Events”// initconst listTimelineEvents = yield* AWS.SSMIncidents.ListTimelineEvents();
// runtimeconst { eventSummaries } = yield* listTimelineEvents({ incidentRecordArn, sortBy: "EVENT_TIME", sortOrder: "DESCENDING",});ReplicationSet
Section titled “ReplicationSet”Source:
src/AWS/SSMIncidents/ReplicationSet.ts
The Incident Manager replication set — the account/region singleton that onboards AWS Systems Manager Incident Manager. Creating it replicates and encrypts Incident Manager data (response plans, incidents, contacts) to the configured Regions; deleting it offboards Incident Manager and removes all Incident Manager data account-wide.
Only one replication set can exist per account, so this is a
capture-and-restore singleton: adopting a pre-existing replication set that
Alchemy did not create requires --adopt.
ReplicationSet: Onboarding Incident Manager
Section titled “ReplicationSet: Onboarding Incident Manager”Replication set in the current Region
const replicationSet = yield* SSMIncidents.ReplicationSet("Incidents", {});Multi-Region replication with a KMS key
const replicationSet = yield* SSMIncidents.ReplicationSet("Incidents", { regions: { "us-east-1": {}, "us-west-2": { sseKmsKeyId: key.keyArn }, }, deletionProtected: true,});ResponsePlan
Section titled “ResponsePlan”Source:
src/AWS/SSMIncidents/ResponsePlan.ts
An Incident Manager response plan — the template that automates the initial response to incidents by engaging contacts, starting chat-channel collaboration, and running Automation runbooks.
Requires the account’s Incident Manager replication set
(SSMIncidents.ReplicationSet) to exist.
ResponsePlan: Creating Response Plans
Section titled “ResponsePlan: Creating Response Plans”Minimal response plan
const replicationSet = yield* SSMIncidents.ReplicationSet("Incidents", {});const plan = yield* SSMIncidents.ResponsePlan("Critical", { incidentTemplate: { title: "Critical failure", impact: 1 },});Response plan with engagements and chat channel
const plan = yield* SSMIncidents.ResponsePlan("Sev1", { displayName: "Severity 1 response", incidentTemplate: { title: "Sev1 incident", impact: 1, summary: "Automated Sev1 response", notificationTargets: [{ snsTopicArn: topic.topicArn }], }, engagements: [oncall.contactArn], chatChannel: { chatbotSns: [topic.topicArn] },});StartIncident
Section titled “StartIncident”Source:
src/AWS/SSMIncidents/StartIncident.ts
Runtime binding for ssm-incidents:StartIncident.
Starts an incident from the bound ResponsePlan — Incident Manager
creates the incident record, engages the plan’s contacts, posts to its
chat channel, and runs its Automation runbooks. The response plan ARN is
injected from the binding; pass triggerDetails to record what fired the
incident.
Provide the implementation with
Effect.provide(AWS.SSMIncidents.StartIncidentHttp).
StartIncident: Starting Incidents
Section titled “StartIncident: Starting Incidents”// init — bind the operation to the response planconst startIncident = yield* AWS.SSMIncidents.StartIncident(plan);
// runtimeconst { incidentRecordArn } = yield* startIncident({ title: "checkout p99 breach", impact: 2, triggerDetails: { source: "custom.checkout-monitor", timestamp: new Date(), },});UpdateIncidentRecord
Section titled “UpdateIncidentRecord”Source:
src/AWS/SSMIncidents/UpdateIncidentRecord.ts
Runtime binding for ssm-incidents:UpdateIncidentRecord.
Updates the details of an incident record — retitle, change impact, or
resolve the incident by setting status: "RESOLVED". Incident-record ARNs
only exist at runtime, so the deploy-time grant is account-level
(Resource: "*").
Provide the implementation with
Effect.provide(AWS.SSMIncidents.UpdateIncidentRecordHttp).
UpdateIncidentRecord: Updating Incident Records
Section titled “UpdateIncidentRecord: Updating Incident Records”// initconst updateIncidentRecord = yield* AWS.SSMIncidents.UpdateIncidentRecord();
// runtimeyield* updateIncidentRecord({ arn: incidentRecordArn, status: "RESOLVED" });UpdateRelatedItems
Section titled “UpdateRelatedItems”Source:
src/AWS/SSMIncidents/UpdateRelatedItems.ts
Runtime binding for ssm-incidents:UpdateRelatedItems.
Attaches or removes a related item on an incident — link the dashboard,
ticket, or runbook execution your automation is working from. Related items
live under runtime incident-record ARNs, so the deploy-time grant is
account-level (Resource: "*").
Provide the implementation with
Effect.provide(AWS.SSMIncidents.UpdateRelatedItemsHttp).
UpdateRelatedItems: Related Items
Section titled “UpdateRelatedItems: Related Items”// initconst updateRelatedItems = yield* AWS.SSMIncidents.UpdateRelatedItems();
// runtimeyield* updateRelatedItems({ incidentRecordArn, relatedItemsUpdate: { itemToAdd: { title: "Grafana dashboard", identifier: { type: "OTHER", value: { url: "https://grafana.example.com/d/abc" } }, }, },});UpdateTimelineEvent
Section titled “UpdateTimelineEvent”Source:
src/AWS/SSMIncidents/UpdateTimelineEvent.ts
Runtime binding for ssm-incidents:UpdateTimelineEvent.
Updates a timeline event’s time, type, data, or references. 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.UpdateTimelineEventHttp).
UpdateTimelineEvent: Timeline Events
Section titled “UpdateTimelineEvent: Timeline Events”// initconst updateTimelineEvent = yield* AWS.SSMIncidents.UpdateTimelineEvent();
// runtimeyield* updateTimelineEvent({ incidentRecordArn, eventId, eventData: JSON.stringify({ note: "mitigation confirmed" }),});