Share via


DeploymentEnvironmentsClient.GetEnvironmentDefinitionsByCatalog Method

Definition

Overloads

GetEnvironmentDefinitionsByCatalog(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.
GetEnvironmentDefinitionsByCatalog(String, String, RequestContext)

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

GetEnvironmentDefinitionsByCatalog(String, String, CancellationToken)

Lists all environment definitions available within a catalog.

GetEnvironmentDefinitionsByCatalog(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.Pageable<BinaryData> GetEnvironmentDefinitionsByCatalog (string projectName, string catalogName, int? maxCount, Azure.RequestContext context);
abstract member GetEnvironmentDefinitionsByCatalog : string * string * Nullable<int> * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetEnvironmentDefinitionsByCatalog : string * string * Nullable<int> * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetEnvironmentDefinitionsByCatalog (projectName As String, catalogName As String, maxCount As Nullable(Of Integer), context As RequestContext) As Pageable(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 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

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 GetEnvironmentDefinitionsByCatalog and parse the result.

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

foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("<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 GetEnvironmentDefinitionsByCatalog 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);

foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("<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

GetEnvironmentDefinitionsByCatalog(String, String, RequestContext)

Source:
DeploymentEnvironmentsClient.cs

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

public virtual Azure.Pageable<BinaryData> GetEnvironmentDefinitionsByCatalog (string projectName, string catalogName, Azure.RequestContext context);
abstract member GetEnvironmentDefinitionsByCatalog : string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetEnvironmentDefinitionsByCatalog : string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetEnvironmentDefinitionsByCatalog (projectName As String, catalogName As String, context As RequestContext) As Pageable(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 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

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 GetEnvironmentDefinitionsByCatalog and parse the result.

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

foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("<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 GetEnvironmentDefinitionsByCatalog 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);

foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("<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

GetEnvironmentDefinitionsByCatalog(String, String, CancellationToken)

Source:
DeploymentEnvironmentsClient.cs

Lists all environment definitions available within a catalog.

public virtual Azure.Pageable<Azure.Developer.DevCenter.Models.EnvironmentDefinition> GetEnvironmentDefinitionsByCatalog (string projectName, string catalogName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetEnvironmentDefinitionsByCatalog : string * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Developer.DevCenter.Models.EnvironmentDefinition>
override this.GetEnvironmentDefinitionsByCatalog : string * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Developer.DevCenter.Models.EnvironmentDefinition>
Public Overridable Function GetEnvironmentDefinitionsByCatalog (projectName As String, catalogName As String, Optional cancellationToken As CancellationToken = Nothing) As Pageable(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 GetEnvironmentDefinitionsByCatalog.

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

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

This sample shows how to call GetEnvironmentDefinitionsByCatalog with all parameters.

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

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

Applies to