ServerAdvisorArgs

data class ServerAdvisorArgs(val advisorName: Output<String>? = null, val autoExecuteStatus: Output<AutoExecuteStatus>? = null, val resourceGroupName: Output<String>? = null, val serverName: Output<String>? = null) : ConvertibleToJava<ServerAdvisorArgs>

Database, Server or Elastic Pool Advisor. Uses Azure REST API version 2021-11-01. In version 1.x of the Azure Native provider, it used API version 2020-11-01-preview. Other available API versions: 2014-04-01, 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01, 2023-08-01-preview, 2024-05-01-preview.

Example Usage

Update server advisor

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var serverAdvisor = new AzureNative.Sql.ServerAdvisor("serverAdvisor", new()
{
AdvisorName = "CreateIndex",
AutoExecuteStatus = AzureNative.Sql.AutoExecuteStatus.Disabled,
ResourceGroupName = "workloadinsight-demos",
ServerName = "misosisvr",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewServerAdvisor(ctx, "serverAdvisor", &sql.ServerAdvisorArgs{
AdvisorName: pulumi.String("CreateIndex"),
AutoExecuteStatus: sql.AutoExecuteStatusDisabled,
ResourceGroupName: pulumi.String("workloadinsight-demos"),
ServerName: pulumi.String("misosisvr"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.ServerAdvisor;
import com.pulumi.azurenative.sql.ServerAdvisorArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var serverAdvisor = new ServerAdvisor("serverAdvisor", ServerAdvisorArgs.builder()
.advisorName("CreateIndex")
.autoExecuteStatus("Disabled")
.resourceGroupName("workloadinsight-demos")
.serverName("misosisvr")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:sql:ServerAdvisor CreateIndex /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}

Constructors

Link copied to clipboard
constructor(advisorName: Output<String>? = null, autoExecuteStatus: Output<AutoExecuteStatus>? = null, resourceGroupName: Output<String>? = null, serverName: Output<String>? = null)

Properties

Link copied to clipboard
val advisorName: Output<String>? = null

The name of the Server Advisor.

Link copied to clipboard

Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

Link copied to clipboard
val serverName: Output<String>? = null

The name of the server.

Functions

Link copied to clipboard
open override fun toJava(): ServerAdvisorArgs