Skip to content

/AWS1/IF_EC2=>MODIFYAPPLICATIONSTATUSCHECK()

About ModifyApplicationStatusCheck

Modifies an existing application status check. You can update the protocol, port, path, thresholds, and other configuration settings. The following rules apply:

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

  • Changes take effect on the next health check interval.

Method Signature

METHODS /AWS1/IF_EC2~MODIFYAPPLICATIONSTATUSCHECK
  IMPORTING
    !IV_APPLICATIONSTATUSCHECKID TYPE /AWS1/EC2APPSTATUSCHECKID OPTIONAL
    !IV_AGGREGATION TYPE /AWS1/EC2AGGREGATIONSTATUSENUM OPTIONAL
    !IT_HEALTHCHECKPATHS TYPE /AWS1/CL_EC2HLTHCHKPATHREQOBJ=>TT_HEALTHCHECKPATHREQUESTLIST OPTIONAL
    !IV_PROTOCOL TYPE /AWS1/EC2NETWORKPROTOCOLENUM OPTIONAL
    !IV_PORT TYPE /AWS1/EC2PORTNUMBER OPTIONAL
    !IV_PATH TYPE /AWS1/EC2STRING OPTIONAL
    !IV_DEVICEINDEX TYPE /AWS1/EC2INTEGER OPTIONAL
    !IV_IPVERSION TYPE /AWS1/EC2IPVERSIONENUM OPTIONAL
    !IV_IPSCOPE TYPE /AWS1/EC2IPSCOPEENUM OPTIONAL
    !IV_INTERVAL TYPE /AWS1/EC2INTEGER OPTIONAL
    !IV_TIMEOUT TYPE /AWS1/EC2INTEGER OPTIONAL
    !IV_FAILURETHRESHOLD TYPE /AWS1/EC2INTEGER OPTIONAL
    !IV_SUCCESSTHRESHOLD TYPE /AWS1/EC2INTEGER OPTIONAL
    !IV_STATUSCODEMATCHER TYPE /AWS1/EC2STRING OPTIONAL
    !IV_INITGRACEPERIODSECONDS TYPE /AWS1/EC2INITGRACEPERIODSECS OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/EC2STRING OPTIONAL
    !IV_DRYRUN TYPE /AWS1/EC2BOOLEAN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ec2mdfyappstatchkrslt
  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 modify.

Optional arguments:

iv_aggregation TYPE /AWS1/EC2AGGREGATIONSTATUSENUM /AWS1/EC2AGGREGATIONSTATUSENUM

The aggregation setting for the application status check. When set to included, the result of this check contributes to the instance-level application status reported by DescribeApplicationStatus. When set to excluded, the check runs independently and does not affect the instance-level status. Valid values: included | excluded.

it_healthcheckpaths TYPE /AWS1/CL_EC2HLTHCHKPATHREQOBJ=>TT_HEALTHCHECKPATHREQUESTLIST TT_HEALTHCHECKPATHREQUESTLIST

The health check paths to use for the application status check.

iv_protocol TYPE /AWS1/EC2NETWORKPROTOCOLENUM /AWS1/EC2NETWORKPROTOCOLENUM

The protocol to use for the health check. Valid values: http | https.

iv_port TYPE /AWS1/EC2PORTNUMBER /AWS1/EC2PORTNUMBER

The port to use for the health check. Valid values: 1 to 65535.

iv_path TYPE /AWS1/EC2STRING /AWS1/EC2STRING

The URL path to use for the health check HTTP request (for example, /health or /status).

iv_deviceindex TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER

The index of the network device to use for the health check. The value must be greater than or equal to 0.

iv_ipversion TYPE /AWS1/EC2IPVERSIONENUM /AWS1/EC2IPVERSIONENUM

The IP version to use for the health check. Valid values: ipv4 and ipv6.

iv_ipscope TYPE /AWS1/EC2IPSCOPEENUM /AWS1/EC2IPSCOPEENUM

The IP scope to use for the health check. Valid value: private.

iv_interval TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER

The interval, in seconds, between health checks. Valid value: 60.

iv_timeout TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER

The amount of time, in seconds, to wait for a health check response before considering it failed. Valid values: 1 to 30. The value must be less than Interval.

iv_failurethreshold TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER

The number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0.

iv_successthreshold TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER

The number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0.

iv_statuscodematcher TYPE /AWS1/EC2STRING /AWS1/EC2STRING

The HTTP status codes that indicate a successful health check response. Specify a comma-separated list of individual status codes or ranges, for example, 200,202,300-399. For a range, the first value must be less than the second value. Maximum length: 64 characters.

