1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. getDatabaseThreatDetectionPolicy
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.sql.getDatabaseThreatDetectionPolicy

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

Gets a database’s threat detection policy.

Uses Azure REST API version 2014-04-01.

Using getDatabaseThreatDetectionPolicy

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getDatabaseThreatDetectionPolicy(args: GetDatabaseThreatDetectionPolicyArgs, opts?: InvokeOptions): Promise<GetDatabaseThreatDetectionPolicyResult>
function getDatabaseThreatDetectionPolicyOutput(args: GetDatabaseThreatDetectionPolicyOutputArgs, opts?: InvokeOptions): Output<GetDatabaseThreatDetectionPolicyResult>
Copy
def get_database_threat_detection_policy(database_name: Optional[str] = None,
                                         resource_group_name: Optional[str] = None,
                                         security_alert_policy_name: Optional[str] = None,
                                         server_name: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetDatabaseThreatDetectionPolicyResult
def get_database_threat_detection_policy_output(database_name: Optional[pulumi.Input[str]] = None,
                                         resource_group_name: Optional[pulumi.Input[str]] = None,
                                         security_alert_policy_name: Optional[pulumi.Input[str]] = None,
                                         server_name: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseThreatDetectionPolicyResult]
Copy
func LookupDatabaseThreatDetectionPolicy(ctx *Context, args *LookupDatabaseThreatDetectionPolicyArgs, opts ...InvokeOption) (*LookupDatabaseThreatDetectionPolicyResult, error)
func LookupDatabaseThreatDetectionPolicyOutput(ctx *Context, args *LookupDatabaseThreatDetectionPolicyOutputArgs, opts ...InvokeOption) LookupDatabaseThreatDetectionPolicyResultOutput
Copy

> Note: This function is named LookupDatabaseThreatDetectionPolicy in the Go SDK.

public static class GetDatabaseThreatDetectionPolicy 
{
    public static Task<GetDatabaseThreatDetectionPolicyResult> InvokeAsync(GetDatabaseThreatDetectionPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabaseThreatDetectionPolicyResult> Invoke(GetDatabaseThreatDetectionPolicyInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDatabaseThreatDetectionPolicyResult> getDatabaseThreatDetectionPolicy(GetDatabaseThreatDetectionPolicyArgs args, InvokeOptions options)
public static Output<GetDatabaseThreatDetectionPolicyResult> getDatabaseThreatDetectionPolicy(GetDatabaseThreatDetectionPolicyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure-native:sql:getDatabaseThreatDetectionPolicy
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DatabaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database for which database Threat Detection policy is defined.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
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.
SecurityAlertPolicyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the security alert policy.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
DatabaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database for which database Threat Detection policy is defined.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
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.
SecurityAlertPolicyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the security alert policy.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
databaseName
This property is required.
Changes to this property will trigger replacement.
String
The name of the database for which database Threat Detection policy is defined.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
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.
securityAlertPolicyName
This property is required.
Changes to this property will trigger replacement.
String
The name of the security alert policy.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the server.
databaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database for which database Threat Detection policy is defined.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
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.
securityAlertPolicyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the security alert policy.
serverName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
database_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the database for which database Threat Detection policy is defined.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
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.
security_alert_policy_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the security alert policy.
server_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the server.
databaseName
This property is required.
Changes to this property will trigger replacement.
String
The name of the database for which database Threat Detection policy is defined.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
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.
securityAlertPolicyName
This property is required.
Changes to this property will trigger replacement.
String
The name of the security alert policy.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the server.

getDatabaseThreatDetectionPolicy Result

The following output properties are available:

AzureApiVersion string
The Azure API version of the resource.
Id string
Resource ID.
Kind string
Resource kind.
Name string
Resource name.
State string
Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
Type string
Resource type.
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
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.
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
Specifies whether to use the default server policy.
AzureApiVersion string
The Azure API version of the resource.
Id string
Resource ID.
Kind string
Resource kind.
Name string
Resource name.
State string
Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
Type string
Resource type.
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
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.
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
Specifies whether to use the default server policy.
azureApiVersion String
The Azure API version of the resource.
id String
Resource ID.
kind String
Resource kind.
name String
Resource name.
state String
Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
type String
Resource type.
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
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.
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
Specifies whether to use the default server policy.
azureApiVersion string
The Azure API version of the resource.
id string
Resource ID.
kind string
Resource kind.
name string
Resource name.
state string
Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
type string
Resource type.
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
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.
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
Specifies whether to use the default server policy.
azure_api_version str
The Azure API version of the resource.
id str
Resource ID.
kind str
Resource kind.
name str
Resource name.
state str
Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
type str
Resource type.
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
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.
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
Specifies whether to use the default server policy.
azureApiVersion String
The Azure API version of the resource.
id String
Resource ID.
kind String
Resource kind.
name String
Resource name.
state String
Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
type String
Resource type.
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
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.
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
Specifies whether to use the default server policy.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi