Class AstraStreamingClient

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

public class AstraStreamingClient extends AbstractApiClient
Group resources of streaming (tenants, providers).
Author:
Cedrick LUNVEN (@clunven)
  • Constructor Details

    • AstraStreamingClient

      public AstraStreamingClient(String token)
      As immutable object use builder to initiate the object.
      Parameters:
      token - authenticated token
    • AstraStreamingClient

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

    • findAll

      public Stream<Tenant> findAll()
      List tenants in the current instance.
      Returns:
      list of tenants.
    • find

      public Optional<Tenant> find(String tenantName)
      Find a tenant from ids name.
      Parameters:
      tenantName - name of the tenant
      Returns:
      tenant
    • get

      public Tenant get(String tenantName)
      Assess a tenant exist and retrieve information.
      Parameters:
      tenantName - name of the tenant
      Returns:
      tenant reference
    • create

      public void create(CreateTenant ct)
      Syntax sugar to help
      Parameters:
      ct - creation request for tenant
    • delete

      public void delete(String tenantName)
      Deleting a tenant and cluster.
      Parameters:
      tenantName - name of the tenant
    • exist

      public boolean exist(String tenantName)
      Check if a role is present
      Parameters:
      tenantName - name of the tenant
      Returns:
      if the tenant exist
    • tenant

      public TenantClient tenant(String tenantName)
      Access methods for a tenant.
      Parameters:
      tenantName - current tenant
      Returns:
      client for a tenant
    • clusters

      public ClustersClient clusters()
      Operation on Streaming Clusters.
      Returns:
      streaming cluster client
    • providers

      public ProvidersClient providers()
      Operation on Streaming Clusters.
      Returns:
      streaming cluster client
    • regions

      public RegionsClient regions()
      Operation on Streaming regions.
      Returns:
      streaming cluster client
    • getApiDevopsEndpointStreaming

      public String getApiDevopsEndpointStreaming()
      Endpoint to access schema for namespace.
      Returns:
      endpoint
    • getApiDevopsEndpointTenants

      public String getApiDevopsEndpointTenants()
      Endpoint to access schema for namespace.
      Returns:
      endpoint
    • getEndpointTenant

      public String getEndpointTenant(String tenantId)
      Endpoint to access dbs.
      Parameters:
      tenantId - identifier for tenant
      Returns:
      database endpoint
    • getEndpointCluster

      public String getEndpointCluster(String tenantName, String clusterId)
      Endpoint to access cluster.
      Parameters:
      tenantName - name of the tenant
      clusterId - identifier for the cluster.
      Returns:
      database endpoint