Class ProcessCredentialsProvider.Builder
- java.lang.Object
-
- software.amazon.awssdk.auth.credentials.ProcessCredentialsProvider.Builder
-
- All Implemented Interfaces:
Buildable
,CopyableBuilder<ProcessCredentialsProvider.Builder,ProcessCredentialsProvider>
,SdkBuilder<ProcessCredentialsProvider.Builder,ProcessCredentialsProvider>
- Enclosing class:
- ProcessCredentialsProvider
public static class ProcessCredentialsProvider.Builder extends Object implements CopyableBuilder<ProcessCredentialsProvider.Builder,ProcessCredentialsProvider>
Used to configure and create aProcessCredentialsProvider
. SeeProcessCredentialsProvider.builder()
creation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ProcessCredentialsProvider.Builder
asyncCredentialUpdateEnabled(Boolean asyncCredentialUpdateEnabled)
Configure whether the provider should fetch credentials asynchronously in the background.ProcessCredentialsProvider
build()
ProcessCredentialsProvider.Builder
command(String command)
Deprecated.The recommended approach is to specify the command as a list of Strings, usingcommand(List)
instead, which makes it easier to programmatically add parameters to commands without needing to escape those parameters to protect against command injection.ProcessCredentialsProvider.Builder
command(List<String> commandAsListOfStrings)
Configure the command that should be executed to retrieve credentials, as a list of strings.ProcessCredentialsProvider.Builder
credentialRefreshThreshold(Duration credentialRefreshThreshold)
Configure the amount of time between when the credentials expire and when the credentials should start to be refreshed.ProcessCredentialsProvider.Builder
processOutputLimit(long outputByteLimit)
Configure the maximum amount of data that can be returned by the external process before an exception is raised.ProcessCredentialsProvider.Builder
staticAccountId(String staticAccountId)
Configure a static account id for this credentials provider.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
-
-
-
Method Detail
-
asyncCredentialUpdateEnabled
public ProcessCredentialsProvider.Builder asyncCredentialUpdateEnabled(Boolean asyncCredentialUpdateEnabled)
Configure whether the provider should fetch credentials asynchronously in the background. If this is true, threads are less likely to block when credentials are loaded, but additional resources are used to maintain the provider.By default, this is disabled.
-
command
@Deprecated public ProcessCredentialsProvider.Builder command(String command)
Deprecated.The recommended approach is to specify the command as a list of Strings, usingcommand(List)
instead, which makes it easier to programmatically add parameters to commands without needing to escape those parameters to protect against command injection.Configure the command that should be executed to retrieve credentials. SeeProcessBuilder
for details on how this command is used.
-
command
public ProcessCredentialsProvider.Builder command(List<String> commandAsListOfStrings)
Configure the command that should be executed to retrieve credentials, as a list of strings. SeeProcessBuilder
for details on how this command is used.
-
credentialRefreshThreshold
public ProcessCredentialsProvider.Builder credentialRefreshThreshold(Duration credentialRefreshThreshold)
Configure the amount of time between when the credentials expire and when the credentials should start to be refreshed. This allows the credentials to be refreshed *before* they are reported to expire.Default: 15 seconds.
-
processOutputLimit
public ProcessCredentialsProvider.Builder processOutputLimit(long outputByteLimit)
Configure the maximum amount of data that can be returned by the external process before an exception is raised.Default: 64000 bytes (64KB).
-
staticAccountId
public ProcessCredentialsProvider.Builder staticAccountId(String staticAccountId)
Configure a static account id for this credentials provider. Account id for ProcessCredentialsProvider is only relevant in a context where a service constructs endpoint URL containing an account id. This option should ONLY be used if the provider should return credentials with account id, and the process does not output account id. If a static account ID is configured, and the process also returns an account id, the process output value overrides the static value. If used, the static account id MUST match the credentials returned by the process.
-
build
public ProcessCredentialsProvider build()
- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceSdkBuilder<ProcessCredentialsProvider.Builder,ProcessCredentialsProvider>
-
-