DevBoxesClient.GetSchedule 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
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.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetSchedule(String, String, String, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response GetSchedule (string projectName, string poolName, string scheduleName, Azure.RequestContext context);
abstract member GetSchedule : string * string * string * Azure.RequestContext -> Azure.Response
override this.GetSchedule : string * string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetSchedule (projectName As String, poolName As String, scheduleName As String, context As RequestContext) As Response
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
GetSchedule(String, String, String, CancellationToken)
- Source:
- DevBoxesClient.cs
Gets a schedule.
public virtual Azure.Response<Azure.Developer.DevCenter.Models.DevBoxSchedule> GetSchedule (string projectName, string poolName, string scheduleName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSchedule : string * string * string * System.Threading.CancellationToken -> Azure.Response<Azure.Developer.DevCenter.Models.DevBoxSchedule>
override this.GetSchedule : string * string * string * System.Threading.CancellationToken -> Azure.Response<Azure.Developer.DevCenter.Models.DevBoxSchedule>
Public Overridable Function GetSchedule (projectName As String, poolName As String, scheduleName As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of DevBoxSchedule)
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