pub struct GroupService { /* private fields */ }Expand description
Implements a client for the Cloud Monitoring API.
§Example
let client = GroupService::builder().build().await?;
// use `client` to make requests to the Cloud Monitoring API.§Service Description
The Group API lets you inspect and manage your groups.
A group is a named filter that is used to identify a collection of monitored resources. Groups are typically used to mirror the physical and/or logical topology of the environment. Because group membership is computed dynamically, monitored resources that are started in the future are automatically placed in matching groups. By using a group to name monitored resources in, for example, an alert policy, the target of that alert policy is updated automatically as monitored resources are added and removed from the infrastructure.
§Configuration
To configure GroupService 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
GroupService holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap GroupService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl GroupService
impl GroupService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for GroupService.
let client = GroupService::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: GroupService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: GroupService + '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 list_groups(&self) -> ListGroups
pub fn list_groups(&self) -> ListGroups
Lists the existing groups.
Sourcepub fn create_group(&self) -> CreateGroup
pub fn create_group(&self) -> CreateGroup
Creates a new group.
Sourcepub fn update_group(&self) -> UpdateGroup
pub fn update_group(&self) -> UpdateGroup
Updates an existing group.
You can change any group attributes except name.
Sourcepub fn delete_group(&self) -> DeleteGroup
pub fn delete_group(&self) -> DeleteGroup
Deletes an existing group.
Sourcepub fn list_group_members(&self) -> ListGroupMembers
pub fn list_group_members(&self) -> ListGroupMembers
Lists the monitored resources that are members of a group.
Trait Implementations§
Source§impl Clone for GroupService
impl Clone for GroupService
Source§fn clone(&self) -> GroupService
fn clone(&self) -> GroupService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more