Skip to content

list_managed_notification_events async

list_managed_notification_events(
    *,
    config_overrides: Optional[AsyncNotificationsClientConfig] = None,
    start_time: Optional[datetime] = None,
    end_time: Optional[datetime] = None,
    locale: Optional[LocaleCode] = None,
    source: Optional[Source] = None,
    max_results: Optional[int] = None,
    next_token: Optional[NextToken] = None,
    organizational_unit_id: Optional[OrganizationalUnitId] = None,
    related_account: Optional[AccountId] = None,
    include_sensitive_events: Optional[bool] = None,
) -> ListManagedNotificationEventsResponse

Returns a list of Managed Notification Events according to specified filters, ordered by creation time in reverse chronological order (newest first).

Parameters:

  • start_time (Optional[datetime], default: None ) –

    The earliest time of events to return from this call.

  • end_time (Optional[datetime], default: None ) –

    Latest time of events to return from this call.

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

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

  • source (Optional[Source], default: None ) –

    The Amazon Web Services service the event originates from. For example aws.cloudwatch.

  • max_results (Optional[int], default: None ) –

    The maximum number of results to be returned in this call. Defaults to 20.

  • next_token (Optional[NextToken], default: None ) –

    The start token for paginated calls. Retrieved from the response of a previous ListManagedNotificationChannelAssociations call. Next token uses Base64 encoding.

  • organizational_unit_id (Optional[OrganizationalUnitId], default: None ) –

    The Organizational Unit Id that an Amazon Web Services account belongs to.

  • related_account (Optional[AccountId], default: None ) –

    The Amazon Web Services account ID associated with the Managed Notification Events.

  • include_sensitive_events (Optional[bool], default: None ) –

    Specifies whether to include sensitive events in the result. By default, only non-sensitive events are returned. The notifications:AccessSensitiveEvents permission controls access to sensitive events.

Raises:

Source code in docs_src/capo_notifications/_services/async_notifications.py
async def list_managed_notification_events(
    self,
    *,
    config_overrides: Optional[AsyncNotificationsClientConfig] = None,
    start_time: Optional[datetime.datetime] = None,
    end_time: Optional[datetime.datetime] = None,
    locale: Optional["capo_notifications.types.locale_code.LocaleCode"] = None,
    source: Optional["capo_notifications.types.source.Source"] = None,
    max_results: Optional[int] = None,
    next_token: Optional["capo_notifications.types.next_token.NextToken"] = None,
    organizational_unit_id: Optional[
        "capo_notifications.types.organizational_unit_id.OrganizationalUnitId"
    ] = None,
    related_account: Optional[
        "capo_notifications.types.account_id.AccountId"
    ] = None,
    include_sensitive_events: Optional[bool] = None,
) -> "capo_notifications.types.list_managed_notification_events_response.ListManagedNotificationEventsResponse":
    """<p>Returns a list of Managed Notification Events according to specified filters, ordered by creation time in reverse chronological order (newest first).</p>

    Args:
        start_time: <p>The earliest time of events to return from this call.</p>
        end_time: <p>Latest time of events to return from this call.</p>
        locale: <p>The locale code of the language used for the retrieved NotificationEvent. The default locale is English (en_US).</p>
        source: <p>The Amazon Web Services service the event originates from. For example aws.cloudwatch.</p>
        max_results: <p>The maximum number of results to be returned in this call. Defaults to 20.</p>
        next_token: <p>The start token for paginated calls. Retrieved from the response of a previous <code>ListManagedNotificationChannelAssociations</code> call. Next token uses Base64 encoding.</p>
        organizational_unit_id: <p>The Organizational Unit Id that an Amazon Web Services account belongs to.</p>
        related_account: <p>The Amazon Web Services account ID associated with the Managed Notification Events.</p>
        include_sensitive_events: <p>Specifies whether to include sensitive events in the result. By default, only non-sensitive events are returned. The <code>notifications:AccessSensitiveEvents</code> permission controls access to sensitive events.</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.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.list_managed_notification_events_request.ListManagedNotificationEventsRequest]",
    ) -> AsyncOperationResponse[
        "capo_notifications.types.list_managed_notification_events_response.ListManagedNotificationEventsResponse"
    ]:
        import capo_notifications._operations.notifications.list_managed_notification_events

        (
            output,
            http_response,
        ) = await capo_notifications._operations.notifications.list_managed_notification_events.async_list_managed_notification_events(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListManagedNotificationEvents")
    )
    input_: capo_notifications.types.list_managed_notification_events_request.ListManagedNotificationEventsRequest = {}
    if start_time is not None:
        input_["start_time"] = start_time
    if end_time is not None:
        input_["end_time"] = end_time
    if locale is not None:
        input_["locale"] = locale
    if source is not None:
        input_["source"] = source
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if organizational_unit_id is not None:
        input_["organizational_unit_id"] = organizational_unit_id
    if related_account is not None:
        input_["related_account"] = related_account
    if include_sensitive_events is not None:
        input_["include_sensitive_events"] = include_sensitive_events

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output