VirtualMachinesOperations.ListByLocationAsync(String, CancellationToken) Method

Definition

Gets all the virtual machines under the specified subscription for the specified location.

public virtual Azure.AsyncPageable<Azure.ResourceManager.Compute.Models.VirtualMachine> ListByLocationAsync (string location, System.Threading.CancellationToken cancellationToken = default);
abstract member ListByLocationAsync : string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Compute.Models.VirtualMachine>
override this.ListByLocationAsync : string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Compute.Models.VirtualMachine>
Public Overridable Function ListByLocationAsync (location As String, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of VirtualMachine)

Parameters

location
System.String

The location for which virtual machines under the subscription are queried.

cancellationToken
System.Threading.CancellationToken

The cancellation token to use.

Returns

AsyncPageable<VirtualMachine>

Exceptions

System.ArgumentNullException

location is null.

Applies to