DeploymentEnvironmentsClient.GetEnvironmentDefinitionsByCatalogAsync Method

Definition

Overloads

GetEnvironmentDefinitionsByCatalogAsync(String, String, Nullable<Int32>, RequestContext)

[Protocol Method] Lists all environment definitions available within a catalog.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetEnvironmentDefinitionsByCatalogAsync(String, String, RequestContext)

[Protocol Method] Lists all environment definitions available within a catalog.

GetEnvironmentDefinitionsByCatalogAsync(String, String, CancellationToken)

Lists all environment definitions available within a catalog.

GetEnvironmentDefinitionsByCatalogAsync(String, String, Nullable<Int32>, RequestContext)

Source:
DeploymentEnvironmentsClient.cs

[Protocol Method] Lists all environment definitions available within a catalog.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.AsyncPageable<BinaryData> GetEnvironmentDefinitionsByCatalogAsync (string projectName, string catalogName, int? maxCount, Azure.RequestContext context);
abstract member GetEnvironmentDefinitionsByCatalogAsync : string * string * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetEnvironmentDefinitionsByCatalogAsync : string * string * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetEnvironmentDefinitionsByCatalogAsync (projectName As String, catalogName As String, maxCount As Nullable(Of Integer), context As RequestContext) As AsyncPageable(Of BinaryData)

Parameters

projectName
String

The DevCenter Project upon which to execute operations.

catalogName
String

The name of the catalog.

maxCount
Nullable<Int32>

The maximum number of resources to return from the operation. Example: 'top=10'.

context
RequestContext

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

Returns

The AsyncPageable<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

projectName or catalogName is null.

projectName or catalogName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

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

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential);

await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("<projectName>", "<catalogName>", null, null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("catalogName").ToString());
}

This sample shows how to call GetEnvironmentDefinitionsByCatalogAsync with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential);

await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("<projectName>", "<catalogName>", 1234, null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("catalogName").ToString());
    Console.WriteLine(result.GetProperty("description").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString());
    Console.WriteLine(result.GetProperty("parametersSchema").ToString());
    Console.WriteLine(result.GetProperty("templatePath").ToString());
}

Applies to

GetEnvironmentDefinitionsByCatalogAsync(String, String, RequestContext)

Source:
DeploymentEnvironmentsClient.cs

[Protocol Method] Lists all environment definitions available within a catalog.

public virtual Azure.AsyncPageable<BinaryData> GetEnvironmentDefinitionsByCatalogAsync (string projectName, string catalogName, Azure.RequestContext context);
abstract member GetEnvironmentDefinitionsByCatalogAsync : string * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetEnvironmentDefinitionsByCatalogAsync : string * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetEnvironmentDefinitionsByCatalogAsync (projectName As String, catalogName As String, context As RequestContext) As AsyncPageable(Of BinaryData)

Parameters

projectName
String

The DevCenter Project upon which to execute operations.

catalogName
String

The name of the catalog.

context
RequestContext

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

Returns

The AsyncPageable<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

projectName or catalogName is null.

projectName or catalogName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

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

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential);

await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("<projectName>", "<catalogName>", null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("catalogName").ToString());
}

This sample shows how to call GetEnvironmentDefinitionsByCatalogAsync with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential);

await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("<projectName>", "<catalogName>", null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("catalogName").ToString());
    Console.WriteLine(result.GetProperty("description").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString());
    Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString());
    Console.WriteLine(result.GetProperty("parametersSchema").ToString());
    Console.WriteLine(result.GetProperty("templatePath").ToString());
}

Applies to

GetEnvironmentDefinitionsByCatalogAsync(String, String, CancellationToken)

Source:
DeploymentEnvironmentsClient.cs

Lists all environment definitions available within a catalog.

public virtual Azure.AsyncPageable<Azure.Developer.DevCenter.Models.EnvironmentDefinition> GetEnvironmentDefinitionsByCatalogAsync (string projectName, string catalogName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetEnvironmentDefinitionsByCatalogAsync : string * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Developer.DevCenter.Models.EnvironmentDefinition>
override this.GetEnvironmentDefinitionsByCatalogAsync : string * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Developer.DevCenter.Models.EnvironmentDefinition>
Public Overridable Function GetEnvironmentDefinitionsByCatalogAsync (projectName As String, catalogName As String, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of EnvironmentDefinition)

Parameters

projectName
String

The DevCenter Project upon which to execute operations.

catalogName
String

The name of the catalog.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

projectName or catalogName is null.

projectName or catalogName is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call GetEnvironmentDefinitionsByCatalogAsync.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential);

await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalogAsync("<projectName>", "<catalogName>"))
{
}

This sample shows how to call GetEnvironmentDefinitionsByCatalogAsync with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential);

await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalogAsync("<projectName>", "<catalogName>"))
{
}

Applies to