/AWS1/IF_CWS=>LISTSERVICEDEPENDENTS()¶
About ListServiceDependents¶
Returns the list of dependents that invoked the specified service during the provided time range. Dependents include other services, CloudWatch Synthetics canaries, and clients that are instrumented with CloudWatch RUM app monitors.
Method Signature¶
METHODS /AWS1/IF_CWS~LISTSERVICEDEPENDENTS
IMPORTING
!IV_STARTTIME TYPE /AWS1/CWSTIMESTAMP OPTIONAL
!IV_ENDTIME TYPE /AWS1/CWSTIMESTAMP OPTIONAL
!IT_KEYATTRIBUTES TYPE /AWS1/CL_CWSATTRIBUTES_W=>TT_ATTRIBUTES OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/CWSLSTSVCDEPENDENTSMAX00 OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/CWSNEXTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cwslstsvcdependents01
RAISING
/AWS1/CX_CWSTHROTTLINGEX
/AWS1/CX_CWSVALIDATIONEX
/AWS1/CX_CWSCLIENTEXC
/AWS1/CX_CWSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_starttime TYPE /AWS1/CWSTIMESTAMP /AWS1/CWSTIMESTAMP¶
The start of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057Your requested start time will be rounded to the nearest hour.
iv_endtime TYPE /AWS1/CWSTIMESTAMP /AWS1/CWSTIMESTAMP¶
The end of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057Your requested start time will be rounded to the nearest hour.
it_keyattributes TYPE /AWS1/CL_CWSATTRIBUTES_W=>TT_ATTRIBUTES TT_ATTRIBUTES¶
Use this field to specify which service you want to retrieve information for. You must specify at least the
Type,Name, andEnvironmentattributes.This is a string-to-string map. It can include the following fields.
Typedesignates the type of object this is.
ResourceTypespecifies the type of the resource. This field is used only when the value of theTypefield isResourceorAWS::Resource.
Namespecifies the name of the object. This is used only if the value of theTypefield isService,RemoteService, orAWS::Service.
Identifieridentifies the resource objects of this resource. This is used only if the value of theTypefield isResourceorAWS::Resource.
Environmentspecifies the location where this object is hosted, or what it belongs to.
Optional arguments:¶
iv_maxresults TYPE /AWS1/CWSLSTSVCDEPENDENTSMAX00 /AWS1/CWSLSTSVCDEPENDENTSMAX00¶
The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.
iv_nexttoken TYPE /AWS1/CWSNEXTTOKEN /AWS1/CWSNEXTTOKEN¶
Include this value, if it was returned by the previous operation, to get the next set of service dependents.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cwslstsvcdependents01 /AWS1/CL_CWSLSTSVCDEPENDENTS01¶
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->listservicedependents(
it_keyattributes = VALUE /aws1/cl_cwsattributes_w=>tt_attributes(
(
VALUE /aws1/cl_cwsattributes_w=>ts_attributes_maprow(
value = new /aws1/cl_cwsattributes_w( |string| )
key = |string|
)
)
)
iv_endtime = '20150101000000.0000000'
iv_maxresults = 123
iv_nexttoken = |string|
iv_starttime = '20150101000000.0000000'
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_timestamp = lo_result->get_starttime( ).
lv_timestamp = lo_result->get_endtime( ).
LOOP AT lo_result->get_servicedependents( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_operationname = lo_row_1->get_operationname( ).
LOOP AT lo_row_1->get_dependentkeyattributes( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_keyattributevalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_operationname = lo_row_1->get_dependentoperationname( ).
LOOP AT lo_row_1->get_metricreferences( ) into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lv_namespace = lo_row_4->get_namespace( ).
lv_metrictype = lo_row_4->get_metrictype( ).
LOOP AT lo_row_4->get_dimensions( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_dimensionname = lo_row_6->get_name( ).
lv_dimensionvalue = lo_row_6->get_value( ).
ENDIF.
ENDLOOP.
lv_metricname = lo_row_4->get_metricname( ).
lv_awsaccountid = lo_row_4->get_accountid( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.