2026/06/10 - Amazon Prometheus Service - 2 updated api methods
Changes Adds supports for out-of-order sample ingestion (default 1-minute window) and a configurable rule query offset to reduce data loss and improve alerting accuracy.
{'workspaceConfiguration': {'outOfOrderTimeWindowInSeconds': 'integer',
'ruleQueryOffsetInSeconds': 'integer'}}
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': {
'status': {
'statusCode': 'ACTIVE'|'UPDATING'|'UPDATE_FAILED',
'statusReason': 'string'
},
'limitsPerLabelSet': [
{
'limits': {
'maxSeries': 123
},
'labelSet': {
'string': 'string'
}
},
],
'retentionPeriodInDays': 123,
'outOfOrderTimeWindowInSeconds': 123,
'ruleQueryOffsetInSeconds': 123
}
}
Response Structure
(dict) --
workspaceConfiguration (dict) --
This structure contains the information about the workspace configuration.
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.
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 active time series 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 limits and to monitor usage by specific label groups. Example label sets might be team:finance or env:prod
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
labelSet (dict) --
This defines one label set that will have an enforced active time series 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) --
retentionPeriodInDays (integer) --
This field displays how many days that metrics are retained in the workspace.
outOfOrderTimeWindowInSeconds (integer) --
This field displays the out of order time window in seconds for accepting out of order samples.
ruleQueryOffsetInSeconds (integer) --
This field displays the duration in seconds that rule evaluation queries are offset into the past.
{'outOfOrderTimeWindowInSeconds': 'integer',
'ruleQueryOffsetInSeconds': 'integer'}
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(
workspaceId='string',
clientToken='string',
limitsPerLabelSet=[
{
'limits': {
'maxSeries': 123
},
'labelSet': {
'string': 'string'
}
},
],
retentionPeriodInDays=123,
outOfOrderTimeWindowInSeconds=123,
ruleQueryOffsetInSeconds=123
)
string
[REQUIRED]
The ID of the workspace that you want to update. To find the IDs of your workspaces, use the ListWorkspaces operation.
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 active time series limit 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 active time series 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 limits and to monitor usage by specific label groups. Example label sets might be team:finance or env:prod
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
labelSet (dict) -- [REQUIRED]
This defines one label set that will have an enforced active time series 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) --
integer
Specifies how many days that metrics will be retained in the workspace.
integer
Specifies the time window in seconds for accepting out of order samples. Out of order samples older than this window are rejected.
integer
Specifies the duration in seconds to offset rule evaluation queries into the past. This allows ingested samples to be available before rule evaluation.
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.