/AWS1/IF_CWT=>LISTALARMMUTERULES()¶
About ListAlarmMuteRules¶
Lists alarm mute rules in your Amazon Web Services account and region.
You can filter the results by alarm name to find all mute rules targeting a specific alarm, or by status to find rules that are scheduled, active, or expired.
This operation supports pagination for accounts with many mute rules. Use the MaxRecords and NextToken parameters to retrieve results in multiple calls.
Permissions
To list mute rules, you need the cloudwatch:ListAlarmMuteRules permission.
Method Signature¶
METHODS /AWS1/IF_CWT~LISTALARMMUTERULES
IMPORTING
!IV_ALARMNAME TYPE /AWS1/CWTNAME OPTIONAL
!IT_STATUSES TYPE /AWS1/CL_CWTALARMMUTERLSTATS_W=>TT_ALARMMUTERULESTATUSES OPTIONAL
!IV_MAXRECORDS TYPE /AWS1/CWTMAXRECORDS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/CWTNEXTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cwtlistalrmmuterlsout
RAISING
/AWS1/CX_CWTINVALIDNEXTTOKEN
/AWS1/CX_CWTRESOURCENOTFOUNDEX
/AWS1/CX_CWTCLIENTEXC
/AWS1/CX_CWTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_alarmname TYPE /AWS1/CWTNAME /AWS1/CWTNAME¶
Filter results to show only mute rules that target the specified alarm name.
it_statuses TYPE /AWS1/CL_CWTALARMMUTERLSTATS_W=>TT_ALARMMUTERULESTATUSES TT_ALARMMUTERULESTATUSES¶
Filter results to show only mute rules with the specified statuses. Valid values are
SCHEDULED,ACTIVE, orEXPIRED.
iv_maxrecords TYPE /AWS1/CWTMAXRECORDS /AWS1/CWTMAXRECORDS¶
The maximum number of mute rules to return in one call. The default is 50.
iv_nexttoken TYPE /AWS1/CWTNEXTTOKEN /AWS1/CWTNEXTTOKEN¶
The token returned from a previous call to indicate where to continue retrieving results.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cwtlistalrmmuterlsout /AWS1/CL_CWTLISTALRMMUTERLSOUT¶
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->listalarmmuterules(
it_statuses = VALUE /aws1/cl_cwtalarmmuterlstats_w=>tt_alarmmuterulestatuses(
( new /aws1/cl_cwtalarmmuterlstats_w( |string| ) )
)
iv_alarmname = |string|
iv_maxrecords = 123
iv_nexttoken = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_alarmmuterulesummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_arn = lo_row_1->get_alarmmuterulearn( ).
lv_timestamp = lo_row_1->get_expiredate( ).
lv_alarmmuterulestatus = lo_row_1->get_status( ).
lv_mutetype = lo_row_1->get_mutetype( ).
lv_timestamp = lo_row_1->get_lastupdatedtimestamp( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.