/// <summary> /// Retrieves server automatic tuning options. /// </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='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServerAutomaticTuning> GetAsync(this IServerAutomaticTuningOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update automatic tuning options on server. /// </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='parameters'> /// The requested automatic tuning resource state. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServerAutomaticTuningInner> UpdateAsync(this IServerAutomaticTuningOperations operations, string resourceGroupName, string serverName, ServerAutomaticTuningInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, parameters, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update automatic tuning options on server. /// </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='parameters'> /// The requested automatic tuning resource state. /// </param> public static ServerAutomaticTuning Update(this IServerAutomaticTuningOperations operations, string resourceGroupName, string serverName, ServerAutomaticTuning parameters) { return(operations.UpdateAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Retrieves server automatic tuning options. /// </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> public static ServerAutomaticTuning Get(this IServerAutomaticTuningOperations operations, string resourceGroupName, string serverName) { return(operations.GetAsync(resourceGroupName, serverName).GetAwaiter().GetResult()); }