Skip to content

list_dashboards async

list_dashboards(
    *,
    config_overrides: Optional[AsyncBCMDashboardsClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextPageToken] = None,
) -> ListDashboardsResponse

Returns a list of all dashboards in your account.

Parameters:

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

    The maximum number of results to return in a single call. The default value is 20.

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

    The token for the next page of results. Use the value returned in the previous response.

Raises:

  • AccessDeniedException –

    You do not have sufficient permissions to perform this action. Verify your IAM permissions and any resource policies.

  • InternalServerException –

    An internal error occurred while processing the request. Retry your request. If the problem persists, contact Amazon Web Services Support.

  • ThrottlingException –

    The request was denied due to request throttling. Reduce the frequency of requests and use exponential backoff.

  • ValidationException –

    The input parameters do not satisfy the requirements. Check the error message for specific validation details.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

Listing dashboards for a user

>>> await client.list_dashboards()
Source code in docs_src/capo_bcm_dashboards/_services/async_bcm_dashboards.py
async def list_dashboards(
    self,
    *,
    config_overrides: Optional[AsyncBCMDashboardsClientConfig] = None,
    max_results: Optional[
        "capo_bcm_dashboards.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_bcm_dashboards.types.next_page_token.NextPageToken"
    ] = None,
) -> "capo_bcm_dashboards.types.list_dashboards_response.ListDashboardsResponse":
    """<p>Returns a list of all dashboards in your account.</p>

    Args:
        max_results: <p>The maximum number of results to return in a single call. The default value is 20.</p>
        next_token: <p>The token for the next page of results. Use the value returned in the previous response.</p>

    Raises:
        capo_bcm_dashboards.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action. Verify your IAM permissions and any resource policies.</p>
        capo_bcm_dashboards.errors.internal_server_exception.InternalServerException: <p>An internal error occurred while processing the request. Retry your request. If the problem persists, contact Amazon Web Services Support.</p>
        capo_bcm_dashboards.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Reduce the frequency of requests and use exponential backoff.</p>
        capo_bcm_dashboards.errors.validation_exception.ValidationException: <p>The input parameters do not satisfy the requirements. Check the error message for specific validation details.</p>
        capo_bcm_dashboards.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Listing dashboards for a user

        >>> await client.list_dashboards()
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bcm_dashboards.types.list_dashboards_request.ListDashboardsRequest]",
    ) -> AsyncOperationResponse[
        "capo_bcm_dashboards.types.list_dashboards_response.ListDashboardsResponse"
    ]:
        import capo_bcm_dashboards._operations.awsbcm_dashboards_service.list_dashboards

        (
            output,
            http_response,
        ) = await capo_bcm_dashboards._operations.awsbcm_dashboards_service.list_dashboards.async_list_dashboards(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDashboards")
    )
    input_: capo_bcm_dashboards.types.list_dashboards_request.ListDashboardsRequest = {}
    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