Delen via


Assignments - Create Or Update

Een blauwdruktoewijzing maken of bijwerken.

PUT https://management.azure.com/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}?api-version=2018-11-01-preview

URI-parameters

Name In Vereist Type Description
assignmentName
path True

string

Naam van de blauwdruktoewijzing.

resourceScope
path True

string

Het bereik van de resource. Geldige bereiken zijn: beheergroep (indeling: /providers/Microsoft.Management/managementGroups/{managementGroup}), abonnement (indeling: '/subscriptions/{subscriptionId}').

api-version
query True

string

Client-API-versie.

Aanvraagbody

Name Vereist Type Description
identity True

ManagedServiceIdentity

Beheerde identiteit voor deze blauwdruktoewijzing.

location True

string

De locatie van deze blauwdruktoewijzing.

properties.parameters True

<string,  ParameterValue>

Parameterwaarden voor blauwdruktoewijzing.

properties.resourceGroups True

<string,  ResourceGroupValue>

Namen en locaties van tijdelijke aanduidingen voor resourcegroepen.

properties.blueprintId

string

Id van de gepubliceerde versie van een blauwdrukdefinitie.

properties.description

string

maxLength: 500

In meerdere regels wordt deze resource uitgelegd.

properties.displayName

string

maxLength: 256

In een-linertekenreeks wordt deze resource uitgelegd.

properties.locks

AssignmentLockSettings

Hiermee definieert u hoe resources die zijn geïmplementeerd door een blauwdruktoewijzing zijn vergrendeld.

properties.scope

string

Het doelabonnementsbereik van de blauwdruktoewijzing (indeling: /subscriptions/{subscriptionId}). Voor toewijzingen op beheergroepsniveau is de eigenschap vereist.

Antwoorden

Name Type Description
201 Created

Assignment

Gemaakt: blauwdruktoewijzing opgeslagen.

Other Status Codes

CloudError

Antwoord op blauwdrukkenfout.

Beveiliging

azure_auth

Azure Active Directory OAuth2-stroom

Type: oauth2
Stroom: implicit
Autorisatie-URL: https://login.microsoftonline.com/common/oauth2/authorize

Bereiken

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

Assignment with system-assigned managed identity at management group scope
Assignment with system-assigned managed identity at subscription scope
Assignment with user-assigned managed identity at management group scope
Assignment with user-assigned managed identity at subscription scope

Assignment with system-assigned managed identity at management group scope

Voorbeeldaanvraag

PUT https://management.azure.com/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint?api-version=2018-11-01-preview

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "eastus",
  "properties": {
    "description": "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
    "blueprintId": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
    "scope": "subscriptions/00000000-0000-0000-0000-000000000000",
    "parameters": {
      "storageAccountType": {
        "value": "Standard_LRS"
      },
      "costCenter": {
        "value": "Contoso/Online/Shopping/Production"
      },
      "owners": {
        "value": [
          "johnDoe@contoso.com",
          "johnsteam@contoso.com"
        ]
      }
    },
    "resourceGroups": {
      "storageRG": {
        "name": "defaultRG",
        "location": "eastus"
      }
    }
  }
}

Voorbeeldrespons

{
  "identity": {
    "type": "SystemAssigned",
    "tenantId": "00000000-0000-0000-0000-000000000000",
    "principalId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "eastus",
  "properties": {
    "description": "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
    "provisioningState": "creating",
    "blueprintId": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
    "scope": "subscriptions/00000000-0000-0000-0000-000000000000",
    "parameters": {
      "storageAccountType": {
        "value": "Standard_LRS"
      },
      "costCenter": {
        "value": "Contoso/Online/Shopping/Production"
      },
      "owners": {
        "value": [
          "johnDoe@contoso.com",
          "johnsteam@contoso.com"
        ]
      }
    },
    "resourceGroups": {
      "storageRG": {
        "name": "defaultRG",
        "location": "eastus"
      }
    }
  },
  "id": "/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint",
  "type": "Microsoft.Blueprint/Assignment",
  "name": "assignSimpleBlueprint"
}

Assignment with system-assigned managed identity at subscription scope

Voorbeeldaanvraag

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint?api-version=2018-11-01-preview

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "eastus",
  "properties": {
    "description": "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
    "blueprintId": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
    "parameters": {
      "storageAccountType": {
        "value": "Standard_LRS"
      },
      "costCenter": {
        "value": "Contoso/Online/Shopping/Production"
      },
      "owners": {
        "value": [
          "johnDoe@contoso.com",
          "johnsteam@contoso.com"
        ]
      }
    },
    "resourceGroups": {
      "storageRG": {
        "name": "defaultRG",
        "location": "eastus"
      }
    }
  }
}

