pub enum Principal {
Wildcard,
Mapped(HashMap<PrincipalType, Value>),
}
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>, …]
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html
Variants§
Wildcard
Wildcard principal (*)
Mapped(HashMap<PrincipalType, Value>)
Principal with service mapping (e.g., {“AWS”: “arn:aws:iam::123456789012:user/username”})
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
fn validate(&self, context: &mut ValidationContext) -> ValidationResult
Source§fn validate_result(&self) -> ValidationResult
fn validate_result(&self) -> ValidationResult
Validate with detailed errors (same as regular validation)
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