VirtualMachineCollection.GetAsync メソッド

定義

仮想マシンのモデル ビューまたはインスタンス ビューに関する情報を取得します。

  • 要求パス/サブスクリプション/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}
  • 操作IdVirtualMachines_Get
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Compute.VirtualMachineResource>> GetAsync (string vmName, Azure.ResourceManager.Compute.Models.InstanceViewType? expand = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAsync : string * Nullable<Azure.ResourceManager.Compute.Models.InstanceViewType> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Compute.VirtualMachineResource>>
override this.GetAsync : string * Nullable<Azure.ResourceManager.Compute.Models.InstanceViewType> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Compute.VirtualMachineResource>>
Public Overridable Function GetAsync (vmName As String, Optional expand As Nullable(Of InstanceViewType) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of VirtualMachineResource))

パラメーター

vmName
String

仮想マシンの名前。

expand
Nullable<InstanceViewType>

操作に適用する展開式。 'InstanceView' は、プラットフォームによって管理され、コントロール プレーン操作の外部で変更できる仮想マシンのランタイム プロパティのスナップショットを取得します。 'UserData' は、VM の作成/更新操作中にユーザーによって提供された VM モデル ビューの一部として UserData プロパティを取得します。

cancellationToken
CancellationToken

使用する取り消しトークン。

戻り値

例外

vmName は空の文字列であり、空でないと予想されていました。

vmName が null です。

適用対象