DeploymentEnvironmentsClient.GetCatalog Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
[Protocol Method] Gets the specified catalog within the project
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetCatalog(String, String, CancellationToken) convenience overload with strongly typed models first.
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)
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
Azure SDK for .NET