Class ProcessCredentialsBuilder
- All Implemented Interfaces:
AWSCredentialsProviderBuilder
See https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#sourcing-credentials-from-external-processes for more information
- Since:
- 4.3.0
In the adapter configuration file this class is aliased as aws2-process-credentials-builder which is the preferred alternative to the fully qualified classname when building your configuration.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.adaptris.aws2.AWSCredentialsProviderBuilder
AWSCredentialsProviderBuilder.BuilderConfig -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsoftware.amazon.awssdk.auth.credentials.AwsCredentialsProviderbuild()@NonNull StringThe command that should be executed to retrieve credentials including argumentsThe number of seconds between when the credentials expire and when the credentials should start to be refreshed.The maximum amount of data that can be returned by the external process before an exception is raised.voidsetCommand(@NonNull String command) The command that should be executed to retrieve credentials including argumentsvoidsetExpirationBufferSeconds(Integer expirationBufferSeconds) The number of seconds between when the credentials expire and when the credentials should start to be refreshed.voidsetProcessOutputLimitBytes(Long processOutputLimitBytes) The maximum amount of data that can be returned by the external process before an exception is raised.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.adaptris.aws2.AWSCredentialsProviderBuilder
build
-
Constructor Details
-
ProcessCredentialsBuilder
public ProcessCredentialsBuilder()
-
-
Method Details
-
build
- Specified by:
buildin interfaceAWSCredentialsProviderBuilder- Throws:
Exception
-
withCommand
-
withProcessOutputLimitBytes
-
withExpirationBufferSeconds
-
getCommand
The command that should be executed to retrieve credentials including argumentse.g. if you have a custom aws2 credentials program that takes arguments then you could have
/opt/bin/awscreds-custom --username interlokhere. The program is expected to output JSON data as per the documentation -
setCommand
The command that should be executed to retrieve credentials including argumentse.g. if you have a custom aws2 credentials program that takes arguments then you could have
/opt/bin/awscreds-custom --username interlokhere. The program is expected to output JSON data as per the documentation -
getProcessOutputLimitBytes
The maximum amount of data that can be returned by the external process before an exception is raised.If not specified, then the AWS internal default is used (currently 1024 bytes).
-
setProcessOutputLimitBytes
The maximum amount of data that can be returned by the external process before an exception is raised.If not specified, then the AWS internal default is used (currently 1024 bytes).
-
getExpirationBufferSeconds
The number of seconds between when the credentials expire and when the credentials should start to be refreshed.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)
-
setExpirationBufferSeconds
The number of seconds between when the credentials expire and when the credentials should start to be refreshed.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)
-