@ComponentProfile(summary="Credentials provider that can load credentials from an external process", since="3.9.2") public class ProcessCredentialsBuilder extends java.lang.Object implements AWSCredentialsProviderBuilder
See https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#sourcing-credentials-from-external-processes for more information
In the adapter configuration file this class is aliased as aws-process-credentials-builder which is the preferred alternative to the fully qualified classname when building your configuration.
AWSCredentialsProviderBuilder.BuilderConfig
Constructor and Description |
---|
ProcessCredentialsBuilder() |
Modifier and Type | Method and Description |
---|---|
com.amazonaws.auth.AWSCredentialsProvider |
build() |
@NonNull java.lang.String |
getCommand()
The command that should be executed to retrieve credentials including arguments
|
java.lang.Integer |
getExpirationBufferSeconds()
The number of seconds between when the credentials expire and when the credentials should start
to be refreshed.
|
java.lang.Long |
getProcessOutputLimitBytes()
The maximum amount of data that can be returned by the external process before an exception is
raised.
|
void |
setCommand(@NonNull java.lang.String command)
The command that should be executed to retrieve credentials including arguments
|
void |
setExpirationBufferSeconds(java.lang.Integer expirationBufferSeconds)
The number of seconds between when the credentials expire and when the credentials should start
to be refreshed.
|
void |
setProcessOutputLimitBytes(java.lang.Long processOutputLimitBytes)
The maximum amount of data that can be returned by the external process before an exception is
raised.
|
ProcessCredentialsBuilder |
withCommand(java.lang.String s) |
ProcessCredentialsBuilder |
withExpirationBufferSeconds(java.lang.Integer i) |
ProcessCredentialsBuilder |
withProcessOutputLimitBytes(java.lang.Long l) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build, defaultIfNull
public com.amazonaws.auth.AWSCredentialsProvider build() throws java.lang.Exception
build
in interface AWSCredentialsProviderBuilder
java.lang.Exception
public ProcessCredentialsBuilder withCommand(java.lang.String s)
public ProcessCredentialsBuilder withProcessOutputLimitBytes(java.lang.Long l)
public ProcessCredentialsBuilder withExpirationBufferSeconds(java.lang.Integer i)
@NonNull public @NonNull java.lang.String getCommand()
e.g. if you have a custom aws credentials program that takes arguments then you could have
/opt/bin/awscreds-custom --username interlok
here. The program is expected to output JSON
data as per the documentation
public void setCommand(@NonNull @NonNull java.lang.String command)
e.g. if you have a custom aws credentials program that takes arguments then you could have
/opt/bin/awscreds-custom --username interlok
here. The program is expected to output JSON
data as per the documentation
public java.lang.Long getProcessOutputLimitBytes()
If not specified, then the AWS internal default is used (currently 1024 bytes).
public void setProcessOutputLimitBytes(java.lang.Long processOutputLimitBytes)
If not specified, then the AWS internal default is used (currently 1024 bytes).
public java.lang.Integer getExpirationBufferSeconds()
This setting allows the credentials to be refreshed before they are reported to expire. If not configured, then the AWS internal default is used (currently 15 seconds)
public void setExpirationBufferSeconds(java.lang.Integer expirationBufferSeconds)
This setting allows the credentials to be refreshed before they are reported to expire. If not configured, then the AWS internal default is used (currently 15 seconds)