{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-update-online-evaluation-config-request-schema.json",
  "title": "UpdateOnlineEvaluationConfigRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-online-evaluation-configs-api-openapi.yml#/components/schemas/UpdateOnlineEvaluationConfigRequest",
  "type": "object",
  "properties": {
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency."
    },
    "onlineEvaluationConfigId": {
      "type": "string",
      "description": "The unique identifier of the online evaluation configuration to update."
    },
    "description": {
      "type": "string",
      "description": "The updated description of the online evaluation configuration."
    },
    "rule": {
      "$ref": "#/$defs/Rule"
    },
    "dataSourceConfig": {
      "$ref": "#/$defs/BedrockAgentcoreControlDataSourceConfig"
    },
    "evaluators": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EvaluatorReference"
      },
      "description": "The updated list of evaluators to apply during online evaluation."
    },
    "insights": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Insight"
      },
      "description": "The updated list of insight types to run against agent sessions."
    },
    "clusteringConfig": {
      "$ref": "#/$defs/ClusteringConfig"
    },
    "outputConfig": {
      "$ref": "#/$defs/BedrockAgentcoreControlOutputConfig"
    },
    "evaluationExecutionRoleArn": {
      "type": "string",
      "description": "The updated Amazon Resource Name (ARN) of the IAM role used for evaluation execution."
    },
    "executionStatus": {
      "type": "string",
      "enum": [
        "ENABLED",
        "DISABLED"
      ],
      "description": "The updated execution status to enable or disable the online evaluation."
    }
  },
  "required": [
    "onlineEvaluationConfigId"
  ],
  "$defs": {
    "BedrockAgentcoreControlCloudWatchOutputConfig": {
      "type": "object",
      "properties": {
        "logGroupName": {
          "type": "string",
          "description": "The name of the CloudWatch log group where evaluation results will be written. An existing log group is used as-is; otherwise the service creates it, which requires the evaluation execution role to grant logs:CreateLogGroup on the log group. Don't specify this value when resultDestination is SOURCE_LOG_GROUP. The name can't be under the service-reserved /aws/bedrock-agentcore/evaluations/ namespace, apart from this configuration's own service-managed default group."
        },
        "metricsNamespace": {
          "type": "string",
          "description": "The CloudWatch metrics namespace where evaluation result metrics are published. If you omit this value, the service publishes metrics to Bedrock-AgentCore/Evaluations. This value can't begin with AWS/."
        },
        "resultDestination": {
          "type": "string",
          "enum": [
            "DEDICATED_LOG_GROUP",
            "SOURCE_LOG_GROUP"
          ],
          "description": "The destination where evaluation results are written. Valid values: DEDICATED_LOG_GROUP (default) – Writes results to a dedicated result log group. SOURCE_LOG_GROUP – Writes results back to the log group that the agent traces were read from. If you use this value, don't specify logGroupName."
        }
      }
    },
    "BedrockAgentcoreControlDataSourceConfig": {
      "type": "object",
      "properties": {
        "cloudWatchLogs": {
          "$ref": "#/$defs/CloudWatchLogsInputConfig"
        }
      },
      "description": "Exactly one member is set."
    },
    "BedrockAgentcoreControlFilterValue": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "The string value for text-based filtering."
        },
        "doubleValue": {
          "type": "number",
          "description": "The numeric value for numerical filtering and comparisons."
        },
        "booleanValue": {
          "type": "boolean",
          "description": "The boolean value for true/false filtering conditions."
        }
      },
      "description": "Exactly one member is set."
    },
    "BedrockAgentcoreControlOutputConfig": {
      "type": "object",
      "properties": {
        "cloudWatchConfig": {
          "$ref": "#/$defs/BedrockAgentcoreControlCloudWatchOutputConfig"
        }
      },
      "required": [
        "cloudWatchConfig"
      ]
    },
    "CloudWatchLogsInputConfig": {
      "type": "object",
      "properties": {
        "logGroupNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of CloudWatch log group names to monitor for agent traces."
        },
        "logGroupNamePrefixes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of CloudWatch log group name prefixes to monitor for agent traces. Specify this instead of logGroupNames to match log groups by prefix. Specify either logGroupNames or logGroupNamePrefixes, not both. One of the two is required."
        },
        "serviceNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of service names to filter traces within the specified log groups. Used to identify relevant agent sessions."
        }
      },
      "required": [
        "serviceNames"
      ]
    },
    "ClusteringConfig": {
      "type": "object",
      "properties": {
        "frequencies": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "DAILY",
              "WEEKLY",
              "MONTHLY"
            ]
          },
          "description": "The list of frequencies at which clustering batch evaluations are triggered."
        }
      },
      "required": [
        "frequencies"
      ]
    },
    "EvaluatorReference": {
      "type": "object",
      "properties": {
        "evaluatorId": {
          "type": "string",
          "description": "The unique identifier of the evaluator. Can reference builtin evaluators (e.g., Builtin.Helpfulness) or custom evaluators."
        }
      },
      "description": "Exactly one member is set."
    },
    "Filter": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key or field name to filter on within the agent trace data."
        },
        "operator": {
          "type": "string",
          "enum": [
            "Equals",
            "NotEquals",
            "GreaterThan",
            "LessThan",
            "GreaterThanOrEqual",
            "LessThanOrEqual",
            "Contains",
            "NotContains"
          ],
          "description": "The comparison operator to use for filtering."
        },
        "value": {
          "$ref": "#/$defs/BedrockAgentcoreControlFilterValue"
        }
      },
      "required": [
        "key",
        "operator",
        "value"
      ]
    },
    "Insight": {
      "type": "object",
      "properties": {
        "insightId": {
          "type": "string",
          "description": "The unique identifier of the insight to run."
        }
      },
      "required": [
        "insightId"
      ]
    },
    "Rule": {
      "type": "object",
      "properties": {
        "samplingConfig": {
          "$ref": "#/$defs/SamplingConfig"
        },
        "filters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Filter"
          },
          "description": "The list of filters that determine which agent traces should be included in the evaluation based on trace properties."
        },
        "sessionConfig": {
          "$ref": "#/$defs/SessionConfig"
        }
      },
      "required": [
        "samplingConfig"
      ]
    },
    "SamplingConfig": {
      "type": "object",
      "properties": {
        "samplingPercentage": {
          "type": "number",
          "description": "The percentage of agent traces to sample for evaluation, ranging from 0.01% to 100%."
        }
      },
      "required": [
        "samplingPercentage"
      ]
    },
    "SessionConfig": {
      "type": "object",
      "properties": {
        "sessionTimeoutMinutes": {
          "type": "integer",
          "description": "The number of minutes of inactivity after which an agent session is considered complete and ready for evaluation. Default is 15 minutes."
        }
      },
      "required": [
        "sessionTimeoutMinutes"
      ]
    }
  }
}