/// <summary> /// Lists all the hybrid machines in the specified resource group. Use the /// nextLink property in the response to get the next page of hybrid machines. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Machine> > ListByResourceGroupAsync(this IMachinesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List all Machines /// </summary> /// <remarks> /// List all Machines /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='count'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Eryph.ClientRuntime.IPage <Machine> > ListAsync(this IMachinesOperations operations, bool?count = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(count, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Retrieves information about the model view or the instance view of a hybrid /// 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='name'> /// The name of the hybrid machine. /// </param> /// <param name='expand'> /// The expand expression to apply on the operation. Possible values include: /// 'instanceView' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Machine> GetAsync(this IMachinesOperations operations, string resourceGroupName, string name, InstanceViewTypes?expand = default(InstanceViewTypes?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a new Machine /// </summary> /// <remarks> /// Creates a Machine /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Operation> CreateAsync(this IMachinesOperations operations, NewMachineRequest body = default(NewMachineRequest), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Stops a Machine /// </summary> /// <remarks> /// Stops a Machine /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Operation> StopAsync(this IMachinesOperations operations, string id, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.StopWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all the hybrid machines in the specified subscription. Use the /// nextLink property in the response to get the next page of hybrid machines. /// </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 <Machine> > ListBySubscriptionNextAsync(this IMachinesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Retrieves information about the model view or the instance view of a hybrid /// 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='name'> /// The name of the hybrid machine. /// </param> /// <param name='expand'> /// The expand expression to apply on the operation. Possible values include: /// 'instanceView' /// </param> public static Machine Get(this IMachinesOperations operations, string resourceGroupName, string name, InstanceViewTypes?expand = default(InstanceViewTypes?)) { return(operations.GetAsync(resourceGroupName, name, expand).GetAwaiter().GetResult()); }
/// <summary> /// List all Machines /// </summary> /// <remarks> /// List all Machines /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='count'> /// </param> public static Eryph.ClientRuntime.IPage <Machine> List(this IMachinesOperations operations, bool?count = default(bool?)) { return(operations.ListAsync(count).GetAwaiter().GetResult()); }
/// <summary> /// List all Machines /// </summary> /// <remarks> /// List all Machines /// </remarks> /// <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 Eryph.ClientRuntime.IPage <Machine> ListNext(this IMachinesOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Creates a new Machine /// </summary> /// <remarks> /// Creates a Machine /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> public static Operation Create(this IMachinesOperations operations, NewMachineRequest body = default(NewMachineRequest)) { return(operations.CreateAsync(body).GetAwaiter().GetResult()); }
/// <summary> /// Stops a Machine /// </summary> /// <remarks> /// Stops a Machine /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> public static Operation Stop(this IMachinesOperations operations, string id) { return(operations.StopAsync(id).GetAwaiter().GetResult()); }
/// <summary> /// Updates a Machine /// </summary> /// <remarks> /// Updates a Machine /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='body'> /// </param> public static Operation Update(this IMachinesOperations operations, string id, System.Guid body) { return(operations.UpdateAsync(id, body).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the hybrid machines in the specified resource group. Use the /// nextLink property in the response to get the next page of hybrid machines. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> public static IPage <Machine> ListByResourceGroup(this IMachinesOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// The operation to remove a hybrid machine identity in Azure. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='name'> /// The name of the hybrid machine. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IMachinesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// The operation to remove a hybrid machine identity in Azure. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='name'> /// The name of the hybrid machine. /// </param> public static void Delete(this IMachinesOperations operations, string resourceGroupName, string name) { operations.DeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); }
/// <summary> /// Lists all the hybrid machines in the specified subscription. Use the /// nextLink property in the response to get the next page of hybrid machines. /// </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 <Machine> ListBySubscriptionNext(this IMachinesOperations operations, string nextPageLink) { return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the hybrid machines in the specified subscription. Use the /// nextLink property in the response to get the next page of hybrid machines. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <Machine> ListBySubscription(this IMachinesOperations operations) { return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult()); }