{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-managed-prometheus/json-schema/amazon-managed-prometheus-update-workspace-configuration-request-schema.json",
  "title": "UpdateWorkspaceConfigurationRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-managed-prometheus-operations-api-openapi.yml#/components/schemas/UpdateWorkspaceConfigurationRequest",
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string",
      "description": "The ID of the workspace that you want to update. To find the IDs of your workspaces, use the ListWorkspaces operation."
    },
    "clientToken": {
      "type": "string",
      "description": "You can include a token in your operation to make it an idempotent opeartion."
    },
    "limitsPerLabelSet": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LimitsPerLabelSet"
      },
      "description": "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."
    },
    "retentionPeriodInDays": {
      "type": "integer",
      "description": "Specifies how many days that metrics will be retained in the workspace."
    },
    "outOfOrderTimeWindowInSeconds": {
      "type": "integer",
      "description": "Specifies the time window in seconds for accepting out of order samples. Out of order samples older than this window are rejected."
    },
    "ruleQueryOffsetInSeconds": {
      "type": "integer",
      "description": "Specifies the duration in seconds to offset rule evaluation queries into the past. This allows ingested samples to be available before rule evaluation."
    }
  },
  "required": [
    "workspaceId"
  ],
  "$defs": {
    "LimitsPerLabelSet": {
      "type": "object",
      "properties": {
        "limits": {
          "$ref": "#/$defs/LimitsPerLabelSetEntry"
        },
        "labelSet": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "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_:]*"
        }
      },
      "required": [
        "limits",
        "labelSet"
      ]
    },
    "LimitsPerLabelSetEntry": {
      "type": "object",
      "properties": {
        "maxSeries": {
          "type": "integer",
          "description": "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"
        }
      }
    }
  }
}