Package com.dtsx.astra.sdk.org
Class TokensClient
java.lang.Object
com.dtsx.astra.sdk.AbstractApiClient
com.dtsx.astra.sdk.org.TokensClient
Group token operations.
-
Field Summary
Fields inherited from class com.dtsx.astra.sdk.AbstractApiClient
environment, observers, token -
Constructor Summary
ConstructorsConstructorDescriptionTokensClient(String token) As immutable object use builder to initiate the object.TokensClient(String token, AstraEnvironment env) As immutable object use builder to initiate the object. -
Method Summary
Modifier and TypeMethodDescriptioncreate(DefaultRoles role) Create tokenCreate tokenvoidRevoke a token.booleanCheck in existence of a token.findAll()List tokensRetrieve role information from its id.getEndpointToken(String tokenId) Endpoint to access dbs (static)Endpoint to access schema for namespace.Provide a service Name.Methods inherited from class com.dtsx.astra.sdk.AbstractApiClient
assertHttpCodeAccepted, DELETE, GET, getHttpClient, getOperationName, HEAD, PATCH, POST, POST, PUT
-
Constructor Details
-
TokensClient
As immutable object use builder to initiate the object.- Parameters:
token- authenticated token
-
TokensClient
As immutable object use builder to initiate the object.- Parameters:
token- authenticated tokenenv- define target environment to be used
-
-
Method Details
-
getServiceName
Provide a service Name.- Specified by:
getServiceNamein classAbstractApiClient- Returns:
- service name
-
findAll
List tokens- Returns:
- list of tokens for this organization
-
findById
Retrieve role information from its id.- Parameters:
tokenId- token identifier- Returns:
- role information
-
exist
Check in existence of a token.- Parameters:
tokenId- token identifier- Returns:
- if the provided token exist
-
delete
Revoke a token.- Parameters:
tokenId- token identifier
-
create
Create token- Parameters:
role- create a token with dedicated role- Returns:
- created token
-
create
Create token- Parameters:
role- create a token with dedicated role- Returns:
- created token
-
getEndpointTokens
Endpoint to access schema for namespace.- Returns:
- endpoint
-
getEndpointToken
Endpoint to access dbs (static)- Parameters:
tokenId- token identifier- Returns:
- token endpoint
-