Skip to content

/AWS1/IF_CNT=>UPDATEMETRICCONTENT()

About UpdateMetricContent

Updates the calculation, unit, and/or trend indicator of an existing metric in the specified Connect Customer instance.

Method Signature

METHODS /AWS1/IF_CNT~UPDATEMETRICCONTENT
  IMPORTING
    !IV_INSTANCEID TYPE /AWS1/CNTINSTANCEID OPTIONAL
    !IV_METRICID TYPE /AWS1/CNTMETRICID OPTIONAL
    !IO_METRICCALCULATION TYPE REF TO /AWS1/CL_CNTMETRICCALCULATION OPTIONAL
    !IV_UNIT TYPE /AWS1/CNTMETRICUNIT OPTIONAL
    !IV_POSITIVETRENDINDICATOR TYPE /AWS1/CNTTRENDINDICATOR OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cntupdmetriccontrsp
  RAISING
    /AWS1/CX_CNTACCESSDENIEDEX
    /AWS1/CX_CNTINTERNALSERVICEEX
    /AWS1/CX_CNTINVALIDPARAMETEREX
    /AWS1/CX_CNTINVALIDREQUESTEX
    /AWS1/CX_CNTRESOURCENOTFOUNDEX
    /AWS1/CX_CNTTHROTTLINGEX
    /AWS1/CX_CNTCLIENTEXC
    /AWS1/CX_CNTSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_instanceid TYPE /AWS1/CNTINSTANCEID /AWS1/CNTINSTANCEID

The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

iv_metricid TYPE /AWS1/CNTMETRICID /AWS1/CNTMETRICID

The identifier of the metric to update. Adding the $SAVED qualifier will update the saved version of the metric. Adding $LATEST or omitting a qualifier will update the published version.

Optional arguments:

io_metriccalculation TYPE REF TO /AWS1/CL_CNTMETRICCALCULATION /AWS1/CL_CNTMETRICCALCULATION

The updated calculation definition for the metric.

iv_unit TYPE /AWS1/CNTMETRICUNIT /AWS1/CNTMETRICUNIT

The updated display unit for the metric.

iv_positivetrendindicator TYPE /AWS1/CNTTRENDINDICATOR /AWS1/CNTTRENDINDICATOR

How an increase in the metric value should be interpreted. Valid values: POSITIVE, NEUTRAL, NEGATIVE.

RETURNING

oo_output TYPE REF TO /aws1/cl_cntupdmetriccontrsp /AWS1/CL_CNTUPDMETRICCONTRSP

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->updatemetriccontent(
  io_metriccalculation = new /aws1/cl_cntmetriccalculation(
    it_calculationcomponents = VALUE /aws1/cl_cntcalccomponent=>tt_calculationcomponentlist(
      (
        new /aws1/cl_cntcalccomponent(
          it_metricfilters = VALUE /aws1/cl_cntmetricfilter=>tt_metricfilterlist(
            (
              new /aws1/cl_cntmetricfilter(
                io_booleancondition = new /aws1/cl_cntmetrcfilterblncond( |string| )
                io_numbercondition = new /aws1/cl_cntmetrcfilternumcond(
                  it_values = VALUE /aws1/cl_cntnumbervaluelist_w=>tt_numbervaluelist(
                    ( new /aws1/cl_cntnumbervaluelist_w( |0.1| ) )
                  )
                  iv_comparison = |string|
                )
                io_stringcondition = new /aws1/cl_cntmetrcfiltstrcond(
                  it_values = VALUE /aws1/cl_cntstringvaluelist_w=>tt_stringvaluelist(
                    ( new /aws1/cl_cntstringvaluelist_w( |string| ) )
                  )
                  iv_comparison = |string|
                )
                iv_metricfilterkey = |string|
                iv_negate = ABAP_TRUE
              )
            )
          )
          iv_alias = |string|
          iv_metricid = |string|
          iv_metricname = |string|
        )
      )
    )
    iv_calculation = |string|
  )
  iv_instanceid = |string|
  iv_metricid = |string|
  iv_positivetrendindicator = |string|
  iv_unit = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.