func (a TokensAPI) Delete(tokenID string) error {
	err := a.client.Post(a.context, "/token/delete", map[string]string{
		"token_id": tokenID,
	}, nil)
	if common.IsMissing(err) {
		return nil
	}
	return err
}
Delete will delete the token given a token id
package identity
import (
	"context"
	"fmt"
	"net/http"
	"time"
	"github.com/databrickslabs/terraform-provider-databricks/common"
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
type TokenRequest struct {
	LifetimeSeconds int32  `json:"lifetime_seconds,omitempty"`
	Comment         string `json:"comment,omitempty"`
}
type TokenResponse struct {
	TokenValue string     `json:"token_value,omitempty"`
	TokenInfo  *TokenInfo `json:"token_info,omitempty"`
}
type TokenInfo struct {
	TokenID      string `json:"token_id,omitempty"`
	CreationTime int64  `json:"creation_time,omitempty"`
	ExpiryTime   int64  `json:"expiry_time,omitempty"`
	Comment      string `json:"comment,omitempty"`
}
type TokenList struct {
	TokenInfos []TokenInfo `json:"token_infos,omitempty"`
}
func NewTokensAPI(ctx context.Context, m interface{}) TokensAPI {
	return TokensAPI{m.(*common.DatabricksClient), ctx}
}
type TokensAPI struct {
	client  *common.DatabricksClient
	context context.Context
}
func (a TokensAPI) Create(tokenLifetime time.Duration, comment string) (r TokenResponse, err error) {
	request := TokenRequest{}
	seconds := int32(tokenLifetime.Seconds())
	if seconds > 0 {
		request.LifetimeSeconds = seconds
	}
	if comment != "" {
		request.Comment = comment
	}
	err = a.client.Post(a.context, "/token/create", request, &r)
	return
}
func (a TokensAPI) List() ([]TokenInfo, error) {
	var tokenListResult TokenList
	err := a.client.Get(a.context, "/token/list", nil, &tokenListResult)
	return tokenListResult.TokenInfos, err
}
func (a TokensAPI) Read(tokenID string) (TokenInfo, error) {
	var tokenInfo TokenInfo
	tokenList, err := a.List()
	if err != nil {
		return tokenInfo, err
	}
	for _, tokenInfoRecord := range tokenList {
		if tokenInfoRecord.TokenID == tokenID {
			return tokenInfoRecord, nil
		}
	}
	return tokenInfo, common.APIError{
		ErrorCode:  "NOT_FOUND",
		Message:    fmt.Sprintf("Unable to locate token: %s", tokenID),
		Resource:   "/api/2.0/token/list",
		StatusCode: http.StatusNotFound,
	}
}