DevBoxesClient.GetSchedule Method

Definition

Overloads

GetSchedule(String, String, String, RequestContext)

[Protocol Method] Gets a schedule.

GetSchedule(String, String, String, CancellationToken)

Gets a schedule.

GetSchedule(String, String, String, RequestContext)

Source:
DevBoxesClient.cs
Source:
DevBoxesClient.cs

[Protocol Method] Gets a schedule.

C#
public virtual Azure.Response GetSchedule(string projectName, string poolName, string scheduleName, Azure.RequestContext context);

Parameters

projectName
String

Name of the project.

poolName
String

Pool name.

scheduleName
String

Display name for the Schedule.

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, poolName or scheduleName is null.

projectName, poolName or scheduleName 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 GetSchedule and parse the result.

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

Response response = client.GetSchedule("<projectName>", "<poolName>", "<scheduleName>", null);

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

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

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

Response response = client.GetSchedule("<projectName>", "<poolName>", "<scheduleName>", null);

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

Applies to

Azure SDK for .NET Preview ja Azure SDK for .NET Latest
Toode Versioonid
Azure SDK for .NET Latest, Preview

GetSchedule(String, String, String, CancellationToken)

Source:
DevBoxesClient.cs

Gets a schedule.

C#
public virtual Azure.Response<Azure.Developer.DevCenter.Models.DevBoxSchedule> GetSchedule(string projectName, string poolName, string scheduleName, System.Threading.CancellationToken cancellationToken = default);

Parameters

projectName
String

Name of the project.

poolName
String

Pool name.

scheduleName
String

Display name for the Schedule.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

projectName, poolName or scheduleName is null.

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

Examples

This sample shows how to call GetSchedule.

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

Response<DevBoxSchedule> response = client.GetSchedule("<projectName>", "<poolName>", "<scheduleName>");

This sample shows how to call GetSchedule with all parameters.

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

Response<DevBoxSchedule> response = client.GetSchedule("<projectName>", "<poolName>", "<scheduleName>");

Applies to

Azure SDK for .NET Latest
Toode Versioonid
Azure SDK for .NET Latest