Unsubscribe - AWS CodeStar Notifications

Unsubscribe

Removes an association between a notification rule and an AWS Chatbot topic so that subscribers to that topic stop receiving notifications when the events described in the rule are triggered.

Request Syntax

POST /unsubscribe HTTP/1.1 Content-type: application/json { "Arn": "string", "TargetAddress": "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

TargetAddress

The ARN of the AWS Chatbot topic to unsubscribe from the notification rule.

Type: String

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

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Arn": "string" }

Response Elements

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

The following data is returned in JSON format by the service.

Arn

The Amazon Resource Name (ARN) of the the notification rule from which you have removed a subscription.

Type: String

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

Errors

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

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: