次の方法で共有


DevBoxesClient.DeleteDevBox メソッド

定義

[プロトコルメソッド]Dev Box を削除します。

  • この プロトコルメソッド を使用すると、高度なシナリオで応答の要求と処理を明示的に作成できます。
public virtual Azure.Operation DeleteDevBox (Azure.WaitUntil waitUntil, string projectName, string userId, string devBoxName, Azure.RequestContext context = default);
abstract member DeleteDevBox : Azure.WaitUntil * string * string * string * Azure.RequestContext -> Azure.Operation
override this.DeleteDevBox : Azure.WaitUntil * string * string * string * Azure.RequestContext -> Azure.Operation
Public Overridable Function DeleteDevBox (waitUntil As WaitUntil, projectName As String, userId As String, devBoxName As String, Optional context As RequestContext = Nothing) As Operation

パラメーター

waitUntil
WaitUntil

Completed メソッドがサービスで実行時間の長い操作が完了するまで戻るのを待機する必要がある場合。 Started 操作を開始した後に が返される場合は 。 実行時間の長い操作の詳細については、「 Azure.Core Long-Running 操作のサンプル」を参照してください。

projectName
String

操作を実行する DevCenter プロジェクト。

userId
String

ユーザーの AAD オブジェクト ID。 値が "me" の場合、ID は認証コンテキストから取得されます。

devBoxName
String

Dev Box の名前。

context
RequestContext

要求コンテキスト。これは、呼び出しごとにクライアント パイプラインの既定の動作をオーバーライドできます。

戻り値

Operationサービスに対する非同期操作を表す 。

例外

projectNameuserId、または devBoxName が null です。

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

サービスから成功以外の状態コードが返されました。

このサンプルでは、DeleteDevBox を呼び出す方法を示します。

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);

Operation operation = client.DeleteDevBox(WaitUntil.Completed, "<projectName>", "<userId>", "<devBoxName>");

このサンプルでは、すべてのパラメーターで DeleteDevBox を呼び出す方法を示します。

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);

Operation operation = client.DeleteDevBox(WaitUntil.Completed, "<projectName>", "<userId>", "<devBoxName>");

適用対象