Skip to content

list_omni_dashboards

list_omni_dashboards(
    space_id: SpaceId,
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    name_prefix: Optional[str] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[int] = None,
) -> ListOmniDashboardsOutput

Returns the dashboards in a space, optionally filtered by name prefix.

Parameters:

  • space_id (SpaceId) –

    The unique ID of the space.

  • name_prefix (Optional[str], default: None ) –

    Filter to dashboards whose name starts with this prefix.

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

    A token to retrieve the next page of results.

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

    The maximum number of dashboards to return per page. Defaults to 100. A page can contain fewer results than this value even when more results remain; continue while nextToken is present.

Raises:

Examples:

List dashboards in a space The following example lists the first page of dashboards in a space and returns a nextToken to retrieve the next page. Payloads are shown as JSON; on the wire they are CBOR-encoded.

>>> client.list_omni_dashboards(space_id='a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d', max_results=50)
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
def list_omni_dashboards(
    self,
    space_id: "capo_cloudwatchomni.types.space_id.SpaceId",
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    name_prefix: Optional[str] = None,
    next_token: Optional["capo_cloudwatchomni.types.next_token.NextToken"] = None,
    max_results: Optional[int] = None,
) -> (
    "capo_cloudwatchomni.types.list_omni_dashboards_output.ListOmniDashboardsOutput"
):
    """Returns the dashboards in a space, optionally filtered by name prefix.

    Args:
        space_id: The unique ID of the space.
        name_prefix: Filter to dashboards whose name starts with this prefix.
        next_token: A token to retrieve the next page of results.
        max_results: The maximum number of dashboards to return per page. Defaults to 100. A page can contain fewer results than this value even when more results remain; continue while nextToken is present.

    Raises:
        capo_cloudwatchomni.errors.access_denied_exception.AccessDeniedException: The caller is not authorized to perform this action.
        capo_cloudwatchomni.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_cloudwatchomni.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource does not exist.
        capo_cloudwatchomni.errors.throttling_exception.ThrottlingException: The request was throttled due to exceeding the allowed request rate.
        capo_cloudwatchomni.errors.validation_exception.ValidationException: A parameter is specified incorrectly.
        capo_cloudwatchomni.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List dashboards in a space
        The following example lists the first page of dashboards in a space and returns a nextToken to retrieve the next page. Payloads are shown as JSON; on the wire they are CBOR-encoded.

        >>> client.list_omni_dashboards(space_id='a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d', max_results=50)
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatchomni.types.list_omni_dashboards_input.ListOmniDashboardsInput]",
    ) -> OperationResponse[
        "capo_cloudwatchomni.types.list_omni_dashboards_output.ListOmniDashboardsOutput"
    ]:
        import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.list_omni_dashboards

        output, http_response = (
            capo_cloudwatchomni._operations.cloud_watch_omni_frontend.list_omni_dashboards.list_omni_dashboards(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListOmniDashboards")
    )
    input_: capo_cloudwatchomni.types.list_omni_dashboards_input.ListOmniDashboardsInput = {
        "space_id": space_id
    }
    if name_prefix is not None:
        input_["name_prefix"] = name_prefix
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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