AIProjectRoutines.CreateOrUpdateRoutine Method

Definition

Create or update a routine.

public virtual System.ClientModel.ClientResult<Azure.AI.Projects.ProjectsRoutine> CreateOrUpdateRoutine(string routineName, System.Collections.Generic.IDictionary<string,Azure.AI.Projects.RoutineTrigger> triggers, Azure.AI.Projects.RoutineAction action, string description = default, bool? enabled = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateRoutine : string * System.Collections.Generic.IDictionary<string, Azure.AI.Projects.RoutineTrigger> * Azure.AI.Projects.RoutineAction * string * Nullable<bool> * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.ProjectsRoutine>
override this.CreateOrUpdateRoutine : string * System.Collections.Generic.IDictionary<string, Azure.AI.Projects.RoutineTrigger> * Azure.AI.Projects.RoutineAction * string * Nullable<bool> * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.ProjectsRoutine>
Public Overridable Function CreateOrUpdateRoutine (routineName As String, triggers As IDictionary(Of String, RoutineTrigger), action As RoutineAction, Optional description As String = Nothing, Optional enabled As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ClientResult(Of ProjectsRoutine)

Parameters

routineName
String

The unique name of the routine.

triggers
IDictionary<String,RoutineTrigger>

The triggers configured for the routine. In v1, exactly one trigger entry is supported.

action
RoutineAction

The action executed when the routine fires.

description
String

A human-readable description of the routine.

enabled
Nullable<Boolean>

Whether the routine is enabled.

cancellationToken
CancellationToken

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

Returns

Exceptions

routineName, triggers or action is null.

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

Service returned a non-success status code.

Applies to