JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.795

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.auth.profile

Class ProfilesConfigFileWriter



  • public class ProfilesConfigFileWriter
    extends Object 
    The class for creating and modifying the credential profiles file.
    • Constructor Detail

      • ProfilesConfigFileWriter

        public ProfilesConfigFileWriter()
    • Method Detail

      • dumpToFile

        public static void dumpToFile(File destination,
         boolean overwrite,
         Profile... profiles)
        Write all the credential profiles to a file. Note that this method will clobber the existing content in the destination file if it's in the overwrite mode. Use modifyOrInsertProfiles(File, Profile...) instead, if you want to perform in-place modification on your existing credentials file.
        Parameters:
        destination - The destination file where the credentials will be written to.
        overwrite - If true, this method If false, this method will throw exception if the file already exists.
        profiles - All the credential profiles to be written.
      • modifyOrInsertProfiles

        public static void modifyOrInsertProfiles(File destination,
         Profile... profiles)
        Modify or insert new profiles into an existing credentials file by in-place modification. Only the properties of the affected profiles will be modified; all the unaffected profiles and comment lines will remain the same. This method does not support renaming a profile.
        Parameters:
        destination - The destination file to modify
        profiles - All the credential profiles to be written.
      • modifyOneProfile

        public static void modifyOneProfile(File destination,
         String profileName,
         Profile newProfile)
        Modify one profile in the existing credentials file by in-place modification. This method will rename the existing profile if the specified Profile has a different name.
        Parameters:
        destination - The destination file to modify
        profileName - The name of the existing profile to be modified
        newProfile - The new Profile object.
      • deleteProfiles

        public static void deleteProfiles(File destination,
         String... profileNames)
        Remove one or more profiles from the existing credentials file by in-place modification.
        Parameters:
        destination - The destination file to modify
        profileNames - The names of all the profiles to be deleted.
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /