Package com.dtsx.astra.sdk.db
Class DbDatacentersClient
java.lang.Object
com.dtsx.astra.sdk.AbstractApiClient
com.dtsx.astra.sdk.db.DbDatacentersClient
Delegate operation on region/datacenters
-
Field Summary
Fields inherited from class com.dtsx.astra.sdk.AbstractApiClient
environment, token
-
Constructor Summary
ConstructorDescriptionDbDatacentersClient
(String token, ApiLocator.AstraEnvironment env, String databaseId) As immutable object use builder to initiate the object.DbDatacentersClient
(String token, String databaseId) As immutable object use builder to initiate the object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(String tier, CloudProviderType cloudProvider, String regionName) Create a Region.void
Delete a region from its name.boolean
Evaluate if a database exists using the findById method.findAll()
Get Datacenters details for a regionfindByRegionName
(String regionName) Get a region from its name.Methods inherited from class com.dtsx.astra.sdk.AbstractApiClient
assertHttpCodeAccepted, DELETE, GET, getHttpClient, getToken, HEAD, PATCH, POST, POST, PUT
-
Constructor Details
-
DbDatacentersClient
As immutable object use builder to initiate the object.- Parameters:
token
- authenticated tokendatabaseId
- database identifier
-
DbDatacentersClient
As immutable object use builder to initiate the object.- Parameters:
env
- define target environment to be usedtoken
- authenticated tokendatabaseId
- database identifier
-
-
Method Details
-
findAll
Get Datacenters details for a region- Returns:
- list of datacenters.
-
findByRegionName
Get a region from its name.- Parameters:
regionName
- region name- Returns:
- datacenter if exists i
-
exist
Evaluate if a database exists using the findById method.- Parameters:
regionName
- region name- Returns:
- if region exist
-
create
Create a Region.- Parameters:
tier
- tier for the dbcloudProvider
- Cloud provider to add a regionregionName
- name of the regionhttps://docs.datastax.com/en/astra/docs/_attachments/devopsv2.html#operation/addDatacenters
-
delete
Delete a region from its name.- Parameters:
regionName
- name of the regionhttps://docs.datastax.com/en/astra/docs/_attachments/devopsv2.html#operation/terminateDatacenter
-