Language

AgentOptimizationJobCandidates.PromoteCandidateAsync Method

Definition

Overloads

Name Description
PromoteCandidateAsync(String, String, RequestOptions)

[Protocol Method] Promotes a candidate to the Foundry agent stored in the parent job's target configuration. Promotion is unavailable when the job omitted target_configuration. Prompt-agent promotion creates a new agent version. Hosted-agent promotion currently records promotion metadata without deploying a new hosted-agent version.

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

Promotes a candidate to the Foundry agent stored in the parent job's target configuration. Promotion is unavailable when the job omitted target_configuration. Prompt-agent promotion creates a new agent version. Hosted-agent promotion currently records promotion metadata without deploying a new hosted-agent version.

PromoteCandidateAsync(String, String, RequestOptions)

Source:
AgentOptimizationJobCandidates.cs

[Protocol Method] Promotes a candidate to the Foundry agent stored in the parent job's target configuration. Promotion is unavailable when the job omitted target_configuration. Prompt-agent promotion creates a new agent version. Hosted-agent promotion currently records promotion metadata without deploying a new hosted-agent version.

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

Parameters

jobId
String

The ID of the parent optimization job.

candidateId
String

The candidate identifier.

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 or candidateId is null.

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

Service returned a non-success status code.

Applies to

PromoteCandidateAsync(String, String, CancellationToken)

Source:
AgentOptimizationJobCandidates.cs

Promotes a candidate to the Foundry agent stored in the parent job's target configuration. Promotion is unavailable when the job omitted target_configuration. Prompt-agent promotion creates a new agent version. Hosted-agent promotion currently records promotion metadata without deploying a new hosted-agent version.

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

Parameters

jobId
String

The ID of the parent optimization job.

candidateId
String

The candidate identifier.

cancellationToken
CancellationToken

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

Returns

Exceptions

jobId or candidateId is null.

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

Service returned a non-success status code.

Applies to