armblueprint

package module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 14 Imported by: 5

README

Azure Blueprint Module for Go

PkgGoDev

The armblueprint module provides operations for working with Azure Blueprint.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Blueprint module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Blueprint. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Blueprint module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armblueprint.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armblueprint.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewBlueprintsClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Blueprint label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	// REQUIRED; Specifies the kind of blueprint artifact.
	Kind *ArtifactKind

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Name of this resource.
	Name *string

	// READ-ONLY; Type of this resource.
	Type *string
}

Artifact - Represents a blueprint artifact.

func (*Artifact) GetArtifact

func (a *Artifact) GetArtifact() *Artifact

GetArtifact implements the ArtifactClassification interface for type Artifact.

func (Artifact) MarshalJSON added in v0.6.0

func (a Artifact) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Artifact.

func (*Artifact) UnmarshalJSON

func (a *Artifact) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Artifact.

type ArtifactClassification

type ArtifactClassification interface {
	// GetArtifact returns the Artifact content of the underlying type.
	GetArtifact() *Artifact
}

ArtifactClassification provides polymorphic access to related types. Call the interface's GetArtifact() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *Artifact, *PolicyAssignmentArtifact, *RoleAssignmentArtifact, *TemplateArtifact

type ArtifactKind

type ArtifactKind string

ArtifactKind - Specifies the kind of blueprint artifact.

const (
	ArtifactKindPolicyAssignment ArtifactKind = "policyAssignment"
	ArtifactKindRoleAssignment   ArtifactKind = "roleAssignment"
	ArtifactKindTemplate         ArtifactKind = "template"
)

func PossibleArtifactKindValues

func PossibleArtifactKindValues() []ArtifactKind

PossibleArtifactKindValues returns the possible values for the ArtifactKind const type.

type ArtifactList

type ArtifactList struct {
	// List of blueprint artifacts.
	Value []ArtifactClassification

	// READ-ONLY; Link to the next page of results.
	NextLink *string
}

ArtifactList - List of blueprint artifacts.

func (ArtifactList) MarshalJSON

func (a ArtifactList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ArtifactList.

func (*ArtifactList) UnmarshalJSON

func (a *ArtifactList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArtifactList.

type ArtifactsClient

type ArtifactsClient struct {
	// contains filtered or unexported fields
}

ArtifactsClient contains the methods for the Artifacts group. Don't use this type directly, use NewArtifactsClient() instead.

func NewArtifactsClient

func NewArtifactsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ArtifactsClient, error)

NewArtifactsClient creates a new instance of ArtifactsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ArtifactsClient) CreateOrUpdate

