Skip to content

/AWS1/CL_SMI=>CREATETIMELINEEVENT()

About CreateTimelineEvent

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.

Method Signature

IMPORTING

Required arguments:

iv_incidentrecordarn TYPE /AWS1/SMIARN /AWS1/SMIARN

The Amazon Resource Name (ARN) of the incident record that the action adds the incident to.

iv_eventtime TYPE /AWS1/SMITIMESTAMP /AWS1/SMITIMESTAMP

The timestamp for when the event occurred.

iv_eventtype TYPE /AWS1/SMITIMELINEEVENTTYPE /AWS1/SMITIMELINEEVENTTYPE

The type of event. You can create timeline events of type Custom Event and Note.

To make a Note-type event appear on the Incident notes panel in the console, specify eventType as Noteand enter the Amazon Resource Name (ARN) of the incident as the value for eventReference.

iv_eventdata TYPE /AWS1/SMIEVENTDATA /AWS1/SMIEVENTDATA

A short description of the event.

Optional arguments:

iv_clienttoken TYPE /AWS1/SMICLIENTTOKEN /AWS1/SMICLIENTTOKEN

A token that ensures that a client calls the action only once with the specified details.

it_eventreferences TYPE /AWS1/CL_SMIEVENTREFERENCE=>TT_EVENTREFERENCELIST TT_EVENTREFERENCELIST

Adds one or more references to the TimelineEvent. A reference is an Amazon Web Services resource involved or associated with the incident. To specify a reference, enter its Amazon Resource Name (ARN). You can also specify a related item associated with a resource. For example, to specify an Amazon DynamoDB (DynamoDB) table as a resource, use the table's ARN. You can also specify an Amazon CloudWatch metric associated with the DynamoDB table as a related item.

RETURNING

oo_output TYPE REF TO /aws1/cl_smicretimelineevtout /AWS1/CL_SMICRETIMELINEEVTOUT

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_smi~createtimelineevent(
  it_eventreferences = VALUE /aws1/cl_smieventreference=>tt_eventreferencelist(
    (
      new /aws1/cl_smieventreference(
        iv_relateditemid = |string|
        iv_resource = |string|
      )
    )
  )
  iv_clienttoken = |string|
  iv_eventdata = |string|
  iv_eventtime = '20150101000000.0000000'
  iv_eventtype = |string|
  iv_incidentrecordarn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_arn = lo_result->get_incidentrecordarn( ).
  lv_uuid = lo_result->get_eventid( ).
ENDIF.