Interface ProfileCredentialsProvider.Builder
- Enclosing class:
- ProfileCredentialsProvider
public static interface ProfileCredentialsProvider.Builder
A builder for creating a custom profile credentials provider.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a profile 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.withConfigFileNameOverride(String configFileNameOverride) Sets the name of the config file to use.withCredentialsFileNameOverride(String credentialsFileNameOverride) Sets the name of the credentials file to use.withProfileName(String profileName) Sets the name of the profile to use.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
-
withProfileName
Sets the name of the profile to use. If none is specified, the profile named "default" is used.- Parameters:
profileName- the profile name to use- Returns:
- The current builder
-
withConfigFileNameOverride
Sets the name of the config file to use. If none is specified, a name of "~/.aws/config" (Linux and Mac) or "%USERPROFILE%\.aws\config" (Windows) is used.- Parameters:
configFileNameOverride- the config file name to use- Returns:
- The current builder
-
withCredentialsFileNameOverride
ProfileCredentialsProvider.Builder withCredentialsFileNameOverride(String credentialsFileNameOverride) Sets the name of the credentials file to use. If none is specified, a name of "~/.aws/credentials" (Linux and Mac) or "%USERPROFILE%\.aws\credentials" (Windows) is used.- Parameters:
credentialsFileNameOverride- the credentials file name to use- Returns:
- The current builder
-
build
ProfileCredentialsProvider build()Create a profile credentials provider using the configuration applied to this builder.- Returns:
- A new profile credentials provider.
-