SqlPoolSecurityAlertPolicy

class SqlPoolSecurityAlertPolicy : KotlinCustomResource

Manages a Security Alert Policy for a Synapse SQL Pool.

Example Usage

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.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.DataLakeGen2Filesystem;
import com.pulumi.azure.storage.DataLakeGen2FilesystemArgs;
import com.pulumi.azure.synapse.Workspace;
import com.pulumi.azure.synapse.WorkspaceArgs;
import com.pulumi.azure.synapse.inputs.WorkspaceAadAdminArgs;
import com.pulumi.azure.synapse.inputs.WorkspaceIdentityArgs;
import com.pulumi.azure.synapse.SqlPool;
import com.pulumi.azure.synapse.SqlPoolArgs;
import com.pulumi.azure.synapse.SqlPoolSecurityAlertPolicy;
import com.pulumi.azure.synapse.SqlPoolSecurityAlertPolicyArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.accountKind("StorageV2")
.isHnsEnabled("true")
.build());
var exampleDataLakeGen2Filesystem = new DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", DataLakeGen2FilesystemArgs.builder()
.storageAccountId(exampleAccount.id())
.build());
var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.storageDataLakeGen2FilesystemId(exampleDataLakeGen2Filesystem.id())
.sqlAdministratorLogin("sqladminuser")
.sqlAdministratorLoginPassword("H@Sh1CoR3!")
.aadAdmin(WorkspaceAadAdminArgs.builder()
.login("AzureAD Admin")
.objectId("00000000-0000-0000-0000-000000000000")
.tenantId("00000000-0000-0000-0000-000000000000")
.build())
.identity(WorkspaceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.tags(Map.of("Env", "production"))
.build());
var exampleSqlPool = new SqlPool("exampleSqlPool", SqlPoolArgs.builder()
.synapseWorkspaceId(exampleWorkspace.id())
.skuName("DW100c")
.createMode("Default")
.build());
var auditLogs = new Account("auditLogs", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleSqlPoolSecurityAlertPolicy = new SqlPoolSecurityAlertPolicy("exampleSqlPoolSecurityAlertPolicy", SqlPoolSecurityAlertPolicyArgs.builder()
.sqlPoolId(exampleSqlPool.id())
.policyState("Enabled")
.storageEndpoint(auditLogs.primaryBlobEndpoint())
.storageAccountAccessKey(auditLogs.primaryAccessKey())
.disabledAlerts(
"Sql_Injection",
"Data_Exfiltration")
.retentionDays(20)
.build());
}
}

Import

Synapse SQL Pool Security Alert Policies can be imported using the resource id, e.g.

$ pulumi import azure:synapse/sqlPoolSecurityAlertPolicy:SqlPoolSecurityAlertPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/sqlPools/sqlPool1/securityAlertPolicies/default

Properties

Link copied to clipboard
val disabledAlerts: Output<List<String>>?

Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action.

Link copied to clipboard

Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false.

Link copied to clipboard
val emailAddresses: Output<List<String>>?

Specifies an array of email addresses to which the alert is sent.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val policyState: Output<String>

Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific SQL pool. Possible values are Disabled, Enabled and New.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val retentionDays: Output<Int>?

Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0.

Link copied to clipboard
val sqlPoolId: Output<String>

Specifies the ID of the Synapse SQL Pool. Changing this forces a new resource to be created.

Link copied to clipboard

Specifies the identifier key of the Threat Detection audit storage account.

Link copied to clipboard
val storageEndpoint: Output<String>?

Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.

Link copied to clipboard
val urn: Output<String>