Skip to content

get_managed_notification_event

get_managed_notification_event(
    arn: ManagedNotificationEventArn,
    *,
    config_overrides: Optional[NotificationsClientConfig] = None,
    locale: Optional[LocaleCode] = None,
) -> GetManagedNotificationEventResponse

Returns a specified ManagedNotificationEvent.

Parameters:

  • arn (ManagedNotificationEventArn) –

    The Amazon Resource Name (ARN) of the ManagedNotificationEvent to return.

  • locale (Optional[LocaleCode], default: None ) –

    The locale code of the language used for the retrieved ManagedNotificationEvent. The default locale is English (en_US).

Raises:

Source code in docs_src/capo_notifications/_services/notifications.py
def get_managed_notification_event(
    self,
    arn: "capo_notifications.types.managed_notification_event_arn.ManagedNotificationEventArn",
    *,
    config_overrides: Optional[NotificationsClientConfig] = None,
    locale: Optional["capo_notifications.types.locale_code.LocaleCode"] = None,
) -> "capo_notifications.types.get_managed_notification_event_response.GetManagedNotificationEventResponse":
    """<p>Returns a specified <code>ManagedNotificationEvent</code>.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the <code>ManagedNotificationEvent</code> to return.</p>
        locale: <p>The locale code of the language used for the retrieved <code>ManagedNotificationEvent</code>. The default locale is English <code>(en_US)</code>.</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.
    """

    def _handler(
        req: "OperationRequest[capo_notifications.types.get_managed_notification_event_request.GetManagedNotificationEventRequest]",
    ) -> OperationResponse[
        "capo_notifications.types.get_managed_notification_event_response.GetManagedNotificationEventResponse"
    ]:
        import capo_notifications._operations.notifications.get_managed_notification_event

        output, http_response = (
            capo_notifications._operations.notifications.get_managed_notification_event.get_managed_notification_event(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_notifications.types.get_managed_notification_event_response.GetManagedNotificationEventResponse",
    ) -> dict[str, Any]:
        import capo_notifications.types.get_managed_notification_event_response

        return capo_notifications.types.get_managed_notification_event_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetManagedNotificationEvent", redact_output=_redact_output
        ),
    )
    input_: capo_notifications.types.get_managed_notification_event_request.GetManagedNotificationEventRequest = {
        "arn": arn
    }
    if locale is not None:
        input_["locale"] = locale

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output