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

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

There is a newer version: 1.3.3
Show newest version

package info.freelibrary.vertx.s3;

import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;

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

    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 Profile(final String aProfileName) {
        myProfileName = aProfileName;
    }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy