-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for Autotuning API (#4015)
* Added support for Autotuning API * Metadata change in sql_resource-manager.txt
- Loading branch information
1 parent
0194810
commit 6691f63
Showing
23 changed files
with
4,046 additions
and
8 deletions.
There are no files selected for viewing
476 changes: 476 additions & 0 deletions
476
src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseAutomaticTuningOperations.cs
Large diffs are not rendered by default.
Oops, something went wrong.
127 changes: 127 additions & 0 deletions
127
...DKs/SqlManagement/Management.Sql/Generated/DatabaseAutomaticTuningOperationsExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
// <auto-generated> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.Sql | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// Extension methods for DatabaseAutomaticTuningOperations. | ||
/// </summary> | ||
public static partial class DatabaseAutomaticTuningOperationsExtensions | ||
{ | ||
/// <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(); | ||
} | ||
|
||
/// <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<DatabaseAutomaticTuning> GetAsync(this IDatabaseAutomaticTuningOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, 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> | ||
/// 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<DatabaseAutomaticTuning> UpdateAsync(this IDatabaseAutomaticTuningOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseAutomaticTuning parameters, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
|
||
} | ||
} |
90 changes: 90 additions & 0 deletions
90
src/SDKs/SqlManagement/Management.Sql/Generated/IDatabaseAutomaticTuningOperations.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
// <auto-generated> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.Sql | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// DatabaseAutomaticTuningOperations operations. | ||
/// </summary> | ||
public partial interface IDatabaseAutomaticTuningOperations | ||
{ | ||
/// <summary> | ||
/// Gets a database's automatic tuning. | ||
/// </summary> | ||
/// <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='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="Microsoft.Rest.Azure.CloudException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<DatabaseAutomaticTuning>> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Update automatic tuning properties for target database. | ||
/// </summary> | ||
/// <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='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="Microsoft.Rest.Azure.CloudException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<DatabaseAutomaticTuning>> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseAutomaticTuning parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
} | ||
} |
84 changes: 84 additions & 0 deletions
84
src/SDKs/SqlManagement/Management.Sql/Generated/IServerAutomaticTuningOperations.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// <auto-generated> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.Sql | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// ServerAutomaticTuningOperations operations. | ||
/// </summary> | ||
public partial interface IServerAutomaticTuningOperations | ||
{ | ||
/// <summary> | ||
/// Retrieves server automatic tuning options. | ||
/// </summary> | ||
/// <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='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="Microsoft.Rest.Azure.CloudException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<ServerAutomaticTuning>> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Update automatic tuning options on server. | ||
/// </summary> | ||
/// <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='parameters'> | ||
/// The requested automatic tuning resource state. | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="Microsoft.Rest.Azure.CloudException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<ServerAutomaticTuning>> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, ServerAutomaticTuning parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.