Esempio n. 1
0
        /// <summary>
        /// Gets a list of Azure Sql Recommended Elastic Pool.
        /// </summary>
        /// <param name="resourceGroupName">The name of the resource group</param>
        /// <param name="serverName">The name of the Azure Sql Database Server</param>
        /// <returns>A list of database objects</returns>
        internal ICollection <UpgradeRecommendedElasticPoolProperties> ListRecommendedElasticPoolProperties(string resourceGroupName, string serverName)
        {
            var resp = RecommendationCommunicator.ListExpanded(resourceGroupName, serverName, "databases", Util.GenerateTracingId());

            return(resp.Select(CreateRecommendedElasticPoolPropertiesFromResponse).ToList());
        }
Esempio n. 2
0
        /// <summary>
        /// Gets a database in an recommended elastic pool
        /// </summary>
        /// <param name="resourceGroupName">The name of the resource group</param>
        /// <param name="serverName">The name of the Azure Sql Database Server</param>
        /// <param name="poolName">The name of the Azure Sql RecommendedElasticPool</param>
        /// <param name="databaseName">The name of the database</param>
        /// <returns></returns>
        public AzureSqlDatabaseModel GetElasticPoolRecommendationDatabase(string resourceGroupName, string serverName, string poolName, string databaseName)
        {
            var resp = RecommendationCommunicator.GetDatabase(resourceGroupName, serverName, poolName, databaseName, Util.GenerateTracingId());

            return(AzureSqlDatabaseAdapter.CreateDatabaseModelFromResponse(resourceGroupName, serverName, resp));
        }
Esempio n. 3
0
        /// <summary>
        /// Gets a list of Azure Sql Recommended Elastic Pool.
        /// </summary>
        /// <param name="resourceGroupName">The name of the resource group</param>
        /// <param name="serverName">The name of the Azure Sql Database Server</param>
        /// <returns>A list of database objects</returns>
        internal ICollection <AzureSqlElasticPoolRecommendationModel> ListElasticPoolRecommendations(string resourceGroupName, string serverName)
        {
            var resp = RecommendationCommunicator.List(resourceGroupName, serverName, Util.GenerateTracingId());

            return(resp.Select((db) => CreateRecommendedElasticPoolModelFromResponse(resourceGroupName, serverName, db)).ToList());
        }
Esempio n. 4
0
        /// <summary>
        /// Gets an Azure Sql Recommended Elastic Pool by name.
        /// </summary>
        /// <param name="resourceGroupName">The name of the resource group</param>
        /// <param name="serverName">The name of the Azure Sql Database Server</param>
        /// <param name="poolName">The name of the Azure Sql Database RecommendedElasticPool</param>
        /// <returns>The Azure Sql Database RecommendedElasticPool object</returns>
        internal AzureSqlElasticPoolRecommendationModel GetElasticPoolRecommendation(string resourceGroupName, string serverName, string poolName)
        {
            var resp = RecommendationCommunicator.Get(resourceGroupName, serverName, poolName, Util.GenerateTracingId());

            return(CreateRecommendedElasticPoolModelFromResponse(resourceGroupName, serverName, resp));
        }
Esempio n. 5
0
        /// <summary>
        /// Gets a list of Recommended Elastic Pool Metrics
        /// </summary>
        /// <param name="resourceGroupName">The name of the resource group</param>
        /// <param name="serverName">The name of the Azure Sql Database Server</param>
        /// <param name="poolName">The name of the recommended elastic pool</param>
        /// <returns>A list of RecommendedElastic Pool Activities</returns>
        internal IList <AzureSqlElasticPoolRecommendationMetricModel> GetElasticPoolRecommendationMetrics(string resourceGroupName, string serverName, string poolName)
        {
            var resp = RecommendationCommunicator.ListMetrics(resourceGroupName, serverName, poolName, Util.GenerateTracingId());

            return(resp.Select(CreateMetricModelFromResponse).ToList());
        }
Esempio n. 6
0
        /// <summary>
        /// Gets a list of Azure Sql Databases in an RecommendedElasticPool.
        /// </summary>
        /// <param name="resourceGroupName">The name of the resource group</param>
        /// <param name="serverName">The name of the Azure Sql Database Server</param>
        /// <param name="poolName">The name of the recommended elastic pool the database are in</param>
        /// <returns>A list of database objects</returns>
        internal ICollection <AzureSqlDatabaseModel> ListElasticPoolRecommendationDatabases(string resourceGroupName, string serverName, string poolName)
        {
            var resp = RecommendationCommunicator.ListDatabases(resourceGroupName, serverName, poolName, Util.GenerateTracingId());

            return(resp.Select((db) => AzureSqlDatabaseAdapter.CreateDatabaseModelFromResponse(resourceGroupName, serverName, db)).ToList());
        }