Class TenantClient

java.lang.Object
com.dtsx.astra.sdk.AbstractApiClient
com.dtsx.astra.sdk.streaming.TenantClient

public class TenantClient extends AbstractApiClient
Author:
Cedrick LUNVEN (@clunven)
  • Constructor Details

    • TenantClient

      public TenantClient(String token, String tenantId)
      As immutable object use builder to initiate the object.
      Parameters:
      tenantId - unique tenant identifier
      token - authenticated token
    • TenantClient

      public TenantClient(String token, AstraEnvironment env, String tenantId)
      As immutable object use builder to initiate the object.
      Parameters:
      env - define target environment to be used
      token - authenticated token
      tenantId - unique tenant identifier
  • Method Details

    • find

      public Optional<Tenant> find()
      Retrieve a tenant by its id.
      Returns:
      the tenant if present,
    • get

      public Tenant get()
      Retrieve tenant or throw error.
      Returns:
      current db or error
    • exist

      public boolean exist()
      Evaluate if a tenant exists using the findById method.
      Returns:
      tenant existence
    • limits

      public TenantLimitsClient limits()
      Access Limits of a tenant
      Returns:
      cdc component
    • cdc

      public TenantCdcClient cdc()
      Access CDC Client.
      Returns:
      cdc component
    • stats

      public TenantStatsClient stats()
      Access Stats Client.
      Returns:
      cdc component
    • getEndpointTenant

      public String getEndpointTenant()
      Endpoint to access dbs.
      Returns:
      database endpoint
    • getEndpointTenantWithOrganizationId

      public String getEndpointTenantWithOrganizationId()
      Endpoint to access dbs.
      Returns:
      database endpoint