Class CdpProfileConfigFile

java.lang.Object
com.cloudera.cdp.authentication.credentials.profile.CdpProfileConfigFile

public class CdpProfileConfigFile extends Object
Handles loading a CDP profile from either the default location or from an input path. Offers a convenience method for retreiving credentials from a named profile.
  • Constructor Details

    • CdpProfileConfigFile

      public CdpProfileConfigFile()
      Constructor. Loads the CDP credentials file from the default location.
    • CdpProfileConfigFile

      public CdpProfileConfigFile(String filePath)
      Loads the CDP credential profiles from the input path.
      Parameters:
      filePath - path to CDP credentials file
    • CdpProfileConfigFile

      public CdpProfileConfigFile(File file)
      Loads the CDP credential profiles from the input file.
      Parameters:
      file - CDP credentials file
  • Method Details

    • getCredentials

      public CdpCredentials getCredentials(String profileName)
      Returns the CdpCredentials using the profile name provided.
      Parameters:
      profileName - CDP profile name
      Returns:
      CdpCredentials