Blueprints - Create Or Update
Create or update a blueprint definition.
PUT https://management.azure.com/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}?api-version=2018-11-01-preview
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
blueprint
|
path | True |
|
Name of the blueprint definition. |
|
resource
|
path | True |
|
The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'). |
|
api-version
|
query | True |
|
Client API Version. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| properties.targetScope | True |
The scope where this blueprint definition can be assigned. |
|
| description |
|
Multi-line explain this resource. |
|
| displayName |
|
One-liner string explain this resource. |
|
| properties.parameters |
|
Parameters required by this blueprint definition. |
|
| properties.resourceGroups |
|
Resource group placeholders defined by this blueprint definition. |
|
| properties.versions |
|
Published versions of this blueprint definition. |
Responses
| Name | Type | Description |
|---|---|---|
| 201 Created |
Created -- blueprint definition saved. |
|
| 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
|
Management |
|
Resource |
|
Subscription |
ManagementGroupBlueprint
Sample Request
PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint?api-version=2018-11-01-preview
{
"properties": {
"description": "blueprint contains all artifact kinds {'template', 'rbac', 'policy'}",
"parameters": {
"storageAccountType": {
"type": "string",
"metadata": {
"displayName": "storage account type."
}
},
"costCenter": {
"type": "string",
"metadata": {
"displayName": "force cost center tag for all resources under given subscription."
}
},
"owners": {
"type": "array",
"metadata": {
"displayName": "assign owners to subscription along with blueprint assignment."
}
}
},
"resourceGroups": {
"storageRG": {
"metadata": {
"displayName": "storage resource group",
"description": "Contains storageAccounts that collect all shoebox logs."
}
}
},
"targetScope": "subscription"
}
}
Sample Response
{
"properties": {
"description": "blueprint contains all artifact kinds {'template', 'rbac', 'policy'}",
"parameters": {
"storageAccountType": {
"type": "string",
"metadata": {
"displayName": "storage account type.",
"description": null
}
},
"costCenter": {
"type": "string",
"metadata": {
"displayName": "force cost center tag for all resources under given subscription.",
"description": null
}
},
"owners": {
"type": "array",
"metadata": {
"displayName": "assign owners to subscription along with blueprint assignment.",
"description": null
}
}
},
"resourceGroups": {
"storageRG": {
"metadata": {
"displayName": "storage resource group",
"description": "Contains storageAccounts that collect all shoebox logs."
}
}
},
"targetScope": "subscription"
},
"id": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
"type": "Microsoft.Blueprint/blueprints",
"name": "simpleBlueprint"
}
ResourceGroupWithTags
Sample Request
PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/{ManagementGroupId}/providers/Microsoft.Blueprint/blueprints/simpleBlueprint?api-version=2018-11-01-preview
{
"properties": {
"targetScope": "subscription",
"resourceGroups": {
"myRGName": {
"name": "myRGName",
"location": "westus",
"metadata": {
"displayName": "My Resource Group"
},
"tags": {
"costcenter": "123456",
"nameOnlyTag": ""
}
}
},
"description": "An example blueprint containing an RG with two tags."
}
}
Sample Response
{
"properties": {
"parameters": {},
"resourceGroups": {
"myRGName": {
"name": "myRGName",
"location": "westus",
"metadata": {
"displayName": "My Resource Group"
},
"dependsOn": [],
"tags": {
"costcenter": "123456",
"tagWithNoValue": ""
}
}
},
"targetScope": "subscription",
"status": {
"timeCreated": "2019-04-29T20:52:56+00:00",
"lastModified": "2019-04-29T20:52:56+00:00"
},
"description": "An example blueprint containing an RG with two tags."
},
"id": "/providers/Microsoft.Management/managementGroups/{ManagementGroupId}/providers/Microsoft.Blueprint/blueprints/RGTaggingExample",
"type": "Microsoft.Blueprint/blueprints",
"name": "RGTaggingExample"
}
SubscriptionBlueprint
Sample Request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint?api-version=2018-11-01-preview
{
"properties": {
"description": "blueprint contains all artifact kinds {'template', 'rbac', 'policy'}",
"parameters": {
"storageAccountType": {
"type": "string",
"metadata": {
"displayName": "storage account type."
}
},
"costCenter": {
"type": "string",
"metadata": {
"displayName": "force cost center tag for all resources under given subscription."
}
},
"owners": {
"type": "array",
"metadata": {
"displayName": "assign owners to subscription along with blueprint assignment."
}
}
},
"resourceGroups": {
"storageRG": {
"metadata": {
"displayName": "storage resource group",
"description": "Contains storageAccounts that collect all shoebox logs."
}
}
},
"targetScope": "subscription"
}
}
Sample Response
{
"properties": {
"description": "blueprint contains all artifact kinds {'template', 'rbac', 'policy'}",
"parameters": {
"storageAccountType": {
"type": "string",
"metadata": {
"displayName": "storage account type.",
"description": null
}
},
"costCenter": {
"type": "string",
"metadata": {
"displayName": "force cost center tag for all resources under given subscription.",
"description": null
}
},
"owners": {
"type": "array",
"metadata": {
"displayName": "assign owners to subscription along with blueprint assignment.",
"description": null
}
}
},
"resourceGroups": {
"storageRG": {
"metadata": {
"displayName": "storage resource group",
"description": "Contains storageAccounts that collect all shoebox logs."
}
}
},
"targetScope": "subscription"
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
"type": "Microsoft.Blueprint/blueprints",
"name": "simpleBlueprint"
}
Definitions
| Blueprint |
Represents a Blueprint definition. |
|
Blueprint |
The status of the blueprint. This field is readonly. |
|
Blueprint |
The scope where this blueprint definition can be assigned. |
|
Cloud |
|
|
Error |
The resource management error additional info. |
|
Error |
Error Response |
|
Parameter |
Represent a parameter with constrains and metadata. |
|
Resource |
Represents an Azure resource group in a blueprint definition. |
|
Template |
Allowed data types for Resource Manager template parameters. |
Blueprint
Represents a Blueprint definition.
| Name | Type | Description |
|---|---|---|
| description |
|
Multi-line explain this resource. |
| displayName |
|
One-liner string explain this resource. |
| id |
|
String Id used to locate any resource on Azure. |
| name |
|
Name of this resource. |
| properties.layout |
|
Layout view of the blueprint definition for UI reference. |
| properties.parameters |
|
Parameters required by this blueprint definition. |
| properties.resourceGroups |
|
Resource group placeholders defined by this blueprint definition. |
| properties.status |
Status of the blueprint. This field is readonly. |
|
| properties.targetScope |
The scope where this blueprint definition can be assigned. |
|
| properties.versions |
|
Published versions of this blueprint definition. |
| type |
|
Type of this resource. |
BlueprintStatus
The status of the blueprint. This field is readonly.
| Name | Type | Description |
|---|---|---|
| lastModified |
|
Last modified time of this blueprint definition. |
| timeCreated |
|
Creation time of this blueprint definition. |
BlueprintTargetScope
The scope where this blueprint definition can be assigned.
| Name | Type | Description |
|---|---|---|
| managementGroup |
|
The blueprint targets a management group during blueprint assignment. This is reserved for future use. |
| subscription |
|
The blueprint targets a subscription during blueprint assignment. |
CloudError
| Name | Type | Description |
|---|---|---|
| error |
Error Response |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
|
The additional info. |
| type |
|
The additional info type. |
ErrorResponse
Error Response
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
|
The error code. |
| details |
The error details. |
|
| message |
|
The error message. |
| target |
|
The error target. |
ParameterDefinition
Represent a parameter with constrains and metadata.
| Name | Type | Description |
|---|---|---|
| allowedValues |
|
Array of allowed values for this parameter. |
| defaultValue |
|
Default Value for this parameter. |
| metadata.description |
|
Description of this parameter/resourceGroup. |
| metadata.displayName |
|
DisplayName of this parameter/resourceGroup. |
| metadata.strongType |
|
StrongType for UI to render rich experience during blueprint assignment. Supported strong types are resourceType, principalId and location. |
| type |
Allowed data types for Resource Manager template parameters. |
ResourceGroupDefinition
Represents an Azure resource group in a blueprint definition.
| Name | Type | Description |
|---|---|---|
| dependsOn |
|
Artifacts which need to be deployed before this resource group. |
| location |
|
Location of this resourceGroup. Leave empty if the resource group location will be specified during the blueprint assignment. |
| metadata.description |
|
Description of this parameter/resourceGroup. |
| metadata.displayName |
|
DisplayName of this parameter/resourceGroup. |
| metadata.strongType |
|
StrongType for UI to render rich experience during blueprint assignment. Supported strong types are resourceType, principalId and location. |
| name |
|
Name of this resourceGroup. Leave empty if the resource group name will be specified during the blueprint assignment. |
| tags |
|
Tags to be assigned to this resource group. |
TemplateParameterType
Allowed data types for Resource Manager template parameters.
| Name | Type | Description |
|---|---|---|
| array |
|
|
| bool |
|
|
| int |
|
|
| object |
|
|
| secureObject |
|
|
| secureString |
|
|
| string |
|