Class ProfileCredentialsBuilder

java.lang.Object
com.adaptris.aws2.ProfileCredentialsBuilder
All Implemented Interfaces:
AWSCredentialsProviderBuilder

@ComponentProfile(summary="Credentials provider based on AWS configuration profiles", since="4.3.0") public class ProfileCredentialsBuilder extends Object implements AWSCredentialsProviderBuilder
Credentials provider based on AWS configuration profiles
Since:
4.3.0

In the adapter configuration file this class is aliased as aws2-profile-credentials-builder which is the preferred alternative to the fully qualified classname when building your configuration.

  • Constructor Details

    • ProfileCredentialsBuilder

      public ProfileCredentialsBuilder()
  • Method Details

    • build

      public software.amazon.awssdk.auth.credentials.AwsCredentialsProvider build() throws Exception
      Specified by:
      build in interface AWSCredentialsProviderBuilder
      Throws:
      Exception
    • withConfigFile

      public ProfileCredentialsBuilder withConfigFile(String s)
    • withProfileName

      public ProfileCredentialsBuilder withProfileName(String s)
    • withRefreshIntervalNanos

      public ProfileCredentialsBuilder withRefreshIntervalNanos(Long l)
    • getConfigFile

      public String getConfigFile()
      The profile configuration file.

      If not specified then the behaviour is down to the AWS SDK. This probably means that ~/.aws2/config is used as the configuration file.

    • setConfigFile

      public void setConfigFile(String configFile)
      The profile configuration file.

      If not specified then the behaviour is down to the AWS SDK. This probably means that ~/.aws2/config is used as the configuration file.

    • getProfileName

      public String getProfileName()
      The profile within configuration.

      If not specified then the behaviour is down to the AWS SDK. This will probably mean the default profile.

    • setProfileName

      public void setProfileName(String profileName)
      The profile within configuration.

      If not specified then the behaviour is down to the AWS SDK. This will probably mean the default profile.

    • getRefreshIntervalNanos

      public Long getRefreshIntervalNanos()
      The refresh interval in nano seconds.

      This maps onto ProfileCredentialsProvider#setRefreshIntervalNanos(long}. The corresponding ProfileCredentialsProvider#setRefreshForceIntervalNanos(long) is set to 2x whatever you have configured here.

    • setRefreshIntervalNanos

      public void setRefreshIntervalNanos(Long refreshIntervalNanos)
      The refresh interval in nano seconds.

      This maps onto ProfileCredentialsProvider#setRefreshIntervalNanos(long}. The corresponding ProfileCredentialsProvider#setRefreshForceIntervalNanos(long) is set to 2x whatever you have configured here.