Disassociates a Channel from a specified NotificationConfiguration. Supported Channels include Amazon Q Developer in chat applications, the Console Mobile Application, and emails (notifications-contacts).
Parameters:
-
arn
(ChannelArn)
–
The Amazon Resource Name (ARN) of the Channel to disassociate.
-
notification_configuration_arn
(NotificationConfigurationArn)
–
The ARN of the NotificationConfiguration to disassociate.
Raises:
Source code in docs_src/capo_notifications/_services/async_notifications.py
| async def disassociate_channel(
self,
arn: "capo_notifications.types.channel_arn.ChannelArn",
notification_configuration_arn: "capo_notifications.types.notification_configuration_arn.NotificationConfigurationArn",
*,
config_overrides: Optional[AsyncNotificationsClientConfig] = None,
) -> "capo_notifications.types.disassociate_channel_response.DisassociateChannelResponse":
"""<p>Disassociates a Channel from a specified <code>NotificationConfiguration</code>. Supported Channels include Amazon Q Developer in chat applications, the Console Mobile Application, and emails (notifications-contacts).</p>
Args:
arn: <p>The Amazon Resource Name (ARN) of the Channel to disassociate.</p>
notification_configuration_arn: <p>The ARN of the <code>NotificationConfiguration</code> to disassociate.</p>
Raises:
capo_notifications.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_notifications.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
capo_notifications.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist. </p>
capo_notifications.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling. </p>
capo_notifications.errors.validation_exception.ValidationException: <p>This exception is thrown when the notification event fails validation.</p>
capo_notifications.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_notifications.types.disassociate_channel_request.DisassociateChannelRequest]",
) -> AsyncOperationResponse[
"capo_notifications.types.disassociate_channel_response.DisassociateChannelResponse"
]:
import capo_notifications._operations.notifications.disassociate_channel
(
output,
http_response,
) = await capo_notifications._operations.notifications.disassociate_channel.async_disassociate_channel(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisassociateChannel")
)
input_: capo_notifications.types.disassociate_channel_request.DisassociateChannelRequest = {
"arn": arn,
"notification_configuration_arn": notification_configuration_arn,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|