CodeConfiguration Class

  • java.lang.Object
    • com.azure.ai.agents.models.CodeConfiguration

Implements

public final class CodeConfiguration
implements JsonSerializable<CodeConfiguration>

Code-based deployment configuration for a hosted agent.

Constructor Summary

Constructor Description
CodeConfiguration(String runtime, List<String> entryPoint, CodeDependencyResolution dependencyResolution)

Creates an instance of CodeConfiguration class.

Method Summary

Modifier and Type Method and Description
static CodeConfiguration fromJson(JsonReader jsonReader)

Reads an instance of CodeConfiguration from the JsonReader.

String getContentSha256()

Get the contentSha256 property: The SHA-256 hex digest of the uploaded code zip.

CodeDependencyResolution getDependencyResolution()

Get the dependencyResolution property: How package dependencies are resolved at deployment time.

List<String> getEntryPoint()

Get the entryPoint property: The entry point command and arguments for the code execution.

String getRuntime()

Get the runtime property: The runtime identifier for code execution (e.g., 'python_3_11', 'python_3_12', 'python_3_13').

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

CodeConfiguration

public CodeConfiguration(String runtime, List<String> entryPoint, CodeDependencyResolution dependencyResolution)

Creates an instance of CodeConfiguration class.

Parameters:

runtime - the runtime value to set.
entryPoint - the entryPoint value to set.
dependencyResolution - the dependencyResolution value to set.

Method Details

fromJson

public static CodeConfiguration fromJson(JsonReader jsonReader)

Reads an instance of CodeConfiguration from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CodeConfiguration if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getContentSha256

public String getContentSha256()

Get the contentSha256 property: The SHA-256 hex digest of the uploaded code zip. Set by the service from the `x-ms-code-zip-sha256` request header; read-only in responses and never accepted in request payloads.

Returns:

the contentSha256 value.

getDependencyResolution

public CodeDependencyResolution getDependencyResolution()

Get the dependencyResolution property: How package dependencies are resolved at deployment time. Defaults to `bundled`, where the caller bundles all dependencies into the uploaded zip and the service performs no remote build. `remote_build` instructs the service to build dependencies remotely from the manifest included in the uploaded zip.

Returns:

the dependencyResolution value.

getEntryPoint

public List<String> getEntryPoint()

Get the entryPoint property: The entry point command and arguments for the code execution.

Returns:

the entryPoint value.

getRuntime

public String getRuntime()

Get the runtime property: The runtime identifier for code execution (e.g., 'python_3_11', 'python_3_12', 'python_3_13').

Returns:

the runtime value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to