Struct azure_pim_cli::PimClient
source · pub struct PimClient { /* private fields */ }Implementations§
source§impl PimClient
impl PimClient
pub fn new() -> Result<Self>
sourcepub fn list_eligible_assignments(&self) -> Result<Assignments>
pub fn list_eligible_assignments(&self) -> Result<Assignments>
List the roles available to the current user
§Errors
Will return Err if the request fails or the response is not valid JSON
sourcepub fn list_active_assignments(&self) -> Result<Assignments>
pub fn list_active_assignments(&self) -> Result<Assignments>
List the roles active role assignments for the current user
sourcepub fn activate_assignment(
&self,
assignment: &Assignment,
justification: &str,
duration: u32,
) -> Result<Option<Uuid>>
pub fn activate_assignment( &self, assignment: &Assignment, justification: &str, duration: u32, ) -> Result<Option<Uuid>>
Activates the specified role
§Errors
Will return Err if the request fails or the response is not valid JSON
pub fn activate_assignment_set( &self, assignments: &Assignments, justification: &str, duration: u32, concurrency: usize, ) -> Result<Assignments>
Auto Trait Implementations§
impl Freeze for PimClient
impl !RefUnwindSafe for PimClient
impl Send for PimClient
impl Sync for PimClient
impl Unpin for PimClient
impl !UnwindSafe for PimClient
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more