← cd ~/roles
// roles/azure · containers
Azure Kubernetes Service Cluster Monitoring UserAzure built-in role
List cluster monitoring user credential action.
| Role ID | 1afdec4b-e479-420e-99e7-f82237c7c5e6 |
|---|---|
| Category | Containers |
| Actions | 2 |
| Data actions | 0 |
What it can do
| Permission | What it allows |
|---|---|
Microsoft.ContainerService/managedClusters/listClusterMonitoringUserCredential/action | List the clusterMonitoringUser credential of a managed cluster |
Microsoft.ContainerService/managedClusters/read | Get a managed cluster |
Assign it
Scope it as tightly as you can: a resource or resource group rather than the whole subscription.
az role assignment create \
--assignee "jane.doe@contoso.com" \
--role "Azure Kubernetes Service Cluster Monitoring User" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Azure Kubernetes Service Cluster Monitoring User" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, '1afdec4b-e479-420e-99e7-f82237c7c5e6')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1afdec4b-e479-420e-99e7-f82237c7c5e6')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "1afdec4b-e479-420e-99e7-f82237c7c5e6"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)Other containers roles
- AcrDelete · 1 permission
- AcrPull · 1 permission
- Connected Cluster Managed Identity CheckAccess Reader · 1 permission
- Container Registry Cache Rule Reader · 1 permission
- Container Registry Credential Set Reader · 1 permission
- Container Registry Repository Catalog Lister · 1 permission
- AcrImageSigner · 2 permissions
- AcrPush · 2 permissions