Share via


DeploymentEnvironmentsClient.GetCatalogsAsync Method

Definition

Overloads

GetCatalogsAsync(String, RequestContext)

[Protocol Method] Lists all of the catalogs available for a project.

GetCatalogsAsync(String, CancellationToken)

Lists all of the catalogs available for a project.

GetCatalogsAsync(String, Nullable<Int32>, RequestContext)

[Protocol Method] Lists all of the catalogs available for a project.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.

GetCatalogsAsync(String, RequestContext)

Source:
DeploymentEnvironmentsClient.cs

[Protocol Method] Lists all of the catalogs available for a project.

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

Parameters

projectName
String

Name of the project.

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 is null.

projectName 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 GetCatalogsAsync 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.GetCatalogsAsync("<projectName>", null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("name").ToString());
}

This sample shows how to call GetCatalogsAsync 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.GetCatalogsAsync("<projectName>", null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("name").ToString());
}

Applies to

GetCatalogsAsync(String, CancellationToken)

Source:
DeploymentEnvironmentsClient.cs

Lists all of the catalogs available for a project.

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

Parameters

projectName
String

Name of the project.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

projectName is null.

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

Examples

This sample shows how to call GetCatalogsAsync.

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

await foreach (DevCenterCatalog item in client.GetCatalogsAsync("<projectName>"))
{
}

This sample shows how to call GetCatalogsAsync with all parameters.

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

await foreach (DevCenterCatalog item in client.GetCatalogsAsync("<projectName>"))
{
}

Applies to

GetCatalogsAsync(String, Nullable<Int32>, RequestContext)

Source:
DeploymentEnvironmentsClient.cs

[Protocol Method] Lists all of the catalogs available for a project.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.AsyncPageable<BinaryData> GetCatalogsAsync (string projectName, int? maxCount, Azure.RequestContext context);
abstract member GetCatalogsAsync : string * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetCatalogsAsync : string * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetCatalogsAsync (projectName 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.

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 is null.

projectName 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 GetCatalogsAsync 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.GetCatalogsAsync("<projectName>", null, null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("name").ToString());
}

This sample shows how to call GetCatalogsAsync 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.GetCatalogsAsync("<projectName>", 1234, null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("name").ToString());
}

Applies to