/AWS1/IF_CWS=>LISTSERVICELEVELOBJECTIVES()¶
About ListServiceLevelObjectives¶
Returns a list of SLOs created in this account.
Method Signature¶
METHODS /AWS1/IF_CWS~LISTSERVICELEVELOBJECTIVES
  IMPORTING
    !IT_KEYATTRIBUTES TYPE /AWS1/CL_CWSATTRIBUTES_W=>TT_ATTRIBUTES OPTIONAL
    !IV_OPERATIONNAME TYPE /AWS1/CWSOPERATIONNAME OPTIONAL
    !IO_DEPENDENCYCONFIG TYPE REF TO /AWS1/CL_CWSDEPENDENCYCONFIG OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/CWSLSTSVCLEVELOBJIVESM00 OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/CWSNEXTTOKEN OPTIONAL
    !IV_INCLUDELINKEDACCOUNTS TYPE /AWS1/CWSBOOLEAN OPTIONAL
    !IV_SLOOWNERAWSACCOUNTID TYPE /AWS1/CWSAWSACCOUNTID OPTIONAL
    !IT_METRICSOURCETYPES TYPE /AWS1/CL_CWSMETOURCETYPES_W=>TT_METRICSOURCETYPES OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cwslstsvclevelobjiv01
  RAISING
    /AWS1/CX_CWSTHROTTLINGEX
    /AWS1/CX_CWSVALIDATIONEX
    /AWS1/CX_CWSCLIENTEXC
    /AWS1/CX_CWSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
it_keyattributes TYPE /AWS1/CL_CWSATTRIBUTES_W=>TT_ATTRIBUTES TT_ATTRIBUTES¶
You can use this optional field to specify which services you want to retrieve SLO information for.
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.
iv_operationname TYPE /AWS1/CWSOPERATIONNAME /AWS1/CWSOPERATIONNAME¶
The name of the operation that this SLO is associated with.
io_dependencyconfig TYPE REF TO /AWS1/CL_CWSDEPENDENCYCONFIG /AWS1/CL_CWSDEPENDENCYCONFIG¶
Identifies the dependency using the
DependencyKeyAttributesandDependencyOperationName.
iv_maxresults TYPE /AWS1/CWSLSTSVCLEVELOBJIVESM00 /AWS1/CWSLSTSVCLEVELOBJIVESM00¶
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 level objectives.
iv_includelinkedaccounts TYPE /AWS1/CWSBOOLEAN /AWS1/CWSBOOLEAN¶
If you are using this operation in a monitoring account, specify
trueto include SLO from source accounts in the returned data.When you are monitoring an account, you can use Amazon Web Services account ID in
KeyAttributefilter for service source account andSloOwnerawsaccountIDfor SLO source account withIncludeLinkedAccountsto filter the returned data to only a single source account.
iv_sloownerawsaccountid TYPE /AWS1/CWSAWSACCOUNTID /AWS1/CWSAWSACCOUNTID¶
SLO's Amazon Web Services account ID.
it_metricsourcetypes TYPE /AWS1/CL_CWSMETOURCETYPES_W=>TT_METRICSOURCETYPES TT_METRICSOURCETYPES¶
Use this optional field to only include SLOs with the specified metric source types in the output. Supported types are:
Service operation
Service dependency
CloudWatch metric
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cwslstsvclevelobjiv01 /AWS1/CL_CWSLSTSVCLEVELOBJIV01¶
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->listservicelevelobjectives(
  io_dependencyconfig = new /aws1/cl_cwsdependencyconfig(
    it_dependencykeyattributes = 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_dependencyoperationname = |string|
  )
  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|
      )
    )
  )
  it_metricsourcetypes = VALUE /aws1/cl_cwsmetourcetypes_w=>tt_metricsourcetypes(
    ( new /aws1/cl_cwsmetourcetypes_w( |string| ) )
  )
  iv_includelinkedaccounts = ABAP_TRUE
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_operationname = |string|
  iv_sloownerawsaccountid = |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_slosummaries( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_servicelevelobjectivear = lo_row_1->get_arn( ).
      lv_servicelevelobjectivena = lo_row_1->get_name( ).
      LOOP AT lo_row_1->get_keyattributes( ) 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_operationname( ).
      lo_dependencyconfig = lo_row_1->get_dependencyconfig( ).
      IF lo_dependencyconfig IS NOT INITIAL.
        LOOP AT lo_dependencyconfig->get_dependencykeyattributes( ) 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_dependencyconfig->get_dependencyoperationname( ).
      ENDIF.
      lv_timestamp = lo_row_1->get_createdtime( ).
      lv_evaluationtype = lo_row_1->get_evaluationtype( ).
      lv_metricsourcetype = lo_row_1->get_metricsourcetype( ).
    ENDIF.
  ENDLOOP.
  lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.