Skip to content

/AWS1/IF_PPU=>UPDATENOTIFYCODECONF()

About UpdateNotifyCodeConfiguration

Updates the mutable fields of a notify code configuration. Only the fields that you supply are changed. For the template and language fields, supplying an empty value clears the currently stored value.

Method Signature

METHODS /AWS1/IF_PPU~UPDATENOTIFYCODECONF
  IMPORTING
    !IV_NOTIFYCODECONFIGURATIONID TYPE /AWS1/PPUNOTIFYCODECONFIDORARN OPTIONAL
    !IV_NOTIFYCODECONFNAME TYPE /AWS1/PPUNOTIFYCODECONFNAME OPTIONAL
    !IO_CODECONFPARAMETERS TYPE REF TO /AWS1/CL_PPUUPDCODECONFPARAMS OPTIONAL
    !IO_CHANNELPARAMETERS TYPE REF TO /AWS1/CL_PPUUPDATECHNLPARAMS OPTIONAL
    !IV_DELETIONPROTECTIONENABLED TYPE /AWS1/PPUBOOLEAN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ppuupdntfycodeconfout
  RAISING
    /AWS1/CX_PPUACCESSDENIEDEX
    /AWS1/CX_PPUCONFLICTEXCEPTION
    /AWS1/CX_PPUINTERNALSERVEREX
    /AWS1/CX_PPURESOURCENOTFOUNDEX
    /AWS1/CX_PPUTHROTTLINGEX
    /AWS1/CX_PPUVLDTNEXCEPTION
    /AWS1/CX_PPUCLIENTEXC
    /AWS1/CX_PPUSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_notifycodeconfigurationid TYPE /AWS1/PPUNOTIFYCODECONFIDORARN /AWS1/PPUNOTIFYCODECONFIDORARN

The unique identifier of the notify code configuration. You can specify either the bare ID or the full Amazon Resource Name (ARN).

Optional arguments:

iv_notifycodeconfname TYPE /AWS1/PPUNOTIFYCODECONFNAME /AWS1/PPUNOTIFYCODECONFNAME

The name of the notify code configuration.

io_codeconfparameters TYPE REF TO /AWS1/CL_PPUUPDCODECONFPARAMS /AWS1/CL_PPUUPDCODECONFPARAMS

The updated passcode policy parameters, including the code type, length, validity period, and maximum number of attempts. When you omit a member, its current value is preserved.

io_channelparameters TYPE REF TO /AWS1/CL_PPUUPDATECHNLPARAMS /AWS1/CL_PPUUPDATECHNLPARAMS

The updated channel-specific parameters used to render and deliver the one-time passcode. This is a loose, nested update: when you omit a channel, that channel's parameters remain unchanged. Within a supplied channel, an empty string on a string member, or an empty map on the destination-country parameters, clears the currently stored value, and absent members preserve the current value.

iv_deletionprotectionenabled TYPE /AWS1/PPUBOOLEAN /AWS1/PPUBOOLEAN

Specifies whether deletion protection is enabled. When enabled, the resource cannot be deleted until deletion protection is turned off.

RETURNING

