public final class ProfileFile extends Object
For more information on setting up AWS configuration profiles, see: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
A profile file can be created with builder()
and merged with other profiles files with aggregator()
. By
default, the SDK will use the defaultProfileFile()
when that behavior hasn't been explicitly overridden.
Modifier and Type | Class and Description |
---|---|
static class |
ProfileFile.Aggregator
A mechanism for merging multiple
ProfileFile s together into a single file. |
static interface |
ProfileFile.Builder
A builder for a
ProfileFile . |
static class |
ProfileFile.Type
The supported types of profile files.
|
Modifier and Type | Method and Description |
---|---|
static ProfileFile.Aggregator |
aggregator()
Create a builder that can merge multiple
ProfileFile s together. |
static ProfileFile.Builder |
builder()
Create a builder for a
ProfileFile . |
static ProfileFile |
defaultProfileFile()
Get the default profile file, using the credentials file from "~/.aws/credentials", the config file from "~/.aws/config"
and the "default" profile.
|
boolean |
equals(Object o) |
int |
hashCode() |
Optional<Profile> |
profile(String profileName)
Retrieve the profile from this file with the given name.
|
Map<String,Profile> |
profiles()
Retrieve an unmodifiable collection including all of the profiles in this file.
|
String |
toString() |
public static ProfileFile.Builder builder()
ProfileFile
.public static ProfileFile.Aggregator aggregator()
ProfileFile
s together.public static ProfileFile defaultProfileFile()
ProfileFileSystemSetting.AWS_SHARED_CREDENTIALS_FILE
, ProfileFileSystemSetting.AWS_CONFIG_FILE
and
ProfileFileSystemSetting.AWS_PROFILE
settings or by specifying a different profile file and profile namepublic Optional<Profile> profile(String profileName)
profileName
- The name of the profile that should be retrieved from this file.public Map<String,Profile> profiles()
Copyright © 2019. All rights reserved.