pub struct PimClient { /* private fields */ }
Implementations§
Source§impl PimClient
impl PimClient
pub fn new() -> Result<Self>
pub fn clear_cache(&self)
pub fn current_user(&self) -> Result<String>
Sourcepub fn list_eligible_role_assignments(
&self,
scope: Option<Scope>,
filter: Option<ListFilter>,
) -> Result<BTreeSet<RoleAssignment>>
pub fn list_eligible_role_assignments( &self, scope: Option<Scope>, filter: Option<ListFilter>, ) -> Result<BTreeSet<RoleAssignment>>
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_role_assignments(
&self,
scope: Option<Scope>,
filter: Option<ListFilter>,
) -> Result<BTreeSet<RoleAssignment>>
pub fn list_active_role_assignments( &self, scope: Option<Scope>, filter: Option<ListFilter>, ) -> Result<BTreeSet<RoleAssignment>>
List the roles active role assignments for the current user
§Errors
Will return Err
if the request fails or the response is not valid JSON
Sourcepub fn extend_role_assignment(
&self,
assignment: &RoleAssignment,
justification: &str,
duration: Duration,
) -> Result<()>
pub fn extend_role_assignment( &self, assignment: &RoleAssignment, justification: &str, duration: Duration, ) -> Result<()>
Request extending the specified role eligibility
§Errors
Will return Err
if the request fails or the response is not valid JSON
Sourcepub fn activate_role_assignment(
&self,
assignment: &RoleAssignment,
justification: &str,
duration: Duration,
) -> Result<()>
pub fn activate_role_assignment( &self, assignment: &RoleAssignment, justification: &str, duration: Duration, ) -> Result<()>
Activates the specified role
§Errors
Will return Err
if the request fails or the response is not valid JSON
pub fn activate_role_assignment_set( &self, assignments: &BTreeSet<RoleAssignment>, justification: &str, duration: Duration, concurrency: usize, ) -> Result<()>
Sourcepub fn deactivate_role_assignment(
&self,
assignment: &RoleAssignment,
) -> Result<()>
pub fn deactivate_role_assignment( &self, assignment: &RoleAssignment, ) -> Result<()>
Deactivate the specified role
§Errors
Will return Err
if the request fails or the response is not valid JSON
pub fn deactivate_role_assignment_set( &self, assignments: &BTreeSet<RoleAssignment>, concurrency: usize, ) -> Result<()>
pub fn wait_for_role_activation( &self, assignments: &BTreeSet<RoleAssignment>, wait_timeout: Duration, ) -> Result<()>
Sourcepub fn role_assignments(&self, scope: &Scope) -> Result<Vec<Assignment>>
pub fn role_assignments(&self, scope: &Scope) -> Result<Vec<Assignment>>
List role assignments
§Errors
Will return Err
if the request fails or the response is not valid JSON
Sourcepub fn eligible_child_resources(
&self,
scope: &Scope,
nested: bool,
) -> Result<BTreeSet<ChildResource>>
pub fn eligible_child_resources( &self, scope: &Scope, nested: bool, ) -> Result<BTreeSet<ChildResource>>
List eligible child resources for the specified scope
§Errors
Will return Err
if the request fails or the response is not valid JSON
Sourcepub fn role_definitions(&self, scope: &Scope) -> Result<Vec<Definition>>
pub fn role_definitions(&self, scope: &Scope) -> Result<Vec<Definition>>
List role definitions available at the target scope
Note, this will cache the results for 10 minutes.
§Errors
Will return Err
if the request fails or the response is not valid JSON
Sourcepub fn delete_role_assignment(
&self,
scope: &Scope,
assignment_name: &str,
) -> Result<()>
pub fn delete_role_assignment( &self, scope: &Scope, assignment_name: &str, ) -> Result<()>
Delete a role assignment
§Errors
Will return Err
if the request fails or the response is not valid JSON
Sourcepub fn delete_eligible_role_assignment(
&self,
assignment: &RoleAssignment,
) -> Result<()>
pub fn delete_eligible_role_assignment( &self, assignment: &RoleAssignment, ) -> Result<()>
Delete eligibile role assignment
This removes role assignments that are available via PIM.
§Errors
Will return Err
if the request fails or the response is not valid JSON
pub fn delete_orphaned_role_assignments( &self, scope: &Scope, answer_yes: bool, nested: bool, ) -> Result<()>
pub fn delete_orphaned_eligible_role_assignments( &self, scope: &Scope, answer_yes: bool, nested: bool, ) -> Result<()>
pub fn activate_role_admin( &self, scope: &Scope, justification: &str, duration: Duration, ) -> Result<()>
pub fn group_members(&self, id: &str, nested: bool) -> Result<BTreeSet<Object>>
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
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>
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>
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