/AWS1/IF_LOM=>CREATEALERT()¶
About CreateAlert¶
Creates an alert for an anomaly detector.
Method Signature¶
METHODS /AWS1/IF_LOM~CREATEALERT
IMPORTING
!IV_ALERTNAME TYPE /AWS1/LOMALERTNAME OPTIONAL
!IV_ALERTSENSITIVITYTHRESHOLD TYPE /AWS1/LOMSENSITIVITYTHRESHOLD OPTIONAL
!IV_ALERTDESCRIPTION TYPE /AWS1/LOMALERTDESCRIPTION OPTIONAL
!IV_ANOMALYDETECTORARN TYPE /AWS1/LOMARN OPTIONAL
!IO_ACTION TYPE REF TO /AWS1/CL_LOMACTION OPTIONAL
!IT_TAGS TYPE /AWS1/CL_LOMTAGMAP_W=>TT_TAGMAP OPTIONAL
!IO_ALERTFILTERS TYPE REF TO /AWS1/CL_LOMALERTFILTERS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lomcreatealertrsp
RAISING
/AWS1/CX_LOMACCESSDENIEDEX
/AWS1/CX_LOMCONFLICTEXCEPTION
/AWS1/CX_LOMINTERNALSERVEREX
/AWS1/CX_LOMRESOURCENOTFOUNDEX
/AWS1/CX_LOMSERVICEQUOTAEXCDEX
/AWS1/CX_LOMTOOMANYREQUESTSEX
/AWS1/CX_LOMVALIDATIONEX
/AWS1/CX_LOMCLIENTEXC
/AWS1/CX_LOMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_alertname TYPE /AWS1/LOMALERTNAME /AWS1/LOMALERTNAME¶
The name of the alert.
iv_anomalydetectorarn TYPE /AWS1/LOMARN /AWS1/LOMARN¶
The ARN of the detector to which the alert is attached.
io_action TYPE REF TO /AWS1/CL_LOMACTION /AWS1/CL_LOMACTION¶
Action that will be triggered when there is an alert.
Optional arguments:¶
iv_alertsensitivitythreshold TYPE /AWS1/LOMSENSITIVITYTHRESHOLD /AWS1/LOMSENSITIVITYTHRESHOLD¶
An integer from 0 to 100 specifying the alert sensitivity threshold.
iv_alertdescription TYPE /AWS1/LOMALERTDESCRIPTION /AWS1/LOMALERTDESCRIPTION¶
A description of the alert.
it_tags TYPE /AWS1/CL_LOMTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
A list of tags to apply to the alert.
io_alertfilters TYPE REF TO /AWS1/CL_LOMALERTFILTERS /AWS1/CL_LOMALERTFILTERS¶
The configuration of the alert filters, containing MetricList and DimensionFilterList.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lomcreatealertrsp /AWS1/CL_LOMCREATEALERTRSP¶
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->createalert(
io_action = new /aws1/cl_lomaction(
io_lambdaconfiguration = new /aws1/cl_lomlambdaconf(
iv_lambdaarn = |string|
iv_rolearn = |string|
)
io_snsconfiguration = new /aws1/cl_lomsnsconfiguration(
iv_rolearn = |string|
iv_snsformat = |string|
iv_snstopicarn = |string|
)
)
io_alertfilters = new /aws1/cl_lomalertfilters(
it_dimensionfilterlist = VALUE /aws1/cl_lomdimensionfilter=>tt_dimensionfilterlist(
(
new /aws1/cl_lomdimensionfilter(
it_dimensionvaluelist = VALUE /aws1/cl_lomdimensionvallist_w=>tt_dimensionvaluelist(
( new /aws1/cl_lomdimensionvallist_w( |string| ) )
)
iv_dimensionname = |string|
)
)
)
it_metriclist = VALUE /aws1/cl_lommetricnamelist_w=>tt_metricnamelist(
( new /aws1/cl_lommetricnamelist_w( |string| ) )
)
)
it_tags = VALUE /aws1/cl_lomtagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_lomtagmap_w=>ts_tagmap_maprow(
key = |string|
value = new /aws1/cl_lomtagmap_w( |string| )
)
)
)
iv_alertdescription = |string|
iv_alertname = |string|
iv_alertsensitivitythreshold = 123
iv_anomalydetectorarn = |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_alertarn( ).
ENDIF.