StsAssumeRoleCredentialsProvider

class StsAssumeRoleCredentialsProvider(val bootstrapCredentialsProvider: CredentialsProvider, val assumeRoleParameters: AssumeRoleParameters, val region: String? = null, val httpClient: HttpClientEngine? = null) : CredentialsProvider

A CredentialsProvider that uses another provider to assume a role from 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.

Parameters

bootstrapCredentialsProvider

The underlying provider to use for source credentials

assumeRoleParameters

The parameters to pass to the AssumeRole call

region

The AWS region to assume the role in. If not set then the global STS endpoint will be used.

httpClient

the HttpClientEngine instance to use to make requests. NOTE: This engine's resources and lifetime are NOT managed by the provider. Caller is responsible for closing.

Constructors

Link copied to clipboard
constructor(bootstrapCredentialsProvider: CredentialsProvider, roleArn: String, region: String? = null, roleSessionName: String? = null, externalId: String? = null, duration: Duration = DEFAULT_CREDENTIALS_REFRESH_SECONDS.seconds, httpClient: HttpClientEngine? = null)

A CredentialsProvider that uses another provider to assume a role from the AWS Security Token Service (STS).

constructor(bootstrapCredentialsProvider: CredentialsProvider, assumeRoleParameters: AssumeRoleParameters, region: String? = null, httpClient: HttpClientEngine? = null)

Properties

Link copied to clipboard
Link copied to clipboard
val region: String? = null

Functions

Link copied to clipboard
open suspend override fun resolve(attributes: Attributes): Credentials