Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles platform token resources via the Account Management API.
func NewHandler ¶
func NewHandler(c *httpclient.Client, accountUUID string) *Handler
NewHandler creates a new platform token handler.
func (*Handler) Create ¶
func (h *Handler) Create(ctx context.Context, req PlatformTokenCreate) (*PlatformToken, error)
Create creates a new platform token.
type PlatformToken ¶
type PlatformToken struct {
Name string `json:"name"`
TokenID string `json:"tokenId"`
Token string `json:"token,omitempty"` // secret, returned only on create
AccountUUID string `json:"accountUuid,omitempty"`
Scope []string `json:"scope"`
Resource []string `json:"resource,omitempty"`
Status string `json:"status,omitempty"`
ExpirationDate string `json:"expirationDate,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
Owner string `json:"owner,omitempty"`
}
PlatformToken represents a Dynatrace platform token.
type PlatformTokenCreate ¶
type PlatformTokenCreate struct {
Name string `json:"name"`
UserUUID string `json:"userUuid"`
Scope []string `json:"scope"`
Resource []string `json:"resource,omitempty"`
Tags []string `json:"tags,omitempty"`
ExpirationDate string `json:"expirationDate"`
}
PlatformTokenCreate is the request body for creating a platform token.
type PlatformTokenListResponse ¶
type PlatformTokenListResponse struct {
Total int `json:"total"`
PageSize int `json:"pageSize"`
PageNumber int `json:"pageNumber"`
Results []PlatformToken `json:"results"`
}
PlatformTokenListResponse wraps the list API page response.