AgentOptimizationJobs.PromoteCandidateAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Promotes a candidate, recording the deployment timestamp and target agent version.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.PromoteCandidateResponse>> PromoteCandidateAsync(string jobId, string candidateId, Azure.AI.Projects.Agents.PromoteCandidateRequest candidateRequest, System.Threading.CancellationToken cancellationToken = default);
abstract member PromoteCandidateAsync : string * string * Azure.AI.Projects.Agents.PromoteCandidateRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.PromoteCandidateResponse>>
override this.PromoteCandidateAsync : string * string * Azure.AI.Projects.Agents.PromoteCandidateRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.PromoteCandidateResponse>>
Public Overridable Function PromoteCandidateAsync (jobId As String, candidateId As String, candidateRequest As PromoteCandidateRequest, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of PromoteCandidateResponse))
Parameters
- jobId
- String
The optimization job id.
- candidateId
- String
The candidate id to promote.
- candidateRequest
- PromoteCandidateRequest
Promotion details.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
Exceptions
jobId, candidateId or candidateRequest is null.
jobId or candidateId is an empty string, and was expected to be non-empty.
Service returned a non-success status code.