Struct aws_config::sts::AssumeRoleProviderBuilder
source · [−]pub struct AssumeRoleProviderBuilder { /* private fields */ }
Expand description
A builder for AssumeRoleProvider
.
Construct one through AssumeRoleProvider::builder
.
Implementations
sourceimpl AssumeRoleProviderBuilder
impl AssumeRoleProviderBuilder
sourcepub fn new(role: impl Into<String>) -> Self
pub fn new(role: impl Into<String>) -> Self
Start a new assume role builder for the given role.
The role
argument should take the form an Amazon Resource Name (ARN) like
arn:aws:iam::123456789012:role/example
sourcepub fn external_id(self, id: impl Into<String>) -> Self
pub fn external_id(self, id: impl Into<String>) -> Self
Set a unique identifier that might be required when you assume a role in another account.
If the administrator of the account to which the role belongs provided you with an external ID, then provide that value in this parameter. The value can be any string, such as a passphrase or account number.
sourcepub fn session_name(self, name: impl Into<String>) -> Self
pub fn session_name(self, name: impl Into<String>) -> Self
Set an identifier for the assumed role session.
Use the role session name to uniquely identify a session when the same role is assumed by different principals or for different reasons. In cross-account scenarios, the role session name is visible to, and can be logged by the account that owns the role. The role session name is also used in the ARN of the assumed role principal.
sourcepub fn region(self, region: Region) -> Self
pub fn region(self, region: Region) -> Self
Set the region to assume the role in.
This dictates which STS endpoint the AssumeRole action is invoked on.
sourcepub fn connection(self, conn: impl SmithyConnector) -> Self
pub fn connection(self, conn: impl SmithyConnector) -> Self
Set the backing connection to use when talking to STS.
If the rustls
or nativetls
features are enabled, this field is optional and a default
backing connection will be provided.
sourcepub fn build(
self,
provider: impl Into<SharedCredentialsProvider>
) -> AssumeRoleProvider
pub fn build(
self,
provider: impl Into<SharedCredentialsProvider>
) -> AssumeRoleProvider
Build a credentials provider for this role authorized by the given provider
.
Auto Trait Implementations
impl !RefUnwindSafe for AssumeRoleProviderBuilder
impl Send for AssumeRoleProviderBuilder
impl Sync for AssumeRoleProviderBuilder
impl Unpin for AssumeRoleProviderBuilder
impl !UnwindSafe for AssumeRoleProviderBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more