Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added isManagedIdentityInUse get parameter for Get-AzSqlServerAudit and Get-AzSqlDatabaseAudit #18703

Merged
merged 3 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Sql/Sql/Auditing/Model/ServerDevOpsAuditModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,7 @@ public class ServerDevOpsAuditModel

[Hidden]
internal string NextDiagnosticSettingsName { get; set; }

public bool? IsManagedIdentityInUse { get; set; }
}
}
8 changes: 5 additions & 3 deletions src/Sql/Sql/Auditing/Services/SqlAuditAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/Sql/Sql/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down