Skip to content

Commit e3d2075

Browse files
committed
Add breaking change preannouncement for PSRoleDefinition in Az.Resources
1 parent ce93512 commit e3d2075

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

src/Resources/Resources/ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Added breaking change preannouncement for `PSRoleDefinition` type changes in Az.Resources 10.0.0 [#29058]
23+
- The flattened properties `Actions`, `NotActions`, `DataActions`, `NotDataActions`, `Condition`, and `ConditionVersion` will be removed from `PSRoleDefinition`
24+
- Use `Permissions[n].Actions`, `Permissions[n].DataActions`, etc. instead to access the full permission structure with per-permission conditions
25+
- Affects output for `Get-AzRoleDefinition`, `New-AzRoleDefinition`, `Set-AzRoleDefinition`, and `Remove-AzRoleDefinition` (with `-PassThru`)
26+
- Affects input format for `New-AzRoleDefinition` and `Set-AzRoleDefinition` cmdlets
27+
- Affects `-InputObject` parameter for `Remove-AzRoleDefinition` cmdlet
2228

2329
## Version 9.0.0
2430
* Removed unavailable variant Get-AzRoleEligibleChildResource cmdlet for InputObject parameter.

src/Resources/Resources/RoleDefinitions/GetAzureRoleDefinitionCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.Azure.Commands.Resources.Models;
1717
using Microsoft.Azure.Commands.Resources.Models.Authorization;
1818
using Microsoft.WindowsAzure.Commands.Common;
19+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1920

2021
using System;
2122
using System.Collections.Generic;
@@ -28,6 +29,7 @@ namespace Microsoft.Azure.Commands.Resources
2829
/// <summary>
2930
/// Get the available role Definitions for certain resource types.
3031
/// </summary>
32+
[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")]
3133
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RoleDefinition", DefaultParameterSetName = ParameterSet.RoleDefinitionName), OutputType(typeof(PSRoleDefinition))]
3234
public class GetAzureRoleDefinitionCommand : ResourcesBaseCmdlet
3335
{

src/Resources/Resources/RoleDefinitions/NewAzureRoleDefinitionCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.Azure.Commands.Resources.Models;
1717
using Microsoft.Azure.Commands.Resources.Models.Authorization;
1818
using Microsoft.WindowsAzure.Commands.Utilities.Common;
19+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1920

2021
using Newtonsoft.Json;
2122

@@ -28,6 +29,7 @@ namespace Microsoft.Azure.Commands.Resources
2829
/// <summary>
2930
/// Creates a new role definition.
3031
/// </summary>
32+
[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")]
3133
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RoleDefinition"), OutputType(typeof(PSRoleDefinition))]
3234
public class NewAzureRoleDefinitionCommand : ResourcesBaseCmdlet
3335
{

src/Resources/Resources/RoleDefinitions/RemoveAzureRoleDefinitionCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.Azure.Commands.Resources.Models;
1717
using Microsoft.Azure.Commands.Resources.Models.Authorization;
1818
using Microsoft.WindowsAzure.Commands.Common;
19+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1920
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2021

2122
using System;
@@ -28,6 +29,7 @@ namespace Microsoft.Azure.Commands.Resources
2829
/// <summary>
2930
/// Deletes a given role definition.
3031
/// </summary>
32+
[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")]
3133
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RoleDefinition", SupportsShouldProcess = true,DefaultParameterSetName = ParameterSet.RoleDefinitionId), OutputType(typeof(bool))]
3234
public class RemoveAzureRoleDefinitionCommand : ResourcesBaseCmdlet
3335
{

src/Resources/Resources/RoleDefinitions/SetAzureRoleDefinitionCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.Azure.Commands.Resources.Models;
1717
using Microsoft.Azure.Commands.Resources.Models.Authorization;
1818
using Microsoft.WindowsAzure.Commands.Utilities.Common;
19+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1920

2021
using Newtonsoft.Json;
2122

@@ -27,6 +28,7 @@ namespace Microsoft.Azure.Commands.Resources
2728
/// <summary>
2829
/// Updates an existing role definition.
2930
/// </summary>
31+
[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")]
3032
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RoleDefinition"), OutputType(typeof(PSRoleDefinition))]
3133
public class SetAzureRoleDefinitionCommand : ResourcesBaseCmdlet
3234
{

0 commit comments

Comments
 (0)