UpdateNotificationRule - AWS CodeStar Notifications

UpdateNotificationRule

Updates a notification rule for a resource. You can change the events that trigger the notification rule, the status of the rule, and the targets that receive the notifications.

Note

To add or remove tags for a notification rule, you must use TagResource and UntagResource.

Request Syntax

POST /updateNotificationRule HTTP/1.1 Content-type: application/json { "Arn": "string", "DetailType": "string", "EventTypeIds": [ "string" ], "Name": "string", "Status": "string", "Targets": [ { "TargetAddress": "string", "TargetType": "string" } ] }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

Arn

The Amazon Resource Name (ARN) of the notification rule.

Type: String

Pattern: ^arn:aws[^:\s]*:codestar-notifications:[^:\s]+:\d{12}:notificationrule\/(.*\S)?$

Required: Yes

DetailType

The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.

Type: String

Valid Values: BASIC | FULL

Required: No

EventTypeIds

A list of event types associated with this notification rule. For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 200.

Required: No

Name

The name of the notification rule.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [A-Za-z0-9\-_ ]+$

Required: No

Status

The status of the notification rule. Valid statuses include enabled (sending notifications) or disabled (not sending notifications).

Type: String

Valid Values: ENABLED | DISABLED

Required: No

Targets

The address and type of the targets to receive notifications from this notification rule.

Type: Array of Target objects

Array Members: Maximum number of 10 items.

Required: No

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

ConfigurationException

Some or all of the configuration is incomplete, missing, or not valid.

HTTP Status Code: 400

ResourceNotFoundException

AWS CodeStar Notifications can't find a resource that matches the provided ARN.

HTTP Status Code: 404

ValidationException

One or more parameter values are not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: