Skip to content

Conversation

@B-Oudehinken
Copy link
Contributor

The current doc examples do not work.

This suggested configuration works.
Tested it my self. Credits to :
#18781 (comment)

This pull request updates the usage of role management policy rule types in the documentation for Update-AzRoleManagementPolicy. The main change is to use fully qualified type names in the PowerShell examples to avoid ambiguity and ensure correct type resolution.

Documentation improvements:

Updated the $expirationRule variable in both examples to use the fully qualified type name Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.RoleManagementPolicyExpirationRule instead of the shorthand RoleManagementPolicyExpirationRule. [1] [2]
Updated the $notificationRule variable in Example 2 to use the fully qualified type name Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.RoleManagementPolicyNotificationRule instead of the shorthand RoleManagementPolicyNotificationRule.

Copilot AI review requested due to automatic review settings September 4, 2025 06:00
@azure-client-tools-bot-prd
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the documentation for the Update-AzRoleManagementPolicy cmdlet to fix non-working PowerShell examples by using fully qualified type names instead of shorthand type names.

  • Updates type references to use fully qualified namespace paths to avoid type resolution ambiguity
  • Fixes broken documentation examples that were previously failing due to incorrect type casting
  • Improves usability by ensuring the provided examples actually work when executed

@microsoft-github-policy-service
Copy link
Contributor

Thank you for your contribution @B-Oudehinken! We will review the pull request and get back to you soon.

@VeryEarly
Copy link
Collaborator

Hi @B-Oudehinken ,

Thanks for the contribution, I suppose you don't want to bother cloning the repo and compile any code. Please update these 2 files as well:
https://github.com/B-Oudehinken/azure-powershell/blob/patch-1/src/Resources/Authorization.Autorest/examples/Update-AzRoleManagementPolicy.md
https://github.com/B-Oudehinken/azure-powershell/blob/patch-1/src/Resources/Authorization.Autorest/docs/Update-AzRoleManagementPolicy.md

Otherwise, your update will be overwritten because these help markdowns are auto-generated.

Thanks

@B-Oudehinken
Copy link
Contributor Author

@VeryEarly
I've updated the other files as well. Thanks!

@B-Oudehinken
Copy link
Contributor Author

@microsoft-github-policy-service agree

@VeryEarly
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@VeryEarly VeryEarly merged commit c4ce3e7 into Azure:main Sep 5, 2025
10 of 12 checks passed
@B-Oudehinken B-Oudehinken deleted the patch-1 branch September 5, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants