pub struct PimClient { /* private fields */ }Implementations§
Source§impl PimClient
impl PimClient
pub fn new() -> Result<Self>
pub async fn clear_cache(&self)
pub async fn current_user(&self) -> Result<String>
Sourcepub async fn list_eligible_role_assignments(
&self,
scope: Option<Scope>,
filter: Option<ListFilter>,
) -> Result<BTreeSet<RoleAssignment>>
pub async 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 async fn list_active_role_assignments(
&self,
scope: Option<Scope>,
filter: Option<ListFilter>,
) -> Result<BTreeSet<RoleAssignment>>
pub async 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 async fn extend_role_assignment(
&self,
assignment: &RoleAssignment,
justification: &str,
duration: Duration,
) -> Result<()>
pub async 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 async fn activate_role_assignment(
&self,
assignment: &RoleAssignment,
justification: &str,
duration: Duration,
) -> Result<()>
pub async 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 async fn activate_role_assignment_set( &self, assignments: &BTreeSet<RoleAssignment>, justification: &str, duration: Duration, ) -> Result<()>
Sourcepub async fn deactivate_role_assignment(
&self,
assignment: &RoleAssignment,
) -> Result<()>
pub async 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 async fn deactivate_role_assignment_set( &self, assignments: &BTreeSet<RoleAssignment>, ) -> Result<()>
pub async fn wait_for_role_activation( &self, assignments: &BTreeSet<RoleAssignment>, wait_timeout: Duration, ) -> Result<()>
Sourcepub async fn role_assignments(&self, scope: &Scope) -> Result<Vec<Assignment>>
pub async 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 async fn eligible_child_resources(
&self,
scope: &Scope,
nested: bool,
) -> Result<BTreeSet<ChildResource>>
pub async 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 async fn role_definitions(&self, scope: &Scope) -> Result<Vec<Definition>>
pub async 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 async fn delete_role_assignment(
&self,
scope: &Scope,
assignment_name: &str,
) -> Result<()>
pub async 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 async fn delete_eligible_role_assignment(
&self,
assignment: &RoleAssignment,
) -> Result<()>
pub async 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 async fn delete_orphaned_role_assignments( &self, scope: &Scope, answer_yes: bool, nested: bool, ) -> Result<()>
pub async fn delete_orphaned_eligible_role_assignments( &self, scope: &Scope, answer_yes: bool, nested: bool, ) -> Result<()>
pub async fn activate_role_admin( &self, scope: &Scope, justification: &str, duration: Duration, ) -> Result<()>
pub async 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