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
2 changes: 1 addition & 1 deletion src/Sql/Sql.Test/Sql.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="Microsoft.Azure.KeyVault.WebKey" Version="3.0.1" />
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="4.0.0-preview.1" />
<PackageReference Include="Microsoft.Azure.Management.OperationalInsights" Version="0.24.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Sql" Version="3.0.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Sql" Version="3.1.0-preview" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
using Microsoft.Azure.Commands.Sql.AdvancedThreatProtection.Model;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using System.Management.Automation;
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;

namespace Microsoft.Azure.Commands.Sql.AdvancedThreatProtection.Cmdlet
{
/// <summary>
/// Disables the Advanced Data Security of a specific server.
/// </summary>
[GenericBreakingChange("Disable-AzSqlServerAdvancedThreatProtection alias will be removed in an upcoming breaking change release", "9.0.0")]
[Cmdlet("Disable", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlServerAdvancedDataSecurity", SupportsShouldProcess = true), OutputType(typeof(ServerAdvancedDataSecurityPolicyModel))]
[Alias("Disable-AzSqlServerAdvancedThreatProtection")]
public class DisableAzureSqlServerAdvancedDataSecurity : SqlServerAdvancedDataSecurityCmdletBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,21 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Sql.AdvancedThreatProtection.Model;
using System.Management.Automation;
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
using Microsoft.Azure.Commands.Sql.AdvancedThreatProtection.Model;
using Microsoft.Azure.Commands.Sql.Server.Adapter;
using Microsoft.Azure.Commands.Sql.Server.Model;
using Microsoft.Azure.Commands.Sql.VulnerabilityAssessment.Model;
using Microsoft.Azure.Commands.Sql.VulnerabilityAssessment.Services;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.Sql.AdvancedThreatProtection.Cmdlet
{
/// <summary>
/// Enables the Advanced Threat Protection of a specific server.
/// </summary>
[GenericBreakingChange("Enable-AzSqlServerAdvancedThreatProtection alias will be removed in an upcoming breaking change release", "9.0.0")]
[Cmdlet("Enable", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlServerAdvancedDataSecurity", SupportsShouldProcess = true), OutputType(typeof(ServerAdvancedDataSecurityPolicyModel))]
[Alias("Enable-AzSqlServerAdvancedThreatProtection")]
public class EnableAzureSqlServerAdvancedDataSecurity : SqlServerAdvancedDataSecurityCmdletBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Sql.AdvancedThreatProtection.Model;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.Sql.AdvancedThreatProtection.Cmdlet
{
/// <summary>
/// Returns the Advanced Threat Protection policy of a specific server.
/// </summary>
[GenericBreakingChange("Get-AzSqlServerAdvancedThreatProtectionPolicy alias will be removed in an upcoming breaking change release", "9.0.0")]
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlServerAdvancedDataSecurityPolicy"), OutputType(typeof(ServerAdvancedDataSecurityPolicyModel))]
[Alias("Get-AzSqlServerAdvancedThreatProtectionPolicy")]
public class GetAzureSqlServerAdvancedDataSecurityPolicy : SqlServerAdvancedDataSecurityCmdletBase
Expand Down
1 change: 0 additions & 1 deletion src/Sql/Sql/Az.Sql.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ AliasesToExport = 'Get-AzSqlDatabaseServerAuditingPolicy',
'Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting',
'Enable-AzSqlServerAdvancedThreatProtection',
'Disable-AzSqlServerAdvancedThreatProtection',
'Get-AzSqlServerAdvancedThreatProtectionSetting',
'Get-AzSqlServerThreatDetectionSetting',
'Remove-AzSqlServerThreatDetectionSetting',
'Set-AzSqlServerThreatDetectionSetting',
Expand Down
2 changes: 2 additions & 0 deletions src/Sql/Sql/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
- `Remove-AzSqlInstanceLink`
- `Set-AzSqlInstanceLink`
* Added support for DataWarehouse cross tenant and cross subscription restore operations to `Restore-AzSqlDatabase` cmdlet
* Upgrading to usage of .NET SDK 3.1.0-preview
* Declare breaking changes for the AdvancedDataSecurity and AdvancedThreatProtection cmdlets to be effective from 9.0.0.

## Version 3.7.1
* Deprecation of Get-AzSqlDatabaseTransparentDataEncryptionActivity cmdlet
Expand Down
10 changes: 5 additions & 5 deletions src/Sql/Sql/Sql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
</PropertyGroup>

<ItemGroup>
<None Remove="AdvancedThreatProtection\Templates\DeployInstanceVaTemplate.json" />
<None Remove="AdvancedThreatProtection\Templates\DeployServerVaTemplate.json" />
<None Remove="AdvancedDataSecurity\Templates\DeployInstanceVaTemplate.json" />
<None Remove="AdvancedDataSecurity\Templates\DeployServerVaTemplate.json" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="AdvancedThreatProtection\Templates\DeployInstanceVaTemplate.json" />
<EmbeddedResource Include="AdvancedThreatProtection\Templates\DeployServerVaTemplate.json" />
<EmbeddedResource Include="AdvancedDataSecurity\Templates\DeployInstanceVaTemplate.json" />
<EmbeddedResource Include="AdvancedDataSecurity\Templates\DeployServerVaTemplate.json" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Sql" Version="3.0.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Sql" Version="3.1.0-preview" />
<PackageReference Include="System.Security.Permissions" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Sql.ThreatDetection.Model;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Cmdlet
{
/// <summary>
/// Returns the advanced threat protection settings of a specific database.
/// </summary>
[GenericBreakingChange("Get-AzSqlDatabaseAdvancedThreatProtectionSettings alias will be removed in an upcoming breaking change release", "3.0.0")]
[CmdletOutputBreakingChange(
deprecatedCmdletOutputTypeName: typeof(DatabaseThreatDetectionPolicyModel),
deprecateByVersion: "9.0.0",
ReplacementCmdletOutputTypeName = "DatabaseAdvancedThreatProtectionSettingsModel")]
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseAdvancedThreatProtectionSetting", SupportsShouldProcess = true),OutputType(typeof(DatabaseThreatDetectionPolicyModel))]
[Alias("Get-AzSqlDatabaseAdvancedThreatProtectionSettings")]
public class AzureRmSqlDatabaseThreatDetectionPolicy : SqlDatabaseThreatDetectionCmdletBase
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Cmdlet
/// <summary>
/// Returns the advanced threat protection settings of a specific server.
/// </summary>
[GenericBreakingChange("Get-AzSqlServerAdvancedThreatProtectionSettings alias will be removed in an upcoming breaking change release", "3.0.0")]
[CmdletOutputBreakingChange(
deprecatedCmdletOutputTypeName: typeof(ServerThreatDetectionPolicyModel),
deprecateByVersion: "9.0.0",
ReplacementCmdletOutputTypeName = "ServerAdvancedThreatProtectionSettingsModel")]
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlServerAdvancedThreatProtectionSetting", SupportsShouldProcess = true), OutputType(typeof(ServerThreatDetectionPolicyModel))]
[Alias("Get-AzSqlServerAdvancedThreatProtectionSettings")]
public class AzureRmSqlServerThreatDetectionPolicy : SqlServerThreatDetectionCmdletBase
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Cmdlet
/// <summary>
/// Clears advanced threat protection on a specific database.
/// </summary>
[GenericBreakingChange("Remove-AzSqlDatabaseAdvancedThreatProtectionSettings alias will be removed in an upcoming breaking change release", "3.0.0")]
[GenericBreakingChange("Clear-AzSqlDatabaseAdvancedThreatProtectionSetting cmdlet will be removed in an upcoming breaking change release", "9.0.0")]
[Cmdlet("Clear", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseAdvancedThreatProtectionSetting", SupportsShouldProcess = true),OutputType(typeof(DatabaseThreatDetectionPolicyModel))]
[Alias("Remove-AzSqlDatabaseAdvancedThreatProtectionSettings")]
public class AzureRmSqlDatabaseThreatDetection : SqlDatabaseThreatDetectionCmdletBase
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Cmdlet
/// <summary>
/// Clears advanced threat protection on a specific server.
/// </summary>
[GenericBreakingChange("Remove-AzSqlServerAdvancedThreatProtectionSettings alias will be removed in an upcoming breaking change release", "3.0.0")]
[GenericBreakingChange("Clear-AzSqlServerAdvancedThreatProtectionSetting cmdlet will be removed in an upcoming breaking change release", "9.0.0")]
[Cmdlet("Clear", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlServerAdvancedThreatProtectionSetting", SupportsShouldProcess = true), OutputType(typeof(ServerThreatDetectionPolicyModel))]
[Alias("Remove-AzSqlServerAdvancedThreatProtectionSettings")]
public class AzureRmSqlServerThreatDetection : SqlServerThreatDetectionCmdletBase
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@

using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.Sql.ThreatDetection.Model;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Cmdlet
{
/// <summary>
/// Updates the advanced threat protection properties for a specific database.
/// </summary>
[GenericBreakingChange("Set-AzSqlDatabaseAdvancedThreatProtectionSettings alias will be removed in an upcoming breaking change release", "3.0.0")]
[Cmdlet("Update", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseAdvancedThreatProtectionSetting", SupportsShouldProcess = true), OutputType(typeof(DatabaseThreatDetectionPolicyModel))]
[Alias("Set-AzSqlDatabaseAdvancedThreatProtectionSettings")]
public class SetAzureSqlDatabaseThreatDetection : SqlDatabaseThreatDetectionCmdletBase
{
/// <summary>
Expand All @@ -36,19 +34,22 @@ public class SetAzureSqlDatabaseThreatDetection : SqlDatabaseThreatDetectionCmdl
/// <summary>
/// Gets or sets the Threat Detection Email Addresses
/// </summary>
[CmdletParameterBreakingChange("NotificationRecipientsEmails", deprecateByVersion: "9.0.0")]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A semicolon separated list of email addresses to send the alerts to")]
public string NotificationRecipientsEmails { get; set; }

/// <summary>
/// Gets or sets the whether to email administrators.
/// </summary>
[CmdletParameterBreakingChange("EmailAdmins", deprecateByVersion: "9.0.0")]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Defines whether to email administrators")]
[ValidateNotNullOrEmpty]
public bool? EmailAdmins { get; set; }

/// <summary>
/// Gets or sets the names of the detection types to filter.
/// </summary>
[CmdletParameterBreakingChange("ExcludedDetectionType", deprecateByVersion: "9.0.0")]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Detection types to exclude")]
[PSArgumentCompleter(DetectionType.None,
DetectionType.Sql_Injection,
Expand All @@ -62,13 +63,15 @@ public class SetAzureSqlDatabaseThreatDetection : SqlDatabaseThreatDetectionCmdl
/// <summary>
/// Gets or sets the name of the storage account to use.
/// </summary>
[CmdletParameterBreakingChange("StorageAccountName", deprecateByVersion: "9.0.0")]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the storage account")]
[ValidateNotNullOrEmpty]
public string StorageAccountName { get; set; }

/// <summary>
/// Gets or sets the number of retention days for the audit logs table.
/// </summary>
[CmdletParameterBreakingChange("RetentionInDays", deprecateByVersion: "9.0.0")]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true,
HelpMessage = "The number of retention days for the audit logs")]
[ValidateNotNullOrEmpty]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@

using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.Sql.ThreatDetection.Model;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Cmdlet
{
/// <summary>
/// Updates the advanced threat protection properties for a specific server.
/// </summary>
[GenericBreakingChange("Set-AzSqlServerAdvancedThreatProtectionSettings alias will be removed in an upcoming breaking change release", "3.0.0")]
[Cmdlet("Update", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlServerAdvancedThreatProtectionSetting", SupportsShouldProcess = true), OutputType(typeof(ServerThreatDetectionPolicyModel))]
[Alias("Set-AzSqlServerAdvancedThreatProtectionSettings")]
public class SetAzureSqlServerThreatDetection : SqlServerThreatDetectionCmdletBase
{
/// <summary>
Expand All @@ -36,19 +34,22 @@ public class SetAzureSqlServerThreatDetection : SqlServerThreatDetectionCmdletBa
/// <summary>
/// Gets or sets the Threat Detection Email Addresses
/// </summary>
[CmdletParameterBreakingChange("NotificationRecipientsEmails", deprecateByVersion: "9.0.0")]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A semicolon separated list of email addresses to send the alerts to")]
public string NotificationRecipientsEmails { get; set; }

/// <summary>
/// Gets or sets the whether to email administrators.
/// </summary>
[CmdletParameterBreakingChange("EmailAdmins", deprecateByVersion: "9.0.0")]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Defines whether to email administrators")]
[ValidateNotNullOrEmpty]
public bool? EmailAdmins { get; set; }

/// <summary>
/// Gets or sets the names of the detection types to filter.
/// </summary>
[CmdletParameterBreakingChange("ExcludedDetectionType", deprecateByVersion: "9.0.0")]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Detection types to exclude")]
[PSArgumentCompleter(DetectionType.None,
DetectionType.Sql_Injection,
Expand All @@ -62,13 +63,15 @@ public class SetAzureSqlServerThreatDetection : SqlServerThreatDetectionCmdletBa
/// <summary>
/// Gets or sets the name of the storage account to use.
/// </summary>
[CmdletParameterBreakingChange("StorageAccountName", deprecateByVersion: "9.0.0")]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the storage account")]
[ValidateNotNullOrEmpty]
public string StorageAccountName { get; set; }

/// <summary>
/// Gets or sets the number of retention days for the audit logs table.
/// </summary>
[CmdletParameterBreakingChange("RetentionInDays", deprecateByVersion: "9.0.0")]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true,
HelpMessage = "The number of retention days for the audit logs")]
[ValidateNotNullOrEmpty]
Expand Down