Package io.atleon.aws.util
Class AwsConfig
- java.lang.Object
-
- io.atleon.aws.util.AwsConfig
-
public final class AwsConfig extends Object
Utility class used to build AWS resources from property-based configs
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIG_PREFIXstatic StringCREDENTIALS_ACCESS_KEY_ID_CONFIGWhen providingAwsCredentialsexplicitly, the value of this property should be the Access Key ID.static StringCREDENTIALS_PROVIDER_TYPE_CONFIGThe type ofAwsCredentialsProviderto use.static StringCREDENTIALS_PROVIDER_TYPE_DEFAULTstatic StringCREDENTIALS_PROVIDER_TYPE_STATICstatic StringCREDENTIALS_PROVIDER_TYPE_WEB_IDENTITY_TOKEN_FILEstatic StringCREDENTIALS_SECRET_ACCESS_KEY_CONFIGWhen providingAwsCredentialsexplicitly, the value of this property should be the Secret Access Key.static StringCREDENTIALS_SESSION_TOKEN_CONFIGWhen providing "session"AwsCredentialsexplicitly, the value of this property should be the Secret Token.static StringCREDENTIALS_TYPE_BASICstatic StringCREDENTIALS_TYPE_CONFIGWhenAwsCredentialsare explicitly provided, this configures their type.static StringCREDENTIALS_TYPE_SESSIONstatic StringREGION_CONFIGIf/when the AWS Region cannot be inferred by the underlying AWS Client, this property can be set to explicitly provide it.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static software.amazon.awssdk.auth.credentials.AwsCredentialsloadAwsCredentials(Map<String,?> configs)static software.amazon.awssdk.auth.credentials.AwsCredentialsProviderloadCredentialsProvider(Map<String,?> configs)static Optional<software.amazon.awssdk.regions.Region>loadRegion(Map<String,?> configs)
-
-
-
Field Detail
-
CONFIG_PREFIX
public static final String CONFIG_PREFIX
- See Also:
- Constant Field Values
-
CREDENTIALS_PROVIDER_TYPE_CONFIG
public static final String CREDENTIALS_PROVIDER_TYPE_CONFIG
The type ofAwsCredentialsProviderto use. The "default" Provider uses a "chain" of Providers which are capable of sourcingAwsCredentialsfrom various environmental locations. The "web-identity-token-file" Provider loads temporary credentials from Java system properties or environment variables. When set to "static", the Credentials must be explicitly provided by setting the Access Key ID and Secret Access Key.- See Also:
- Constant Field Values
-
CREDENTIALS_PROVIDER_TYPE_DEFAULT
public static final String CREDENTIALS_PROVIDER_TYPE_DEFAULT
- See Also:
- Constant Field Values
-
CREDENTIALS_PROVIDER_TYPE_STATIC
public static final String CREDENTIALS_PROVIDER_TYPE_STATIC
- See Also:
- Constant Field Values
-
CREDENTIALS_PROVIDER_TYPE_WEB_IDENTITY_TOKEN_FILE
public static final String CREDENTIALS_PROVIDER_TYPE_WEB_IDENTITY_TOKEN_FILE
- See Also:
- Constant Field Values
-
CREDENTIALS_TYPE_CONFIG
public static final String CREDENTIALS_TYPE_CONFIG
WhenAwsCredentialsare explicitly provided, this configures their type. The default of "basic" simply requires the Access Key ID and Secret Access Key. The "session" type requires an additional Session Token.- See Also:
- Constant Field Values
-
CREDENTIALS_TYPE_BASIC
public static final String CREDENTIALS_TYPE_BASIC
- See Also:
- Constant Field Values
-
CREDENTIALS_TYPE_SESSION
public static final String CREDENTIALS_TYPE_SESSION
- See Also:
- Constant Field Values
-
CREDENTIALS_ACCESS_KEY_ID_CONFIG
public static final String CREDENTIALS_ACCESS_KEY_ID_CONFIG
When providingAwsCredentialsexplicitly, the value of this property should be the Access Key ID.- See Also:
- Constant Field Values
-
CREDENTIALS_SECRET_ACCESS_KEY_CONFIG
public static final String CREDENTIALS_SECRET_ACCESS_KEY_CONFIG
When providingAwsCredentialsexplicitly, the value of this property should be the Secret Access Key.- See Also:
- Constant Field Values
-
CREDENTIALS_SESSION_TOKEN_CONFIG
public static final String CREDENTIALS_SESSION_TOKEN_CONFIG
When providing "session"AwsCredentialsexplicitly, the value of this property should be the Secret Token.- See Also:
- Constant Field Values
-
REGION_CONFIG
public static final String REGION_CONFIG
If/when the AWS Region cannot be inferred by the underlying AWS Client, this property can be set to explicitly provide it.- See Also:
- Constant Field Values
-
-