All Downloads are FREE. Search and download functionalities are using the official Maven repository.

info.freelibrary.vertx.s3.AwsProfile Maven / Gradle / Ivy

There is a newer version: 2.0.0-alpha-2
Show newest version

package info.freelibrary.vertx.s3;

/**
 * A AWS profile defined in the system credentials file.
 */
public class AwsProfile {

    /**
     * The profile name.
     */
    private final String myProfileName;

    /**
     * Creates a profile from the supplied profile name.
     *
     * @param aProfileName A name of a profile from the system credentials file
     */
    public AwsProfile(final String aProfileName) {
        myProfileName = aProfileName;
    }

    /**
     * Get the credentials for the supplied profile.
     *
     * @return The AWS credentials for this profile
     */
    public AwsCredentials getCredentials() {
        return new AwsCredentialsProviderChain(myProfileName).getCredentials();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy