diff --git a/src/Sql/Sql/Auditing/Model/ServerDevOpsAuditModel.cs b/src/Sql/Sql/Auditing/Model/ServerDevOpsAuditModel.cs index 62a338e2c808..f093e350428e 100644 --- a/src/Sql/Sql/Auditing/Model/ServerDevOpsAuditModel.cs +++ b/src/Sql/Sql/Auditing/Model/ServerDevOpsAuditModel.cs @@ -48,5 +48,7 @@ public class ServerDevOpsAuditModel [Hidden] internal string NextDiagnosticSettingsName { get; set; } + + public bool? IsManagedIdentityInUse { get; set; } } } diff --git a/src/Sql/Sql/Auditing/Services/SqlAuditAdapter.cs b/src/Sql/Sql/Auditing/Services/SqlAuditAdapter.cs index 918de61d88ce..e7f1507c9c70 100644 --- a/src/Sql/Sql/Auditing/Services/SqlAuditAdapter.cs +++ b/src/Sql/Sql/Auditing/Services/SqlAuditAdapter.cs @@ -91,9 +91,11 @@ internal void ModelizeAuditPolicy(AuditModelType model, bool? isSecondary, Guid? storageAccountSubscriptionId, bool? isAzureMonitorTargetEnabled, - int? retentionDays) + int? retentionDays, + bool? isManagedIdentityInUse) { model.IsAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; + model.IsManagedIdentityInUse = isManagedIdentityInUse; ModelizeStorageInfo(model, storageEndpoint, isSecondary, storageAccountSubscriptionId, IsAuditEnabled(state), retentionDays); DetermineTargetsState(model, state); @@ -707,7 +709,7 @@ protected override void ModelizeAuditPolicy(AuditModelType model, ExtendedAuditP ModelizeAuditPolicy(model, dynamicPolicy.State, dynamicPolicy.StorageEndpoint, dynamicPolicy.IsStorageSecondaryKeyInUse, dynamicPolicy.StorageAccountSubscriptionId, dynamicPolicy.IsAzureMonitorTargetEnabled, - dynamicPolicy.RetentionDays); + dynamicPolicy.RetentionDays, dynamicPolicy.IsManagedIdentityInUse); model.PredicateExpression = dynamicPolicy.PredicateExpression; model.AuditActionGroup = ExtractAuditActionGroups(dynamicPolicy.AuditActionsAndGroups); @@ -969,7 +971,7 @@ protected override void ModelizeAuditPolicy(ServerDevOpsAuditModel model, Server { ModelizeAuditPolicy(model, policy.State, policy.StorageEndpoint, null, policy.StorageAccountSubscriptionId, - policy.IsAzureMonitorTargetEnabled, null); + policy.IsAzureMonitorTargetEnabled, null, null); } protected override StorageKeyKind GetStorageKeyKind(ServerDevOpsAuditModel model) diff --git a/src/Sql/Sql/ChangeLog.md b/src/Sql/Sql/ChangeLog.md index a84abe8571a6..0df661183a6f 100644 --- a/src/Sql/Sql/ChangeLog.md +++ b/src/Sql/Sql/ChangeLog.md @@ -20,6 +20,7 @@ ## Upcoming Release * Added additional input validation to `Stop-AzSqlInstanceDatabaseLogReplay` cmdlet to ensure the target database was created by log replay service * Bug fix for cmdlet `Restore-AzSqlDatabase`. The optional property `Tags` was not working as expected +* Added isManagedIdentityInUse get parameter for `Get-AzSqlServerAudit` and `Get-AzSqlDatabaseAudit` ## Version 3.9.0 * Added new cmdlet `Get-AzSqlInstanceEndpointCertificate`