Share via


EvaluationRules.CreateOrUpdateAsync Method

Definition

Overloads

Name Description
CreateOrUpdateAsync(String, EvaluationRule, CancellationToken)

Create or update an evaluation rule.

CreateOrUpdateAsync(String, BinaryContent, RequestOptions)

[Protocol Method] Create or update an evaluation rule.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.

CreateOrUpdateAsync(String, EvaluationRule, CancellationToken)

Source:
EvaluationRules.cs

Create or update an evaluation rule.

public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.EvaluationRule>> CreateOrUpdateAsync(string id, Azure.AI.Projects.EvaluationRule evaluationRule, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : string * Azure.AI.Projects.EvaluationRule * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.EvaluationRule>>
override this.CreateOrUpdateAsync : string * Azure.AI.Projects.EvaluationRule * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.EvaluationRule>>
Public Overridable Function CreateOrUpdateAsync (id As String, evaluationRule As EvaluationRule, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of EvaluationRule))

Parameters

id
String

Unique identifier for the evaluation rule.

evaluationRule
EvaluationRule

Evaluation rule resource.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

id or evaluationRule is null.

id is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

CreateOrUpdateAsync(String, BinaryContent, RequestOptions)

Source:
EvaluationRules.cs

[Protocol Method] Create or update an evaluation rule.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult> CreateOrUpdateAsync(string id, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = default);
abstract member CreateOrUpdateAsync : string * System.ClientModel.BinaryContent * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
override this.CreateOrUpdateAsync : string * System.ClientModel.BinaryContent * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
Public Overridable Function CreateOrUpdateAsync (id As String, content As BinaryContent, Optional options As RequestOptions = Nothing) As Task(Of ClientResult)

Parameters

id
String

Unique identifier for the evaluation rule.

content
BinaryContent

The content to send as the body of the request.

options
RequestOptions

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

id or content is null.

id is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to