Mencantumkan operasi untuk penetapan cetak biru tertentu dalam langganan atau grup manajemen.
GET https://management.azure.com/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/assignmentOperations?api-version=2018-11-01-preview
Parameter URI
Nama |
Dalam |
Diperlukan |
Jenis |
Deskripsi |
assignmentName
|
path |
True
|
string
|
Nama penetapan cetak biru.
|
resourceScope
|
path |
True
|
string
|
Cakupan sumber daya. Cakupan yang valid adalah: grup manajemen (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), langganan (format: '/subscriptions/{subscriptionId}').
|
api-version
|
query |
True
|
string
|
Versi API Klien.
|
Respons
Keamanan
azure_auth
Alur OAuth2 Azure Active Directory
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nama |
Deskripsi |
user_impersonation
|
meniru akun pengguna Anda
|
Contoh
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
}
Definisi
AssignmentDeploymentJob
Mewakili pekerjaan individual dalam operasi penetapan cetak biru tertentu.
Nama |
Jenis |
Deskripsi |
action
|
string
|
Nama tindakan yang dilakukan dalam pekerjaan ini.
|
history
|
AssignmentDeploymentJobResult[]
|
Hasil dari pekerjaan penyebaran ini untuk setiap percobaan ulang.
|
jobId
|
string
|
Id pekerjaan ini.
|
jobState
|
string
|
Status pekerjaan ini.
|
kind
|
string
|
Jenis pekerjaan.
|
requestUri
|
string
|
Referensi ke id sumber daya pekerjaan penyebaran.
|
result
|
AssignmentDeploymentJobResult
|
Hasil pekerjaan penyebaran.
|
AssignmentDeploymentJobResult
Hasil dari setiap penyebaran individu dalam penetapan cetak biru.
AssignmentJobCreatedResource
Sumber daya Azure yang dibuat dari pekerjaan penyebaran.
Nama |
Jenis |
Deskripsi |
id
|
string
|
Id String yang digunakan untuk menemukan sumber daya apa pun di Azure.
|
name
|
string
|
Nama sumber daya ini.
|
properties
|
object
|
Properti tambahan dalam kamus.
|
type
|
string
|
Jenis sumber daya ini.
|
AssignmentOperation
Mewakili detail penyebaran yang mendasar untuk setiap pembaruan untuk penetapan cetak biru.
Nama |
Jenis |
Deskripsi |
id
|
string
|
Id String yang digunakan untuk menemukan sumber daya apa pun di Azure.
|
name
|
string
|
Nama sumber daya ini.
|
properties.assignmentState
|
string
|
Status operasi penetapan cetak biru ini.
|
properties.blueprintVersion
|
string
|
Versi definisi cetak biru yang diterbitkan yang digunakan untuk operasi penetapan cetak biru.
|
properties.deployments
|
AssignmentDeploymentJob[]
|
Daftar pekerjaan dalam operasi penetapan cetak biru ini.
|
properties.timeCreated
|
string
|
Buat waktu operasi penetapan cetak biru ini.
|
properties.timeFinished
|
string
|
Selesaikan waktu penyebaran yang mendasar secara keseluruhan.
|
properties.timeStarted
|
string
|
Waktu mulai penyebaran yang mendasar.
|
type
|
string
|
Jenis sumber daya ini.
|
AssignmentOperationList
Daftar AssignmentOperation.
Nama |
Jenis |
Deskripsi |
nextLink
|
string
|
Tautkan ke halaman hasil berikutnya.
|
value
|
AssignmentOperation[]
|
Daftar AssignmentOperation.
|
AzureResourceManagerError
Kode kesalahan dan pesan
Nama |
Jenis |
Deskripsi |
code
|
string
|
Kode Kesalahan.
|
message
|
string
|
Pesan kesalahan.
|
CloudError
Nama |
Jenis |
Deskripsi |
error
|
ErrorResponse
|
Respons Kesalahan
Respons kesalahan umum untuk semua API Azure Resource Manager untuk mengembalikan detail kesalahan untuk operasi yang gagal. (Ini juga mengikuti format respons kesalahan OData.)
|
ErrorAdditionalInfo
Info tambahan kesalahan manajemen sumber daya.
Nama |
Jenis |
Deskripsi |
info
|
object
|
Info tambahan.
|
type
|
string
|
Jenis info tambahan.
|
ErrorResponse
Respons Kesalahan
Nama |
Jenis |
Deskripsi |
additionalInfo
|
ErrorAdditionalInfo[]
|
Info tambahan kesalahan.
|
code
|
string
|
Kode kesalahan.
|
details
|
ErrorResponse[]
|
Detail kesalahan.
|
message
|
string
|
Pesan kesalahan.
|
target
|
string
|
Target kesalahan.
|