Schema: Covering service accounts Core Kind (#62091)

* Adding service accounts schema

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Change metadata field

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Merging the two DTOs into one schema

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Eric dedup things

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Add optional to teams/created/updated

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Lower case the OrgId

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
This commit is contained in:
Gabriel MABILLE
2023-01-25 18:07:00 +01:00
committed by GitHub
parent 3c073b00ec
commit f99523048a
9 changed files with 377 additions and 17 deletions

View File

@@ -0,0 +1,38 @@
---
keywords:
- grafana
- schema
title: Serviceaccount kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
# Serviceaccount kind
## Maturity: merged
## Version: 0.0
## Properties
| Property | Type | Required | Description |
|-----------------|--------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `avatarUrl` | string | **Yes** | AvatarUrl is the service account's avatar URL. It allows the frontend to display a picture in front<br/>of the service account. |
| `id` | integer | **Yes** | ID is the unique identifier of the service account in the database. |
| `isDisabled` | boolean | **Yes** | IsDisabled indicates if the service account is disabled. |
| `login` | string | **Yes** | Login of the service account. |
| `name` | string | **Yes** | Name of the service account. |
| `orgId` | integer | **Yes** | OrgId is the ID of an organisation the service account belongs to. |
| `role` | string | **Yes** | OrgRole is a Grafana Organization Role which can be 'Viewer', 'Editor', 'Admin'. Possible values are: `Admin`, `Editor`, `Viewer`. |
| `tokens` | integer | **Yes** | Tokens is the number of active tokens for the service account.<br/>Tokens are used to authenticate the service account against Grafana. |
| `accessControl` | [object](#accesscontrol) | No | AccessControl metadata associated with a given resource. |
| `created` | integer | No | Created indicates when the service account was created. |
| `teams` | string[] | No | Teams is a list of teams the service account belongs to. |
| `updated` | integer | No | Updated indicates when the service account was updated. |
## accessControl
AccessControl metadata associated with a given resource.
| Property | Type | Required | Description |
|----------|------|----------|-------------|