func (client *ArtifactsClient) CreateOrUpdate(ctx context.Context, resourceScope string, blueprintName string, artifactName string, artifact ArtifactClassification, options *ArtifactsClientCreateOrUpdateOptions) (ArtifactsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update blueprint artifact. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • artifactName - Name of the blueprint artifact.
  • artifact - Blueprint artifact to create or update.
  • options - ArtifactsClientCreateOrUpdateOptions contains the optional parameters for the ArtifactsClient.CreateOrUpdate method.
Example (MgArmTemplateArtifact)

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/ARMTemplateArtifact_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewArtifactsClient().CreateOrUpdate(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "storageTemplate", &armblueprint.TemplateArtifact{
		Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
		Properties: &armblueprint.TemplateArtifactProperties{
			Parameters: map[string]*armblueprint.ParameterValue{
				"storageAccountType": {
					Value: "[parameters('storageAccountType')]",
				},
			},
			ResourceGroup: to.Ptr("storageRG"),
			Template: map[string]any{
				"contentVersion": "1.0.0.0",
				"outputs": map[string]any{
					"storageAccountName": map[string]any{
						"type":  "string",
						"value": "[variables('storageAccountName')]",
					},
				},
				"parameters": map[string]any{
					"storageAccountType": map[string]any{
						"type": "string",
						"allowedValues": []any{
							"Standard_LRS",
							"Standard_GRS",
							"Standard_ZRS",
							"Premium_LRS",
						},
						"defaultValue": "Standard_LRS",
						"metadata": map[string]any{
							"description": "Storage Account type",
						},
					},
				},
				"resources": []any{
					map[string]any{
						"name":       "[variables('storageAccountName')]",
						"type":       "Microsoft.Storage/storageAccounts",
						"apiVersion": "2016-01-01",
						"kind":       "Storage",
						"location":   "[resourceGroup().location]",
						"properties": map[string]any{},
						"sku": map[string]any{
							"name": "[parameters('storageAccountType')]",
						},
					},
				},
				"variables": map[string]any{
					"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (MgPolicyAssignmentArtifact)

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/PolicyAssignmentArtifact_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewArtifactsClient().CreateOrUpdate(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "costCenterPolicy", &armblueprint.PolicyAssignmentArtifact{
		Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
		Properties: &armblueprint.PolicyAssignmentArtifactProperties{
			DisplayName: to.Ptr("force costCenter tag on all resources"),
			Parameters: map[string]*armblueprint.ParameterValue{
				"tagName": {
					Value: "costCenter",
				},
				"tagValue": {
					Value: "[parameter('costCenter')]",
				},
			},
			PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (MgRoleAssignmentArtifact)

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/RoleAssignmentArtifact_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewArtifactsClient().CreateOrUpdate(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "ownerAssignment", &armblueprint.RoleAssignmentArtifact{
		Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
		Properties: &armblueprint.RoleAssignmentArtifactProperties{
			DisplayName:      to.Ptr("enforce owners of given subscription"),
			PrincipalIDs:     "[parameters('owners')]",
			RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (SubArmTemplateArtifact)

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/ARMTemplateArtifact_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewArtifactsClient().CreateOrUpdate(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "storageTemplate", &armblueprint.TemplateArtifact{
		Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
		Properties: &armblueprint.TemplateArtifactProperties{
			Parameters: map[string]*armblueprint.ParameterValue{
				"storageAccountType": {
					Value: "[parameters('storageAccountType')]",
				},
			},
			ResourceGroup: to.Ptr("storageRG"),
			Template: map[string]any{
				"contentVersion": "1.0.0.0",
				"outputs": map[string]any{
					"storageAccountName": map[string]any{
						"type":  "string",
						"value": "[variables('storageAccountName')]",
					},
				},
				"parameters": map[string]any{
					"storageAccountType": map[string]any{
						"type": "string",
						"allowedValues": []any{
							"Standard_LRS",
							"Standard_GRS",
							"Standard_ZRS",
							"Premium_LRS",
						},
						"defaultValue": "Standard_LRS",
						"metadata": map[string]any{
							"description": "Storage Account type",
						},
					},
				},
				"resources": []any{
					map[string]any{
						"name":       "[variables('storageAccountName')]",
						"type":       "Microsoft.Storage/storageAccounts",
						"apiVersion": "2016-01-01",
						"kind":       "Storage",
						"location":   "[resourceGroup().location]",
						"properties": map[string]any{},
						"sku": map[string]any{
							"name": "[parameters('storageAccountType')]",
						},
					},
				},
				"variables": map[string]any{
					"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (SubPolicyAssignmentArtifact)

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/PolicyAssignmentArtifact_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewArtifactsClient().CreateOrUpdate(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "costCenterPolicy", &armblueprint.PolicyAssignmentArtifact{
		Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
		Properties: &armblueprint.PolicyAssignmentArtifactProperties{
			DisplayName: to.Ptr("force costCenter tag on all resources"),
			Parameters: map[string]*armblueprint.ParameterValue{
				"tagName": {
					Value: "costCenter",
				},
				"tagValue": {
					Value: "[parameter('costCenter')]",
				},
			},
			PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (SubRoleAssignmentArtifact)

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/RoleAssignmentArtifact_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewArtifactsClient().CreateOrUpdate(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "ownerAssignment", &armblueprint.RoleAssignmentArtifact{
		Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
		Properties: &armblueprint.RoleAssignmentArtifactProperties{
			DisplayName:      to.Ptr("enforce owners of given subscription"),
			PrincipalIDs:     "[parameters('owners')]",
			RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ArtifactsClient) Delete

func (client *ArtifactsClient) Delete(ctx context.Context, resourceScope string, blueprintName string, artifactName string, options *ArtifactsClientDeleteOptions) (ArtifactsClientDeleteResponse, error)

Delete - Delete a blueprint artifact. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • artifactName - Name of the blueprint artifact.
  • options - ArtifactsClientDeleteOptions contains the optional parameters for the ArtifactsClient.Delete method.
Example (MgArmTemplateArtifact)

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/ARMTemplateArtifact_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Delete(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "storageTemplate", 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 = armblueprint.ArtifactsClientDeleteResponse{
	// 	                            ArtifactClassification: &armblueprint.TemplateArtifact{
	// 		Name: to.Ptr("storageTemplate"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
	// 		Properties: &armblueprint.TemplateArtifactProperties{
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"storageAccountType": &armblueprint.ParameterValue{
	// 					Value: "[parameters('storageAccountType')]",
	// 				},
	// 			},
	// 			ResourceGroup: to.Ptr("storageRG"),
	// 			Template: map[string]any{
	// 				"contentVersion": "1.0.0.0",
	// 				"outputs":map[string]any{
	// 					"storageAccountName":map[string]any{
	// 						"type": "string",
	// 						"value": "[variables('storageAccountName')]",
	// 					},
	// 				},
	// 				"parameters":map[string]any{
	// 					"storageAccountType":map[string]any{
	// 						"type": "string",
	// 						"allowedValues":[]any{
	// 							"Standard_LRS",
	// 							"Standard_GRS",
	// 							"Standard_ZRS",
	// 							"Premium_LRS",
	// 						},
	// 						"defaultValue": "Standard_LRS",
	// 						"metadata":map[string]any{
	// 							"description": "Storage Account type",
	// 						},
	// 					},
	// 				},
	// 				"resources":[]any{
	// 					map[string]any{
	// 						"name": "[variables('storageAccountName')]",
	// 						"type": "Microsoft.Storage/storageAccounts",
	// 						"apiVersion": "2016-01-01",
	// 						"kind": "Storage",
	// 						"location": "[resourceGroup().location]",
	// 						"properties":map[string]any{
	// 						},
	// 						"sku":map[string]any{
	// 							"name": "[parameters('storageAccountType')]",
	// 						},
	// 					},
	// 				},
	// 				"variables":map[string]any{
	// 					"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
	// 				},
	// 			},
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (MgPolicyAssignmentArtifact)

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/PolicyAssignmentArtifact_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Delete(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "costCenterPolicy", 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 = armblueprint.ArtifactsClientDeleteResponse{
	// 	                            ArtifactClassification: &armblueprint.PolicyAssignmentArtifact{
	// 		Name: to.Ptr("costCenterPolicy"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
	// 		Properties: &armblueprint.PolicyAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("force costCenter tag on all resources"),
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"tagName": &armblueprint.ParameterValue{
	// 					Value: "costCenter",
	// 				},
	// 				"tagValue": &armblueprint.ParameterValue{
	// 					Value: "[parameter('costCenter')]",
	// 				},
	// 			},
	// 			PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (MgRoleAssignmentArtifact)

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/RoleAssignmentArtifact_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Delete(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "ownerAssignment", 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 = armblueprint.ArtifactsClientDeleteResponse{
	// 	                            ArtifactClassification: &armblueprint.RoleAssignmentArtifact{
	// 		Name: to.Ptr("ownerAssignment"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
	// 		Properties: &armblueprint.RoleAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("enforce owners of given subscription"),
	// 			PrincipalIDs: "[parameters('owners')]",
	// 			RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (SubArmTemplateArtifact)

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/ARMTemplateArtifact_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Delete(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "storageTemplate", 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 = armblueprint.ArtifactsClientDeleteResponse{
	// 	                            ArtifactClassification: &armblueprint.TemplateArtifact{
	// 		Name: to.Ptr("storageTemplate"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
	// 		Properties: &armblueprint.TemplateArtifactProperties{
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"storageAccountType": &armblueprint.ParameterValue{
	// 					Value: "[parameters('storageAccountType')]",
	// 				},
	// 			},
	// 			ResourceGroup: to.Ptr("storageRG"),
	// 			Template: map[string]any{
	// 				"contentVersion": "1.0.0.0",
	// 				"outputs":map[string]any{
	// 					"storageAccountName":map[string]any{
	// 						"type": "string",
	// 						"value": "[variables('storageAccountName')]",
	// 					},
	// 				},
	// 				"parameters":map[string]any{
	// 					"storageAccountType":map[string]any{
	// 						"type": "string",
	// 						"allowedValues":[]any{
	// 							"Standard_LRS",
	// 							"Standard_GRS",
	// 							"Standard_ZRS",
	// 							"Premium_LRS",
	// 						},
	// 						"defaultValue": "Standard_LRS",
	// 						"metadata":map[string]any{
	// 							"description": "Storage Account type",
	// 						},
	// 					},
	// 				},
	// 				"resources":[]any{
	// 					map[string]any{
	// 						"name": "[variables('storageAccountName')]",
	// 						"type": "Microsoft.Storage/storageAccounts",
	// 						"apiVersion": "2016-01-01",
	// 						"kind": "Storage",
	// 						"location": "[resourceGroup().location]",
	// 						"properties":map[string]any{
	// 						},
	// 						"sku":map[string]any{
	// 							"name": "[parameters('storageAccountType')]",
	// 						},
	// 					},
	// 				},
	// 				"variables":map[string]any{
	// 					"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
	// 				},
	// 			},
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (SubPolicyAssignmentArtifact)

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/PolicyAssignmentArtifact_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Delete(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "costCenterPolicy", 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 = armblueprint.ArtifactsClientDeleteResponse{
	// 	                            ArtifactClassification: &armblueprint.PolicyAssignmentArtifact{
	// 		Name: to.Ptr("costCenterPolicy"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
	// 		Properties: &armblueprint.PolicyAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("force costCenter tag on all resources"),
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"tagName": &armblueprint.ParameterValue{
	// 					Value: "costCenter",
	// 				},
	// 				"tagValue": &armblueprint.ParameterValue{
	// 					Value: "[parameter('costCenter')]",
	// 				},
	// 			},
	// 			PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (SubRoleAssignmentArtifact)

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/RoleAssignmentArtifact_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Delete(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "ownerAssignment", 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 = armblueprint.ArtifactsClientDeleteResponse{
	// 	                            ArtifactClassification: &armblueprint.RoleAssignmentArtifact{
	// 		Name: to.Ptr("ownerAssignment"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
	// 		Properties: &armblueprint.RoleAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("enforce owners of given subscription"),
	// 			PrincipalIDs: "[parameters('owners')]",
	// 			RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
	// 		},
	// 	},
	// 	                        }
}
Output:

func (*ArtifactsClient) Get

func (client *ArtifactsClient) Get(ctx context.Context, resourceScope string, blueprintName string, artifactName string, options *ArtifactsClientGetOptions) (ArtifactsClientGetResponse, error)

Get - Get a blueprint artifact. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • artifactName - Name of the blueprint artifact.
  • options - ArtifactsClientGetOptions contains the optional parameters for the ArtifactsClient.Get method.
Example (MgArmTemplateArtifact)

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/ARMTemplateArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Get(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "storageTemplate", 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 = armblueprint.ArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.TemplateArtifact{
	// 		Name: to.Ptr("storageTemplate"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
	// 		Properties: &armblueprint.TemplateArtifactProperties{
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"storageAccountType": &armblueprint.ParameterValue{
	// 					Value: "[parameters('storageAccountType')]",
	// 				},
	// 			},
	// 			ResourceGroup: to.Ptr("storageRG"),
	// 			Template: map[string]any{
	// 				"contentVersion": "1.0.0.0",
	// 				"outputs":map[string]any{
	// 					"storageAccountName":map[string]any{
	// 						"type": "string",
	// 						"value": "[variables('storageAccountName')]",
	// 					},
	// 				},
	// 				"parameters":map[string]any{
	// 					"storageAccountType":map[string]any{
	// 						"type": "string",
	// 						"allowedValues":[]any{
	// 							"Standard_LRS",
	// 							"Standard_GRS",
	// 							"Standard_ZRS",
	// 							"Premium_LRS",
	// 						},
	// 						"defaultValue": "Standard_LRS",
	// 						"metadata":map[string]any{
	// 							"description": "Storage Account type",
	// 						},
	// 					},
	// 				},
	// 				"resources":[]any{
	// 					map[string]any{
	// 						"name": "[variables('storageAccountName')]",
	// 						"type": "Microsoft.Storage/storageAccounts",
	// 						"apiVersion": "2016-01-01",
	// 						"kind": "Storage",
	// 						"location": "[resourceGroup().location]",
	// 						"properties":map[string]any{
	// 						},
	// 						"sku":map[string]any{
	// 							"name": "[parameters('storageAccountType')]",
	// 						},
	// 					},
	// 				},
	// 				"variables":map[string]any{
	// 					"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
	// 				},
	// 			},
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (MgPolicyAssignmentArtifact)

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/PolicyAssignmentArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Get(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "costCenterPolicy", 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 = armblueprint.ArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.PolicyAssignmentArtifact{
	// 		Name: to.Ptr("costCenterPolicy"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
	// 		Properties: &armblueprint.PolicyAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("force costCenter tag on all resources"),
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"tagName": &armblueprint.ParameterValue{
	// 					Value: "costCenter",
	// 				},
	// 				"tagValue": &armblueprint.ParameterValue{
	// 					Value: "[parameter('costCenter')]",
	// 				},
	// 			},
	// 			PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (MgRoleAssignmentArtifact)

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/RoleAssignmentArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Get(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "ownerAssignment", 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 = armblueprint.ArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.RoleAssignmentArtifact{
	// 		Name: to.Ptr("ownerAssignment"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
	// 		Properties: &armblueprint.RoleAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("enforce owners of given subscription"),
	// 			PrincipalIDs: "[parameters('owners')]",
	// 			RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (SubArmTemplateArtifact)

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/ARMTemplateArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Get(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "storageTemplate", 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 = armblueprint.ArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.TemplateArtifact{
	// 		Name: to.Ptr("storageTemplate"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
	// 		Properties: &armblueprint.TemplateArtifactProperties{
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"storageAccountType": &armblueprint.ParameterValue{
	// 					Value: "[parameters('storageAccountType')]",
	// 				},
	// 			},
	// 			ResourceGroup: to.Ptr("storageRG"),
	// 			Template: map[string]any{
	// 				"contentVersion": "1.0.0.0",
	// 				"outputs":map[string]any{
	// 					"storageAccountName":map[string]any{
	// 						"type": "string",
	// 						"value": "[variables('storageAccountName')]",
	// 					},
	// 				},
	// 				"parameters":map[string]any{
	// 					"storageAccountType":map[string]any{
	// 						"type": "string",
	// 						"allowedValues":[]any{
	// 							"Standard_LRS",
	// 							"Standard_GRS",
	// 							"Standard_ZRS",
	// 							"Premium_LRS",
	// 						},
	// 						"defaultValue": "Standard_LRS",
	// 						"metadata":map[string]any{
	// 							"description": "Storage Account type",
	// 						},
	// 					},
	// 				},
	// 				"resources":[]any{
	// 					map[string]any{
	// 						"name": "[variables('storageAccountName')]",
	// 						"type": "Microsoft.Storage/storageAccounts",
	// 						"apiVersion": "2016-01-01",
	// 						"kind": "Storage",
	// 						"location": "[resourceGroup().location]",
	// 						"properties":map[string]any{
	// 						},
	// 						"sku":map[string]any{
	// 							"name": "[parameters('storageAccountType')]",
	// 						},
	// 					},
	// 				},
	// 				"variables":map[string]any{
	// 					"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
	// 				},
	// 			},
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (SubPolicyAssignmentArtifact)

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/PolicyAssignmentArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Get(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "costCenterPolicy", 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 = armblueprint.ArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.PolicyAssignmentArtifact{
	// 		Name: to.Ptr("costCenterPolicy"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
	// 		Properties: &armblueprint.PolicyAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("force costCenter tag on all resources"),
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"tagName": &armblueprint.ParameterValue{
	// 					Value: "costCenter",
	// 				},
	// 				"tagValue": &armblueprint.ParameterValue{
	// 					Value: "[parameter('costCenter')]",
	// 				},
	// 			},
	// 			PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (SubRoleAssignmentArtifact)

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/RoleAssignmentArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().Get(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "ownerAssignment", 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 = armblueprint.ArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.RoleAssignmentArtifact{
	// 		Name: to.Ptr("ownerAssignment"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
	// 		Properties: &armblueprint.RoleAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("enforce owners of given subscription"),
	// 			PrincipalIDs: "[parameters('owners')]",
	// 			RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
	// 		},
	// 	},
	// 	                        }
}
Output:

func (*ArtifactsClient) NewListPager added in v0.4.0

func (client *ArtifactsClient) NewListPager(resourceScope string, blueprintName string, options *ArtifactsClientListOptions) *runtime.Pager[ArtifactsClientListResponse]

NewListPager - List artifacts for a given blueprint definition.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • options - ArtifactsClientListOptions contains the optional parameters for the ArtifactsClient.NewListPager method.
Example (MgArtifactList)

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/Artifact_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().NewListPager("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", 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.ArtifactList = armblueprint.ArtifactList{
		// 	Value: []armblueprint.ArtifactClassification{
		// 		&armblueprint.RoleAssignmentArtifact{
		// 			Name: to.Ptr("ownerAssignment"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
		// 			Properties: &armblueprint.RoleAssignmentArtifactProperties{
		// 				DisplayName: to.Ptr("enforce owners of given subscription"),
		// 				PrincipalIDs: "[parameters('owners')]",
		// 				RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 			},
		// 		},
		// 		&armblueprint.PolicyAssignmentArtifact{
		// 			Name: to.Ptr("costCenterPolicy"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
		// 			Properties: &armblueprint.PolicyAssignmentArtifactProperties{
		// 				DisplayName: to.Ptr("force costCenter tag on all resources"),
		// 				Parameters: map[string]*armblueprint.ParameterValue{
		// 					"tagName": &armblueprint.ParameterValue{
		// 						Value: "costCenter",
		// 					},
		// 					"tagValue": &armblueprint.ParameterValue{
		// 						Value: "[parameter('costCenter')]",
		// 					},
		// 				},
		// 				PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
		// 			},
		// 		},
		// 		&armblueprint.TemplateArtifact{
		// 			Name: to.Ptr("storageTemplate"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
		// 			Properties: &armblueprint.TemplateArtifactProperties{
		// 				Parameters: map[string]*armblueprint.ParameterValue{
		// 					"storageAccountType": &armblueprint.ParameterValue{
		// 						Value: "[parameters('storageAccountType')]",
		// 					},
		// 				},
		// 				ResourceGroup: to.Ptr("storageRG"),
		// 				Template: map[string]any{
		// 					"contentVersion": "1.0.0.0",
		// 					"outputs":map[string]any{
		// 						"storageAccountName":map[string]any{
		// 							"type": "string",
		// 							"value": "[variables('storageAccountName')]",
		// 						},
		// 					},
		// 					"parameters":map[string]any{
		// 						"storageAccountType":map[string]any{
		// 							"type": "string",
		// 							"allowedValues":[]any{
		// 								"Standard_LRS",
		// 								"Standard_GRS",
		// 								"Standard_ZRS",
		// 								"Premium_LRS",
		// 							},
		// 							"defaultValue": "Standard_LRS",
		// 							"metadata":map[string]any{
		// 								"description": "Storage Account type",
		// 							},
		// 						},
		// 					},
		// 					"resources":[]any{
		// 						map[string]any{
		// 							"name": "[variables('storageAccountName')]",
		// 							"type": "Microsoft.Storage/storageAccounts",
		// 							"apiVersion": "2016-01-01",
		// 							"kind": "Storage",
		// 							"location": "[resourceGroup().location]",
		// 							"properties":map[string]any{
		// 							},
		// 							"sku":map[string]any{
		// 								"name": "[parameters('storageAccountType')]",
		// 							},
		// 						},
		// 					},
		// 					"variables":map[string]any{
		// 						"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (SubArtifactList)

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/Artifact_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewArtifactsClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", 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.ArtifactList = armblueprint.ArtifactList{
		// 	Value: []armblueprint.ArtifactClassification{
		// 		&armblueprint.RoleAssignmentArtifact{
		// 			Name: to.Ptr("ownerAssignment"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
		// 			Properties: &armblueprint.RoleAssignmentArtifactProperties{
		// 				DisplayName: to.Ptr("enforce owners of given subscription"),
		// 				PrincipalIDs: "[parameters('owners')]",
		// 				RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 			},
		// 		},
		// 		&armblueprint.PolicyAssignmentArtifact{
		// 			Name: to.Ptr("costCenterPolicy"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
		// 			Properties: &armblueprint.PolicyAssignmentArtifactProperties{
		// 				DisplayName: to.Ptr("force costCenter tag on all resources"),
		// 				Parameters: map[string]*armblueprint.ParameterValue{
		// 					"tagName": &armblueprint.ParameterValue{
		// 						Value: "costCenter",
		// 					},
		// 					"tagValue": &armblueprint.ParameterValue{
		// 						Value: "[parameter('costCenter')]",
		// 					},
		// 				},
		// 				PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
		// 			},
		// 		},
		// 		&armblueprint.TemplateArtifact{
		// 			Name: to.Ptr("storageTemplate"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/artifacts"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
		// 			Properties: &armblueprint.TemplateArtifactProperties{
		// 				Parameters: map[string]*armblueprint.ParameterValue{
		// 					"storageAccountType": &armblueprint.ParameterValue{
		// 						Value: "[parameters('storageAccountType')]",
		// 					},
		// 				},
		// 				ResourceGroup: to.Ptr("storageRG"),
		// 				Template: map[string]any{
		// 					"contentVersion": "1.0.0.0",
		// 					"outputs":map[string]any{
		// 						"storageAccountName":map[string]any{
		// 							"type": "string",
		// 							"value": "[variables('storageAccountName')]",
		// 						},
		// 					},
		// 					"parameters":map[string]any{
		// 						"storageAccountType":map[string]any{
		// 							"type": "string",
		// 							"allowedValues":[]any{
		// 								"Standard_LRS",
		// 								"Standard_GRS",
		// 								"Standard_ZRS",
		// 								"Premium_LRS",
		// 							},
		// 							"defaultValue": "Standard_LRS",
		// 							"metadata":map[string]any{
		// 								"description": "Storage Account type",
		// 							},
		// 						},
		// 					},
		// 					"resources":[]any{
		// 						map[string]any{
		// 							"name": "[variables('storageAccountName')]",
		// 							"type": "Microsoft.Storage/storageAccounts",
		// 							"apiVersion": "2016-01-01",
		// 							"kind": "Storage",
		// 							"location": "[resourceGroup().location]",
		// 							"properties":map[string]any{
		// 							},
		// 							"sku":map[string]any{
		// 								"name": "[parameters('storageAccountType')]",
		// 							},
		// 						},
		// 					},
		// 					"variables":map[string]any{
		// 						"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type ArtifactsClientCreateOrUpdateOptions added in v0.2.0

type ArtifactsClientCreateOrUpdateOptions struct {
}

ArtifactsClientCreateOrUpdateOptions contains the optional parameters for the ArtifactsClient.CreateOrUpdate method.

type ArtifactsClientCreateOrUpdateResponse added in v0.2.0

type ArtifactsClientCreateOrUpdateResponse struct {
	// Represents a blueprint artifact.
	ArtifactClassification
}

ArtifactsClientCreateOrUpdateResponse contains the response from method ArtifactsClient.CreateOrUpdate.

func (*ArtifactsClientCreateOrUpdateResponse) UnmarshalJSON added in v0.3.0

func (a *ArtifactsClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArtifactsClientCreateOrUpdateResponse.

type ArtifactsClientDeleteOptions added in v0.2.0

type ArtifactsClientDeleteOptions struct {
}

ArtifactsClientDeleteOptions contains the optional parameters for the ArtifactsClient.Delete method.

type ArtifactsClientDeleteResponse added in v0.2.0

type ArtifactsClientDeleteResponse struct {
	// Represents a blueprint artifact.
	ArtifactClassification
}

ArtifactsClientDeleteResponse contains the response from method ArtifactsClient.Delete.

func (*ArtifactsClientDeleteResponse) UnmarshalJSON added in v0.3.0

func (a *ArtifactsClientDeleteResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArtifactsClientDeleteResponse.

type ArtifactsClientGetOptions added in v0.2.0

type ArtifactsClientGetOptions struct {
}

ArtifactsClientGetOptions contains the optional parameters for the ArtifactsClient.Get method.

type ArtifactsClientGetResponse added in v0.2.0

type ArtifactsClientGetResponse struct {
	// Represents a blueprint artifact.
	ArtifactClassification
}

ArtifactsClientGetResponse contains the response from method ArtifactsClient.Get.

func (*ArtifactsClientGetResponse) UnmarshalJSON added in v0.3.0

func (a *ArtifactsClientGetResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArtifactsClientGetResponse.

type ArtifactsClientListOptions added in v0.2.0

type ArtifactsClientListOptions struct {
}

ArtifactsClientListOptions contains the optional parameters for the ArtifactsClient.NewListPager method.

type ArtifactsClientListResponse added in v0.2.0

type ArtifactsClientListResponse struct {
	// List of blueprint artifacts.
	ArtifactList
}

ArtifactsClientListResponse contains the response from method ArtifactsClient.NewListPager.

type Assignment

type Assignment struct {
	// REQUIRED; Managed identity for this blueprint assignment.
	Identity *ManagedServiceIdentity

	// REQUIRED; The location of this blueprint assignment.
	Location *string

	// REQUIRED; Properties for blueprint assignment object.
	Properties *AssignmentProperties

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Name of this resource.
	Name *string

	// READ-ONLY; Type of this resource.
	Type *string
}

Assignment - Represents a blueprint assignment.

func (Assignment) MarshalJSON

func (a Assignment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Assignment.

func (*Assignment) UnmarshalJSON

func (a *Assignment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Assignment.

type AssignmentDeleteBehavior

type AssignmentDeleteBehavior string
const (
	AssignmentDeleteBehaviorAll  AssignmentDeleteBehavior = "all"
	AssignmentDeleteBehaviorNone AssignmentDeleteBehavior = "none"
)

func PossibleAssignmentDeleteBehaviorValues

func PossibleAssignmentDeleteBehaviorValues() []AssignmentDeleteBehavior

PossibleAssignmentDeleteBehaviorValues returns the possible values for the AssignmentDeleteBehavior const type.

type AssignmentDeploymentJob

type AssignmentDeploymentJob struct {
	// Name of the action performed in this job.
	Action *string

	// Result of this deployment job for each retry.
	History []*AssignmentDeploymentJobResult

	// Id of this job.
	JobID *string

	// State of this job.
	JobState *string

	// Kind of job.
	Kind *string

	// Reference to deployment job resource id.
	RequestURI *string

	// Deployment job result.
	Result *AssignmentDeploymentJobResult
}

AssignmentDeploymentJob - Represents individual job in given blueprint assignment operation.

func (AssignmentDeploymentJob) MarshalJSON

func (a AssignmentDeploymentJob) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentDeploymentJob.

func (*AssignmentDeploymentJob) UnmarshalJSON added in v0.6.0

func (a *AssignmentDeploymentJob) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentDeploymentJob.

type AssignmentDeploymentJobResult

type AssignmentDeploymentJobResult struct {
	// Contains error details if deployment job failed.
	Error *AzureResourceManagerError

	// Resources created as result of the deployment job.
	Resources []*AssignmentJobCreatedResource
}

AssignmentDeploymentJobResult - Result of each individual deployment in a blueprint assignment.

func (AssignmentDeploymentJobResult) MarshalJSON

func (a AssignmentDeploymentJobResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentDeploymentJobResult.

func (*AssignmentDeploymentJobResult) UnmarshalJSON added in v0.6.0

func (a *AssignmentDeploymentJobResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentDeploymentJobResult.

type AssignmentJobCreatedResource

type AssignmentJobCreatedResource struct {
	// Additional properties in a dictionary.
	Properties map[string]*string

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Name of this resource.
	Name *string

	// READ-ONLY; Type of this resource.
	Type *string
}

AssignmentJobCreatedResource - Azure resource created from deployment job.

func (AssignmentJobCreatedResource) MarshalJSON

func (a AssignmentJobCreatedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentJobCreatedResource.

func (*AssignmentJobCreatedResource) UnmarshalJSON

func (a *AssignmentJobCreatedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentJobCreatedResource.

type AssignmentList

type AssignmentList struct {
	// List of blueprint assignments.
	Value []*Assignment

	// READ-ONLY; Link to the next page of results.
	NextLink *string
}

AssignmentList - List of blueprint assignments

func (AssignmentList) MarshalJSON

func (a AssignmentList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentList.

func (*AssignmentList) UnmarshalJSON added in v0.6.0

func (a *AssignmentList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentList.

type AssignmentLockMode

type AssignmentLockMode string

AssignmentLockMode - Lock mode.

const (
	AssignmentLockModeAllResourcesDoNotDelete AssignmentLockMode = "AllResourcesDoNotDelete"
	AssignmentLockModeAllResourcesReadOnly    AssignmentLockMode = "AllResourcesReadOnly"
	AssignmentLockModeNone                    AssignmentLockMode = "None"
)

func PossibleAssignmentLockModeValues

func PossibleAssignmentLockModeValues() []AssignmentLockMode

PossibleAssignmentLockModeValues returns the possible values for the AssignmentLockMode const type.

type AssignmentLockSettings

type AssignmentLockSettings struct {
	// List of management operations that are excluded from blueprint locks. Up to 200 actions are permitted. If the lock mode
	// is set to 'AllResourcesReadOnly', then the following actions are automatically
	// appended to 'excludedActions': '*/read', 'Microsoft.Network/virtualNetworks/subnets/join/action' and 'Microsoft.Authorization/locks/delete'.
	// If the lock mode is set to 'AllResourcesDoNotDelete', then
	// the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate
	// actions will get removed.
	ExcludedActions []*string

	// List of AAD principals excluded from blueprint locks. Up to 5 principals are permitted.
	ExcludedPrincipals []*string

	// Lock mode.
	Mode *AssignmentLockMode
}

AssignmentLockSettings - Defines how resources deployed by a blueprint assignment are locked.

func (AssignmentLockSettings) MarshalJSON

func (a AssignmentLockSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentLockSettings.

func (*AssignmentLockSettings) UnmarshalJSON added in v0.6.0

func (a *AssignmentLockSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentLockSettings.

type AssignmentOperation

type AssignmentOperation struct {
	// Properties for AssignmentOperation.
	Properties *AssignmentOperationProperties

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Name of this resource.
	Name *string

	// READ-ONLY; Type of this resource.
	Type *string
}

AssignmentOperation - Represents underlying deployment detail for each update to the blueprint assignment.

func (AssignmentOperation) MarshalJSON

func (a AssignmentOperation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentOperation.

func (*AssignmentOperation) UnmarshalJSON

func (a *AssignmentOperation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentOperation.

type AssignmentOperationList

type AssignmentOperationList struct {
	// List of AssignmentOperation.
	Value []*AssignmentOperation

	// READ-ONLY; Link to the next page of results.
	NextLink *string
}

AssignmentOperationList - List of AssignmentOperation.

func (AssignmentOperationList) MarshalJSON

func (a AssignmentOperationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentOperationList.

func (*AssignmentOperationList) UnmarshalJSON added in v0.6.0

func (a *AssignmentOperationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentOperationList.

type AssignmentOperationProperties

type AssignmentOperationProperties struct {
	// State of this blueprint assignment operation.
	AssignmentState *string

	// The published version of the blueprint definition used for the blueprint assignment operation.
	BlueprintVersion *string

	// List of jobs in this blueprint assignment operation.
	Deployments []*AssignmentDeploymentJob

	// Create time of this blueprint assignment operation.
	TimeCreated *string

	// Finish time of the overall underlying deployments.
	TimeFinished *string

	// Start time of the underlying deployment.
	TimeStarted *string
}

AssignmentOperationProperties - Properties of AssignmentOperation.

func (AssignmentOperationProperties) MarshalJSON

func (a AssignmentOperationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentOperationProperties.

func (*AssignmentOperationProperties) UnmarshalJSON added in v0.6.0

func (a *AssignmentOperationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentOperationProperties.

type AssignmentOperationsClient

type AssignmentOperationsClient struct {
	// contains filtered or unexported fields
}

AssignmentOperationsClient contains the methods for the AssignmentOperations group. Don't use this type directly, use NewAssignmentOperationsClient() instead.

func NewAssignmentOperationsClient

func NewAssignmentOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AssignmentOperationsClient, error)

NewAssignmentOperationsClient creates a new instance of AssignmentOperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssignmentOperationsClient) Get

func (client *AssignmentOperationsClient) Get(ctx context.Context, resourceScope string, assignmentName string, assignmentOperationName string, options *AssignmentOperationsClientGetOptions) (AssignmentOperationsClientGetResponse, error)

Get - Get a blueprint assignment operation. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • assignmentName - Name of the blueprint assignment.
  • assignmentOperationName - Name of the blueprint assignment operation.
  • options - AssignmentOperationsClientGetOptions contains the optional parameters for the AssignmentOperationsClient.Get method.
Example (AssignmentAtManagementGroupScope)

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_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewAssignmentOperationsClient().Get(ctx, "managementGroups/ContosoOnlineGroup", "assignSimpleBlueprint", "fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f", 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.AssignmentOperation = 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"),
	// 	},
	// }
}
Output:

Example (AssignmentAtSubscriptionScope)

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_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewAssignmentOperationsClient().Get(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "assignSimpleBlueprint", "fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f", 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.AssignmentOperation = 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"),
	// 	},
	// }
}
Output:

func (*AssignmentOperationsClient) NewListPager added in v0.4.0

NewListPager - List operations for given blueprint assignment within a subscription or a management group.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • assignmentName - Name of the blueprint assignment.
  • options - AssignmentOperationsClientListOptions contains the optional parameters for the AssignmentOperationsClient.NewListPager method.
Example (AssignmentAtManagementGroupScope)

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

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (AssignmentAtSubscriptionScope)

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

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type AssignmentOperationsClientGetOptions added in v0.2.0

type AssignmentOperationsClientGetOptions struct {
}

AssignmentOperationsClientGetOptions contains the optional parameters for the AssignmentOperationsClient.Get method.

type AssignmentOperationsClientGetResponse added in v0.2.0

type AssignmentOperationsClientGetResponse struct {
	// Represents underlying deployment detail for each update to the blueprint assignment.
	AssignmentOperation
}

AssignmentOperationsClientGetResponse contains the response from method AssignmentOperationsClient.Get.

type AssignmentOperationsClientListOptions added in v0.2.0

type AssignmentOperationsClientListOptions struct {
}

AssignmentOperationsClientListOptions contains the optional parameters for the AssignmentOperationsClient.NewListPager method.

type AssignmentOperationsClientListResponse added in v0.2.0

type AssignmentOperationsClientListResponse struct {
	// List of AssignmentOperation.
	AssignmentOperationList
}

AssignmentOperationsClientListResponse contains the response from method AssignmentOperationsClient.NewListPager.

type AssignmentProperties

type AssignmentProperties struct {
	// REQUIRED; Blueprint assignment parameter values.
	Parameters map[string]*ParameterValue

	// REQUIRED; Names and locations of resource group placeholders.
	ResourceGroups map[string]*ResourceGroupValue

	// ID of the published version of a blueprint definition.
	BlueprintID *string

	// Multi-line explain this resource.
	Description *string

	// One-liner string explain this resource.
	DisplayName *string

	// Defines how resources deployed by a blueprint assignment are locked.
	Locks *AssignmentLockSettings

	// The target subscription scope of the blueprint assignment (format: '/subscriptions/{subscriptionId}'). For management group
	// level assignments, the property is required.
	Scope *string

	// READ-ONLY; State of the blueprint assignment.
	ProvisioningState *AssignmentProvisioningState

	// READ-ONLY; Status of blueprint assignment. This field is readonly.
	Status *AssignmentStatus
}

AssignmentProperties - Detailed properties for a blueprint assignment.

func (AssignmentProperties) MarshalJSON

func (a AssignmentProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentProperties.

func (*AssignmentProperties) UnmarshalJSON added in v0.6.0

func (a *AssignmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentProperties.

type AssignmentProvisioningState

type AssignmentProvisioningState string

AssignmentProvisioningState - State of the blueprint assignment.

const (
	AssignmentProvisioningStateCanceled   AssignmentProvisioningState = "canceled"
	AssignmentProvisioningStateCancelling AssignmentProvisioningState = "cancelling"
	AssignmentProvisioningStateCreating   AssignmentProvisioningState = "creating"
	AssignmentProvisioningStateDeleting   AssignmentProvisioningState = "deleting"
	AssignmentProvisioningStateDeploying  AssignmentProvisioningState = "deploying"
	AssignmentProvisioningStateFailed     AssignmentProvisioningState = "failed"
	AssignmentProvisioningStateLocking    AssignmentProvisioningState = "locking"
	AssignmentProvisioningStateSucceeded  AssignmentProvisioningState = "succeeded"
	AssignmentProvisioningStateValidating AssignmentProvisioningState = "validating"
	AssignmentProvisioningStateWaiting    AssignmentProvisioningState = "waiting"
)

func PossibleAssignmentProvisioningStateValues

func PossibleAssignmentProvisioningStateValues() []AssignmentProvisioningState

PossibleAssignmentProvisioningStateValues returns the possible values for the AssignmentProvisioningState const type.

type AssignmentStatus

type AssignmentStatus struct {
	// READ-ONLY; Last modified time of this blueprint definition.
	LastModified *time.Time

	// READ-ONLY; List of resources that were created by the blueprint assignment.
	ManagedResources []*string

	// READ-ONLY; Creation time of this blueprint definition.
	TimeCreated *time.Time
}

AssignmentStatus - The status of a blueprint assignment. This field is readonly.

func (AssignmentStatus) MarshalJSON

func (a AssignmentStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentStatus.

func (*AssignmentStatus) UnmarshalJSON

func (a *AssignmentStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentStatus.

type AssignmentsClient

type AssignmentsClient struct {
	// contains filtered or unexported fields
}

AssignmentsClient contains the methods for the Assignments group. Don't use this type directly, use NewAssignmentsClient() instead.

func NewAssignmentsClient

func NewAssignmentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AssignmentsClient, error)

NewAssignmentsClient creates a new instance of AssignmentsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssignmentsClient) CreateOrUpdate

func (client *AssignmentsClient) CreateOrUpdate(ctx context.Context, resourceScope string, assignmentName string, assignment Assignment, options *AssignmentsClientCreateOrUpdateOptions) (AssignmentsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update a blueprint assignment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • assignmentName - Name of the blueprint assignment.
  • assignment - Blueprint assignment object to save.
  • options - AssignmentsClientCreateOrUpdateOptions contains the optional parameters for the AssignmentsClient.CreateOrUpdate method.
Example (AssignmentWithSystemAssignedManagedIdentityAtManagementGroupScope)

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/BlueprintAssignment_Create_SystemAssignedMSI.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewAssignmentsClient().CreateOrUpdate(ctx, "managementGroups/ContosoOnlineGroup", "assignSimpleBlueprint", armblueprint.Assignment{
		Location: to.Ptr("eastus"),
		Identity: &armblueprint.ManagedServiceIdentity{
			Type: to.Ptr(armblueprint.ManagedServiceIdentityTypeSystemAssigned),
		},
		Properties: &armblueprint.AssignmentProperties{
			Description: to.Ptr("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
			BlueprintID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
			Parameters: map[string]*armblueprint.ParameterValue{
				"costCenter": {
					Value: "Contoso/Online/Shopping/Production",
				},
				"owners": {
					Value: []any{
						"johnDoe@contoso.com",
						"johnsteam@contoso.com",
					},
				},
				"storageAccountType": {
					Value: "Standard_LRS",
				},
			},
			ResourceGroups: map[string]*armblueprint.ResourceGroupValue{
				"storageRG": {
					Name:     to.Ptr("defaultRG"),
					Location: to.Ptr("eastus"),
				},
			},
			Scope: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (AssignmentWithSystemAssignedManagedIdentityAtSubscriptionScope)

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/BlueprintAssignment_Create_SystemAssignedMSI.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewAssignmentsClient().CreateOrUpdate(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "assignSimpleBlueprint", armblueprint.Assignment{
		Location: to.Ptr("eastus"),
		Identity: &armblueprint.ManagedServiceIdentity{
			Type: to.Ptr(armblueprint.ManagedServiceIdentityTypeSystemAssigned),
		},
		Properties: &armblueprint.AssignmentProperties{
			Description: to.Ptr("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
			BlueprintID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
			Parameters: map[string]*armblueprint.ParameterValue{
				"costCenter": {
					Value: "Contoso/Online/Shopping/Production",
				},
				"owners": {
					Value: []any{
						"johnDoe@contoso.com",
						"johnsteam@contoso.com",
					},
				},
				"storageAccountType": {
					Value: "Standard_LRS",
				},
			},
			ResourceGroups: map[string]*armblueprint.ResourceGroupValue{
				"storageRG": {
					Name:     to.Ptr("defaultRG"),
					Location: to.Ptr("eastus"),
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (AssignmentWithUserAssignedManagedIdentityAtManagementGroupScope)

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/BlueprintAssignment_Create_UserAssignedMSI.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewAssignmentsClient().CreateOrUpdate(ctx, "managementGroups/ContosoOnlineGroup", "assignSimpleBlueprint", armblueprint.Assignment{
		Location: to.Ptr("eastus"),
		Identity: &armblueprint.ManagedServiceIdentity{
			Type: to.Ptr(armblueprint.ManagedServiceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armblueprint.UserAssignedIdentity{
				"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": {},
			},
		},
		Properties: &armblueprint.AssignmentProperties{
			Description: to.Ptr("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
			BlueprintID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
			Parameters: map[string]*armblueprint.ParameterValue{
				"costCenter": {
					Value: "Contoso/Online/Shopping/Production",
				},
				"owners": {
					Value: []any{
						"johnDoe@contoso.com",
						"johnsteam@contoso.com",
					},
				},
				"storageAccountType": {
					Value: "Standard_LRS",
				},
			},
			ResourceGroups: map[string]*armblueprint.ResourceGroupValue{
				"storageRG": {
					Name:     to.Ptr("defaultRG"),
					Location: to.Ptr("eastus"),
				},
			},
			Scope: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (AssignmentWithUserAssignedManagedIdentityAtSubscriptionScope)

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/BlueprintAssignment_Create_UserAssignedMSI.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewAssignmentsClient().CreateOrUpdate(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "assignSimpleBlueprint", armblueprint.Assignment{
		Location: to.Ptr("eastus"),
		Identity: &armblueprint.ManagedServiceIdentity{
			Type: to.Ptr(armblueprint.ManagedServiceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armblueprint.UserAssignedIdentity{
				"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": {},
			},
		},
		Properties: &armblueprint.AssignmentProperties{
			Description: to.Ptr("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
			BlueprintID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
			Parameters: map[string]*armblueprint.ParameterValue{
				"costCenter": {
					Value: "Contoso/Online/Shopping/Production",
				},
				"owners": {
					Value: []any{
						"johnDoe@contoso.com",
						"johnsteam@contoso.com",
					},
				},
				"storageAccountType": {
					Value: "Standard_LRS",
				},
			},
			ResourceGroups: map[string]*armblueprint.ResourceGroupValue{
				"storageRG": {
					Name:     to.Ptr("defaultRG"),
					Location: to.Ptr("eastus"),
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AssignmentsClient) Delete

func (client *AssignmentsClient) Delete(ctx context.Context, resourceScope string, assignmentName string, options *AssignmentsClientDeleteOptions) (AssignmentsClientDeleteResponse, error)

Delete - Delete a blueprint assignment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • assignmentName - Name of the blueprint assignment.
  • options - AssignmentsClientDeleteOptions contains the optional parameters for the AssignmentsClient.Delete method.
Example (AssignmentDeleteAtManagementGroupScope)

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/BlueprintAssignment_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewAssignmentsClient().Delete(ctx, "managementGroups/ContosoOnlineGroup", "assignSimpleBlueprint", &armblueprint.AssignmentsClientDeleteOptions{DeleteBehavior: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (AssignmentDeleteAtManagementGroupScopeAndDeleteTheResourcesCreatedByTheAssignment)

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/BlueprintAssignment_Delete_AndDeleteChildren.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewAssignmentsClient().Delete(ctx, "managementGroups/ContosoOnlineGroup", "assignSimpleBlueprint", &armblueprint.AssignmentsClientDeleteOptions{DeleteBehavior: to.Ptr(armblueprint.AssignmentDeleteBehaviorAll)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (AssignmentDeleteAtSubscriptionScope)

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/BlueprintAssignment_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewAssignmentsClient().Delete(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "assignSimpleBlueprint", &armblueprint.AssignmentsClientDeleteOptions{DeleteBehavior: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (AssignmentDeleteAtSubscriptionScopeAndDeleteTheResourcesCreatedByTheAssignment)

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/BlueprintAssignment_Delete_AndDeleteChildren.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewAssignmentsClient().Delete(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "assignSimpleBlueprint", &armblueprint.AssignmentsClientDeleteOptions{DeleteBehavior: to.Ptr(armblueprint.AssignmentDeleteBehaviorAll)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AssignmentsClient) Get

func (client *AssignmentsClient) Get(ctx context.Context, resourceScope string, assignmentName string, options *AssignmentsClientGetOptions) (AssignmentsClientGetResponse, error)

Get - Get a blueprint assignment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • assignmentName - Name of the blueprint assignment.
  • options - AssignmentsClientGetOptions contains the optional parameters for the AssignmentsClient.Get method.
Example (AssignmentAtManagementGroupScope)

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/BlueprintAssignment_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewAssignmentsClient().Get(ctx, "managementGroups/ContosoOnlineGroup", "assignSimpleBlueprint", 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.Assignment = armblueprint.Assignment{
	// 	Name: to.Ptr("assignSimpleBlueprint"),
	// 	Type: to.Ptr("Microsoft.Blueprint/Assignment"),
	// 	ID: to.Ptr("/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint"),
	// 	Location: to.Ptr("eastus"),
	// 	Identity: &armblueprint.ManagedServiceIdentity{
	// 		Type: to.Ptr(armblueprint.ManagedServiceIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	},
	// 	Properties: &armblueprint.AssignmentProperties{
	// 		Description: to.Ptr("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
	// 		BlueprintID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
	// 		Parameters: map[string]*armblueprint.ParameterValue{
	// 			"costCenter": &armblueprint.ParameterValue{
	// 				Value: "Contoso/Online/Shopping/Production",
	// 			},
	// 			"owners": &armblueprint.ParameterValue{
	// 				Value: []any{
	// 					"johnDoe@contoso.com",
	// 					"johnsteam@contoso.com",
	// 				},
	// 			},
	// 			"storageAccountType": &armblueprint.ParameterValue{
	// 				Value: "Standard_LRS",
	// 			},
	// 		},
	// 		ProvisioningState: to.Ptr(armblueprint.AssignmentProvisioningState("Succeeded")),
	// 		ResourceGroups: map[string]*armblueprint.ResourceGroupValue{
	// 			"storageRG": &armblueprint.ResourceGroupValue{
	// 				Name: to.Ptr("defaultRG"),
	// 				Location: to.Ptr("eastus"),
	// 			},
	// 		},
	// 		Scope: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000"),
	// 	},
	// }
}
Output:

Example (AssignmentAtSubscriptionScope)

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/BlueprintAssignment_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewAssignmentsClient().Get(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "assignSimpleBlueprint", 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.Assignment = armblueprint.Assignment{
	// 	Name: to.Ptr("assignSimpleBlueprint"),
	// 	Type: to.Ptr("Microsoft.Blueprint/Assignment"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint"),
	// 	Location: to.Ptr("eastus"),
	// 	Identity: &armblueprint.ManagedServiceIdentity{
	// 		Type: to.Ptr(armblueprint.ManagedServiceIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	},
	// 	Properties: &armblueprint.AssignmentProperties{
	// 		Description: to.Ptr("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
	// 		BlueprintID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
	// 		Parameters: map[string]*armblueprint.ParameterValue{
	// 			"costCenter": &armblueprint.ParameterValue{
	// 				Value: "Contoso/Online/Shopping/Production",
	// 			},
	// 			"owners": &armblueprint.ParameterValue{
	// 				Value: []any{
	// 					"johnDoe@contoso.com",
	// 					"johnsteam@contoso.com",
	// 				},
	// 			},
	// 			"storageAccountType": &armblueprint.ParameterValue{
	// 				Value: "Standard_LRS",
	// 			},
	// 		},
	// 		ProvisioningState: to.Ptr(armblueprint.AssignmentProvisioningState("Succeeded")),
	// 		ResourceGroups: map[string]*armblueprint.ResourceGroupValue{
	// 			"storageRG": &armblueprint.ResourceGroupValue{
	// 				Name: to.Ptr("defaultRG"),
	// 				Location: to.Ptr("eastus"),
	// 			},
	// 		},
	// 	},
	// }
}
Output:

func (*AssignmentsClient) NewListPager added in v0.4.0

func (client *AssignmentsClient) NewListPager(resourceScope string, options *AssignmentsClientListOptions) *runtime.Pager[AssignmentsClientListResponse]

NewListPager - List blueprint assignments within a subscription or a management group.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • options - AssignmentsClientListOptions contains the optional parameters for the AssignmentsClient.NewListPager method.
Example (AssignmentAtManagementGroupScope)

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/BlueprintAssignment_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewAssignmentsClient().NewListPager("managementGroups/ContosoOnlineGroup", 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.AssignmentList = armblueprint.AssignmentList{
		// 	Value: []*armblueprint.Assignment{
		// 		{
		// 			Name: to.Ptr("assignSimpleBlueprint"),
		// 			Type: to.Ptr("Microsoft.Blueprint/Assignment"),
		// 			ID: to.Ptr("/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint"),
		// 			Location: to.Ptr("eastus"),
		// 			Identity: &armblueprint.ManagedServiceIdentity{
		// 				Type: to.Ptr(armblueprint.ManagedServiceIdentityTypeSystemAssigned),
		// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			},
		// 			Properties: &armblueprint.AssignmentProperties{
		// 				Description: to.Ptr("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
		// 				BlueprintID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
		// 				Parameters: map[string]*armblueprint.ParameterValue{
		// 					"costCenter": &armblueprint.ParameterValue{
		// 						Value: "Contoso/Online/Shopping/Production",
		// 					},
		// 					"owners": &armblueprint.ParameterValue{
		// 						Value: []any{
		// 							"johnDoe@contoso.com",
		// 							"johnsteam@contoso.com",
		// 						},
		// 					},
		// 					"storageAccountType": &armblueprint.ParameterValue{
		// 						Value: "Standard_LRS",
		// 					},
		// 				},
		// 				ProvisioningState: to.Ptr(armblueprint.AssignmentProvisioningState("Succeeded")),
		// 				ResourceGroups: map[string]*armblueprint.ResourceGroupValue{
		// 					"storageRG": &armblueprint.ResourceGroupValue{
		// 						Name: to.Ptr("defaultRG"),
		// 						Location: to.Ptr("eastus"),
		// 					},
		// 				},
		// 				Scope: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (AssignmentAtSubscriptionScope)

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/BlueprintAssignment_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewAssignmentsClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000", 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.AssignmentList = armblueprint.AssignmentList{
		// 	Value: []*armblueprint.Assignment{
		// 		{
		// 			Name: to.Ptr("assignSimpleBlueprint"),
		// 			Type: to.Ptr("Microsoft.Blueprint/Assignment"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint"),
		// 			Location: to.Ptr("eastus"),
		// 			Identity: &armblueprint.ManagedServiceIdentity{
		// 				Type: to.Ptr(armblueprint.ManagedServiceIdentityTypeSystemAssigned),
		// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			},
		// 			Properties: &armblueprint.AssignmentProperties{
		// 				Description: to.Ptr("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
		// 				BlueprintID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
		// 				Parameters: map[string]*armblueprint.ParameterValue{
		// 					"costCenter": &armblueprint.ParameterValue{
		// 						Value: "Contoso/Online/Shopping/Production",
		// 					},
		// 					"owners": &armblueprint.ParameterValue{
		// 						Value: []any{
		// 							"johnDoe@contoso.com",
		// 							"johnsteam@contoso.com",
		// 						},
		// 					},
		// 					"storageAccountType": &armblueprint.ParameterValue{
		// 						Value: "Standard_LRS",
		// 					},
		// 				},
		// 				ProvisioningState: to.Ptr(armblueprint.AssignmentProvisioningState("Succeeded")),
		// 				ResourceGroups: map[string]*armblueprint.ResourceGroupValue{
		// 					"storageRG": &armblueprint.ResourceGroupValue{
		// 						Name: to.Ptr("defaultRG"),
		// 						Location: to.Ptr("eastus"),
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AssignmentsClient) WhoIsBlueprint

func (client *AssignmentsClient) WhoIsBlueprint(ctx context.Context, resourceScope string, assignmentName string, options *AssignmentsClientWhoIsBlueprintOptions) (AssignmentsClientWhoIsBlueprintResponse, error)

WhoIsBlueprint - Get Blueprints service SPN objectId If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • assignmentName - Name of the blueprint assignment.
  • options - AssignmentsClientWhoIsBlueprintOptions contains the optional parameters for the AssignmentsClient.WhoIsBlueprint method.
Example (WhoIsBlueprintActionAtManagementGroupScope)

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/WhoIsBlueprint_Action.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewAssignmentsClient().WhoIsBlueprint(ctx, "managementGroups/ContosoOnlineGroup", "assignSimpleBlueprint", 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.WhoIsBlueprintContract = armblueprint.WhoIsBlueprintContract{
	// 	ObjectID: to.Ptr("00000000-1111-0000-1111-000000000000"),
	// }
}
Output:

Example (WhoIsBlueprintActionAtSubscriptionScope)

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/WhoIsBlueprint_Action.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewAssignmentsClient().WhoIsBlueprint(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "assignSimpleBlueprint", 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.WhoIsBlueprintContract = armblueprint.WhoIsBlueprintContract{
	// 	ObjectID: to.Ptr("00000000-1111-0000-1111-000000000000"),
	// }
}
Output:

type AssignmentsClientCreateOrUpdateOptions added in v0.2.0

type AssignmentsClientCreateOrUpdateOptions struct {
}

AssignmentsClientCreateOrUpdateOptions contains the optional parameters for the AssignmentsClient.CreateOrUpdate method.

type AssignmentsClientCreateOrUpdateResponse added in v0.2.0

type AssignmentsClientCreateOrUpdateResponse struct {
	// Represents a blueprint assignment.
	Assignment
}

AssignmentsClientCreateOrUpdateResponse contains the response from method AssignmentsClient.CreateOrUpdate.

type AssignmentsClientDeleteOptions added in v0.2.0

type AssignmentsClientDeleteOptions struct {
	// When deleteBehavior=all, the resources that were created by the blueprint assignment will be deleted.
	DeleteBehavior *AssignmentDeleteBehavior
}

AssignmentsClientDeleteOptions contains the optional parameters for the AssignmentsClient.Delete method.

type AssignmentsClientDeleteResponse added in v0.2.0

type AssignmentsClientDeleteResponse struct {
	// Represents a blueprint assignment.
	Assignment
}

AssignmentsClientDeleteResponse contains the response from method AssignmentsClient.Delete.

type AssignmentsClientGetOptions added in v0.2.0

type AssignmentsClientGetOptions struct {
}

AssignmentsClientGetOptions contains the optional parameters for the AssignmentsClient.Get method.

type AssignmentsClientGetResponse added in v0.2.0

type AssignmentsClientGetResponse struct {
	// Represents a blueprint assignment.
	Assignment
}

AssignmentsClientGetResponse contains the response from method AssignmentsClient.Get.

type AssignmentsClientListOptions added in v0.2.0

type AssignmentsClientListOptions struct {
}

AssignmentsClientListOptions contains the optional parameters for the AssignmentsClient.NewListPager method.

type AssignmentsClientListResponse added in v0.2.0

type AssignmentsClientListResponse struct {
	// List of blueprint assignments
	AssignmentList
}

AssignmentsClientListResponse contains the response from method AssignmentsClient.NewListPager.

type AssignmentsClientWhoIsBlueprintOptions added in v0.2.0

type AssignmentsClientWhoIsBlueprintOptions struct {
}

AssignmentsClientWhoIsBlueprintOptions contains the optional parameters for the AssignmentsClient.WhoIsBlueprint method.

type AssignmentsClientWhoIsBlueprintResponse added in v0.2.0

type AssignmentsClientWhoIsBlueprintResponse struct {
	// Response schema for querying the Azure Blueprints service principal in the tenant.
	WhoIsBlueprintContract
}

AssignmentsClientWhoIsBlueprintResponse contains the response from method AssignmentsClient.WhoIsBlueprint.

type AzureResourceBase

type AzureResourceBase struct {
	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Name of this resource.
	Name *string

	// READ-ONLY; Type of this resource.
	Type *string
}

AzureResourceBase - Common properties for all Azure resources.

func (AzureResourceBase) MarshalJSON

func (a AzureResourceBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureResourceBase.

func (*AzureResourceBase) UnmarshalJSON

func (a *AzureResourceBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceBase.

type AzureResourceManagerError

type AzureResourceManagerError struct {
	// Error code.
	Code *string

	// Error message.
	Message *string
}

AzureResourceManagerError - Error code and message

func (AzureResourceManagerError) MarshalJSON added in v0.6.0

func (a AzureResourceManagerError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureResourceManagerError.

func (*AzureResourceManagerError) UnmarshalJSON added in v0.6.0

func (a *AzureResourceManagerError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceManagerError.

type Blueprint

type Blueprint struct {
	// REQUIRED; Detailed properties for blueprint definition.
	Properties *Properties

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Name of this resource.
	Name *string

	// READ-ONLY; Type of this resource.
	Type *string
}

Blueprint - Represents a Blueprint definition.

func (Blueprint) MarshalJSON

func (b Blueprint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Blueprint.

func (*Blueprint) UnmarshalJSON

func (b *Blueprint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Blueprint.

type BlueprintTargetScope

type BlueprintTargetScope string

BlueprintTargetScope - The scope where this blueprint definition can be assigned.

const (
	// BlueprintTargetScopeManagementGroup - The blueprint targets a management group during blueprint assignment. This is reserved
	// for future use.
	BlueprintTargetScopeManagementGroup BlueprintTargetScope = "managementGroup"
	// BlueprintTargetScopeSubscription - The blueprint targets a subscription during blueprint assignment.
	BlueprintTargetScopeSubscription BlueprintTargetScope = "subscription"
)

func PossibleBlueprintTargetScopeValues

func PossibleBlueprintTargetScopeValues() []BlueprintTargetScope

PossibleBlueprintTargetScopeValues returns the possible values for the BlueprintTargetScope const type.

type BlueprintsClient

type BlueprintsClient struct {
	// contains filtered or unexported fields
}

BlueprintsClient contains the methods for the Blueprints group. Don't use this type directly, use NewBlueprintsClient() instead.

func NewBlueprintsClient

func NewBlueprintsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*BlueprintsClient, error)

NewBlueprintsClient creates a new instance of BlueprintsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*BlueprintsClient) CreateOrUpdate

func (client *BlueprintsClient) CreateOrUpdate(ctx context.Context, resourceScope string, blueprintName string, blueprint Blueprint, options *BlueprintsClientCreateOrUpdateOptions) (BlueprintsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update a blueprint definition. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • blueprint - Blueprint definition.
  • options - BlueprintsClientCreateOrUpdateOptions contains the optional parameters for the BlueprintsClient.CreateOrUpdate method.
Example (ManagementGroupBlueprint)

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_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewBlueprintsClient().CreateOrUpdate(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", armblueprint.Blueprint{
		Properties: &armblueprint.Properties{
			Description: to.Ptr("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}"),
			Parameters: map[string]*armblueprint.ParameterDefinition{
				"costCenter": {
					Type: to.Ptr(armblueprint.TemplateParameterTypeString),
					Metadata: &armblueprint.ParameterDefinitionMetadata{
						DisplayName: to.Ptr("force cost center tag for all resources under given subscription."),
					},
				},
				"owners": {
					Type: to.Ptr(armblueprint.TemplateParameterTypeArray),
					Metadata: &armblueprint.ParameterDefinitionMetadata{
						DisplayName: to.Ptr("assign owners to subscription along with blueprint assignment."),
					},
				},
				"storageAccountType": {
					Type: to.Ptr(armblueprint.TemplateParameterTypeString),
					Metadata: &armblueprint.ParameterDefinitionMetadata{
						DisplayName: to.Ptr("storage account type."),
					},
				},
			},
			ResourceGroups: map[string]*armblueprint.ResourceGroupDefinition{
				"storageRG": {
					Metadata: &armblueprint.ParameterDefinitionMetadata{
						Description: to.Ptr("Contains storageAccounts that collect all shoebox logs."),
						DisplayName: to.Ptr("storage resource group"),
					},
				},
			},
			TargetScope: to.Ptr(armblueprint.BlueprintTargetScopeSubscription),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (ResourceGroupWithTags)

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/ResourceGroupWithTags.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewBlueprintsClient().CreateOrUpdate(ctx, "providers/Microsoft.Management/managementGroups/{ManagementGroupId}", "simpleBlueprint", armblueprint.Blueprint{
		Properties: &armblueprint.Properties{
			Description: to.Ptr("An example blueprint containing an RG with two tags."),
			ResourceGroups: map[string]*armblueprint.ResourceGroupDefinition{
				"myRGName": {
					Name:     to.Ptr("myRGName"),
					Location: to.Ptr("westus"),
					Metadata: &armblueprint.ParameterDefinitionMetadata{
						DisplayName: to.Ptr("My Resource Group"),
					},
					Tags: map[string]*string{
						"costcenter":  to.Ptr("123456"),
						"nameOnlyTag": to.Ptr(""),
					},
				},
			},
			TargetScope: to.Ptr(armblueprint.BlueprintTargetScopeSubscription),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (SubscriptionBlueprint)

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_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewBlueprintsClient().CreateOrUpdate(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", armblueprint.Blueprint{
		Properties: &armblueprint.Properties{
			Description: to.Ptr("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}"),
			Parameters: map[string]*armblueprint.ParameterDefinition{
				"costCenter": {
					Type: to.Ptr(armblueprint.TemplateParameterTypeString),
					Metadata: &armblueprint.ParameterDefinitionMetadata{
						DisplayName: to.Ptr("force cost center tag for all resources under given subscription."),
					},
				},
				"owners": {
					Type: to.Ptr(armblueprint.TemplateParameterTypeArray),
					Metadata: &armblueprint.ParameterDefinitionMetadata{
						DisplayName: to.Ptr("assign owners to subscription along with blueprint assignment."),
					},
				},
				"storageAccountType": {
					Type: to.Ptr(armblueprint.TemplateParameterTypeString),
					Metadata: &armblueprint.ParameterDefinitionMetadata{
						DisplayName: to.Ptr("storage account type."),
					},
				},
			},
			ResourceGroups: map[string]*armblueprint.ResourceGroupDefinition{
				"storageRG": {
					Metadata: &armblueprint.ParameterDefinitionMetadata{
						Description: to.Ptr("Contains storageAccounts that collect all shoebox logs."),
						DisplayName: to.Ptr("storage resource group"),
					},
				},
			},
			TargetScope: to.Ptr(armblueprint.BlueprintTargetScopeSubscription),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*BlueprintsClient) Delete

func (client *BlueprintsClient) Delete(ctx context.Context, resourceScope string, blueprintName string, options *BlueprintsClientDeleteOptions) (BlueprintsClientDeleteResponse, error)

Delete - Delete a blueprint definition. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • options - BlueprintsClientDeleteOptions contains the optional parameters for the BlueprintsClient.Delete method.
Example (ManagementGroupBlueprint)

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_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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().Delete(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),
	// 	},
	// }
}
Output:

Example (SubscriptionBlueprint)

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_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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().Delete(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),
	// 	},
	// }
}
Output:

func (*BlueprintsClient) Get

func (client *BlueprintsClient) Get(ctx context.Context, resourceScope string, blueprintName string, options *BlueprintsClientGetOptions) (BlueprintsClientGetResponse, error)

Get - Get a blueprint definition. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • options - BlueprintsClientGetOptions contains the optional parameters for the BlueprintsClient.Get method.
Example (ManagementGroupBlueprint)

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

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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),
	// 	},
	// }
}
Output:

Example (SubscriptionBlueprint)

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

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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),
	// 	},
	// }
}
Output:

func (*BlueprintsClient) NewListPager added in v0.4.0

func (client *BlueprintsClient) NewListPager(resourceScope string, options *BlueprintsClientListOptions) *runtime.Pager[BlueprintsClientListResponse]

NewListPager - List blueprint definitions.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • options - BlueprintsClientListOptions contains the optional parameters for the BlueprintsClient.NewListPager method.
Example (ManagementGroupBlueprint)

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_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewBlueprintsClient().NewListPager("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", 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.List = armblueprint.List{
		// 	Value: []*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),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (SubscriptionBlueprint)

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_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewBlueprintsClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000", 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.List = armblueprint.List{
		// 	Value: []*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),
		// 			},
		// 	}},
		// }
	}
}
Output:

type BlueprintsClientCreateOrUpdateOptions added in v0.2.0

type BlueprintsClientCreateOrUpdateOptions struct {
}

BlueprintsClientCreateOrUpdateOptions contains the optional parameters for the BlueprintsClient.CreateOrUpdate method.

type BlueprintsClientCreateOrUpdateResponse added in v0.2.0

type BlueprintsClientCreateOrUpdateResponse struct {
	// Represents a Blueprint definition.
	Blueprint
}

BlueprintsClientCreateOrUpdateResponse contains the response from method BlueprintsClient.CreateOrUpdate.

type BlueprintsClientDeleteOptions added in v0.2.0

type BlueprintsClientDeleteOptions struct {
}

BlueprintsClientDeleteOptions contains the optional parameters for the BlueprintsClient.Delete method.

type BlueprintsClientDeleteResponse added in v0.2.0

type BlueprintsClientDeleteResponse struct {
	// Represents a Blueprint definition.
	Blueprint
}

BlueprintsClientDeleteResponse contains the response from method BlueprintsClient.Delete.

type BlueprintsClientGetOptions added in v0.2.0

type BlueprintsClientGetOptions struct {
}

BlueprintsClientGetOptions contains the optional parameters for the BlueprintsClient.Get method.

type BlueprintsClientGetResponse added in v0.2.0

type BlueprintsClientGetResponse struct {
	// Represents a Blueprint definition.
	Blueprint
}

BlueprintsClientGetResponse contains the response from method BlueprintsClient.Get.

type BlueprintsClientListOptions added in v0.2.0

type BlueprintsClientListOptions struct {
}

BlueprintsClientListOptions contains the optional parameters for the BlueprintsClient.NewListPager method.

type BlueprintsClientListResponse added in v0.2.0

type BlueprintsClientListResponse struct {
	// List of blueprint definitions.
	List
}

BlueprintsClientListResponse contains the response from method BlueprintsClient.NewListPager.

type ClientFactory added in v0.6.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v0.6.0

func NewClientFactory(credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewArtifactsClient added in v0.6.0

func (c *ClientFactory) NewArtifactsClient() *ArtifactsClient

NewArtifactsClient creates a new instance of ArtifactsClient.

func (*ClientFactory) NewAssignmentOperationsClient added in v0.6.0

func (c *ClientFactory) NewAssignmentOperationsClient() *AssignmentOperationsClient

NewAssignmentOperationsClient creates a new instance of AssignmentOperationsClient.

func (*ClientFactory) NewAssignmentsClient added in v0.6.0

func (c *ClientFactory) NewAssignmentsClient() *AssignmentsClient

NewAssignmentsClient creates a new instance of AssignmentsClient.

func (*ClientFactory) NewBlueprintsClient added in v0.6.0

func (c *ClientFactory) NewBlueprintsClient() *BlueprintsClient

NewBlueprintsClient creates a new instance of BlueprintsClient.

func (*ClientFactory) NewPublishedArtifactsClient added in v0.6.0

func (c *ClientFactory) NewPublishedArtifactsClient() *PublishedArtifactsClient

NewPublishedArtifactsClient creates a new instance of PublishedArtifactsClient.

func (*ClientFactory) NewPublishedBlueprintsClient added in v0.6.0

func (c *ClientFactory) NewPublishedBlueprintsClient() *PublishedBlueprintsClient

NewPublishedBlueprintsClient creates a new instance of PublishedBlueprintsClient.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON added in v0.6.0

func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v0.6.0

func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorResponse

type ErrorResponse struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorResponse

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)

func (ErrorResponse) MarshalJSON

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v0.6.0

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type KeyVaultReference

type KeyVaultReference struct {
	// REQUIRED; Azure resource ID of the Key Vault.
	ID *string
}

KeyVaultReference - Specifies the link to a Key Vault.

func (KeyVaultReference) MarshalJSON added in v0.6.0

func (k KeyVaultReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultReference.

func (*KeyVaultReference) UnmarshalJSON added in v0.6.0

func (k *KeyVaultReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultReference.

type List added in v0.2.0

type List struct {
	// List of blueprint definitions.
	Value []*Blueprint

	// READ-ONLY; Link to the next page of results.
	NextLink *string
}

List of blueprint definitions.

func (List) MarshalJSON added in v0.2.0

func (l List) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type List.

func (*List) UnmarshalJSON added in v0.6.0

func (l *List) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type List.

type ManagedServiceIdentity

type ManagedServiceIdentity struct {
	// REQUIRED; Type of the managed identity.
	Type *ManagedServiceIdentityType

	// Azure Active Directory principal ID associated with this Identity.
	PrincipalID *string

	// ID of the Azure Active Directory.
	TenantID *string

	// The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed
	// identity.
	UserAssignedIdentities map[string]*UserAssignedIdentity
}

ManagedServiceIdentity - Managed identity generic object.

func (ManagedServiceIdentity) MarshalJSON

func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.

func (*ManagedServiceIdentity) UnmarshalJSON added in v0.6.0

func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of the managed identity.

const (
	ManagedServiceIdentityTypeNone           ManagedServiceIdentityType = "None"
	ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned"
	ManagedServiceIdentityTypeUserAssigned   ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type ParameterDefinition

type ParameterDefinition struct {
	// REQUIRED; Allowed data types for Resource Manager template parameters.
	Type *TemplateParameterType

	// Array of allowed values for this parameter.
	AllowedValues []any

	// Default Value for this parameter.
	DefaultValue any

	// User-friendly properties for this parameter.
	Metadata *ParameterDefinitionMetadata
}

ParameterDefinition - Represent a parameter with constrains and metadata.

func (ParameterDefinition) MarshalJSON

func (p ParameterDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ParameterDefinition.

func (*ParameterDefinition) UnmarshalJSON added in v0.6.0

func (p *ParameterDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ParameterDefinition.

type ParameterDefinitionMetadata

type ParameterDefinitionMetadata struct {
	// Description of this parameter/resourceGroup.
	Description *string

	// DisplayName of this parameter/resourceGroup.
	DisplayName *string

	// StrongType for UI to render rich experience during blueprint assignment. Supported strong types are resourceType, principalId
	// and location.
	StrongType *string
}

ParameterDefinitionMetadata - User-friendly properties for this parameter.

func (ParameterDefinitionMetadata) MarshalJSON added in v0.6.0

func (p ParameterDefinitionMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ParameterDefinitionMetadata.

func (*ParameterDefinitionMetadata) UnmarshalJSON added in v0.6.0

func (p *ParameterDefinitionMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ParameterDefinitionMetadata.

type ParameterValue

type ParameterValue struct {
	// Parameter value as reference type.
	Reference *SecretValueReference

	// Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
	Value any
}

ParameterValue - Value for the specified parameter. Can be either 'value' or 'reference' but not both.

func (ParameterValue) MarshalJSON added in v0.6.0

func (p ParameterValue) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ParameterValue.

func (*ParameterValue) UnmarshalJSON added in v0.6.0

func (p *ParameterValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ParameterValue.

type PolicyAssignmentArtifact

type PolicyAssignmentArtifact struct {
	// REQUIRED; Specifies the kind of blueprint artifact.
	Kind *ArtifactKind

	// REQUIRED; properties for policyAssignment Artifact
	Properties *PolicyAssignmentArtifactProperties

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Name of this resource.
	Name *string

	// READ-ONLY; Type of this resource.
	Type *string
}

PolicyAssignmentArtifact - Blueprint artifact that applies a Policy assignment.

func (*PolicyAssignmentArtifact) GetArtifact added in v0.2.0

func (p *PolicyAssignmentArtifact) GetArtifact() *Artifact

GetArtifact implements the ArtifactClassification interface for type PolicyAssignmentArtifact.

func (PolicyAssignmentArtifact) MarshalJSON

func (p PolicyAssignmentArtifact) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyAssignmentArtifact.

func (*PolicyAssignmentArtifact) UnmarshalJSON

func (p *PolicyAssignmentArtifact) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyAssignmentArtifact.

type PolicyAssignmentArtifactProperties

type PolicyAssignmentArtifactProperties struct {
	// REQUIRED; Parameter values for the policy definition.
	Parameters map[string]*ParameterValue

	// REQUIRED; Azure resource ID of the policy definition.
	PolicyDefinitionID *string

	// Artifacts which need to be deployed before the specified artifact.
	DependsOn []*string

	// Multi-line explain this resource.
	Description *string

	// One-liner string explain this resource.
	DisplayName *string

	// Name of the resource group placeholder to which the policy will be assigned.
	ResourceGroup *string
}

PolicyAssignmentArtifactProperties - Properties of a Policy assignment blueprint artifact.

func (PolicyAssignmentArtifactProperties) MarshalJSON

func (p PolicyAssignmentArtifactProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyAssignmentArtifactProperties.

func (*PolicyAssignmentArtifactProperties) UnmarshalJSON added in v0.6.0

func (p *PolicyAssignmentArtifactProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyAssignmentArtifactProperties.

type Properties added in v0.2.0

type Properties struct {
	// Multi-line explain this resource.
	Description *string

	// One-liner string explain this resource.
	DisplayName *string

	// Parameters required by this blueprint definition.
	Parameters map[string]*ParameterDefinition

	// Resource group placeholders defined by this blueprint definition.
	ResourceGroups map[string]*ResourceGroupDefinition

	// The scope where this blueprint definition can be assigned.
	TargetScope *BlueprintTargetScope

	// Published versions of this blueprint definition.
	Versions any

	// READ-ONLY; Layout view of the blueprint definition for UI reference.
	Layout any

	// READ-ONLY; Status of the blueprint. This field is readonly.
	Status *Status
}

Properties - Schema for blueprint definition properties.

func (Properties) MarshalJSON added in v0.2.0

func (p Properties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON added in v0.6.0

func (p *Properties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type PublishedArtifactsClient

type PublishedArtifactsClient struct {
	// contains filtered or unexported fields
}

PublishedArtifactsClient contains the methods for the PublishedArtifacts group. Don't use this type directly, use NewPublishedArtifactsClient() instead.

func NewPublishedArtifactsClient

func NewPublishedArtifactsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PublishedArtifactsClient, error)

NewPublishedArtifactsClient creates a new instance of PublishedArtifactsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PublishedArtifactsClient) Get

func (client *PublishedArtifactsClient) Get(ctx context.Context, resourceScope string, blueprintName string, versionID string, artifactName string, options *PublishedArtifactsClientGetOptions) (PublishedArtifactsClientGetResponse, error)

Get - Get an artifact for a published blueprint definition. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • versionID - Version of the published blueprint definition.
  • artifactName - Name of the blueprint artifact.
  • options - PublishedArtifactsClientGetOptions contains the optional parameters for the PublishedArtifactsClient.Get method.
Example (MgArmTemplateArtifact)

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/SealedARMTemplateArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedArtifactsClient().Get(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "V2", "storageTemplate", 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 = armblueprint.PublishedArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.TemplateArtifact{
	// 		Name: to.Ptr("storageTemplate"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
	// 		ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/storageTemplate"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
	// 		Properties: &armblueprint.TemplateArtifactProperties{
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"storageAccountType": &armblueprint.ParameterValue{
	// 					Value: "[parameters('storageAccountType')]",
	// 				},
	// 			},
	// 			ResourceGroup: to.Ptr("storageRG"),
	// 			Template: map[string]any{
	// 				"contentVersion": "1.0.0.0",
	// 				"outputs":map[string]any{
	// 					"storageAccountName":map[string]any{
	// 						"type": "string",
	// 						"value": "[variables('storageAccountName')]",
	// 					},
	// 				},
	// 				"parameters":map[string]any{
	// 					"storageAccountType":map[string]any{
	// 						"type": "string",
	// 						"allowedValues":[]any{
	// 							"Standard_LRS",
	// 							"Standard_GRS",
	// 							"Standard_ZRS",
	// 							"Premium_LRS",
	// 						},
	// 						"defaultValue": "Standard_LRS",
	// 						"metadata":map[string]any{
	// 							"description": "Storage Account type",
	// 						},
	// 					},
	// 				},
	// 				"resources":[]any{
	// 					map[string]any{
	// 						"name": "[variables('storageAccountName')]",
	// 						"type": "Microsoft.Storage/storageAccounts",
	// 						"apiVersion": "2016-01-01",
	// 						"kind": "Storage",
	// 						"location": "[resourceGroup().location]",
	// 						"properties":map[string]any{
	// 						},
	// 						"sku":map[string]any{
	// 							"name": "[parameters('storageAccountType')]",
	// 						},
	// 					},
	// 				},
	// 				"variables":map[string]any{
	// 					"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
	// 				},
	// 			},
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (MgPolicyAssignmentArtifact)

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/SealedPolicyAssignmentArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedArtifactsClient().Get(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "V2", "costCenterPolicy", 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 = armblueprint.PublishedArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.PolicyAssignmentArtifact{
	// 		Name: to.Ptr("costCenterPolicy"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
	// 		ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/costCenterPolicy"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
	// 		Properties: &armblueprint.PolicyAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("force costCenter tag on all resources"),
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"tagName": &armblueprint.ParameterValue{
	// 					Value: "costCenter",
	// 				},
	// 				"tagValue": &armblueprint.ParameterValue{
	// 					Value: "[parameter('costCenter')]",
	// 				},
	// 			},
	// 			PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (MgRoleAssignmentArtifact)

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/SealedRoleAssignmentArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedArtifactsClient().Get(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "V2", "ownerAssignment", 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 = armblueprint.PublishedArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.RoleAssignmentArtifact{
	// 		Name: to.Ptr("ownerAssignment"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
	// 		ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/ownerAssignment"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
	// 		Properties: &armblueprint.RoleAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("enforce owners of given subscription"),
	// 			PrincipalIDs: "[parameters('owners')]",
	// 			RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (SubArmTemplateArtifact)

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/SealedARMTemplateArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedArtifactsClient().Get(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "V2", "storageTemplate", 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 = armblueprint.PublishedArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.TemplateArtifact{
	// 		Name: to.Ptr("storageTemplate"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/storageTemplate"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
	// 		Properties: &armblueprint.TemplateArtifactProperties{
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"storageAccountType": &armblueprint.ParameterValue{
	// 					Value: "[parameters('storageAccountType')]",
	// 				},
	// 			},
	// 			ResourceGroup: to.Ptr("storageRG"),
	// 			Template: map[string]any{
	// 				"contentVersion": "1.0.0.0",
	// 				"outputs":map[string]any{
	// 					"storageAccountName":map[string]any{
	// 						"type": "string",
	// 						"value": "[variables('storageAccountName')]",
	// 					},
	// 				},
	// 				"parameters":map[string]any{
	// 					"storageAccountType":map[string]any{
	// 						"type": "string",
	// 						"allowedValues":[]any{
	// 							"Standard_LRS",
	// 							"Standard_GRS",
	// 							"Standard_ZRS",
	// 							"Premium_LRS",
	// 						},
	// 						"defaultValue": "Standard_LRS",
	// 						"metadata":map[string]any{
	// 							"description": "Storage Account type",
	// 						},
	// 					},
	// 				},
	// 				"resources":[]any{
	// 					map[string]any{
	// 						"name": "[variables('storageAccountName')]",
	// 						"type": "Microsoft.Storage/storageAccounts",
	// 						"apiVersion": "2016-01-01",
	// 						"kind": "Storage",
	// 						"location": "[resourceGroup().location]",
	// 						"properties":map[string]any{
	// 						},
	// 						"sku":map[string]any{
	// 							"name": "[parameters('storageAccountType')]",
	// 						},
	// 					},
	// 				},
	// 				"variables":map[string]any{
	// 					"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
	// 				},
	// 			},
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (SubPolicyAssignmentArtifact)

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/SealedPolicyAssignmentArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedArtifactsClient().Get(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "V2", "costCenterPolicy", 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 = armblueprint.PublishedArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.PolicyAssignmentArtifact{
	// 		Name: to.Ptr("costCenterPolicy"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/costCenterPolicy"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
	// 		Properties: &armblueprint.PolicyAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("force costCenter tag on all resources"),
	// 			Parameters: map[string]*armblueprint.ParameterValue{
	// 				"tagName": &armblueprint.ParameterValue{
	// 					Value: "costCenter",
	// 				},
	// 				"tagValue": &armblueprint.ParameterValue{
	// 					Value: "[parameter('costCenter')]",
	// 				},
	// 			},
	// 			PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (SubRoleAssignmentArtifact)

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/SealedRoleAssignmentArtifact_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedArtifactsClient().Get(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "V2", "ownerAssignment", 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 = armblueprint.PublishedArtifactsClientGetResponse{
	// 	                            ArtifactClassification: &armblueprint.RoleAssignmentArtifact{
	// 		Name: to.Ptr("ownerAssignment"),
	// 		Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/ownerAssignment"),
	// 		Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
	// 		Properties: &armblueprint.RoleAssignmentArtifactProperties{
	// 			DisplayName: to.Ptr("enforce owners of given subscription"),
	// 			PrincipalIDs: "[parameters('owners')]",
	// 			RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
	// 		},
	// 	},
	// 	                        }
}
Output:

func (*PublishedArtifactsClient) NewListPager added in v0.4.0

func (client *PublishedArtifactsClient) NewListPager(resourceScope string, blueprintName string, versionID string, options *PublishedArtifactsClientListOptions) *runtime.Pager[PublishedArtifactsClientListResponse]

NewListPager - List artifacts for a version of a published blueprint definition.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • versionID - Version of the published blueprint definition.
  • options - PublishedArtifactsClientListOptions contains the optional parameters for the PublishedArtifactsClient.NewListPager method.
Example (MgArtifactList)

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/SealedArtifact_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedArtifactsClient().NewListPager("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "V2", 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.ArtifactList = armblueprint.ArtifactList{
		// 	Value: []armblueprint.ArtifactClassification{
		// 		&armblueprint.RoleAssignmentArtifact{
		// 			Name: to.Ptr("ownerAssignment"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/ownerAssignment"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
		// 			Properties: &armblueprint.RoleAssignmentArtifactProperties{
		// 				DisplayName: to.Ptr("enforce owners of given subscription"),
		// 				PrincipalIDs: "[parameters('owners')]",
		// 				RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 			},
		// 		},
		// 		&armblueprint.PolicyAssignmentArtifact{
		// 			Name: to.Ptr("costCenterPolicy"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/costCenterPolicy"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
		// 			Properties: &armblueprint.PolicyAssignmentArtifactProperties{
		// 				DisplayName: to.Ptr("force costCenter tag on all resources"),
		// 				Parameters: map[string]*armblueprint.ParameterValue{
		// 					"tagName": &armblueprint.ParameterValue{
		// 						Value: "costCenter",
		// 					},
		// 					"tagValue": &armblueprint.ParameterValue{
		// 						Value: "[parameter('costCenter')]",
		// 					},
		// 				},
		// 				PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
		// 			},
		// 		},
		// 		&armblueprint.TemplateArtifact{
		// 			Name: to.Ptr("storageTemplate"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/storageTemplate"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
		// 			Properties: &armblueprint.TemplateArtifactProperties{
		// 				Parameters: map[string]*armblueprint.ParameterValue{
		// 					"storageAccountType": &armblueprint.ParameterValue{
		// 						Value: "[parameters('storageAccountType')]",
		// 					},
		// 				},
		// 				ResourceGroup: to.Ptr("storageRG"),
		// 				Template: map[string]any{
		// 					"contentVersion": "1.0.0.0",
		// 					"outputs":map[string]any{
		// 						"storageAccountName":map[string]any{
		// 							"type": "string",
		// 							"value": "[variables('storageAccountName')]",
		// 						},
		// 					},
		// 					"parameters":map[string]any{
		// 						"storageAccountType":map[string]any{
		// 							"type": "string",
		// 							"allowedValues":[]any{
		// 								"Standard_LRS",
		// 								"Standard_GRS",
		// 								"Standard_ZRS",
		// 								"Premium_LRS",
		// 							},
		// 							"defaultValue": "Standard_LRS",
		// 							"metadata":map[string]any{
		// 								"description": "Storage Account type",
		// 							},
		// 						},
		// 					},
		// 					"resources":[]any{
		// 						map[string]any{
		// 							"name": "[variables('storageAccountName')]",
		// 							"type": "Microsoft.Storage/storageAccounts",
		// 							"apiVersion": "2016-01-01",
		// 							"kind": "Storage",
		// 							"location": "[resourceGroup().location]",
		// 							"properties":map[string]any{
		// 							},
		// 							"sku":map[string]any{
		// 								"name": "[parameters('storageAccountType')]",
		// 							},
		// 						},
		// 					},
		// 					"variables":map[string]any{
		// 						"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (SubArtifactList)

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/SealedArtifact_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedArtifactsClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "V2", 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.ArtifactList = armblueprint.ArtifactList{
		// 	Value: []armblueprint.ArtifactClassification{
		// 		&armblueprint.RoleAssignmentArtifact{
		// 			Name: to.Ptr("ownerAssignment"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/ownerAssignment"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindRoleAssignment),
		// 			Properties: &armblueprint.RoleAssignmentArtifactProperties{
		// 				DisplayName: to.Ptr("enforce owners of given subscription"),
		// 				PrincipalIDs: "[parameters('owners')]",
		// 				RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 			},
		// 		},
		// 		&armblueprint.PolicyAssignmentArtifact{
		// 			Name: to.Ptr("costCenterPolicy"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/costCenterPolicy"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindPolicyAssignment),
		// 			Properties: &armblueprint.PolicyAssignmentArtifactProperties{
		// 				DisplayName: to.Ptr("force costCenter tag on all resources"),
		// 				Parameters: map[string]*armblueprint.ParameterValue{
		// 					"tagName": &armblueprint.ParameterValue{
		// 						Value: "costCenter",
		// 					},
		// 					"tagValue": &armblueprint.ParameterValue{
		// 						Value: "[parameter('costCenter')]",
		// 					},
		// 				},
		// 				PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
		// 			},
		// 		},
		// 		&armblueprint.TemplateArtifact{
		// 			Name: to.Ptr("storageTemplate"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/versions/artifacts"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts/storageTemplate"),
		// 			Kind: to.Ptr(armblueprint.ArtifactKindTemplate),
		// 			Properties: &armblueprint.TemplateArtifactProperties{
		// 				Parameters: map[string]*armblueprint.ParameterValue{
		// 					"storageAccountType": &armblueprint.ParameterValue{
		// 						Value: "[parameters('storageAccountType')]",
		// 					},
		// 				},
		// 				ResourceGroup: to.Ptr("storageRG"),
		// 				Template: map[string]any{
		// 					"contentVersion": "1.0.0.0",
		// 					"outputs":map[string]any{
		// 						"storageAccountName":map[string]any{
		// 							"type": "string",
		// 							"value": "[variables('storageAccountName')]",
		// 						},
		// 					},
		// 					"parameters":map[string]any{
		// 						"storageAccountType":map[string]any{
		// 							"type": "string",
		// 							"allowedValues":[]any{
		// 								"Standard_LRS",
		// 								"Standard_GRS",
		// 								"Standard_ZRS",
		// 								"Premium_LRS",
		// 							},
		// 							"defaultValue": "Standard_LRS",
		// 							"metadata":map[string]any{
		// 								"description": "Storage Account type",
		// 							},
		// 						},
		// 					},
		// 					"resources":[]any{
		// 						map[string]any{
		// 							"name": "[variables('storageAccountName')]",
		// 							"type": "Microsoft.Storage/storageAccounts",
		// 							"apiVersion": "2016-01-01",
		// 							"kind": "Storage",
		// 							"location": "[resourceGroup().location]",
		// 							"properties":map[string]any{
		// 							},
		// 							"sku":map[string]any{
		// 								"name": "[parameters('storageAccountType')]",
		// 							},
		// 						},
		// 					},
		// 					"variables":map[string]any{
		// 						"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type PublishedArtifactsClientGetOptions added in v0.2.0

type PublishedArtifactsClientGetOptions struct {
}

PublishedArtifactsClientGetOptions contains the optional parameters for the PublishedArtifactsClient.Get method.

type PublishedArtifactsClientGetResponse added in v0.2.0

type PublishedArtifactsClientGetResponse struct {
	// Represents a blueprint artifact.
	ArtifactClassification
}

PublishedArtifactsClientGetResponse contains the response from method PublishedArtifactsClient.Get.

func (*PublishedArtifactsClientGetResponse) UnmarshalJSON added in v0.3.0

func (p *PublishedArtifactsClientGetResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PublishedArtifactsClientGetResponse.

type PublishedArtifactsClientListOptions added in v0.2.0

type PublishedArtifactsClientListOptions struct {
}

PublishedArtifactsClientListOptions contains the optional parameters for the PublishedArtifactsClient.NewListPager method.

type PublishedArtifactsClientListResponse added in v0.2.0

type PublishedArtifactsClientListResponse struct {
	// List of blueprint artifacts.
	ArtifactList
}

PublishedArtifactsClientListResponse contains the response from method PublishedArtifactsClient.NewListPager.

type PublishedBlueprint

type PublishedBlueprint struct {
	// REQUIRED; Detailed properties for published blueprint.
	Properties *PublishedBlueprintProperties

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Name of this resource.
	Name *string

	// READ-ONLY; Type of this resource.
	Type *string
}

PublishedBlueprint - Represents a published blueprint.

func (PublishedBlueprint) MarshalJSON

func (p PublishedBlueprint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PublishedBlueprint.

func (*PublishedBlueprint) UnmarshalJSON

func (p *PublishedBlueprint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PublishedBlueprint.

type PublishedBlueprintList

type PublishedBlueprintList struct {
	// List of published blueprint definitions.
	Value []*PublishedBlueprint

	// READ-ONLY; Link to the next page of results.
	NextLink *string
}

PublishedBlueprintList - List of published blueprint definitions.

func (PublishedBlueprintList) MarshalJSON

func (p PublishedBlueprintList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PublishedBlueprintList.

func (*PublishedBlueprintList) UnmarshalJSON added in v0.6.0

func (p *PublishedBlueprintList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PublishedBlueprintList.

type PublishedBlueprintProperties

type PublishedBlueprintProperties struct {
	// Name of the published blueprint definition.
	BlueprintName *string

	// Version-specific change notes.
	ChangeNotes *string

	// Multi-line explain this resource.
	Description *string

	// One-liner string explain this resource.
	DisplayName *string

	// Parameters required by this blueprint definition.
	Parameters map[string]*ParameterDefinition

	// Resource group placeholders defined by this blueprint definition.
	ResourceGroups map[string]*ResourceGroupDefinition

	// The scope where this blueprint definition can be assigned.
	TargetScope *BlueprintTargetScope

	// READ-ONLY; Status of the blueprint. This field is readonly.
	Status *Status
}

PublishedBlueprintProperties - Schema for published blueprint definition properties.

func (PublishedBlueprintProperties) MarshalJSON

func (p PublishedBlueprintProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PublishedBlueprintProperties.

func (*PublishedBlueprintProperties) UnmarshalJSON added in v0.6.0

func (p *PublishedBlueprintProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PublishedBlueprintProperties.

type PublishedBlueprintsClient

type PublishedBlueprintsClient struct {
	// contains filtered or unexported fields
}

PublishedBlueprintsClient contains the methods for the PublishedBlueprints group. Don't use this type directly, use NewPublishedBlueprintsClient() instead.

func NewPublishedBlueprintsClient

func NewPublishedBlueprintsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PublishedBlueprintsClient, error)

NewPublishedBlueprintsClient creates a new instance of PublishedBlueprintsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PublishedBlueprintsClient) Create

Create - Publish a new version of the blueprint definition with the latest artifacts. Published blueprint definitions are immutable. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • versionID - Version of the published blueprint definition.
  • options - PublishedBlueprintsClientCreateOptions contains the optional parameters for the PublishedBlueprintsClient.Create method.
Example (PublishedManagementGroupBlueprintPublish)

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/SealedBlueprint_Publish.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewPublishedBlueprintsClient().Create(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "v2", &armblueprint.PublishedBlueprintsClientCreateOptions{PublishedBlueprint: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (PublishedSubscriptionBlueprintPublish)

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/SealedBlueprint_Publish.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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)
	}
	_, err = clientFactory.NewPublishedBlueprintsClient().Create(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "v2", &armblueprint.PublishedBlueprintsClientCreateOptions{PublishedBlueprint: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*PublishedBlueprintsClient) Delete

Delete - Delete a published version of a blueprint definition. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • versionID - Version of the published blueprint definition.
  • options - PublishedBlueprintsClientDeleteOptions contains the optional parameters for the PublishedBlueprintsClient.Delete method.
Example (PublishedManagementGroupBlueprint)

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/SealedBlueprint_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedBlueprintsClient().Delete(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "v2", 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.PublishedBlueprint = armblueprint.PublishedBlueprint{
	// 	Name: to.Ptr("v2"),
	// 	Type: to.Ptr("Microsoft.Blueprint/blueprints/versions"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
	// 	Properties: &armblueprint.PublishedBlueprintProperties{
	// 		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),
	// 		BlueprintName: to.Ptr("simpleBlueprint"),
	// 	},
	// }
}
Output:

Example (PublishedSubscriptionBlueprint)

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/SealedBlueprint_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedBlueprintsClient().Delete(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "v2", 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.PublishedBlueprint = armblueprint.PublishedBlueprint{
	// 	Name: to.Ptr("v2"),
	// 	Type: to.Ptr("Microsoft.Blueprint/blueprints/versions"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
	// 	Properties: &armblueprint.PublishedBlueprintProperties{
	// 		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),
	// 		BlueprintName: to.Ptr("simpleBlueprint"),
	// 	},
	// }
}
Output:

func (*PublishedBlueprintsClient) Get

Get - Get a published version of a blueprint definition. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • versionID - Version of the published blueprint definition.
  • options - PublishedBlueprintsClientGetOptions contains the optional parameters for the PublishedBlueprintsClient.Get method.
Example (PublishedManagementGroupBlueprint)

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/SealedBlueprint_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedBlueprintsClient().Get(ctx, "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", "v2", 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.PublishedBlueprint = armblueprint.PublishedBlueprint{
	// 	Name: to.Ptr("v2"),
	// 	Type: to.Ptr("Microsoft.Blueprint/blueprints/versions"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
	// 	Properties: &armblueprint.PublishedBlueprintProperties{
	// 		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),
	// 		BlueprintName: to.Ptr("simpleBlueprint"),
	// 	},
	// }
}
Output:

Example (PublishedSubscriptionBlueprint)

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/SealedBlueprint_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedBlueprintsClient().Get(ctx, "subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", "v2", 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.PublishedBlueprint = armblueprint.PublishedBlueprint{
	// 	Name: to.Ptr("v2"),
	// 	Type: to.Ptr("Microsoft.Blueprint/blueprints/versions"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
	// 	Properties: &armblueprint.PublishedBlueprintProperties{
	// 		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),
	// 		BlueprintName: to.Ptr("simpleBlueprint"),
	// 	},
	// }
}
Output:

func (*PublishedBlueprintsClient) NewListPager added in v0.4.0

NewListPager - List published versions of given blueprint definition.

Generated from API version 2018-11-01-preview

  • resourceScope - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
  • blueprintName - Name of the blueprint definition.
  • options - PublishedBlueprintsClientListOptions contains the optional parameters for the PublishedBlueprintsClient.NewListPager method.
Example (PublishedManagementGroupBlueprint)

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/SealedBlueprint_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedBlueprintsClient().NewListPager("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup", "simpleBlueprint", 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.PublishedBlueprintList = armblueprint.PublishedBlueprintList{
		// 	Value: []*armblueprint.PublishedBlueprint{
		// 		{
		// 			Name: to.Ptr("v1"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/versions"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/v1"),
		// 			Properties: &armblueprint.PublishedBlueprintProperties{
		// 				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),
		// 				BlueprintName: to.Ptr("simpleBlueprint"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (PublishedSubscriptionBlueprint)

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/SealedBlueprint_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blueprint/armblueprint"
)

func main() {
	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.NewPublishedBlueprintsClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000", "simpleBlueprint", 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.PublishedBlueprintList = armblueprint.PublishedBlueprintList{
		// 	Value: []*armblueprint.PublishedBlueprint{
		// 		{
		// 			Name: to.Ptr("v1"),
		// 			Type: to.Ptr("Microsoft.Blueprint/blueprints/versions"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/v1"),
		// 			Properties: &armblueprint.PublishedBlueprintProperties{
		// 				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),
		// 				BlueprintName: to.Ptr("simpleBlueprint"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type PublishedBlueprintsClientCreateOptions added in v0.2.0

type PublishedBlueprintsClientCreateOptions struct {
	// Published Blueprint to create or update.
	PublishedBlueprint *PublishedBlueprint
}

PublishedBlueprintsClientCreateOptions contains the optional parameters for the PublishedBlueprintsClient.Create method.

type PublishedBlueprintsClientCreateResponse added in v0.2.0

type PublishedBlueprintsClientCreateResponse struct {
	// Represents a published blueprint.
	PublishedBlueprint
}

PublishedBlueprintsClientCreateResponse contains the response from method PublishedBlueprintsClient.Create.

type PublishedBlueprintsClientDeleteOptions added in v0.2.0

type PublishedBlueprintsClientDeleteOptions struct {
}

PublishedBlueprintsClientDeleteOptions contains the optional parameters for the PublishedBlueprintsClient.Delete method.

type PublishedBlueprintsClientDeleteResponse added in v0.2.0

type PublishedBlueprintsClientDeleteResponse struct {
	// Represents a published blueprint.
	PublishedBlueprint
}

PublishedBlueprintsClientDeleteResponse contains the response from method PublishedBlueprintsClient.Delete.

type PublishedBlueprintsClientGetOptions added in v0.2.0

type PublishedBlueprintsClientGetOptions struct {
}

PublishedBlueprintsClientGetOptions contains the optional parameters for the PublishedBlueprintsClient.Get method.

type PublishedBlueprintsClientGetResponse added in v0.2.0

type PublishedBlueprintsClientGetResponse struct {
	// Represents a published blueprint.
	PublishedBlueprint
}

PublishedBlueprintsClientGetResponse contains the response from method PublishedBlueprintsClient.Get.

type PublishedBlueprintsClientListOptions added in v0.2.0

type PublishedBlueprintsClientListOptions struct {
}

PublishedBlueprintsClientListOptions contains the optional parameters for the PublishedBlueprintsClient.NewListPager method.

type PublishedBlueprintsClientListResponse added in v0.2.0

type PublishedBlueprintsClientListResponse struct {
	// List of published blueprint definitions.
	PublishedBlueprintList
}

PublishedBlueprintsClientListResponse contains the response from method PublishedBlueprintsClient.NewListPager.

type ResourceGroupDefinition

type ResourceGroupDefinition struct {
	// Artifacts which need to be deployed before this resource group.
	DependsOn []*string

	// Location of this resourceGroup. Leave empty if the resource group location will be specified during the blueprint assignment.
	Location *string

	// User-friendly properties for this resource group.
	Metadata *ParameterDefinitionMetadata

	// Name of this resourceGroup. Leave empty if the resource group name will be specified during the blueprint assignment.
	Name *string

	// Tags to be assigned to this resource group.
	Tags map[string]*string
}

ResourceGroupDefinition - Represents an Azure resource group in a blueprint definition.

func (ResourceGroupDefinition) MarshalJSON

func (r ResourceGroupDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceGroupDefinition.

func (*ResourceGroupDefinition) UnmarshalJSON added in v0.6.0

func (r *ResourceGroupDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGroupDefinition.

type ResourceGroupValue

type ResourceGroupValue struct {
	// Location of the resource group.
	Location *string

	// Name of the resource group.
	Name *string
}

ResourceGroupValue - Represents an Azure resource group.

func (ResourceGroupValue) MarshalJSON added in v0.6.0

func (r ResourceGroupValue) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceGroupValue.

func (*ResourceGroupValue) UnmarshalJSON added in v0.6.0

func (r *ResourceGroupValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGroupValue.

type ResourceProviderOperation

type ResourceProviderOperation struct {
	// Display metadata associated with the operation.
	Display *ResourceProviderOperationDisplay

	// Operation name, in format of {provider}/{resource}/{operation}
	Name *string
}

ResourceProviderOperation - Supported operations of this resource provider.

func (ResourceProviderOperation) MarshalJSON added in v0.6.0

func (r ResourceProviderOperation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperation.

func (*ResourceProviderOperation) UnmarshalJSON added in v0.6.0

func (r *ResourceProviderOperation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperation.

type ResourceProviderOperationDisplay

type ResourceProviderOperationDisplay struct {
	// Description of this operation.
	Description *string

	// Type of operation: get, read, delete, etc.
	Operation *string

	// Resource provider: Microsoft Blueprint.
	Provider *string

	// Resource on which the operation is performed.
	Resource *string
}

ResourceProviderOperationDisplay - Display metadata associated with the operation.

func (ResourceProviderOperationDisplay) MarshalJSON added in v0.6.0

func (r ResourceProviderOperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperationDisplay.

func (*ResourceProviderOperationDisplay) UnmarshalJSON added in v0.6.0

func (r *ResourceProviderOperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperationDisplay.

type ResourceProviderOperationList

type ResourceProviderOperationList struct {
	// List of operations supported by this resource provider.
	Value []*ResourceProviderOperation
}

ResourceProviderOperationList - Results of the request to list operations.

func (ResourceProviderOperationList) MarshalJSON

func (r ResourceProviderOperationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperationList.

func (*ResourceProviderOperationList) UnmarshalJSON added in v0.6.0

func (r *ResourceProviderOperationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperationList.

type ResourceStatusBase added in v0.2.0

type ResourceStatusBase struct {
	// READ-ONLY; Last modified time of this blueprint definition.
	LastModified *time.Time

	// READ-ONLY; Creation time of this blueprint definition.
	TimeCreated *time.Time
}

ResourceStatusBase - Shared status properties between all blueprint resources.

func (ResourceStatusBase) MarshalJSON added in v0.2.0

func (r ResourceStatusBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceStatusBase.

func (*ResourceStatusBase) UnmarshalJSON added in v0.2.0

func (r *ResourceStatusBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceStatusBase.

type RoleAssignmentArtifact

type RoleAssignmentArtifact struct {
	// REQUIRED; Specifies the kind of blueprint artifact.
	Kind *ArtifactKind

	// REQUIRED; Properties for a Role assignment blueprint artifact.
	Properties *RoleAssignmentArtifactProperties

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Name of this resource.
	Name *string

	// READ-ONLY; Type of this resource.
	Type *string
}

RoleAssignmentArtifact - Blueprint artifact that applies a Role assignment.

func (*RoleAssignmentArtifact) GetArtifact added in v0.2.0

func (r *RoleAssignmentArtifact) GetArtifact() *Artifact

GetArtifact implements the ArtifactClassification interface for type RoleAssignmentArtifact.

func (RoleAssignmentArtifact) MarshalJSON

func (r RoleAssignmentArtifact) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentArtifact.

func (*RoleAssignmentArtifact) UnmarshalJSON

func (r *RoleAssignmentArtifact) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentArtifact.

type RoleAssignmentArtifactProperties

type RoleAssignmentArtifactProperties struct {
	// REQUIRED; Array of user or group identities in Azure Active Directory. The roleDefinition will apply to each identity.
	PrincipalIDs any

	// REQUIRED; Azure resource ID of the RoleDefinition.
	RoleDefinitionID *string

	// Artifacts which need to be deployed before the specified artifact.
	DependsOn []*string

	// Multi-line explain this resource.
	Description *string

	// One-liner string explain this resource.
	DisplayName *string

	// RoleAssignment will be scope to this resourceGroup. If empty, it scopes to the subscription.
	ResourceGroup *string
}

RoleAssignmentArtifactProperties - Properties of a Role assignment blueprint artifact.

func (RoleAssignmentArtifactProperties) MarshalJSON

func (r RoleAssignmentArtifactProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentArtifactProperties.

func (*RoleAssignmentArtifactProperties) UnmarshalJSON added in v0.6.0

func (r *RoleAssignmentArtifactProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentArtifactProperties.

type SecretValueReference

type SecretValueReference struct {
	// REQUIRED; Specifies the reference to a given Azure Key Vault.
	KeyVault *KeyVaultReference

	// REQUIRED; Name of the secret.
	SecretName *string

	// The version of the secret to use. If left blank, the latest version of the secret is used.
	SecretVersion *string
}

SecretValueReference - Reference to a Key Vault secret.

func (SecretValueReference) MarshalJSON added in v0.6.0

func (s SecretValueReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecretValueReference.

func (*SecretValueReference) UnmarshalJSON added in v0.6.0

func (s *SecretValueReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecretValueReference.

type Status added in v0.2.0

type Status struct {
	// READ-ONLY; Last modified time of this blueprint definition.
	LastModified *time.Time

	// READ-ONLY; Creation time of this blueprint definition.
	TimeCreated *time.Time
}

Status - The status of the blueprint. This field is readonly.

func (Status) MarshalJSON added in v0.2.0

func (s Status) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Status.

func (*Status) UnmarshalJSON added in v0.2.0

func (s *Status) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Status.

type TemplateArtifact

type TemplateArtifact struct {
	// REQUIRED; Specifies the kind of blueprint artifact.
	Kind *ArtifactKind

	// REQUIRED; Properties for a Resource Manager template blueprint artifact.
	Properties *TemplateArtifactProperties

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Name of this resource.
	Name *string

	// READ-ONLY; Type of this resource.
	Type *string
}

TemplateArtifact - Blueprint artifact that deploys a Resource Manager template.

func (*TemplateArtifact) GetArtifact added in v0.2.0

func (t *TemplateArtifact) GetArtifact() *Artifact

GetArtifact implements the ArtifactClassification interface for type TemplateArtifact.

func (TemplateArtifact) MarshalJSON

func (t TemplateArtifact) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TemplateArtifact.

func (*TemplateArtifact) UnmarshalJSON

func (t *TemplateArtifact) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TemplateArtifact.

type TemplateArtifactProperties

type TemplateArtifactProperties struct {
	// REQUIRED; Resource Manager template blueprint artifact parameter values.
	Parameters map[string]*ParameterValue

	// REQUIRED; The Resource Manager template blueprint artifact body.
	Template any

	// Artifacts which need to be deployed before the specified artifact.
	DependsOn []*string

	// Multi-line explain this resource.
	Description *string

	// One-liner string explain this resource.
	DisplayName *string

	// If applicable, the name of the resource group placeholder to which the Resource Manager template blueprint artifact will
	// be deployed.
	ResourceGroup *string
}

TemplateArtifactProperties - Properties of a Resource Manager template blueprint artifact.

func (TemplateArtifactProperties) MarshalJSON

func (t TemplateArtifactProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TemplateArtifactProperties.

func (*TemplateArtifactProperties) UnmarshalJSON added in v0.6.0

func (t *TemplateArtifactProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TemplateArtifactProperties.

type TemplateParameterType

type TemplateParameterType string

TemplateParameterType - Allowed data types for Resource Manager template parameters.

const (
	TemplateParameterTypeArray        TemplateParameterType = "array"
	TemplateParameterTypeBool         TemplateParameterType = "bool"
	TemplateParameterTypeInt          TemplateParameterType = "int"
	TemplateParameterTypeObject       TemplateParameterType = "object"
	TemplateParameterTypeSecureObject TemplateParameterType = "secureObject"
	TemplateParameterTypeSecureString TemplateParameterType = "secureString"
	TemplateParameterTypeString       TemplateParameterType = "string"
)

func PossibleTemplateParameterTypeValues

func PossibleTemplateParameterTypeValues() []TemplateParameterType

PossibleTemplateParameterTypeValues returns the possible values for the TemplateParameterType const type.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The location of this blueprint assignment.
	Location *string

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Name of this resource.
	Name *string

	// READ-ONLY; Type of this resource.
	Type *string
}

TrackedResource - Common properties for all Azure tracked resources.

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON

func (t *TrackedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// Client App Id associated with this identity.
	ClientID *string

	// Azure Active Directory principal ID associated with this Identity.
	PrincipalID *string
}

UserAssignedIdentity - User-assigned managed identity.

func (UserAssignedIdentity) MarshalJSON added in v0.6.0

func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON added in v0.6.0

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type WhoIsBlueprintContract

type WhoIsBlueprintContract struct {
	// AAD object Id of the Azure Blueprints service principal in the tenant.
	ObjectID *string
}

WhoIsBlueprintContract - Response schema for querying the Azure Blueprints service principal in the tenant.

func (WhoIsBlueprintContract) MarshalJSON added in v0.6.0

func (w WhoIsBlueprintContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WhoIsBlueprintContract.

func (*WhoIsBlueprintContract) UnmarshalJSON added in v0.6.0

func (w *WhoIsBlueprintContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WhoIsBlueprintContract.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL