Skip to content

list_notifications async

list_notifications(
    domain_identifier: DomainId,
    type: NotificationType,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    after_timestamp: Optional[datetime] = None,
    before_timestamp: Optional[datetime] = None,
    subjects: Optional[NotificationSubjects] = None,
    task_status: Optional[TaskStatus] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListNotificationsOutput

Lists all Amazon DataZone notifications.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the Amazon DataZone domain.

  • type (NotificationType) –

    The type of notifications.

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

    The time after which you want to list notifications.

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

    The time before which you want to list notifications.

  • subjects (Optional[NotificationSubjects], default: None ) –

    The subjects of notifications.

  • task_status (Optional[TaskStatus], default: None ) –

    The task status of notifications.

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

    The maximum number of notifications to return in a single call to ListNotifications. When the number of notifications to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListNotifications to list the next set of notifications.

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

    When the number of notifications is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of notifications, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListNotifications to list the next set of notifications.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def list_notifications(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    type: "capo_datazone.types.notification_type.NotificationType",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    after_timestamp: Optional[datetime.datetime] = None,
    before_timestamp: Optional[datetime.datetime] = None,
    subjects: Optional[
        "capo_datazone.types.notification_subjects.NotificationSubjects"
    ] = None,
    task_status: Optional["capo_datazone.types.task_status.TaskStatus"] = None,
    max_results: Optional["capo_datazone.types.max_results.MaxResults"] = None,
    next_token: Optional[
        "capo_datazone.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_datazone.types.list_notifications_output.ListNotificationsOutput":
    """<p>Lists all Amazon DataZone notifications.</p>

    Args:
        domain_identifier: <p>The identifier of the Amazon DataZone domain.</p>
        type: <p>The type of notifications.</p>
        after_timestamp: <p>The time after which you want to list notifications.</p>
        before_timestamp: <p>The time before which you want to list notifications.</p>
        subjects: <p>The subjects of notifications.</p>
        task_status: <p>The task status of notifications.</p>
        max_results: <p>The maximum number of notifications to return in a single call to <code>ListNotifications</code>. When the number of notifications to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>ListNotifications</code> to list the next set of notifications.</p>
        next_token: <p>When the number of notifications is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of notifications, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListNotifications</code> to list the next set of notifications.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datazone.types.list_notifications_input.ListNotificationsInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.list_notifications_output.ListNotificationsOutput"
    ]:
        import capo_datazone._operations.data_zone.list_notifications

        (
            output,
            http_response,
        ) = await capo_datazone._operations.data_zone.list_notifications.async_list_notifications(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_datazone.types.list_notifications_output.ListNotificationsOutput",
    ) -> dict[str, Any]:
        import capo_datazone.types.list_notifications_output

        return capo_datazone.types.list_notifications_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListNotifications", redact_output=_redact_output),
    )
    input_: capo_datazone.types.list_notifications_input.ListNotificationsInput = {
        "domain_identifier": domain_identifier,
        "type": type,
    }
    if after_timestamp is not None:
        input_["after_timestamp"] = after_timestamp
    if before_timestamp is not None:
        input_["before_timestamp"] = before_timestamp
    if subjects is not None:
        input_["subjects"] = subjects
    if task_status is not None:
        input_["task_status"] = task_status
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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