Blueprints - Create Or Update
Creare o aggiornare una definizione di progetto.
PUT https://management.azure.com/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}?api-version=2018-11-01-preview
Parametri dell'URI
| Nome | In | Necessario | Tipo | Descrizione |
|---|---|---|---|---|
|
blueprint
|
path | True |
string |
Nome della definizione del progetto. |
|
resource
|
path | True |
string |
Ambito della risorsa. Gli ambiti validi sono: gruppo di gestione (formato: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), sottoscrizione (formato: '/subscriptions/{subscriptionId}'). |
|
api-version
|
query | True |
string |
Versione dell'API client. |
Corpo della richiesta
| Nome | Necessario | Tipo | Descrizione |
|---|---|---|---|
| properties.targetScope | True |
Ambito in cui è possibile assegnare questa definizione di progetto. |
|
| description |
string maxLength: 500 |
Spiegare in più righe questa risorsa. |
|
| displayName |
string maxLength: 256 |
La stringa di una riga spiega questa risorsa. |
|
| properties.parameters |
<string,
Parameter |
Parametri richiesti da questa definizione di progetto. |
|
| properties.resourceGroups |
<string,
Resource |
Segnaposto del gruppo di risorse definito da questa definizione di progetto. |
|
| properties.versions |
object |
Versioni pubblicate di questa definizione di progetto. |
Risposte
| Nome | Tipo | Descrizione |
|---|---|---|
| 201 Created |
Creato: la definizione del progetto è stata salvata. |
|
| Other Status Codes |
Risposta di errore di Blueprints. |
Sicurezza
azure_auth
Flusso OAuth2 di Azure Active Directory
Tipo:
oauth2
Flow:
implicit
URL di autorizzazione:
https://login.microsoftonline.com/common/oauth2/authorize
Ambiti
| Nome | Descrizione |
|---|---|
| user_impersonation | rappresentare l'account utente |
Esempio
|
Management |
|
Resource |
|
Subscription |
ManagementGroupBlueprint
Esempio di richiesta
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"
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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."
}
}
Risposta di esempio
{
"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
Esempio di richiesta
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"
}
}
Risposta di esempio
{
"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"
}
Definizioni
| Nome | Descrizione |
|---|---|
| Blueprint |
Rappresenta una definizione di progetto. |
|
Blueprint |
Stato del progetto. Questo campo è di sola lettura. |
|
Blueprint |
Ambito in cui è possibile assegnare questa definizione di progetto. |
|
Cloud |
|
|
Error |
Informazioni aggiuntive sull'errore di gestione delle risorse. |
|
Error |
Risposta errore |
|
Parameter |
Rappresentare un parametro con vincoli e metadati. |
|
Resource |
Rappresenta un gruppo di risorse di Azure in una definizione di progetto. |
|
Template |
Tipi di dati consentiti per i parametri del modello di Resource Manager. |
Blueprint
Rappresenta una definizione di progetto.
| Nome | Tipo | Descrizione |
|---|---|---|
| description |
string maxLength: 500 |
Spiegare in più righe questa risorsa. |
| displayName |
string maxLength: 256 |
La stringa di una riga spiega questa risorsa. |
| id |
string |
ID stringa usato per individuare qualsiasi risorsa in Azure. |
| name |
string |
Nome della risorsa. |
| properties.layout |
object |
Visualizzazione layout della definizione del progetto per informazioni di riferimento sull'interfaccia utente. |
| properties.parameters |
<string,
Parameter |
Parametri richiesti da questa definizione di progetto. |
| properties.resourceGroups |
<string,
Resource |
Segnaposto del gruppo di risorse definito da questa definizione di progetto. |
| properties.status |
Stato del progetto. Questo campo è di sola lettura. |
|
| properties.targetScope |
Ambito in cui è possibile assegnare questa definizione di progetto. |
|
| properties.versions |
object |
Versioni pubblicate di questa definizione di progetto. |
| type |
string |
Tipo di questa risorsa. |
BlueprintStatus
Stato del progetto. Questo campo è di sola lettura.
| Nome | Tipo | Descrizione |
|---|---|---|
| lastModified |
string (date-time) |
Ora dell'ultima modifica della definizione del progetto. |
| timeCreated |
string (date-time) |
Ora di creazione della definizione del progetto. |
BlueprintTargetScope
Ambito in cui è possibile assegnare questa definizione di progetto.
| Valore | Descrizione |
|---|---|
| subscription |
Il progetto è destinato a una sottoscrizione durante l'assegnazione del progetto. |
| managementGroup |
Il progetto è destinato a un gruppo di gestione durante l'assegnazione del progetto. Questa operazione è riservata per uso futuro. |
CloudError
| Nome | Tipo | Descrizione |
|---|---|---|
| error |
Risposta errore |
ErrorAdditionalInfo
Informazioni aggiuntive sull'errore di gestione delle risorse.
| Nome | Tipo | Descrizione |
|---|---|---|
| info |
object |
Informazioni aggiuntive. |
| type |
string |
Tipo di informazioni aggiuntive. |
ErrorResponse
Risposta errore
| Nome | Tipo | Descrizione |
|---|---|---|
| additionalInfo |
Informazioni aggiuntive sull'errore. |
|
| code |
string |
Codice di errore. |
| details |
Dettagli dell'errore. |
|
| message |
string |
Messaggio di errore. |
| target |
string |
Destinazione dell'errore. |
ParameterDefinition
Rappresentare un parametro con vincoli e metadati.
| Nome | Tipo | Descrizione |
|---|---|---|
| allowedValues |
Allowed |
Matrice di valori consentiti per questo parametro. |
| defaultValue |
Valore predefinito per questo parametro. |
|
| metadata.description |
string maxLength: 500 |
Descrizione di questo parametro/resourceGroup. |
| metadata.displayName |
string maxLength: 256 |
DisplayName di questo parametro/resourceGroup. |
| metadata.strongType |
string maxLength: 64 |
StrongType per l'interfaccia utente per il rendering di un'esperienza avanzata durante l'assegnazione del progetto. I tipi sicuri supportati sono resourceType, principalId e location. |
| type |
Tipi di dati consentiti per i parametri del modello di Resource Manager. |
ResourceGroupDefinition
Rappresenta un gruppo di risorse di Azure in una definizione di progetto.
| Nome | Tipo | Descrizione |
|---|---|---|
| dependsOn |
string[] |
Artefatti che devono essere distribuiti prima di questo gruppo di risorse. |
| location |
string |
Posizione di questo resourceGroup. Lasciare vuoto se la posizione del gruppo di risorse verrà specificata durante l'assegnazione del progetto. |
| metadata.description |
string maxLength: 500 |
Descrizione di questo parametro/resourceGroup. |
| metadata.displayName |
string maxLength: 256 |
DisplayName di questo parametro/resourceGroup. |
| metadata.strongType |
string maxLength: 64 |
StrongType per l'interfaccia utente per il rendering di un'esperienza avanzata durante l'assegnazione del progetto. I tipi sicuri supportati sono resourceType, principalId e location. |
| name |
string |
Nome del gruppo di risorse. Lasciare vuoto se il nome del gruppo di risorse verrà specificato durante l'assegnazione del progetto. |
| tags |
object |
Tag da assegnare a questo gruppo di risorse. |
TemplateParameterType
Tipi di dati consentiti per i parametri del modello di Resource Manager.
| Valore | Descrizione |
|---|---|
| string | |
| array | |
| bool | |
| int | |
| object | |
| secureObject | |
| secureString |