/AWS1/IF_CNT=>CREATENOTIFICATION()¶
About CreateNotification¶
Creates a new notification to be delivered to specified recipients. Notifications can include localized content with links, and an optional expiration time. Recipients can be specified as individual user ARNs or instance ARNs to target all users in an instance.
Method Signature¶
METHODS /AWS1/IF_CNT~CREATENOTIFICATION
IMPORTING
!IV_INSTANCEID TYPE /AWS1/CNTINSTANCEID OPTIONAL
!IV_EXPIRESAT TYPE /AWS1/CNTTIMESTAMP OPTIONAL
!IT_RECIPIENTS TYPE /AWS1/CL_CNTRECIPIENTLIST_W=>TT_RECIPIENTLIST OPTIONAL
!IV_PRIORITY TYPE /AWS1/CNTCNFGRBLNOTIFPRIORITY OPTIONAL
!IT_CONTENT TYPE /AWS1/CL_CNTNOTIFCONTENT_W=>TT_NOTIFICATIONCONTENT OPTIONAL
!IT_TAGS TYPE /AWS1/CL_CNTTAGMAP_W=>TT_TAGMAP OPTIONAL
!IV_PREDEFINEDNOTIFICATIONID TYPE /AWS1/CNTNOTIFICATIONID OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/CNTCLIENTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cntcreatenotifrsp
RAISING
/AWS1/CX_CNTACCESSDENIEDEX
/AWS1/CX_CNTDUPLICATERESRCEX
/AWS1/CX_CNTINTERNALSERVICEEX
/AWS1/CX_CNTINVALIDPARAMETEREX
/AWS1/CX_CNTINVALIDREQUESTEX
/AWS1/CX_CNTRESOURCENOTFOUNDEX
/AWS1/CX_CNTTHROTTLINGEX
/AWS1/CX_CNTCLIENTEXC
/AWS1/CX_CNTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_instanceid TYPE /AWS1/CNTINSTANCEID /AWS1/CNTINSTANCEID¶
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
it_recipients TYPE /AWS1/CL_CNTRECIPIENTLIST_W=>TT_RECIPIENTLIST TT_RECIPIENTLIST¶
A list of Amazon Resource Names (ARNs) identifying the recipients of the notification. Can include user ARNs or instance ARNs to target all users in an instance. Maximum of 200 recipients.
it_content TYPE /AWS1/CL_CNTNOTIFCONTENT_W=>TT_NOTIFICATIONCONTENT TT_NOTIFICATIONCONTENT¶
The localized content of the notification. A map where keys are locale codes and values are the notification text in that locale. Content supports links. Maximum 250 characters per locale.
Optional arguments:¶
iv_expiresat TYPE /AWS1/CNTTIMESTAMP /AWS1/CNTTIMESTAMP¶
The timestamp when the notification should expire and no longer be displayed to users. If not specified, defaults to one week from creation.
iv_priority TYPE /AWS1/CNTCNFGRBLNOTIFPRIORITY /AWS1/CNTCNFGRBLNOTIFPRIORITY¶
The priority level of the notification. Valid values are HIGH and LOW. High priority notifications are displayed above low priority notifications.
it_tags TYPE /AWS1/CL_CNTTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
The tags used to organize, track, or control access for this resource. For example,
{ "Tags": {"key1":"value1", "key2":"value2"} }.
iv_predefinednotificationid TYPE /AWS1/CNTNOTIFICATIONID /AWS1/CNTNOTIFICATIONID¶
The unique identifier for a notification.
iv_clienttoken TYPE /AWS1/CNTCLIENTTOKEN /AWS1/CNTCLIENTTOKEN¶
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cntcreatenotifrsp /AWS1/CL_CNTCREATENOTIFRSP¶
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->createnotification(
it_content = VALUE /aws1/cl_cntnotifcontent_w=>tt_notificationcontent(
(
VALUE /aws1/cl_cntnotifcontent_w=>ts_notificationcontent_maprow(
key = |string|
value = new /aws1/cl_cntnotifcontent_w( |string| )
)
)
)
it_recipients = VALUE /aws1/cl_cntrecipientlist_w=>tt_recipientlist(
( new /aws1/cl_cntrecipientlist_w( |string| ) )
)
it_tags = VALUE /aws1/cl_cnttagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_cnttagmap_w=>ts_tagmap_maprow(
key = |string|
value = new /aws1/cl_cnttagmap_w( |string| )
)
)
)
iv_clienttoken = |string|
iv_expiresat = '20150101000000.0000000'
iv_instanceid = |string|
iv_predefinednotificationid = |string|
iv_priority = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_notificationid = lo_result->get_notificationid( ).
lv_arn = lo_result->get_notificationarn( ).
ENDIF.