/// <summary> /// Create or replace an existing Formula. 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='name'> /// The name of the formula. /// </param> /// <param name='formula'> /// A formula for creating a VM, specifying an image base and other parameters /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Formula> BeginCreateOrUpdateAsync(this IFormulasOperations operations, string resourceGroupName, string labName, string name, Formula formula, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, name, formula, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List formulas in a given lab. /// </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='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Formula> > ListAsync(this IFormulasOperations operations, string resourceGroupName, string labName, ODataQuery <Formula> odataQuery = default(ODataQuery <Formula>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List formulas in a given lab. /// </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 <Formula> > ListNextAsync(this IFormulasOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get formula. /// </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='name'> /// The name of the formula. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($select=description)' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Formula> GetAsync(this IFormulasOperations operations, string resourceGroupName, string labName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get formula. /// </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='name'> /// The name of the formula. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($select=description)' /// </param> public static Formula Get(this IFormulasOperations operations, string resourceGroupName, string labName, string name, string expand = default(string)) { return(operations.GetAsync(resourceGroupName, labName, name, expand).GetAwaiter().GetResult()); }
/// <summary> /// List formulas in a given lab. /// </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='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <Formula> List(this IFormulasOperations operations, string resourceGroupName, string labName, ODataQuery <Formula> odataQuery = default(ODataQuery <Formula>)) { return(operations.ListAsync(resourceGroupName, labName, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// List formulas in a given lab. /// </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 <Formula> ListNext(this IFormulasOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Create or replace an existing Formula. 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='name'> /// The name of the formula. /// </param> /// <param name='formula'> /// A formula for creating a VM, specifying an image base and other parameters /// </param> public static Formula BeginCreateOrUpdate(this IFormulasOperations operations, string resourceGroupName, string labName, string name, Formula formula) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, labName, name, formula).GetAwaiter().GetResult()); }
/// <summary> /// Delete formula. /// </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='name'> /// The name of the formula. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IFormulasOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Delete formula. /// </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='name'> /// The name of the formula. /// </param> public static void Delete(this IFormulasOperations operations, string resourceGroupName, string labName, string name) { operations.DeleteAsync(resourceGroupName, labName, name).GetAwaiter().GetResult(); }