CmdID / az / az keyvault / az keyvault role / az keyvault role definition
az keyvault role definition create
Create a custom role definition. Azure CLI reference
2 examples Its page in the Azure CLI reference
Examples
Create a role by a JSON string.
az keyvault role definition create --hsm-name MyHSM --role-definition '{Identify--hsm-nameName of the HSM.--role-definitionDescription of a role as JSON, or a path to a file containing a JSON description."roleName": "My Custom Role","description": "The description of the custom rule.","actions": [],"notActions": [],"dataActions": ["Microsoft.KeyVault/managedHsm/keys/read/action"],"notDataActions": []}'Create a role from a file containing a JSON description.
az keyvault role definition create --hsm-name MyHSM --role-definition @keyvault-role.jsonIdentify--hsm-nameName of the HSM.--role-definitionDescription of a role as JSON, or a path to a file containing a JSON description.