AgentOptimizationJobs.Create 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.
Overloads
| Name | Description |
|---|---|
| Create(Boolean, AgentOptimizationJob, String, CancellationToken) |
Creates an optimization job and returns the queued job. Honors |
| Create(Boolean, BinaryContent, String, RequestOptions) |
Creates an optimization job and returns the queued job. Honors |
Create(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.ClientModel.Primitives.OperationResult Create(bool waitUntilCompleted, Azure.AI.Projects.Agents.AgentOptimizationJob job, string operationId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Create : bool * Azure.AI.Projects.Agents.AgentOptimizationJob * string * System.Threading.CancellationToken -> System.ClientModel.Primitives.OperationResult
override this.Create : bool * Azure.AI.Projects.Agents.AgentOptimizationJob * string * System.Threading.CancellationToken -> System.ClientModel.Primitives.OperationResult
Public Overridable Function Create (waitUntilCompleted As Boolean, job As AgentOptimizationJob, Optional operationId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As OperationResult
Parameters
- waitUntilCompleted
- Boolean
Whether the method should wait until the long-running operation has completed on the service.
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
Create(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.ClientModel.Primitives.OperationResult Create(bool waitUntilCompleted, System.ClientModel.BinaryContent content, string operationId = default, System.ClientModel.Primitives.RequestOptions options = default);
abstract member Create : bool * System.ClientModel.BinaryContent * string * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.Primitives.OperationResult
override this.Create : bool * System.ClientModel.BinaryContent * string * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.Primitives.OperationResult
Public Overridable Function Create (waitUntilCompleted As Boolean, content As BinaryContent, Optional operationId As String = Nothing, Optional options As RequestOptions = Nothing) As 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.