Share via


Deployments.GetDeployments Method

Definition

Overloads

GetDeployments(String, String, Nullable<DeploymentType>, CancellationToken)

List all deployed models in the project.

GetDeployments(String, String, String, RequestContext)

[Protocol Method] List all deployed models in the project

GetDeployments(String, String, Nullable<DeploymentType>, CancellationToken)

Source:
Deployments.cs

List all deployed models in the project.

public virtual Azure.Pageable<Azure.AI.Projects.AIDeployment> GetDeployments(string modelPublisher = default, string modelName = default, Azure.AI.Projects.DeploymentType? deploymentType = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetDeployments : string * string * Nullable<Azure.AI.Projects.DeploymentType> * System.Threading.CancellationToken -> Azure.Pageable<Azure.AI.Projects.AIDeployment>
override this.GetDeployments : string * string * Nullable<Azure.AI.Projects.DeploymentType> * System.Threading.CancellationToken -> Azure.Pageable<Azure.AI.Projects.AIDeployment>
Public Overridable Function GetDeployments (Optional modelPublisher As String = Nothing, Optional modelName As String = Nothing, Optional deploymentType As Nullable(Of DeploymentType) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of AIDeployment)

Parameters

modelPublisher
String

Model publisher to filter models by.

modelName
String

Model name (the publisher specific name) to filter models by.

deploymentType
Nullable<DeploymentType>

Type of deployment to filter list by.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call GetDeployments.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview");

foreach (Deployment item in client.GetDeployments())
{
}

Applies to

GetDeployments(String, String, String, RequestContext)

Source:
Deployments.cs

[Protocol Method] List all deployed models in the project

public virtual Azure.Pageable<BinaryData> GetDeployments(string modelPublisher, string modelName, string deploymentType, Azure.RequestContext context);
abstract member GetDeployments : string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetDeployments : string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetDeployments (modelPublisher As String, modelName As String, deploymentType As String, context As RequestContext) As Pageable(Of BinaryData)

Parameters

modelPublisher
String

Model publisher to filter models by.

modelName
String

Model name (the publisher specific name) to filter models by.

deploymentType
String

Type of deployment to filter list by. Allowed values: "ModelDeployment".

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The Pageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.

Exceptions

Service returned a non-success status code.

Examples

This sample shows how to call GetDeployments and parse the result.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview");

foreach (BinaryData item in client.GetDeployments("kznreojrvlwdq", "gplerszsuyisseeksnyvkaqperxox", null, null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("type").ToString());
    Console.WriteLine(result.GetProperty("name").ToString());
}

Applies to