Class Profile

java.lang.Object
software.amazon.awssdk.profiles.Profile
All Implemented Interfaces:
ToCopyableBuilder<Profile.Builder,Profile>

public final class Profile extends Object implements ToCopyableBuilder<Profile.Builder,Profile>
A named collection of configuration stored in a ProfileFile.

Raw property access can be made via property(String) and properties().

See Also:
  • Method Details

    • builder

      public static Profile.Builder builder()
      Create a builder for defining a profile with specific attributes. For reading profiles from a file, see ProfileFile.
    • 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 as SystemSetting.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()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<Profile.Builder,Profile>
      Returns:
      a builder for type T
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object