/// <summary> /// Gets the specified IpAllocation by resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='ipAllocationName'> /// The name of the IpAllocation. /// </param> /// <param name='expand'> /// Expands referenced resources. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IpAllocation> GetAsync(this IIpAllocationsOperations operations, string resourceGroupName, string ipAllocationName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, ipAllocationName, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all IpAllocations in a subscription. /// </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 <IpAllocation> > ListNextAsync(this IIpAllocationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates an IpAllocation in the specified resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='ipAllocationName'> /// The name of the IpAllocation. /// </param> /// <param name='parameters'> /// Parameters supplied to the create or update virtual network operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IpAllocation> BeginCreateOrUpdateAsync(this IIpAllocationsOperations operations, string resourceGroupName, string ipAllocationName, IpAllocation parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, ipAllocationName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all IpAllocations in a resource group. /// </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 <IpAllocation> > ListByResourceGroupAsync(this IIpAllocationsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the specified IpAllocation by resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='ipAllocationName'> /// The name of the IpAllocation. /// </param> /// <param name='expand'> /// Expands referenced resources. /// </param> public static IpAllocation Get(this IIpAllocationsOperations operations, string resourceGroupName, string ipAllocationName, string expand = default(string)) { return(operations.GetAsync(resourceGroupName, ipAllocationName, expand).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the specified IpAllocation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='ipAllocationName'> /// The name of the IpAllocation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IIpAllocationsOperations operations, string resourceGroupName, string ipAllocationName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, ipAllocationName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets all IpAllocations in a resource group. /// </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 <IpAllocation> ListByResourceGroupNext(this IIpAllocationsOperations operations, string nextPageLink) { return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the specified IpAllocation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='ipAllocationName'> /// The name of the IpAllocation. /// </param> public static void Delete(this IIpAllocationsOperations operations, string resourceGroupName, string ipAllocationName) { operations.DeleteAsync(resourceGroupName, ipAllocationName).GetAwaiter().GetResult(); }
/// <summary> /// Creates or updates an IpAllocation in the specified resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='ipAllocationName'> /// The name of the IpAllocation. /// </param> /// <param name='parameters'> /// Parameters supplied to the create or update virtual network operation. /// </param> public static IpAllocation BeginCreateOrUpdate(this IIpAllocationsOperations operations, string resourceGroupName, string ipAllocationName, IpAllocation parameters) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, ipAllocationName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets all IpAllocations in a resource group. /// </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 <IpAllocation> ListByResourceGroup(this IIpAllocationsOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Gets all IpAllocations in a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <IpAllocation> List(this IIpAllocationsOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// Updates a IpAllocation tags. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='ipAllocationName'> /// The name of the IpAllocation. /// </param> /// <param name='parameters'> /// Parameters supplied to update IpAllocation tags. /// </param> public static IpAllocation UpdateTags(this IIpAllocationsOperations operations, string resourceGroupName, string ipAllocationName, TagsObject parameters) { return(operations.UpdateTagsAsync(resourceGroupName, ipAllocationName, parameters).GetAwaiter().GetResult()); }