ManagedGrafana / Client / create_workspace_service_account
create_workspace_service_account#
- ManagedGrafana.Client.create_workspace_service_account(**kwargs)#
Creates a service account for the workspace. A service account can be used to call Grafana HTTP APIs, and run automated workloads. After creating the service account with the correct
GrafanaRole
for your use case, useCreateWorkspaceServiceAccountToken
to create a token that can be used to authenticate and authorize Grafana HTTP API calls.You can only create service accounts for workspaces that are compatible with Grafana version 9 and above.
Note
For more information about service accounts, see Service accounts in the Amazon Managed Grafana User Guide.
For more information about the Grafana HTTP APIs, see Using Grafana HTTP APIs in the Amazon Managed Grafana User Guide.
See also: AWS API Documentation
Request Syntax
response = client.create_workspace_service_account( grafanaRole='ADMIN'|'EDITOR'|'VIEWER', name='string', workspaceId='string' )
- Parameters:
grafanaRole (string) –
[REQUIRED]
The permission level to use for this service account.
Note
For more information about the roles and the permissions each has, see User roles in the Amazon Managed Grafana User Guide.
name (string) –
[REQUIRED]
A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account.
workspaceId (string) –
[REQUIRED]
The ID of the workspace within which to create the service account.
- Return type:
dict
- Returns:
Response Syntax
{ 'grafanaRole': 'ADMIN'|'EDITOR'|'VIEWER', 'id': 'string', 'name': 'string', 'workspaceId': 'string' }
Response Structure
(dict) –
grafanaRole (string) –
The permission level given to the service account.
id (string) –
The ID of the service account.
name (string) –
The name of the service account.
workspaceId (string) –
The workspace with which the service account is associated.
Exceptions