Skip to main content

notification_rules

Creates, updates, deletes or gets a notification_rule resource or lists notification_rules in a region

Overview

Namenotification_rules
TypeResource
DescriptionResource Type definition for AWS::CodeStarNotifications::NotificationRule
Idaws.codestarnotifications.notification_rules

Fields

NameDatatypeDescription
event_type_idstring
created_bystring
target_addressstring
event_type_idsarray
statusstring
detail_typestring
resourcestring
targetsarray
tagsobject
namestring
arnstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTEventTypeIds, Resource, DetailType, Targets, Name, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all notification_rules in a region.

SELECT
region,
event_type_id,
created_by,
target_address,
event_type_ids,
status,
detail_type,
resource,
targets,
tags,
name,
arn
FROM aws.codestarnotifications.notification_rules
WHERE region = 'us-east-1';

Gets all properties from an individual notification_rule.

SELECT
region,
event_type_id,
created_by,
target_address,
event_type_ids,
status,
detail_type,
resource,
targets,
tags,
name,
arn
FROM aws.codestarnotifications.notification_rules
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new notification_rule resource, using stack-deploy.

/*+ create */
INSERT INTO aws.codestarnotifications.notification_rules (
EventTypeIds,
DetailType,
Resource,
Targets,
Name,
region
)
SELECT
'{{ EventTypeIds }}',
'{{ DetailType }}',
'{{ Resource }}',
'{{ Targets }}',
'{{ Name }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.codestarnotifications.notification_rules
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the notification_rules resource, the following permissions are required:

Create

codestar-notifications:createNotificationRule

List

codestar-notifications:listNotificationRules

Read

codestar-notifications:describeNotificationRule

Delete

codestar-notifications:deleteNotificationRule,
codestar-notifications:describeNotificationRule

Update

codestar-notifications:updateNotificationRule,
codestar-notifications:TagResource,
codestar-notifications:UntagResource