/// <summary>
 /// Gets specific run command for a subscription in a location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The location upon which run commands is queried.
 /// </param>
 /// <param name='commandId'>
 /// The command id.
 /// </param>
 public static RunCommandDocument Get(this IVirtualMachineRunCommandsOperations operations, string location, string commandId)
 {
     return(operations.GetAsync(location, commandId).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all available run commands for a subscription in a location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <RunCommandDocumentBase> ListNext(this IVirtualMachineRunCommandsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all available run commands for a subscription in a location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The location upon which run commands is queried.
 /// </param>
 public static IPage <RunCommandDocumentBase> List(this IVirtualMachineRunCommandsOperations operations, string location)
 {
     return(operations.ListAsync(location).GetAwaiter().GetResult());
 }
示例#4
0
 /// <summary>
 /// The operation to delete the run command.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='vmName'>
 /// The name of the virtual machine where the run command should be deleted.
 /// </param>
 /// <param name='runCommandName'>
 /// The name of the virtual machine run command.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#5
0
 /// <summary>
 /// The operation to get all run commands of a Virtual Machine.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <VirtualMachineRunCommand> > ListByVirtualMachineNextAsync(this IVirtualMachineRunCommandsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByVirtualMachineNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#6
0
 /// <summary>
 /// The operation to delete the run command.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='vmName'>
 /// The name of the virtual machine where the run command should be deleted.
 /// </param>
 /// <param name='runCommandName'>
 /// The name of the virtual machine run command.
 /// </param>
 public static void BeginDelete(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName)
 {
     operations.BeginDeleteAsync(resourceGroupName, vmName, runCommandName).GetAwaiter().GetResult();
 }
示例#7
0
 /// <summary>
 /// The operation to update the run command.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='vmName'>
 /// The name of the virtual machine where the run command should be updated.
 /// </param>
 /// <param name='runCommandName'>
 /// The name of the virtual machine run command.
 /// </param>
 /// <param name='runCommand'>
 /// Parameters supplied to the Update Virtual Machine RunCommand operation.
 /// </param>
 public static VirtualMachineRunCommand BeginUpdate(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand)
 {
     return(operations.BeginUpdateAsync(resourceGroupName, vmName, runCommandName, runCommand).GetAwaiter().GetResult());
 }
示例#8
0
 /// <summary>
 /// The operation to get all run commands of a Virtual Machine.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='vmName'>
 /// The name of the virtual machine containing the run command.
 /// </param>
 /// <param name='expand'>
 /// The expand expression to apply on the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <VirtualMachineRunCommand> > ListByVirtualMachineAsync(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByVirtualMachineWithHttpMessagesAsync(resourceGroupName, vmName, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#9
0
 /// <summary>
 /// The operation to get all run commands of a Virtual Machine.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='vmName'>
 /// The name of the virtual machine containing the run command.
 /// </param>
 /// <param name='expand'>
 /// The expand expression to apply on the operation.
 /// </param>
 public static IPage <VirtualMachineRunCommand> ListByVirtualMachine(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string expand = default(string))
 {
     return(operations.ListByVirtualMachineAsync(resourceGroupName, vmName, expand).GetAwaiter().GetResult());
 }
 /// <summary>
 /// The operation to create or update the run command.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='vmName'>
 /// The name of the virtual machine where the run command should be created or
 /// updated.
 /// </param>
 /// <param name='runCommandName'>
 /// The name of the virtual machine run command.
 /// </param>
 /// <param name='runCommand'>
 /// Parameters supplied to the Create Virtual Machine RunCommand operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <VirtualMachineRunCommandInner> BeginCreateOrUpdateAsync(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandInner runCommand, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }