{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-managed-prometheus/json-schema/amazon-managed-prometheus-update-query-logging-configuration-request-schema.json",
  "title": "UpdateQueryLoggingConfigurationRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-managed-prometheus-logging-api-openapi.yml#/components/schemas/UpdateQueryLoggingConfigurationRequest",
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string",
      "description": "The ID of the workspace for which to update the query logging configuration."
    },
    "destinations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LoggingDestination"
      },
      "description": "The destinations where query logs will be sent. Only CloudWatch Logs destination is supported. The list must contain exactly one element."
    },
    "clientToken": {
      "type": "string",
      "description": "(Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request."
    }
  },
  "required": [
    "workspaceId",
    "destinations"
  ],
  "$defs": {
    "CloudWatchLogDestination": {
      "type": "object",
      "properties": {
        "logGroupArn": {
          "type": "string",
          "description": "The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist prior to calling this operation."
        }
      },
      "required": [
        "logGroupArn"
      ]
    },
    "LoggingDestination": {
      "type": "object",
      "properties": {
        "cloudWatchLogs": {
          "$ref": "#/$defs/CloudWatchLogDestination"
        },
        "filters": {
          "$ref": "#/$defs/LoggingFilter"
        }
      },
      "required": [
        "cloudWatchLogs",
        "filters"
      ]
    },
    "LoggingFilter": {
      "type": "object",
      "properties": {
        "qspThreshold": {
          "type": "integer",
          "description": "The Query Samples Processed (QSP) threshold above which queries will be logged. Queries processing more samples than this threshold will be captured in logs."
        }
      },
      "required": [
        "qspThreshold"
      ]
    }
  }
}