{Role} az role assignment create: Refine help message for --name
#24926
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related command
az role assignment createDescription
#24324 introduced
--nameforaz role assignment createbut is unclear about its type. This may lead to incorrect usages (#24919), as user can use invalid role assignment name, resulting in malformed URL and causing confusing service error (#7441).Additional information
That help message originally was
Azure/azure-rest-api-specs#16639 updated it for
2020-04-01-previewAPI tohttps://github.com/Azure/azure-rest-api-specs/blob/cf848c9f570c1157bbad81e214f5bb2993e578bb/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-04-01-preview/authorization-RoleAssignmentsCalls.json#L242
However, that change was reverted in
2022-04-01API:https://github.com/Azure/azure-rest-api-specs/blob/020f48c422ec455cdee9f6516f2d0172d13e77a3/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/authorization-RoleAssignmentsCalls.json#L693
I am not sure why.
It can be any valid GUID.is certainly not accurate. No matter how swagger describes it, at least we make it accurate.