Skip to content

/AWS1/CL_SGM=>LISTCLUSTEREVENTS()

About ListClusterEvents

Retrieves a list of event summaries for a specified HyperPod cluster. The operation supports filtering, sorting, and pagination of results. This functionality is only supported when the NodeProvisioningMode is set to Continuous.

Method Signature

IMPORTING

Required arguments:

iv_clustername TYPE /AWS1/SGMCLUSTERNAMEORARN /AWS1/SGMCLUSTERNAMEORARN

The name or Amazon Resource Name (ARN) of the HyperPod cluster for which to list events.

Optional arguments:

iv_instancegroupname TYPE /AWS1/SGMCLUSTERINSTGROUPNAME /AWS1/SGMCLUSTERINSTGROUPNAME

The name of the instance group to filter events. If specified, only events related to this instance group are returned.

iv_nodeid TYPE /AWS1/SGMCLUSTERNODEID /AWS1/SGMCLUSTERNODEID

The EC2 instance ID to filter events. If specified, only events related to this instance are returned.

iv_eventtimeafter TYPE /AWS1/SGMTIMESTAMP /AWS1/SGMTIMESTAMP

The start of the time range for filtering events. Only events that occurred after this time are included in the results.

iv_eventtimebefore TYPE /AWS1/SGMTIMESTAMP /AWS1/SGMTIMESTAMP

The end of the time range for filtering events. Only events that occurred before this time are included in the results.

iv_sortby TYPE /AWS1/SGMEVENTSORTBY /AWS1/SGMEVENTSORTBY

The field to use for sorting the event list. Currently, the only supported value is EventTime.

iv_sortorder TYPE /AWS1/SGMSORTORDER /AWS1/SGMSORTORDER

The order in which to sort the results. Valid values are Ascending or Descending (the default is Descending).

iv_resourcetype TYPE /AWS1/SGMCLUSTEREVENTRESTYPE /AWS1/SGMCLUSTEREVENTRESTYPE

The type of resource for which to filter events. Valid values are Cluster, InstanceGroup, or Instance.

iv_maxresults TYPE /AWS1/SGMCLUSTEVENTMAXRESULTS /AWS1/SGMCLUSTEVENTMAXRESULTS

The maximum number of events to return in the response. Valid range is 1 to 100.

iv_nexttoken TYPE /AWS1/SGMNEXTTOKEN /AWS1/SGMNEXTTOKEN

A token to retrieve the next set of results. This token is obtained from the output of a previous ListClusterEvents call.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgmlistclusteventsrsp /AWS1/CL_SGMLISTCLUSTEVENTSRSP

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_sgm~listclusterevents(
  iv_clustername = |string|
  iv_eventtimeafter = '20150101000000.0000000'
  iv_eventtimebefore = '20150101000000.0000000'
  iv_instancegroupname = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_nodeid = |string|
  iv_resourcetype = |string|
  iv_sortby = |string|
  iv_sortorder = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_nexttoken = lo_result->get_nexttoken( ).
  LOOP AT lo_result->get_events( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_eventid = lo_row_1->get_eventid( ).
      lv_clusterarn = lo_row_1->get_clusterarn( ).
      lv_clustername = lo_row_1->get_clustername( ).
      lv_clusterinstancegroupnam = lo_row_1->get_instancegroupname( ).
      lv_string = lo_row_1->get_instanceid( ).
      lv_clustereventresourcetyp = lo_row_1->get_resourcetype( ).
      lv_timestamp = lo_row_1->get_eventtime( ).
      lv_string = lo_row_1->get_description( ).
    ENDIF.
  ENDLOOP.
ENDIF.