Language

AgentOptimizationJobs.CreateAsync Method

Definition

Overloads

Name Description
CreateAsync(Boolean, AgentOptimizationJob, String, CancellationToken)

Creates an optimization job and returns the queued job. Honors Operation-Id for idempotent retry. Clients poll the URL in Operation-Location by using the get operation.

CreateAsync(Boolean, BinaryContent, String, RequestOptions)

Creates an optimization job and returns the queued job. Honors Operation-Id for idempotent retry. Clients poll the URL in Operation-Location by using the get operation.

CreateAsync(Boolean, AgentOptimizationJob, String, CancellationToken)

Source:
AgentOptimizationJobs.cs
Source:
AgentOptimizationJobs.cs

Creates an optimization job and returns the queued job. Honors Operation-Id for idempotent retry. Clients poll the URL in Operation-Location by using the get operation.

public virtual System.Threading.Tasks.Task<System.ClientModel.Primitives.OperationResult> CreateAsync(bool waitUntilCompleted, Azure.AI.Projects.Agents.AgentOptimizationJob job, string operationId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateAsync : bool * Azure.AI.Projects.Agents.AgentOptimizationJob * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.Primitives.OperationResult>
override this.CreateAsync : bool * Azure.AI.Projects.Agents.AgentOptimizationJob * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.Primitives.OperationResult>
Public Overridable Function CreateAsync (waitUntilCompleted As Boolean, job As AgentOptimizationJob, Optional operationId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of OperationResult)

Parameters

waitUntilCompleted
Boolean

Whether the method should wait until the long-running operation has completed on the service.

job
AgentOptimizationJob

The job to create.

operationId
String

Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally.

cancellationToken
CancellationToken

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

Returns

Exceptions

Service returned a non-success status code.

job is null.

Applies to

CreateAsync(Boolean, BinaryContent, String, RequestOptions)

Source:
AgentOptimizationJobs.cs
Source:
AgentOptimizationJobs.cs

Creates an optimization job and returns the queued job. Honors Operation-Id for idempotent retry. Clients poll the URL in Operation-Location by using the get operation.

public virtual System.Threading.Tasks.Task<System.ClientModel.Primitives.OperationResult> CreateAsync(bool waitUntilCompleted, System.ClientModel.BinaryContent content, string operationId = default, System.ClientModel.Primitives.RequestOptions options = default);
abstract member CreateAsync : bool * System.ClientModel.BinaryContent * string * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.Primitives.OperationResult>
override this.CreateAsync : bool * System.ClientModel.BinaryContent * string * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.Primitives.OperationResult>
Public Overridable Function CreateAsync (waitUntilCompleted As Boolean, content As BinaryContent, Optional operationId As String = Nothing, Optional options As RequestOptions = Nothing) As Task(Of OperationResult)

Parameters

waitUntilCompleted
Boolean

Whether the method should wait until the long-running operation has completed on the service.

content
BinaryContent

The content to send as the body of the request.

operationId
String

Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally.

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

content is null.

Applies to