Class ProfileFile
java.lang.Object
software.amazon.awssdk.profiles.ProfileFile
Provides programmatic access to the contents of an AWS configuration profile file.
AWS configuration profiles allow you to share multiple sets of AWS security credentials between different tools such as the
AWS SDK for Java and the AWS CLI.
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA mechanism for merging multipleProfileFiles together into a single file.static interfaceA builder for aProfileFile.static enumThe supported types of profile files. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ProfileFile.AggregatorCreate a builder that can merge multipleProfileFiles together.static ProfileFile.Builderbuilder()Create a builder for aProfileFile.static ProfileFileGet the default profile file, using the credentials file from "~/.aws/credentials", the config file from "~/.aws/config" and the "default" profile.booleangetSection(String sectionName, String sectionTitle) inthashCode()Retrieve the profile from this file with the given name.profiles()Retrieve an unmodifiable collection including all of the profiles in this file.toString()
-
Field Details
-
PROFILES_SECTION_TITLE
- See Also:
-
-
Method Details
-
getSection
-
builder
Create a builder for aProfileFile. -
aggregator
Create a builder that can merge multipleProfileFiles together. -
defaultProfileFile
Get the default profile file, using the credentials file from "~/.aws/credentials", the config file from "~/.aws/config" and the "default" profile. This default behavior can be customized using theProfileFileSystemSetting.AWS_SHARED_CREDENTIALS_FILE,ProfileFileSystemSetting.AWS_CONFIG_FILEandProfileFileSystemSetting.AWS_PROFILEsettings or by specifying a different profile file and profile name.The file is read each time this method is invoked.
-
profile
-
profiles
-
toString
-
equals
-
hashCode
-