Şema tanımını alın.
GET https://management.azure.com/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}?api-version=2018-11-01-preview
URI Parametreleri
Name |
İçinde |
Gerekli |
Tür |
Description |
blueprintName
|
path |
True
|
string
|
Şema tanımının adı.
|
resourceScope
|
path |
True
|
string
|
Kaynağın kapsamı. Geçerli kapsamlar şunlardır: yönetim grubu (biçim: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), abonelik (biçim: '/subscriptions/{subscriptionId}').
|
api-version
|
query |
True
|
string
|
İstemci API Sürümü.
|
Yanıtlar
Name |
Tür |
Description |
200 OK
|
Blueprint
|
Tamam -- şema tanımı alındı.
|
Other Status Codes
|
CloudError
|
Şemalar hata yanıtı.
|
Güvenlik
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
|
kullanıcı hesabınızın kimliğine bürünme
|
Örnekler
ManagementGroupBlueprint
Sample Request
GET https://management.azure.com/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint?api-version=2018-11-01-preview
package armblueprint_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f790e624d0d080b89d962a3bd19c65bc6a6b2f5e/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/managementGroupBPDef/Blueprint_Get.json
func ExampleBlueprintsClient_Get_managementGroupBlueprint() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armblueprint.NewClientFactory(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBlueprintsClient().Get(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Blueprint = armblueprint.Blueprint{
// Name: to.Ptr("simpleBlueprint"),
// Type: to.Ptr("Microsoft.Blueprint/blueprints"),
// ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
// Properties: &armblueprint.Properties{
// Description: to.Ptr("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}"),
// Parameters: map[string]*armblueprint.ParameterDefinition{
// "costCenter": &armblueprint.ParameterDefinition{
// Type: to.Ptr(armblueprint.TemplateParameterTypeString),
// Metadata: &armblueprint.ParameterDefinitionMetadata{
// DisplayName: to.Ptr("force cost center tag for all resources under given subscription."),
// },
// },
// "owners": &armblueprint.ParameterDefinition{
// Type: to.Ptr(armblueprint.TemplateParameterTypeArray),
// Metadata: &armblueprint.ParameterDefinitionMetadata{
// DisplayName: to.Ptr("assign owners to subscription along with blueprint assignment."),
// },
// },
// "storageAccountType": &armblueprint.ParameterDefinition{
// Type: to.Ptr(armblueprint.TemplateParameterTypeString),
// Metadata: &armblueprint.ParameterDefinitionMetadata{
// DisplayName: to.Ptr("storage account type."),
// },
// },
// },
// ResourceGroups: map[string]*armblueprint.ResourceGroupDefinition{
// "storageRG": &armblueprint.ResourceGroupDefinition{
// Metadata: &armblueprint.ParameterDefinitionMetadata{
// Description: to.Ptr("Contains storageAccounts that collect all shoebox logs."),
// DisplayName: to.Ptr("storage resource group"),
// },
// },
// },
// TargetScope: to.Ptr(armblueprint.BlueprintTargetScopeSubscription),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Blueprint;
using Azure.ResourceManager.Blueprint.Models;
// Generated from example definition: specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/managementGroupBPDef/Blueprint_Get.json
// this example is just showing the usage of "Blueprints_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BlueprintResource created on azure
// for more information of creating BlueprintResource, please refer to the document of BlueprintResource
string resourceScope = "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup";
string blueprintName = "simpleBlueprint";
ResourceIdentifier blueprintResourceId = BlueprintResource.CreateResourceIdentifier(resourceScope, blueprintName);
BlueprintResource blueprint = client.GetBlueprintResource(blueprintResourceId);
// invoke the operation
BlueprintResource result = await blueprint.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BlueprintData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"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",
"status": null
},
"id": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
"type": "Microsoft.Blueprint/blueprints",
"name": "simpleBlueprint"
}
SubscriptionBlueprint
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint?api-version=2018-11-01-preview
package armblueprint_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f790e624d0d080b89d962a3bd19c65bc6a6b2f5e/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/subscriptionBPDef/Blueprint_Get.json
func ExampleBlueprintsClient_Get_subscriptionBlueprint() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armblueprint.NewClientFactory(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBlueprintsClient().Get(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Blueprint = armblueprint.Blueprint{
// Name: to.Ptr("simpleBlueprint"),
// Type: to.Ptr("Microsoft.Blueprint/blueprints"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
// Properties: &armblueprint.Properties{
// Description: to.Ptr("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}"),
// Parameters: map[string]*armblueprint.ParameterDefinition{
// "costCenter": &armblueprint.ParameterDefinition{
// Type: to.Ptr(armblueprint.TemplateParameterTypeString),
// Metadata: &armblueprint.ParameterDefinitionMetadata{
// DisplayName: to.Ptr("force cost center tag for all resources under given subscription."),
// },
// },
// "owners": &armblueprint.ParameterDefinition{
// Type: to.Ptr(armblueprint.TemplateParameterTypeArray),
// Metadata: &armblueprint.ParameterDefinitionMetadata{
// DisplayName: to.Ptr("assign owners to subscription along with blueprint assignment."),
// },
// },
// "storageAccountType": &armblueprint.ParameterDefinition{
// Type: to.Ptr(armblueprint.TemplateParameterTypeString),
// Metadata: &armblueprint.ParameterDefinitionMetadata{
// DisplayName: to.Ptr("storage account type."),
// },
// },
// },
// ResourceGroups: map[string]*armblueprint.ResourceGroupDefinition{
// "storageRG": &armblueprint.ResourceGroupDefinition{
// Metadata: &armblueprint.ParameterDefinitionMetadata{
// Description: to.Ptr("Contains storageAccounts that collect all shoebox logs."),
// DisplayName: to.Ptr("storage resource group"),
// },
// },
// },
// TargetScope: to.Ptr(armblueprint.BlueprintTargetScopeSubscription),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Blueprint;
using Azure.ResourceManager.Blueprint.Models;
// Generated from example definition: specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/subscriptionBPDef/Blueprint_Get.json
// this example is just showing the usage of "Blueprints_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BlueprintResource created on azure
// for more information of creating BlueprintResource, please refer to the document of BlueprintResource
string resourceScope = "subscriptions/00000000-0000-0000-0000-000000000000";
string blueprintName = "simpleBlueprint";
ResourceIdentifier blueprintResourceId = BlueprintResource.CreateResourceIdentifier(resourceScope, blueprintName);
BlueprintResource blueprint = client.GetBlueprintResource(blueprintResourceId);
// invoke the operation
BlueprintResource result = await blueprint.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BlueprintData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"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",
"status": null
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
"type": "Microsoft.Blueprint/blueprints",
"name": "simpleBlueprint"
}
Tanımlar
Blueprint
Şema tanımını temsil eder.
Name |
Tür |
Description |
description
|
string
|
Bu kaynağı çok satırlı olarak açıklayın.
|
displayName
|
string
|
Tek satırlık dize bu kaynağı açıklar.
|
id
|
string
|
Azure'da herhangi bir kaynağı bulmak için kullanılan dize kimliği.
|
name
|
string
|
Bu kaynağın adı.
|
properties.layout
|
object
|
Kullanıcı arabirimi başvurusu için şema tanımının düzen görünümü.
|
properties.parameters
|
<string,
ParameterDefinition>
|
Bu şema tanımı için gereken parametreler.
|
properties.resourceGroups
|
<string,
ResourceGroupDefinition>
|
Bu şema tanımı tarafından tanımlanan kaynak grubu yer tutucuları.
|
properties.status
|
BlueprintStatus
|
Şemanın durumu. Bu alan salt okunur.
|
properties.targetScope
|
BlueprintTargetScope
|
Bu şema tanımının atanabileceği kapsam.
|
properties.versions
|
object
|
Bu şema tanımının yayımlanmış sürümleri.
|
type
|
string
|
Bu kaynağın türü.
|
BlueprintStatus
Şemanın durumu. Bu alan salt okunur.
Name |
Tür |
Description |
lastModified
|
string
|
Bu şema tanımının son değiştirilme zamanı.
|
timeCreated
|
string
|
Bu şema tanımının oluşturulma zamanı.
|
BlueprintTargetScope
Bu şema tanımının atanabileceği kapsam.
Name |
Tür |
Description |
managementGroup
|
string
|
Şema, şema ataması sırasında bir yönetim grubunu hedefler. Bu, gelecekte kullanılmak üzere ayrılmıştır.
|
subscription
|
string
|
Şema, şema ataması sırasında aboneliği hedefler.
|
CloudError
Name |
Tür |
Description |
error
|
ErrorResponse
|
Hata Yanıtı
Başarısız işlemlerin hata ayrıntılarını döndürmek için tüm Azure Resource Manager API'leri için genel hata yanıtı. (Bu, OData hata yanıtı biçimini de izler.)
|
ErrorAdditionalInfo
Kaynak yönetimi hatası ek bilgileri.
Name |
Tür |
Description |
info
|
object
|
Ek bilgiler.
|
type
|
string
|
Ek bilgi türü.
|
ErrorResponse
Hata Yanıtı
Name |
Tür |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Hata ek bilgileri.
|
code
|
string
|
Hata kodu.
|
details
|
ErrorResponse[]
|
Hata ayrıntıları.
|
message
|
string
|
Hata iletisi.
|
target
|
string
|
Hata hedefi.
|
ParameterDefinition
Bir parametreyi kısıtlar ve meta verilerle temsil eder.
Name |
Tür |
Description |
allowedValues
|
AllowedValues[]
|
Bu parametre için izin verilen değerler dizisi.
|
defaultValue
|
|
Bu parametre için varsayılan Değer.
|
metadata.description
|
string
|
Bu parametrenin/resourceGroup'un açıklaması.
|
metadata.displayName
|
string
|
Bu parametrenin/resourceGroup'un DisplayName'i.
|
metadata.strongType
|
string
|
Şema ataması sırasında zengin deneyim oluşturmak için kullanıcı arabirimi için StrongType. Desteklenen güçlü türler resourceType, principalId ve konumdur.
|
type
|
TemplateParameterType
|
Resource Manager şablonu parametreleri için izin verilen veri türleri.
|
ResourceGroupDefinition
Şema tanımındaki bir Azure kaynak grubunu temsil eder.
Name |
Tür |
Description |
dependsOn
|
string[]
|
Bu kaynak grubundan önce dağıtılması gereken yapıtlar.
|
location
|
string
|
Bu resourceGroup'un konumu. Şema ataması sırasında kaynak grubu konumu belirtilecekse boş bırakın.
|
metadata.description
|
string
|
Bu parametrenin/resourceGroup'un açıklaması.
|
metadata.displayName
|
string
|
Bu parametrenin/resourceGroup'un DisplayName'i.
|
metadata.strongType
|
string
|
Şema ataması sırasında zengin deneyim oluşturmak için kullanıcı arabirimi için StrongType. Desteklenen güçlü türler resourceType, principalId ve konumdur.
|
name
|
string
|
Bu resourceGroup'un adı. Şema ataması sırasında kaynak grubu adı belirtilecekse boş bırakın.
|
tags
|
object
|
Bu kaynak grubuna atanacak etiketler.
|
TemplateParameterType
Resource Manager şablonu parametreleri için izin verilen veri türleri.
Name |
Tür |
Description |
array
|
string
|
|
bool
|
string
|
|
int
|
string
|
|
object
|
string
|
|
secureObject
|
string
|
|
secureString
|
string
|
|
string
|
string
|
|