サブスクリプションまたは管理グループ内の特定のブループリント割り当ての操作を一覧表示します。
GET https://management.azure.com/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/assignmentOperations?api-version=2018-11-01-preview
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
assignmentName
|
path |
True
|
string
|
ブループリント割り当ての名前。
|
resourceScope
|
path |
True
|
string
|
リソースのスコープ。 有効なスコープは、管理グループ (形式: '/providers/Microsoft.Management/managementGroups/{managementGroup}')、サブスクリプション (形式: '/subscriptions/{subscriptionId}') です。
|
api-version
|
query |
True
|
string
|
クライアント API のバージョン。
|
応答
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名前 |
説明 |
user_impersonation
|
ユーザー アカウントの借用
|
例
Assignment at management group scope
Sample Request
GET https://management.azure.com/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint/assignmentOperations?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/managementGroupBPAssignment/BlueprintAssignmentOperation_List.json
func ExampleAssignmentOperationsClient_NewListPager_assignmentAtManagementGroupScope() {
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)
}
pager := clientFactory.NewAssignmentOperationsClient().NewListPager("managementGroups/ContosoOnlineGroup", "assignSimpleBlueprint", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.AssignmentOperationList = armblueprint.AssignmentOperationList{
// Value: []*armblueprint.AssignmentOperation{
// {
// Name: to.Ptr("fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f"),
// Type: to.Ptr("microsoft.blueprint/blueprintAssignments/operations"),
// ID: to.Ptr("/managementGroups/ContosoOnlineGroup/providers/microsoft.blueprint/blueprintAssignments/assignSimpleBlueprint/assignmentOperations/fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f"),
// Properties: &armblueprint.AssignmentOperationProperties{
// AssignmentState: to.Ptr("succeed"),
// BlueprintVersion: to.Ptr("v20181101"),
// Deployments: []*armblueprint.AssignmentDeploymentJob{
// {
// Action: to.Ptr("put"),
// History: []*armblueprint.AssignmentDeploymentJobResult{
// {
// Error: &armblueprint.AzureResourceManagerError{
// Code: to.Ptr("dummy"),
// Message: to.Ptr("dummy"),
// },
// }},
// JobState: to.Ptr("succeeded"),
// Kind: to.Ptr("azureResource"),
// RequestURI: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.deployments/deployments/48432786-2f1b-4925-8032-a5d57bcb5b6e"),
// Result: &armblueprint.AssignmentDeploymentJobResult{
// Resources: []*armblueprint.AssignmentJobCreatedResource{
// {
// Name: to.Ptr("foobar"),
// Type: to.Ptr("foo/bar"),
// ID: to.Ptr("blabla"),
// }},
// },
// }},
// TimeCreated: to.Ptr("2018-11-13T15:19:45-08:00"),
// TimeFinished: to.Ptr("2018-11-13T15:26:02-08:00"),
// TimeStarted: to.Ptr("2018-11-13T15:21:49-08:00"),
// },
// }},
// }
}
}
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;
// Generated from example definition: specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/managementGroupBPAssignment/BlueprintAssignmentOperation_List.json
// this example is just showing the usage of "AssignmentOperations_List" 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 AssignmentResource created on azure
// for more information of creating AssignmentResource, please refer to the document of AssignmentResource
string resourceScope = "managementGroups/ContosoOnlineGroup";
string assignmentName = "assignSimpleBlueprint";
ResourceIdentifier assignmentResourceId = AssignmentResource.CreateResourceIdentifier(resourceScope, assignmentName);
AssignmentResource assignment = client.GetAssignmentResource(assignmentResourceId);
// get the collection of this AssignmentOperationResource
AssignmentOperationCollection collection = assignment.GetAssignmentOperations();
// invoke the operation and iterate over the result
await foreach (AssignmentOperationResource item in collection.GetAllAsync())
{
// the variable item 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
AssignmentOperationData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");
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
{
"value": [
{
"id": "/managementGroups/ContosoOnlineGroup/providers/microsoft.blueprint/blueprintAssignments/assignSimpleBlueprint/assignmentOperations/fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f",
"type": "microsoft.blueprint/blueprintAssignments/operations",
"name": "fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f",
"properties": {
"blueprintVersion": "v20181101",
"assignmentState": "succeed",
"timeCreated": "2018-11-13T15:19:45-08:00",
"timeStarted": "2018-11-13T15:21:49-08:00",
"timeFinished": "2018-11-13T15:26:02-08:00",
"deployments": [
{
"kind": "azureResource",
"action": "put",
"jobState": "succeeded",
"requestUri": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.deployments/deployments/48432786-2f1b-4925-8032-a5d57bcb5b6e",
"result": {
"resources": [
{
"id": "blabla",
"name": "foobar",
"type": "foo/bar"
}
]
},
"history": [
{
"error": {
"code": "dummy",
"message": "dummy"
}
}
]
}
]
}
}
],
"nextLink": null
}
Assignment at subscription scope
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint/assignmentOperations?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/subscriptionBPAssignment/BlueprintAssignmentOperation_List.json
func ExampleAssignmentOperationsClient_NewListPager_assignmentAtSubscriptionScope() {
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)
}
pager := clientFactory.NewAssignmentOperationsClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000", "assignSimpleBlueprint", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.AssignmentOperationList = armblueprint.AssignmentOperationList{
// Value: []*armblueprint.AssignmentOperation{
// {
// Name: to.Ptr("fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f"),
// Type: to.Ptr("microsoft.blueprint/blueprintAssignments/operations"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.blueprint/blueprintAssignments/assignSimpleBlueprint/assignmentOperations/fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f"),
// Properties: &armblueprint.AssignmentOperationProperties{
// AssignmentState: to.Ptr("succeed"),
// BlueprintVersion: to.Ptr("v20181101"),
// Deployments: []*armblueprint.AssignmentDeploymentJob{
// {
// Action: to.Ptr("put"),
// History: []*armblueprint.AssignmentDeploymentJobResult{
// {
// Error: &armblueprint.AzureResourceManagerError{
// Code: to.Ptr("dummy"),
// Message: to.Ptr("dummy"),
// },
// }},
// JobState: to.Ptr("succeeded"),
// Kind: to.Ptr("azureResource"),
// RequestURI: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.deployments/deployments/48432786-2f1b-4925-8032-a5d57bcb5b6e"),
// Result: &armblueprint.AssignmentDeploymentJobResult{
// Resources: []*armblueprint.AssignmentJobCreatedResource{
// {
// Name: to.Ptr("foobar"),
// Type: to.Ptr("foo/bar"),
// ID: to.Ptr("blabla"),
// }},
// },
// }},
// TimeCreated: to.Ptr("2018-11-13T15:19:45-08:00"),
// TimeFinished: to.Ptr("2018-11-13T15:26:02-08:00"),
// TimeStarted: to.Ptr("2018-11-13T15:21:49-08:00"),
// },
// }},
// }
}
}
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;
// Generated from example definition: specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/subscriptionBPAssignment/BlueprintAssignmentOperation_List.json
// this example is just showing the usage of "AssignmentOperations_List" 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 AssignmentResource created on azure
// for more information of creating AssignmentResource, please refer to the document of AssignmentResource
string resourceScope = "subscriptions/00000000-0000-0000-0000-000000000000";
string assignmentName = "assignSimpleBlueprint";
ResourceIdentifier assignmentResourceId = AssignmentResource.CreateResourceIdentifier(resourceScope, assignmentName);
AssignmentResource assignment = client.GetAssignmentResource(assignmentResourceId);
// get the collection of this AssignmentOperationResource
AssignmentOperationCollection collection = assignment.GetAssignmentOperations();
// invoke the operation and iterate over the result
await foreach (AssignmentOperationResource item in collection.GetAllAsync())
{
// the variable item 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
AssignmentOperationData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");
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
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.blueprint/blueprintAssignments/assignSimpleBlueprint/assignmentOperations/fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f",
"type": "microsoft.blueprint/blueprintAssignments/operations",
"name": "fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f",
"properties": {
"blueprintVersion": "v20181101",
"assignmentState": "succeed",
"timeCreated": "2018-11-13T15:19:45-08:00",
"timeStarted": "2018-11-13T15:21:49-08:00",
"timeFinished": "2018-11-13T15:26:02-08:00",
"deployments": [
{
"kind": "azureResource",
"action": "put",
"jobState": "succeeded",
"requestUri": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.deployments/deployments/48432786-2f1b-4925-8032-a5d57bcb5b6e",
"result": {
"resources": [
{
"id": "blabla",
"name": "foobar",
"type": "foo/bar"
}
]
},
"history": [
{
"error": {
"code": "dummy",
"message": "dummy"
}
}
]
}
]
}
}
],
"nextLink": null
}
定義
AssignmentDeploymentJob
指定されたブループリント割り当て操作の個々のジョブを表します。
AssignmentDeploymentJobResult
ブループリントの割り当てにおける個々のデプロイの結果。
AssignmentJobCreatedResource
デプロイ ジョブから作成された Azure リソース。
名前 |
型 |
説明 |
id
|
string
|
Azure 上の任意のリソースを検索するために使用される文字列 ID。
|
name
|
string
|
このリソースの名前。
|
properties
|
object
|
ディクショナリ内の追加のプロパティ。
|
type
|
string
|
このリソースの種類。
|
AssignmentOperation
ブループリント割り当ての更新ごとに基になるデプロイの詳細を表します。
名前 |
型 |
説明 |
id
|
string
|
Azure 上の任意のリソースを検索するために使用される文字列 ID。
|
name
|
string
|
このリソースの名前。
|
properties.assignmentState
|
string
|
このブループリント割り当て操作の状態。
|
properties.blueprintVersion
|
string
|
ブループリントの割り当て操作に使用されるブループリント定義の発行済みバージョン。
|
properties.deployments
|
AssignmentDeploymentJob[]
|
このブループリント割り当て操作のジョブの一覧。
|
properties.timeCreated
|
string
|
このブループリント割り当て操作の時間を作成します。
|
properties.timeFinished
|
string
|
基になるデプロイ全体の終了時刻。
|
properties.timeStarted
|
string
|
基になるデプロイの開始時刻。
|
type
|
string
|
このリソースの種類。
|
AssignmentOperationList
AssignmentOperation の一覧。
AzureResourceManagerError
エラー コードとメッセージ
名前 |
型 |
説明 |
code
|
string
|
エラー コード。
|
message
|
string
|
エラー メッセージ。
|
CloudError
名前 |
型 |
説明 |
error
|
ErrorResponse
|
エラー応答
失敗した操作のエラーの詳細を返す、すべての Azure Resource Manager API に対する一般的なエラー応答 (これは OData エラー応答形式にも従います)。
|
ErrorAdditionalInfo
リソース管理エラーの追加情報。
名前 |
型 |
説明 |
info
|
object
|
追加情報。
|
type
|
string
|
追加情報の種類。
|
ErrorResponse
エラー応答
名前 |
型 |
説明 |
additionalInfo
|
ErrorAdditionalInfo[]
|
エラーの追加情報。
|
code
|
string
|
エラー コード。
|
details
|
ErrorResponse[]
|
エラーの詳細です。
|
message
|
string
|
エラー メッセージ。
|
target
|
string
|
エラーのターゲット。
|