跳至主要内容

此浏览器不再受支持。

请升级到 Microsoft Edge 以使用最新的功能、安全更新和技术支持。

下载 Microsoft Edge 有关 Internet Explorer 和 Microsoft Edge 的详细信息
microsoft-foundry.rest.security.o-auth2-auth

Evaluation Rules

Create or update an evaluation rule

PUT /evaluationrules/{id}

Creates a new evaluation rule, or replaces the existing rule when the identifier matches.

查询参数

api-version string 必需

The API version to use for this operation.

路径参数

id string 必需

Unique identifier for the evaluation rule.

标头参数

Foundry-Features enum

A feature flag opt-in required when using preview operations or modifying persisted preview resources.

Evaluations=V1Preview

请求正文

Evaluation rule resource

Content-Type: application/json
id string 必需

Unique identifier for the evaluation rule.

displayName string

Display Name for the evaluation rule.

description string

Description for the evaluation rule.

action continuousEvaluation | humanEvaluationPreview 必需

Evaluation action model.

下列类型作之一:
continuousEvaluation ContinuousEvaluationRuleAction

Evaluation rule action for continuous evaluation.

type enum 必需
continuousEvaluation
evalId string 必需

Eval Id to add continuous evaluation runs to.

maxHourlyRuns integer

Maximum number of evaluation runs allowed per hour.

samplingRate number

Percentage (0-100] chance that a matching event triggers an evaluation. When omitted, the service-default is to evaluate every event, which is equivalent to setting a sampling rate of 100.

humanEvaluationPreview HumanEvaluationPreviewRuleAction

Evaluation rule action for human evaluation.

type enum 必需
humanEvaluationPreview
templateId string 必需

Identifier of a saved asset.

filter EvaluationRuleFilter

Evaluation filter model.

agentName string 必需

Filter by agent name.

eventType string | enum 必需

Type of the evaluation rule event.

以下任何项:
string
enum
responseCompletedmanual
enabled boolean 必需

Indicates whether the evaluation rule is enabled. Default is true.

systemData object 必需

System metadata for the evaluation rule.

[key: string] string

响应

The request has succeeded.

正文

Content-Type: application/json
id string 必需

Unique identifier for the evaluation rule.

displayName string

Display Name for the evaluation rule.

description string

Description for the evaluation rule.

action continuousEvaluation | humanEvaluationPreview 必需

Evaluation action model.

下列类型作之一:
continuousEvaluation ContinuousEvaluationRuleAction

Evaluation rule action for continuous evaluation.

type enum 必需
continuousEvaluation
evalId string 必需

Eval Id to add continuous evaluation runs to.

maxHourlyRuns integer

Maximum number of evaluation runs allowed per hour.

samplingRate number

Percentage (0-100] chance that a matching event triggers an evaluation. When omitted, the service-default is to evaluate every event, which is equivalent to setting a sampling rate of 100.

humanEvaluationPreview HumanEvaluationPreviewRuleAction

Evaluation rule action for human evaluation.

type enum 必需
humanEvaluationPreview
templateId string 必需

Identifier of a saved asset.

filter EvaluationRuleFilter

Evaluation filter model.

agentName string 必需

Filter by agent name.

eventType string | enum 必需

Type of the evaluation rule event.

以下任何项:
string
enum
responseCompletedmanual
enabled boolean 必需

Indicates whether the evaluation rule is enabled. Default is true.

systemData object 必需

System metadata for the evaluation rule.

[key: string] string

The request has succeeded and a new resource has been created as a result.

正文

Content-Type: application/json
id string 必需

Unique identifier for the evaluation rule.

displayName string

Display Name for the evaluation rule.

description string

Description for the evaluation rule.

action continuousEvaluation | humanEvaluationPreview 必需

Evaluation action model.

下列类型作之一:
continuousEvaluation ContinuousEvaluationRuleAction

Evaluation rule action for continuous evaluation.

type enum 必需
continuousEvaluation
evalId string 必需

Eval Id to add continuous evaluation runs to.

maxHourlyRuns integer

Maximum number of evaluation runs allowed per hour.

samplingRate number

Percentage (0-100] chance that a matching event triggers an evaluation. When omitted, the service-default is to evaluate every event, which is equivalent to setting a sampling rate of 100.

humanEvaluationPreview HumanEvaluationPreviewRuleAction

Evaluation rule action for human evaluation.

type enum 必需
humanEvaluationPreview
templateId string 必需

Identifier of a saved asset.

filter EvaluationRuleFilter

Evaluation filter model.

agentName string 必需

Filter by agent name.

eventType string | enum 必需

Type of the evaluation rule event.

以下任何项:
string
enum
responseCompletedmanual
enabled boolean 必需

Indicates whether the evaluation rule is enabled. Default is true.

systemData object 必需

System metadata for the evaluation rule.

[key: string] string

Client error

标头

x-ms-error-code string

String error code indicating what went wrong.

正文

Content-Type: application/json
error Azure.Core.Foundations.Error 必需

The error object.

code string 必需

One of a server-defined set of error codes.

message string 必需

A human-readable representation of the error.

target string

The target of the error.

details Azure.Core.Foundations.Error[]

An array of details about specific errors that led to this reported error.

innererror Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.

code string

One of a server-defined set of error codes.

innererror Azure.Core.Foundations.InnerError

Server error

标头

x-ms-error-code string

String error code indicating what went wrong.

正文

Content-Type: application/json
error Azure.Core.Foundations.Error 必需

The error object.

code string 必需

One of a server-defined set of error codes.

message string 必需

A human-readable representation of the error.

target string

The target of the error.

details Azure.Core.Foundations.Error[]

An array of details about specific errors that led to this reported error.

innererror Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.

code string

One of a server-defined set of error codes.

innererror Azure.Core.Foundations.InnerError

请求

PUT /evaluationrules/{id} HTTP/1.1

响应

Status: 200
Content-Type: application/json
Status: 201
Content-Type: application/json
Status: 4XX
Content-Type: application/json
Status: 5XX
Content-Type: application/json
zh-cn
你的隐私选择
  • AI 免责声明
  • 早期版本
  • 博客
  • 参与
  • 隐私
  • 消费者健康隐私
  • 使用条款
  • 商标
  • © Microsoft 2026