/// <summary> /// Update automatic tuning properties for target database. /// </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='parameters'> /// The requested automatic tuning resource state. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DatabaseAutomaticTuningInner> UpdateAsync(this IDatabaseAutomaticTuningOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseAutomaticTuningInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a database's automatic tuning. /// </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='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DatabaseAutomaticTuningInner> GetAsync(this IDatabaseAutomaticTuningOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update automatic tuning properties for target database. /// </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='parameters'> /// The requested automatic tuning resource state. /// </param> public static DatabaseAutomaticTuning Update(this IDatabaseAutomaticTuningOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseAutomaticTuning parameters) { return(operations.UpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets a database's automatic tuning. /// </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> public static DatabaseAutomaticTuning Get(this IDatabaseAutomaticTuningOperations operations, string resourceGroupName, string serverName, string databaseName) { return(operations.GetAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult()); }