DevBoxesClient.StopDevBoxAsync 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.
[Protocol Method] Stops a Dev Box
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Operation> StopDevBoxAsync (Azure.WaitUntil waitUntil, string projectName, string userId, string devBoxName, bool? hibernate = default, Azure.RequestContext context = default);
public virtual System.Threading.Tasks.Task<Azure.Operation<BinaryData>> StopDevBoxAsync (Azure.WaitUntil waitUntil, string projectName, string userId, string devBoxName, bool? hibernate, Azure.RequestContext context);
abstract member StopDevBoxAsync : Azure.WaitUntil * string * string * string * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation>
override this.StopDevBoxAsync : Azure.WaitUntil * string * string * string * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation>
abstract member StopDevBoxAsync : Azure.WaitUntil * string * string * string * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation<BinaryData>>
override this.StopDevBoxAsync : Azure.WaitUntil * string * string * string * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation<BinaryData>>
Public Overridable Function StopDevBoxAsync (waitUntil As WaitUntil, projectName As String, userId As String, devBoxName As String, Optional hibernate As Nullable(Of Boolean) = Nothing, Optional context As RequestContext = Nothing) As Task(Of Operation)
Public Overridable Function StopDevBoxAsync (waitUntil As WaitUntil, projectName As String, userId As String, devBoxName As String, hibernate As Nullable(Of Boolean), context As RequestContext) As Task(Of Operation(Of BinaryData))
Parameters
- waitUntil
- WaitUntil
Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- projectName
- String
Name of the project.
- userId
- String
The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.
- devBoxName
- String
Display name for the Dev Box.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The Operation representing an asynchronous operation on the service.
Exceptions
projectName
, userId
or devBoxName
is null.
projectName
, userId
or devBoxName
is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Examples
This sample shows how to call StopDevBoxAsync.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);
Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "<projectName>", "<userId>", "<devBoxName>");
This sample shows how to call StopDevBoxAsync with all parameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);
Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "<projectName>", "<userId>", "<devBoxName>", hibernate: true);
Applies to
Azure SDK for .NET