/AWS1/IF_EL2=>MODIFYLISTENER()¶
About ModifyListener¶
Replaces the specified properties of the specified listener. Any properties that you do not specify remain unchanged.
Changing the protocol from HTTPS to HTTP, or from TLS to TCP, removes the security policy and default certificate properties. If you change the protocol from HTTP to HTTPS, or from TCP to TLS, you must add the security policy and default certificate properties.
To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.
Method Signature¶
METHODS /AWS1/IF_EL2~MODIFYLISTENER
  IMPORTING
    !IV_LISTENERARN TYPE /AWS1/EL2LISTENERARN OPTIONAL
    !IV_PORT TYPE /AWS1/EL2PORT OPTIONAL
    !IV_PROTOCOL TYPE /AWS1/EL2PROTOCOLENUM OPTIONAL
    !IV_SSLPOLICY TYPE /AWS1/EL2SSLPOLICYNAME OPTIONAL
    !IT_CERTIFICATES TYPE /AWS1/CL_EL2CERTIFICATE=>TT_CERTIFICATELIST OPTIONAL
    !IT_DEFAULTACTIONS TYPE /AWS1/CL_EL2ACTION=>TT_ACTIONS OPTIONAL
    !IT_ALPNPOLICY TYPE /AWS1/CL_EL2ALPNPOLICYNAME_W=>TT_ALPNPOLICYNAME OPTIONAL
    !IO_MUTUALAUTHENTICATION TYPE REF TO /AWS1/CL_EL2MUTUALAUTHNATTRS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_el2mdfylisteneroutput
  RAISING
    /AWS1/CX_EL2ALPNPLYNOTSUPPEDEX
    /AWS1/CX_EL2CERTNOTFOUNDEX
    /AWS1/CX_EL2DUPLICATELSTENEREX
    /AWS1/CX_EL2INCOMPATIBLEPROT00
    /AWS1/CX_EL2INVCONFREQUESTEX
    /AWS1/CX_EL2INVLOADBALANCERA00
    /AWS1/CX_EL2LISTENERNOTFOUNDEX
    /AWS1/CX_EL2SSLPLYNOTFOUNDEX
    /AWS1/CX_EL2TGTGRASSOCIATION00
    /AWS1/CX_EL2TGTGROUPNOTFOUNDEX
    /AWS1/CX_EL2TOOMANYACTIONSEX
    /AWS1/CX_EL2TOOMANYCERTSEX
    /AWS1/CX_EL2TOOMANYLISTENERSEX
    /AWS1/CX_EL2TOOMANYREGSFORTG00
    /AWS1/CX_EL2TOOMANYTARGETSEX
    /AWS1/CX_EL2TOOMANYUNIQUETGT00
    /AWS1/CX_EL2TRUSTSTORENOTFNDEX
    /AWS1/CX_EL2TRUSTSTORENOTREA00
    /AWS1/CX_EL2UNSUPPEDPROTOCOLEX
    /AWS1/CX_EL2CLIENTEXC
    /AWS1/CX_EL2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_listenerarn TYPE /AWS1/EL2LISTENERARN /AWS1/EL2LISTENERARN¶
