pub enum Principal {
Aws(PrincipalId),
Federated(PrincipalId),
Service(PrincipalId),
CanonicalUser(PrincipalId),
Wildcard,
}
Expand description
Represents a principal in an IAM policy
<principal_block>
= (“Principal” | “NotPrincipal
”) : (“*” | <principal_map>
)
<principal_map>
= { <principal_map_entry>
, <principal_map_entry>
, … }
<principal_map_entry>
= (“AWS” | “Federated” | “Service” | “CanonicalUser
”) :
[<principal_id_string>
, <principal_id_string>
, …]
(e.g., {“AWS”: “arn:aws:iam::123456789012:user/username
”})
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html
Variants§
Aws(PrincipalId)
AWS principals (users, roles, root accounts)
Federated(PrincipalId)
Federated principals (SAML, OIDC providers)
Service(PrincipalId)
AWS service principals
CanonicalUser(PrincipalId)
Canonical user principals
Wildcard
Wildcard principal (matches all principals)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Principal
impl<'de> Deserialize<'de> for Principal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Validate for Principal
impl Validate for Principal
Source§fn validate(&self, context: &mut ValidationContext) -> ValidationResult
fn validate(&self, context: &mut ValidationContext) -> ValidationResult
Validate the component within the given context Read more
Source§fn validate_result(&self) -> ValidationResult
fn validate_result(&self) -> ValidationResult
Validate with detailed errors (same as regular validation) Read more
impl Eq for Principal
impl StructuralPartialEq for Principal
Auto Trait Implementations§
impl Freeze for Principal
impl RefUnwindSafe for Principal
impl Send for Principal
impl Sync for Principal
impl Unpin for Principal
impl UnwindSafe for Principal
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