Пример #1
0
 /// <summary>
 /// Gets a list of database advisors.
 /// </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='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='expand'>
 /// The child resources to include in the response.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <Advisor> > ListByDatabaseAsync(this IDatabaseAdvisorsOperations operations, string resourceGroupName, string serverName, string databaseName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 /// <summary>
 /// Updates a database advisor.
 /// </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='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='advisorName'>
 /// The name of the Database Advisor.
 /// </param>
 /// <param name='parameters'>
 /// The requested advisor resource state.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Advisor> UpdateAsync(this IDatabaseAdvisorsOperations operations, string resourceGroupName, string serverName, string databaseName, string advisorName, Advisor parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, advisorName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #3
0
 /// <summary>
 /// Gets a database advisor.
 /// </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='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='advisorName'>
 /// The name of the Database Advisor.
 /// </param>
 public static Advisor Get(this IDatabaseAdvisorsOperations operations, string resourceGroupName, string serverName, string databaseName, string advisorName)
 {
     return(operations.GetAsync(resourceGroupName, serverName, databaseName, advisorName).GetAwaiter().GetResult());
 }
Пример #4
0
 /// <summary>
 /// Gets a list of database advisors.
 /// </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='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='expand'>
 /// The child resources to include in the response.
 /// </param>
 public static IList <Advisor> ListByDatabase(this IDatabaseAdvisorsOperations operations, string resourceGroupName, string serverName, string databaseName, string expand = default(string))
 {
     return(operations.ListByDatabaseAsync(resourceGroupName, serverName, databaseName, expand).GetAwaiter().GetResult());
 }
Пример #5
0
 /// <summary>
 /// Updates a database advisor.
 /// </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='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='advisorName'>
 /// The name of the Database Advisor.
 /// </param>
 /// <param name='parameters'>
 /// The requested advisor resource state.
 /// </param>
 public static Advisor Update(this IDatabaseAdvisorsOperations operations, string resourceGroupName, string serverName, string databaseName, string advisorName, Advisor parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, serverName, databaseName, advisorName, parameters).GetAwaiter().GetResult());
 }