Skip to content

Instantly share code, notes, and snippets.

@m-soltani
Last active February 28, 2022 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m-soltani/0bfe793a9a4c5f87a21eb19d675127a0 to your computer and use it in GitHub Desktop.
Save m-soltani/0bfe793a9a4c5f87a21eb19d675127a0 to your computer and use it in GitHub Desktop.
{
"$schema": "https://json-schema.org/draft-04/schema",
"title": "Blueprint Assignment File Template",
"description": "Template Schema for Blueprint Assignment File",
"type": "object",
"properties": {
"identity": {
"$id": "#/properties/identity",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"userAssignedIdentities": {
"type": "object",
"description": "Fully qualified Resource Id of the user assigned managed identity",
"default": {
"/subscriptions/<Subscription-Id>/resourceGroups/<RG-Name>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<MSI-Id>": {}
}
},
"type": {
"type": "string",
"default": "UserAssigned"
}
}
}
],
"description": "Type of the identity should be used for assignment operation"
},
"blueprintId":{
"$id": "#/properties/blueprintId",
"type": "string",
"description": "sets ID of the published version of a blueprint definition. **In Pipeline is set automatically**"
},
"id":{
"$id": "#/properties/id",
"type": "string",
"description": "Fully qualified ID of the assignment object. **In Pipeline is set automatically**"
},
"location": {
"$id": "#/properties/location",
"type": "string",
"default": "westeurope",
"description": "Azure region where the assignment operation should be done"
},
"displayName": {
"$id": "#/properties/displayName",
"type": "string",
"description": "One-liner string explain this resource"
},
"scope": {
"$id": "#/properties/scope",
"type": "string",
"description": "One-liner string explain this resource"
},
"properties": {
"type": "object",
"description": "Blueprint properties parameters.https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.management.blueprint.models.assignment?view=azure-dotnet#properties",
"properties": {
"parameters": {
"$id": "#/properties/properties/parameters",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/parameter"
}
},
"locks": {
"type": "object",
"$id": "#/properties/properties/locks",
"description": "Assignment Lock property",
"properties": {
"mode": {
"$id": "#/properties/properties/locks/mode",
"type": "string",
"enum": [
"AllResourcesReadOnly",
"AllResourcesDoNotDelete",
"None"
]
},
"excludedPrincipals": {
"$id": "#/properties/properties/locks/excludedPrincipals",
"type": "array",
"description": "list of AAD principals excluded from blueprint locks"
},
"excludedActions": {
"$id": "#/properties/properties/locks/excludedActions",
"type": "array",
"description": "list of management operations that are excluded from blueprint locks. Up to 200 actions are permitted."
}
}
},
"resourceGroups": {
"$id": "#/properties/properties/resourceGroups",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/resourceGroups"
}
}
},
"required": ["parameters", "locks", "resourceGroups"]
}
},
"definitions": {
"parameter": {
"type": "object",
"properties": {
"value": {
"$ref": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#/definitions/parameterValueTypes",
"description": "Input value to template"
}
},
"additionalProperties": false,
"oneOf": [
{
"required": ["value"]
}
]
},
"resourceGroups": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"additionalProperties": false
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment