Skip to main content

AssumeRoleGrant

Struct AssumeRoleGrant 

Source
pub struct AssumeRoleGrant { /* private fields */ }
Expand description

A typed AWS STS AssumeRole authority transition.

The source credential authorizes this transition, but the returned credential derives its permissions from the target role and optional session policies. It is not necessarily a monotonic downscope of the source principal’s direct permissions.

Validation is performed before the STS request is signed or sent. AWS still owns trust-policy evaluation, the target role’s configured maximum session duration, the one-hour role-chaining limit, inherited transitive-tag conflicts, and packed-policy limits that cannot be determined from reqsign’s opaque source credential locally.

Implementations§

Source§

impl AssumeRoleGrant

Source

pub fn new( role_arn: impl Into<String>, role_session_name: impl Into<String>, ) -> Self

Create a grant for one target role and auditable role session name.

Source

pub fn with_external_id(self, external_id: impl Into<String>) -> Self

Set the external ID required by the target role’s trust policy.

Source

pub fn with_policy(self, policy: impl Into<String>) -> Self

Set one inline JSON session policy.

Session policies restrict the target role session. They cannot grant permissions beyond the target role’s identity-based policy.

Source

pub fn with_policy_arns(self, policy_arns: Vec<String>) -> Self

Set up to ten managed session policy ARNs.

Source

pub fn with_tags(self, tags: Vec<(String, String)>) -> Self

Set up to fifty session tags.

Source

pub fn with_mfa( self, serial_number: impl Into<String>, token_code: impl Into<String>, ) -> Self

Bind the MFA device serial number and current six-digit token code.

Trait Implementations§

Source§

impl Clone for AssumeRoleGrant

Source§

fn clone(&self) -> AssumeRoleGrant

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for AssumeRoleGrant

Source§

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

Formats the value using the given formatter. Read more

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> MaybeSend for T
where T: Send,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V