diff --git a/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyAssignment.cs b/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyAssignment.cs
index 5dade71769bf..c7379348119a 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyAssignment.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyAssignment.cs
@@ -27,6 +27,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Gets the policy assignment.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicyAssignment), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "EnforcementMode", "Metadata", "NonComplianceMessages", "NotScopes", "Parameters", "PolicyDefinitionId", "Scope" })]
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "PolicyAssignment", DefaultParameterSetName = PolicyCmdletBase.DefaultParameterSet), OutputType(typeof(PsPolicyAssignment))]
public class GetAzurePolicyAssignmentCmdlet : PolicyCmdletBase
{
diff --git a/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyDefinition.cs b/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyDefinition.cs
index 98e9d8c5afd5..fddfb5d5a1b1 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyDefinition.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyDefinition.cs
@@ -18,6 +18,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
using Microsoft.Azure.Commands.ResourceManager.Common;
+ using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Newtonsoft.Json.Linq;
using Policy;
@@ -28,6 +29,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Gets the policy definition.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicyDefinition), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "Metadata", "Mode", "Parameters", "PolicyRule", "PolicyType" })]
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "PolicyDefinition", DefaultParameterSetName = PolicyCmdletBase.NameParameterSet), OutputType(typeof(PsPolicyDefinition))]
public class GetAzurePolicyDefinitionCmdlet : PolicyCmdletBase
{
diff --git a/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyExemption.cs b/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyExemption.cs
index 829e21e84de2..a315c1bd2631 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyExemption.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicyExemption.cs
@@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
using Microsoft.Azure.Commands.ResourceManager.Common;
+ using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Newtonsoft.Json.Linq;
using Policy;
@@ -26,6 +27,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Gets the policy exemption.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicyExemption), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "ExemptionCategory", "ExpiresOn", "Metadata", "PolicyAssignmentId", "PolicyDefinitionReferenceIds" })]
[Cmdlet(VerbsCommon.Get, AzureRMConstants.AzureRMPrefix + "PolicyExemption", DefaultParameterSetName = PolicyCmdletBase.NameParameterSet), OutputType(typeof(PsPolicyExemption))]
public class GetAzurePolicyExemptionCmdlet : PolicyCmdletBase
{
diff --git a/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicySetDefinition.cs b/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicySetDefinition.cs
index 973bbbf5d35f..086ddee38b8f 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicySetDefinition.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/GetAzurePolicySetDefinition.cs
@@ -18,6 +18,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
using Microsoft.Azure.Commands.ResourceManager.Common;
+ using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Newtonsoft.Json.Linq;
using Policy;
@@ -28,6 +29,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Gets the policy set definition.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicySetDefinition), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "Metadata", "Parameters", "PolicyDefinitionGroups", "PolicyDefinitions", "PolicyType" })]
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "PolicySetDefinition", DefaultParameterSetName = PolicyCmdletBase.NameParameterSet), OutputType(typeof(PsPolicySetDefinition))]
public class GetAzurePolicySetDefinitionCmdlet : PolicyCmdletBase
{
diff --git a/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyAssignment.cs b/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyAssignment.cs
index de2e9c93db5b..cfbae95473ae 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyAssignment.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyAssignment.cs
@@ -34,6 +34,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Creates a policy assignment.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicyAssignment), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "EnforcementMode", "Metadata", "NonComplianceMessages", "NotScopes", "Parameters", "PolicyDefinitionId", "Scope" })]
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "PolicyAssignment", DefaultParameterSetName = PolicyCmdletBase.DefaultParameterSet), OutputType(typeof(PsPolicyAssignment))]
public class NewAzurePolicyAssignmentCmdlet : PolicyCmdletBase, IDynamicParameters
{
diff --git a/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyDefinition.cs b/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyDefinition.cs
index 27f21801bbe0..630e13234b68 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyDefinition.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyDefinition.cs
@@ -18,6 +18,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Policy;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
+ using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Newtonsoft.Json.Linq;
using Policy;
@@ -27,6 +28,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Creates the new policy definition.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicyDefinition), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "Metadata", "Mode", "Parameters", "PolicyRule", "PolicyType" })]
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "PolicyDefinition", DefaultParameterSetName = PolicyCmdletBase.NameParameterSet), OutputType(typeof(PsPolicyDefinition))]
public class NewAzurePolicyDefinitionCmdlet : PolicyCmdletBase
{
diff --git a/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyExemption.cs b/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyExemption.cs
index b2ed51035304..11b5ba2df831 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyExemption.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicyExemption.cs
@@ -21,6 +21,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Policy;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
using Microsoft.Azure.Commands.ResourceManager.Common;
+ using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Newtonsoft.Json.Linq;
using Policy;
@@ -28,6 +29,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Creates a policy exemption.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicyExemption), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "ExemptionCategory", "ExpiresOn", "Metadata", "PolicyAssignmentId", "PolicyDefinitionReferenceIds" })]
[Cmdlet(VerbsCommon.New, AzureRMConstants.AzureRMPrefix + "PolicyExemption", DefaultParameterSetName = PolicyCmdletBase.DefaultParameterSet, SupportsShouldProcess = true), OutputType(typeof(PsPolicyExemption))]
public class NewAzurePolicyExemptionCmdlet : PolicyCmdletBase
{
diff --git a/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicySetDefinition.cs b/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicySetDefinition.cs
index 03b2ab2fae6f..1aca1a7fb3bc 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicySetDefinition.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/NewAzurePolicySetDefinition.cs
@@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Policy;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
+ using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Newtonsoft.Json.Linq;
using Policy;
@@ -26,6 +27,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Creates the policy set definition.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicySetDefinition), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "Metadata", "Parameters", "PolicyDefinitionGroups", "PolicyDefinitions", "PolicyType" })]
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "PolicySetDefinition", DefaultParameterSetName = PolicyCmdletBase.NameParameterSet, SupportsShouldProcess = true), OutputType(typeof(PsPolicySetDefinition))]
public class NewAzurePolicySetDefinitionCmdlet : PolicyCmdletBase
{
diff --git a/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyAssignment.cs b/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyAssignment.cs
index 8e91da5940d3..79592d096f8d 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyAssignment.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyAssignment.cs
@@ -32,6 +32,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Sets the policy assignment.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicyAssignment), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "EnforcementMode", "Metadata", "NonComplianceMessages", "NotScopes", "Parameters", "PolicyDefinitionId", "Scope" })]
[Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "PolicyAssignment", DefaultParameterSetName = PolicyCmdletBase.NameParameterSet), OutputType(typeof(PsPolicyAssignment))]
public class SetAzurePolicyAssignmentCmdlet : PolicyCmdletBase
{
diff --git a/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyDefinition.cs b/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyDefinition.cs
index e605f321de6e..60b6928995ed 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyDefinition.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyDefinition.cs
@@ -18,6 +18,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Policy;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
+ using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Newtonsoft.Json.Linq;
using Policy;
@@ -27,6 +28,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Sets the policy definition.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicyDefinition), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "Metadata", "Mode", "Parameters", "PolicyRule", "PolicyType" })]
[Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "PolicyDefinition", DefaultParameterSetName = PolicyCmdletBase.NameParameterSet), OutputType(typeof(PsPolicyDefinition))]
public class SetAzurePolicyDefinitionCmdlet : PolicyCmdletBase
{
diff --git a/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyExemption.cs b/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyExemption.cs
index d6d4f1d3ea73..f51f6ad876f3 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyExemption.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicyExemption.cs
@@ -18,6 +18,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Policy;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
using Microsoft.Azure.Commands.ResourceManager.Common;
+ using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Newtonsoft.Json.Linq;
using Policy;
@@ -27,6 +28,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Sets the policy exemption.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicyExemption), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "ExemptionCategory", "ExpiresOn", "Metadata", "PolicyAssignmentId", "PolicyDefinitionReferenceIds" })]
[Cmdlet(VerbsCommon.Set, AzureRMConstants.AzureRMPrefix + "PolicyExemption", DefaultParameterSetName = PolicyCmdletBase.NameParameterSet, SupportsShouldProcess = true), OutputType(typeof(PsPolicyExemption))]
public class SetAzurePolicyExemptionCmdlet : PolicyCmdletBase
{
diff --git a/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicySetDefinition.cs b/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicySetDefinition.cs
index c5ac5db631fd..b4f55aa4deeb 100644
--- a/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicySetDefinition.cs
+++ b/src/Resources/ResourceManager/Implementation/Policy/SetAzurePolicySetDefinition.cs
@@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Policy;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
+ using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Newtonsoft.Json.Linq;
using Policy;
@@ -26,6 +27,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
///
/// Sets the policy definition.
///
+ [CmdletOutputBreakingChangeWithVersion(
+ typeof(PsPolicySetDefinition), deprecateByAzVersion: "11.0.0", deprecateByVersion: "7.0.0", DeprecatedOutputProperties = new[] { "Properties" },
+ NewOutputProperties = new[] { "Description", "DisplayName", "Metadata", "Parameters", "PolicyDefinitionGroups", "PolicyDefinitions", "PolicyType" })]
[Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "PolicySetDefinition", DefaultParameterSetName = PolicyCmdletBase.NameParameterSet, SupportsShouldProcess = true), OutputType(typeof(PsPolicySetDefinition))]
public class SetAzurePolicySetDefinitionCmdlet : PolicyCmdletBase
{
diff --git a/src/Resources/Resources/ChangeLog.md b/src/Resources/Resources/ChangeLog.md
index 765c58794d59..5fe40da7b170 100644
--- a/src/Resources/Resources/ChangeLog.md
+++ b/src/Resources/Resources/ChangeLog.md
@@ -19,6 +19,7 @@
-->
## Upcoming Release
+* Added breaking change warnings for Azure Policy cmdlets.
* Implemented logic that allows Deployment Stack objects to be piped into Save and Remove Deployment Stack cmdlets.
## Version 6.9.1