Struct scratchstack_aws_principal::RootUser
source · pub struct RootUser { /* private fields */ }
Expand description
Details about an AWS account root user.
RootUser structs are immutable.
Implementations§
source§impl RootUser
impl RootUser
sourcepub fn new(partition: &str, account_id: &str) -> Result<Self, PrincipalError>
pub fn new(partition: &str, account_id: &str) -> Result<Self, PrincipalError>
Create a RootUser object, refering to an actor with root credentials for the specified AWS account.
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.
Return value
If the requirement is met, a RootUser object is returned. Otherwise, a PrincipalError error is returned.
sourcepub fn account_id(&self) -> &str
pub fn account_id(&self) -> &str
The account id of the user.
Trait Implementations§
source§impl From<RootUser> for PrincipalIdentity
impl From<RootUser> for PrincipalIdentity
Wrap a RootUser in a PrincipalIdentity.
source§impl Ord for RootUser
impl Ord for RootUser
source§impl PartialEq<RootUser> for RootUser
impl PartialEq<RootUser> for RootUser
source§impl PartialOrd<RootUser> for RootUser
impl PartialOrd<RootUser> for RootUser
1.0.0 · source§fn 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 more