public virtual ElasticPoolsUpdateOperation StartUpdate(string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { throw new ArgumentNullException(nameof(resourceGroupName)); } if (serverName == null) { throw new ArgumentNullException(nameof(serverName)); } if (elasticPoolName == null) { throw new ArgumentNullException(nameof(elasticPoolName)); } if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } using var scope = _clientDiagnostics.CreateScope("ElasticPoolsOperations.StartUpdate"); scope.Start(); try { var originalResponse = RestClient.Update(resourceGroupName, serverName, elasticPoolName, parameters, cancellationToken); return(new ElasticPoolsUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpdateRequest(resourceGroupName, serverName, elasticPoolName, parameters).Request, originalResponse)); } catch (Exception e) { scope.Failed(e); throw; } }
/// <summary> /// Updates an elastic pool. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> /// <param name='elasticPoolName'> /// The name of the elastic pool. /// </param> /// <param name='parameters'> /// The elastic pool update parameters. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ElasticPool> BeginUpdateAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates an Elastic Pool using Patch /// </summary> public Management.Sql.Models.ElasticPool CreateOrUpdate(string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters) { return(GetCurrentSqlClient().ElasticPools.Update(resourceGroupName, serverName, elasticPoolName, parameters)); }
/// <summary> /// Updates an elastic pool. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> /// <param name='elasticPoolName'> /// The name of the elastic pool. /// </param> /// <param name='parameters'> /// The elastic pool update parameters. /// </param> public static ElasticPool BeginUpdate(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdate parameters) { return(operations.BeginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).GetAwaiter().GetResult()); }