/AWS1/IF_PP2=>CREATENOTIFYCONFIGURATION()¶
About CreateNotifyConfiguration¶
Creates a new notify configuration for managed messaging. A notify configuration defines the settings for sending templated messages, including the display name, use case, enabled channels, and enabled countries.
Method Signature¶
METHODS /AWS1/IF_PP2~CREATENOTIFYCONFIGURATION
IMPORTING
!IV_DISPLAYNAME TYPE /AWS1/PP2NOTIFYCONFDISPLAYNAME OPTIONAL
!IV_USECASE TYPE /AWS1/PP2NOTIFYCONFUSECASE OPTIONAL
!IV_DEFAULTTEMPLATEID TYPE /AWS1/PP2NOTIFYTEMPLATEID OPTIONAL
!IV_POOLID TYPE /AWS1/PP2POOLIDORARN 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
!IV_CLIENTTOKEN TYPE /AWS1/PP2CLIENTTOKEN OPTIONAL
!IT_TAGS TYPE /AWS1/CL_PP2TAG=>TT_TAGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_pp2createntfyconfrslt
RAISING
/AWS1/CX_PP2ACCESSDENIEDEX
/AWS1/CX_PP2CONFLICTEXCEPTION
/AWS1/CX_PP2INTERNALSERVEREX
/AWS1/CX_PP2RESOURCENOTFOUNDEX
/AWS1/CX_PP2SERVICEQUOTAEXCDEX
/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_displayname TYPE /AWS1/PP2NOTIFYCONFDISPLAYNAME /AWS1/PP2NOTIFYCONFDISPLAYNAME¶
The display name to associate with the notify configuration.
iv_usecase TYPE /AWS1/PP2NOTIFYCONFUSECASE /AWS1/PP2NOTIFYCONFUSECASE¶
The use case 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
SMSandVOICE.
Optional arguments:¶
iv_defaulttemplateid TYPE /AWS1/PP2NOTIFYTEMPLATEID /AWS1/PP2NOTIFYTEMPLATEID¶
The default template identifier to associate with the notify configuration. If specified, this template is used when sending messages without an explicit template identifier.
iv_poolid TYPE /AWS1/PP2POOLIDORARN /AWS1/PP2POOLIDORARN¶
The identifier of the pool to associate with the notify configuration.
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.
iv_deletionprotectionenabled TYPE /AWS1/PP2BOOLEAN /AWS1/PP2BOOLEAN¶
By default this is set to false. When set to true the notify configuration can't be deleted. You can change this value using the UpdateNotifyConfiguration action.
iv_clienttoken TYPE /AWS1/PP2CLIENTTOKEN /AWS1/PP2CLIENTTOKEN¶
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
it_tags TYPE /AWS1/CL_PP2TAG=>TT_TAGLIST TT_TAGLIST¶
An array of tags (key and value pairs) associated with the notify configuration.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_pp2createntfyconfrslt /AWS1/CL_PP2CREATENTFYCONFRSLT¶
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->createnotifyconfiguration(
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| ) )
)
it_tags = VALUE /aws1/cl_pp2tag=>tt_taglist(
(
new /aws1/cl_pp2tag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_clienttoken = |string|
iv_defaulttemplateid = |string|
iv_deletionprotectionenabled = ABAP_TRUE
iv_displayname = |string|
iv_poolid = |string|
iv_usecase = |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( ).
LOOP AT lo_result->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_timestamp = lo_result->get_createdtimestamp( ).
ENDIF.
CreateNotifyConfiguration¶
Create a notify configuration for OTP code verification over SMS.
DATA(lo_result) = lo_client->createnotifyconfiguration(
it_enabledchannels = VALUE /aws1/cl_pp2ntfenbchnllist_w=>tt_notifyenabledchannelslist(
( new /aws1/cl_pp2ntfenbchnllist_w( |SMS| ) )
)
it_enabledcountries = VALUE /aws1/cl_pp2isocntrycodelist_w=>tt_isocountrycodelist(
( new /aws1/cl_pp2isocntrycodelist_w( |US| ) )
( new /aws1/cl_pp2isocntrycodelist_w( |CA| ) )
)
it_tags = VALUE /aws1/cl_pp2tag=>tt_taglist(
(
new /aws1/cl_pp2tag(
iv_key = |Environment|
iv_value = |Production|
)
)
)
iv_deletionprotectionenabled = ABAP_FALSE
iv_displayname = |MyOTPConfig|
iv_usecase = |CODE_VERIFICATION|
).