Partager via


DeploymentEnvironmentsClient.GetCatalog Method

Definition

Overloads

GetCatalog(String, String, RequestContext)

[Protocol Method] Gets the specified catalog within the project

GetCatalog(String, String, CancellationToken)

Gets the specified catalog within the project.

GetCatalog(String, String, RequestContext)

Source:
DeploymentEnvironmentsClient.cs
Source:
DeploymentEnvironmentsClient.cs

[Protocol Method] Gets the specified catalog within the project

public virtual Azure.Response GetCatalog (string projectName, string catalogName, Azure.RequestContext context);
abstract member GetCatalog : string * string * Azure.RequestContext -> Azure.Response
override this.GetCatalog : string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetCatalog (projectName As String, catalogName As String, context As RequestContext) As Response

Parameters

projectName
String

Name of the project.

catalogName
String

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 response returned from the service.

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

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

Response response = client.GetCatalog("<projectName>", "<catalogName>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());

This sample shows how to call GetCatalog 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);

Response response = client.GetCatalog("<projectName>", "<catalogName>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());

Applies to

GetCatalog(String, String, CancellationToken)

Source:
DeploymentEnvironmentsClient.cs

Gets the specified catalog within the project.

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

Parameters

projectName
String

Name of the project.

catalogName
String

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 GetCatalog.

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

Response<DevCenterCatalog> response = client.GetCatalog("<projectName>", "<catalogName>");

This sample shows how to call GetCatalog with all parameters.

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

Response<DevCenterCatalog> response = client.GetCatalog("<projectName>", "<catalogName>");

Applies to