Deregisters a NotificationHub in the specified Region.
You can't deregister the last NotificationHub in the account. NotificationEvents stored in the deregistered NotificationHub are no longer visible. Recreating a new NotificationHub in the same Region restores access to those NotificationEvents.
Parameters:
-
notification_hub_region
(Region)
–
The NotificationHub Region.
Raises:
Source code in docs_src/capo_notifications/_services/notifications.py
| def deregister_notification_hub(
self,
notification_hub_region: "capo_notifications.types.region.Region",
*,
config_overrides: Optional[NotificationsClientConfig] = None,
) -> "capo_notifications.types.deregister_notification_hub_response.DeregisterNotificationHubResponse":
"""<p>Deregisters a <code>NotificationHub</code> in the specified Region.</p> <note> <p>You can't deregister the last <code>NotificationHub</code> in the account. <code>NotificationEvents</code> stored in the deregistered <code>NotificationHub</code> are no longer visible. Recreating a new <code>NotificationHub</code> in the same Region restores access to those <code>NotificationEvents</code>.</p> </note>
Args:
notification_hub_region: <p>The <code>NotificationHub</code> Region.</p>
Raises:
capo_notifications.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_notifications.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</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.
"""
def _handler(
req: "OperationRequest[capo_notifications.types.deregister_notification_hub_request.DeregisterNotificationHubRequest]",
) -> OperationResponse[
"capo_notifications.types.deregister_notification_hub_response.DeregisterNotificationHubResponse"
]:
import capo_notifications._operations.notifications.deregister_notification_hub
output, http_response = (
capo_notifications._operations.notifications.deregister_notification_hub.deregister_notification_hub(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeregisterNotificationHub")
)
input_: capo_notifications.types.deregister_notification_hub_request.DeregisterNotificationHubRequest = {
"notification_hub_region": notification_hub_region
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|