Class Credential

java.lang.Object
com.atlan.model.core.AtlanObject
com.atlan.model.admin.Credential
All Implemented Interfaces:
Serializable

public class Credential extends AtlanObject
See Also:
  • Constructor Details

  • Method Details

    • get

      public static CredentialResponse get(String guid) throws AtlanException
      Retrieves a credential by its unique identifier (GUID).
      Parameters:
      guid - unique identifier (GUID) of the credential to retrieve
      Returns:
      the credential, or null if none exists
      Throws:
      AtlanException - on any error during API invocation
    • get

      public static CredentialResponse get(AtlanClient client, String guid) throws AtlanException
      Retrieves a credential by its unique identifier (GUID).
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the credential
      guid - unique identifier (GUID) of the credential to retrieve
      Returns:
      the credential, or null if none exists
      Throws:
      AtlanException - on any error during API invocation
    • update

      public CredentialResponse update() throws AtlanException
      Sends this credential to Atlan to update it in Atlan, after first testing it to confirm it works.
      Returns:
      the updated credential
      Throws:
      InvalidRequestException - if the provided credentials cannot be validated successfully
      AtlanException - on any error during API invocation
    • update

      public CredentialResponse update(AtlanClient client) throws AtlanException
      Sends this credential to Atlan to update it in Atlan, after first testing it to confirm it works.
      Parameters:
      client - connectivity to the Atlan tenant on which to update the credential
      Returns:
      the updated credential
      Throws:
      InvalidRequestException - if the provided credentials cannot be validated successfully
      AtlanException - on any error during API invocation
    • toMap

      public Map<String,Object> toMap()
      Convert this credential into a map, for embedding within a package (crawler).
      Returns:
      map representation of the credential
    • builder

      public static Credential.CredentialBuilder<?,?> builder()
    • toBuilder

      public Credential.CredentialBuilder<?,?> toBuilder()
    • getId

      public String getId()
      Unique identifier (GUID) of the credential.
    • getName

      public String getName()
      Name of the credential.
    • getHost

      public String getHost()
      Hostname the for which connectivity is defined by the credential.
    • getPort

      public Integer getPort()
      Port number on which connectivity should be done.
    • getAuthType

      public String getAuthType()
      Authentication mechanism represented by the credential.
    • getConnectorType

      public String getConnectorType()
      Type of connector used by the credential.
    • getUsername

      public String getUsername()
      Less sensitive portion of the credential, typically used for a username for basic authentication or client IDs for other forms of authentication.
    • getPassword

      public String getPassword()
      More sensitive portion of the credential, typically used for a password for basic authentication or client secrets for other forms of authentication.
    • getExtras

      public Map<String,String> getExtras()
      Additional details about the credential. This can capture, for example, a secondary secret for particular forms of authentication and / or additional details about the scope of the connectivity (a specific database, role, warehouse, etc).
    • getConnectorConfigName

      public String getConnectorConfigName()
      Name of the connector configuration responsible for managing the credential.
    • equals

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

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class AtlanObject
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AtlanObject
    • toString

      public String toString()
      Description copied from class: AtlanObject
      Overrides:
      toString in class AtlanObject