The Amazon Resource Name (ARN) of the listener.
Optional arguments:¶
iv_port TYPE /AWS1/EL2PORT /AWS1/EL2PORT¶
The port for connections from clients to the load balancer. You can't specify a port for a Gateway Load Balancer.
iv_protocol TYPE /AWS1/EL2PROTOCOLENUM /AWS1/EL2PROTOCOLENUM¶
The protocol for connections from clients to the load balancer. Application Load Balancers support the HTTP and HTTPS protocols. Network Load Balancers support the TCP, TLS, UDP, and TCP_UDP protocols. You can’t change the protocol to UDP or TCP_UDP if dual-stack mode is enabled. You can't specify a protocol for a Gateway Load Balancer.
iv_sslpolicy TYPE /AWS1/EL2SSLPOLICYNAME /AWS1/EL2SSLPOLICYNAME¶
[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported.
For more information, see Security policies in the Application Load Balancers Guide or Security policies in the Network Load Balancers Guide.
it_certificates TYPE /AWS1/CL_EL2CERTIFICATE=>TT_CERTIFICATELIST TT_CERTIFICATELIST¶
[HTTPS and TLS listeners] The default certificate for the listener. You must provide exactly one certificate. Set
CertificateArnto the certificate ARN but do not setIsDefault.
it_defaultactions TYPE /AWS1/CL_EL2ACTION=>TT_ACTIONS TT_ACTIONS¶
The actions for the default rule.
it_alpnpolicy TYPE /AWS1/CL_EL2ALPNPOLICYNAME_W=>TT_ALPNPOLICYNAME TT_ALPNPOLICYNAME¶
[TLS listeners] The name of the Application-Layer Protocol Negotiation (ALPN) policy. You can specify one policy name. The following are the possible values:
HTTP1Only
HTTP2Only
HTTP2Optional
HTTP2Preferred
NoneFor more information, see ALPN policies in the Network Load Balancers Guide.
io_mutualauthentication TYPE REF TO /AWS1/CL_EL2MUTUALAUTHNATTRS /AWS1/CL_EL2MUTUALAUTHNATTRS¶
[HTTPS listeners] The mutual authentication configuration information.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_el2mdfylisteneroutput /AWS1/CL_EL2MDFYLISTENEROUTPUT¶
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->modifylistener(
  io_mutualauthentication = new /aws1/cl_el2mutualauthnattrs(
    iv_advertisetruststorecana00 = |string|
    iv_ignoreclientcertexpiry = ABAP_TRUE
    iv_mode = |string|
    iv_truststorearn = |string|
    iv_truststoreassociationstat = |string|
  )
  it_alpnpolicy = VALUE /aws1/cl_el2alpnpolicyname_w=>tt_alpnpolicyname(
    ( new /aws1/cl_el2alpnpolicyname_w( |string| ) )
  )
  it_certificates = VALUE /aws1/cl_el2certificate=>tt_certificatelist(
    (
      new /aws1/cl_el2certificate(
        iv_certificatearn = |string|
        iv_isdefault = ABAP_TRUE
      )
    )
  )
  it_defaultactions = VALUE /aws1/cl_el2action=>tt_actions(
    (
      new /aws1/cl_el2action(
        io_authenticatecognitoconfig = new /aws1/cl_el2authncognitoactcfg(
          it_authntctnreqextraparams = VALUE /aws1/cl_el2authcognitoactau00=>tt_authcognitoactauthreqextr00(
            (
              VALUE /aws1/cl_el2authcognitoactau00=>ts_authcognitoactauth00_maprow(
                key = |string|
                value = new /aws1/cl_el2authcognitoactau00( |string| )
              )
            )
          )
          iv_onunauthenticatedrequest = |string|
          iv_scope = |string|
          iv_sessioncookiename = |string|
          iv_sessiontimeout = 123
          iv_userpoolarn = |string|
          iv_userpoolclientid = |string|
          iv_userpooldomain = |string|
        )
        io_authenticateoidcconfig = new /aws1/cl_el2authntctoidcactcfg(
          it_authntctnreqextraparams = VALUE /aws1/cl_el2authoidcactauthr00=>tt_authoidcactauthreqextraprms(
            (
              VALUE /aws1/cl_el2authoidcactauthr00=>ts_authoidcactauthreq00_maprow(
                key = |string|
                value = new /aws1/cl_el2authoidcactauthr00( |string| )
              )
            )
          )
          iv_authorizationendpoint = |string|
          iv_clientid = |string|
          iv_clientsecret = |string|
          iv_issuer = |string|
          iv_onunauthenticatedrequest = |string|
          iv_scope = |string|
          iv_sessioncookiename = |string|
          iv_sessiontimeout = 123
          iv_tokenendpoint = |string|
          iv_useexistingclientsecret = ABAP_TRUE
          iv_userinfoendpoint = |string|
        )
        io_fixedresponseconfig = new /aws1/cl_el2fixedrspactioncfg(
          iv_contenttype = |string|
          iv_messagebody = |string|
          iv_statuscode = |string|
        )
        io_forwardconfig = new /aws1/cl_el2forwardactioncfg(
          io_targetgroupstickinesscfg = new /aws1/cl_el2tgtgrstickinesscfg(
            iv_durationseconds = 123
            iv_enabled = ABAP_TRUE
          )
          it_targetgroups = VALUE /aws1/cl_el2targetgrouptuple=>tt_targetgrouplist(
            (
              new /aws1/cl_el2targetgrouptuple(
                iv_targetgrouparn = |string|
                iv_weight = 123
              )
            )
          )
        )
        io_redirectconfig = new /aws1/cl_el2rediractionconfig(
          iv_host = |string|
          iv_path = |string|
          iv_port = |string|
          iv_protocol = |string|
          iv_query = |string|
          iv_statuscode = |string|
        )
        iv_order = 123
        iv_targetgrouparn = |string|
        iv_type = |string|
      )
    )
  )
  iv_listenerarn = |string|
  iv_port = 123
  iv_protocol = |string|
  iv_sslpolicy = |string|
).
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_listeners( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_listenerarn = lo_row_1->get_listenerarn( ).
      lv_loadbalancerarn = lo_row_1->get_loadbalancerarn( ).
      lv_port = lo_row_1->get_port( ).
      lv_protocolenum = lo_row_1->get_protocol( ).
      LOOP AT lo_row_1->get_certificates( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_certificatearn = lo_row_3->get_certificatearn( ).
          lv_default = lo_row_3->get_isdefault( ).
        ENDIF.
      ENDLOOP.
      lv_sslpolicyname = lo_row_1->get_sslpolicy( ).
      LOOP AT lo_row_1->get_defaultactions( ) into lo_row_4.
        lo_row_5 = lo_row_4.
        IF lo_row_5 IS NOT INITIAL.
          lv_actiontypeenum = lo_row_5->get_type( ).
          lv_targetgrouparn = lo_row_5->get_targetgrouparn( ).
          lo_authenticateoidcactionc = lo_row_5->get_authenticateoidcconfig( ).
          IF lo_authenticateoidcactionc IS NOT INITIAL.
            lv_authenticateoidcactioni = lo_authenticateoidcactionc->get_issuer( ).
            lv_authenticateoidcactiona = lo_authenticateoidcactionc->get_authorizationendpoint( ).
            lv_authenticateoidcactiont = lo_authenticateoidcactionc->get_tokenendpoint( ).
            lv_authenticateoidcactionu = lo_authenticateoidcactionc->get_userinfoendpoint( ).
            lv_authenticateoidcactionc_1 = lo_authenticateoidcactionc->get_clientid( ).
            lv_authenticateoidcactionc_2 = lo_authenticateoidcactionc->get_clientsecret( ).
            lv_authenticateoidcactions = lo_authenticateoidcactionc->get_sessioncookiename( ).
            lv_authenticateoidcactions_1 = lo_authenticateoidcactionc->get_scope( ).
            lv_authenticateoidcactions_2 = lo_authenticateoidcactionc->get_sessiontimeout( ).
            LOOP AT lo_authenticateoidcactionc->get_authntctnreqextraparams( ) into ls_row_6.
              lv_key = ls_row_6-key.
              lo_value = ls_row_6-value.
              IF lo_value IS NOT INITIAL.
                lv_authenticateoidcactiona_1 = lo_value->get_value( ).
              ENDIF.
            ENDLOOP.
            lv_authenticateoidcactionc_3 = lo_authenticateoidcactionc->get_onunauthenticatedrequest( ).
            lv_authenticateoidcactionu_1 = lo_authenticateoidcactionc->get_useexistingclientsecret( ).
          ENDIF.
          lo_authenticatecognitoacti = lo_row_5->get_authntctcognitoconfig( ).
          IF lo_authenticatecognitoacti IS NOT INITIAL.
            lv_authenticatecognitoacti_1 = lo_authenticatecognitoacti->get_userpoolarn( ).
            lv_authenticatecognitoacti_2 = lo_authenticatecognitoacti->get_userpoolclientid( ).
            lv_authenticatecognitoacti_3 = lo_authenticatecognitoacti->get_userpooldomain( ).
            lv_authenticatecognitoacti_4 = lo_authenticatecognitoacti->get_sessioncookiename( ).
            lv_authenticatecognitoacti_5 = lo_authenticatecognitoacti->get_scope( ).
            lv_authenticatecognitoacti_6 = lo_authenticatecognitoacti->get_sessiontimeout( ).
            LOOP AT lo_authenticatecognitoacti->get_authntctnreqextraparams( ) into ls_row_7.
              lv_key_1 = ls_row_7-key.
              lo_value_1 = ls_row_7-value.
              IF lo_value_1 IS NOT INITIAL.
                lv_authenticatecognitoacti_7 = lo_value_1->get_value( ).
              ENDIF.
            ENDLOOP.
            lv_authenticatecognitoacti_8 = lo_authenticatecognitoacti->get_onunauthenticatedrequest( ).
          ENDIF.
          lv_actionorder = lo_row_5->get_order( ).
          lo_redirectactionconfig = lo_row_5->get_redirectconfig( ).
          IF lo_redirectactionconfig IS NOT INITIAL.
            lv_redirectactionprotocol = lo_redirectactionconfig->get_protocol( ).
            lv_redirectactionport = lo_redirectactionconfig->get_port( ).
            lv_redirectactionhost = lo_redirectactionconfig->get_host( ).
            lv_redirectactionpath = lo_redirectactionconfig->get_path( ).
            lv_redirectactionquery = lo_redirectactionconfig->get_query( ).
            lv_redirectactionstatuscod = lo_redirectactionconfig->get_statuscode( ).
          ENDIF.
          lo_fixedresponseactionconf = lo_row_5->get_fixedresponseconfig( ).
          IF lo_fixedresponseactionconf IS NOT INITIAL.
            lv_fixedresponseactionmess = lo_fixedresponseactionconf->get_messagebody( ).
            lv_fixedresponseactionstat = lo_fixedresponseactionconf->get_statuscode( ).
            lv_fixedresponseactioncont = lo_fixedresponseactionconf->get_contenttype( ).
          ENDIF.
          lo_forwardactionconfig = lo_row_5->get_forwardconfig( ).
          IF lo_forwardactionconfig IS NOT INITIAL.
            LOOP AT lo_forwardactionconfig->get_targetgroups( ) into lo_row_8.
              lo_row_9 = lo_row_8.
              IF lo_row_9 IS NOT INITIAL.
                lv_targetgrouparn = lo_row_9->get_targetgrouparn( ).
                lv_targetgroupweight = lo_row_9->get_weight( ).
              ENDIF.
            ENDLOOP.
            lo_targetgroupstickinessco = lo_forwardactionconfig->get_targetgroupstickinesscfg( ).
            IF lo_targetgroupstickinessco IS NOT INITIAL.
              lv_targetgroupstickinessen = lo_targetgroupstickinessco->get_enabled( ).
              lv_targetgroupstickinessdu = lo_targetgroupstickinessco->get_durationseconds( ).
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
      LOOP AT lo_row_1->get_alpnpolicy( ) into lo_row_10.
        lo_row_11 = lo_row_10.
        IF lo_row_11 IS NOT INITIAL.
          lv_alpnpolicyvalue = lo_row_11->get_value( ).
        ENDIF.
      ENDLOOP.
      lo_mutualauthenticationatt = lo_row_1->get_mutualauthentication( ).
      IF lo_mutualauthenticationatt IS NOT INITIAL.
        lv_mode = lo_mutualauthenticationatt->get_mode( ).
        lv_truststorearn = lo_mutualauthenticationatt->get_truststorearn( ).
        lv_ignoreclientcertificate = lo_mutualauthenticationatt->get_ignoreclientcertexpiry( ).
        lv_truststoreassociationst = lo_mutualauthenticationatt->get_truststoreassociations00( ).
        lv_advertisetruststorecana = lo_mutualauthenticationatt->get_advertisetruststorecan00( ).
      ENDIF.
    ENDIF.
  ENDLOOP.
ENDIF.
To change the default action for a listener¶
This example changes the default action for the specified listener.
DATA(lo_result) = lo_client->modifylistener(
  it_defaultactions = VALUE /aws1/cl_el2action=>tt_actions(
    (
      new /aws1/cl_el2action(
        iv_targetgrouparn = |arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-new-targets/2453ed029918f21f|
        iv_type = |forward|
      )
    )
  )
  iv_listenerarn = |arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2|
).
To change the server certificate¶
This example changes the server certificate for the specified HTTPS listener.
DATA(lo_result) = lo_client->modifylistener(
  it_certificates = VALUE /aws1/cl_el2certificate=>tt_certificatelist(
    ( new /aws1/cl_el2certificate( iv_certificatearn = |arn:aws:iam::123456789012:server-certificate/my-new-server-cert| )  )
  )
  iv_listenerarn = |arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/0467ef3c8400ae65|
).