diff --git a/src/Sql/Sql/ChangeLog.md b/src/Sql/Sql/ChangeLog.md index d9b898327264..e9afea498a76 100644 --- a/src/Sql/Sql/ChangeLog.md +++ b/src/Sql/Sql/ChangeLog.md @@ -18,6 +18,17 @@ - Additional information about change #1 --> ## Upcoming Release +* Added cmdlet output breaking change warnings to the following: + - `New-AzSqlDatabase` + - `Get-AzSqlDatabase` + - `Set-AzSqlDatabase` + - `Remove-AzSqlDatabase` + - `New-AzSqlDatabaseSecondary` + - `Remove-AzSqlDatabaseSecondary` + - `Get-AzSqlDatabaseReplicationLink` + - `New-AzSqlDatabaseCopy` + - `Set-AzSqlDatabaseSecondary` + ## Version 2.17.0 * Added cmdlet `New-AzSqlServerTrustGroup` diff --git a/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs b/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs index 5cfbbaa8bd6d..f8e5305b09d1 100644 --- a/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs @@ -14,11 +14,18 @@ using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.Sql.Database.Model; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; +using System; using System.Collections.Generic; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { + [CmdletOutputBreakingChange( + deprecatedCmdletOutputTypeName: typeof(AzureSqlDatabaseModel), + deprecateByVersion: "3.0.0", + DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" }, + NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })] [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabase", SupportsShouldProcess = true,ConfirmImpact = ConfirmImpact.None)] [OutputType(typeof(AzureSqlDatabaseModel))] public class GetAzureSqlDatabase : AzureSqlDatabaseCmdletBase> diff --git a/src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs b/src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs index 5967dc1740ea..05fa1b5cc6f9 100644 --- a/src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs @@ -24,12 +24,18 @@ using System.Management.Automation; using System.Collections; using System.Globalization; +using System; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { /// /// Cmdlet to create a new Azure Sql Database /// + [CmdletOutputBreakingChange( + deprecatedCmdletOutputTypeName: typeof(AzureSqlDatabaseModel), + deprecateByVersion: "3.0.0", + DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" }, + NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })] [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabase", SupportsShouldProcess = true,ConfirmImpact = ConfirmImpact.Low, DefaultParameterSetName = DtuDatabaseParameterSet), OutputType(typeof(AzureSqlDatabaseModel))] public class NewAzureSqlDatabase : AzureSqlDatabaseCmdletBase { diff --git a/src/Sql/Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs b/src/Sql/Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs index 6d7af30c9d28..165c4a7429e7 100644 --- a/src/Sql/Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs @@ -14,12 +14,19 @@ using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.Sql.Database.Model; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; +using System; using System.Collections.Generic; using System.Globalization; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { + [CmdletOutputBreakingChange( + deprecatedCmdletOutputTypeName: typeof(AzureSqlDatabaseModel), + deprecateByVersion: "3.0.0", + DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" }, + NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })] [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabase", SupportsShouldProcess = true), OutputType(typeof(AzureSqlDatabaseModel))] public class RemoveAzureSqlDatabase : AzureSqlDatabaseCmdletBase> { diff --git a/src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs b/src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs index bfb167940c7b..59ec570bdba4 100644 --- a/src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs @@ -30,6 +30,11 @@ namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet /// /// Cmdlet to create a new Azure Sql Database /// + [CmdletOutputBreakingChange( + deprecatedCmdletOutputTypeName: typeof(AzureSqlDatabaseModel), + deprecateByVersion: "3.0.0", + DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" }, + NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })] [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabase", SupportsShouldProcess = true,ConfirmImpact = ConfirmImpact.Medium, DefaultParameterSetName = UpdateParameterSetName), OutputType(typeof(AzureSqlDatabaseModel))] public class SetAzureSqlDatabase : AzureSqlDatabaseCmdletBase> { diff --git a/src/Sql/Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs b/src/Sql/Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs index 809a8e71e3cd..f10c66b832b6 100644 --- a/src/Sql/Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs +++ b/src/Sql/Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs @@ -14,11 +14,18 @@ using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.Sql.Replication.Model; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; +using System; using System.Collections.Generic; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet { + [CmdletOutputBreakingChange( + deprecatedCmdletOutputTypeName: typeof(AzureReplicationLinkModel), + deprecateByVersion: "3.0.0", + DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" }, + NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })] [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseReplicationLink", ConfirmImpact = ConfirmImpact.None, SupportsShouldProcess = true)] [OutputType(typeof(AzureReplicationLinkModel))] public class GetAzureSqlDatabaseReplicationLink : AzureSqlDatabaseSecondaryCmdletBase diff --git a/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseCopy.cs b/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseCopy.cs index 6d4b6dd248f1..ddaa939a85a6 100644 --- a/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseCopy.cs +++ b/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseCopy.cs @@ -23,12 +23,19 @@ using System.Linq; using System.Management.Automation; using System.Globalization; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; +using System; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet { /// /// Cmdlet to create a new Azure SQL Database Copy /// + [CmdletOutputBreakingChange( + deprecatedCmdletOutputTypeName: typeof(AzureSqlDatabaseCopyModel), + deprecateByVersion: "3.0.0", + DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" }, + NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })] [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseCopy", ConfirmImpact = ConfirmImpact.Low, SupportsShouldProcess = true, DefaultParameterSetName = DtuDatabaseParameterSet), OutputType(typeof(AzureSqlDatabaseCopyModel))] public class NewAzureSqlDatabaseCopy : AzureSqlDatabaseCopyCmdletBase { diff --git a/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseSecondary.cs b/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseSecondary.cs index 816f13462dbb..851e4ae1117d 100644 --- a/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseSecondary.cs +++ b/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseSecondary.cs @@ -23,12 +23,19 @@ using System.Linq; using System.Management.Automation; using System.Globalization; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; +using System; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet { /// /// Cmdlet to create a new Azure SQL Database Secondary and Replication Link /// + [CmdletOutputBreakingChange( + deprecatedCmdletOutputTypeName: typeof(AzureReplicationLinkModel), + deprecateByVersion: "3.0.0", + DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" }, + NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })] [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseSecondary",ConfirmImpact = ConfirmImpact.Low, SupportsShouldProcess = true, DefaultParameterSetName = DtuDatabaseParameterSet), OutputType(typeof(AzureReplicationLinkModel))] public class NewAzureSqlDatabaseSecondary : AzureSqlDatabaseSecondaryCmdletBase { diff --git a/src/Sql/Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs b/src/Sql/Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs index bfeee0f3158a..3c34238c1112 100644 --- a/src/Sql/Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs +++ b/src/Sql/Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs @@ -14,11 +14,18 @@ using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.Sql.Replication.Model; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; +using System; using System.Collections.Generic; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet { + [CmdletOutputBreakingChange( + deprecatedCmdletOutputTypeName: typeof(AzureReplicationLinkModel), + deprecateByVersion: "3.0.0", + DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" }, + NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })] [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseSecondary", SupportsShouldProcess = true), OutputType(typeof(AzureReplicationLinkModel))] public class RemoveAzureSqlDatabaseSecondary : AzureSqlDatabaseSecondaryCmdletBase { diff --git a/src/Sql/Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs b/src/Sql/Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs index 9df69b2779f2..bd56393dd5ee 100644 --- a/src/Sql/Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs +++ b/src/Sql/Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs @@ -15,6 +15,8 @@ using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.Replication.Model; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; +using System; using System.Collections.Generic; using System.Management.Automation; @@ -23,6 +25,11 @@ namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet /// /// Cmdlet to fail over Azure SQL Database Replication Link to the secondary database /// + [CmdletOutputBreakingChange( + deprecatedCmdletOutputTypeName: typeof(AzureReplicationLinkModel), + deprecateByVersion: "3.0.0", + DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" }, + NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })] [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseSecondary",DefaultParameterSetName = NoOptionsSet,ConfirmImpact = ConfirmImpact.Medium, SupportsShouldProcess = true), OutputType(typeof(AzureReplicationLinkModel))] public class SetAzureSqlDatabaseSecondary : AzureSqlDatabaseSecondaryCmdletBase {