[−][src]Struct rusoto_sts::StsAssumeRoleSessionCredentialsProvider
AwsCredentials provider that calls
AssumeRole
using the provided StsClient.
To use with MFA, pass in the MFA serial number then set the MFA code.
You will need to ensure the provider has a valid code each time you
acquire a new STS token.
Methods
impl StsAssumeRoleSessionCredentialsProvider
[src]
pub fn new(
sts_client: StsClient,
role_arn: String,
session_name: String,
external_id: Option<String>,
session_duration: Option<Duration>,
scope_down_policy: Option<String>,
mfa_serial: Option<String>
) -> StsAssumeRoleSessionCredentialsProvider
[src]
sts_client: StsClient,
role_arn: String,
session_name: String,
external_id: Option<String>,
session_duration: Option<Duration>,
scope_down_policy: Option<String>,
mfa_serial: Option<String>
) -> StsAssumeRoleSessionCredentialsProvider
Creates a new StsAssumeRoleSessionCredentialsProvider
with the given
StsClient and session parameters.
sts_client
- StsClient to use to acquire session tokens.role_arn
- The ARN of the role to assume.session_name
- An identifier for the assumed role session. Minimum length of 2. Maximum length of 64. Pattern:[\w+=,.@-]*
external_id
-session_duration
- Duration of session tokens. Default 1 hour.scope_down_policy
- Optional inline IAM policy in JSON format to further restrict the access granted to the negotiated session.mfa_serial
- Optional MFA hardware device serial number or virtual device ARN. Useset_mfa_code
to set the MFA code.
pub fn set_mfa_code<S>(&mut self, code: S) where
S: Into<String>,
[src]
S: Into<String>,
Set the MFA code for use when acquiring session tokens.
pub fn clear_mfa_code(&mut self)
[src]
Clear the MFA code.
pub fn assume_role(&self) -> StsAssumeRoleSessionCredentialsProviderFuture
[src]
Calls AssumeRole
to get a session token from the STS Api.
Optionally uses MFA if the MFA serial number and code are set.
Trait Implementations
impl ProvideAwsCredentials for StsAssumeRoleSessionCredentialsProvider
[src]
type Future = StsAssumeRoleSessionCredentialsProviderFuture
The future response value.
fn credentials(&self) -> Self::Future
[src]
Auto Trait Implementations
impl Send for StsAssumeRoleSessionCredentialsProvider
impl Sync for StsAssumeRoleSessionCredentialsProvider
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
impl<T> Erased for T
impl<T> Same for T
type Output = T
Should always be Self