次の方法で共有


DevBoxesClient.GetSchedulesAsync Method

Definition

Overloads

GetSchedulesAsync(String, String, CancellationToken)

Lists available schedules for a pool.

GetSchedulesAsync(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.
GetSchedulesAsync(String, String, RequestContext)

[Protocol Method] Lists available schedules for a pool.

GetSchedulesAsync(String, String, CancellationToken)

Source:
DevBoxesClient.cs

Lists available schedules for a pool.

public virtual Azure.AsyncPageable<Azure.Developer.DevCenter.Models.DevBoxSchedule> GetSchedulesAsync (string projectName, string poolName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSchedulesAsync : string * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Developer.DevCenter.Models.DevBoxSchedule>
override this.GetSchedulesAsync : string * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Developer.DevCenter.Models.DevBoxSchedule>
Public Overridable Function GetSchedulesAsync (projectName As String, poolName As String, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(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 GetSchedulesAsync.

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

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

This sample shows how to call GetSchedulesAsync with all parameters.

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

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

Applies to

GetSchedulesAsync(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.AsyncPageable<BinaryData> GetSchedulesAsync (string projectName, string poolName, string filter, int? maxCount, Azure.RequestContext context);
abstract member GetSchedulesAsync : string * string * string * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetSchedulesAsync : string * string * string * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetSchedulesAsync (projectName As String, poolName As String, filter 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.

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

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

await foreach (BinaryData item in client.GetSchedulesAsync("<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 GetSchedulesAsync 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);

await foreach (BinaryData item in client.GetSchedulesAsync("<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

GetSchedulesAsync(String, String, RequestContext)

Source:
DevBoxesClient.cs

[Protocol Method] Lists available schedules for a pool.

public virtual Azure.AsyncPageable<BinaryData> GetSchedulesAsync (string projectName, string poolName, Azure.RequestContext context);
abstract member GetSchedulesAsync : string * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetSchedulesAsync : string * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetSchedulesAsync (projectName As String, poolName As String, context As RequestContext) As AsyncPageable(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 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 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 GetSchedulesAsync and parse the result.

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

await foreach (BinaryData item in client.GetSchedulesAsync("<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 GetSchedulesAsync 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);

await foreach (BinaryData item in client.GetSchedulesAsync("<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