Package com.atlan

Class AtlanClient

java.lang.Object
com.atlan.AtlanClient
All Implemented Interfaces:
Closeable, AutoCloseable

public class AtlanClient extends Object implements Closeable
Configuration for the SDK against a particular Atlan tenant.
  • Field Details

    • DELETED_AUDIT_OBJECT

      public static final String DELETED_AUDIT_OBJECT
      See Also:
    • typeDefs

      public final TypeDefsEndpoint typeDefs
      Endpoint with operations to manage type definitions.
    • roles

      public final RolesEndpoint roles
      Endpoint with operations to manage workspace roles.
    • apiTokens

      public final ApiTokensEndpoint apiTokens
      Endpoint with operations to manage API tokens.
    • groups

      public final GroupsEndpoint groups
      Endpoint with operations to manage groups of users.
    • users

      public final UsersEndpoint users
      Endpoint with operations to manage users.
    • workflows

      public final WorkflowsEndpoint workflows
      Endpoint with operations to manage workflows.
    • queryParser

      public final QueryParserEndpoint queryParser
      Endpoint with operations to manage query parsing.
    • queries

      public final QueriesEndpoint queries
      Endpoint with operations to run SQL queries.
    • playbooks

      public final PlaybooksEndpoint playbooks
      Endpoint with operations to manage playbooks.
    • logs

      public final LogsEndpoint logs
      Endpoint with operations to manage logs.
    • images

      public final ImagesEndpoint images
      Endpoint with operations to manage images.
    • files

      public final FilesEndpoint files
      Endpoint with operations to manage files.
    • assets

      public final AssetEndpoint assets
      Endpoint with operations to manage assets.
    • requests

      public final RequestsEndpoint requests
      Endpoint with operations to manage requests.
    • impersonate

      public final ImpersonationEndpoint impersonate
      Endpoint with operations to impersonate users.
    • searchLog

      public final SearchLogEndpoint searchLog
      Endpoint with operations to search details of past searches.
    • credentials

      public final CredentialsEndpoint credentials
      Endpoint with operations to manage credentials (of connectors).
    • tasks

      public final TaskEndpoint tasks
      Endpoint with operations to manage background tasks.
    • sso

      public final SSOEndpoint sso
      Endpoint with operations to manage SSO configuration.
    • openLineage

      public final OpenLineageEndpoint openLineage
      Endpoint with operations to interact with OpenLineage.
    • contracts

      public final ContractsEndpoint contracts
      Endpoint with operations to interact with data contracts.
  • Method Details

    • readValue

      public <T> T readValue(String value, Class<T> clazz) throws IOException
      Deserialize a string value into an object.
      Type Parameters:
      T - type of the deserialized object
      Parameters:
      value - the value to deserialize
      clazz - the expected object type of the deserialization
      Returns:
      the deserialized object
      Throws:
      IOException - on any errors doing the deserialization
    • readValue

      public <T> T readValue(byte[] value, Class<T> clazz) throws IOException
      Deserialize a byte-array value into an object.
      Type Parameters:
      T - type of the deserialized object
      Parameters:
      value - the value to deserialize
      clazz - the expected object type of the deserialization
      Returns:
      the deserialized object
      Throws:
      IOException - on any errors doing the deserialization
    • readValue

      public <T> T readValue(String value, com.fasterxml.jackson.core.type.TypeReference<T> typeRef) throws IOException
      Deserialize a string value into an object.
      Type Parameters:
      T - type of the deserialized object
      Parameters:
      value - the value to deserialize
      typeRef - the expected object type of the deserialization
      Returns:
      the deserialized object
      Throws:
      IOException - on any errors doing the deserialization
    • readValue

      public <T> T readValue(byte[] value, com.fasterxml.jackson.core.type.TypeReference<T> typeRef) throws IOException
      Deserialize a string value into an object.
      Type Parameters:
      T - type of the deserialized object
      Parameters:
      value - the value to deserialize
      typeRef - the expected object type of the deserialization
      Returns:
      the deserialized object
      Throws:
      IOException - on any errors doing the deserialization
    • convertValue

      public <T> T convertValue(com.fasterxml.jackson.databind.JsonNode value, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) throws IllegalArgumentException
      Converts from a JSON representation into an object.
      Type Parameters:
      T - type of the deserialized object
      Parameters:
      value - the JSON representation
      typeReference - the expected object type of the deserialization
      Returns:
      the deserialized object
      Throws:
      IllegalArgumentException - if conversion fails
    • convertValue

      public <T> T convertValue(com.fasterxml.jackson.databind.JsonNode value, Class<T> clazz) throws IllegalArgumentException
      Converts from a JSON representation into an object.
      Type Parameters:
      T - type of the deserialized object
      Parameters:
      value - the JSON representation
      clazz - the expected object type of the deserialization
      Returns:
      the deserialized object
      Throws:
      IllegalArgumentException - if conversion fails
    • writeValueAsString

      public <T> String writeValueAsString(T value) throws IOException
      Serialize an object into a JSON string.
      Type Parameters:
      T - type of the object
      Parameters:
      value - the object to serialize
      Returns:
      a string giving the JSON representing the object
      Throws:
      IOException - on any errors doing the serialization
    • writeValueAsBytes

      public <T> byte[] writeValueAsBytes(T value) throws IOException
      Serialize an object into a JSON byte-array.
      Type Parameters:
      T - type of the object
      Parameters:
      value - the object to serialize
      Returns:
      a byte-array giving the JSON representing the object
      Throws:
      IOException - on any errors doing the serialization
    • writeValue

      public void writeValue(com.fasterxml.jackson.core.JsonGenerator g, Object value) throws IOException
      Serialize an object through the provided JsonGenerator.
      Parameters:
      g - JSON generator through which to serialize the object
      value - object to serialize
      Throws:
      IOException - on any errors doing the serialization
    • isInternal

      public boolean isInternal()
      Indicates whether the SDK is configured for cluster-internal access (true) or external access (false).
      Returns:
      boolean indicating whether the SDK is configured for cluster-internal access (true) or not (false)
    • getBaseUrl

      public String getBaseUrl()
      Retrieve the base URL for the tenant of Atlan configured in this client.
    • setAppInfo

      public void setAppInfo(String name)
      Sets information about your application. The information is passed along to Atlan.
      Parameters:
      name - Name of your application (e.g. "MyAwesomeApp")
    • setAppInfo

      public void setAppInfo(String name, String version)
      Sets information about your application. The information is passed along to Atlan.
      Parameters:
      name - Name of your application (e.g. "MyAwesomeApp")
      version - Version of your application (e.g. "1.2.34")
    • setAppInfo

      public void setAppInfo(String name, String version, String url)
      Sets information about your application. The information is passed along to Atlan.
      Parameters:
      name - Name of your application (e.g. "MyAwesomeApp")
      version - Version of your application (e.g. "1.2.34")
      url - Website for your application (e.g. "https://myawesomeapp.info")
    • setAppInfo

      public void setAppInfo(String name, String version, String url, String partnerId)
      Sets information about your application. The information is passed along to Atlan.
      Parameters:
      name - Name of your application (e.g. "MyAwesomeApp")
      version - Version of your application (e.g. "1.2.34")
      url - Website for your application (e.g. "https://myawesomeapp.info")
      partnerId - Your Atlan Partner ID (e.g. "pp_partner_1234")
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • getConnectTimeout

      public int getConnectTimeout()
      Timeout value that will be used for making new connections to the Atlan API (in milliseconds).
    • setConnectTimeout

      public void setConnectTimeout(int connectTimeout)
      Timeout value that will be used for making new connections to the Atlan API (in milliseconds).
    • getReadTimeout

      public int getReadTimeout()
      Timeout value that will be used for reading a response from an API request (in milliseconds). Note that this value should be set conservatively because some API requests can take time and a short timeout increases the likelihood of causing a problem in the backend.
    • setReadTimeout

      public void setReadTimeout(int readTimeout)
      Timeout value that will be used for reading a response from an API request (in milliseconds). Note that this value should be set conservatively because some API requests can take time and a short timeout increases the likelihood of causing a problem in the backend.
    • getMaxNetworkRetries

      public int getMaxNetworkRetries()
      Maximum number of times requests will be retried.
    • setMaxNetworkRetries

      public void setMaxNetworkRetries(int maxNetworkRetries)
      Maximum number of times requests will be retried.
    • getExtraHeaders

      public Map<String,List<String>> getExtraHeaders()
      Extra headers to include on any requests made by this client.
    • setExtraHeaders

      public void setExtraHeaders(Map<String,List<String>> extraHeaders)
      Extra headers to include on any requests made by this client.
    • getApiToken

      public String getApiToken()
      API token to use for authenticating API calls.
    • setApiToken

      public void setApiToken(String apiToken)
      API token to use for authenticating API calls.
    • getUserId

      public String getUserId()
      Unique identifier (GUID) of the user this client impersonates.
    • setUserId

      public void setUserId(String userId)
      Unique identifier (GUID) of the user this client impersonates.
    • getConnectionProxy

      public Proxy getConnectionProxy()
      Proxy to tunnel all Atlan connections.
    • setConnectionProxy

      public void setConnectionProxy(Proxy connectionProxy)
      Proxy to tunnel all Atlan connections.
    • getProxyCredential

      public PasswordAuthentication getProxyCredential()
      Credential for proxy authorization if required.
    • setProxyCredential

      public void setProxyCredential(PasswordAuthentication proxyCredential)
      Credential for proxy authorization if required.
    • getAppInfo

      public Map<String,String> getAppInfo()
      Information about your application.
    • getAtlanTagCache

      public AtlanTagCache getAtlanTagCache()
      Cache of Atlan tags specific to this client.
    • getCustomMetadataCache

      public CustomMetadataCache getCustomMetadataCache()
      Cache of custom metadata structures specific to this client.
    • getEnumCache

      public EnumCache getEnumCache()
      Cache of enums specific to this client.
    • getGroupCache

      public GroupCache getGroupCache()
      Cache of groups specific to this client.
    • getRoleCache

      public RoleCache getRoleCache()
      Cache of workspace roles specific to this client.
    • getUserCache

      public UserCache getUserCache()
      Cache of users specific to this client.
    • getConnectionCache

      public ConnectionCache getConnectionCache()
      Cache of connections specific to this client.
    • getSourceTagCache

      public SourceTagCache getSourceTagCache()
      Cache of source-synced tags specific to this client.
    • getAssetDeserializer

      public AssetDeserializer getAssetDeserializer()
      Client-aware asset deserializer.
    • getRelationshipAttributesDeserializer

      public RelationshipAttributesDeserializer getRelationshipAttributesDeserializer()
      Client-aware relationship attributes deserializer.
    • getCustomMetadataAuditDeserializer

      public CustomMetadataAuditDeserializer getCustomMetadataAuditDeserializer()
      Client-aware custom metadata deserializer.
    • getAtlanTagDeserializer

      public AtlanTagDeserializer getAtlanTagDeserializer()
      Client-aware Atlan tag deserializer.