pub struct AssumeRoleProviderBuilder { /* private fields */ }
Expand description

A builder for AssumeRoleProvider.

Construct one through AssumeRoleProvider::builder.

Implementations

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

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.

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.

Set the expiration time of the role session.

When unset, this value defaults to 1 hour.

The value specified can range from 900 seconds (15 minutes) up to the maximum session duration set for the role. The maximum session duration setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting or the administrator setting (whichever is lower), you will be unable to assume the role. For example, if you specify a session duration of 12 hours, but your administrator set the maximum session duration to 6 hours, you cannot assume the role.

For more information, see duration_seconds

Set the region to assume the role in.

This dictates which STS endpoint the AssumeRole action is invoked on.

If the rustls or nativetls features are enabled, this field is optional and a default backing connection will be provided.

Override the configuration used for this provider

This enables overriding the connection used to communicate with STS in addition to other internal fields like the time source and sleep implementation used for caching.

Build a credentials provider for this role authorized by the given provider.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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