pub enum Principal {
Principal(HashMap<PrincipalType, OneOrAny>),
NotPrincipal(HashMap<PrincipalType, OneOrAny>),
}
Expand description
Use the Principal element to specify the IAM user, federated user, IAM role, AWS account, AWS service, or other principal entity that is allowed or denied access to a resource. You cannot use the Principal element in an IAM identity-based policy. You can use it in the trust policies for IAM roles and in resource-based policies. Resource-based policies are policies that you embed directly in an IAM resource.
From AWS JSON Policy Elements: Principal and AWS JSON Policy Elements: NotPrincipal.
Variants§
Principal(HashMap<PrincipalType, OneOrAny>)
Asserts that the principal in the request must match one of the specified ones.
NotPrincipal(HashMap<PrincipalType, OneOrAny>)
Asserts that the principal in the request must not match one of the specified ones.
Implementations§
Source§impl Principal
impl Principal
Sourcepub fn any(p_type: PrincipalType) -> Self
pub fn any(p_type: PrincipalType) -> Self
Construct a wildcard Principal.
Sourcepub fn this(p_type: PrincipalType, one: String) -> Self
pub fn this(p_type: PrincipalType, one: String) -> Self
Construct a Principal with one value.
Sourcepub fn these(p_type: PrincipalType, any_of: &mut Vec<String>) -> Self
pub fn these(p_type: PrincipalType, any_of: &mut Vec<String>) -> Self
Construct a Principal with a list of values.
Sourcepub fn none(p_type: PrincipalType) -> Self
pub fn none(p_type: PrincipalType) -> Self
Construct a negative wildcard Principal.
Sourcepub fn not_this(p_type: PrincipalType, one: String) -> Self
pub fn not_this(p_type: PrincipalType, one: String) -> Self
Construct a Principal with one negative value.
Sourcepub fn not_these(p_type: PrincipalType, any_of: &mut Vec<String>) -> Self
pub fn not_these(p_type: PrincipalType, any_of: &mut Vec<String>) -> Self
Construct a Principal with a list of negative values.