AgentAdministrationClient.CreateAgentVersionFromCode Method

Definition

CreateAgentVersionFromCode

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ProjectsAgentVersion> CreateAgentVersionFromCode(string agentName, string filePath, string contentType, string foundryFeatures = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateAgentVersionFromCode : string * string * string * string * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ProjectsAgentVersion>
override this.CreateAgentVersionFromCode : string * string * string * string * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ProjectsAgentVersion>
Public Overridable Function CreateAgentVersionFromCode (agentName As String, filePath As String, contentType As String, Optional foundryFeatures As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ClientResult(Of ProjectsAgentVersion)

Parameters

agentName
String

The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.

  • Must start and end with alphanumeric characters,
  • Can contain hyphens in the middle
  • Must not exceed 63 characters.
filePath
String

The path to the entry point file.

contentType
String

The contentType to use which has the multipart/form-data boundary.

foundryFeatures
String

A feature flag opt-in required when using preview operations or modifying persisted preview resources.

cancellationToken
CancellationToken

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

Returns

The response returned from the service.

Exceptions

agentName, filePath or is null.

agentName or filePath is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to