Class TokensAPI
- java.lang.Object
-
- com.databricks.sdk.service.settings.TokensAPI
-
@Generated public class TokensAPI extends Object
The Token API allows you to create, list, and revoke tokens that can be used to authenticate and access Databricks REST APIs.
-
-
Constructor Summary
Constructors Constructor Description TokensAPI(ApiClient apiClient)
Regular-use constructorTokensAPI(TokensService mock)
Constructor for mocks
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateTokenResponse
create(CreateTokenRequest request)
Create a user token.void
delete(RevokeTokenRequest request)
Revoke token.void
delete(String tokenId)
TokensService
impl()
Iterable<PublicTokenInfo>
list()
List tokens.
-
-
-
Constructor Detail
-
TokensAPI
public TokensAPI(ApiClient apiClient)
Regular-use constructor
-
TokensAPI
public TokensAPI(TokensService mock)
Constructor for mocks
-
-
Method Detail
-
create
public CreateTokenResponse create(CreateTokenRequest request)
Create a user token.Creates and returns a token for a user. If this call is made through token authentication, it creates a token with the same client ID as the authenticated token. If the user's token quota is exceeded, this call returns an error **QUOTA_EXCEEDED**.
-
delete
public void delete(String tokenId)
-
delete
public void delete(RevokeTokenRequest request)
Revoke token.Revokes an access token.
If a token with the specified ID is not valid, this call returns an error **RESOURCE_DOES_NOT_EXIST**.
-
list
public Iterable<PublicTokenInfo> list()
List tokens.Lists all the valid tokens for a user-workspace pair.
-
impl
public TokensService impl()
-
-