CredentialOptions (Cloud Bigtable HBase Client for Java 1.12.0 API)

com.google.cloud.bigtable.config

Class CredentialOptions

    • Field Detail

      • SERVICE_ACCOUNT_JSON_ENV_VARIABLE

        public static final String SERVICE_ACCOUNT_JSON_ENV_VARIABLE
        Constant SERVICE_ACCOUNT_JSON_ENV_VARIABLE="GOOGLE_APPLICATION_CREDENTIALS"
        See Also:
        Constant Field Values
      • LOG

        protected static final Logger LOG
        Constant LOG
    • Method Detail

      • getEnvJsonFile

        public static String getEnvJsonFile()
        Get a configured json credentials file from the GOOGLE_APPLICATION_CREDENTIALS environment variable.
        Returns:
        a String object.
      • defaultCredentials

        public static CredentialOptions defaultCredentials()
        Use the Application Default Credentials which are credentials that identify and authorize the whole application. This is the built-in service account if running on Google Compute Engine. Alternatively, the credentials file from the path in the environment variable GOOGLE_APPLICATION_CREDENTIAL. If GOOGLE_APPLICATION_CREDENTIAL is not set, look at the gcloud/application_default_credentials.json file in the (User)/APPDATA/ directory on Windows or ~/.config/ directory on other OSs . Initializes OAuth2 credential using preconfigured ServiceAccount settings on the local Google Compute Engine VM. See: Creating and Enabling Service Accounts for Instances.
        Returns:
        a CredentialOptions object.
      • credential

        public static CredentialOptions credential(com.google.auth.Credentials credentials)
        A CredentialOption that wraps an existing Credentials object.
        Parameters:
        credentials - a Credentials object.
        Returns:
        a CredentialOptions object.