Package software.amazon.awssdk.profiles
Class Profile
- java.lang.Object
-
- software.amazon.awssdk.profiles.Profile
-
- All Implemented Interfaces:
ToCopyableBuilder<Profile.Builder,Profile>
@SdkPublicApi public final class Profile extends Object implements ToCopyableBuilder<Profile.Builder,Profile>
A named collection of configuration stored in aProfileFile.Raw property access can be made via
property(String)andproperties().- See Also:
ProfileFile
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceProfile.BuilderA builder for aProfile.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Boolean>booleanProperty(String propertyKey)Retrieve a specific property from this profile, and convert it to a boolean using the same algorithm asSystemSetting.getBooleanValue().static Profile.Builderbuilder()Create a builder for defining a profile with specific attributes.booleanequals(Object o)inthashCode()Stringname()Retrieve the name of this profile.Map<String,String>properties()Retrieve an unmodifiable view of all of the properties currently in this profile.Optional<String>property(String propertyKey)Retrieve a specific raw property from this profile.Profile.BuildertoBuilder()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
builder
public static Profile.Builder builder()
Create a builder for defining a profile with specific attributes. For reading profiles from a file, seeProfileFile.
-
name
public String name()
Retrieve the name of this profile.
-
property
public Optional<String> property(String propertyKey)
Retrieve a specific raw property from this profile.- Parameters:
propertyKey- The name of the property to retrieve.- Returns:
- The value of the property, if configured.
-
booleanProperty
public Optional<Boolean> booleanProperty(String propertyKey)
Retrieve a specific property from this profile, and convert it to a boolean using the same algorithm asSystemSetting.getBooleanValue().- Parameters:
propertyKey- The name of the property to retrieve.- Returns:
- The boolean value of the property, if configured.
- Throws:
IllegalStateException- If the property is set, but it is not boolean.
-
properties
public Map<String,String> properties()
Retrieve an unmodifiable view of all of the properties currently in this profile.
-
toBuilder
public Profile.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Profile.Builder,Profile>
-
-