Interface StsCredentialsProvider.Builder
- Enclosing class:
- StsCredentialsProvider
public static interface StsCredentialsProvider.Builder
A builder for creating a sts credentials provider.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a sts credentials provider using the configuration applied to this builder.withClientBootstrap
(ClientBootstrap clientBootstrap) Sets the client bootstrap (host resolver and event loop group) to use when making the connections required by this provider.withCredsProvider
(CredentialsProvider credsProvider) Sets the underlying Credentials Provider to use for source credentialswithDurationSeconds
(int durationSeconds) withRoleArn
(String roleArn) withSessionName
(String sessionName) withTlsContext
(TlsContext tlsContext) Sets the tls context to use for any secure network connections made while sourcing credentials.
-
Method Details
-
withClientBootstrap
Sets the client bootstrap (host resolver and event loop group) to use when making the connections required by this provider. The default is a bootstrap which uses the static default event loop group and host resolver.- Parameters:
clientBootstrap
- client bootstrap to use- Returns:
- The current builder
-
withTlsContext
Sets the tls context to use for any secure network connections made while sourcing credentials.- Parameters:
tlsContext
- the tls context to use when establishing network connections- Returns:
- The current builder
-
withCredsProvider
Sets the underlying Credentials Provider to use for source credentials- Parameters:
credsProvider
- the CredentialsProvider for source credentials- Returns:
- The current builder
-
withRoleArn
- Parameters:
roleArn
- the target role's ARN- Returns:
- The current builder
-
withSessionName
- Parameters:
sessionName
- the name to associate with the session.- Returns:
- The current builder
-
withDurationSeconds
- Parameters:
durationSeconds
- number of seconds from authentication that the session is valid for.- Returns:
- the current builder
-
build
StsCredentialsProvider build()Create a sts credentials provider using the configuration applied to this builder.- Returns:
- A new sts credentials provider.
-