/// <summary> /// Gets all the load balancers 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> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <LoadBalancerInner> > ListNextAsync(this ILoadBalancersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the specified load balancer. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the load balancer. /// </param> /// <param name='expand'> /// Expands referenced resources. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LoadBalancerInner> GetAsync(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, loadBalancerName, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all the load balancers 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 <LoadBalancer> > ListAsync(this ILoadBalancersOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates a load balancer. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the load balancer. /// </param> /// <param name='parameters'> /// Parameters supplied to the create or update load balancer operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LoadBalancerInner> BeginCreateOrUpdateAsync(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName, LoadBalancerInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, loadBalancerName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates a load balancer 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='loadBalancerName'> /// The name of the load balancer. /// </param> /// <param name='tags'> /// Resource tags. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LoadBalancerInner> UpdateTagsAsync(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, loadBalancerName, tags, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all the load balancers 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 <LoadBalancer> List(this ILoadBalancersOperations operations, string resourceGroupName) { return(operations.ListAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Gets all the load balancers in a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <LoadBalancer> ListAll(this ILoadBalancersOperations operations) { return(operations.ListAllAsync().GetAwaiter().GetResult()); }
/// <summary> /// Updates a load balancer 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='loadBalancerName'> /// The name of the load balancer. /// </param> /// <param name='parameters'> /// Parameters supplied to update load balancer tags. /// </param> public static LoadBalancer UpdateTags(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName, TagsObject parameters) { return(operations.UpdateTagsAsync(resourceGroupName, loadBalancerName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// The delete LoadBalancer operation deletes the specified load balancer. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the loadBalancer. /// </param> public static void BeginDelete(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName) { Task.Factory.StartNew(s => ((ILoadBalancersOperations)s).BeginDeleteAsync(resourceGroupName, loadBalancerName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// The List loadBalancer operation retrieves all the load balancers 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 <LoadBalancer> ListNext(this ILoadBalancersOperations operations, string nextPageLink) { return(Task.Factory.StartNew(s => ((ILoadBalancersOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// List of inbound NAT rule port mappings. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the load balancer. /// </param> /// <param name='backendPoolName'> /// The name of the load balancer backend address pool. /// </param> /// <param name='parameters'> /// Query inbound NAT rule port mapping request. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <BackendAddressInboundNatRulePortMappings> BeginListInboundNatRulePortMappingsAsync(this ILoadBalancersOperations operations, string groupName, string loadBalancerName, string backendPoolName, QueryInboundNatRulePortMappingRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginListInboundNatRulePortMappingsWithHttpMessagesAsync(groupName, loadBalancerName, backendPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get a list of all load balancers. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='inlineCount'> /// OData inline count parameter. /// </param> public static IPage <LoadBalancer> List(this ILoadBalancersOperations operations, ODataQuery <LoadBalancer> odataQuery = default(ODataQuery <LoadBalancer>), string inlineCount = default(string)) { return(operations.ListAsync(odataQuery, inlineCount).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the specified load balancer. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the load balancer. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, loadBalancerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Creates or updates a load balancer. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the load balancer. /// </param> /// <param name='parameters'> /// Parameters supplied to the create or update load balancer operation. /// </param> public static LoadBalancer BeginCreateOrUpdate(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName, LoadBalancer parameters) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, loadBalancerName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// The List loadBalancer opertion retrieves all the loadbalancers 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 <LoadBalancer> > ListAllNextAsync(this ILoadBalancersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { AzureOperationResponse <IPage <LoadBalancer> > result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return(result.Body); }
/// <summary> /// The Put LoadBalancer operation creates/updates a LoadBalancer /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the loadBalancer. /// </param> /// <param name='parameters'> /// Parameters supplied to the create/delete LoadBalancer operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LoadBalancer> CreateOrUpdateAsync(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName, LoadBalancer parameters, CancellationToken cancellationToken = default(CancellationToken)) { AzureOperationResponse <LoadBalancer> result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, loadBalancerName, parameters, null, cancellationToken).ConfigureAwait(false); return(result.Body); }
/// <summary> /// Swaps VIPs between two load balancers. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// The region where load balancers are located at. /// </param> /// <param name='parameters'> /// Parameters that define which VIPs should be swapped. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginSwapPublicIpAddressesAsync(this ILoadBalancersOperations operations, string location, LoadBalancerVipSwapRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginSwapPublicIpAddressesWithHttpMessagesAsync(location, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Swaps VIPs between two load balancers. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// The region where load balancers are located at. /// </param> /// <param name='parameters'> /// Parameters that define which VIPs should be swapped. /// </param> public static void BeginSwapPublicIpAddresses(this ILoadBalancersOperations operations, string location, LoadBalancerVipSwapRequest parameters) { operations.BeginSwapPublicIpAddressesAsync(location, parameters).GetAwaiter().GetResult(); }
/// <summary> /// Deletes the specified load balancer. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the load balancer. /// </param> public static void Delete(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName) { operations.DeleteAsync(resourceGroupName, loadBalancerName).GetAwaiter().GetResult(); }
/// <summary> /// The Get LoadBalancer operation retrieves information about the specified /// LoadBalancer. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the loadBalancer. /// </param> /// <param name='expand'> /// expand references resources. /// </param> public static LoadBalancer Get(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName, string expand = default(string)) { return(Task.Factory.StartNew(s => ((ILoadBalancersOperations)s).GetAsync(resourceGroupName, loadBalancerName, expand), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets the specified load balancer. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the load balancer. /// </param> /// <param name='expand'> /// Expands referenced resources. /// </param> public static LoadBalancer Get(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName, string expand = default(string)) { return(operations.GetAsync(resourceGroupName, loadBalancerName, expand).GetAwaiter().GetResult()); }
/// <summary> /// The Put LoadBalancer operation creates/updates a LoadBalancer /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the loadBalancer. /// </param> /// <param name='parameters'> /// Parameters supplied to the create/delete LoadBalancer operation /// </param> public static LoadBalancer BeginCreateOrUpdate(this ILoadBalancersOperations operations, string resourceGroupName, string loadBalancerName, LoadBalancer parameters) { return(Task.Factory.StartNew(s => ((ILoadBalancersOperations)s).BeginCreateOrUpdateAsync(resourceGroupName, loadBalancerName, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Get a list of all load balancers. /// </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 <LoadBalancer> ListNext(this ILoadBalancersOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// List of inbound NAT rule port mappings. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupName'> /// The name of the resource group. /// </param> /// <param name='loadBalancerName'> /// The name of the load balancer. /// </param> /// <param name='backendPoolName'> /// The name of the load balancer backend address pool. /// </param> /// <param name='parameters'> /// Query inbound NAT rule port mapping request. /// </param> public static BackendAddressInboundNatRulePortMappings BeginListInboundNatRulePortMappings(this ILoadBalancersOperations operations, string groupName, string loadBalancerName, string backendPoolName, QueryInboundNatRulePortMappingRequest parameters) { return(operations.BeginListInboundNatRulePortMappingsAsync(groupName, loadBalancerName, backendPoolName, parameters).GetAwaiter().GetResult()); }