Voorbeeldrespons

{
  "identity": {
    "type": "SystemAssigned",
    "tenantId": "00000000-0000-0000-0000-000000000000",
    "principalId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "eastus",
  "properties": {
    "description": "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
    "provisioningState": "creating",
    "blueprintId": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
    "parameters": {
      "storageAccountType": {
        "value": "Standard_LRS"
      },
      "costCenter": {
        "value": "Contoso/Online/Shopping/Production"
      },
      "owners": {
        "value": [
          "johnDoe@contoso.com",
          "johnsteam@contoso.com"
        ]
      }
    },
    "resourceGroups": {
      "storageRG": {
        "name": "defaultRG",
        "location": "eastus"
      }
    }
  },
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint",
  "type": "Microsoft.Blueprint/Assignment",
  "name": "assignSimpleBlueprint"
}

Assignment with user-assigned managed identity at management group scope

Voorbeeldaanvraag

PUT https://management.azure.com/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint?api-version=2018-11-01-preview

{
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": {}
    }
  },
  "location": "eastus",
  "properties": {
    "description": "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
    "blueprintId": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
    "scope": "subscriptions/00000000-0000-0000-0000-000000000000",
    "parameters": {
      "storageAccountType": {
        "value": "Standard_LRS"
      },
      "costCenter": {
        "value": "Contoso/Online/Shopping/Production"
      },
      "owners": {
        "value": [
          "johnDoe@contoso.com",
          "johnsteam@contoso.com"
        ]
      }
    },
    "resourceGroups": {
      "storageRG": {
        "name": "defaultRG",
        "location": "eastus"
      }
    }
  }
}

Voorbeeldrespons

{
  "identity": {
    "type": "UserAssigned",
    "tenantId": "00000000-0000-0000-0000-000000000000",
    "userAssignedIdentities": {
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": {
        "principalId": "00000000-0000-0000-0000-000000000000",
        "clientId": "00000000-0000-0000-0000-000000000000"
      }
    }
  },
  "location": "eastus",
  "properties": {
    "description": "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
    "provisioningState": "creating",
    "blueprintId": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
    "scope": "subscriptions/00000000-0000-0000-0000-000000000000",
    "parameters": {
      "storageAccountType": {
        "value": "Standard_LRS"
      },
      "costCenter": {
        "value": "Contoso/Online/Shopping/Production"
      },
      "owners": {
        "value": [
          "johnDoe@contoso.com",
          "johnsteam@contoso.com"
        ]
      }
    },
    "resourceGroups": {
      "storageRG": {
        "name": "defaultRG",
        "location": "eastus"
      }
    }
  },
  "id": "/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint",
  "type": "Microsoft.Blueprint/Assignment",
  "name": "assignSimpleBlueprint"
}

Assignment with user-assigned managed identity at subscription scope

Voorbeeldaanvraag

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint?api-version=2018-11-01-preview

{
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": {}
    }
  },
  "location": "eastus",
  "properties": {
    "description": "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
    "blueprintId": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
    "parameters": {
      "storageAccountType": {
        "value": "Standard_LRS"
      },
      "costCenter": {
        "value": "Contoso/Online/Shopping/Production"
      },
      "owners": {
        "value": [
          "johnDoe@contoso.com",
          "johnsteam@contoso.com"
        ]
      }
    },
    "resourceGroups": {
      "storageRG": {
        "name": "defaultRG",
        "location": "eastus"
      }
    }
  }
}

Voorbeeldrespons

