Package com.dtsx.astra.sdk.db
Class AstraDbClient
java.lang.Object
com.dtsx.astra.sdk.AbstractApiClient
com.dtsx.astra.sdk.db.AstraDbClient
Devops API Client working with Databases.
-
Field Summary
Fields inherited from class com.dtsx.astra.sdk.AbstractApiClient
environment, token
-
Constructor Summary
ConstructorDescriptionAstraDbClient
(String token) As immutable object use builder to initiate the object.AstraDbClient
(String token, ApiLocator.AstraEnvironment env) As immutable object use builder to initiate the object. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(DatabaseCreationRequest dbCreationRequest) Create a database base on some parameters.Use the database part of the API.databaseByName
(String dbName) Use the database part of the API from its name.findAll()
Returns list of databases with default filter.Find All Access List.Default Filter to find databases.Find a database from its id.findByName
(String name) Retrieve list of all Databases of the account and filter on namefindFirstByName
(String name) Retrieve frist DB from its name.Endpoint to access schema for namespace.Endpoint to access schema for namespace.regions()
Access Astra Db region topology.search
(DatabaseFilter filter) Find Databases matching the provided filter.Methods inherited from class com.dtsx.astra.sdk.AbstractApiClient
assertHttpCodeAccepted, DELETE, GET, getHttpClient, getToken, HEAD, PATCH, POST, POST, PUT
-
Constructor Details
-
AstraDbClient
As immutable object use builder to initiate the object.- Parameters:
token
- authenticated token
-
AstraDbClient
As immutable object use builder to initiate the object.- Parameters:
env
- define target environment to be usedtoken
- authenticated token
-
-
Method Details
-
regions
Access Astra Db region topology.- Returns:
- work with regions
-
findAllAccessLists
Find All Access List.- Returns:
- access list
-
findAll
Returns list of databases with default filter. (include=non terminated, provider=ALL,limit=25)- Returns:
- matching db
-
findAllNonTerminated
Default Filter to find databases.- Returns:
- list of non terminated db
-
findByName
Retrieve list of all Databases of the account and filter on name- Parameters:
name
- a database name- Returns:
- list of db matching the criteria
-
findFirstByName
Retrieve frist DB from its name.- Parameters:
name
- name- Returns:
- if the db exists or not
-
findById
Find a database from its id.- Parameters:
id
- a database name- Returns:
- list of db matching the criteria
-
search
Find Databases matching the provided filter. https://docs.datastax.com/en/astra/docs/_attachments/devopsv1.html#operation/listDatabases- Parameters:
filter
- filter to search for db- Returns:
- list of db
-
create
Create a database base on some parameters.- Parameters:
dbCreationRequest
- creation request with tier and capacity unit- Returns:
- the new instance id. https://docs.datastax.com/en/astra/docs/_attachments/devopsv1.html#operation/createDatabase
-
database
Use the database part of the API.- Parameters:
dbId
- unique identifier id- Returns:
- client specialized for this db
-
databaseByName
Use the database part of the API from its name.- Parameters:
dbName
- name for a database- Returns:
- DatabaseClient
-
getEndpointDatabases
Endpoint to access schema for namespace.- Returns:
- endpoint
-
getEndpointAccessLists
Endpoint to access schema for namespace.- Returns:
- endpoint
-