Skip to content

/AWS1/IF_DCO=>DELETEBGPPEER()

About DeleteBGPPeer

Deletes the specified BGP peer on the specified virtual interface with the specified customer address and ASN.

You cannot delete the last BGP peer from a virtual interface.

Method Signature

METHODS /AWS1/IF_DCO~DELETEBGPPEER
  IMPORTING
    !IV_VIRTUALINTERFACEID TYPE /AWS1/DCOVIRTUALINTERFACEID OPTIONAL
    !IV_ASN TYPE /AWS1/DCOASN OPTIONAL
    !IV_ASNLONG TYPE /AWS1/DCOLONGASN OPTIONAL
    !IV_CUSTOMERADDRESS TYPE /AWS1/DCOCUSTOMERADDRESS OPTIONAL
    !IV_BGPPEERID TYPE /AWS1/DCOBGPPEERID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dcodeletebgppeerrsp
  RAISING
    /AWS1/CX_DCODIRECTCNCTCLIENTEX
    /AWS1/CX_DCODIRECTCNCTSERVEREX
    /AWS1/CX_DCOCLIENTEXC
    /AWS1/CX_DCOSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

iv_virtualinterfaceid TYPE /AWS1/DCOVIRTUALINTERFACEID /AWS1/DCOVIRTUALINTERFACEID

The ID of the virtual interface.

iv_asn TYPE /AWS1/DCOASN /AWS1/DCOASN

The autonomous system number (ASN). The valid range is from 1 to 2147483646 for Border Gateway Protocol (BGP) configuration. If you provide a number greater than the maximum, an error is returned. Use asnLong instead.

  • You can use asnLong or asn, but not both. We recommend using asnLong as it supports a greater pool of numbers.

  • If you provide a value in the same API call for both asn and asnLong, the API will only accept the value for asnLong.

  • If you enter a 4-byte ASN for the asn parameter, the API returns an error.

  • If you are using a 2-byte ASN, the API response will include the 2-byte value for both the asn and asnLong fields.

iv_asnlong TYPE /AWS1/DCOLONGASN /AWS1/DCOLONGASN

The long ASN for the BGP peer to be deleted from a Direct Connect virtual interface. The valid range is from 1 to 4294967294 for BGP configuration.

Note the following limitations when using asnLong:

  • You can use asnLong or asn, but not both. We recommend using asnLong as it supports a greater pool of numbers.

  • asnLong accepts any valid ASN value, regardless if it's 2-byte or 4-byte.

  • When using a 4-byte asnLong, the API response returns 0 for the legacy asn attribute since 4-byte ASN values exceed the maximum supported value of 2,147,483,647.

  • If you are using a 2-byte ASN, the API response will include the 2-byte value for both the asn and asnLong fields.

  • If you provide a value in the same API call for both asn and asnLong, the API will only accept the value for asnLong.

iv_customeraddress TYPE /AWS1/DCOCUSTOMERADDRESS /AWS1/DCOCUSTOMERADDRESS

The IP address assigned to the customer interface.

iv_bgppeerid TYPE /AWS1/DCOBGPPEERID /AWS1/DCOBGPPEERID

The ID of the BGP peer.

RETURNING

oo_output TYPE REF TO /aws1/cl_dcodeletebgppeerrsp /AWS1/CL_DCODELETEBGPPEERRSP

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->deletebgppeer(
  iv_asn = 123
  iv_asnlong = 123
  iv_bgppeerid = |string|
  iv_customeraddress = |string|
  iv_virtualinterfaceid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_virtualinterface = lo_result->get_virtualinterface( ).
  IF lo_virtualinterface IS NOT INITIAL.
    lv_owneraccount = lo_virtualinterface->get_owneraccount( ).
    lv_virtualinterfaceid = lo_virtualinterface->get_virtualinterfaceid( ).
    lv_locationcode = lo_virtualinterface->get_location( ).
    lv_connectionid = lo_virtualinterface->get_connectionid( ).
    lv_virtualinterfacetype = lo_virtualinterface->get_virtualinterfacetype( ).
    lv_virtualinterfacename = lo_virtualinterface->get_virtualinterfacename( ).
    lv_vlan = lo_virtualinterface->get_vlan( ).
    lv_asn = lo_virtualinterface->get_asn( ).
    lv_longasn = lo_virtualinterface->get_asnlong( ).
    lv_longasn = lo_virtualinterface->get_amazonsideasn( ).
    lv_bgpauthkey = lo_virtualinterface->get_authkey( ).
    lv_amazonaddress = lo_virtualinterface->get_amazonaddress( ).
    lv_customeraddress = lo_virtualinterface->get_customeraddress( ).
    lv_addressfamily = lo_virtualinterface->get_addressfamily( ).
    lv_virtualinterfacestate = lo_virtualinterface->get_virtualinterfacestate( ).
    lv_routerconfig = lo_virtualinterface->get_customerrouterconfig( ).
    lv_mtu = lo_virtualinterface->get_mtu( ).
    lv_jumboframecapable = lo_virtualinterface->get_jumboframecapable( ).
    lv_virtualgatewayid = lo_virtualinterface->get_virtualgatewayid( ).
    lv_directconnectgatewayid = lo_virtualinterface->get_directconnectgatewayid( ).
    LOOP AT lo_virtualinterface->get_routefilterprefixes( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_cidr = lo_row_1->get_cidr( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_virtualinterface->get_bgppeers( ) into lo_row_2.
      lo_row_3 = lo_row_2.
      IF lo_row_3 IS NOT INITIAL.
        lv_bgppeerid = lo_row_3->get_bgppeerid( ).
        lv_asn = lo_row_3->get_asn( ).
        lv_longasn = lo_row_3->get_asnlong( ).
        lv_bgpauthkey = lo_row_3->get_authkey( ).
        lv_addressfamily = lo_row_3->get_addressfamily( ).
        lv_amazonaddress = lo_row_3->get_amazonaddress( ).
        lv_customeraddress = lo_row_3->get_customeraddress( ).
        lv_bgppeerstate = lo_row_3->get_bgppeerstate( ).
        lv_bgpstatus = lo_row_3->get_bgpstatus( ).
        lv_awsdevicev2 = lo_row_3->get_awsdevicev2( ).
        lv_awslogicaldeviceid = lo_row_3->get_awslogicaldeviceid( ).
      ENDIF.
    ENDLOOP.
    lv_region = lo_virtualinterface->get_region( ).
    lv_awsdevicev2 = lo_virtualinterface->get_awsdevicev2( ).
    lv_awslogicaldeviceid = lo_virtualinterface->get_awslogicaldeviceid( ).
    LOOP AT lo_virtualinterface->get_tags( ) into lo_row_4.
      lo_row_5 = lo_row_4.
      IF lo_row_5 IS NOT INITIAL.
        lv_tagkey = lo_row_5->get_key( ).
        lv_tagvalue = lo_row_5->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_sitelinkenabled = lo_virtualinterface->get_sitelinkenabled( ).
    lv_ratelimit = lo_virtualinterface->get_ratelimit( ).
  ENDIF.
ENDIF.