@Override public File getLocation() { for (AwsProfileFileLocationProvider provider : providers) { File path = provider.getLocation(); if (path != null) { return path; } } return null; }
@SdkTestInternalApi AwsProfileRegionProvider(String profileName, AwsProfileFileLocationProvider locationProvider, BasicProfileConfigLoader configLoader) { this.profileName = profileName; this.locationProvider = locationProvider; this.profileConfigLoader = configLoader; }
public static Optional<File> getCredentialProfilesFile() { return Optional.ofNullable(AwsProfileFileLocationProvider.DEFAULT_CREDENTIALS_LOCATION_PROVIDER.getLocation()); }
public static Optional<File> getConfigFile() { return Optional.ofNullable(AwsProfileFileLocationProvider.DEFAULT_CONFIG_LOCATION_PROVIDER.getLocation()); }
public AwsProfileFileLocationProviderChain(AwsProfileFileLocationProvider... providers) { Collections.addAll(this.providers, providers); }
public AwsProfileRegionProvider(String profileName) { this(profileName, AwsProfileFileLocationProvider.DEFAULT_CONFIG_LOCATION_PROVIDER, BasicProfileConfigLoader.INSTANCE); }
private static File getCredentialProfilesFile() { return AwsProfileFileLocationProvider.DEFAULT_CREDENTIALS_LOCATION_PROVIDER.getLocation(); }