pub struct GroupsClient { /* private fields */ }
Expand description
GroupsClient is a client for the groups service.
Implementations§
source§impl GroupsClient
impl GroupsClient
sourcepub fn new(auth_context: AuthContext, region: CoralogixRegion) -> Result<Self>
pub fn new(auth_context: AuthContext, region: CoralogixRegion) -> Result<Self>
Creates a new GroupsClient.
§Arguments
api_key' - The [
AuthContext`] to use for authentication.region
- TheCoralogixRegion
to connect to.
sourcepub async fn create(
&self,
name: String,
team_id: TeamId,
description: String,
external_id: Option<String>,
role_ids: Vec<RoleId>,
user_ids: Vec<UserId>,
scope_filters: Option<ScopeFilters>,
next_gen_scope_id: Option<String>,
) -> Result<CreateTeamGroupResponse>
pub async fn create( &self, name: String, team_id: TeamId, description: String, external_id: Option<String>, role_ids: Vec<RoleId>, user_ids: Vec<UserId>, scope_filters: Option<ScopeFilters>, next_gen_scope_id: Option<String>, ) -> Result<CreateTeamGroupResponse>
Creates a new group.
§Arguments
name
- The name of the group.team_id
- TheTeamId
of the team the group belongs to.description
- The description of the group.external_id
- The external ID of the group.role_ids
- TheRoleId
s of the roles in the group.user_ids
- TheUserId
s of the users in the group.scope_filters
- TheScopeFilters
of the group.next_gen_scope_id
- The next-gen scope ID of the group.
sourcepub async fn get(&self, group_id: TeamGroupId) -> Result<GetTeamGroupResponse>
pub async fn get(&self, group_id: TeamGroupId) -> Result<GetTeamGroupResponse>
Fetches the groups for an organization.
§Arguments
group_id
- TheTeamGroupId
of the group to fetch.
sourcepub async fn list(&self, team_id: TeamId) -> Result<GetTeamGroupsResponse>
pub async fn list(&self, team_id: TeamId) -> Result<GetTeamGroupsResponse>
sourcepub async fn add_users(
&self,
group_id: TeamGroupId,
user_ids: Vec<UserId>,
) -> Result<()>
pub async fn add_users( &self, group_id: TeamGroupId, user_ids: Vec<UserId>, ) -> Result<()>
Adds users to a group.
§Arguments
group_id
- TheTeamGroupId
of the group to add roles to.user_ids
- TheUserId
s of the users to add to the group.
sourcepub async fn update(
&self,
group_id: TeamGroupId,
name: String,
description: String,
external_id: Option<String>,
role_updates: Option<RoleUpdates>,
user_updates: Option<UserUpdates>,
scope_filters: Option<ScopeFilters>,
next_gen_scope_id: Option<String>,
) -> Result<UpdateTeamGroupResponse>
pub async fn update( &self, group_id: TeamGroupId, name: String, description: String, external_id: Option<String>, role_updates: Option<RoleUpdates>, user_updates: Option<UserUpdates>, scope_filters: Option<ScopeFilters>, next_gen_scope_id: Option<String>, ) -> Result<UpdateTeamGroupResponse>
Updates a group.
group_id
- TheTeamGroupId
of the group to update.name
- The name of the group.team_id
- TheTeamId
of the team the group belongs to.description
- The description of the group.external_id
- The external ID of the group.role_updates
- TheRoleUpdates
to apply to the group.user_updates
- TheUserUpdates
to apply to the group.scope_filters
- TheScopeFilters
of the group.next_gen_scope_id
- The next-gen scope ID of the group.
sourcepub async fn remove_users(
&self,
group_id: TeamGroupId,
user_ids: Vec<UserId>,
) -> Result<()>
pub async fn remove_users( &self, group_id: TeamGroupId, user_ids: Vec<UserId>, ) -> Result<()>
Removes users from a group.
§Arguments
group_id
- TheTeamGroupId
of the group to remove roles from.user_ids
- TheUserId
s of the users to remove from the group.
sourcepub async fn delete(&self, group_id: TeamGroupId) -> Result<()>
pub async fn delete(&self, group_id: TeamGroupId) -> Result<()>
Auto Trait Implementations§
impl !Freeze for GroupsClient
impl !RefUnwindSafe for GroupsClient
impl Send for GroupsClient
impl Sync for GroupsClient
impl Unpin for GroupsClient
impl !UnwindSafe for GroupsClient
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request