Language

AgentOptimizationJobs.GetAsync Method

Definition

Overloads

Name Description
GetAsync(String, RequestOptions)

[Protocol Method] Retrieves an optimization job by its identifier.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetAsync(String, CancellationToken)

Retrieves an optimization job by its identifier.

GetAsync(String, RequestOptions)

Source:
AgentOptimizationJobs.cs
Source:
AgentOptimizationJobs.cs

[Protocol Method] Retrieves an optimization job by its identifier.

  • 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> GetAsync(string jobId, System.ClientModel.Primitives.RequestOptions options);
abstract member GetAsync : string * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
override this.GetAsync : string * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
Public Overridable Function GetAsync (jobId As String, options As RequestOptions) As Task(Of ClientResult)

Parameters

jobId
String

The ID of the job.

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

jobId is null.

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

Service returned a non-success status code.

Applies to

GetAsync(String, CancellationToken)

Source:
AgentOptimizationJobs.cs
Source:
AgentOptimizationJobs.cs

Retrieves an optimization job by its identifier.

public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.AgentOptimizationJob>> 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.AgentOptimizationJob>>
override this.GetAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.AgentOptimizationJob>>
Public Overridable Function GetAsync (jobId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of AgentOptimizationJob))

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