Removes an association between a notification rule and an Amazon Q Developer in chat applications topic so that subscribers to that topic stop receiving notifications when the events described in the rule are triggered.
Parameters:
-
arn
(NotificationRuleArn)
–
The Amazon Resource Name (ARN) of the notification rule.
-
target_address
(TargetAddress)
–
The ARN of the Amazon Q Developer in chat applications topic to unsubscribe from the notification rule.
Raises:
Source code in docs_src/capo_codestar_notifications/_services/codestarnotifications.py
| def unsubscribe(
self,
arn: "capo_codestar_notifications.types.notification_rule_arn.NotificationRuleArn",
target_address: "capo_codestar_notifications.types.target_address.TargetAddress",
*,
config_overrides: Optional[codestarnotificationsClientConfig] = None,
) -> "capo_codestar_notifications.types.unsubscribe_result.UnsubscribeResult":
"""<p>Removes an association between a notification rule and an Amazon Q Developer in chat applications topic so that subscribers to that topic stop receiving notifications when the events described in the rule are triggered.</p>
Args:
arn: <p>The Amazon Resource Name (ARN) of the notification rule.</p>
target_address: <p>The ARN of the Amazon Q Developer in chat applications topic to unsubscribe from the notification rule.</p>
Raises:
capo_codestar_notifications.errors.validation_exception.ValidationException: <p>One or more parameter values are not valid.</p>
capo_codestar_notifications.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_codestar_notifications.types.unsubscribe_request.UnsubscribeRequest]",
) -> OperationResponse[
"capo_codestar_notifications.types.unsubscribe_result.UnsubscribeResult"
]:
import capo_codestar_notifications._operations.code_star_notifications_20191015.unsubscribe
output, http_response = (
capo_codestar_notifications._operations.code_star_notifications_20191015.unsubscribe.unsubscribe(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_codestar_notifications.types.unsubscribe_request.UnsubscribeRequest",
) -> dict[str, Any]:
import capo_codestar_notifications.types.unsubscribe_request
return (
capo_codestar_notifications.types.unsubscribe_request.redact_sensitive(
input_
)
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("Unsubscribe", redact_input=_redact_input),
)
input_: capo_codestar_notifications.types.unsubscribe_request.UnsubscribeRequest = {
"arn": arn,
"target_address": target_address,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|