pub async fn get_session_token(
        &self,
    ) -> Result<GetSessionTokenResponse, RusotoError<GetSessionTokenError>> {
        let request = GetSessionTokenRequest {
            serial_number: self.mfa_serial.clone(),
            token_code: self.mfa_code.clone(),
            duration_seconds: Some(self.session_duration.num_seconds() as i64),
            ..Default::default()
        };
        self.sts_client.get_session_token(request).await
    }
Calls `GetSessionToken` to get a session token from the STS Api.
Optionally uses MFA if the MFA serial number and code are set.
rusoto/services/sts/src/custom/credential.rs