Struct scratchstack_aws_principal::AssumedRole
source · [−]pub struct AssumedRole { /* private fields */ }
Expand description
Details about an assumed role actor.
Implementations
sourceimpl AssumedRole
impl AssumedRole
sourcepub fn new(
partition: &str,
account_id: &str,
role_name: &str,
session_name: &str
) -> Result<Self, PrincipalError>
pub fn new(
partition: &str,
account_id: &str,
role_name: &str,
session_name: &str
) -> Result<Self, PrincipalError>
Create an AssumedRole object.
Arguments:
partition
: The partition this principal exists in.account_id
: The 12 digit account id. This must be composed of 12 ASCII digits or a PrincipalError::InvalidAccountId error will be returned.role_name
: The name of the role being assumed. This must meet the following requirements or a PrincipalError::InvalidRoleName error will be returned:- The name must contain between 1 and 64 characters.
- The name must be composed to ASCII alphanumeric characters or one of
, - . = @ _
.
session_name
: A name to assign to the session. This must meet the following requirements or a PrincipalError::InvalidSessionName error will be returned:- The session name must contain between 2 and 64 characters.
- The session name must be composed to ASCII alphanumeric characters or one of
, - . = @ _
.
Return value
If all of the requirements are met, an AssumedRole object is returned. Otherwise, a PrincipalError error is returned.
pub fn partition(&self) -> &str
pub fn account_id(&self) -> &str
pub fn role_name(&self) -> &str
pub fn session_name(&self) -> &str
Trait Implementations
sourceimpl Clone for AssumedRole
impl Clone for AssumedRole
sourcefn clone(&self) -> AssumedRole
fn clone(&self) -> AssumedRole
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AssumedRole
impl Debug for AssumedRole
sourceimpl Display for AssumedRole
impl Display for AssumedRole
sourceimpl From<&AssumedRole> for Arn
impl From<&AssumedRole> for Arn
sourcefn from(role: &AssumedRole) -> Arn
fn from(role: &AssumedRole) -> Arn
Converts to this type from the input type.
sourceimpl From<AssumedRole> for PrincipalIdentity
impl From<AssumedRole> for PrincipalIdentity
sourcefn from(assumed_role: AssumedRole) -> Self
fn from(assumed_role: AssumedRole) -> Self
Wrap an AssumedRole in a Principal.
sourceimpl Hash for AssumedRole
impl Hash for AssumedRole
sourceimpl Ord for AssumedRole
impl Ord for AssumedRole
sourcefn cmp(&self, other: &AssumedRole) -> Ordering
fn cmp(&self, other: &AssumedRole) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<AssumedRole> for AssumedRole
impl PartialEq<AssumedRole> for AssumedRole
sourcefn eq(&self, other: &AssumedRole) -> bool
fn eq(&self, other: &AssumedRole) -> bool
sourceimpl PartialOrd<AssumedRole> for AssumedRole
impl PartialOrd<AssumedRole> for AssumedRole
sourcefn partial_cmp(&self, other: &AssumedRole) -> Option<Ordering>
fn partial_cmp(&self, other: &AssumedRole) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for AssumedRole
impl StructuralEq for AssumedRole
impl StructuralPartialEq for AssumedRole
Auto Trait Implementations
impl RefUnwindSafe for AssumedRole
impl Send for AssumedRole
impl Sync for AssumedRole
impl Unpin for AssumedRole
impl UnwindSafe for AssumedRole
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more