Skip to content

/AWS1/IF_EC2=>ENABLEAPPSTATUSCHECKSUPRSN()

About EnableApplicationStatusCheckSuppression

Suppresses application status checks for the specified instances. While suppressed, health checks continue to run but do not affect the instance-level application status. The following rules apply:

  • Maximum 100 instance IDs per request.

  • Use DisableApplicationStatusCheckSuppression to resume normal health check reporting.

  • If you do not specify DurationSeconds, suppression continues indefinitely until you call DisableApplicationStatusCheckSuppression.

Method Signature

METHODS /AWS1/IF_EC2~ENABLEAPPSTATUSCHECKSUPRSN
  IMPORTING
    !IT_INSTANCEIDS TYPE /AWS1/CL_EC2INSTANCEIDLIST_W=>TT_INSTANCEIDLIST OPTIONAL
    !IV_DURATIONSECONDS TYPE /AWS1/EC2BOXEDINTEGER OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/EC2STRING OPTIONAL
    !IV_DRYRUN TYPE /AWS1/EC2BOOLEAN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ec2enbapptatuschxprrs
  RAISING
    /AWS1/CX_EC2CLIENTEXC
    /AWS1/CX_EC2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

it_instanceids TYPE /AWS1/CL_EC2INSTANCEIDLIST_W=>TT_INSTANCEIDLIST TT_INSTANCEIDLIST

The IDs of the instances for which to suppress application status checks.

iv_durationseconds TYPE /AWS1/EC2BOXEDINTEGER /AWS1/EC2BOXEDINTEGER

The duration, in seconds, for which to suppress application status checks. If omitted, the application status check is suppressed indefinitely until you call DisableApplicationStatusCheckSuppression.

iv_clienttoken TYPE /AWS1/EC2STRING /AWS1/EC2STRING

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

iv_dryrun TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN

Checks whether you have the required permissions for the operation, 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.

RETURNING

oo_output TYPE REF TO /aws1/cl_ec2enbapptatuschxprrs /AWS1/CL_EC2ENBAPPTATUSCHXPRRS

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->enableappstatuschecksuprsn(
  it_instanceids = VALUE /aws1/cl_ec2instanceidlist_w=>tt_instanceidlist(
    ( new /aws1/cl_ec2instanceidlist_w( |string| ) )
  )
  iv_clienttoken = |string|
  iv_dryrun = ABAP_TRUE
  iv_durationseconds = 123
).

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_successfulresults( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_instanceid = lo_row_1->get_instanceid( ).
      lv_milliseconddatetime = lo_row_1->get_suppressat( ).
      lv_milliseconddatetime = lo_row_1->get_resumeat( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_unsuccessfulresults( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_instanceid = lo_row_3->get_instanceid( ).
      lv_milliseconddatetime = lo_row_3->get_suppressat( ).
      lv_milliseconddatetime = lo_row_3->get_resumeat( ).
      lv_string = lo_row_3->get_reason( ).
    ENDIF.
  ENDLOOP.
ENDIF.

To enable application status check suppression

This example suppresses application status check reporting for the specified instance for one hour.

DATA(lo_result) = lo_client->enableappstatuschecksuprsn(
  it_instanceids = VALUE /aws1/cl_ec2instanceidlist_w=>tt_instanceidlist(
    ( new /aws1/cl_ec2instanceidlist_w( |i-0123456789abcdef0| ) )
  )
  iv_durationseconds = 3600
).