Enum PolicySource

Source
pub enum PolicySource {
    EntityInline {
        entity_arn: String,
        entity_id: String,
        policy_name: String,
    },
    EntityAttachedPolicy {
        policy_arn: String,
        policy_id: String,
        version: String,
    },
    GroupInline {
        group_arn: String,
        group_id: String,
        policy_name: String,
    },
    GroupAttachedPolicy {
        group_arn: String,
        group_id: String,
        policy_arn: String,
        policy_id: String,
        version: String,
    },
    Resource {
        resource_arn: String,
        policy_name: Option<String>,
    },
    PermissionBoundary {
        policy_arn: String,
        policy_id: String,
        version: String,
    },
    OrgServiceControl {
        policy_arn: String,
        policy_name: String,
        applied_arn: String,
    },
    Session,
}
Expand description

The source of a policy.

Variants§

§

EntityInline

An inline policy directly attached to an IAM entity (user, role).

Fields

§entity_arn: String

The ARN of the entity.

§entity_id: String

The IAM ID of the entity.

§policy_name: String

The name of the policy.

§

EntityAttachedPolicy

A managed policy that is attached to an IAM entity (user, role).

Fields

§policy_arn: String

The ARN of the of the policy.

§policy_id: String

The IAM ID of the policy.

§version: String

The version of the policy used.

§

GroupInline

An inline policy directly attached to an IAM group that an IAM user ia a member of.

Fields

§group_arn: String

The ARN of the IAM group.

§group_id: String

The IAM ID of the group.

§policy_name: String

The name of the policy.

§

GroupAttachedPolicy

A managed policy that is attached to an IAM group that an IAM user is a member of.

Fields

§group_arn: String

The ARN of the of IAM group.

§group_id: String

The IAM ID of the group.

§policy_arn: String

The ARN of the of the policy.

§policy_id: String

The IAM ID of the policy.

§version: String

The version of the policy used.

§

Resource

A policy attached to a resource being accessed.

Fields

§resource_arn: String

The ARN of the resource being accessed.

§policy_name: Option<String>

The name of the policy, if any.

§

PermissionBoundary

A permissions boundary attached to an IAM entity (user, role).

Fields

§policy_arn: String

The ARN of the the policy used as a permissions boundary.

§policy_id: String

The IAM ID of the policy used as a permissions boundary.

§version: String

The version of the policy used.

§

OrgServiceControl

An service control policy attached to an account or organizational unit.

Fields

§policy_arn: String

The ARN of the the policy used as a service control policy.

§policy_name: String

The name of the policy used as a service control policy.

§applied_arn: String

The ARN of the account or organizational unit that the policy is attached to.

§

Session

A policy embedded in an assumed role session.

Implementations§

Source§

impl PolicySource

Source

pub fn is_boundary(&self) -> bool

Indicates whether the policy is being used permissions boundary.

Permissions boundaries are used to limit the permissions in effect. Allow effects in a permissions boundary do not grant permissions, but must be combined with an allow effect in a non-permissions boundary policy to be effective. Absence of an allow effect in a permissions boundary is the same as a deny effect.

Source

pub fn new_entity_inline<S1, S2, S3>( entity_arn: S1, entity_id: S2, policy_name: S3, ) -> Self
where S1: Into<String>, S2: Into<String>, S3: Into<String>,

Create a new PolicySource::EntityInline object.

Source

pub fn new_entity_attached_policy<S1, S2, S3>( policy_arn: S1, policy_id: S2, version: S3, ) -> Self
where S1: Into<String>, S2: Into<String>, S3: Into<String>,

Source

pub fn new_group_inline<S1, S2, S3>( group_arn: S1, group_id: S2, policy_name: S3, ) -> Self
where S1: Into<String>, S2: Into<String>, S3: Into<String>,

Create a new PolicySource::GroupInline object.

Source

pub fn new_group_attached_policy<S1, S2, S3, S4, S5>( group_arn: S1, group_id: S2, policy_arn: S3, policy_id: S4, version: S5, ) -> Self
where S1: Into<String>, S2: Into<String>, S3: Into<String>, S4: Into<String>, S5: Into<String>,

Create a new PolicySource::GroupAttachedPolicy object.

Source

pub fn new_resource<S1, S2>(resource_arn: S1, policy_name: Option<S2>) -> Self
where S1: Into<String>, S2: Into<String>,

Create a new PolicySource::Resource object.

Source

pub fn new_permission_boundary<S1, S2, S3>( policy_arn: S1, policy_id: S2, version: S3, ) -> Self
where S1: Into<String>, S2: Into<String>, S3: Into<String>,

Create a new PolicySource::PermissionBoundary object.

Source

pub fn new_org_service_control<S1, S2, S3>( policy_arn: S1, policy_name: S2, applied_arn: S3, ) -> Self
where S1: Into<String>, S2: Into<String>, S3: Into<String>,

Create a new PolicySource::OrgServiceControl object.

Source

pub fn new_session() -> Self

Create a new PolicySource::Session object.

Trait Implementations§

Source§

impl Clone for PolicySource

Source§

fn clone(&self) -> PolicySource

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PolicySource

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for PolicySource

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for PolicySource

Source§

fn eq(&self, other: &PolicySource) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for PolicySource

Source§

impl StructuralPartialEq for PolicySource

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.