cx_sdk::client::groups

Struct GroupsClient

source
pub struct GroupsClient { /* private fields */ }
Expand description

GroupsClient is a client for the groups service.

Implementations§

source§

impl GroupsClient

source

pub fn new(auth_context: AuthContext, region: CoralogixRegion) -> Result<Self>

Creates a new GroupsClient.

§Arguments
  • api_key' - The [AuthContext`] to use for authentication.
  • region - The CoralogixRegion to connect to.
source

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 - The TeamId of the team the group belongs to.
  • description - The description of the group.
  • external_id - The external ID of the group.
  • role_ids - The RoleIds of the roles in the group.
  • user_ids - The UserIds of the users in the group.
  • scope_filters - The ScopeFilters of the group.
  • next_gen_scope_id - The next-gen scope ID of the group.
source

pub async fn get(&self, group_id: TeamGroupId) -> Result<GetTeamGroupResponse>

Fetches the groups for an organization.

§Arguments
source

pub async fn list(&self, team_id: TeamId) -> Result<GetTeamGroupsResponse>

Fetches all groups for a team.

§Arguments
  • team_id - The TeamId of the team to fetch groups for.
source

pub async fn add_users( &self, group_id: TeamGroupId, user_ids: Vec<UserId>, ) -> Result<()>

Adds users to a group.

§Arguments
  • group_id - The TeamGroupId of the group to add roles to.
  • user_ids - The UserIds of the users to add to the group.
source

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 - The TeamGroupId of the group to update.
  • name - The name of the group.
  • team_id - The TeamId of the team the group belongs to.
  • description - The description of the group.
  • external_id - The external ID of the group.
  • role_updates - The RoleUpdates to apply to the group.
  • user_updates - The UserUpdates to apply to the group.
  • scope_filters - The ScopeFilters of the group.
  • next_gen_scope_id - The next-gen scope ID of the group.
source

pub async fn remove_users( &self, group_id: TeamGroupId, user_ids: Vec<UserId>, ) -> Result<()>

Removes users from a group.

§Arguments
  • group_id - The TeamGroupId of the group to remove roles from.
  • user_ids - The UserIds of the users to remove from the group.
source

pub async fn delete(&self, group_id: TeamGroupId) -> Result<()>

Deletes a group.

§Arguments

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T