AgentOptimizationJobs.GetAsync(String, CancellationToken) Method

Definition

Get an optimization job by id. Returns 202 while in progress, 200 when terminal.

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

Parameters

jobId
String

The ID of the job.

cancellationToken
CancellationToken

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

Returns

Exceptions

jobId is null.

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

Service returned a non-success status code.

Applies to