We recommend using Azure Native.
azure.mssql.ServerSecurityAlertPolicy
Explore with Pulumi AI
Manages a Security Alert Policy for a MSSQL Server.
NOTE Security Alert Policy is currently only available for MS SQL databases.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as azurerm from "@pulumi/azurerm";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleSqlServer = new azurerm.index.SqlServer("example", {
name: "mysqlserver",
resourceGroupName: example.name,
location: example.location,
version: "12.0",
administratorLogin: "4dm1n157r470r",
administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
});
const exampleAccount = new azure.storage.Account("example", {
name: "accteststorageaccount",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "GRS",
});
const exampleServerSecurityAlertPolicy = new azure.mssql.ServerSecurityAlertPolicy("example", {
resourceGroupName: example.name,
serverName: exampleSqlServer.name,
state: "Enabled",
storageEndpoint: exampleAccount.primaryBlobEndpoint,
storageAccountAccessKey: exampleAccount.primaryAccessKey,
disabledAlerts: [
"Sql_Injection",
"Data_Exfiltration",
],
retentionDays: 20,
});
import pulumi
import pulumi_azure as azure
import pulumi_azurerm as azurerm
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_sql_server = azurerm.index.SqlServer("example",
name=mysqlserver,
resource_group_name=example.name,
location=example.location,
version=12.0,
administrator_login=4dm1n157r470r,
administrator_login_password=4-v3ry-53cr37-p455w0rd)
example_account = azure.storage.Account("example",
name="accteststorageaccount",
resource_group_name=example.name,
location=example.location,
account_tier="Standard",
account_replication_type="GRS")
example_server_security_alert_policy = azure.mssql.ServerSecurityAlertPolicy("example",
resource_group_name=example.name,
server_name=example_sql_server["name"],
state="Enabled",
storage_endpoint=example_account.primary_blob_endpoint,
storage_account_access_key=example_account.primary_access_key,
disabled_alerts=[
"Sql_Injection",
"Data_Exfiltration",
],
retention_days=20)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
"github.com/pulumi/pulumi-azurerm/sdk/go/azurerm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleSqlServer, err := azurerm.NewSqlServer(ctx, "example", &azurerm.SqlServerArgs{
Name: "mysqlserver",
ResourceGroupName: example.Name,
Location: example.Location,
Version: "12.0",
AdministratorLogin: "4dm1n157r470r",
AdministratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("accteststorageaccount"),
ResourceGroupName: example.Name,
Location: example.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("GRS"),
})
if err != nil {
return err
}
_, err = mssql.NewServerSecurityAlertPolicy(ctx, "example", &mssql.ServerSecurityAlertPolicyArgs{
ResourceGroupName: example.Name,
ServerName: exampleSqlServer.Name,
State: pulumi.String("Enabled"),
StorageEndpoint: exampleAccount.PrimaryBlobEndpoint,
StorageAccountAccessKey: exampleAccount.PrimaryAccessKey,
DisabledAlerts: pulumi.StringArray{
pulumi.String("Sql_Injection"),
pulumi.String("Data_Exfiltration"),
},
RetentionDays: pulumi.Int(20),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
using Azurerm = Pulumi.Azurerm;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleSqlServer = new Azurerm.Index.SqlServer("example", new()
{
Name = "mysqlserver",
ResourceGroupName = example.Name,
Location = example.Location,
Version = "12.0",
AdministratorLogin = "4dm1n157r470r",
AdministratorLoginPassword = "4-v3ry-53cr37-p455w0rd",
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "accteststorageaccount",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "GRS",
});
var exampleServerSecurityAlertPolicy = new Azure.MSSql.ServerSecurityAlertPolicy("example", new()
{
ResourceGroupName = example.Name,
ServerName = exampleSqlServer.Name,
State = "Enabled",
StorageEndpoint = exampleAccount.PrimaryBlobEndpoint,
StorageAccountAccessKey = exampleAccount.PrimaryAccessKey,
DisabledAlerts = new[]
{
"Sql_Injection",
"Data_Exfiltration",
},
RetentionDays = 20,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azurerm.sqlServer;
import com.pulumi.azurerm.SqlServerArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.mssql.ServerSecurityAlertPolicy;
import com.pulumi.azure.mssql.ServerSecurityAlertPolicyArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleSqlServer = new SqlServer("exampleSqlServer", SqlServerArgs.builder()
.name("mysqlserver")
.resourceGroupName(example.name())
.location(example.location())
.version("12.0")
.administratorLogin("4dm1n157r470r")
.administratorLoginPassword("4-v3ry-53cr37-p455w0rd")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("accteststorageaccount")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("GRS")
.build());
var exampleServerSecurityAlertPolicy = new ServerSecurityAlertPolicy("exampleServerSecurityAlertPolicy", ServerSecurityAlertPolicyArgs.builder()
.resourceGroupName(example.name())
.serverName(exampleSqlServer.name())
.state("Enabled")
.storageEndpoint(exampleAccount.primaryBlobEndpoint())
.storageAccountAccessKey(exampleAccount.primaryAccessKey())
.disabledAlerts(
"Sql_Injection",
"Data_Exfiltration")
.retentionDays(20)
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleSqlServer:
type: azurerm:sqlServer
name: example
properties:
name: mysqlserver
resourceGroupName: ${example.name}
location: ${example.location}
version: '12.0'
administratorLogin: 4dm1n157r470r
administratorLoginPassword: 4-v3ry-53cr37-p455w0rd
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: accteststorageaccount
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: GRS
exampleServerSecurityAlertPolicy:
type: azure:mssql:ServerSecurityAlertPolicy
name: example
properties:
resourceGroupName: ${example.name}
serverName: ${exampleSqlServer.name}
state: Enabled
storageEndpoint: ${exampleAccount.primaryBlobEndpoint}
storageAccountAccessKey: ${exampleAccount.primaryAccessKey}
disabledAlerts:
- Sql_Injection
- Data_Exfiltration
retentionDays: 20
Create ServerSecurityAlertPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerSecurityAlertPolicy(name: string, args: ServerSecurityAlertPolicyArgs, opts?: CustomResourceOptions);
@overload
def ServerSecurityAlertPolicy(resource_name: str,
args: ServerSecurityAlertPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServerSecurityAlertPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
server_name: Optional[str] = None,
state: Optional[str] = None,
disabled_alerts: Optional[Sequence[str]] = None,
email_account_admins: Optional[bool] = None,
email_addresses: Optional[Sequence[str]] = None,
retention_days: Optional[int] = None,
storage_account_access_key: Optional[str] = None,
storage_endpoint: Optional[str] = None)
func NewServerSecurityAlertPolicy(ctx *Context, name string, args ServerSecurityAlertPolicyArgs, opts ...ResourceOption) (*ServerSecurityAlertPolicy, error)
public ServerSecurityAlertPolicy(string name, ServerSecurityAlertPolicyArgs args, CustomResourceOptions? opts = null)
public ServerSecurityAlertPolicy(String name, ServerSecurityAlertPolicyArgs args)
public ServerSecurityAlertPolicy(String name, ServerSecurityAlertPolicyArgs args, CustomResourceOptions options)
type: azure:mssql:ServerSecurityAlertPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ServerSecurityAlertPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ServerSecurityAlertPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServerSecurityAlertPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerSecurityAlertPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerSecurityAlertPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var serverSecurityAlertPolicyResource = new Azure.MSSql.ServerSecurityAlertPolicy("serverSecurityAlertPolicyResource", new()
{
ResourceGroupName = "string",
ServerName = "string",
State = "string",
DisabledAlerts = new[]
{
"string",
},
EmailAccountAdmins = false,
EmailAddresses = new[]
{
"string",
},
RetentionDays = 0,
StorageAccountAccessKey = "string",
StorageEndpoint = "string",
});
example, err := mssql.NewServerSecurityAlertPolicy(ctx, "serverSecurityAlertPolicyResource", &mssql.ServerSecurityAlertPolicyArgs{
ResourceGroupName: pulumi.String("string"),
ServerName: pulumi.String("string"),
State: pulumi.String("string"),
DisabledAlerts: pulumi.StringArray{
pulumi.String("string"),
},
EmailAccountAdmins: pulumi.Bool(false),
EmailAddresses: pulumi.StringArray{
pulumi.String("string"),
},
RetentionDays: pulumi.Int(0),
StorageAccountAccessKey: pulumi.String("string"),
StorageEndpoint: pulumi.String("string"),
})
var serverSecurityAlertPolicyResource = new ServerSecurityAlertPolicy("serverSecurityAlertPolicyResource", ServerSecurityAlertPolicyArgs.builder()
.resourceGroupName("string")
.serverName("string")
.state("string")
.disabledAlerts("string")
.emailAccountAdmins(false)
.emailAddresses("string")
.retentionDays(0)
.storageAccountAccessKey("string")
.storageEndpoint("string")
.build());
server_security_alert_policy_resource = azure.mssql.ServerSecurityAlertPolicy("serverSecurityAlertPolicyResource",
resource_group_name="string",
server_name="string",
state="string",
disabled_alerts=["string"],
email_account_admins=False,
email_addresses=["string"],
retention_days=0,
storage_account_access_key="string",
storage_endpoint="string")
const serverSecurityAlertPolicyResource = new azure.mssql.ServerSecurityAlertPolicy("serverSecurityAlertPolicyResource", {
resourceGroupName: "string",
serverName: "string",
state: "string",
disabledAlerts: ["string"],
emailAccountAdmins: false,
emailAddresses: ["string"],
retentionDays: 0,
storageAccountAccessKey: "string",
storageEndpoint: "string",
});
type: azure:mssql:ServerSecurityAlertPolicy
properties:
disabledAlerts:
- string
emailAccountAdmins: false
emailAddresses:
- string
resourceGroupName: string
retentionDays: 0
serverName: string
state: string
storageAccountAccessKey: string
storageEndpoint: string
ServerSecurityAlertPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ServerSecurityAlertPolicy resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- Server
Name string - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- State string
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - Disabled
Alerts List<string> - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - Email
Account boolAdmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - Email
Addresses List<string> - Specifies an array of email addresses to which the alert is sent.
- Retention
Days int - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - Storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- Storage
Endpoint string - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
- Resource
Group stringName - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- Server
Name string - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- State string
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - Disabled
Alerts []string - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - Email
Account boolAdmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - Email
Addresses []string - Specifies an array of email addresses to which the alert is sent.
- Retention
Days int - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - Storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- Storage
Endpoint string - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
- resource
Group StringName - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- server
Name String - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- state String
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - disabled
Alerts List<String> - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - email
Account BooleanAdmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - email
Addresses List<String> - Specifies an array of email addresses to which the alert is sent.
- retention
Days Integer - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - storage
Account StringAccess Key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- storage
Endpoint String - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
- resource
Group stringName - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- server
Name string - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- state string
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - disabled
Alerts string[] - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - email
Account booleanAdmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - email
Addresses string[] - Specifies an array of email addresses to which the alert is sent.
- retention
Days number - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- storage
Endpoint string - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
- resource_
group_ strname - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- server_
name str - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- state str
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - disabled_
alerts Sequence[str] - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - email_
account_ booladmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - email_
addresses Sequence[str] - Specifies an array of email addresses to which the alert is sent.
- retention_
days int - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - storage_
account_ straccess_ key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- storage_
endpoint str - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
- resource
Group StringName - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- server
Name String - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- state String
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - disabled
Alerts List<String> - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - email
Account BooleanAdmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - email
Addresses List<String> - Specifies an array of email addresses to which the alert is sent.
- retention
Days Number - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - storage
Account StringAccess Key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- storage
Endpoint String - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerSecurityAlertPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ServerSecurityAlertPolicy Resource
Get an existing ServerSecurityAlertPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ServerSecurityAlertPolicyState, opts?: CustomResourceOptions): ServerSecurityAlertPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
disabled_alerts: Optional[Sequence[str]] = None,
email_account_admins: Optional[bool] = None,
email_addresses: Optional[Sequence[str]] = None,
resource_group_name: Optional[str] = None,
retention_days: Optional[int] = None,
server_name: Optional[str] = None,
state: Optional[str] = None,
storage_account_access_key: Optional[str] = None,
storage_endpoint: Optional[str] = None) -> ServerSecurityAlertPolicy
func GetServerSecurityAlertPolicy(ctx *Context, name string, id IDInput, state *ServerSecurityAlertPolicyState, opts ...ResourceOption) (*ServerSecurityAlertPolicy, error)
public static ServerSecurityAlertPolicy Get(string name, Input<string> id, ServerSecurityAlertPolicyState? state, CustomResourceOptions? opts = null)
public static ServerSecurityAlertPolicy get(String name, Output<String> id, ServerSecurityAlertPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Disabled
Alerts List<string> - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - Email
Account boolAdmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - Email
Addresses List<string> - Specifies an array of email addresses to which the alert is sent.
- Resource
Group stringName - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- Retention
Days int - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - Server
Name string - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- State string
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - Storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- Storage
Endpoint string - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
- Disabled
Alerts []string - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - Email
Account boolAdmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - Email
Addresses []string - Specifies an array of email addresses to which the alert is sent.
- Resource
Group stringName - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- Retention
Days int - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - Server
Name string - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- State string
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - Storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- Storage
Endpoint string - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
- disabled
Alerts List<String> - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - email
Account BooleanAdmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - email
Addresses List<String> - Specifies an array of email addresses to which the alert is sent.
- resource
Group StringName - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- retention
Days Integer - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - server
Name String - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- state String
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - storage
Account StringAccess Key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- storage
Endpoint String - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
- disabled
Alerts string[] - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - email
Account booleanAdmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - email
Addresses string[] - Specifies an array of email addresses to which the alert is sent.
- resource
Group stringName - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- retention
Days number - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - server
Name string - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- state string
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- storage
Endpoint string - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
- disabled_
alerts Sequence[str] - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - email_
account_ booladmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - email_
addresses Sequence[str] - Specifies an array of email addresses to which the alert is sent.
- resource_
group_ strname - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- retention_
days int - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - server_
name str - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- state str
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - storage_
account_ straccess_ key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- storage_
endpoint str - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
- disabled
Alerts List<String> - Specifies an array of alerts that are disabled. Allowed values are:
Sql_Injection
,Sql_Injection_Vulnerability
,Access_Anomaly
,Data_Exfiltration
,Unsafe_Action
. - email
Account BooleanAdmins - Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to
false
. - email
Addresses List<String> - Specifies an array of email addresses to which the alert is sent.
- resource
Group StringName - The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
- retention
Days Number - Specifies the number of days to keep in the Threat Detection audit logs. Defaults to
0
. - server
Name String - Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
- state String
- Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are
Disabled
,Enabled
andNew
. - storage
Account StringAccess Key Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use
storage_endpoint
to specify a storage account blob endpoint.NOTE: Please note that storage accounts configured with
shared_access_key_enabled = false
cannot be used to configureazure.mssql.ServerSecurityAlertPolicy
withstorage_endpoint
for now.- storage
Endpoint String - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
Import
MS SQL Server Security Alert Policy can be imported using the resource id
, e.g.
$ pulumi import azure:mssql/serverSecurityAlertPolicy:ServerSecurityAlertPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acceptanceTestResourceGroup1/providers/Microsoft.Sql/servers/mssqlserver/securityAlertPolicies/Default
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.