oo_output TYPE REF TO /aws1/cl_ppuupdntfycodeconfout /AWS1/CL_PPUUPDNTFYCODECONFOUT

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->updatenotifycodeconf(
  io_channelparameters = new /aws1/cl_ppuupdatechnlparams(
    io_notify = new /aws1/cl_ppuupdatenotifyparams(
      iv_notifytemplateid = |string|
      iv_voiceid = |string|
    )
    io_text = new /aws1/cl_ppuupdatetextparams(
      it_dstcountryparameters = VALUE /aws1/cl_ppuupdtstcntryparms_w=>tt_updatedstcountryparameters(
        (
          VALUE /aws1/cl_ppuupdtstcntryparms_w=>ts_updtstcountryparams_maprow(
            key = |string|
            value = new /aws1/cl_ppuupdtstcntryparms_w( |string| )
          )
        )
      )
      iv_inlinetemplatebody = |string|
    )
    io_voice = new /aws1/cl_ppuupdatevoiceparams(
      iv_inlinetemplatebody = |string|
      iv_languagecode = |string|
      iv_voiceid = |string|
      iv_voicemessagebodytexttype = |string|
    )
    io_whatsapp = new /aws1/cl_ppuupdwhatsappparams(
      iv_languagecode = |string|
      iv_whatsapptemplatename = |string|
    )
  )
  io_codeconfparameters = new /aws1/cl_ppuupdcodeconfparams(
    iv_codelength = 123
    iv_codetype = |string|
    iv_maxattempts = 123
    iv_validityperiodminutes = 123
  )
  iv_deletionprotectionenabled = ABAP_TRUE
  iv_notifycodeconfigurationid = |string|
  iv_notifycodeconfname = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_notifycodeconfiguration = lo_result->get_notifycodeconfiguration( ).
  IF lo_notifycodeconfiguration IS NOT INITIAL.
    lv_notifycodeconfiguration_1 = lo_notifycodeconfiguration->get_notifycodeconfid( ).
    lv_amazonresourcename = lo_notifycodeconfiguration->get_notifycodeconfarn( ).
    lv_notifycodeconfiguration_2 = lo_notifycodeconfiguration->get_notifycodeconfname( ).
    lo_codeconfigurationparame = lo_notifycodeconfiguration->get_codeconfparameters( ).
    IF lo_codeconfigurationparame IS NOT INITIAL.
      lv_codetype = lo_codeconfigurationparame->get_codetype( ).
      lv_codelength = lo_codeconfigurationparame->get_codelength( ).
      lv_validityperiodminutes = lo_codeconfigurationparame->get_validityperiodminutes( ).
      lv_maxverificationattempts = lo_codeconfigurationparame->get_maxattempts( ).
    ENDIF.
    lo_channelparameters = lo_notifycodeconfiguration->get_channelparameters( ).
    IF lo_channelparameters IS NOT INITIAL.
      lo_textparameters = lo_channelparameters->get_text( ).
      IF lo_textparameters IS NOT INITIAL.
        lv_inlinetemplatebody = lo_textparameters->get_inlinetemplatebody( ).
        LOOP AT lo_textparameters->get_dstcountryparameters( ) into ls_row.
          lv_key = ls_row-key.
          lo_value = ls_row-value.
          IF lo_value IS NOT INITIAL.
            lv_destinationcountryparam = lo_value->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_voiceparameters = lo_channelparameters->get_voice( ).
      IF lo_voiceparameters IS NOT INITIAL.
        lv_inlinetemplatebody = lo_voiceparameters->get_inlinetemplatebody( ).
        lv_languagecode = lo_voiceparameters->get_languagecode( ).
        lv_voiceid = lo_voiceparameters->get_voiceid( ).
        lv_voicemessagebodytexttyp = lo_voiceparameters->get_voicemessagebodytexttype( ).
      ENDIF.
      lo_notifyparameters = lo_channelparameters->get_notify( ).
      IF lo_notifyparameters IS NOT INITIAL.
        lv_notifytemplateid = lo_notifyparameters->get_notifytemplateid( ).
        lv_voiceid = lo_notifyparameters->get_voiceid( ).
      ENDIF.
      lo_whatsappparameters = lo_channelparameters->get_whatsapp( ).
      IF lo_whatsappparameters IS NOT INITIAL.
        lv_whatsapptemplatename = lo_whatsappparameters->get_whatsapptemplatename( ).
        lv_languagecode = lo_whatsappparameters->get_languagecode( ).
      ENDIF.
    ENDIF.
    lv_boolean = lo_notifycodeconfiguration->get_deletionprtctnenabled( ).
    lv_timestamp = lo_notifycodeconfiguration->get_createdat( ).
    lv_timestamp = lo_notifycodeconfiguration->get_updatedat( ).
  ENDIF.
ENDIF.

Update a notify code configuration

Update a notify code configuration

DATA(lo_result) = lo_client->updatenotifycodeconf(
  io_codeconfparameters = new /aws1/cl_ppuupdcodeconfparams(
    iv_codelength = 8
    iv_validityperiodminutes = 15
  )
  iv_notifycodeconfigurationid = |ncc-abc12345678901234|
).