pub struct Client(/* private fields */);

Implementations§

source§

impl Client

source

pub fn list(&self, organization: impl Into<String>) -> RequestBuilder

Get a list of all users in a given scope.

Since the list of users may be large, results are returned in pages of users. If there are more results than can be returned in a single page, the result set will contain a continuation token for retrieval of the next set of results.

Arguments:

  • organization: The name of the Azure DevOps organization.
source

pub fn create( &self, organization: impl Into<String>, body: impl Into<GraphUserCreationContext> ) -> RequestBuilder

Materialize an existing AAD or MSA user into the ADO account.

NOTE: Created users are not active in an account unless they have been explicitly assigned a parent group at creation time or have signed in and been autolicensed through AAD group memberships.

Adding a user to an account is required before the user can be added to ADO groups or assigned an asset.

The body of the request must be a derived type of GraphUserCreationContext:

  • GraphUserMailAddressCreationContext - Create a new user using the mail address as a reference to an existing user from an external AD or AAD backed provider.
  • GraphUserOriginIdCreationContext - Create a new user using the OriginID as a reference to an existing user from an external AD or AAD backed provider.
  • GraphUserPrincipalNameCreationContext - Create a new user using the principal name as a reference to an existing user from an external AD or AAD backed provider.

If the user to be added corresponds to a user that was previously deleted, then that user will be restored.

Optionally, you can add the newly created user as a member of an existing ADO group and/or specify a custom storage key for the user.

Arguments:

  • organization: The name of the Azure DevOps organization.
  • body: The subset of the full graph user used to uniquely find the graph subject in an external provider.
source

pub fn get( &self, organization: impl Into<String>, user_descriptor: impl Into<String> ) -> RequestBuilder

Get a user by its descriptor.

Arguments:

  • organization: The name of the Azure DevOps organization.
  • user_descriptor: The descriptor of the desired user.
source

pub fn update( &self, organization: impl Into<String>, body: impl Into<GraphUserUpdateContext>, user_descriptor: impl Into<String> ) -> RequestBuilder

Map an existing user to a different user.

The body of the request must be a derived type of GraphUserUpdateContext:

  • GraphUserOriginIdUpdateContext - Map an existing user in an account, to an existing user from an external AD or AAD backed provider using the OriginId as a reference.

Arguments:

  • organization: The name of the Azure DevOps organization.
  • body: The subset of the full graph user used to uniquely find the graph subject in an external provider.
  • user_descriptor: The descriptor of the user to update
source

pub fn delete( &self, organization: impl Into<String>, user_descriptor: impl Into<String> ) -> RequestBuilder

Disables a user.

The user will still be visible, but membership checks for the user will return false.

Arguments:

  • organization: The name of the Azure DevOps organization.
  • user_descriptor: The descriptor of the user to delete.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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 Twhere 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