Skip to content

/AWS1/IF_PP2=>UPDATENOTIFYCONFIGURATION()

About UpdateNotifyConfiguration

Updates an existing notify configuration. You can update the default template, pool association, enabled channels, enabled countries, and deletion protection settings.

Method Signature

METHODS /AWS1/IF_PP2~UPDATENOTIFYCONFIGURATION
  IMPORTING
    !IV_NOTIFYCONFIGURATIONID TYPE /AWS1/PP2NOTIFYCONFIDORARN OPTIONAL
    !IV_DEFAULTTEMPLATEID TYPE /AWS1/PP2NOTIFYTEMPLATEID OPTIONAL
    !IV_POOLID TYPE /AWS1/PP2NOTIFYPOOLIDORUNSET OPTIONAL
    !IT_ENABLEDCOUNTRIES TYPE /AWS1/CL_PP2ISOCNTRYCODELIST_W=>TT_ISOCOUNTRYCODELIST OPTIONAL
    !IT_ENABLEDCHANNELS TYPE /AWS1/CL_PP2NTFENBCHNLLIST_W=>TT_NOTIFYENABLEDCHANNELSLIST OPTIONAL
    !IV_DELETIONPROTECTIONENABLED TYPE /AWS1/PP2BOOLEAN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_pp2updatentfyconfrslt
  RAISING
    /AWS1/CX_PP2ACCESSDENIEDEX
    /AWS1/CX_PP2CONFLICTEXCEPTION
    /AWS1/CX_PP2INTERNALSERVEREX
    /AWS1/CX_PP2RESOURCENOTFOUNDEX
    /AWS1/CX_PP2THROTTLINGEX
    /AWS1/CX_PP2VALIDATIONEX
    /AWS1/CX_PP2CLIENTEXC
    /AWS1/CX_PP2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_notifyconfigurationid TYPE /AWS1/PP2NOTIFYCONFIDORARN /AWS1/PP2NOTIFYCONFIDORARN

The identifier of the notify configuration to update. The NotifyConfigurationId can be found using the DescribeNotifyConfigurations operation.

Optional arguments:

iv_defaulttemplateid TYPE /AWS1/PP2NOTIFYTEMPLATEID /AWS1/PP2NOTIFYTEMPLATEID

The template ID to set as the default, or the special value UNSET_DEFAULT_TEMPLATE to clear the current default template.

iv_poolid TYPE /AWS1/PP2NOTIFYPOOLIDORUNSET /AWS1/PP2NOTIFYPOOLIDORUNSET

The pool ID or ARN to associate, or the special value UNSET_DEFAULT_POOL_FOR_NOTIFY to clear the current default pool.

it_enabledcountries TYPE /AWS1/CL_PP2ISOCNTRYCODELIST_W=>TT_ISOCOUNTRYCODELIST TT_ISOCOUNTRYCODELIST

An array of two-character ISO country codes, in ISO 3166-1 alpha-2 format, that are enabled for the notify configuration.

it_enabledchannels TYPE /AWS1/CL_PP2NTFENBCHNLLIST_W=>TT_NOTIFYENABLEDCHANNELSLIST TT_NOTIFYENABLEDCHANNELSLIST

An array of channels to enable for the notify configuration. Supported values include SMS and VOICE.

iv_deletionprotectionenabled TYPE /AWS1/PP2BOOLEAN /AWS1/PP2BOOLEAN

When set to true the notify configuration can't be deleted.

RETURNING

oo_output TYPE REF TO /aws1/cl_pp2updatentfyconfrslt /AWS1/CL_PP2UPDATENTFYCONFRSLT

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->updatenotifyconfiguration(
  it_enabledchannels = VALUE /aws1/cl_pp2ntfenbchnllist_w=>tt_notifyenabledchannelslist(
    ( new /aws1/cl_pp2ntfenbchnllist_w( |string| ) )
  )
  it_enabledcountries = VALUE /aws1/cl_pp2isocntrycodelist_w=>tt_isocountrycodelist(
    ( new /aws1/cl_pp2isocntrycodelist_w( |string| ) )
  )
  iv_defaulttemplateid = |string|
  iv_deletionprotectionenabled = ABAP_TRUE
  iv_notifyconfigurationid = |string|
  iv_poolid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_notifyconfigurationarn = lo_result->get_notifyconfigurationarn( ).
  lv_notifyconfigurationid = lo_result->get_notifyconfigurationid( ).
  lv_notifyconfigurationdisp = lo_result->get_displayname( ).
  lv_notifyconfigurationusec = lo_result->get_usecase( ).
  lv_notifytemplateid = lo_result->get_defaulttemplateid( ).
  lv_string = lo_result->get_poolid( ).
  LOOP AT lo_result->get_enabledcountries( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_isocountrycode = lo_row_1->get_value( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_enabledchannels( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_numbercapability = lo_row_3->get_value( ).
    ENDIF.
  ENDLOOP.
  lv_notifyconfigurationtier = lo_result->get_tier( ).
  lv_tierupgradestatus = lo_result->get_tierupgradestatus( ).
  lv_notifyconfigurationstat = lo_result->get_status( ).
  lv_string = lo_result->get_rejectionreason( ).
  lv_primitiveboolean = lo_result->get_deletionprotectionenbd( ).
  lv_timestamp = lo_result->get_createdtimestamp( ).
ENDIF.

UpdateNotifyConfiguration

Update a notify configuration to add voice channel and additional countries.

DATA(lo_result) = lo_client->updatenotifyconfiguration(
  it_enabledchannels = VALUE /aws1/cl_pp2ntfenbchnllist_w=>tt_notifyenabledchannelslist(
    ( new /aws1/cl_pp2ntfenbchnllist_w( |SMS| ) )
    ( new /aws1/cl_pp2ntfenbchnllist_w( |VOICE| ) )
  )
  it_enabledcountries = VALUE /aws1/cl_pp2isocntrycodelist_w=>tt_isocountrycodelist(
    ( new /aws1/cl_pp2isocntrycodelist_w( |US| ) )
    ( new /aws1/cl_pp2isocntrycodelist_w( |CA| ) )
    ( new /aws1/cl_pp2isocntrycodelist_w( |GB| ) )
  )
  iv_deletionprotectionenabled = ABAP_TRUE
  iv_notifyconfigurationid = |nc-1234567890abcdef0|
).