/// <summary> /// Begins creating a new Azure SQL Database Elastic Pool or updating /// an existing Azure SQL Database Elastic Pool. To determine the /// status of the operation call GetElasticPoolOperationStatus. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.IElasticPoolOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the Resource Group to which the Azure SQL /// Database Server belongs. /// </param> /// <param name='serverName'> /// Required. The name of the Azure SQL Database Server on which the /// database is hosted. /// </param> /// <param name='elasticPoolName'> /// Required. The name of the Azure SQL Database Elastic Pool to be /// operated on (Updated or created). /// </param> /// <param name='parameters'> /// Required. The required parameters for createing or updating an /// Elastic Pool. /// </param> /// <returns> /// Response for long running Azure Sql Database Elastic Pool operation. /// </returns> public static ElasticPoolCreateOrUpdateResponse BeginCreateOrUpdate(this IElasticPoolOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolCreateOrUpdateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IElasticPoolOperations)s).BeginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates an Elastic Pool /// </summary> public Management.Sql.Models.ElasticPool CreateOrUpdate(string resourceGroupName, string serverName, string elasticPoolName, string clientRequestId, ElasticPoolCreateOrUpdateParameters parameters) { var resp = GetCurrentSqlClient(clientRequestId).ElasticPools.CreateOrUpdate(resourceGroupName, serverName, elasticPoolName, parameters); return(resp.ElasticPool); }
/// <summary> /// Creates a new Azure SQL Database Elastic Pool or updates an /// existing Azure SQL Database Elastic Pool. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.IElasticPoolOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the Resource Group to which the Azure SQL /// Database Server belongs. /// </param> /// <param name='serverName'> /// Required. The name of the Azure SQL Database Server on which the /// Azure SQL Database Elastic Pool is hosted. /// </param> /// <param name='elasticPoolName'> /// Required. The name of the Azure SQL Database Elastic Pool to be /// operated on (updated or created). /// </param> /// <param name='parameters'> /// Required. The required parameters for createing or updating an /// Azure Sql Databaser Elastic Pool. /// </param> /// <returns> /// Response for long running Azure Sql Database Elastic Pool operation. /// </returns> public static Task <ElasticPoolCreateOrUpdateResponse> CreateOrUpdateAsync(this IElasticPoolOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolCreateOrUpdateParameters parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, CancellationToken.None)); }