Skip to content

/AWS1/IF_EC2=>DISASSOCIATEAPPSTATUSCHECK()

About DisassociateApplicationStatusCheck

Disassociates an application status check from instances or tags. After disassociation, health monitoring stops for the affected instances. The following rules apply:

  • You must specify either TargetTagAssociations or InstanceIds, but not both. Specifying both results in an InvalidParameterCombination error.

  • The application status check must already exist and belong to your account.

  • Tag keys must not be blank.

Method Signature

METHODS /AWS1/IF_EC2~DISASSOCIATEAPPSTATUSCHECK
  IMPORTING
    !IV_APPLICATIONSTATUSCHECKID TYPE /AWS1/EC2APPSTATUSCHECKID OPTIONAL
    !IT_TARGETTAGASSOCIATIONS TYPE /AWS1/CL_EC2CUSTTAGKYVALREQPAR=>TT_CUSTOMKEYVALUEPAIRREQSET OPTIONAL
    !IT_INSTANCEIDS TYPE /AWS1/CL_EC2INSTANCEIDLIST_W=>TT_INSTANCEIDLIST OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/EC2STRING OPTIONAL
    !IV_DRYRUN TYPE /AWS1/EC2BOOLEAN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ec2disapptatuscheckrs
  RAISING
    /AWS1/CX_EC2CLIENTEXC
    /AWS1/CX_EC2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_applicationstatuscheckid TYPE /AWS1/EC2APPSTATUSCHECKID /AWS1/EC2APPSTATUSCHECKID

The ID of the application status check to disassociate.

Optional arguments:

it_targettagassociations TYPE /AWS1/CL_EC2CUSTTAGKYVALREQPAR=>TT_CUSTOMKEYVALUEPAIRREQSET TT_CUSTOMKEYVALUEPAIRREQSET

The tags to disassociate from the application status check. Specify the same key-value pairs that were used during association.

it_instanceids TYPE /AWS1/CL_EC2INSTANCEIDLIST_W=>TT_INSTANCEIDLIST TT_INSTANCEIDLIST

The IDs of the instances to disassociate from the application status check.

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_ec2disapptatuscheckrs /AWS1/CL_EC2DISAPPTATUSCHECKRS

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->disassociateappstatuscheck(
  it_instanceids = VALUE /aws1/cl_ec2instanceidlist_w=>tt_instanceidlist(
    ( new /aws1/cl_ec2instanceidlist_w( |string| ) )
  )
  it_targettagassociations = VALUE /aws1/cl_ec2custtagkyvalreqpar=>tt_customkeyvaluepairreqset(
    (
      new /aws1/cl_ec2custtagkyvalreqpar(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_applicationstatuscheckid = |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_successfulresults( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_applicationstatuschecki = lo_row_1->get_applicationstatuscheckid( ).
      lv_string = lo_row_1->get_associationtype( ).
      lv_string = lo_row_1->get_associationvalue( ).
    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_applicationstatuschecki = lo_row_3->get_applicationstatuscheckid( ).
      lv_string = lo_row_3->get_associationtype( ).
      lv_string = lo_row_3->get_associationvalue( ).
      lv_string = lo_row_3->get_reason( ).
    ENDIF.
  ENDLOOP.
ENDIF.

To disassociate an application status check from tags

This example disassociates an application status check from instances matching the specified tag.

DATA(lo_result) = lo_client->disassociateappstatuscheck(
  it_targettagassociations = VALUE /aws1/cl_ec2custtagkyvalreqpar=>tt_customkeyvaluepairreqset(
    (
      new /aws1/cl_ec2custtagkyvalreqpar(
        iv_key = |env|
        iv_value = |prod|
      )
    )
  )
  iv_applicationstatuscheckid = |asc-0123456789abcdef0|
).