PrometheusService / Client / create_workspace
create_workspace#
- PrometheusService.Client.create_workspace(**kwargs)#
Creates a Prometheus workspace. A workspace is a logical space dedicated to the storage and querying of Prometheus metrics. You can have one or more workspaces in each Region in your account.
See also: AWS API Documentation
Request Syntax
response = client.create_workspace( alias='string', clientToken='string', kmsKeyArn='string', tags={ 'string': 'string' } )
- Parameters:
alias (string) –
An alias that you assign to this workspace to help you identify it. It does not need to be unique.
Blank spaces at the beginning or end of the alias that you specify will be trimmed from the value used.
clientToken (string) –
A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
This field is autopopulated if not provided.
kmsKeyArn (string) – (optional) The ARN for a customer managed KMS key to use for encrypting data within your workspace. For more information about using your own key in your workspace, see Encryption at rest in the Amazon Managed Service for Prometheus User Guide.
tags (dict) –
The list of tag keys and values to associate with the workspace.
(string) –
The key of the tag. Must not begin with
aws:
.(string) –
The value of the tag.
- Return type:
dict
- Returns:
Response Syntax
{ 'arn': 'string', 'kmsKeyArn': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED' }, 'tags': { 'string': 'string' }, 'workspaceId': 'string' }
Response Structure
(dict) –
Represents the output of a
CreateWorkspace
operation.arn (string) –
The ARN for the new workspace.
kmsKeyArn (string) –
(optional) If the workspace was created with a customer managed KMS key, the ARN for the key used.
status (dict) –
The current status of the new workspace. Immediately after you create the workspace, the status is usually
CREATING
.statusCode (string) –
The current status of the workspace.
tags (dict) –
The list of tag keys and values that are associated with the workspace.
(string) –
The key of the tag. Must not begin with
aws:
.(string) –
The value of the tag.
workspaceId (string) –
The unique ID for the new workspace.
Exceptions
PrometheusService.Client.exceptions.ThrottlingException
PrometheusService.Client.exceptions.ConflictException
PrometheusService.Client.exceptions.ValidationException
PrometheusService.Client.exceptions.AccessDeniedException
PrometheusService.Client.exceptions.InternalServerException
PrometheusService.Client.exceptions.ServiceQuotaExceededException