2025/04/17 - Amazon Prometheus Service - 2 new api methods
Changes Add Workspace Configuration APIs for Amazon Prometheus
Use this operation to return information about the configuration of a workspace. The configuration details returned include workspace configuration status, label set limits, and retention period.
See also: AWS API Documentation
Request Syntax
client.describe_workspace_configuration( workspaceId='string' )
string
[REQUIRED]
The ID of the workspace that you want to retrieve information for. To find the IDs of your workspaces, use the ListWorkspaces operation.
dict
Response Syntax
{ 'workspaceConfiguration': { 'limitsPerLabelSet': [ { 'labelSet': { 'string': 'string' }, 'limits': { 'maxSeries': 123 } }, ], 'retentionPeriodInDays': 123, 'status': { 'statusCode': 'ACTIVE'|'UPDATING'|'UPDATE_FAILED', 'statusReason': 'string' } } }
Response Structure
(dict) --
workspaceConfiguration (dict) --
This structure contains the information about the workspace configuration.
limitsPerLabelSet (list) --
This is an array of structures, where each structure displays one label sets for the workspace and the limits for that label set.
(dict) --
This structure defines one label set used to enforce ingestion limits for the workspace, and defines the limit for that label set.
A label set is a unique combination of label-value pairs. Use them to control time series ingestion limits and to monitor usage by specific label groups. Example label sets might be team:finance or env:prod
labelSet (dict) --
This defines one label set that will have an enforced ingestion limit.
Label values accept ASCII characters and must contain at least one character that isn't whitespace. ASCII control characters are not accepted. If the label name is metric name label __name__, then the metric part of the name must conform to the following pattern: [a-zA-Z_:][a-zA-Z0-9_:]*
(string) --
(string) --
limits (dict) --
This structure contains the information about the limits that apply to time series that match this label set.
maxSeries (integer) --
The maximum number of active series that can be ingested that match this label set.
Setting this to 0 causes no label set limit to be enforced, but it does cause Amazon Managed Service for Prometheus to vend label set metrics to CloudWatch
retentionPeriodInDays (integer) --
This field displays how many days that metrics are retained in the workspace.
status (dict) --
This structure displays the current status of the workspace configuration, and might also contain a reason for that status.
statusCode (string) --
The current status of the workspace configuration.
statusReason (string) --
The reason for the current status, if a reason is available.
Use this operation to create or update the label sets, label set limits, and retention period of a workspace.
You must specify at least one of limitsPerLabelSet or retentionPeriodInDays for the request to be valid.
See also: AWS API Documentation
Request Syntax
client.update_workspace_configuration( clientToken='string', limitsPerLabelSet=[ { 'labelSet': { 'string': 'string' }, 'limits': { 'maxSeries': 123 } }, ], retentionPeriodInDays=123, workspaceId='string' )
string
You can include a token in your operation to make it an idempotent opeartion.
This field is autopopulated if not provided.
list
This is an array of structures, where each structure defines a label set for the workspace, and defines the ingestion limit for active time series for each of those label sets. Each label name in a label set must be unique.
(dict) --
This structure defines one label set used to enforce ingestion limits for the workspace, and defines the limit for that label set.
A label set is a unique combination of label-value pairs. Use them to control time series ingestion limits and to monitor usage by specific label groups. Example label sets might be team:finance or env:prod
labelSet (dict) -- [REQUIRED]
This defines one label set that will have an enforced ingestion limit.
Label values accept ASCII characters and must contain at least one character that isn't whitespace. ASCII control characters are not accepted. If the label name is metric name label __name__, then the metric part of the name must conform to the following pattern: [a-zA-Z_:][a-zA-Z0-9_:]*
(string) --
(string) --
limits (dict) -- [REQUIRED]
This structure contains the information about the limits that apply to time series that match this label set.
maxSeries (integer) --
The maximum number of active series that can be ingested that match this label set.
Setting this to 0 causes no label set limit to be enforced, but it does cause Amazon Managed Service for Prometheus to vend label set metrics to CloudWatch
integer
Specifies how many days that metrics will be retained in the workspace.
string
[REQUIRED]
The ID of the workspace that you want to update. To find the IDs of your workspaces, use the ListWorkspaces operation.
dict
Response Syntax
{ 'status': { 'statusCode': 'ACTIVE'|'UPDATING'|'UPDATE_FAILED', 'statusReason': 'string' } }
Response Structure
(dict) --
status (dict) --
The status of the workspace configuration.
statusCode (string) --
The current status of the workspace configuration.
statusReason (string) --
The reason for the current status, if a reason is available.