/// <summary> /// Creates or updates the specified virtual network rule. During update, the /// virtual network rule with the specified name will be replaced with this new /// virtual network rule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the Azure resource group. /// </param> /// <param name='accountName'> /// The name of the Data Lake Store account. /// </param> /// <param name='virtualNetworkRuleName'> /// The name of the virtual network rule to create or update. /// </param> /// <param name='parameters'> /// Parameters supplied to create or update the virtual network rule. /// </param> public static VirtualNetworkRule CreateOrUpdate(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string accountName, string virtualNetworkRuleName, CreateOrUpdateVirtualNetworkRuleParameters parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, accountName, virtualNetworkRuleName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates the specified virtual network rule. During update, the /// virtual network rule with the specified name will be replaced with this new /// virtual network rule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the Azure resource group. /// </param> /// <param name='accountName'> /// The name of the Data Lake Store account. /// </param> /// <param name='virtualNetworkRuleName'> /// The name of the virtual network rule to create or update. /// </param> /// <param name='parameters'> /// Parameters supplied to create or update the virtual network rule. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <VirtualNetworkRule> CreateOrUpdateAsync(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string accountName, string virtualNetworkRuleName, CreateOrUpdateVirtualNetworkRuleParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, virtualNetworkRuleName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }