/AWS1/IF_STN=>CREATENOTIFICATIONRULE()¶
About CreateNotificationRule¶
Creates a notification rule for a resource. The rule specifies the events you want notifications about and the targets (such as Amazon Q Developer in chat applications topics or Amazon Q Developer in chat applications clients configured for Slack) where you want to receive them.
Method Signature¶
METHODS /AWS1/IF_STN~CREATENOTIFICATIONRULE
IMPORTING
!IV_NAME TYPE /AWS1/STNNOTIFICATIONRULENAME OPTIONAL
!IT_EVENTTYPEIDS TYPE /AWS1/CL_STNEVENTTYPEIDS_W=>TT_EVENTTYPEIDS OPTIONAL
!IV_RESOURCE TYPE /AWS1/STNNOTIFRULERESOURCE OPTIONAL
!IT_TARGETS TYPE /AWS1/CL_STNTARGET=>TT_TARGETS OPTIONAL
!IV_DETAILTYPE TYPE /AWS1/STNDETAILTYPE OPTIONAL
!IV_CLIENTREQUESTTOKEN TYPE /AWS1/STNCLIENTREQUESTTOKEN OPTIONAL
!IT_TAGS TYPE /AWS1/CL_STNTAGS_W=>TT_TAGS OPTIONAL
!IV_STATUS TYPE /AWS1/STNNOTIFRULESTATUS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_stncrenotifrulerslt
RAISING
/AWS1/CX_STNACCESSDENIEDEX
/AWS1/CX_STNCONCURRENTMODEX
/AWS1/CX_STNCONFEXCEPTION
/AWS1/CX_STNLIMITEXCEEDEDEX
/AWS1/CX_STNRESRCALRDYEXISTSEX
/AWS1/CX_STNVALIDATIONEX
/AWS1/CX_STNCLIENTEXC
/AWS1/CX_STNSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/STNNOTIFICATIONRULENAME /AWS1/STNNOTIFICATIONRULENAME¶
The name for the notification rule. Notification rule names must be unique in your Amazon Web Services account.
it_eventtypeids TYPE /AWS1/CL_STNEVENTTYPEIDS_W=>TT_EVENTTYPEIDS TT_EVENTTYPEIDS¶
A list of event types associated with this notification rule. For a list of allowed events, see EventTypeSummary.
iv_resource TYPE /AWS1/STNNOTIFRULERESOURCE /AWS1/STNNOTIFRULERESOURCE¶
The Amazon Resource Name (ARN) of the resource to associate with the notification rule. Supported resources include pipelines in CodePipeline, repositories in CodeCommit, and build projects in CodeBuild.
it_targets TYPE /AWS1/CL_STNTARGET=>TT_TARGETS TT_TARGETS¶
A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and Amazon Q Developer in chat applications clients to associate with the notification rule.
iv_detailtype TYPE /AWS1/STNDETAILTYPE /AWS1/STNDETAILTYPE¶
The level of detail to include in the notifications for this resource.
BASICwill include only the contents of the event as it would appear in Amazon CloudWatch.FULLwill include any supplemental information provided by CodeStar Notifications and/or the service for the resource for which the notification is created.
Optional arguments:¶
iv_clientrequesttoken TYPE /AWS1/STNCLIENTREQUESTTOKEN /AWS1/STNCLIENTREQUESTTOKEN¶
A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request with the same parameters is received and a token is included, the request returns information about the initial request that used that token.
The Amazon Web Services SDKs prepopulate client request tokens. If you are using an Amazon Web Services SDK, an idempotency token is created for you.
it_tags TYPE /AWS1/CL_STNTAGS_W=>TT_TAGS TT_TAGS¶
A list of tags to apply to this notification rule. Key names cannot start with "
aws".
iv_status TYPE /AWS1/STNNOTIFRULESTATUS /AWS1/STNNOTIFRULESTATUS¶
The status of the notification rule. The default value is
ENABLED. If the status is set toDISABLED, notifications aren't sent for the notification rule.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_stncrenotifrulerslt /AWS1/CL_STNCRENOTIFRULERSLT¶
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->createnotificationrule(
it_eventtypeids = VALUE /aws1/cl_stneventtypeids_w=>tt_eventtypeids(
( new /aws1/cl_stneventtypeids_w( |string| ) )
)
it_tags = VALUE /aws1/cl_stntags_w=>tt_tags(
(
VALUE /aws1/cl_stntags_w=>ts_tags_maprow(
key = |string|
value = new /aws1/cl_stntags_w( |string| )
)
)
)
it_targets = VALUE /aws1/cl_stntarget=>tt_targets(
(
new /aws1/cl_stntarget(
iv_targetaddress = |string|
iv_targettype = |string|
)
)
)
iv_clientrequesttoken = |string|
iv_detailtype = |string|
iv_name = |string|
iv_resource = |string|
iv_status = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_notificationrulearn = lo_result->get_arn( ).
ENDIF.