pub struct GroupService { /* private fields */ }Expand description
Implements a client for 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
GroupService has various configuration parameters, the defaults should
work with most applications.
§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 async fn new_with_config(conf: ClientConfig) -> Result<Self>
pub async fn new_with_config(conf: ClientConfig) -> Result<Self>
Creates a new client with the specified configuration.
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 when mocking the client.
Sourcepub fn list_groups(&self, name: impl Into<String>) -> ListGroups
pub fn list_groups(&self, name: impl Into<String>) -> ListGroups
Lists the existing groups.
Sourcepub fn create_group(&self, name: impl Into<String>) -> CreateGroup
pub fn create_group(&self, name: impl Into<String>) -> CreateGroup
Creates a new group.
Sourcepub fn update_group(&self, group: impl Into<Group>) -> UpdateGroup
pub fn update_group(&self, group: impl Into<Group>) -> UpdateGroup
Updates an existing group.
You can change any group attributes except name.
Sourcepub fn delete_group(&self, name: impl Into<String>) -> DeleteGroup
pub fn delete_group(&self, name: impl Into<String>) -> DeleteGroup
Deletes an existing group.
Sourcepub fn list_group_members(&self, name: impl Into<String>) -> ListGroupMembers
pub fn list_group_members(&self, name: impl Into<String>) -> 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