pub struct ServiceMonitoringService { /* private fields */ }
Expand description
Implements a client for the Cloud Monitoring API.
§Example
let client = ServiceMonitoringService::builder().build().await?;
// use `client` to make requests to the Cloud Monitoring API.
§Service Description
The Cloud Monitoring Service-Oriented Monitoring API has endpoints for
managing and querying aspects of a Metrics Scope’s services. These include
the Service
’s monitored resources, its Service-Level Objectives, and a
taxonomy of categorized Health Metrics.
§Configuration
To configure ServiceMonitoringService
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
ServiceMonitoringService
holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap ServiceMonitoringService
in
an Rc or Arc to reuse it, because it
already uses an Arc
internally.
Implementations§
Source§impl ServiceMonitoringService
impl ServiceMonitoringService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for ServiceMonitoringService.
let client = ServiceMonitoringService::builder().build().await?;
Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: ServiceMonitoringService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: ServiceMonitoringService + '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_service(&self) -> CreateService
pub fn create_service(&self) -> CreateService
Create a Service
.
Sourcepub fn get_service(&self) -> GetService
pub fn get_service(&self) -> GetService
Get the named Service
.
Sourcepub fn list_services(&self) -> ListServices
pub fn list_services(&self) -> ListServices
List Service
s for this Metrics Scope.
Sourcepub fn update_service(&self) -> UpdateService
pub fn update_service(&self) -> UpdateService
Update this Service
.
Sourcepub fn delete_service(&self) -> DeleteService
pub fn delete_service(&self) -> DeleteService
Soft delete this Service
.
Sourcepub fn create_service_level_objective(&self) -> CreateServiceLevelObjective
pub fn create_service_level_objective(&self) -> CreateServiceLevelObjective
Create a ServiceLevelObjective
for the given Service
.
Sourcepub fn get_service_level_objective(&self) -> GetServiceLevelObjective
pub fn get_service_level_objective(&self) -> GetServiceLevelObjective
Get a ServiceLevelObjective
by name.
Sourcepub fn list_service_level_objectives(&self) -> ListServiceLevelObjectives
pub fn list_service_level_objectives(&self) -> ListServiceLevelObjectives
List the ServiceLevelObjective
s for the given Service
.
Sourcepub fn update_service_level_objective(&self) -> UpdateServiceLevelObjective
pub fn update_service_level_objective(&self) -> UpdateServiceLevelObjective
Update the given ServiceLevelObjective
.
Sourcepub fn delete_service_level_objective(&self) -> DeleteServiceLevelObjective
pub fn delete_service_level_objective(&self) -> DeleteServiceLevelObjective
Delete the given ServiceLevelObjective
.
Trait Implementations§
Source§impl Clone for ServiceMonitoringService
impl Clone for ServiceMonitoringService
Source§fn clone(&self) -> ServiceMonitoringService
fn clone(&self) -> ServiceMonitoringService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more