Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public async void TestCreateUpdateGetDatabaseVulnerabilityAssessments()
// Turn ON database threat detection as a prerequisite to use VA
DatabaseSecurityAlertPolicy updatedDatabasePolicy = new DatabaseSecurityAlertPolicy
{
State = SecurityAlertPolicyState.Enabled,
EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled
State = SecurityAlertsPolicyState.Enabled,
EmailAccountAdmins = true
};
sqlClient.DatabaseThreatDetectionPolicies.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy);
sqlClient.DatabaseSecurityAlertPolicies.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy);

// Verify Policy is empty to begin with
DatabaseVulnerabilityAssessment policyThatWasReceived = sqlClient.DatabaseVulnerabilityAssessments.Get(resourceGroup.Name, server.Name, dbName);
Expand Down Expand Up @@ -98,10 +98,10 @@ public async void TestCreateUpdateGetDeleteDatabaseVulnerabilityAssessmentBaseli
// Turn ON database threat detection as a prerequisite to use VA
DatabaseSecurityAlertPolicy updatedDatabasePolicy = new DatabaseSecurityAlertPolicy
{
State = SecurityAlertPolicyState.Enabled,
EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled
State = SecurityAlertsPolicyState.Enabled,
EmailAccountAdmins = true
};
sqlClient.DatabaseThreatDetectionPolicies.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy);
sqlClient.DatabaseSecurityAlertPolicies .CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy);

// Set policy
await SetPolicy(context, sqlClient, resourceGroup, server, dbName);
Expand Down Expand Up @@ -140,10 +140,10 @@ public async void TestExecuteGetListDatabaseVulnerabilityAssessmentScans()
// Turn ON database threat detection as a prerequisite to use VA
DatabaseSecurityAlertPolicy updatedDatabasePolicy = new DatabaseSecurityAlertPolicy
{
State = SecurityAlertPolicyState.Enabled,
EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled
State = SecurityAlertsPolicyState.Enabled,
EmailAccountAdmins = true
};
sqlClient.DatabaseThreatDetectionPolicies.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy);
sqlClient.DatabaseSecurityAlertPolicies.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy);

// Set policy
await SetPolicy(context, sqlClient, resourceGroup, server, dbName);
Expand Down Expand Up @@ -200,10 +200,10 @@ public async void TestExportDatabaseVulnerabilityAssessmentScans()
// Turn ON database threat detection as a prerequisite to use VA
DatabaseSecurityAlertPolicy updatedDatabasePolicy = new DatabaseSecurityAlertPolicy
{
State = SecurityAlertPolicyState.Enabled,
EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled
State = SecurityAlertsPolicyState.Enabled,
EmailAccountAdmins = true
};
sqlClient.DatabaseThreatDetectionPolicies.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy);
sqlClient.DatabaseSecurityAlertPolicies.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy);

// Set policy
await SetPolicy(context, sqlClient, resourceGroup, server, dbName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private async Task<DatabaseVulnerabilityAssessment> SetPolicy(SqlManagementTestC
// Modify the policy properties, send and receive and see it its still ok
ManagedServerSecurityAlertPolicy updatedManagedServerPolicy = new ManagedServerSecurityAlertPolicy
{
State = SecurityAlertPolicyState.Enabled,
State = SecurityAlertsPolicyState.Enabled,
EmailAccountAdmins = true
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void TestManagedInstanceThreatDetection()
// Modify the policy properties, send and receive and see it its still ok
ManagedServerSecurityAlertPolicy updatedManagedServerPolicy = new ManagedServerSecurityAlertPolicy
{
State = SecurityAlertPolicyState.Enabled,
State = SecurityAlertsPolicyState.Enabled,
EmailAccountAdmins = true
};

Expand All @@ -69,7 +69,7 @@ public void TestManagedInstanceThreatDetection()
// Modify the policy properties again, send and receive and see it its still ok
updatedManagedServerPolicy = new ManagedServerSecurityAlertPolicy
{
State = SecurityAlertPolicyState.Disabled,
State = SecurityAlertsPolicyState.Disabled,
EmailAccountAdmins = true,
EmailAddresses = new List<string>() { "[email protected]", "[email protected]" },
DisabledAlerts = new List<string>() { "Sql_Injection" },
Expand Down Expand Up @@ -139,7 +139,7 @@ private ManagedServerSecurityAlertPolicy GetDefaultManagedInstanceSecurityAlertP
{
ManagedServerSecurityAlertPolicy properties = new ManagedServerSecurityAlertPolicy
{
State = SecurityAlertPolicyState.Disabled,
State = SecurityAlertsPolicyState.Disabled,
EmailAccountAdmins = false,
DisabledAlerts = new List<string>() { string.Empty },
EmailAddresses = new List<string>() { string.Empty },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private async Task<ManagedInstanceVulnerabilityAssessment> SetPolicy(SqlManageme
// Modify the policy properties, send and receive and see it its still ok
ManagedServerSecurityAlertPolicy updatedManagedServerPolicy = new ManagedServerSecurityAlertPolicy
{
State = SecurityAlertPolicyState.Enabled,
State = SecurityAlertsPolicyState.Enabled,
EmailAccountAdmins = true
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public async void TestCreateUpdateGetServerVulnerabilityAssessments()
// Turn ON Server ATP(threat detection) as a prerequisite to use VA
ServerSecurityAlertPolicy updatedServerPolicy = new ServerSecurityAlertPolicy
{
State = SecurityAlertPolicyState.Enabled,
State = SecurityAlertsPolicyState.Enabled,
EmailAccountAdmins = true
};

Expand Down
Loading