Skip to content

get_dashboard

get_dashboard(
    *,
    config_overrides: Optional[CloudWatchClientConfig] = None,
    dashboard_name: Optional[DashboardName] = None,
) -> GetDashboardOutput

Displays the details of the dashboard that you specify.

To copy an existing dashboard, use GetDashboard, and then use the data returned within DashboardBody as the template for the new dashboard when you call PutDashboard to create the copy.

You might have recently enabled an opt-in Region (Region that is disabled by default) for your account. In that Region, GetDashboard can return an access denied error for up to 24 hours after you enable the Region. This delay occurs while dashboard data propagates. The error does not indicate a problem with your permissions. Because dashboards are global, you can call GetDashboard in any other enabled Region, or retry after propagation completes.

Parameters:

  • dashboard_name (Optional[DashboardName], default: None ) –

    The name of the dashboard to be described.

Raises:

Source code in docs_src/capo_cloudwatch/_services/cloud_watch.py
def get_dashboard(
    self,
    *,
    config_overrides: Optional[CloudWatchClientConfig] = None,
    dashboard_name: Optional[
        "capo_cloudwatch.types.dashboard_name.DashboardName"
    ] = None,
) -> "capo_cloudwatch.types.get_dashboard_output.GetDashboardOutput":
    """<p>Displays the details of the dashboard that you specify.</p> <p>To copy an existing dashboard, use <code>GetDashboard</code>, and then use the data returned within <code>DashboardBody</code> as the template for the new dashboard when you call <code>PutDashboard</code> to create the copy.</p> <p>You might have recently enabled an <a href="https://docs.aws.amazon.com/glossary/latest/reference/glos-chap.html#optinregion">opt-in Region (Region that is disabled by default)</a> for your account. In that Region, <code>GetDashboard</code> can return an access denied error for up to 24 hours after you enable the Region. This delay occurs while dashboard data propagates. The error does not indicate a problem with your permissions. Because dashboards are global, you can call <code>GetDashboard</code> in any other enabled Region, or retry after propagation completes.</p>

    Args:
        dashboard_name: <p>The name of the dashboard to be described.</p>

    Raises:
        capo_cloudwatch.errors.dashboard_not_found_error.DashboardNotFoundError: <p>The specified dashboard does not exist.</p>
        capo_cloudwatch.errors.internal_service_fault.InternalServiceFault: <p>Request processing has failed due to some unknown error, exception, or failure.</p>
        capo_cloudwatch.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value of an input parameter is bad or out-of-range.</p>
        capo_cloudwatch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatch.types.get_dashboard_input.GetDashboardInput]",
    ) -> OperationResponse[
        "capo_cloudwatch.types.get_dashboard_output.GetDashboardOutput"
    ]:
        import capo_cloudwatch._operations.granite_service_version20100801.get_dashboard

        output, http_response = (
            capo_cloudwatch._operations.granite_service_version20100801.get_dashboard.get_dashboard(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDashboard")
    )
    input_: capo_cloudwatch.types.get_dashboard_input.GetDashboardInput = {}
    if dashboard_name is not None:
        input_["dashboard_name"] = dashboard_name

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