Skip to content

list_dashboards

list_dashboards(
    *,
    config_overrides: Optional[CloudTrailClientConfig] = None,
    name_prefix: Optional[DashboardName] = None,
    type: Optional[DashboardType] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[ListDashboardsMaxResultsCount] = None,
) -> ListDashboardsResponse

CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see CloudTrail Lake availability change.

Returns information about all dashboards in the account, in the current Region.

Parameters:

Raises:

Source code in docs_src/capo_cloudtrail/_services/cloud_trail.py
def list_dashboards(
    self,
    *,
    config_overrides: Optional[CloudTrailClientConfig] = None,
    name_prefix: Optional[
        "capo_cloudtrail.types.dashboard_name.DashboardName"
    ] = None,
    type: Optional["capo_cloudtrail.types.dashboard_type.DashboardType"] = None,
    next_token: Optional[
        "capo_cloudtrail.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[
        "capo_cloudtrail.types.list_dashboards_max_results_count.ListDashboardsMaxResultsCount"
    ] = None,
) -> "capo_cloudtrail.types.list_dashboards_response.ListDashboardsResponse":
    """<important> <p>CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake-service-availability-change.html">CloudTrail Lake availability change</a>.</p> </important> <p> Returns information about all dashboards in the account, in the current Region. </p>

    Args:
        name_prefix: <p> Specify a name prefix to filter on. </p>
        type: <p> Specify a dashboard type to filter on: <code>CUSTOM</code> or <code>MANAGED</code>. </p>
        next_token: <p> A token you can use to get the next page of dashboard results. </p>
        max_results: <p> The maximum number of dashboards to display on a single page. </p>

    Raises:
        capo_cloudtrail.errors.unsupported_operation_exception.UnsupportedOperationException: <p>This exception is thrown when the requested operation is not supported.</p>
        capo_cloudtrail.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudtrail.types.list_dashboards_request.ListDashboardsRequest]",
    ) -> OperationResponse[
        "capo_cloudtrail.types.list_dashboards_response.ListDashboardsResponse"
    ]:
        import capo_cloudtrail._operations.cloud_trail_20131101.list_dashboards

        output, http_response = (
            capo_cloudtrail._operations.cloud_trail_20131101.list_dashboards.list_dashboards(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDashboards")
    )
    input_: capo_cloudtrail.types.list_dashboards_request.ListDashboardsRequest = {}
    if name_prefix is not None:
        input_["name_prefix"] = name_prefix
    if type is not None:
        input_["type"] = type
    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