/// <summary> /// Creates or updates the specified compute policy. During update, the compute /// policy with the specified name will be replaced with this new compute /// policy. An account supports, at most, 50 policies /// </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 Analytics account. /// </param> /// <param name='computePolicyName'> /// The name of the compute policy to create or update. /// </param> /// <param name='parameters'> /// Parameters supplied to create or update the compute policy. The max degree /// of parallelism per job property, min priority per job property, or both /// must be present. /// </param> public static ComputePolicy CreateOrUpdate(this IComputePoliciesOperations operations, string resourceGroupName, string accountName, string computePolicyName, CreateOrUpdateComputePolicyParameters parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, accountName, computePolicyName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates the specified compute policy. During update, the compute /// policy with the specified name will be replaced with this new compute /// policy. An account supports, at most, 50 policies /// </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 Analytics account. /// </param> /// <param name='computePolicyName'> /// The name of the compute policy to create or update. /// </param> /// <param name='parameters'> /// Parameters supplied to create or update the compute policy. The max degree /// of parallelism per job property, min priority per job property, or both /// must be present. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ComputePolicy> CreateOrUpdateAsync(this IComputePoliciesOperations operations, string resourceGroupName, string accountName, string computePolicyName, CreateOrUpdateComputePolicyParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, computePolicyName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }