次の方法で共有


VirtualMachineCollection.ExistsAsync メソッド

定義

リソースが Azure に存在するかどうかを確認します。

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

パラメーター

vmName
String

仮想マシンの名前。

expand
Nullable<InstanceViewType>

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

cancellationToken
CancellationToken

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

戻り値

例外

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

vmName が null です。

適用対象