Related command
az role definition list
Is your feature request related to a problem? Please describe.
According to https://learn.microsoft.com/en-us/azure/role-based-access-control/role-definitions-list#list-role-definitions, the underlying Role Definitions - List REST API supports returning
CustomRole + BuiltInRole
- only
CustomRole
- only
BuiltInRole
But in CLI, --custom-role-only only supports returning
CustomRole + BuiltInRole
- only
CustomRole
|
if custom_role_only: |
|
roles = [r for r in roles if worker.get_role_property(r, 'role_type') == 'CustomRole'] |
thus losing the ability to only show BuiltInRole.
Describe the solution you'd like
az role definition list should support a --type argument that maps to the $filter=type+eq+'{type}' filter.
Describe alternatives you've considered
Additional context
Related command
az role definition listIs your feature request related to a problem? Please describe.
According to https://learn.microsoft.com/en-us/azure/role-based-access-control/role-definitions-list#list-role-definitions, the underlying Role Definitions - List REST API supports returning
CustomRole+BuiltInRoleCustomRoleBuiltInRoleBut in CLI,
--custom-role-onlyonly supports returningCustomRole+BuiltInRoleCustomRoleazure-cli/src/azure-cli/azure/cli/command_modules/role/custom.py
Lines 166 to 167 in 649886e
thus losing the ability to only show
BuiltInRole.Describe the solution you'd like
az role definition listshould support a--typeargument that maps to the$filter=type+eq+'{type}'filter.Describe alternatives you've considered
Additional context