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- TheCoralogixRegionto 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>,
group_type: GroupType,
) -> 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>, group_type: GroupType, ) -> Result<CreateTeamGroupResponse>
Creates a new group.
§Arguments
name- The name of the group.team_id- TheTeamIdof the team the group belongs to.description- The description of the group.external_id- The external ID of the group.role_ids- TheRoleIds of the roles in the group.user_ids- TheUserIds of the users in the group.scope_filters- TheScopeFiltersof the group.next_gen_scope_id- The next-gen scope ID of the group.group_type- Type of group to create
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- TheTeamGroupIdof 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- TheTeamGroupIdof the group to add roles to.user_ids- TheUserIds 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>,
group_type: Option<GroupType>,
) -> 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>, group_type: Option<GroupType>, ) -> Result<UpdateTeamGroupResponse>
Updates a group.
group_id- TheTeamGroupIdof the group to update.name- The name of the group.team_id- TheTeamIdof the team the group belongs to.description- The description of the group.external_id- The external ID of the group.role_updates- TheRoleUpdatesto apply to the group.user_updates- TheUserUpdatesto apply to the group.scope_filters- TheScopeFiltersof the group.next_gen_scope_id- The next-gen scope ID of the group.group_type- Type of group to create
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- TheTeamGroupIdof the group to remove roles from.user_ids- TheUserIds 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 UnsafeUnpin 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