pub struct DashboardsService { /* private fields */ }
Expand description
Implements a client for the Cloud Monitoring API.
§Example
let client = DashboardsService::builder().build().await?;
// use `client` to make requests to the Cloud Monitoring API.
§Service Description
Manages Stackdriver dashboards. A dashboard is an arrangement of data display widgets in a specific layout.
§Configuration
To configure DashboardsService
use the with_*
methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://monitoring.googleapis.com
). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
DashboardsService
holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap DashboardsService
in
an Rc or Arc to reuse it, because it
already uses an Arc
internally.
Implementations§
Source§impl DashboardsService
impl DashboardsService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for DashboardsService.
let client = DashboardsService::builder().build().await?;
Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: DashboardsService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: DashboardsService + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn create_dashboard(&self) -> CreateDashboard
pub fn create_dashboard(&self) -> CreateDashboard
Creates a new custom dashboard. For examples on how you can use this API to
create dashboards, see Managing dashboards by
API. This
method requires the monitoring.dashboards.create
permission on the
specified project. For more information about permissions, see Cloud
Identity and Access Management.
Sourcepub fn list_dashboards(&self) -> ListDashboards
pub fn list_dashboards(&self) -> ListDashboards
Lists the existing dashboards.
This method requires the monitoring.dashboards.list
permission
on the specified project. For more information, see
Cloud Identity and Access Management.
Sourcepub fn get_dashboard(&self) -> GetDashboard
pub fn get_dashboard(&self) -> GetDashboard
Fetches a specific dashboard.
This method requires the monitoring.dashboards.get
permission
on the specified dashboard. For more information, see
Cloud Identity and Access Management.
Sourcepub fn delete_dashboard(&self) -> DeleteDashboard
pub fn delete_dashboard(&self) -> DeleteDashboard
Deletes an existing custom dashboard.
This method requires the monitoring.dashboards.delete
permission
on the specified dashboard. For more information, see
Cloud Identity and Access Management.
Sourcepub fn update_dashboard(&self) -> UpdateDashboard
pub fn update_dashboard(&self) -> UpdateDashboard
Replaces an existing custom dashboard with a new definition.
This method requires the monitoring.dashboards.update
permission
on the specified dashboard. For more information, see
Cloud Identity and Access Management.
Trait Implementations§
Source§impl Clone for DashboardsService
impl Clone for DashboardsService
Source§fn clone(&self) -> DashboardsService
fn clone(&self) -> DashboardsService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more