DevBoxesClient.GetAllDevBoxesAsync 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
GetAllDevBoxesAsync(RequestContext) |
[Protocol Method] Lists Dev Boxes that the caller has access to in the DevCenter.
|
GetAllDevBoxesAsync(CancellationToken) |
Lists Dev Boxes that the caller has access to in the DevCenter. |
GetAllDevBoxesAsync(String, Nullable<Int32>, RequestContext) |
[Protocol Method] Lists Dev Boxes that the caller has access to in the DevCenter.
|
GetAllDevBoxesAsync(RequestContext)
- Source:
- DevBoxesClient.cs
[Protocol Method] Lists Dev Boxes that the caller has access to in the DevCenter.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetAllDevBoxesAsync(CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.AsyncPageable<BinaryData> GetAllDevBoxesAsync (Azure.RequestContext context);
abstract member GetAllDevBoxesAsync : Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetAllDevBoxesAsync : Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetAllDevBoxesAsync (context As RequestContext) As AsyncPageable(Of BinaryData)
Parameters
- 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
Service returned a non-success status code.
Examples
This sample shows how to call GetAllDevBoxesAsync 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.GetAllDevBoxesAsync(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("poolName").ToString());
}
This sample shows how to call GetAllDevBoxesAsync 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.GetAllDevBoxesAsync(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("projectName").ToString());
Console.WriteLine(result.GetProperty("poolName").ToString());
Console.WriteLine(result.GetProperty("hibernateSupport").ToString());
Console.WriteLine(result.GetProperty("provisioningState").ToString());
Console.WriteLine(result.GetProperty("actionState").ToString());
Console.WriteLine(result.GetProperty("powerState").ToString());
Console.WriteLine(result.GetProperty("uniqueId").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("osType").ToString());
Console.WriteLine(result.GetProperty("user").ToString());
Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString());
Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString());
Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString());
Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString());
Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString());
Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString());
Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString());
Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString());
Console.WriteLine(result.GetProperty("createdTime").ToString());
Console.WriteLine(result.GetProperty("localAdministrator").ToString());
}
Applies to
GetAllDevBoxesAsync(CancellationToken)
- Source:
- DevBoxesClient.cs
Lists Dev Boxes that the caller has access to in the DevCenter.
public virtual Azure.AsyncPageable<Azure.Developer.DevCenter.Models.DevBox> GetAllDevBoxesAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetAllDevBoxesAsync : System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Developer.DevCenter.Models.DevBox>
override this.GetAllDevBoxesAsync : System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Developer.DevCenter.Models.DevBox>
Public Overridable Function GetAllDevBoxesAsync (Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of DevBox)
Parameters
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Examples
This sample shows how to call GetAllDevBoxesAsync.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);
await foreach (DevBox item in client.GetAllDevBoxesAsync())
{
}
This sample shows how to call GetAllDevBoxesAsync with all parameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);
await foreach (DevBox item in client.GetAllDevBoxesAsync())
{
}
Applies to
GetAllDevBoxesAsync(String, Nullable<Int32>, RequestContext)
- Source:
- DevBoxesClient.cs
[Protocol Method] Lists Dev Boxes that the caller has access to in the DevCenter.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.AsyncPageable<BinaryData> GetAllDevBoxesAsync (string filter, int? maxCount, Azure.RequestContext context);
abstract member GetAllDevBoxesAsync : string * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetAllDevBoxesAsync : string * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetAllDevBoxesAsync (filter As String, maxCount As Nullable(Of Integer), context As RequestContext) As AsyncPageable(Of BinaryData)
Parameters
- filter
- String
An OData filter clause to apply to the operation.
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
Service returned a non-success status code.
Examples
This sample shows how to call GetAllDevBoxesAsync 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.GetAllDevBoxesAsync(null, null, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("poolName").ToString());
}
This sample shows how to call GetAllDevBoxesAsync 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.GetAllDevBoxesAsync("<filter>", 1234, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("projectName").ToString());
Console.WriteLine(result.GetProperty("poolName").ToString());
Console.WriteLine(result.GetProperty("hibernateSupport").ToString());
Console.WriteLine(result.GetProperty("provisioningState").ToString());
Console.WriteLine(result.GetProperty("actionState").ToString());
Console.WriteLine(result.GetProperty("powerState").ToString());
Console.WriteLine(result.GetProperty("uniqueId").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("osType").ToString());
Console.WriteLine(result.GetProperty("user").ToString());
Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString());
Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString());
Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString());
Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString());
Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString());
Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString());
Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString());
Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString());
Console.WriteLine(result.GetProperty("createdTime").ToString());
Console.WriteLine(result.GetProperty("localAdministrator").ToString());
}
Applies to
Azure SDK for .NET