1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. DatabaseThreatDetectionPolicy
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi

azure-native.sql.DatabaseThreatDetectionPolicy

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi

    Contains information about a database Threat Detection policy. Azure REST API version: 2014-04-01.

    Example Usage

    Create database security alert policy max

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var databaseThreatDetectionPolicy = new AzureNative.Sql.DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicy", new()
        {
            DatabaseName = "testdb",
            DisabledAlerts = "Sql_Injection;Usage_Anomaly;",
            EmailAccountAdmins = AzureNative.Sql.SecurityAlertPolicyEmailAccountAdmins.Enabled,
            EmailAddresses = "test@microsoft.com;user@microsoft.com",
            ResourceGroupName = "securityalert-4799",
            RetentionDays = 6,
            SecurityAlertPolicyName = "default",
            ServerName = "securityalert-6440",
            State = AzureNative.Sql.SecurityAlertPolicyState.Enabled,
            StorageAccountAccessKey = "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
            StorageEndpoint = "https://mystorage.blob.core.windows.net",
            UseServerDefault = AzureNative.Sql.SecurityAlertPolicyUseServerDefault.Enabled,
        });
    
    });
    
    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.NewDatabaseThreatDetectionPolicy(ctx, "databaseThreatDetectionPolicy", &sql.DatabaseThreatDetectionPolicyArgs{
    			DatabaseName:            pulumi.String("testdb"),
    			DisabledAlerts:          pulumi.String("Sql_Injection;Usage_Anomaly;"),
    			EmailAccountAdmins:      pulumi.String(sql.SecurityAlertPolicyEmailAccountAdminsEnabled),
    			EmailAddresses:          pulumi.String("test@microsoft.com;user@microsoft.com"),
    			ResourceGroupName:       pulumi.String("securityalert-4799"),
    			RetentionDays:           pulumi.Int(6),
    			SecurityAlertPolicyName: pulumi.String("default"),
    			ServerName:              pulumi.String("securityalert-6440"),
    			State:                   pulumi.String(sql.SecurityAlertPolicyStateEnabled),
    			StorageAccountAccessKey: pulumi.String("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="),
    			StorageEndpoint:         pulumi.String("https://mystorage.blob.core.windows.net"),
    			UseServerDefault:        pulumi.String(sql.SecurityAlertPolicyUseServerDefaultEnabled),
    		})
    		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.DatabaseThreatDetectionPolicy;
    import com.pulumi.azurenative.sql.DatabaseThreatDetectionPolicyArgs;
    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 databaseThreatDetectionPolicy = new DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicy", DatabaseThreatDetectionPolicyArgs.builder()
                .databaseName("testdb")
                .disabledAlerts("Sql_Injection;Usage_Anomaly;")
                .emailAccountAdmins("Enabled")
                .emailAddresses("test@microsoft.com;user@microsoft.com")
                .resourceGroupName("securityalert-4799")
                .retentionDays(6)
                .securityAlertPolicyName("default")
                .serverName("securityalert-6440")
                .state("Enabled")
                .storageAccountAccessKey("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
                .storageEndpoint("https://mystorage.blob.core.windows.net")
                .useServerDefault("Enabled")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    database_threat_detection_policy = azure_native.sql.DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicy",
        database_name="testdb",
        disabled_alerts="Sql_Injection;Usage_Anomaly;",
        email_account_admins=azure_native.sql.SecurityAlertPolicyEmailAccountAdmins.ENABLED,
        email_addresses="test@microsoft.com;user@microsoft.com",
        resource_group_name="securityalert-4799",
        retention_days=6,
        security_alert_policy_name="default",
        server_name="securityalert-6440",
        state=azure_native.sql.SecurityAlertPolicyState.ENABLED,
        storage_account_access_key="sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
        storage_endpoint="https://mystorage.blob.core.windows.net",
        use_server_default=azure_native.sql.SecurityAlertPolicyUseServerDefault.ENABLED)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const databaseThreatDetectionPolicy = new azure_native.sql.DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicy", {
        databaseName: "testdb",
        disabledAlerts: "Sql_Injection;Usage_Anomaly;",
        emailAccountAdmins: azure_native.sql.SecurityAlertPolicyEmailAccountAdmins.Enabled,
        emailAddresses: "test@microsoft.com;user@microsoft.com",
        resourceGroupName: "securityalert-4799",
        retentionDays: 6,
        securityAlertPolicyName: "default",
        serverName: "securityalert-6440",
        state: azure_native.sql.SecurityAlertPolicyState.Enabled,
        storageAccountAccessKey: "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
        storageEndpoint: "https://mystorage.blob.core.windows.net",
        useServerDefault: azure_native.sql.SecurityAlertPolicyUseServerDefault.Enabled,
    });
    
    resources:
      databaseThreatDetectionPolicy:
        type: azure-native:sql:DatabaseThreatDetectionPolicy
        properties:
          databaseName: testdb
          disabledAlerts: Sql_Injection;Usage_Anomaly;
          emailAccountAdmins: Enabled
          emailAddresses: test@microsoft.com;user@microsoft.com
          resourceGroupName: securityalert-4799
          retentionDays: 6
          securityAlertPolicyName: default
          serverName: securityalert-6440
          state: Enabled
          storageAccountAccessKey: sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==
          storageEndpoint: https://mystorage.blob.core.windows.net
          useServerDefault: Enabled
    

    Create database security alert policy min

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var databaseThreatDetectionPolicy = new AzureNative.Sql.DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicy", new()
        {
            DatabaseName = "testdb",
            ResourceGroupName = "securityalert-4799",
            SecurityAlertPolicyName = "default",
            ServerName = "securityalert-6440",
            State = AzureNative.Sql.SecurityAlertPolicyState.Enabled,
            StorageAccountAccessKey = "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
            StorageEndpoint = "https://mystorage.blob.core.windows.net",
        });
    
    });
    
    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.NewDatabaseThreatDetectionPolicy(ctx, "databaseThreatDetectionPolicy", &sql.DatabaseThreatDetectionPolicyArgs{
    			DatabaseName:            pulumi.String("testdb"),
    			ResourceGroupName:       pulumi.String("securityalert-4799"),
    			SecurityAlertPolicyName: pulumi.String("default"),
    			ServerName:              pulumi.String("securityalert-6440"),
    			State:                   pulumi.String(sql.SecurityAlertPolicyStateEnabled),
    			StorageAccountAccessKey: pulumi.String("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="),
    			StorageEndpoint:         pulumi.String("https://mystorage.blob.core.windows.net"),
    		})
    		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.DatabaseThreatDetectionPolicy;
    import com.pulumi.azurenative.sql.DatabaseThreatDetectionPolicyArgs;
    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 databaseThreatDetectionPolicy = new DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicy", DatabaseThreatDetectionPolicyArgs.builder()
                .databaseName("testdb")
                .resourceGroupName("securityalert-4799")
                .securityAlertPolicyName("default")
                .serverName("securityalert-6440")
                .state("Enabled")
                .storageAccountAccessKey("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
                .storageEndpoint("https://mystorage.blob.core.windows.net")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    database_threat_detection_policy = azure_native.sql.DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicy",
        database_name="testdb",
        resource_group_name="securityalert-4799",
        security_alert_policy_name="default",
        server_name="securityalert-6440",
        state=azure_native.sql.SecurityAlertPolicyState.ENABLED,
        storage_account_access_key="sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
        storage_endpoint="https://mystorage.blob.core.windows.net")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const databaseThreatDetectionPolicy = new azure_native.sql.DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicy", {
        databaseName: "testdb",
        resourceGroupName: "securityalert-4799",
        securityAlertPolicyName: "default",
        serverName: "securityalert-6440",
        state: azure_native.sql.SecurityAlertPolicyState.Enabled,
        storageAccountAccessKey: "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
        storageEndpoint: "https://mystorage.blob.core.windows.net",
    });
    
    resources:
      databaseThreatDetectionPolicy:
        type: azure-native:sql:DatabaseThreatDetectionPolicy
        properties:
          databaseName: testdb
          resourceGroupName: securityalert-4799
          securityAlertPolicyName: default
          serverName: securityalert-6440
          state: Enabled
          storageAccountAccessKey: sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==
          storageEndpoint: https://mystorage.blob.core.windows.net
    

    Create DatabaseThreatDetectionPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DatabaseThreatDetectionPolicy(name: string, args: DatabaseThreatDetectionPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def DatabaseThreatDetectionPolicy(resource_name: str,
                                      args: DatabaseThreatDetectionPolicyArgs,
                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def DatabaseThreatDetectionPolicy(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      resource_group_name: Optional[str] = None,
                                      state: Optional[Union[str, SecurityAlertPolicyState]] = None,
                                      server_name: Optional[str] = None,
                                      database_name: Optional[str] = None,
                                      email_addresses: Optional[str] = None,
                                      location: Optional[str] = None,
                                      retention_days: Optional[int] = None,
                                      security_alert_policy_name: Optional[str] = None,
                                      email_account_admins: Optional[Union[str, SecurityAlertPolicyEmailAccountAdmins]] = None,
                                      disabled_alerts: Optional[str] = None,
                                      storage_account_access_key: Optional[str] = None,
                                      storage_endpoint: Optional[str] = None,
                                      use_server_default: Optional[Union[str, SecurityAlertPolicyUseServerDefault]] = None)
    func NewDatabaseThreatDetectionPolicy(ctx *Context, name string, args DatabaseThreatDetectionPolicyArgs, opts ...ResourceOption) (*DatabaseThreatDetectionPolicy, error)
    public DatabaseThreatDetectionPolicy(string name, DatabaseThreatDetectionPolicyArgs args, CustomResourceOptions? opts = null)
    public DatabaseThreatDetectionPolicy(String name, DatabaseThreatDetectionPolicyArgs args)
    public DatabaseThreatDetectionPolicy(String name, DatabaseThreatDetectionPolicyArgs args, CustomResourceOptions options)
    
    type: azure-native:sql:DatabaseThreatDetectionPolicy
    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 DatabaseThreatDetectionPolicyArgs
    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 DatabaseThreatDetectionPolicyArgs
    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 DatabaseThreatDetectionPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabaseThreatDetectionPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabaseThreatDetectionPolicyArgs
    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 databaseThreatDetectionPolicyResource = new AzureNative.Sql.DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicyResource", new()
    {
        ResourceGroupName = "string",
        State = "string",
        ServerName = "string",
        DatabaseName = "string",
        EmailAddresses = "string",
        Location = "string",
        RetentionDays = 0,
        SecurityAlertPolicyName = "string",
        EmailAccountAdmins = "string",
        DisabledAlerts = "string",
        StorageAccountAccessKey = "string",
        StorageEndpoint = "string",
        UseServerDefault = "string",
    });
    
    example, err := sql.NewDatabaseThreatDetectionPolicy(ctx, "databaseThreatDetectionPolicyResource", &sql.DatabaseThreatDetectionPolicyArgs{
    	ResourceGroupName:       pulumi.String("string"),
    	State:                   pulumi.String("string"),
    	ServerName:              pulumi.String("string"),
    	DatabaseName:            pulumi.String("string"),
    	EmailAddresses:          pulumi.String("string"),
    	Location:                pulumi.String("string"),
    	RetentionDays:           pulumi.Int(0),
    	SecurityAlertPolicyName: pulumi.String("string"),
    	EmailAccountAdmins:      pulumi.String("string"),
    	DisabledAlerts:          pulumi.String("string"),
    	StorageAccountAccessKey: pulumi.String("string"),
    	StorageEndpoint:         pulumi.String("string"),
    	UseServerDefault:        pulumi.String("string"),
    })
    
    var databaseThreatDetectionPolicyResource = new DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicyResource", DatabaseThreatDetectionPolicyArgs.builder()
        .resourceGroupName("string")
        .state("string")
        .serverName("string")
        .databaseName("string")
        .emailAddresses("string")
        .location("string")
        .retentionDays(0)
        .securityAlertPolicyName("string")
        .emailAccountAdmins("string")
        .disabledAlerts("string")
        .storageAccountAccessKey("string")
        .storageEndpoint("string")
        .useServerDefault("string")
        .build());
    
    database_threat_detection_policy_resource = azure_native.sql.DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicyResource",
        resource_group_name="string",
        state="string",
        server_name="string",
        database_name="string",
        email_addresses="string",
        location="string",
        retention_days=0,
        security_alert_policy_name="string",
        email_account_admins="string",
        disabled_alerts="string",
        storage_account_access_key="string",
        storage_endpoint="string",
        use_server_default="string")
    
    const databaseThreatDetectionPolicyResource = new azure_native.sql.DatabaseThreatDetectionPolicy("databaseThreatDetectionPolicyResource", {
        resourceGroupName: "string",
        state: "string",
        serverName: "string",
        databaseName: "string",
        emailAddresses: "string",
        location: "string",
        retentionDays: 0,
        securityAlertPolicyName: "string",
        emailAccountAdmins: "string",
        disabledAlerts: "string",
        storageAccountAccessKey: "string",
        storageEndpoint: "string",
        useServerDefault: "string",
    });
    
    type: azure-native:sql:DatabaseThreatDetectionPolicy
    properties:
        databaseName: string
        disabledAlerts: string
        emailAccountAdmins: string
        emailAddresses: string
        location: string
        resourceGroupName: string
        retentionDays: 0
        securityAlertPolicyName: string
        serverName: string
        state: string
        storageAccountAccessKey: string
        storageEndpoint: string
        useServerDefault: string
    

    DatabaseThreatDetectionPolicy 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 DatabaseThreatDetectionPolicy resource accepts the following input properties:

    DatabaseName string
    The name of the database for which database Threat Detection policy is defined.
    ResourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    ServerName string
    The name of the server.
    State string | Pulumi.AzureNative.Sql.SecurityAlertPolicyState
    Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
    DisabledAlerts string
    Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action.
    EmailAccountAdmins string | Pulumi.AzureNative.Sql.SecurityAlertPolicyEmailAccountAdmins
    Specifies that the alert is sent to the account administrators.
    EmailAddresses string
    Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.
    Location string
    The geo-location where the resource lives
    RetentionDays int
    Specifies the number of days to keep in the Threat Detection audit logs.
    SecurityAlertPolicyName string
    The name of the security alert policy.
    StorageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.
    StorageEndpoint string
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. If state is Enabled, storageEndpoint is required.
    UseServerDefault string | Pulumi.AzureNative.Sql.SecurityAlertPolicyUseServerDefault
    Specifies whether to use the default server policy.
    DatabaseName string
    The name of the database for which database Threat Detection policy is defined.
    ResourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    ServerName string
    The name of the server.
    State string | SecurityAlertPolicyState
    Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
    DisabledAlerts string
    Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action.
    EmailAccountAdmins string | SecurityAlertPolicyEmailAccountAdmins
    Specifies that the alert is sent to the account administrators.
    EmailAddresses string
    Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.
    Location string
    The geo-location where the resource lives
    RetentionDays int
    Specifies the number of days to keep in the Threat Detection audit logs.
    SecurityAlertPolicyName string
    The name of the security alert policy.
    StorageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.
    StorageEndpoint string
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. If state is Enabled, storageEndpoint is required.
    UseServerDefault string | SecurityAlertPolicyUseServerDefault
    Specifies whether to use the default server policy.
    databaseName String
    The name of the database for which database Threat Detection policy is defined.
    resourceGroupName String
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName String
    The name of the server.
    state String | SecurityAlertPolicyState
    Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
    disabledAlerts String
    Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action.
    emailAccountAdmins String | SecurityAlertPolicyEmailAccountAdmins
    Specifies that the alert is sent to the account administrators.
    emailAddresses String
    Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.
    location String
    The geo-location where the resource lives
    retentionDays Integer
    Specifies the number of days to keep in the Threat Detection audit logs.
    securityAlertPolicyName String
    The name of the security alert policy.
    storageAccountAccessKey String
    Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.
    storageEndpoint String
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. If state is Enabled, storageEndpoint is required.
    useServerDefault String | SecurityAlertPolicyUseServerDefault
    Specifies whether to use the default server policy.
    databaseName string
    The name of the database for which database Threat Detection policy is defined.
    resourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName string
    The name of the server.
    state string | SecurityAlertPolicyState
    Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
    disabledAlerts string
    Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action.
    emailAccountAdmins string | SecurityAlertPolicyEmailAccountAdmins
    Specifies that the alert is sent to the account administrators.
    emailAddresses string
    Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.
    location string
    The geo-location where the resource lives
    retentionDays number
    Specifies the number of days to keep in the Threat Detection audit logs.
    securityAlertPolicyName string
    The name of the security alert policy.
    storageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.
    storageEndpoint string
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. If state is Enabled, storageEndpoint is required.
    useServerDefault string | SecurityAlertPolicyUseServerDefault
    Specifies whether to use the default server policy.
    database_name str
    The name of the database for which database Threat Detection policy is defined.
    resource_group_name str
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    server_name str
    The name of the server.
    state str | SecurityAlertPolicyState
    Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
    disabled_alerts str
    Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action.
    email_account_admins str | SecurityAlertPolicyEmailAccountAdmins
    Specifies that the alert is sent to the account administrators.
    email_addresses str
    Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.
    location str
    The geo-location where the resource lives
    retention_days int
    Specifies the number of days to keep in the Threat Detection audit logs.
    security_alert_policy_name str
    The name of the security alert policy.
    storage_account_access_key str
    Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.
    storage_endpoint str
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. If state is Enabled, storageEndpoint is required.
    use_server_default str | SecurityAlertPolicyUseServerDefault
    Specifies whether to use the default server policy.
    databaseName String
    The name of the database for which database Threat Detection policy is defined.
    resourceGroupName String
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName String
    The name of the server.
    state String | "New" | "Enabled" | "Disabled"
    Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
    disabledAlerts String
    Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action.
    emailAccountAdmins String | "Enabled" | "Disabled"
    Specifies that the alert is sent to the account administrators.
    emailAddresses String
    Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.
    location String
    The geo-location where the resource lives
    retentionDays Number
    Specifies the number of days to keep in the Threat Detection audit logs.
    securityAlertPolicyName String
    The name of the security alert policy.
    storageAccountAccessKey String
    Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.
    storageEndpoint String
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. If state is Enabled, storageEndpoint is required.
    useServerDefault String | "Enabled" | "Disabled"
    Specifies whether to use the default server policy.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DatabaseThreatDetectionPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    Resource kind.
    Name string
    Resource name.
    Type string
    Resource type.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    Resource kind.
    Name string
    Resource name.
    Type string
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    Resource kind.
    name String
    Resource name.
    type String
    Resource type.
    id string
    The provider-assigned unique ID for this managed resource.
    kind string
    Resource kind.
    name string
    Resource name.
    type string
    Resource type.
    id str
    The provider-assigned unique ID for this managed resource.
    kind str
    Resource kind.
    name str
    Resource name.
    type str
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    Resource kind.
    name String
    Resource name.
    type String
    Resource type.

    Supporting Types

    SecurityAlertPolicyEmailAccountAdmins, SecurityAlertPolicyEmailAccountAdminsArgs

    Enabled
    Enabled
    Disabled
    Disabled
    SecurityAlertPolicyEmailAccountAdminsEnabled
    Enabled
    SecurityAlertPolicyEmailAccountAdminsDisabled
    Disabled
    Enabled
    Enabled
    Disabled
    Disabled
    Enabled
    Enabled
    Disabled
    Disabled
    ENABLED
    Enabled
    DISABLED
    Disabled
    "Enabled"
    Enabled
    "Disabled"
    Disabled

    SecurityAlertPolicyState, SecurityAlertPolicyStateArgs

    New
    New
    Enabled
    Enabled
    Disabled
    Disabled
    SecurityAlertPolicyStateNew
    New
    SecurityAlertPolicyStateEnabled
    Enabled
    SecurityAlertPolicyStateDisabled
    Disabled
    New
    New
    Enabled
    Enabled
    Disabled
    Disabled
    New
    New
    Enabled
    Enabled
    Disabled
    Disabled
    NEW
    New
    ENABLED
    Enabled
    DISABLED
    Disabled
    "New"
    New
    "Enabled"
    Enabled
    "Disabled"
    Disabled

    SecurityAlertPolicyUseServerDefault, SecurityAlertPolicyUseServerDefaultArgs

    Enabled
    Enabled
    Disabled
    Disabled
    SecurityAlertPolicyUseServerDefaultEnabled
    Enabled
    SecurityAlertPolicyUseServerDefaultDisabled
    Disabled
    Enabled
    Enabled
    Disabled
    Disabled
    Enabled
    Enabled
    Disabled
    Disabled
    ENABLED
    Enabled
    DISABLED
    Disabled
    "Enabled"
    Enabled
    "Disabled"
    Disabled

    Import

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

    $ pulumi import azure-native:sql:DatabaseThreatDetectionPolicy default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi