timeline_events
Creates, updates, deletes, gets or lists a timeline_events resource.
Overview
| Name | timeline_events |
| Type | Resource |
| Id | aws.ssm_incidents.timeline_events |
Fields
The following fields are returned by SELECT queries:
- get_timeline_event
- list_timeline_events
| Name | Datatype | Description |
|---|---|---|
event_data | string | A short description of the event. |
event_id | string | The ID of the timeline event. |
event_references | array | A list of references in a TimelineEvent. |
event_time | string (date-time) | The timestamp for when the event occurred. |
event_type | string | The type of event that occurred. Currently Incident Manager supports only the Custom Event and Note types. |
event_updated_time | string (date-time) | The timestamp for when the timeline event was last updated. |
incident_record_arn | string | The Amazon Resource Name (ARN) of the incident that the event occurred during. (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-z0-9-]:[a-z0-9-]:([0-9]{12})?:.+$</code>) |
| Name | Datatype | Description |
|---|---|---|
event_id | string | The timeline event ID. |
event_references | array | A list of references in a TimelineEvent. |
event_time | string (date-time) | The timestamp for when the event occurred. |
event_type | string | The type of event. The timeline event must be Custom Event or Note. |
event_updated_time | string (date-time) | The timestamp for when the timeline event was last updated. |
incident_record_arn | string | The Amazon Resource Name (ARN) of the incident that the event happened during. (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-z0-9-]:[a-z0-9-]:([0-9]{12})?:.+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_timeline_event | select | eventId, incidentRecordArn, region | Retrieves a timeline event based on its ID and incident record. | |
list_timeline_events | select | region | Lists timeline events for the specified incident record. | |
create_timeline_event | insert | region, eventData, eventTime, eventType, incidentRecordArn | Creates a custom timeline event on the incident details page of an incident record. Incident Manager automatically creates timeline events that mark key moments during an incident. You can create custom timeline events to mark important events that Incident Manager can detect automatically. | |
update_timeline_event | update | region, eventId, incidentRecordArn | Updates a timeline event. You can update events of type Custom Event. | |
delete_timeline_event | delete | region | Deletes a timeline event from an incident. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
eventId | string | The ID of the event. You can get an event's ID when you create it, or by using ListTimelineEvents. |
incidentRecordArn | string | The Amazon Resource Name (ARN) of the incident that includes the timeline event. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_timeline_event
- list_timeline_events
Retrieves a timeline event based on its ID and incident record.
SELECT
event_data,
event_id,
event_references,
event_time,
event_type,
event_updated_time,
incident_record_arn
FROM aws.ssm_incidents.timeline_events
WHERE eventId = '{{ eventId }}' -- required
AND incidentRecordArn = '{{ incidentRecordArn }}' -- required
AND region = '{{ region }}' -- required
;
Lists timeline events for the specified incident record.
SELECT
event_id,
event_references,
event_time,
event_type,
event_updated_time,
incident_record_arn
FROM aws.ssm_incidents.timeline_events
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_timeline_event
- Manifest
Creates a custom timeline event on the incident details page of an incident record. Incident Manager automatically creates timeline events that mark key moments during an incident. You can create custom timeline events to mark important events that Incident Manager can detect automatically.
INSERT INTO aws.ssm_incidents.timeline_events (
clientToken,
eventData,
eventReferences,
eventTime,
eventType,
incidentRecordArn,
region
)
SELECT
'{{ clientToken }}',
'{{ eventData }}' /* required */,
'{{ eventReferences }}',
'{{ eventTime }}' /* required */,
'{{ eventType }}' /* required */,
'{{ incidentRecordArn }}' /* required */,
'{{ region }}'
RETURNING
event_id,
incident_record_arn
;
# Description fields are for documentation purposes
- name: timeline_events
props:
- name: region
value: "{{ region }}"
description: Required parameter for the timeline_events resource.
- name: clientToken
value: "{{ clientToken }}"
- name: eventData
value: "{{ eventData }}"
- name: eventReferences
value:
- relatedItemId: "{{ relatedItemId }}"
resource: "{{ resource }}"
- name: eventTime
value: "{{ eventTime }}"
- name: eventType
value: "{{ eventType }}"
- name: incidentRecordArn
value: "{{ incidentRecordArn }}"
UPDATE examples
- update_timeline_event
Updates a timeline event. You can update events of type Custom Event.
UPDATE aws.ssm_incidents.timeline_events
SET
clientToken = '{{ clientToken }}',
eventData = '{{ eventData }}',
eventId = '{{ eventId }}',
eventReferences = '{{ eventReferences }}',
eventTime = '{{ eventTime }}',
eventType = '{{ eventType }}',
incidentRecordArn = '{{ incidentRecordArn }}'
WHERE
region = '{{ region }}' --required
AND eventId = '{{ eventId }}' --required
AND incidentRecordArn = '{{ incidentRecordArn }}' --required;
DELETE examples
- delete_timeline_event
Deletes a timeline event from an incident.
DELETE FROM aws.ssm_incidents.timeline_events
WHERE region = '{{ region }}' --required
;