1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. ExtendedServerBlobAuditingPolicy
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.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.sql.ExtendedServerBlobAuditingPolicy

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.47.1 published on Monday, Jun 24, 2024 by Pulumi

    An extended server blob auditing policy. Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.

    Other available API versions: 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview.

    Example Usage

    Update a server's extended blob auditing policy with all parameters

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var extendedServerBlobAuditingPolicy = new AzureNative.Sql.ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicy", new()
        {
            AuditActionsAndGroups = new[]
            {
                "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP",
                "FAILED_DATABASE_AUTHENTICATION_GROUP",
                "BATCH_COMPLETED_GROUP",
            },
            BlobAuditingPolicyName = "default",
            IsAzureMonitorTargetEnabled = true,
            IsStorageSecondaryKeyInUse = false,
            PredicateExpression = "object_name = 'SensitiveData'",
            QueueDelayMs = 4000,
            ResourceGroupName = "blobauditingtest-4799",
            RetentionDays = 6,
            ServerName = "blobauditingtest-6440",
            State = AzureNative.Sql.BlobAuditingPolicyState.Enabled,
            StorageAccountAccessKey = "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
            StorageAccountSubscriptionId = "00000000-1234-0000-5678-000000000000",
            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.NewExtendedServerBlobAuditingPolicy(ctx, "extendedServerBlobAuditingPolicy", &sql.ExtendedServerBlobAuditingPolicyArgs{
    			AuditActionsAndGroups: pulumi.StringArray{
    				pulumi.String("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"),
    				pulumi.String("FAILED_DATABASE_AUTHENTICATION_GROUP"),
    				pulumi.String("BATCH_COMPLETED_GROUP"),
    			},
    			BlobAuditingPolicyName:       pulumi.String("default"),
    			IsAzureMonitorTargetEnabled:  pulumi.Bool(true),
    			IsStorageSecondaryKeyInUse:   pulumi.Bool(false),
    			PredicateExpression:          pulumi.String("object_name = 'SensitiveData'"),
    			QueueDelayMs:                 pulumi.Int(4000),
    			ResourceGroupName:            pulumi.String("blobauditingtest-4799"),
    			RetentionDays:                pulumi.Int(6),
    			ServerName:                   pulumi.String("blobauditingtest-6440"),
    			State:                        sql.BlobAuditingPolicyStateEnabled,
    			StorageAccountAccessKey:      pulumi.String("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="),
    			StorageAccountSubscriptionId: pulumi.String("00000000-1234-0000-5678-000000000000"),
    			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.ExtendedServerBlobAuditingPolicy;
    import com.pulumi.azurenative.sql.ExtendedServerBlobAuditingPolicyArgs;
    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 extendedServerBlobAuditingPolicy = new ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicy", ExtendedServerBlobAuditingPolicyArgs.builder()
                .auditActionsAndGroups(            
                    "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP",
                    "FAILED_DATABASE_AUTHENTICATION_GROUP",
                    "BATCH_COMPLETED_GROUP")
                .blobAuditingPolicyName("default")
                .isAzureMonitorTargetEnabled(true)
                .isStorageSecondaryKeyInUse(false)
                .predicateExpression("object_name = 'SensitiveData'")
                .queueDelayMs(4000)
                .resourceGroupName("blobauditingtest-4799")
                .retentionDays(6)
                .serverName("blobauditingtest-6440")
                .state("Enabled")
                .storageAccountAccessKey("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
                .storageAccountSubscriptionId("00000000-1234-0000-5678-000000000000")
                .storageEndpoint("https://mystorage.blob.core.windows.net")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    extended_server_blob_auditing_policy = azure_native.sql.ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicy",
        audit_actions_and_groups=[
            "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP",
            "FAILED_DATABASE_AUTHENTICATION_GROUP",
            "BATCH_COMPLETED_GROUP",
        ],
        blob_auditing_policy_name="default",
        is_azure_monitor_target_enabled=True,
        is_storage_secondary_key_in_use=False,
        predicate_expression="object_name = 'SensitiveData'",
        queue_delay_ms=4000,
        resource_group_name="blobauditingtest-4799",
        retention_days=6,
        server_name="blobauditingtest-6440",
        state=azure_native.sql.BlobAuditingPolicyState.ENABLED,
        storage_account_access_key="sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
        storage_account_subscription_id="00000000-1234-0000-5678-000000000000",
        storage_endpoint="https://mystorage.blob.core.windows.net")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const extendedServerBlobAuditingPolicy = new azure_native.sql.ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicy", {
        auditActionsAndGroups: [
            "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP",
            "FAILED_DATABASE_AUTHENTICATION_GROUP",
            "BATCH_COMPLETED_GROUP",
        ],
        blobAuditingPolicyName: "default",
        isAzureMonitorTargetEnabled: true,
        isStorageSecondaryKeyInUse: false,
        predicateExpression: "object_name = 'SensitiveData'",
        queueDelayMs: 4000,
        resourceGroupName: "blobauditingtest-4799",
        retentionDays: 6,
        serverName: "blobauditingtest-6440",
        state: azure_native.sql.BlobAuditingPolicyState.Enabled,
        storageAccountAccessKey: "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
        storageAccountSubscriptionId: "00000000-1234-0000-5678-000000000000",
        storageEndpoint: "https://mystorage.blob.core.windows.net",
    });
    
    resources:
      extendedServerBlobAuditingPolicy:
        type: azure-native:sql:ExtendedServerBlobAuditingPolicy
        properties:
          auditActionsAndGroups:
            - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
            - FAILED_DATABASE_AUTHENTICATION_GROUP
            - BATCH_COMPLETED_GROUP
          blobAuditingPolicyName: default
          isAzureMonitorTargetEnabled: true
          isStorageSecondaryKeyInUse: false
          predicateExpression: object_name = 'SensitiveData'
          queueDelayMs: 4000
          resourceGroupName: blobauditingtest-4799
          retentionDays: 6
          serverName: blobauditingtest-6440
          state: Enabled
          storageAccountAccessKey: sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==
          storageAccountSubscriptionId: 00000000-1234-0000-5678-000000000000
          storageEndpoint: https://mystorage.blob.core.windows.net
    

    Update a server's extended blob auditing policy with minimal parameters

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var extendedServerBlobAuditingPolicy = new AzureNative.Sql.ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicy", new()
        {
            BlobAuditingPolicyName = "default",
            ResourceGroupName = "blobauditingtest-4799",
            ServerName = "blobauditingtest-6440",
            State = AzureNative.Sql.BlobAuditingPolicyState.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.NewExtendedServerBlobAuditingPolicy(ctx, "extendedServerBlobAuditingPolicy", &sql.ExtendedServerBlobAuditingPolicyArgs{
    			BlobAuditingPolicyName:  pulumi.String("default"),
    			ResourceGroupName:       pulumi.String("blobauditingtest-4799"),
    			ServerName:              pulumi.String("blobauditingtest-6440"),
    			State:                   sql.BlobAuditingPolicyStateEnabled,
    			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.ExtendedServerBlobAuditingPolicy;
    import com.pulumi.azurenative.sql.ExtendedServerBlobAuditingPolicyArgs;
    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 extendedServerBlobAuditingPolicy = new ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicy", ExtendedServerBlobAuditingPolicyArgs.builder()
                .blobAuditingPolicyName("default")
                .resourceGroupName("blobauditingtest-4799")
                .serverName("blobauditingtest-6440")
                .state("Enabled")
                .storageAccountAccessKey("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
                .storageEndpoint("https://mystorage.blob.core.windows.net")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    extended_server_blob_auditing_policy = azure_native.sql.ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicy",
        blob_auditing_policy_name="default",
        resource_group_name="blobauditingtest-4799",
        server_name="blobauditingtest-6440",
        state=azure_native.sql.BlobAuditingPolicyState.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 extendedServerBlobAuditingPolicy = new azure_native.sql.ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicy", {
        blobAuditingPolicyName: "default",
        resourceGroupName: "blobauditingtest-4799",
        serverName: "blobauditingtest-6440",
        state: azure_native.sql.BlobAuditingPolicyState.Enabled,
        storageAccountAccessKey: "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
        storageEndpoint: "https://mystorage.blob.core.windows.net",
    });
    
    resources:
      extendedServerBlobAuditingPolicy:
        type: azure-native:sql:ExtendedServerBlobAuditingPolicy
        properties:
          blobAuditingPolicyName: default
          resourceGroupName: blobauditingtest-4799
          serverName: blobauditingtest-6440
          state: Enabled
          storageAccountAccessKey: sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==
          storageEndpoint: https://mystorage.blob.core.windows.net
    

    Create ExtendedServerBlobAuditingPolicy Resource

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

    Constructor syntax

    new ExtendedServerBlobAuditingPolicy(name: string, args: ExtendedServerBlobAuditingPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ExtendedServerBlobAuditingPolicy(resource_name: str,
                                         args: ExtendedServerBlobAuditingPolicyArgs,
                                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ExtendedServerBlobAuditingPolicy(resource_name: str,
                                         opts: Optional[ResourceOptions] = None,
                                         resource_group_name: Optional[str] = None,
                                         state: Optional[BlobAuditingPolicyState] = None,
                                         server_name: Optional[str] = None,
                                         predicate_expression: Optional[str] = None,
                                         is_managed_identity_in_use: Optional[bool] = None,
                                         is_storage_secondary_key_in_use: Optional[bool] = None,
                                         audit_actions_and_groups: Optional[Sequence[str]] = None,
                                         queue_delay_ms: Optional[int] = None,
                                         is_devops_audit_enabled: Optional[bool] = None,
                                         retention_days: Optional[int] = None,
                                         is_azure_monitor_target_enabled: Optional[bool] = None,
                                         blob_auditing_policy_name: Optional[str] = None,
                                         storage_account_access_key: Optional[str] = None,
                                         storage_account_subscription_id: Optional[str] = None,
                                         storage_endpoint: Optional[str] = None)
    func NewExtendedServerBlobAuditingPolicy(ctx *Context, name string, args ExtendedServerBlobAuditingPolicyArgs, opts ...ResourceOption) (*ExtendedServerBlobAuditingPolicy, error)
    public ExtendedServerBlobAuditingPolicy(string name, ExtendedServerBlobAuditingPolicyArgs args, CustomResourceOptions? opts = null)
    public ExtendedServerBlobAuditingPolicy(String name, ExtendedServerBlobAuditingPolicyArgs args)
    public ExtendedServerBlobAuditingPolicy(String name, ExtendedServerBlobAuditingPolicyArgs args, CustomResourceOptions options)
    
    type: azure-native:sql:ExtendedServerBlobAuditingPolicy
    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 ExtendedServerBlobAuditingPolicyArgs
    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 ExtendedServerBlobAuditingPolicyArgs
    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 ExtendedServerBlobAuditingPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ExtendedServerBlobAuditingPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ExtendedServerBlobAuditingPolicyArgs
    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 extendedServerBlobAuditingPolicyResource = new AzureNative.Sql.ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicyResource", new()
    {
        ResourceGroupName = "string",
        State = AzureNative.Sql.BlobAuditingPolicyState.Enabled,
        ServerName = "string",
        PredicateExpression = "string",
        IsManagedIdentityInUse = false,
        IsStorageSecondaryKeyInUse = false,
        AuditActionsAndGroups = new[]
        {
            "string",
        },
        QueueDelayMs = 0,
        IsDevopsAuditEnabled = false,
        RetentionDays = 0,
        IsAzureMonitorTargetEnabled = false,
        BlobAuditingPolicyName = "string",
        StorageAccountAccessKey = "string",
        StorageAccountSubscriptionId = "string",
        StorageEndpoint = "string",
    });
    
    example, err := sql.NewExtendedServerBlobAuditingPolicy(ctx, "extendedServerBlobAuditingPolicyResource", &sql.ExtendedServerBlobAuditingPolicyArgs{
    ResourceGroupName: pulumi.String("string"),
    State: sql.BlobAuditingPolicyStateEnabled,
    ServerName: pulumi.String("string"),
    PredicateExpression: pulumi.String("string"),
    IsManagedIdentityInUse: pulumi.Bool(false),
    IsStorageSecondaryKeyInUse: pulumi.Bool(false),
    AuditActionsAndGroups: pulumi.StringArray{
    pulumi.String("string"),
    },
    QueueDelayMs: pulumi.Int(0),
    IsDevopsAuditEnabled: pulumi.Bool(false),
    RetentionDays: pulumi.Int(0),
    IsAzureMonitorTargetEnabled: pulumi.Bool(false),
    BlobAuditingPolicyName: pulumi.String("string"),
    StorageAccountAccessKey: pulumi.String("string"),
    StorageAccountSubscriptionId: pulumi.String("string"),
    StorageEndpoint: pulumi.String("string"),
    })
    
    var extendedServerBlobAuditingPolicyResource = new ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicyResource", ExtendedServerBlobAuditingPolicyArgs.builder()
        .resourceGroupName("string")
        .state("Enabled")
        .serverName("string")
        .predicateExpression("string")
        .isManagedIdentityInUse(false)
        .isStorageSecondaryKeyInUse(false)
        .auditActionsAndGroups("string")
        .queueDelayMs(0)
        .isDevopsAuditEnabled(false)
        .retentionDays(0)
        .isAzureMonitorTargetEnabled(false)
        .blobAuditingPolicyName("string")
        .storageAccountAccessKey("string")
        .storageAccountSubscriptionId("string")
        .storageEndpoint("string")
        .build());
    
    extended_server_blob_auditing_policy_resource = azure_native.sql.ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicyResource",
        resource_group_name="string",
        state=azure_native.sql.BlobAuditingPolicyState.ENABLED,
        server_name="string",
        predicate_expression="string",
        is_managed_identity_in_use=False,
        is_storage_secondary_key_in_use=False,
        audit_actions_and_groups=["string"],
        queue_delay_ms=0,
        is_devops_audit_enabled=False,
        retention_days=0,
        is_azure_monitor_target_enabled=False,
        blob_auditing_policy_name="string",
        storage_account_access_key="string",
        storage_account_subscription_id="string",
        storage_endpoint="string")
    
    const extendedServerBlobAuditingPolicyResource = new azure_native.sql.ExtendedServerBlobAuditingPolicy("extendedServerBlobAuditingPolicyResource", {
        resourceGroupName: "string",
        state: azure_native.sql.BlobAuditingPolicyState.Enabled,
        serverName: "string",
        predicateExpression: "string",
        isManagedIdentityInUse: false,
        isStorageSecondaryKeyInUse: false,
        auditActionsAndGroups: ["string"],
        queueDelayMs: 0,
        isDevopsAuditEnabled: false,
        retentionDays: 0,
        isAzureMonitorTargetEnabled: false,
        blobAuditingPolicyName: "string",
        storageAccountAccessKey: "string",
        storageAccountSubscriptionId: "string",
        storageEndpoint: "string",
    });
    
    type: azure-native:sql:ExtendedServerBlobAuditingPolicy
    properties:
        auditActionsAndGroups:
            - string
        blobAuditingPolicyName: string
        isAzureMonitorTargetEnabled: false
        isDevopsAuditEnabled: false
        isManagedIdentityInUse: false
        isStorageSecondaryKeyInUse: false
        predicateExpression: string
        queueDelayMs: 0
        resourceGroupName: string
        retentionDays: 0
        serverName: string
        state: Enabled
        storageAccountAccessKey: string
        storageAccountSubscriptionId: string
        storageEndpoint: string
    

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

    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 Pulumi.AzureNative.Sql.BlobAuditingPolicyState
    Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.
    AuditActionsAndGroups List<string>

    Specifies the Actions-Groups and Actions to audit.

    The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:

    BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP.

    This above combination is also the set that is configured by default when enabling auditing from the Azure portal.

    The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):

    APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP

    These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.

    For more information, see Database-Level Audit Action Groups.

    For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE REFERENCES

    The general form for defining an action to be audited is: {action} ON {object} BY {principal}

    Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.

    For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public

    For more information, see Database-Level Audit Actions

    BlobAuditingPolicyName string
    The name of the blob auditing policy.
    IsAzureMonitorTargetEnabled bool

    Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.

    When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. Note that for server level audit you should use the 'master' database as {databaseName}.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    IsDevopsAuditEnabled bool

    Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true

    When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    IsManagedIdentityInUse bool
    Specifies whether Managed Identity is used to access blob storage
    IsStorageSecondaryKeyInUse bool
    Specifies whether storageAccountAccessKey value is the storage's secondary key.
    PredicateExpression string
    Specifies condition of where clause when creating an audit.
    QueueDelayMs int
    Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
    RetentionDays int
    Specifies the number of days to keep in the audit logs in the storage account.
    StorageAccountAccessKey string
    Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication:

    1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
    2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. For more information, see Auditing to storage using Managed Identity authentication
    StorageAccountSubscriptionId string
    Specifies the blob storage subscription Id.
    StorageEndpoint string
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
    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 BlobAuditingPolicyState
    Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.
    AuditActionsAndGroups []string

    Specifies the Actions-Groups and Actions to audit.

    The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:

    BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP.

    This above combination is also the set that is configured by default when enabling auditing from the Azure portal.

    The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):

    APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP

    These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.

    For more information, see Database-Level Audit Action Groups.

    For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE REFERENCES

    The general form for defining an action to be audited is: {action} ON {object} BY {principal}

    Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.

    For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public

    For more information, see Database-Level Audit Actions

    BlobAuditingPolicyName string
    The name of the blob auditing policy.
    IsAzureMonitorTargetEnabled bool

    Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.

    When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. Note that for server level audit you should use the 'master' database as {databaseName}.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    IsDevopsAuditEnabled bool

    Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true

    When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    IsManagedIdentityInUse bool
    Specifies whether Managed Identity is used to access blob storage
    IsStorageSecondaryKeyInUse bool
    Specifies whether storageAccountAccessKey value is the storage's secondary key.
    PredicateExpression string
    Specifies condition of where clause when creating an audit.
    QueueDelayMs int
    Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
    RetentionDays int
    Specifies the number of days to keep in the audit logs in the storage account.
    StorageAccountAccessKey string
    Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication:

    1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
    2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. For more information, see Auditing to storage using Managed Identity authentication
    StorageAccountSubscriptionId string
    Specifies the blob storage subscription Id.
    StorageEndpoint string
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
    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 BlobAuditingPolicyState
    Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.
    auditActionsAndGroups List<String>

    Specifies the Actions-Groups and Actions to audit.

    The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:

    BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP.

    This above combination is also the set that is configured by default when enabling auditing from the Azure portal.

    The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):

    APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP

    These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.

    For more information, see Database-Level Audit Action Groups.

    For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE REFERENCES

    The general form for defining an action to be audited is: {action} ON {object} BY {principal}

    Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.

    For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public

    For more information, see Database-Level Audit Actions

    blobAuditingPolicyName String
    The name of the blob auditing policy.
    isAzureMonitorTargetEnabled Boolean

    Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.

    When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. Note that for server level audit you should use the 'master' database as {databaseName}.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    isDevopsAuditEnabled Boolean

    Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true

    When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    isManagedIdentityInUse Boolean
    Specifies whether Managed Identity is used to access blob storage
    isStorageSecondaryKeyInUse Boolean
    Specifies whether storageAccountAccessKey value is the storage's secondary key.
    predicateExpression String
    Specifies condition of where clause when creating an audit.
    queueDelayMs Integer
    Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
    retentionDays Integer
    Specifies the number of days to keep in the audit logs in the storage account.
    storageAccountAccessKey String
    Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication:

    1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
    2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. For more information, see Auditing to storage using Managed Identity authentication
    storageAccountSubscriptionId String
    Specifies the blob storage subscription Id.
    storageEndpoint String
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
    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 BlobAuditingPolicyState
    Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.
    auditActionsAndGroups string[]

    Specifies the Actions-Groups and Actions to audit.

    The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:

    BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP.

    This above combination is also the set that is configured by default when enabling auditing from the Azure portal.

    The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):

    APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP

    These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.

    For more information, see Database-Level Audit Action Groups.

    For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE REFERENCES

    The general form for defining an action to be audited is: {action} ON {object} BY {principal}

    Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.

    For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public

    For more information, see Database-Level Audit Actions

    blobAuditingPolicyName string
    The name of the blob auditing policy.
    isAzureMonitorTargetEnabled boolean

    Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.

    When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. Note that for server level audit you should use the 'master' database as {databaseName}.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    isDevopsAuditEnabled boolean

    Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true

    When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    isManagedIdentityInUse boolean
    Specifies whether Managed Identity is used to access blob storage
    isStorageSecondaryKeyInUse boolean
    Specifies whether storageAccountAccessKey value is the storage's secondary key.
    predicateExpression string
    Specifies condition of where clause when creating an audit.
    queueDelayMs number
    Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
    retentionDays number
    Specifies the number of days to keep in the audit logs in the storage account.
    storageAccountAccessKey string
    Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication:

    1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
    2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. For more information, see Auditing to storage using Managed Identity authentication
    storageAccountSubscriptionId string
    Specifies the blob storage subscription Id.
    storageEndpoint string
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
    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 BlobAuditingPolicyState
    Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.
    audit_actions_and_groups Sequence[str]

    Specifies the Actions-Groups and Actions to audit.

    The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:

    BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP.

    This above combination is also the set that is configured by default when enabling auditing from the Azure portal.

    The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):

    APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP

    These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.

    For more information, see Database-Level Audit Action Groups.

    For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE REFERENCES

    The general form for defining an action to be audited is: {action} ON {object} BY {principal}

    Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.

    For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public

    For more information, see Database-Level Audit Actions

    blob_auditing_policy_name str
    The name of the blob auditing policy.
    is_azure_monitor_target_enabled bool

    Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.

    When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. Note that for server level audit you should use the 'master' database as {databaseName}.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    is_devops_audit_enabled bool

    Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true

    When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    is_managed_identity_in_use bool
    Specifies whether Managed Identity is used to access blob storage
    is_storage_secondary_key_in_use bool
    Specifies whether storageAccountAccessKey value is the storage's secondary key.
    predicate_expression str
    Specifies condition of where clause when creating an audit.
    queue_delay_ms int
    Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
    retention_days int
    Specifies the number of days to keep in the audit logs in the storage account.
    storage_account_access_key str
    Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication:

    1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
    2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. For more information, see Auditing to storage using Managed Identity authentication
    storage_account_subscription_id str
    Specifies the blob storage subscription Id.
    storage_endpoint str
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
    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 "Enabled" | "Disabled"
    Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.
    auditActionsAndGroups List<String>

    Specifies the Actions-Groups and Actions to audit.

    The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:

    BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP.

    This above combination is also the set that is configured by default when enabling auditing from the Azure portal.

    The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):

    APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP

    These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.

    For more information, see Database-Level Audit Action Groups.

    For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE REFERENCES

    The general form for defining an action to be audited is: {action} ON {object} BY {principal}

    Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.

    For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public

    For more information, see Database-Level Audit Actions

    blobAuditingPolicyName String
    The name of the blob auditing policy.
    isAzureMonitorTargetEnabled Boolean

    Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.

    When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. Note that for server level audit you should use the 'master' database as {databaseName}.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    isDevopsAuditEnabled Boolean

    Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true

    When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.

    Diagnostic Settings URI format: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

    For more information, see Diagnostic Settings REST API or Diagnostic Settings PowerShell

    isManagedIdentityInUse Boolean
    Specifies whether Managed Identity is used to access blob storage
    isStorageSecondaryKeyInUse Boolean
    Specifies whether storageAccountAccessKey value is the storage's secondary key.
    predicateExpression String
    Specifies condition of where clause when creating an audit.
    queueDelayMs Number
    Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
    retentionDays Number
    Specifies the number of days to keep in the audit logs in the storage account.
    storageAccountAccessKey String
    Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication:

    1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
    2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. For more information, see Auditing to storage using Managed Identity authentication
    storageAccountSubscriptionId String
    Specifies the blob storage subscription Id.
    storageEndpoint String
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.

    Outputs

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

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

    Supporting Types

    BlobAuditingPolicyState, BlobAuditingPolicyStateArgs

    Enabled
    Enabled
    Disabled
    Disabled
    BlobAuditingPolicyStateEnabled
    Enabled
    BlobAuditingPolicyStateDisabled
    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:ExtendedServerBlobAuditingPolicy default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName} 
    

    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.47.1 published on Monday, Jun 24, 2024 by Pulumi