/// <summary> /// List schedules in a given 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 <Schedule> > ListNextAsync(this IVirtualMachineSchedulesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List schedules in a given 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='labName'> /// The name of the lab. /// </param> /// <param name='virtualMachineName'> /// The name of the virtual machine. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Schedule> > ListAsync(this IVirtualMachineSchedulesOperations operations, string resourceGroupName, string labName, string virtualMachineName, ODataQuery <Schedule> odataQuery = default(ODataQuery <Schedule>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, virtualMachineName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Modify properties of schedules. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='virtualMachineName'> /// The name of the virtual machine. /// </param> /// <param name='name'> /// The name of the schedule. /// </param> /// <param name='schedule'> /// A schedule. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Schedule> UpdateAsync(this IVirtualMachineSchedulesOperations operations, string resourceGroupName, string labName, string virtualMachineName, string name, ScheduleFragment schedule, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, labName, virtualMachineName, name, schedule, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get schedule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='virtualMachineName'> /// The name of the virtual machine. /// </param> /// <param name='name'> /// The name of the schedule. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($select=status)' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ScheduleInner> GetAsync(this IVirtualMachineSchedulesOperations operations, string resourceGroupName, string labName, string virtualMachineName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, virtualMachineName, name, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get schedule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='virtualMachineName'> /// The name of the virtual machine. /// </param> /// <param name='name'> /// The name of the schedule. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($select=status)' /// </param> public static Schedule Get(this IVirtualMachineSchedulesOperations operations, string resourceGroupName, string labName, string virtualMachineName, string name, string expand = default(string)) { return(operations.GetAsync(resourceGroupName, labName, virtualMachineName, name, expand).GetAwaiter().GetResult()); }
/// <summary> /// List schedules in a given 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='labName'> /// The name of the lab. /// </param> /// <param name='virtualMachineName'> /// The name of the virtual machine. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <Schedule> List(this IVirtualMachineSchedulesOperations operations, string resourceGroupName, string labName, string virtualMachineName, ODataQuery <Schedule> odataQuery = default(ODataQuery <Schedule>)) { return(operations.ListAsync(resourceGroupName, labName, virtualMachineName, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// List schedules in a given 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> public static IPage <Schedule> ListNext(this IVirtualMachineSchedulesOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Execute a schedule. This operation can take a while to complete. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='virtualMachineName'> /// The name of the virtual machine. /// </param> /// <param name='name'> /// The name of the schedule. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginExecuteAsync(this IVirtualMachineSchedulesOperations operations, string resourceGroupName, string labName, string virtualMachineName, string name, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginExecuteWithHttpMessagesAsync(resourceGroupName, labName, virtualMachineName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Execute a schedule. This operation can take a while to complete. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='virtualMachineName'> /// The name of the virtual machine. /// </param> /// <param name='name'> /// The name of the schedule. /// </param> public static void BeginExecute(this IVirtualMachineSchedulesOperations operations, string resourceGroupName, string labName, string virtualMachineName, string name) { operations.BeginExecuteAsync(resourceGroupName, labName, virtualMachineName, name).GetAwaiter().GetResult(); }
/// <summary> /// Modify properties of schedules. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='virtualMachineName'> /// The name of the virtual machine. /// </param> /// <param name='name'> /// The name of the schedule. /// </param> /// <param name='schedule'> /// A schedule. /// </param> public static Schedule Update(this IVirtualMachineSchedulesOperations operations, string resourceGroupName, string labName, string virtualMachineName, string name, ScheduleFragment schedule) { return(operations.UpdateAsync(resourceGroupName, labName, virtualMachineName, name, schedule).GetAwaiter().GetResult()); }