Skip to content

/AWS1/IF_EC2=>UPDATECAPMANAGERMNTRDTAGKEYS()

About UpdateCapacityManagerMonitoredTagKeys

Activates or deactivates tag keys for monitoring by EC2 Capacity Manager. Activated tag keys are included as dimensions in capacity metric data, enabling you to group and filter metrics by tag values.

Method Signature

METHODS /AWS1/IF_EC2~UPDATECAPMANAGERMNTRDTAGKEYS
  IMPORTING
    !IT_ACTIVATETAGKEYS TYPE /AWS1/CL_EC2VALUESTRINGLIST_W=>TT_VALUESTRINGLIST OPTIONAL
    !IT_DEACTIVATETAGKEYS TYPE /AWS1/CL_EC2VALUESTRINGLIST_W=>TT_VALUESTRINGLIST OPTIONAL
    !IV_DRYRUN TYPE /AWS1/EC2BOOLEAN OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/EC2STRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ec2upcapmgrmontagke01
  RAISING
    /AWS1/CX_EC2CLIENTEXC
    /AWS1/CX_EC2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

it_activatetagkeys TYPE /AWS1/CL_EC2VALUESTRINGLIST_W=>TT_VALUESTRINGLIST TT_VALUESTRINGLIST

The tag keys to activate for monitoring. Once activated, these tag keys will be included as dimensions in capacity metric data.

it_deactivatetagkeys TYPE /AWS1/CL_EC2VALUESTRINGLIST_W=>TT_VALUESTRINGLIST TT_VALUESTRINGLIST

The tag keys to deactivate. Deactivated tag keys will no longer be included as dimensions in capacity metric data.

iv_dryrun TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

iv_clienttoken TYPE /AWS1/EC2STRING /AWS1/EC2STRING

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

RETURNING

oo_output TYPE REF TO /aws1/cl_ec2upcapmgrmontagke01 /AWS1/CL_EC2UPCAPMGRMONTAGKE01

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->updatecapmanagermntrdtagkeys(
  it_activatetagkeys = VALUE /aws1/cl_ec2valuestringlist_w=>tt_valuestringlist(
    ( new /aws1/cl_ec2valuestringlist_w( |string| ) )
  )
  it_deactivatetagkeys = VALUE /aws1/cl_ec2valuestringlist_w=>tt_valuestringlist(
    ( new /aws1/cl_ec2valuestringlist_w( |string| ) )
  )
  iv_clienttoken = |string|
  iv_dryrun = ABAP_TRUE
).

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_capacitymanagertagkeys( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_string = lo_row_1->get_tagkey( ).
      lv_capacitymanagermonitore = lo_row_1->get_status( ).
      lv_string = lo_row_1->get_statusmessage( ).
      lv_boolean = lo_row_1->get_capacitymanagerprovided( ).
      lv_milliseconddatetime = lo_row_1->get_earliestdatapointtsmp( ).
    ENDIF.
  ENDLOOP.
ENDIF.