Partager via


DevBoxesClient.GetSchedules Method

Definition

Overloads

GetSchedules(String, String, RequestContext)

[Protocol Method] Lists available schedules for a pool.

GetSchedules(String, String, CancellationToken)

Lists available schedules for a pool.

GetSchedules(String, String, String, Nullable<Int32>, RequestContext)

[Protocol Method] Lists available schedules for a pool.

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

GetSchedules(String, String, RequestContext)

Source:
DevBoxesClient.cs

[Protocol Method] Lists available schedules for a pool.

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

Parameters

projectName
String

Name of the project.

poolName
String

Pool name.

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

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

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

foreach (BinaryData item in client.GetSchedules("<projectName>", "<poolName>", null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).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 GetSchedules 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);

foreach (BinaryData item in client.GetSchedules("<projectName>", "<poolName>", null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).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

GetSchedules(String, String, CancellationToken)

Source:
DevBoxesClient.cs

Lists available schedules for a pool.

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

Parameters

projectName
String

Name of the project.

poolName
String

Pool name.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

projectName or poolName is null.

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

Examples

This sample shows how to call GetSchedules.

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

foreach (DevBoxSchedule item in client.GetSchedules("<projectName>", "<poolName>"))
{
}

This sample shows how to call GetSchedules with all parameters.

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

foreach (DevBoxSchedule item in client.GetSchedules("<projectName>", "<poolName>"))
{
}

Applies to

GetSchedules(String, String, String, Nullable<Int32>, RequestContext)

Source:
DevBoxesClient.cs

[Protocol Method] Lists available schedules for a pool.

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

poolName
String

The name of a pool of Dev Boxes.

filter
String

An OData filter clause to apply to the operation.

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

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

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

foreach (BinaryData item in client.GetSchedules("<projectName>", "<poolName>", null, null, null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).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 GetSchedules 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);

foreach (BinaryData item in client.GetSchedules("<projectName>", "<poolName>", "<filter>", 1234, null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).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