From 9e2e002054286eff2af89c667dd351a3b0b5dbc4 Mon Sep 17 00:00:00 2001 From: xaliciayang Date: Thu, 1 Apr 2021 15:52:22 -0700 Subject: [PATCH 1/4] add breaking change warning --- src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs | 2 ++ src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs | 1 + src/Sql/Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs | 2 ++ src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs | 1 + .../Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs | 2 ++ src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseCopy.cs | 2 ++ src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseSecondary.cs | 2 ++ .../Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs | 2 ++ src/Sql/Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs | 2 ++ 9 files changed, 16 insertions(+) diff --git a/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs b/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs index 5cfbbaa8bd6d..148254080b6d 100644 --- a/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs @@ -14,11 +14,13 @@ using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.Sql.Database.Model; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Collections.Generic; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { + [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] [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..7e68cbf61f41 100644 --- a/src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs @@ -30,6 +30,7 @@ namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet /// /// Cmdlet to create a new Azure Sql Database /// + [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] [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..72f3ee72096b 100644 --- a/src/Sql/Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs @@ -14,12 +14,14 @@ using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.Sql.Database.Model; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Collections.Generic; using System.Globalization; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { + [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] [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..f60709842534 100644 --- a/src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs @@ -30,6 +30,7 @@ namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet /// /// Cmdlet to create a new Azure Sql Database /// + [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] [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..8e7d2bb946f5 100644 --- a/src/Sql/Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs +++ b/src/Sql/Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs @@ -14,11 +14,13 @@ using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.Sql.Replication.Model; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Collections.Generic; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet { + [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] [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..7bd16b388c47 100644 --- a/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseCopy.cs +++ b/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseCopy.cs @@ -23,12 +23,14 @@ using System.Linq; using System.Management.Automation; using System.Globalization; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet { /// /// Cmdlet to create a new Azure SQL Database Copy /// + [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] [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..2f178d06d2f0 100644 --- a/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseSecondary.cs +++ b/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseSecondary.cs @@ -23,12 +23,14 @@ using System.Linq; using System.Management.Automation; using System.Globalization; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet { /// /// Cmdlet to create a new Azure SQL Database Secondary and Replication Link /// + [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] [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..17f66fefb8e4 100644 --- a/src/Sql/Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs +++ b/src/Sql/Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs @@ -14,11 +14,13 @@ using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.Sql.Replication.Model; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Collections.Generic; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet { + [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] [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..562da244d133 100644 --- a/src/Sql/Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs +++ b/src/Sql/Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs @@ -15,6 +15,7 @@ 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.Collections.Generic; using System.Management.Automation; @@ -23,6 +24,7 @@ namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet /// /// Cmdlet to fail over Azure SQL Database Replication Link to the secondary database /// + [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseSecondary",DefaultParameterSetName = NoOptionsSet,ConfirmImpact = ConfirmImpact.Medium, SupportsShouldProcess = true), OutputType(typeof(AzureReplicationLinkModel))] public class SetAzureSqlDatabaseSecondary : AzureSqlDatabaseSecondaryCmdletBase { From 188a3646f5cdcbde322ec67771a587db3dec4409 Mon Sep 17 00:00:00 2001 From: xaliciayang Date: Tue, 6 Apr 2021 15:22:02 -0700 Subject: [PATCH 2/4] Update breaking change warning to target cmdlet output --- src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs | 7 ++++++- src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs | 7 ++++++- src/Sql/Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs | 7 ++++++- src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs | 6 +++++- .../Cmdlet/GetAzureSqlDatabaseReplicationLink.cs | 7 ++++++- src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseCopy.cs | 7 ++++++- .../Sql/Replication/Cmdlet/NewAzureSqlDatabaseSecondary.cs | 7 ++++++- .../Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs | 7 ++++++- .../Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs | 7 ++++++- 9 files changed, 53 insertions(+), 9 deletions(-) diff --git a/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs b/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs index 148254080b6d..f8e5305b09d1 100644 --- a/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs @@ -15,12 +15,17 @@ 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 { - [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] + [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 7e68cbf61f41..05fa1b5cc6f9 100644 --- a/src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs @@ -24,13 +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 /// - [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] + [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 72f3ee72096b..165c4a7429e7 100644 --- a/src/Sql/Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs @@ -15,13 +15,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.Globalization; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { - [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] + [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 f60709842534..59ec570bdba4 100644 --- a/src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs +++ b/src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs @@ -30,7 +30,11 @@ namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet /// /// Cmdlet to create a new Azure Sql Database /// - [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] + [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 8e7d2bb946f5..f10c66b832b6 100644 --- a/src/Sql/Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs +++ b/src/Sql/Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs @@ -15,12 +15,17 @@ 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 { - [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] + [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 7bd16b388c47..ddaa939a85a6 100644 --- a/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseCopy.cs +++ b/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseCopy.cs @@ -24,13 +24,18 @@ 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 /// - [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] + [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 2f178d06d2f0..851e4ae1117d 100644 --- a/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseSecondary.cs +++ b/src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseSecondary.cs @@ -24,13 +24,18 @@ 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 /// - [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] + [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 17f66fefb8e4..3c34238c1112 100644 --- a/src/Sql/Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs +++ b/src/Sql/Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs @@ -15,12 +15,17 @@ 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 { - [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] + [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 562da244d133..bd56393dd5ee 100644 --- a/src/Sql/Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs +++ b/src/Sql/Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs @@ -16,6 +16,7 @@ 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; @@ -24,7 +25,11 @@ namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet /// /// Cmdlet to fail over Azure SQL Database Replication Link to the secondary database /// - [GenericBreakingChange("Database property 'BackupStorageRedundancy' has been changed to 'CurrentBackupStorageRedundancy' and 'RequestedBackupStorageRedundancy' in this version.")] + [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 { From 5aa7a405dab2bf59cdb26aa7a46c3558c5c85d3e Mon Sep 17 00:00:00 2001 From: xaliciayang Date: Wed, 7 Apr 2021 14:55:42 -0700 Subject: [PATCH 3/4] Update changelog to show breaking change warnings added --- src/Sql/Sql/ChangeLog.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Sql/Sql/ChangeLog.md b/src/Sql/Sql/ChangeLog.md index d9b898327264..fcb3bdaf392f 100644 --- a/src/Sql/Sql/ChangeLog.md +++ b/src/Sql/Sql/ChangeLog.md @@ -17,7 +17,18 @@ * Overview of change #1 - Additional information about change #1 --> -## Upcoming Release +## Version 2.18.0 +* 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` From 6bf7315c1f0adc6d753bc70c5af555a823d5eb31 Mon Sep 17 00:00:00 2001 From: xaliciayang Date: Wed, 7 Apr 2021 17:31:04 -0700 Subject: [PATCH 4/4] "upcoming release" --- src/Sql/Sql/ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sql/Sql/ChangeLog.md b/src/Sql/Sql/ChangeLog.md index fcb3bdaf392f..e9afea498a76 100644 --- a/src/Sql/Sql/ChangeLog.md +++ b/src/Sql/Sql/ChangeLog.md @@ -17,7 +17,7 @@ * Overview of change #1 - Additional information about change #1 --> -## Version 2.18.0 +## Upcoming Release * Added cmdlet output breaking change warnings to the following: - `New-AzSqlDatabase` - `Get-AzSqlDatabase`