{
  "identity": {
    "type": "UserAssigned",
    "tenantId": "00000000-0000-0000-0000-000000000000",
    "userAssignedIdentities": {
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": {
        "principalId": "00000000-0000-0000-0000-000000000000",
        "clientId": "00000000-0000-0000-0000-000000000000"
      }
    }
  },
  "location": "eastus",
  "properties": {
    "description": "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
    "provisioningState": "creating",
    "blueprintId": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
    "parameters": {
      "storageAccountType": {
        "value": "Standard_LRS"
      },
      "costCenter": {
        "value": "Contoso/Online/Shopping/Production"
      },
      "owners": {
        "value": [
          "johnDoe@contoso.com",
          "johnsteam@contoso.com"
        ]
      }
    },
    "resourceGroups": {
      "storageRG": {
        "name": "defaultRG",
        "location": "eastus"
      }
    }
  },
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint",
  "type": "Microsoft.Blueprint/Assignment",
  "name": "assignSimpleBlueprint"
}

Definities

Name Description
Assignment

Vertegenwoordigt een blauwdruktoewijzing.

AssignmentLockMode

Vergrendelingsmodus.

AssignmentLockSettings

Hiermee definieert u hoe resources die zijn geïmplementeerd door een blauwdruktoewijzing zijn vergrendeld.

AssignmentProvisioningState

Status van de blauwdruktoewijzing.

AssignmentStatus

De status van een blauwdruktoewijzing. Dit veld is alleen-lezen.

CloudError
ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

ErrorResponse

Foutreactie

keyVaultReference

Hiermee geeft u de koppeling naar een Sleutelkluis.

ManagedServiceIdentity

Algemeen object van beheerde identiteit.

ManagedServiceIdentityType

Type van de beheerde identiteit.

ParameterValue

Waarde voor de opgegeven parameter. Kan 'value' of 'reference' zijn, maar niet beide.

ResourceGroupValue

Vertegenwoordigt een Azure-resourcegroep.

SecretValueReference

Verwijzing naar een Key Vault-geheim.

UserAssignedIdentity

Door de gebruiker toegewezen beheerde identiteit.

Assignment

Vertegenwoordigt een blauwdruktoewijzing.

Name Type Description
id

string

Tekenreeks-id die wordt gebruikt om een resource in Azure te vinden.

identity

ManagedServiceIdentity

Beheerde identiteit voor deze blauwdruktoewijzing.

location

string

De locatie van deze blauwdruktoewijzing.

name

string

Naam van deze resource.

properties.blueprintId

string

Id van de gepubliceerde versie van een blauwdrukdefinitie.

properties.description

string

maxLength: 500

In meerdere regels wordt deze resource uitgelegd.

properties.displayName

string

maxLength: 256

In een-linertekenreeks wordt deze resource uitgelegd.

properties.locks

AssignmentLockSettings

Hiermee definieert u hoe resources die zijn geïmplementeerd door een blauwdruktoewijzing zijn vergrendeld.

properties.parameters

<string,  ParameterValue>

Parameterwaarden voor blauwdruktoewijzing.

properties.provisioningState

AssignmentProvisioningState

Status van de blauwdruktoewijzing.

properties.resourceGroups

<string,  ResourceGroupValue>

Namen en locaties van tijdelijke aanduidingen voor resourcegroepen.

properties.scope

string

Het doelabonnementsbereik van de blauwdruktoewijzing (indeling: /subscriptions/{subscriptionId}). Voor toewijzingen op beheergroepsniveau is de eigenschap vereist.

properties.status

AssignmentStatus

Status van blauwdruktoewijzing. Dit veld is alleen-lezen.

type

string

Type van deze resource.

AssignmentLockMode

Vergrendelingsmodus.

Waarde Description
AllResourcesDoNotDelete
AllResourcesReadOnly
None

AssignmentLockSettings

Hiermee definieert u hoe resources die zijn geïmplementeerd door een blauwdruktoewijzing zijn vergrendeld.

Name Type Description
excludedActions

string[]

