[−][src]Struct rusoto_sts::StsSessionCredentialsProvider
AwsCredentials provider that calls
GetSessionToken
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 StsSessionCredentialsProvider
[src]
pub fn new(
sts_client: StsClient,
duration: Option<Duration>,
mfa_serial: Option<String>
) -> StsSessionCredentialsProvider
[src]
sts_client: StsClient,
duration: Option<Duration>,
mfa_serial: Option<String>
) -> StsSessionCredentialsProvider
Creates a new StsSessionCredentialsProvider
with the given
StsClient and session parameters.
sts_client
- The StsClient to use to acquire session tokens.duration
- The duration of the session tokens. Default 1 hour.mfa_serial
- Optional MFA hardware device serial number or virtual device ARN. Set the MFA code withset_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 get_session_token(&self) -> StsSessionCredentialsProviderFuture
[src]
Calls GetSessionToken
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 StsSessionCredentialsProvider
[src]
type Future = StsSessionCredentialsProviderFuture
The future response value.
fn credentials(&self) -> Self::Future
[src]
Auto Trait Implementations
impl Send for StsSessionCredentialsProvider
impl Sync for StsSessionCredentialsProvider
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> Same<T> for T
type Output = T
Should always be Self