diff --git a/src/Resources/Resources/ChangeLog.md b/src/Resources/Resources/ChangeLog.md index b11f31a8279e..9ca3a6216ecc 100644 --- a/src/Resources/Resources/ChangeLog.md +++ b/src/Resources/Resources/ChangeLog.md @@ -19,6 +19,12 @@ --> ## Upcoming Release +* Added breaking change preannouncement for `PSRoleDefinition` type changes in Az.Resources 10.0.0 [#29058] + - The flattened properties `Actions`, `NotActions`, `DataActions`, `NotDataActions`, `Condition`, and `ConditionVersion` will be removed from `PSRoleDefinition` + - Use `Permissions[n].Actions`, `Permissions[n].DataActions`, etc. instead to access the full permission structure with per-permission conditions + - Affects output for `Get-AzRoleDefinition`, `New-AzRoleDefinition`, `Set-AzRoleDefinition`, and `Remove-AzRoleDefinition` (with `-PassThru`) + - Affects input format for `New-AzRoleDefinition` and `Set-AzRoleDefinition` cmdlets + - Affects `-InputObject` parameter for `Remove-AzRoleDefinition` cmdlet ## Version 9.0.0 * Removed unavailable variant Get-AzRoleEligibleChildResource cmdlet for InputObject parameter. diff --git a/src/Resources/Resources/RoleDefinitions/GetAzureRoleDefinitionCommand.cs b/src/Resources/Resources/RoleDefinitions/GetAzureRoleDefinitionCommand.cs index 2fa51b541f98..47f8e6ee3a96 100644 --- a/src/Resources/Resources/RoleDefinitions/GetAzureRoleDefinitionCommand.cs +++ b/src/Resources/Resources/RoleDefinitions/GetAzureRoleDefinitionCommand.cs @@ -16,6 +16,7 @@ using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.Resources.Models.Authorization; using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System; using System.Collections.Generic; @@ -28,6 +29,7 @@ namespace Microsoft.Azure.Commands.Resources /// /// Get the available role Definitions for certain resource types. /// + [GenericBreakingChangeWithVersion("The output type PSRoleDefinition is changing. The flattened properties 'Actions', 'NotActions', 'DataActions', 'NotDataActions', 'Condition', and 'ConditionVersion' are being removed. Use 'Permissions[n].Actions', 'Permissions[n].DataActions', etc. instead to access the full permission structure with per-permission conditions.", "16.0.0", "10.0.0")] [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RoleDefinition", DefaultParameterSetName = ParameterSet.RoleDefinitionName), OutputType(typeof(PSRoleDefinition))] public class GetAzureRoleDefinitionCommand : ResourcesBaseCmdlet { diff --git a/src/Resources/Resources/RoleDefinitions/NewAzureRoleDefinitionCommand.cs b/src/Resources/Resources/RoleDefinitions/NewAzureRoleDefinitionCommand.cs index 250da3e03e55..093cb26989ae 100644 --- a/src/Resources/Resources/RoleDefinitions/NewAzureRoleDefinitionCommand.cs +++ b/src/Resources/Resources/RoleDefinitions/NewAzureRoleDefinitionCommand.cs @@ -16,6 +16,7 @@ using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.Resources.Models.Authorization; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using Newtonsoft.Json; @@ -28,6 +29,7 @@ namespace Microsoft.Azure.Commands.Resources /// /// Creates a new role definition. /// + [GenericBreakingChangeWithVersion("The -InputFile JSON format and -Role parameter are changing. The flattened properties 'Actions', 'NotActions', 'DataActions', 'NotDataActions' at the root level are being replaced by a 'Permissions' array. Each permission object contains 'Actions', 'NotActions', 'DataActions', 'NotDataActions', 'Condition', and 'ConditionVersion' properties. The output type PSRoleDefinition is also changing accordingly.", "16.0.0", "10.0.0")] [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RoleDefinition"), OutputType(typeof(PSRoleDefinition))] public class NewAzureRoleDefinitionCommand : ResourcesBaseCmdlet { diff --git a/src/Resources/Resources/RoleDefinitions/RemoveAzureRoleDefinitionCommand.cs b/src/Resources/Resources/RoleDefinitions/RemoveAzureRoleDefinitionCommand.cs index f05617e8199b..b4910e36a399 100644 --- a/src/Resources/Resources/RoleDefinitions/RemoveAzureRoleDefinitionCommand.cs +++ b/src/Resources/Resources/RoleDefinitions/RemoveAzureRoleDefinitionCommand.cs @@ -16,6 +16,7 @@ using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.Resources.Models.Authorization; using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; @@ -28,6 +29,7 @@ namespace Microsoft.Azure.Commands.Resources /// /// Deletes a given role definition. /// + [GenericBreakingChangeWithVersion("The -InputObject parameter type PSRoleDefinition is changing. The flattened properties 'Actions', 'NotActions', 'DataActions', 'NotDataActions', 'Condition', 'ConditionVersion' are being replaced by a 'Permissions' array containing permission objects with these properties. The output when using -PassThru is also changing accordingly.", "16.0.0", "10.0.0")] [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RoleDefinition", SupportsShouldProcess = true,DefaultParameterSetName = ParameterSet.RoleDefinitionId), OutputType(typeof(bool))] public class RemoveAzureRoleDefinitionCommand : ResourcesBaseCmdlet { diff --git a/src/Resources/Resources/RoleDefinitions/SetAzureRoleDefinitionCommand.cs b/src/Resources/Resources/RoleDefinitions/SetAzureRoleDefinitionCommand.cs index c4d6354bd047..515b41ac2686 100644 --- a/src/Resources/Resources/RoleDefinitions/SetAzureRoleDefinitionCommand.cs +++ b/src/Resources/Resources/RoleDefinitions/SetAzureRoleDefinitionCommand.cs @@ -16,6 +16,7 @@ using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.Resources.Models.Authorization; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using Newtonsoft.Json; @@ -27,6 +28,7 @@ namespace Microsoft.Azure.Commands.Resources /// /// Updates an existing role definition. /// + [GenericBreakingChangeWithVersion("The -InputFile JSON format and -Role parameter are changing. The flattened properties 'Actions', 'NotActions', 'DataActions', 'NotDataActions' at the root level are being replaced by a 'Permissions' array. Each permission object contains 'Actions', 'NotActions', 'DataActions', 'NotDataActions', 'Condition', and 'ConditionVersion' properties. The output type PSRoleDefinition is also changing accordingly.", "16.0.0", "10.0.0")] [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RoleDefinition"), OutputType(typeof(PSRoleDefinition))] public class SetAzureRoleDefinitionCommand : ResourcesBaseCmdlet {