Struct aws_config::sts::AssumeRoleProvider [−][src]
pub struct AssumeRoleProvider { /* fields omitted */ }
Expand description
Credentials provider that uses credentials provided by another provider to assume a role through the AWS Security Token Service (STS).
When asked to provide credentials, this provider will first invoke the inner credentials provider to get AWS credentials for STS. Then, it will call STS to get assumed credentials for the desired role.
Examples
use aws_config::sts::{AssumeRoleProvider};
use aws_types::{Credentials, region::Region};
use aws_config::environment;
use aws_config::environment::credentials::EnvironmentVariableCredentialsProvider;
use std::sync::Arc;
let provider = AssumeRoleProvider::builder("arn:aws:iam::123456789012:role/demo")
.region(Region::from_static("us-east-2"))
.session_name("testAR")
.build(Arc::new(EnvironmentVariableCredentialsProvider::new()) as Arc<_>);
Implementations
Build a new role-assuming provider for the given role.
The role
argument should take the form an Amazon Resource Name (ARN) like
arn:aws:iam::123456789012:role/example
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for AssumeRoleProvider
impl Send for AssumeRoleProvider
impl Sync for AssumeRoleProvider
impl Unpin for AssumeRoleProvider
impl !UnwindSafe for AssumeRoleProvider
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more