Skip to content

/AWS1/IF_EC2=>DISINSTSQLHASTANDBYDETECTS()

About DisableInstanceSqlHaStandbyDetections

Disable Amazon EC2 instances running in an SQL Server High Availability cluster from SQL Server High Availability instance standby detection monitoring. Once disabled, Amazon Web Services no longer monitors the metadata for the instances to determine whether they are active or standby nodes in the SQL Server High Availability cluster.

Method Signature

METHODS /AWS1/IF_EC2~DISINSTSQLHASTANDBYDETECTS
  IMPORTING
    !IT_INSTANCEIDS TYPE /AWS1/CL_EC2INSTIDUPDSTRLIST_W=>TT_INSTANCEIDUPDATESTRINGLIST OPTIONAL
    !IV_DRYRUN TYPE /AWS1/EC2BOOLEAN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ec2disinsqlhastandb01
  RAISING
    /AWS1/CX_EC2CLIENTEXC
    /AWS1/CX_EC2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

it_instanceids TYPE /AWS1/CL_EC2INSTIDUPDSTRLIST_W=>TT_INSTANCEIDUPDATESTRINGLIST TT_INSTANCEIDUPDATESTRINGLIST

The IDs of the instances to disable from SQL Server High Availability standby detection monitoring.

Optional arguments:

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.

RETURNING

oo_output TYPE REF TO /aws1/cl_ec2disinsqlhastandb01 /AWS1/CL_EC2DISINSQLHASTANDB01

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

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->disinstsqlhastandbydetects(
  it_instanceids = VALUE /aws1/cl_ec2instidupdstrlist_w=>tt_instanceidupdatestringlist(
    ( new /aws1/cl_ec2instidupdstrlist_w( |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_instances( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_instanceid = lo_row_1->get_instanceid( ).
      lv_sqlserverlicenseusage = lo_row_1->get_sqlserverlicenseusage( ).
      lv_hastatus = lo_row_1->get_hastatus( ).
      lv_string = lo_row_1->get_processingstatus( ).
      lv_milliseconddatetime = lo_row_1->get_lastupdatedtime( ).
      lv_string = lo_row_1->get_sqlservercredentials( ).
      LOOP AT lo_row_1->get_tags( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_string = lo_row_3->get_key( ).
          lv_string = lo_row_3->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDLOOP.
ENDIF.