Hoppa över navigering

The Azure Quickstart templates are currently available in English

Create a user-assigned managed identity and role assignment

Senast uppdaterad: 2021-10-21

This module allows you to create a user-assigned managed identity and a role assignment scoped to the resource group.

Den här ARM-mallen (Azure Resource Manager) skapades av en community-medlem, inte av Microsoft. Varje ARM-mall licensieras till dig enligt ett licensavtal av respektive ägare, inte Microsoft. Microsoft ansvarar inte för ARM-mallar som erbjuds och licensieras av community-medlemmar och undersöker inte mallarnas säkerhet, kompatibilitet eller prestanda. Microsofts supportprogram och supporttjänster omfattar inte support för ARM-mallar från community-medlemmar, och dessa mallar tillhandahålls i BEFINTLIGT SKICK utan någon form av garanti.

Parametrar

Parameternamn Beskrivning
managedIdentityName The name of the managed identity resource.
roleDefinitionIds The IDs of the role definitions to assign to the managed identity. Each role assignment is created at the resource group scope. Role definition IDs are GUIDs. To find the GUID for built-in Azure role definitions, see https://docs.microsoft.com/azure/role-based-access-control/built-in-roles. You can also use IDs of custom role definitions.
roleAssignmentDescription An optional description to apply to each role assignment, such as the reason this managed identity needs to be granted the role.
location The Azure location where the managed identity should be created.

Använda mallen

PowerShell

New-AzResourceGroup -Name <resource-group-name> -Location <resource-group-location> #use this command when you need to create a new resource group for your deployment
New-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/modules/Microsoft.ManagedIdentity/user-assigned-identity-role-assignment/1.0/azuredeploy.json
Installera och konfigurera Azure PowerShell

Kommandoraden

az group create --name <resource-group-name> --location <resource-group-location> #use this command when you need to create a new resource group for your deployment
az group deployment create --resource-group <my-resource-group> --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/modules/Microsoft.ManagedIdentity/user-assigned-identity-role-assignment/1.0/azuredeploy.json
Installera och konfigurera Azures plattformsoberoende kommandoradsgränssnitt