Share via


VirtualMachineOperationsExtensions.ShutdownAsync Method (IVirtualMachineOperations, String, String, String, VirtualMachineShutdownParameters)

 

Asynchronously shuts down the specified Virtual Machine.

Namespace:   Microsoft.WindowsAzure.Management.Compute
Assembly:  Microsoft.WindowsAzure.Management.Compute (in Microsoft.WindowsAzure.Management.Compute.dll)

Syntax

public static Task<OperationStatusResponse> ShutdownAsync(
    this IVirtualMachineOperations operations,
    string serviceName,
    string deploymentName,
    string virtualMachineName,
    VirtualMachineShutdownParameters parameters
)
public:
[ExtensionAttribute]
static Task<OperationStatusResponse^>^ ShutdownAsync(
    IVirtualMachineOperations^ operations,
    String^ serviceName,
    String^ deploymentName,
    String^ virtualMachineName,
    VirtualMachineShutdownParameters^ parameters
)
static member ShutdownAsync : 
        operations:IVirtualMachineOperations *
        serviceName:string *
        deploymentName:string *
        virtualMachineName:string *
        parameters:VirtualMachineShutdownParameters -> Task<OperationStatusResponse>
<ExtensionAttribute>
Public Shared Function ShutdownAsync (
    operations As IVirtualMachineOperations,
    serviceName As String,
    deploymentName As String,
    virtualMachineName As String,
    parameters As VirtualMachineShutdownParameters
) As Task(Of OperationStatusResponse)

Parameters

  • serviceName
    Type: System.String

    The name of the cloud service that contains the Virtual Machine.

  • virtualMachineName
    Type: System.String

    The name of the Virtual Machine that should be shut down.

Return Value

Type: System.Threading.Tasks.Task<OperationStatusResponse>

The T:Microsoft.WindowsAzure.Management.Compute.Models.ComputeOperationStatusResponse object that contains the status of the operation.

Remarks

If the asynchronous operation succeeds, the response includes the HTTP status code for the successful request. If the asynchronous operation failed, the response includes the HTTP status code for the failed request, and also includes error information about the failure.

For more information about shutting down a Virtual Machine, see the following resources:

See Also

VirtualMachineOperationsExtensions Class
Microsoft.WindowsAzure.Management.Compute Namespace

Return to top