Lijst met beheerbewerkingen die zijn uitgesloten van blauwdrukvergrendelingen. Maximaal 200 acties zijn toegestaan. Als de vergrendelingsmodus is ingesteld op AllResourcesReadOnly, worden de volgende acties automatisch toegevoegd aan 'excludedActions': '*/read', 'Microsoft.Network/virtualNetworks/subnetten/join/action' en 'Microsoft.Authorization/locks/delete'. Als de vergrendelingsmodus is ingesteld op AllResourcesDoNotDelete, worden de volgende acties automatisch toegevoegd aan 'excludedActions': 'Microsoft.Authorization/locks/delete'. Dubbele acties worden verwijderd.

excludedPrincipals

string[]

Lijst met AAD-principals die zijn uitgesloten van blauwdrukvergrendelingen. Maximaal 5 principals zijn toegestaan.

mode

AssignmentLockMode

Vergrendelingsmodus.

AssignmentProvisioningState

Status van de blauwdruktoewijzing.

Waarde Description
canceled
cancelling
creating
deleting
deploying
failed
locking
succeeded
validating
waiting

AssignmentStatus

De status van een blauwdruktoewijzing. Dit veld is alleen-lezen.

Name Type Description
lastModified

string (date-time)

Laatst gewijzigd tijdstip van deze blauwdrukdefinitie.

managedResources

string[]

Lijst met resources die zijn gemaakt door de blauwdruktoewijzing.

timeCreated

string (date-time)

Maaktijd van deze blauwdrukdefinitie.

CloudError

Name Type Description
error

ErrorResponse

Foutreactie
Veelvoorkomende foutreactie voor alle Azure Resource Manager-API's om foutdetails te retourneren voor mislukte bewerkingen. (Dit volgt ook de OData-foutreactie-indeling.)

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

Name Type Description
info

object

De aanvullende informatie.

type

string

Het extra informatietype.

ErrorResponse

Foutreactie

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

De fout bevat aanvullende informatie.

code

string

De foutcode.

details

ErrorResponse[]

De foutdetails.

message

string

Het foutbericht.

target

string

Het foutdoel.

keyVaultReference

Hiermee geeft u de koppeling naar een Sleutelkluis.

Name Type Description
id

string

Azure-resource-id van de Key Vault.

ManagedServiceIdentity

Algemeen object van beheerde identiteit.

Name Type Description
principalId

string

De principal-id van Azure Active Directory die is gekoppeld aan deze identiteit.

tenantId

string

Id van de Azure Active Directory.

type

ManagedServiceIdentityType

Type van de beheerde identiteit.

userAssignedIdentities

<string,  UserAssignedIdentity>

De lijst met door de gebruiker toegewezen beheerde identiteiten die aan de resource zijn gekoppeld. De sleutel is de Azure-resource-id van de beheerde identiteit.

ManagedServiceIdentityType

Type van de beheerde identiteit.

Waarde Description
None
SystemAssigned
UserAssigned

ParameterValue

Waarde voor de opgegeven parameter. Kan 'value' of 'reference' zijn, maar niet beide.

Name Type Description
reference

SecretValueReference

Parameterwaarde als referentietype.

value

object

Parameterwaarde. Elke geldige JSON-waarde is toegestaan, waaronder objecten, matrices, tekenreeksen, getallen en booleaanse waarden.

ResourceGroupValue

Vertegenwoordigt een Azure-resourcegroep.

Name Type Description
location

string

Locatie van de resourcegroep.

name

string

minLength: 1
maxLength: 90

Naam van de resourcegroep.

SecretValueReference

Verwijzing naar een Key Vault-geheim.

Name Type Description
keyVault

keyVaultReference

Hiermee geeft u de verwijzing naar een bepaalde Azure Key Vault.

secretName

string

Naam van het geheim.

secretVersion

string

De versie van het geheim die moet worden gebruikt. Als u niets opgeeft, wordt de meest recente versie van het geheim gebruikt.

UserAssignedIdentity

Door de gebruiker toegewezen beheerde identiteit.

Name Type Description
clientId

string

Client-app-id die is gekoppeld aan deze identiteit.

principalId

string

De principal-id van Azure Active Directory die is gekoppeld aan deze identiteit.