Artifacts - Create Or Update
Create or update blueprint artifact.
PUT https://management.azure.com/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}?api-version=2018-11-01-preview
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
artifact
|
path | True |
string |
Name of the blueprint artifact. |
|
blueprint
|
path | True |
string |
Name of the blueprint definition. |
|
resource
|
path | True |
string |
The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'). |
|
api-version
|
query | True |
string |
Client API Version. |
Request Body
The request body can be one of the following:
| Name | Description |
|---|---|
|
Policy |
Blueprint artifact that applies a Policy assignment. |
|
Role |
Blueprint artifact that applies a Role assignment. |
|
Template |
Blueprint artifact that deploys a Resource Manager template. |
PolicyAssignmentArtifact
Blueprint artifact that applies a Policy assignment.
| Name | Required | Type | Description |
|---|---|---|---|
| kind | True |
string:
policy |
Specifies the kind of blueprint artifact. |
| properties.parameters | True |
<string,
Parameter |
Parameter values for the policy definition. |
| properties.policyDefinitionId | True |
string |
Azure resource ID of the policy definition. |
| properties.dependsOn |
string[] |
Artifacts which need to be deployed before the specified artifact. |
|
| properties.description |
string maxLength: 500 |
Multi-line explain this resource. |
|
| properties.displayName |
string maxLength: 256 |
One-liner string explain this resource. |
|
| properties.resourceGroup |
string |
Name of the resource group placeholder to which the policy will be assigned. |
RoleAssignmentArtifact
Blueprint artifact that applies a Role assignment.
| Name | Required | Type | Description |
|---|---|---|---|
| kind | True |
string:
role |
Specifies the kind of blueprint artifact. |
| properties.principalIds | True |
|
Array of user or group identities in Azure Active Directory. The roleDefinition will apply to each identity. |
| properties.roleDefinitionId | True |
string |
Azure resource ID of the RoleDefinition. |
| properties.dependsOn |
string[] |
Artifacts which need to be deployed before the specified artifact. |
|
| properties.description |
string maxLength: 500 |
Multi-line explain this resource. |
|
| properties.displayName |
string maxLength: 256 |
One-liner string explain this resource. |
|
| properties.resourceGroup |
string |
RoleAssignment will be scope to this resourceGroup. If empty, it scopes to the subscription. |
TemplateArtifact
Blueprint artifact that deploys a Resource Manager template.
| Name | Required | Type | Description |
|---|---|---|---|
| kind | True |
string:
template |
Specifies the kind of blueprint artifact. |
| properties.parameters | True |
<string,
Parameter |
Resource Manager template blueprint artifact parameter values. |
| properties.template | True |
object |
The Resource Manager template blueprint artifact body. |
| properties.dependsOn |
string[] |
Artifacts which need to be deployed before the specified artifact. |
|
| properties.description |
string maxLength: 500 |
Multi-line explain this resource. |
|
| properties.displayName |
string maxLength: 256 |
One-liner string explain this resource. |
|
| properties.resourceGroup |
string |
If applicable, the name of the resource group placeholder to which the Resource Manager template blueprint artifact will be deployed. |
Responses
| Name | Type | Description |
|---|---|---|
| 201 Created | Artifact: |
Created -- blueprint artifact created/updated. |
| Other Status Codes |
Blueprints error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
|
MG-ARMTemplate |
|
MG-Policy |
|
MG-Role |
|
Sub-ARMTemplate |
|
Sub-Policy |
|
Sub-Role |
MG-ARMTemplateArtifact
Sample request
PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate?api-version=2018-11-01-preview
{
"kind": "template",
"properties": {
"template": {
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS"
],
"metadata": {
"description": "Storage Account type"
}
}
},
"variables": {
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"apiVersion": "2016-01-01",
"location": "[resourceGroup().location]",
"sku": {
"name": "[parameters('storageAccountType')]"
},
"kind": "Storage",
"properties": {}
}
],
"outputs": {
"storageAccountName": {
"type": "string",
"value": "[variables('storageAccountName')]"
}
}
},
"resourceGroup": "storageRG",
"parameters": {
"storageAccountType": {
"value": "[parameters('storageAccountType')]"
}
}
}
}
Sample response
{
"properties": {
"template": {
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS"
],
"metadata": {
"description": "Storage Account type"
}
}
},
"variables": {
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"apiVersion": "2016-01-01",
"location": "[resourceGroup().location]",
"sku": {
"name": "[parameters('storageAccountType')]"
},
"kind": "Storage",
"properties": {}
}
],
"outputs": {
"storageAccountName": {
"type": "string",
"value": "[variables('storageAccountName')]"
}
}
},
"resourceGroup": "storageRG",
"parameters": {
"storageAccountType": {
"value": "[parameters('storageAccountType')]"
}
}
},
"kind": "template",
"id": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate",
"type": "Microsoft.Blueprint/blueprints/artifacts",
"name": "storageTemplate"
}
MG-PolicyAssignmentArtifact
Sample request
PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy?api-version=2018-11-01-preview
{
"properties": {
"displayName": "force costCenter tag on all resources",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
"parameters": {
"tagName": {
"value": "costCenter"
},
"tagValue": {
"value": "[parameter('costCenter')]"
}
}
},
"kind": "policyAssignment"
}
Sample response
{
"properties": {
"displayName": "force costCenter tag on all resources",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
"parameters": {
"tagName": {
"value": "costCenter"
},
"tagValue": {
"value": "[parameter('costCenter')]"
}
}
},
"kind": "policyAssignment",
"id": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy",
"type": "Microsoft.Blueprint/blueprints/artifacts",
"name": "costCenterPolicy"
}
MG-RoleAssignmentArtifact
Sample request
PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment?api-version=2018-11-01-preview
{
"properties": {
"displayName": "enforce owners of given subscription",
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
"principalIds": "[parameters('owners')]"
},
"kind": "roleAssignment"
}
Sample response
{
"properties": {
"displayName": "enforce owners of given subscription",
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
"principalIds": "[parameters('owners')]"
},
"kind": "roleAssignment",
"id": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment",
"type": "Microsoft.Blueprint/blueprints/artifacts",
"name": "ownerAssignment"
}
Sub-ARMTemplateArtifact
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate?api-version=2018-11-01-preview
{
"kind": "template",
"properties": {
"template": {
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS"
],
"metadata": {
"description": "Storage Account type"
}
}
},
"variables": {
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"apiVersion": "2016-01-01",
"location": "[resourceGroup().location]",
"sku": {
"name": "[parameters('storageAccountType')]"
},
"kind": "Storage",
"properties": {}
}
],
"outputs": {
"storageAccountName": {
"type": "string",
"value": "[variables('storageAccountName')]"
}
}
},
"resourceGroup": "storageRG",
"parameters": {
"storageAccountType": {
"value": "[parameters('storageAccountType')]"
}
}
}
}
Sample response
{
"properties": {
"template": {
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS"
],
"metadata": {
"description": "Storage Account type"
}
}
},
"variables": {
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"apiVersion": "2016-01-01",
"location": "[resourceGroup().location]",
"sku": {
"name": "[parameters('storageAccountType')]"
},
"kind": "Storage",
"properties": {}
}
],
"outputs": {
"storageAccountName": {
"type": "string",
"value": "[variables('storageAccountName')]"
}
}
},
"resourceGroup": "storageRG",
"parameters": {
"storageAccountType": {
"value": "[parameters('storageAccountType')]"
}
}
},
"kind": "template",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate",
"type": "Microsoft.Blueprint/blueprints/artifacts",
"name": "storageTemplate"
}
Sub-PolicyAssignmentArtifact
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy?api-version=2018-11-01-preview
{
"properties": {
"displayName": "force costCenter tag on all resources",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
"parameters": {
"tagName": {
"value": "costCenter"
},
"tagValue": {
"value": "[parameter('costCenter')]"
}
}
},
"kind": "policyAssignment"
}
Sample response
{
"properties": {
"displayName": "force costCenter tag on all resources",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
"parameters": {
"tagName": {
"value": "costCenter"
},
"tagValue": {
"value": "[parameter('costCenter')]"
}
}
},
"kind": "policyAssignment",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy",
"type": "Microsoft.Blueprint/blueprints/artifacts",
"name": "costCenterPolicy"
}
Sub-RoleAssignmentArtifact
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment?api-version=2018-11-01-preview
{
"properties": {
"displayName": "enforce owners of given subscription",
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
"principalIds": "[parameters('owners')]"
},
"kind": "roleAssignment"
}
Sample response
{
"properties": {
"displayName": "enforce owners of given subscription",
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
"principalIds": "[parameters('owners')]"
},
"kind": "roleAssignment",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment",
"type": "Microsoft.Blueprint/blueprints/artifacts",
"name": "ownerAssignment"
}
Definitions
| Name | Description |
|---|---|
|
Cloud |
|
|
Error |
The resource management error additional info. |
|
Error |
Error Response |
|
key |
Specifies the link to a Key Vault. |
|
Parameter |
Value for the specified parameter. Can be either 'value' or 'reference' but not both. |
|
Policy |
Blueprint artifact that applies a Policy assignment. |
|
Role |
Blueprint artifact that applies a Role assignment. |
|
Secret |
Reference to a Key Vault secret. |
|
Template |
Blueprint artifact that deploys a Resource Manager template. |
CloudError
| Name | Type | Description |
|---|---|---|
| error |
Error Response |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorResponse
Error Response
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
keyVaultReference
Specifies the link to a Key Vault.
| Name | Type | Description |
|---|---|---|
| id |
string |
Azure resource ID of the Key Vault. |
ParameterValue
Value for the specified parameter. Can be either 'value' or 'reference' but not both.
| Name | Type | Description |
|---|---|---|
| reference |
Parameter value as reference type. |
|
| value |
object |
Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans. |
PolicyAssignmentArtifact
Blueprint artifact that applies a Policy assignment.
| Name | Type | Description |
|---|---|---|
| id |
string |
String Id used to locate any resource on Azure. |
| kind |
string:
policy |
Specifies the kind of blueprint artifact. |
| name |
string |
Name of this resource. |
| properties.dependsOn |
string[] |
Artifacts which need to be deployed before the specified artifact. |
| properties.description |
string maxLength: 500 |
Multi-line explain this resource. |
| properties.displayName |
string maxLength: 256 |
One-liner string explain this resource. |
| properties.parameters |
<string,
Parameter |
Parameter values for the policy definition. |
| properties.policyDefinitionId |
string |
Azure resource ID of the policy definition. |
| properties.resourceGroup |
string |
Name of the resource group placeholder to which the policy will be assigned. |
| type |
string |
Type of this resource. |
RoleAssignmentArtifact
Blueprint artifact that applies a Role assignment.
| Name | Type | Description |
|---|---|---|
| id |
string |
String Id used to locate any resource on Azure. |
| kind |
string:
role |
Specifies the kind of blueprint artifact. |
| name |
string |
Name of this resource. |
| properties.dependsOn |
string[] |
Artifacts which need to be deployed before the specified artifact. |
| properties.description |
string maxLength: 500 |
Multi-line explain this resource. |
| properties.displayName |
string maxLength: 256 |
One-liner string explain this resource. |
| properties.principalIds |
|
Array of user or group identities in Azure Active Directory. The roleDefinition will apply to each identity. |
| properties.resourceGroup |
string |
RoleAssignment will be scope to this resourceGroup. If empty, it scopes to the subscription. |
| properties.roleDefinitionId |
string |
Azure resource ID of the RoleDefinition. |
| type |
string |
Type of this resource. |
SecretValueReference
Reference to a Key Vault secret.
| Name | Type | Description |
|---|---|---|
| keyVault |
Specifies the reference to a given Azure Key Vault. |
|
| secretName |
string |
Name of the secret. |
| secretVersion |
string |
The version of the secret to use. If left blank, the latest version of the secret is used. |
TemplateArtifact
Blueprint artifact that deploys a Resource Manager template.
| Name | Type | Description |
|---|---|---|
| id |
string |
String Id used to locate any resource on Azure. |
| kind |
string:
template |
Specifies the kind of blueprint artifact. |
| name |
string |
Name of this resource. |
| properties.dependsOn |
string[] |
Artifacts which need to be deployed before the specified artifact. |
| properties.description |
string maxLength: 500 |
Multi-line explain this resource. |
| properties.displayName |
string maxLength: 256 |
One-liner string explain this resource. |
| properties.parameters |
<string,
Parameter |
Resource Manager template blueprint artifact parameter values. |
| properties.resourceGroup |
string |
If applicable, the name of the resource group placeholder to which the Resource Manager template blueprint artifact will be deployed. |
| properties.template |
object |
The Resource Manager template blueprint artifact body. |
| type |
string |
Type of this resource. |