iv_initgraceperiodseconds TYPE /AWS1/EC2INITGRACEPERIODSECS /AWS1/EC2INITGRACEPERIODSECS

The number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600.

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_ec2mdfyappstatchkrslt /AWS1/CL_EC2MDFYAPPSTATCHKRSLT

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->modifyapplicationstatuscheck(
  it_healthcheckpaths = VALUE /aws1/cl_ec2hlthchkpathreqobj=>tt_healthcheckpathrequestlist(
    (
      new /aws1/cl_ec2hlthchkpathreqobj(
        io_source = new /aws1/cl_ec2hlthchkpathsrcre00(
          iv_securitygroupid = |string|
          iv_subnetid = |string|
        )
        it_destinations = VALUE /aws1/cl_ec2hlthchkpathdstre00=>tt_healthcheckpathdstreqset(
          (
            new /aws1/cl_ec2hlthchkpathdstre00(
              iv_securitygroupid = |string|
              iv_subnetid = |string|
            )
          )
        )
      )
    )
  )
  iv_aggregation = |string|
  iv_applicationstatuscheckid = |string|
  iv_clienttoken = |string|
  iv_deviceindex = 123
  iv_dryrun = ABAP_TRUE
  iv_failurethreshold = 123
  iv_initgraceperiodseconds = 123
  iv_interval = 123
  iv_ipscope = |string|
  iv_ipversion = |string|
  iv_path = |string|
  iv_port = 123
  iv_protocol = |string|
  iv_statuscodematcher = |string|
  iv_successthreshold = 123
  iv_timeout = 123
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_applicationstatuscheckr = lo_result->get_applicationstatuscheck( ).
  IF lo_applicationstatuscheckr IS NOT INITIAL.
    lv_applicationstatuschecki = lo_applicationstatuscheckr->get_applicationstatuscheckid( ).
    lv_aggregationstatusenum = lo_applicationstatuscheckr->get_aggregation( ).
    LOOP AT lo_applicationstatuscheckr->get_healthcheckpaths( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lo_healthcheckpathsourcere = lo_row_1->get_source( ).
        IF lo_healthcheckpathsourcere IS NOT INITIAL.
          lv_string = lo_healthcheckpathsourcere->get_subnetid( ).
          lv_string = lo_healthcheckpathsourcere->get_securitygroupid( ).
        ENDIF.
        LOOP AT lo_row_1->get_destinations( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_string = lo_row_3->get_subnetid( ).
            lv_string = lo_row_3->get_securitygroupid( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDLOOP.
    lv_networkprotocolenum = lo_applicationstatuscheckr->get_protocol( ).
    lv_integer = lo_applicationstatuscheckr->get_port( ).
    lv_string = lo_applicationstatuscheckr->get_path( ).
    lv_integer = lo_applicationstatuscheckr->get_deviceindex( ).
    lv_ipversionenum = lo_applicationstatuscheckr->get_ipversion( ).
    lv_ipscopeenum = lo_applicationstatuscheckr->get_ipscope( ).
    lv_integer = lo_applicationstatuscheckr->get_interval( ).
    lv_integer = lo_applicationstatuscheckr->get_timeout( ).
    lv_integer = lo_applicationstatuscheckr->get_failurethreshold( ).
    lv_integer = lo_applicationstatuscheckr->get_successthreshold( ).
    lv_string = lo_applicationstatuscheckr->get_statuscodematcher( ).
    lv_initializationgraceperi = lo_applicationstatuscheckr->get_initgraceperiodseconds( ).
    lv_milliseconddatetime = lo_applicationstatuscheckr->get_lastupdatedat( ).
    LOOP AT lo_applicationstatuscheckr->get_targettagassociations( ) into lo_row_4.
      lo_row_5 = lo_row_4.
      IF lo_row_5 IS NOT INITIAL.
        lv_string = lo_row_5->get_key( ).
        lv_string = lo_row_5->get_value( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_applicationstatuscheckr->get_tags( ) into lo_row_6.
      lo_row_7 = lo_row_6.
      IF lo_row_7 IS NOT INITIAL.
        lv_string = lo_row_7->get_key( ).
        lv_string = lo_row_7->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_milliseconddatetime = lo_applicationstatuscheckr->get_creationtime( ).
    lv_milliseconddatetime = lo_applicationstatuscheckr->get_modifytime( ).
    lv_milliseconddatetime = lo_applicationstatuscheckr->get_deletiontime( ).
  ENDIF.
ENDIF.

To modify an application status check

This example modifies the port and path of an existing application status check.

DATA(lo_result) = lo_client->modifyapplicationstatuscheck(
  iv_applicationstatuscheckid = |asc-0123456789abcdef0|
  iv_path = |/healthv2|
  iv_port = 8080
).