Dela via


ArmSqlModelFactory.SqlServerDevOpsAuditingSettingData Method

Definition

Initializes a new instance of SqlServerDevOpsAuditingSettingData.

public static Azure.ResourceManager.Sql.SqlServerDevOpsAuditingSettingData SqlServerDevOpsAuditingSettingData (Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType resourceType = default, Azure.ResourceManager.Models.SystemData systemData = default, bool? isAzureMonitorTargetEnabled = default, bool? isManagedIdentityInUse = default, Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState? state = default, string storageEndpoint = default, string storageAccountAccessKey = default, Guid? storageAccountSubscriptionId = default);
static member SqlServerDevOpsAuditingSettingData : Azure.Core.ResourceIdentifier * string * Azure.Core.ResourceType * Azure.ResourceManager.Models.SystemData * Nullable<bool> * Nullable<bool> * Nullable<Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState> * string * string * Nullable<Guid> -> Azure.ResourceManager.Sql.SqlServerDevOpsAuditingSettingData
Public Shared Function SqlServerDevOpsAuditingSettingData (Optional id As ResourceIdentifier = Nothing, Optional name As String = Nothing, Optional resourceType As ResourceType = Nothing, Optional systemData As SystemData = Nothing, Optional isAzureMonitorTargetEnabled As Nullable(Of Boolean) = Nothing, Optional isManagedIdentityInUse As Nullable(Of Boolean) = Nothing, Optional state As Nullable(Of BlobAuditingPolicyState) = Nothing, Optional storageEndpoint As String = Nothing, Optional storageAccountAccessKey As String = Nothing, Optional storageAccountSubscriptionId As Nullable(Of Guid) = Nothing) As SqlServerDevOpsAuditingSettingData

Parameters

id
ResourceIdentifier

The id.

name
String

The name.

resourceType
ResourceType

The resourceType.

systemData
SystemData

The systemData.

isAzureMonitorTargetEnabled
Nullable<Boolean>

Specifies whether DevOps 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 DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should be also 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
Nullable<Boolean>

Specifies whether Managed Identity is used to access blob storage.

state
Nullable<BlobAuditingPolicyState>

Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.

storageEndpoint
String

Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.

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
Nullable<Guid>

Specifies the blob storage subscription Id.

Returns

A new SqlServerDevOpsAuditingSettingData instance for mocking.

Applies to