armdeploymentstacks

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 15 Imported by: 3

README

Azure Resources Module for Go

PkgGoDev

The armdeploymentstacks module provides operations for working with Azure Resources.

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 Resources module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Resources. 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 Resources 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 := armdeploymentstacks.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 := armdeploymentstacks.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.NewClient()

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 Resources 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 ActionOnUnmanage added in v1.0.0

type ActionOnUnmanage struct {
	// REQUIRED; Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach
	// will leave the resource in it's current state.
	Resources *DeploymentStacksDeleteDetachEnum

	// Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will
	// leave the resource in it's current state.
	ManagementGroups *DeploymentStacksDeleteDetachEnum

	// Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will
	// leave the resource in it's current state.
	ResourceGroups *DeploymentStacksDeleteDetachEnum
}

ActionOnUnmanage - Defines the behavior of resources that are no longer managed after the stack is updated or deleted.

func (ActionOnUnmanage) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ActionOnUnmanage.

func (*ActionOnUnmanage) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ActionOnUnmanage.

type Client

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

Client contains the methods for the DeploymentStacks group. Don't use this type directly, use NewClient() instead.

func NewClient

func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)

NewClient creates a new instance of Client with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*Client) BeginCreateOrUpdateAtManagementGroup

func (client *Client) BeginCreateOrUpdateAtManagementGroup(ctx context.Context, managementGroupID string, deploymentStackName string, deploymentStack DeploymentStack, options *ClientBeginCreateOrUpdateAtManagementGroupOptions) (*runtime.Poller[ClientCreateOrUpdateAtManagementGroupResponse], error)

BeginCreateOrUpdateAtManagementGroup - Creates or updates a Deployment stack at Management Group scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • managementGroupID - Management Group id.
  • deploymentStackName - Name of the deployment stack.
  • deploymentStack - Deployment stack supplied to the operation.
  • options - ClientBeginCreateOrUpdateAtManagementGroupOptions contains the optional parameters for the Client.BeginCreateOrUpdateAtManagementGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupCreate.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/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdateAtManagementGroup(ctx, "myMg", "simpleDeploymentStack", armdeploymentstacks.DeploymentStack{
		Location: to.Ptr("eastus"),
		Properties: &armdeploymentstacks.DeploymentStackProperties{
			ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
				ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
				ResourceGroups:   to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
				Resources:        to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
			},
			DenySettings: &armdeploymentstacks.DenySettings{
				ApplyToChildScopes: to.Ptr(false),
				ExcludedActions: []*string{
					to.Ptr("action")},
				ExcludedPrincipals: []*string{
					to.Ptr("principal")},
				Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
			},
			Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
				"parameter1": {
					Value: "a string",
				},
			},
		},
		Tags: map[string]*string{
			"tagkey": to.Ptr("tagVal"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %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.DeploymentStack = armdeploymentstacks.DeploymentStack{
	// 	Name: to.Ptr("simpleDeploymentStack"),
	// 	Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
	// 	SystemData: &armdeploymentstacks.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armdeploymentstacks.DeploymentStackProperties{
	// 		Description: to.Ptr("my Description"),
	// 		ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
	// 			ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
	// 			ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 			Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 		},
	// 		DenySettings: &armdeploymentstacks.DenySettings{
	// 			ApplyToChildScopes: to.Ptr(false),
	// 			ExcludedActions: []*string{
	// 				to.Ptr("action")},
	// 				ExcludedPrincipals: []*string{
	// 					to.Ptr("principal")},
	// 					Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
	// 				},
	// 				Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
	// 					"parameter1": &armdeploymentstacks.DeploymentParameter{
	// 						Value: "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningState("Succeeded")),
	// 			},
	// 			Tags: map[string]*string{
	// 				"tagkey": to.Ptr("tagVal"),
	// 			},
	// 		}
}
Output:

func (*Client) BeginCreateOrUpdateAtResourceGroup

func (client *Client) BeginCreateOrUpdateAtResourceGroup(ctx context.Context, resourceGroupName string, deploymentStackName string, deploymentStack DeploymentStack, options *ClientBeginCreateOrUpdateAtResourceGroupOptions) (*runtime.Poller[ClientCreateOrUpdateAtResourceGroupResponse], error)

BeginCreateOrUpdateAtResourceGroup - Creates or updates a Deployment stack at Resource Group scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • deploymentStackName - Name of the deployment stack.
  • deploymentStack - Deployment stack supplied to the operation.
  • options - ClientBeginCreateOrUpdateAtResourceGroupOptions contains the optional parameters for the Client.BeginCreateOrUpdateAtResourceGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackResourceGroupCreate.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/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdateAtResourceGroup(ctx, "deploymentStacksRG", "simpleDeploymentStack", armdeploymentstacks.DeploymentStack{
		Location: to.Ptr("eastus"),
		Properties: &armdeploymentstacks.DeploymentStackProperties{
			ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
				ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
				ResourceGroups:   to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
				Resources:        to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
			},
			DenySettings: &armdeploymentstacks.DenySettings{
				ApplyToChildScopes: to.Ptr(false),
				ExcludedActions: []*string{
					to.Ptr("action")},
				ExcludedPrincipals: []*string{
					to.Ptr("principal")},
				Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
			},
			Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
				"parameter1": {
					Value: "a string",
				},
			},
		},
		Tags: map[string]*string{
			"tagkey": to.Ptr("tagVal"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %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.DeploymentStack = armdeploymentstacks.DeploymentStack{
	// 	Name: to.Ptr("simpleDeploymentStack"),
	// 	Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
	// 	SystemData: &armdeploymentstacks.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armdeploymentstacks.DeploymentStackProperties{
	// 		Description: to.Ptr("my Description"),
	// 		ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
	// 			ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
	// 			ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 			Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 		},
	// 		DenySettings: &armdeploymentstacks.DenySettings{
	// 			ApplyToChildScopes: to.Ptr(false),
	// 			ExcludedActions: []*string{
	// 				to.Ptr("action")},
	// 				ExcludedPrincipals: []*string{
	// 					to.Ptr("principal")},
	// 					Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
	// 				},
	// 				Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
	// 					"parameter1": &armdeploymentstacks.DeploymentParameter{
	// 						Value: "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningState("Succeeded")),
	// 			},
	// 			Tags: map[string]*string{
	// 				"tagkey": to.Ptr("tagVal"),
	// 			},
	// 		}
}
Output:

func (*Client) BeginCreateOrUpdateAtSubscription

func (client *Client) BeginCreateOrUpdateAtSubscription(ctx context.Context, deploymentStackName string, deploymentStack DeploymentStack, options *ClientBeginCreateOrUpdateAtSubscriptionOptions) (*runtime.Poller[ClientCreateOrUpdateAtSubscriptionResponse], error)

BeginCreateOrUpdateAtSubscription - Creates or updates a Deployment stack at Subscription scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • deploymentStackName - Name of the deployment stack.
  • deploymentStack - Deployment stack supplied to the operation.
  • options - ClientBeginCreateOrUpdateAtSubscriptionOptions contains the optional parameters for the Client.BeginCreateOrUpdateAtSubscription method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionCreate.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/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdateAtSubscription(ctx, "simpleDeploymentStack", armdeploymentstacks.DeploymentStack{
		Location: to.Ptr("eastus"),
		Properties: &armdeploymentstacks.DeploymentStackProperties{
			ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
				ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
				ResourceGroups:   to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
				Resources:        to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
			},
			DenySettings: &armdeploymentstacks.DenySettings{
				ApplyToChildScopes: to.Ptr(false),
				ExcludedActions: []*string{
					to.Ptr("action")},
				ExcludedPrincipals: []*string{
					to.Ptr("principal")},
				Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
			},
			Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
				"parameter1": {
					Value: "a string",
				},
			},
		},
		Tags: map[string]*string{
			"tagkey": to.Ptr("tagVal"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %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.DeploymentStack = armdeploymentstacks.DeploymentStack{
	// 	Name: to.Ptr("simpleDeploymentStack"),
	// 	Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
	// 	SystemData: &armdeploymentstacks.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armdeploymentstacks.DeploymentStackProperties{
	// 		Description: to.Ptr("my Description"),
	// 		ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
	// 			ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
	// 			ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 			Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 		},
	// 		DenySettings: &armdeploymentstacks.DenySettings{
	// 			ApplyToChildScopes: to.Ptr(false),
	// 			ExcludedActions: []*string{
	// 				to.Ptr("action")},
	// 				ExcludedPrincipals: []*string{
	// 					to.Ptr("principal")},
	// 					Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
	// 				},
	// 				Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
	// 					"parameter1": &armdeploymentstacks.DeploymentParameter{
	// 						Value: "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningState("Succeeded")),
	// 			},
	// 			Tags: map[string]*string{
	// 				"tagkey": to.Ptr("tagVal"),
	// 			},
	// 		}
}
Output:

func (*Client) BeginDeleteAtManagementGroup

func (client *Client) BeginDeleteAtManagementGroup(ctx context.Context, managementGroupID string, deploymentStackName string, options *ClientBeginDeleteAtManagementGroupOptions) (*runtime.Poller[ClientDeleteAtManagementGroupResponse], error)

BeginDeleteAtManagementGroup - Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned without content. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • managementGroupID - Management Group id.
  • deploymentStackName - Name of the deployment stack.
  • options - ClientBeginDeleteAtManagementGroupOptions contains the optional parameters for the Client.BeginDeleteAtManagementGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginDeleteAtManagementGroup(ctx, "myMg", "simpleDeploymentStack", &armdeploymentstacks.ClientBeginDeleteAtManagementGroupOptions{UnmanageActionResources: nil,
		UnmanageActionResourceGroups:   nil,
		UnmanageActionManagementGroups: nil,
		BypassStackOutOfSyncError:      nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*Client) BeginDeleteAtResourceGroup

func (client *Client) BeginDeleteAtResourceGroup(ctx context.Context, resourceGroupName string, deploymentStackName string, options *ClientBeginDeleteAtResourceGroupOptions) (*runtime.Poller[ClientDeleteAtResourceGroupResponse], error)

BeginDeleteAtResourceGroup - Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned without content. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • deploymentStackName - Name of the deployment stack.
  • options - ClientBeginDeleteAtResourceGroupOptions contains the optional parameters for the Client.BeginDeleteAtResourceGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackResourceGroupDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginDeleteAtResourceGroup(ctx, "deploymentStacksRG", "simpleDeploymentStack", &armdeploymentstacks.ClientBeginDeleteAtResourceGroupOptions{UnmanageActionResources: nil,
		UnmanageActionResourceGroups:   nil,
		UnmanageActionManagementGroups: nil,
		BypassStackOutOfSyncError:      nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*Client) BeginDeleteAtSubscription

func (client *Client) BeginDeleteAtSubscription(ctx context.Context, deploymentStackName string, options *ClientBeginDeleteAtSubscriptionOptions) (*runtime.Poller[ClientDeleteAtSubscriptionResponse], error)

BeginDeleteAtSubscription - Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned without content. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • deploymentStackName - Name of the deployment stack.
  • options - ClientBeginDeleteAtSubscriptionOptions contains the optional parameters for the Client.BeginDeleteAtSubscription method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginDeleteAtSubscription(ctx, "simpleDeploymentStack", &armdeploymentstacks.ClientBeginDeleteAtSubscriptionOptions{UnmanageActionResources: nil,
		UnmanageActionResourceGroups:   nil,
		UnmanageActionManagementGroups: nil,
		BypassStackOutOfSyncError:      nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*Client) BeginValidateStackAtManagementGroup added in v1.0.0

func (client *Client) BeginValidateStackAtManagementGroup(ctx context.Context, managementGroupID string, deploymentStackName string, deploymentStack DeploymentStack, options *ClientBeginValidateStackAtManagementGroupOptions) (*runtime.Poller[ClientValidateStackAtManagementGroupResponse], error)

BeginValidateStackAtManagementGroup - Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to Azure Resource Manager. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • managementGroupID - Management Group id.
  • deploymentStackName - Name of the deployment stack.
  • deploymentStack - Deployment stack to validate.
  • options - ClientBeginValidateStackAtManagementGroupOptions contains the optional parameters for the Client.BeginValidateStackAtManagementGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupValidate.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/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginValidateStackAtManagementGroup(ctx, "myMg", "simpleDeploymentStack", armdeploymentstacks.DeploymentStack{
		Location: to.Ptr("eastus"),
		Properties: &armdeploymentstacks.DeploymentStackProperties{
			ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
				ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
				ResourceGroups:   to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
				Resources:        to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
			},
			DenySettings: &armdeploymentstacks.DenySettings{
				ApplyToChildScopes: to.Ptr(false),
				ExcludedActions: []*string{
					to.Ptr("action")},
				ExcludedPrincipals: []*string{
					to.Ptr("principal")},
				Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
			},
			Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
				"parameter1": {
					Value: "a string",
				},
			},
			TemplateLink: &armdeploymentstacks.TemplateLink{
				URI: to.Ptr("https://example.com/exampleTemplate.json"),
			},
		},
		Tags: map[string]*string{
			"tagkey": to.Ptr("tagVal"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %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.DeploymentStackValidateResult = armdeploymentstacks.DeploymentStackValidateResult{
	// 	Name: to.Ptr("simpleDeploymentStack"),
	// 	Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
	// 	Properties: &armdeploymentstacks.DeploymentStackValidateProperties{
	// 		Description: to.Ptr("A validation description."),
	// 		CorrelationID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		DenySettings: &armdeploymentstacks.DenySettings{
	// 			ApplyToChildScopes: to.Ptr(false),
	// 			ExcludedActions: []*string{
	// 				to.Ptr("action")},
	// 				ExcludedPrincipals: []*string{
	// 					to.Ptr("principal")},
	// 					Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
	// 				},
	// 				DeploymentScope: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg"),
	// 				Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
	// 					"parameter1": &armdeploymentstacks.DeploymentParameter{
	// 						Type: to.Ptr("string"),
	// 						Value: "a string",
	// 					},
	// 				},
	// 				ValidatedResources: []*armdeploymentstacks.ResourceReference{
	// 					{
	// 						ID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Authorization/policyDefinitions/Policy1"),
	// 				}},
	// 			},
	// 		}
}
Output:

func (*Client) BeginValidateStackAtResourceGroup added in v1.0.0

func (client *Client) BeginValidateStackAtResourceGroup(ctx context.Context, resourceGroupName string, deploymentStackName string, deploymentStack DeploymentStack, options *ClientBeginValidateStackAtResourceGroupOptions) (*runtime.Poller[ClientValidateStackAtResourceGroupResponse], error)

BeginValidateStackAtResourceGroup - Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to Azure Resource Manager. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • deploymentStackName - Name of the deployment stack.
  • deploymentStack - Deployment stack to validate.
  • options - ClientBeginValidateStackAtResourceGroupOptions contains the optional parameters for the Client.BeginValidateStackAtResourceGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackResourceGroupValidate.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/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginValidateStackAtResourceGroup(ctx, "deploymentStacksRG", "simpleDeploymentStack", armdeploymentstacks.DeploymentStack{
		Properties: &armdeploymentstacks.DeploymentStackProperties{
			ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
				ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
				ResourceGroups:   to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
				Resources:        to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
			},
			DenySettings: &armdeploymentstacks.DenySettings{
				ApplyToChildScopes: to.Ptr(false),
				ExcludedActions: []*string{
					to.Ptr("action")},
				ExcludedPrincipals: []*string{
					to.Ptr("principal")},
				Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
			},
			Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
				"parameter1": {
					Value: "a string",
				},
			},
			TemplateLink: &armdeploymentstacks.TemplateLink{
				URI: to.Ptr("https://example.com/exampleTemplate.json"),
			},
		},
		Tags: map[string]*string{
			"tagkey": to.Ptr("tagVal"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %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.DeploymentStackValidateResult = armdeploymentstacks.DeploymentStackValidateResult{
	// 	Name: to.Ptr("simpleDeploymentStack"),
	// 	Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
	// 	Properties: &armdeploymentstacks.DeploymentStackValidateProperties{
	// 		Description: to.Ptr("A validation description."),
	// 		CorrelationID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		DenySettings: &armdeploymentstacks.DenySettings{
	// 			ApplyToChildScopes: to.Ptr(false),
	// 			ExcludedActions: []*string{
	// 				to.Ptr("action")},
	// 				ExcludedPrincipals: []*string{
	// 					to.Ptr("principal")},
	// 					Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
	// 				},
	// 				DeploymentScope: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG"),
	// 				Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
	// 					"parameter1": &armdeploymentstacks.DeploymentParameter{
	// 						Type: to.Ptr("string"),
	// 						Value: "a string",
	// 					},
	// 				},
	// 				ValidatedResources: []*armdeploymentstacks.ResourceReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Sql/servers/server1"),
	// 					},
	// 					{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Sql/servers/server2"),
	// 				}},
	// 			},
	// 		}
}
Output:

func (*Client) BeginValidateStackAtSubscription added in v1.0.0

func (client *Client) BeginValidateStackAtSubscription(ctx context.Context, deploymentStackName string, deploymentStack DeploymentStack, options *ClientBeginValidateStackAtSubscriptionOptions) (*runtime.Poller[ClientValidateStackAtSubscriptionResponse], error)

BeginValidateStackAtSubscription - Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure Resource Manager. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • deploymentStackName - Name of the deployment stack.
  • deploymentStack - Deployment stack to validate.
  • options - ClientBeginValidateStackAtSubscriptionOptions contains the optional parameters for the Client.BeginValidateStackAtSubscription method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionValidate.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/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginValidateStackAtSubscription(ctx, "simpleDeploymentStack", armdeploymentstacks.DeploymentStack{
		Location: to.Ptr("eastus"),
		Properties: &armdeploymentstacks.DeploymentStackProperties{
			ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
				ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
				ResourceGroups:   to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
				Resources:        to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
			},
			DenySettings: &armdeploymentstacks.DenySettings{
				ApplyToChildScopes: to.Ptr(false),
				ExcludedActions: []*string{
					to.Ptr("action")},
				ExcludedPrincipals: []*string{
					to.Ptr("principal")},
				Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
			},
			Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
				"parameter1": {
					Value: "a string",
				},
			},
			TemplateLink: &armdeploymentstacks.TemplateLink{
				URI: to.Ptr("https://example.com/exampleTemplate.json"),
			},
		},
		Tags: map[string]*string{
			"tagkey": to.Ptr("tagVal"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %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.DeploymentStackValidateResult = armdeploymentstacks.DeploymentStackValidateResult{
	// 	Name: to.Ptr("simpleDeploymentStack"),
	// 	Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
	// 	Properties: &armdeploymentstacks.DeploymentStackValidateProperties{
	// 		Description: to.Ptr("A validation description."),
	// 		CorrelationID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		DenySettings: &armdeploymentstacks.DenySettings{
	// 			ApplyToChildScopes: to.Ptr(false),
	// 			ExcludedActions: []*string{
	// 				to.Ptr("action")},
	// 				ExcludedPrincipals: []*string{
	// 					to.Ptr("principal")},
	// 					Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
	// 				},
	// 				DeploymentScope: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 				Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
	// 					"parameter1": &armdeploymentstacks.DeploymentParameter{
	// 						Type: to.Ptr("string"),
	// 						Value: "a string",
	// 					},
	// 				},
	// 				ValidatedResources: []*armdeploymentstacks.ResourceReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignment/roleassignment1"),
	// 				}},
	// 			},
	// 		}
}
Output:

func (*Client) ExportTemplateAtManagementGroup

func (client *Client) ExportTemplateAtManagementGroup(ctx context.Context, managementGroupID string, deploymentStackName string, options *ClientExportTemplateAtManagementGroupOptions) (ClientExportTemplateAtManagementGroupResponse, error)

ExportTemplateAtManagementGroup - Exports the template used to create the Deployment stack at Management Group scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • managementGroupID - Management Group id.
  • deploymentStackName - Name of the deployment stack.
  • options - ClientExportTemplateAtManagementGroupOptions contains the optional parameters for the Client.ExportTemplateAtManagementGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupExportTemplate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().ExportTemplateAtManagementGroup(ctx, "myMg", "simpleDeploymentStack", 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.DeploymentStackTemplateDefinition = armdeploymentstacks.DeploymentStackTemplateDefinition{
	// 	Template: map[string]any{
	// 		"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
	// 		"contentVersion": "1.0.0.0",
	// 		"functions":[]any{
	// 		},
	// 		"metadata":map[string]any{
	// 			"_generator":map[string]any{
	// 				"name": "bicep",
	// 				"templateHash": "1201162276450656794",
	// 				"version": "0.4.1008.15138",
	// 			},
	// 		},
	// 		"outputs":map[string]any{
	// 			"myOut":map[string]any{
	// 				"type": "int",
	// 				"value": float64(1),
	// 			},
	// 		},
	// 		"resources":[]any{
	// 		},
	// 	},
	// 	TemplateLink: &armdeploymentstacks.TemplateLink{
	// 		ID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/templateSpecs/templateSpec/versions/1.0"),
	// 	},
	// }
}
Output:

func (*Client) ExportTemplateAtResourceGroup

func (client *Client) ExportTemplateAtResourceGroup(ctx context.Context, resourceGroupName string, deploymentStackName string, options *ClientExportTemplateAtResourceGroupOptions) (ClientExportTemplateAtResourceGroupResponse, error)

ExportTemplateAtResourceGroup - Exports the template used to create the Deployment stack at Resource Group scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • deploymentStackName - Name of the deployment stack.
  • options - ClientExportTemplateAtResourceGroupOptions contains the optional parameters for the Client.ExportTemplateAtResourceGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackExportTemplate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().ExportTemplateAtResourceGroup(ctx, "deploymentStacksRG", "simpleDeploymentStack", 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.DeploymentStackTemplateDefinition = armdeploymentstacks.DeploymentStackTemplateDefinition{
	// 	Template: map[string]any{
	// 		"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
	// 		"contentVersion": "1.0.0.0",
	// 		"functions":[]any{
	// 		},
	// 		"metadata":map[string]any{
	// 			"_generator":map[string]any{
	// 				"name": "bicep",
	// 				"templateHash": "1201162276450656794",
	// 				"version": "0.4.1008.15138",
	// 			},
	// 		},
	// 		"outputs":map[string]any{
	// 			"myOut":map[string]any{
	// 				"type": "int",
	// 				"value": float64(1),
	// 			},
	// 		},
	// 		"resources":[]any{
	// 		},
	// 	},
	// 	TemplateLink: &armdeploymentstacks.TemplateLink{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/templateSpecs/templateSpec/versions/1.0"),
	// 	},
	// }
}
Output:

func (*Client) ExportTemplateAtSubscription

func (client *Client) ExportTemplateAtSubscription(ctx context.Context, deploymentStackName string, options *ClientExportTemplateAtSubscriptionOptions) (ClientExportTemplateAtSubscriptionResponse, error)

ExportTemplateAtSubscription - Exports the template used to create the Deployment stack at Subscription scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • deploymentStackName - Name of the deployment stack.
  • options - ClientExportTemplateAtSubscriptionOptions contains the optional parameters for the Client.ExportTemplateAtSubscription method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionExportTemplate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().ExportTemplateAtSubscription(ctx, "simpleDeploymentStack", 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.DeploymentStackTemplateDefinition = armdeploymentstacks.DeploymentStackTemplateDefinition{
	// 	Template: map[string]any{
	// 		"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
	// 		"contentVersion": "1.0.0.0",
	// 		"functions":[]any{
	// 		},
	// 		"metadata":map[string]any{
	// 			"_generator":map[string]any{
	// 				"name": "bicep",
	// 				"templateHash": "1201162276450656794",
	// 				"version": "0.4.1008.15138",
	// 			},
	// 		},
	// 		"outputs":map[string]any{
	// 			"myOut":map[string]any{
	// 				"type": "int",
	// 				"value": float64(1),
	// 			},
	// 		},
	// 		"resources":[]any{
	// 		},
	// 	},
	// 	TemplateLink: &armdeploymentstacks.TemplateLink{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Resources/templateSpecs/templateSpec/versions/1.0"),
	// 	},
	// }
}
Output:

func (*Client) GetAtManagementGroup

func (client *Client) GetAtManagementGroup(ctx context.Context, managementGroupID string, deploymentStackName string, options *ClientGetAtManagementGroupOptions) (ClientGetAtManagementGroupResponse, error)

GetAtManagementGroup - Gets a Deployment stack with a given name at Management Group scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • managementGroupID - Management Group id.
  • deploymentStackName - Name of the deployment stack.
  • options - ClientGetAtManagementGroupOptions contains the optional parameters for the Client.GetAtManagementGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().GetAtManagementGroup(ctx, "myMg", "simpleDeploymentStack", 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.DeploymentStack = armdeploymentstacks.DeploymentStack{
	// 	Name: to.Ptr("simpleDeploymentStack"),
	// 	Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
	// 	SystemData: &armdeploymentstacks.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armdeploymentstacks.DeploymentStackProperties{
	// 		Description: to.Ptr("my Description"),
	// 		ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
	// 			ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
	// 			ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 			Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 		},
	// 		DenySettings: &armdeploymentstacks.DenySettings{
	// 			ApplyToChildScopes: to.Ptr(false),
	// 			ExcludedActions: []*string{
	// 				to.Ptr("action")},
	// 				ExcludedPrincipals: []*string{
	// 					to.Ptr("principal")},
	// 					Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
	// 				},
	// 				DeploymentID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deployments/simpleDeploymentStack-20210301-3f41c"),
	// 				DeploymentScope: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg"),
	// 				Duration: to.Ptr("PT1D12H"),
	// 				Outputs: map[string]any{
	// 					"myOut": "myVal",
	// 				},
	// 				Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
	// 					"parameter1": &armdeploymentstacks.DeploymentParameter{
	// 						Value: "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningState("Succeeded")),
	// 				Resources: []*armdeploymentstacks.ManagedResourceReference{
	// 					{
	// 						ID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/templateSpecs/templateSpec/versions/1.0"),
	// 						DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
	// 						Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
	// 					},
	// 					{
	// 						ID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
	// 						DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
	// 						Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
	// 				}},
	// 			},
	// 			Tags: map[string]*string{
	// 				"tagkey": to.Ptr("tagVal"),
	// 			},
	// 		}
}
Output:

func (*Client) GetAtResourceGroup

func (client *Client) GetAtResourceGroup(ctx context.Context, resourceGroupName string, deploymentStackName string, options *ClientGetAtResourceGroupOptions) (ClientGetAtResourceGroupResponse, error)

GetAtResourceGroup - Gets a Deployment stack with a given name at Resource Group scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • deploymentStackName - Name of the deployment stack.
  • options - ClientGetAtResourceGroupOptions contains the optional parameters for the Client.GetAtResourceGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackResourceGroupGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().GetAtResourceGroup(ctx, "deploymentStacksRG", "simpleDeploymentStack", 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.DeploymentStack = armdeploymentstacks.DeploymentStack{
	// 	Name: to.Ptr("simpleDeploymentStack"),
	// 	Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
	// 	SystemData: &armdeploymentstacks.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armdeploymentstacks.DeploymentStackProperties{
	// 		Description: to.Ptr("my Description"),
	// 		ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
	// 			ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
	// 			ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 			Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 		},
	// 		DenySettings: &armdeploymentstacks.DenySettings{
	// 			ApplyToChildScopes: to.Ptr(false),
	// 			ExcludedActions: []*string{
	// 				to.Ptr("action")},
	// 				ExcludedPrincipals: []*string{
	// 					to.Ptr("principal")},
	// 					Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
	// 				},
	// 				DeploymentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deployments/simpleDeploymentStack-20210301-3f41c"),
	// 				DeploymentScope: to.Ptr("/subscriptions/00000000-1111-1111-1111-000000000000"),
	// 				Duration: to.Ptr("PT1D12H"),
	// 				Outputs: map[string]any{
	// 					"myOut": "myVal",
	// 				},
	// 				Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
	// 					"parameter1": &armdeploymentstacks.DeploymentParameter{
	// 						Value: "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningState("Succeeded")),
	// 				Resources: []*armdeploymentstacks.ManagedResourceReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/00000000-2222-2222-2222-000000000000/resourceGroups/templateSpecsRG/providers/Microsoft.Resources/templateSpecs/templateSpec/versions/1.0"),
	// 						DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
	// 						Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
	// 					},
	// 					{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
	// 						DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
	// 						Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
	// 				}},
	// 			},
	// 			Tags: map[string]*string{
	// 				"tagkey": to.Ptr("tagVal"),
	// 			},
	// 		}
}
Output:

func (*Client) GetAtSubscription

func (client *Client) GetAtSubscription(ctx context.Context, deploymentStackName string, options *ClientGetAtSubscriptionOptions) (ClientGetAtSubscriptionResponse, error)

GetAtSubscription - Gets a Deployment stack with a given name at Subscription scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • deploymentStackName - Name of the deployment stack.
  • options - ClientGetAtSubscriptionOptions contains the optional parameters for the Client.GetAtSubscription method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().GetAtSubscription(ctx, "simpleDeploymentStack", 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.DeploymentStack = armdeploymentstacks.DeploymentStack{
	// 	Name: to.Ptr("simpleDeploymentStack"),
	// 	Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
	// 	SystemData: &armdeploymentstacks.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armdeploymentstacks.DeploymentStackProperties{
	// 		Description: to.Ptr("my Description"),
	// 		ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
	// 			ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
	// 			ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 			Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
	// 		},
	// 		DenySettings: &armdeploymentstacks.DenySettings{
	// 			ApplyToChildScopes: to.Ptr(false),
	// 			ExcludedActions: []*string{
	// 				to.Ptr("action")},
	// 				ExcludedPrincipals: []*string{
	// 					to.Ptr("principal")},
	// 					Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
	// 				},
	// 				DeploymentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deployments/simpleDeploymentStack-20210301-3f41c"),
	// 				DeploymentScope: to.Ptr("/subscriptions/00000000-1111-1111-1111-000000000000"),
	// 				Duration: to.Ptr("PT1D12H"),
	// 				Outputs: map[string]any{
	// 					"myOut": "myVal",
	// 				},
	// 				Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
	// 					"parameter1": &armdeploymentstacks.DeploymentParameter{
	// 						Value: "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningState("Succeeded")),
	// 				Resources: []*armdeploymentstacks.ManagedResourceReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/00000000-2222-2222-2222-000000000000/resourceGroups/templateSpecsRG/providers/Microsoft.Resources/templateSpecs/templateSpec/versions/1.0"),
	// 						DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
	// 						Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
	// 					},
	// 					{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
	// 						DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
	// 						Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
	// 				}},
	// 			},
	// 			Tags: map[string]*string{
	// 				"tagkey": to.Ptr("tagVal"),
	// 			},
	// 		}
}
Output:

func (*Client) NewListAtManagementGroupPager

func (client *Client) NewListAtManagementGroupPager(managementGroupID string, options *ClientListAtManagementGroupOptions) *runtime.Pager[ClientListAtManagementGroupResponse]

NewListAtManagementGroupPager - Lists all the Deployment stacks within the specified Management Group.

Generated from API version 2024-03-01

  • managementGroupID - Management Group id.
  • options - ClientListAtManagementGroupOptions contains the optional parameters for the Client.NewListAtManagementGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackManagementGroupList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClient().NewListAtManagementGroupPager("myMg", 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.DeploymentStackListResult = armdeploymentstacks.DeploymentStackListResult{
		// 	Value: []*armdeploymentstacks.DeploymentStack{
		// 		{
		// 			Name: to.Ptr("simpleDeploymentStack"),
		// 			Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
		// 			SystemData: &armdeploymentstacks.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
		// 				CreatedBy: to.Ptr("string"),
		// 				CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("string"),
		// 				LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("eastus"),
		// 			Properties: &armdeploymentstacks.DeploymentStackProperties{
		// 				ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
		// 					ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
		// 					ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 					Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 				},
		// 				DenySettings: &armdeploymentstacks.DenySettings{
		// 					ApplyToChildScopes: to.Ptr(false),
		// 					ExcludedActions: []*string{
		// 						to.Ptr("action")},
		// 						ExcludedPrincipals: []*string{
		// 							to.Ptr("principal")},
		// 							Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
		// 						},
		// 						Duration: to.Ptr("PT1D12H"),
		// 						Outputs: map[string]any{
		// 							"myOut": "myVal",
		// 						},
		// 						Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
		// 							"parameter1": &armdeploymentstacks.DeploymentParameter{
		// 								Value: "a string",
		// 							},
		// 						},
		// 					},
		// 					Tags: map[string]*string{
		// 						"tagkey": to.Ptr("tagVal"),
		// 					},
		// 				},
		// 				{
		// 					Name: to.Ptr("simpleDeploymentStack2"),
		// 					Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
		// 					ID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack2"),
		// 					SystemData: &armdeploymentstacks.SystemData{
		// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
		// 						CreatedBy: to.Ptr("string"),
		// 						CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
		// 						LastModifiedBy: to.Ptr("string"),
		// 						LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 					},
		// 					Location: to.Ptr("eastus"),
		// 					Properties: &armdeploymentstacks.DeploymentStackProperties{
		// 						ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
		// 							ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
		// 							ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 							Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 						},
		// 						DenySettings: &armdeploymentstacks.DenySettings{
		// 							ApplyToChildScopes: to.Ptr(false),
		// 							ExcludedActions: []*string{
		// 								to.Ptr("action")},
		// 								ExcludedPrincipals: []*string{
		// 									to.Ptr("principal")},
		// 									Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
		// 								},
		// 								DeploymentID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deployments/simpleDeploymentStack2-20210301-3f41c"),
		// 								Duration: to.Ptr("PT1D12H"),
		// 								Outputs: map[string]any{
		// 									"myOut": "myVal",
		// 								},
		// 								Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
		// 									"parameter1": &armdeploymentstacks.DeploymentParameter{
		// 										Value: "a string",
		// 									},
		// 								},
		// 								ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningState("Succeeded")),
		// 								Resources: []*armdeploymentstacks.ManagedResourceReference{
		// 									{
		// 										ID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/templateSpecs/templateSpec/versions/1.0"),
		// 										DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
		// 										Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
		// 									},
		// 									{
		// 										ID: to.Ptr("/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
		// 										DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
		// 										Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
		// 								}},
		// 							},
		// 							Tags: map[string]*string{
		// 								"tagkey": to.Ptr("tagVal"),
		// 							},
		// 					}},
		// 				}
	}
}
Output:

func (*Client) NewListAtResourceGroupPager

func (client *Client) NewListAtResourceGroupPager(resourceGroupName string, options *ClientListAtResourceGroupOptions) *runtime.Pager[ClientListAtResourceGroupResponse]

NewListAtResourceGroupPager - Lists all the Deployment stacks within the specified Resource Group.

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - ClientListAtResourceGroupOptions contains the optional parameters for the Client.NewListAtResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackResourceGroupList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClient().NewListAtResourceGroupPager("deploymentStacksRG", 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.DeploymentStackListResult = armdeploymentstacks.DeploymentStackListResult{
		// 	Value: []*armdeploymentstacks.DeploymentStack{
		// 		{
		// 			Name: to.Ptr("simpleDeploymentStack"),
		// 			Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
		// 			SystemData: &armdeploymentstacks.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
		// 				CreatedBy: to.Ptr("string"),
		// 				CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("string"),
		// 				LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("eastus"),
		// 			Properties: &armdeploymentstacks.DeploymentStackProperties{
		// 				ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
		// 					ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
		// 					ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 					Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 				},
		// 				DenySettings: &armdeploymentstacks.DenySettings{
		// 					ApplyToChildScopes: to.Ptr(false),
		// 					ExcludedActions: []*string{
		// 						to.Ptr("action")},
		// 						ExcludedPrincipals: []*string{
		// 							to.Ptr("principal")},
		// 							Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
		// 						},
		// 						Duration: to.Ptr("PT1D12H"),
		// 						Outputs: map[string]any{
		// 							"myOut": "myVal",
		// 						},
		// 						Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
		// 							"parameter1": &armdeploymentstacks.DeploymentParameter{
		// 								Value: "a string",
		// 							},
		// 						},
		// 					},
		// 					Tags: map[string]*string{
		// 						"tagkey": to.Ptr("tagVal"),
		// 					},
		// 				},
		// 				{
		// 					Name: to.Ptr("simpleDeploymentStack2"),
		// 					Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
		// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack2"),
		// 					SystemData: &armdeploymentstacks.SystemData{
		// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
		// 						CreatedBy: to.Ptr("string"),
		// 						CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
		// 						LastModifiedBy: to.Ptr("string"),
		// 						LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 					},
		// 					Location: to.Ptr("eastus"),
		// 					Properties: &armdeploymentstacks.DeploymentStackProperties{
		// 						ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
		// 							ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
		// 							ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 							Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 						},
		// 						DenySettings: &armdeploymentstacks.DenySettings{
		// 							ApplyToChildScopes: to.Ptr(false),
		// 							ExcludedActions: []*string{
		// 								to.Ptr("action")},
		// 								ExcludedPrincipals: []*string{
		// 									to.Ptr("principal")},
		// 									Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
		// 								},
		// 								DeploymentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deployments/simpleDeploymentStack2-20210301-3f41c"),
		// 								Duration: to.Ptr("PT1D12H"),
		// 								Outputs: map[string]any{
		// 									"myOut": "myVal",
		// 								},
		// 								Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
		// 									"parameter1": &armdeploymentstacks.DeploymentParameter{
		// 										Value: "a string",
		// 									},
		// 								},
		// 								ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningState("Succeeded")),
		// 								Resources: []*armdeploymentstacks.ManagedResourceReference{
		// 									{
		// 										ID: to.Ptr("/subscriptions/00000000-2222-2222-2222-000000000000/resourceGroups/templateSpecsRG/providers/Microsoft.Resources/templateSpecs/templateSpec/versions/1.0"),
		// 										DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
		// 										Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
		// 									},
		// 									{
		// 										ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
		// 										DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
		// 										Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
		// 								}},
		// 							},
		// 							Tags: map[string]*string{
		// 								"tagkey": to.Ptr("tagVal"),
		// 							},
		// 					}},
		// 				}
	}
}
Output:

func (*Client) NewListAtSubscriptionPager

func (client *Client) NewListAtSubscriptionPager(options *ClientListAtSubscriptionOptions) *runtime.Pager[ClientListAtSubscriptionResponse]

NewListAtSubscriptionPager - Lists all the Deployment stacks within the specified Subscription.

Generated from API version 2024-03-01

  • options - ClientListAtSubscriptionOptions contains the optional parameters for the Client.NewListAtSubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/DeploymentStackSubscriptionList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdeploymentstacks.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClient().NewListAtSubscriptionPager(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.DeploymentStackListResult = armdeploymentstacks.DeploymentStackListResult{
		// 	Value: []*armdeploymentstacks.DeploymentStack{
		// 		{
		// 			Name: to.Ptr("simpleDeploymentStack"),
		// 			Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack"),
		// 			SystemData: &armdeploymentstacks.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
		// 				CreatedBy: to.Ptr("string"),
		// 				CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("string"),
		// 				LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("eastus"),
		// 			Properties: &armdeploymentstacks.DeploymentStackProperties{
		// 				ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
		// 					ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
		// 					ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 					Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 				},
		// 				DenySettings: &armdeploymentstacks.DenySettings{
		// 					ApplyToChildScopes: to.Ptr(false),
		// 					ExcludedActions: []*string{
		// 						to.Ptr("action")},
		// 						ExcludedPrincipals: []*string{
		// 							to.Ptr("principal")},
		// 							Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
		// 						},
		// 						Duration: to.Ptr("PT1D12H"),
		// 						Outputs: map[string]any{
		// 							"myOut": "myVal",
		// 						},
		// 						Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
		// 							"parameter1": &armdeploymentstacks.DeploymentParameter{
		// 								Value: "a string",
		// 							},
		// 						},
		// 					},
		// 					Tags: map[string]*string{
		// 						"tagkey": to.Ptr("tagVal"),
		// 					},
		// 				},
		// 				{
		// 					Name: to.Ptr("simpleDeploymentStack2"),
		// 					Type: to.Ptr("Microsoft.Resources/deploymentStacks"),
		// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack2"),
		// 					SystemData: &armdeploymentstacks.SystemData{
		// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
		// 						CreatedBy: to.Ptr("string"),
		// 						CreatedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
		// 						LastModifiedBy: to.Ptr("string"),
		// 						LastModifiedByType: to.Ptr(armdeploymentstacks.CreatedByTypeApplication),
		// 					},
		// 					Location: to.Ptr("eastus"),
		// 					Properties: &armdeploymentstacks.DeploymentStackProperties{
		// 						ActionOnUnmanage: &armdeploymentstacks.ActionOnUnmanage{
		// 							ManagementGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDetach),
		// 							ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 							Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete),
		// 						},
		// 						DenySettings: &armdeploymentstacks.DenySettings{
		// 							ApplyToChildScopes: to.Ptr(false),
		// 							ExcludedActions: []*string{
		// 								to.Ptr("action")},
		// 								ExcludedPrincipals: []*string{
		// 									to.Ptr("principal")},
		// 									Mode: to.Ptr(armdeploymentstacks.DenySettingsModeDenyDelete),
		// 								},
		// 								DeploymentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/deploymentStacksRG/providers/Microsoft.Resources/deployments/simpleDeploymentStack2-20210301-3f41c"),
		// 								Duration: to.Ptr("PT1D12H"),
		// 								Outputs: map[string]any{
		// 									"myOut": "myVal",
		// 								},
		// 								Parameters: map[string]*armdeploymentstacks.DeploymentParameter{
		// 									"parameter1": &armdeploymentstacks.DeploymentParameter{
		// 										Value: "a string",
		// 									},
		// 								},
		// 								ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningState("Succeeded")),
		// 								Resources: []*armdeploymentstacks.ManagedResourceReference{
		// 									{
		// 										ID: to.Ptr("/subscriptions/00000000-2222-2222-2222-000000000000/resourceGroups/templateSpecsRG/providers/Microsoft.Resources/templateSpecs/templateSpec/versions/1.0"),
		// 										DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
		// 										Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
		// 									},
		// 									{
		// 										ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
		// 										DenyStatus: to.Ptr(armdeploymentstacks.DenyStatusModeDenyDelete),
		// 										Status: to.Ptr(armdeploymentstacks.ResourceStatusModeManaged),
		// 								}},
		// 							},
		// 							Tags: map[string]*string{
		// 								"tagkey": to.Ptr("tagVal"),
		// 							},
		// 					}},
		// 				}
	}
}
Output:

type ClientBeginCreateOrUpdateAtManagementGroupOptions

type ClientBeginCreateOrUpdateAtManagementGroupOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginCreateOrUpdateAtManagementGroupOptions contains the optional parameters for the Client.BeginCreateOrUpdateAtManagementGroup method.

type ClientBeginCreateOrUpdateAtResourceGroupOptions

type ClientBeginCreateOrUpdateAtResourceGroupOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginCreateOrUpdateAtResourceGroupOptions contains the optional parameters for the Client.BeginCreateOrUpdateAtResourceGroup method.

type ClientBeginCreateOrUpdateAtSubscriptionOptions

type ClientBeginCreateOrUpdateAtSubscriptionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginCreateOrUpdateAtSubscriptionOptions contains the optional parameters for the Client.BeginCreateOrUpdateAtSubscription method.

type ClientBeginDeleteAtManagementGroupOptions

type ClientBeginDeleteAtManagementGroupOptions struct {
	// Flag to bypass service errors that indicate the stack resource list is not correctly synchronized.
	BypassStackOutOfSyncError *bool

	// Resumes the LRO from the provided token.
	ResumeToken string

	// Flag to indicate delete rather than detach for unmanaged management groups.
	UnmanageActionManagementGroups *UnmanageActionManagementGroupMode

	// Flag to indicate delete rather than detach for unmanaged resource groups.
	UnmanageActionResourceGroups *UnmanageActionResourceGroupMode

	// Flag to indicate delete rather than detach for unmanaged resources.
	UnmanageActionResources *UnmanageActionResourceMode
}

ClientBeginDeleteAtManagementGroupOptions contains the optional parameters for the Client.BeginDeleteAtManagementGroup method.

type ClientBeginDeleteAtResourceGroupOptions

type ClientBeginDeleteAtResourceGroupOptions struct {
	// Flag to bypass service errors that indicate the stack resource list is not correctly synchronized.
	BypassStackOutOfSyncError *bool

	// Resumes the LRO from the provided token.
	ResumeToken string

	// Flag to indicate delete rather than detach for unmanaged management groups.
	UnmanageActionManagementGroups *UnmanageActionManagementGroupMode

	// Flag to indicate delete rather than detach for unmanaged resource groups.
	UnmanageActionResourceGroups *UnmanageActionResourceGroupMode

	// Flag to indicate delete rather than detach for unmanaged resources.
	UnmanageActionResources *UnmanageActionResourceMode
}

ClientBeginDeleteAtResourceGroupOptions contains the optional parameters for the Client.BeginDeleteAtResourceGroup method.

type ClientBeginDeleteAtSubscriptionOptions

type ClientBeginDeleteAtSubscriptionOptions struct {
	// Flag to bypass service errors that indicate the stack resource list is not correctly synchronized.
	BypassStackOutOfSyncError *bool

	// Resumes the LRO from the provided token.
	ResumeToken string

	// Flag to indicate delete rather than detach for unmanaged management groups.
	UnmanageActionManagementGroups *UnmanageActionManagementGroupMode

	// Flag to indicate delete rather than detach for unmanaged resource groups.
	UnmanageActionResourceGroups *UnmanageActionResourceGroupMode

	// Flag to indicate delete rather than detach for unmanaged resources.
	UnmanageActionResources *UnmanageActionResourceMode
}

ClientBeginDeleteAtSubscriptionOptions contains the optional parameters for the Client.BeginDeleteAtSubscription method.

type ClientBeginValidateStackAtManagementGroupOptions added in v1.0.0

type ClientBeginValidateStackAtManagementGroupOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginValidateStackAtManagementGroupOptions contains the optional parameters for the Client.BeginValidateStackAtManagementGroup method.

type ClientBeginValidateStackAtResourceGroupOptions added in v1.0.0

type ClientBeginValidateStackAtResourceGroupOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginValidateStackAtResourceGroupOptions contains the optional parameters for the Client.BeginValidateStackAtResourceGroup method.

type ClientBeginValidateStackAtSubscriptionOptions added in v1.0.0

type ClientBeginValidateStackAtSubscriptionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginValidateStackAtSubscriptionOptions contains the optional parameters for the Client.BeginValidateStackAtSubscription method.

type ClientCreateOrUpdateAtManagementGroupResponse

type ClientCreateOrUpdateAtManagementGroupResponse struct {
	// Deployment stack object.
	DeploymentStack
}

ClientCreateOrUpdateAtManagementGroupResponse contains the response from method Client.BeginCreateOrUpdateAtManagementGroup.

type ClientCreateOrUpdateAtResourceGroupResponse

type ClientCreateOrUpdateAtResourceGroupResponse struct {
	// Deployment stack object.
	DeploymentStack
}

ClientCreateOrUpdateAtResourceGroupResponse contains the response from method Client.BeginCreateOrUpdateAtResourceGroup.

type ClientCreateOrUpdateAtSubscriptionResponse

type ClientCreateOrUpdateAtSubscriptionResponse struct {
	// Deployment stack object.
	DeploymentStack
}

ClientCreateOrUpdateAtSubscriptionResponse contains the response from method Client.BeginCreateOrUpdateAtSubscription.

type ClientDeleteAtManagementGroupResponse

type ClientDeleteAtManagementGroupResponse struct {
}

ClientDeleteAtManagementGroupResponse contains the response from method Client.BeginDeleteAtManagementGroup.

type ClientDeleteAtResourceGroupResponse

type ClientDeleteAtResourceGroupResponse struct {
}

ClientDeleteAtResourceGroupResponse contains the response from method Client.BeginDeleteAtResourceGroup.

type ClientDeleteAtSubscriptionResponse

type ClientDeleteAtSubscriptionResponse struct {
}

ClientDeleteAtSubscriptionResponse contains the response from method Client.BeginDeleteAtSubscription.

type ClientExportTemplateAtManagementGroupOptions

type ClientExportTemplateAtManagementGroupOptions struct {
}

ClientExportTemplateAtManagementGroupOptions contains the optional parameters for the Client.ExportTemplateAtManagementGroup method.

type ClientExportTemplateAtManagementGroupResponse

type ClientExportTemplateAtManagementGroupResponse struct {
	// Export Template specific properties of the Deployment stack.
	DeploymentStackTemplateDefinition
}

ClientExportTemplateAtManagementGroupResponse contains the response from method Client.ExportTemplateAtManagementGroup.

type ClientExportTemplateAtResourceGroupOptions

type ClientExportTemplateAtResourceGroupOptions struct {
}

ClientExportTemplateAtResourceGroupOptions contains the optional parameters for the Client.ExportTemplateAtResourceGroup method.

type ClientExportTemplateAtResourceGroupResponse

type ClientExportTemplateAtResourceGroupResponse struct {
	// Export Template specific properties of the Deployment stack.
	DeploymentStackTemplateDefinition
}

ClientExportTemplateAtResourceGroupResponse contains the response from method Client.ExportTemplateAtResourceGroup.

type ClientExportTemplateAtSubscriptionOptions

type ClientExportTemplateAtSubscriptionOptions struct {
}

ClientExportTemplateAtSubscriptionOptions contains the optional parameters for the Client.ExportTemplateAtSubscription method.

type ClientExportTemplateAtSubscriptionResponse

type ClientExportTemplateAtSubscriptionResponse struct {
	// Export Template specific properties of the Deployment stack.
	DeploymentStackTemplateDefinition
}

ClientExportTemplateAtSubscriptionResponse contains the response from method Client.ExportTemplateAtSubscription.

type ClientFactory

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

func NewClientFactory(subscriptionID string, 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.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewClient

func (c *ClientFactory) NewClient() *Client

NewClient creates a new instance of Client.

type ClientGetAtManagementGroupOptions

type ClientGetAtManagementGroupOptions struct {
}

ClientGetAtManagementGroupOptions contains the optional parameters for the Client.GetAtManagementGroup method.

type ClientGetAtManagementGroupResponse

type ClientGetAtManagementGroupResponse struct {
	// Deployment stack object.
	DeploymentStack
}

ClientGetAtManagementGroupResponse contains the response from method Client.GetAtManagementGroup.

type ClientGetAtResourceGroupOptions

type ClientGetAtResourceGroupOptions struct {
}

ClientGetAtResourceGroupOptions contains the optional parameters for the Client.GetAtResourceGroup method.

type ClientGetAtResourceGroupResponse

type ClientGetAtResourceGroupResponse struct {
	// Deployment stack object.
	DeploymentStack
}

ClientGetAtResourceGroupResponse contains the response from method Client.GetAtResourceGroup.

type ClientGetAtSubscriptionOptions

type ClientGetAtSubscriptionOptions struct {
}

ClientGetAtSubscriptionOptions contains the optional parameters for the Client.GetAtSubscription method.

type ClientGetAtSubscriptionResponse

type ClientGetAtSubscriptionResponse struct {
	// Deployment stack object.
	DeploymentStack
}

ClientGetAtSubscriptionResponse contains the response from method Client.GetAtSubscription.

type ClientListAtManagementGroupOptions

type ClientListAtManagementGroupOptions struct {
}

ClientListAtManagementGroupOptions contains the optional parameters for the Client.NewListAtManagementGroupPager method.

type ClientListAtManagementGroupResponse

type ClientListAtManagementGroupResponse struct {
	// List of Deployment stacks.
	DeploymentStackListResult
}

ClientListAtManagementGroupResponse contains the response from method Client.NewListAtManagementGroupPager.

type ClientListAtResourceGroupOptions

type ClientListAtResourceGroupOptions struct {
}

ClientListAtResourceGroupOptions contains the optional parameters for the Client.NewListAtResourceGroupPager method.

type ClientListAtResourceGroupResponse

type ClientListAtResourceGroupResponse struct {
	// List of Deployment stacks.
	DeploymentStackListResult
}

ClientListAtResourceGroupResponse contains the response from method Client.NewListAtResourceGroupPager.

type ClientListAtSubscriptionOptions

type ClientListAtSubscriptionOptions struct {
}

ClientListAtSubscriptionOptions contains the optional parameters for the Client.NewListAtSubscriptionPager method.

type ClientListAtSubscriptionResponse

type ClientListAtSubscriptionResponse struct {
	// List of Deployment stacks.
	DeploymentStackListResult
}

ClientListAtSubscriptionResponse contains the response from method Client.NewListAtSubscriptionPager.

type ClientValidateStackAtManagementGroupResponse added in v1.0.0

type ClientValidateStackAtManagementGroupResponse struct {
	// The Deployment stack validation result.
	DeploymentStackValidateResult
}

ClientValidateStackAtManagementGroupResponse contains the response from method Client.BeginValidateStackAtManagementGroup.

type ClientValidateStackAtResourceGroupResponse added in v1.0.0

type ClientValidateStackAtResourceGroupResponse struct {
	// The Deployment stack validation result.
	DeploymentStackValidateResult
}

ClientValidateStackAtResourceGroupResponse contains the response from method Client.BeginValidateStackAtResourceGroup.

type ClientValidateStackAtSubscriptionResponse added in v1.0.0

type ClientValidateStackAtSubscriptionResponse struct {
	// The Deployment stack validation result.
	DeploymentStackValidateResult
}

ClientValidateStackAtSubscriptionResponse contains the response from method Client.BeginValidateStackAtSubscription.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DebugSetting

type DebugSetting struct {
	// Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent,
	// or both requestContent and responseContent separated by a comma. The default is
	// none. When setting this value, carefully consider the type of information that is being passed in during deployment. By
	// logging information about the request or response, sensitive data that is
	// retrieved through the deployment operations could potentially be exposed.
	DetailLevel *string
}

DebugSetting - The debug setting.

func (DebugSetting) MarshalJSON

func (d DebugSetting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DebugSetting.

func (*DebugSetting) UnmarshalJSON

func (d *DebugSetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DebugSetting.

type DenySettings

type DenySettings struct {
	// REQUIRED; denySettings Mode that defines denied actions.
	Mode *DenySettingsMode

	// DenySettings will be applied to child resource scopes of every managed resource with a deny assignment.
	ApplyToChildScopes *bool

	// List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the
	// denySetting mode is set to 'denyWriteAndDelete', then the following actions
	// are automatically appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting
	// mode is set to 'denyDelete', then the following actions are automatically
	// appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed.
	ExcludedActions []*string

	// List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.
	ExcludedPrincipals []*string
}

DenySettings - Defines how resources deployed by the Deployment stack are locked.

func (DenySettings) MarshalJSON

func (d DenySettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DenySettings.

func (*DenySettings) UnmarshalJSON

func (d *DenySettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DenySettings.

type DenySettingsMode

type DenySettingsMode string

DenySettingsMode - denySettings Mode that defines denied actions.

const (
	// DenySettingsModeDenyDelete - Authorized users are able to read and modify the resources, but cannot delete.
	DenySettingsModeDenyDelete DenySettingsMode = "denyDelete"
	// DenySettingsModeDenyWriteAndDelete - Authorized users can read from a resource, but cannot modify or delete it.
	DenySettingsModeDenyWriteAndDelete DenySettingsMode = "denyWriteAndDelete"
	// DenySettingsModeNone - No denyAssignments have been applied.
	DenySettingsModeNone DenySettingsMode = "none"
)

func PossibleDenySettingsModeValues

func PossibleDenySettingsModeValues() []DenySettingsMode

PossibleDenySettingsModeValues returns the possible values for the DenySettingsMode const type.

type DenyStatusMode

type DenyStatusMode string

DenyStatusMode - denyAssignment settings applied to the resource.

const (
	// DenyStatusModeDenyDelete - Authorized users are able to read and modify the resources, but cannot delete.
	DenyStatusModeDenyDelete DenyStatusMode = "denyDelete"
	// DenyStatusModeDenyWriteAndDelete - Authorized users can only read from a resource, but cannot modify or delete it.
	DenyStatusModeDenyWriteAndDelete DenyStatusMode = "denyWriteAndDelete"
	// DenyStatusModeInapplicable - denyAssignments are not supported on resources outside the scope of the deployment stack.
	DenyStatusModeInapplicable DenyStatusMode = "inapplicable"
	// DenyStatusModeNone - No denyAssignments have been applied.
	DenyStatusModeNone DenyStatusMode = "none"
	// DenyStatusModeNotSupported - Resource type does not support denyAssignments.
	DenyStatusModeNotSupported DenyStatusMode = "notSupported"
	// DenyStatusModeRemovedBySystem - Deny assignment has been removed by Azure due to a resource management change (management
	// group move, etc.)
	DenyStatusModeRemovedBySystem DenyStatusMode = "removedBySystem"
)

func PossibleDenyStatusModeValues

func PossibleDenyStatusModeValues() []DenyStatusMode

PossibleDenyStatusModeValues returns the possible values for the DenyStatusMode const type.

type DeploymentParameter added in v1.0.0

type DeploymentParameter struct {
	// Azure Key Vault parameter reference.
	Reference *KeyVaultParameterReference

	// Type of the value.
	Type *string

	// Input value to the parameter.
	Value any
}

DeploymentParameter - Deployment parameter for the template.

func (DeploymentParameter) MarshalJSON added in v1.0.0

func (d DeploymentParameter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeploymentParameter.

func (*DeploymentParameter) UnmarshalJSON added in v1.0.0

func (d *DeploymentParameter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentParameter.

type DeploymentStack

type DeploymentStack struct {
	// The location of the Deployment stack. It cannot be changed after creation. It must be one of the supported Azure locations.
	Location *string

	// Deployment stack properties.
	Properties *DeploymentStackProperties

	// Deployment stack resource tags.
	Tags 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

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

DeploymentStack - Deployment stack object.

func (DeploymentStack) MarshalJSON

func (d DeploymentStack) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeploymentStack.

func (*DeploymentStack) UnmarshalJSON

func (d *DeploymentStack) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentStack.

type DeploymentStackListResult

type DeploymentStackListResult struct {
	// An array of Deployment stacks.
	Value []*DeploymentStack

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string
}

DeploymentStackListResult - List of Deployment stacks.

func (DeploymentStackListResult) MarshalJSON

func (d DeploymentStackListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeploymentStackListResult.

func (*DeploymentStackListResult) UnmarshalJSON

func (d *DeploymentStackListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentStackListResult.

type DeploymentStackProperties

type DeploymentStackProperties struct {
	// REQUIRED; Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted.
	ActionOnUnmanage *ActionOnUnmanage

	// REQUIRED; Defines how resources deployed by the stack are locked.
	DenySettings *DenySettings

	// Flag to bypass service errors that indicate the stack resource list is not correctly synchronized.
	BypassStackOutOfSyncError *bool

	// The debug setting of the deployment.
	DebugSetting *DebugSetting

	// The scope at which the initial deployment should be created. If a scope is not specified, it will default to the scope
	// of the deployment stack. Valid scopes are: management group (format:
	// '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: '/subscriptions/{subscriptionId}'),
	// resource group (format:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').
	DeploymentScope *string

	// Deployment stack description. Max length of 4096 characters.
	Description *string

	// The error detail.
	Error *ErrorDetail

	// Name and value pairs that define the deployment parameters for the template. Use this element when providing the parameter
	// values directly in the request, rather than linking to an existing parameter
	// file. Use either the parametersLink property or the parameters property, but not both.
	Parameters map[string]*DeploymentParameter

	// The URI of parameters file. Use this element to link to an existing parameters file. Use either the parametersLink property
	// or the parameters property, but not both.
	ParametersLink *ParametersLink

	// The template content. You use this element when you want to pass the template syntax directly in the request rather than
	// link to an existing template. It can be a JObject or well-formed JSON string.
	// Use either the templateLink property or the template property, but not both.
	Template any

	// The URI of the template. Use either the templateLink property or the template property, but not both.
	TemplateLink *TemplateLink

	// READ-ONLY; The correlation id of the last Deployment stack upsert or delete operation. It is in GUID format and is used
	// for tracing.
	CorrelationID *string

	// READ-ONLY; An array of resources that were deleted during the most recent Deployment stack update. Deleted means that the
	// resource was removed from the template and relevant deletion operations were specified.
	DeletedResources []*ResourceReference

	// READ-ONLY; The resourceId of the deployment resource created by the deployment stack.
	DeploymentID *string

	// READ-ONLY; An array of resources that were detached during the most recent Deployment stack update. Detached means that
	// the resource was removed from the template, but no relevant deletion operations were
	// specified. So, the resource still exists while no longer being associated with the stack.
	DetachedResources []*ResourceReference

	// READ-ONLY; The duration of the last successful Deployment stack update.
	Duration *string

	// READ-ONLY; An array of resources that failed to reach goal state during the most recent update. Each resourceId is accompanied
	// by an error message.
	FailedResources []*ResourceReferenceExtended

	// READ-ONLY; The outputs of the deployment resource created by the deployment stack.
	Outputs any

	// READ-ONLY; State of the deployment stack.
	ProvisioningState *DeploymentStackProvisioningState

	// READ-ONLY; An array of resources currently managed by the deployment stack.
	Resources []*ManagedResourceReference
}

DeploymentStackProperties - Deployment stack properties.

func (DeploymentStackProperties) MarshalJSON

func (d DeploymentStackProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeploymentStackProperties.

func (*DeploymentStackProperties) UnmarshalJSON

func (d *DeploymentStackProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentStackProperties.

type DeploymentStackProvisioningState

type DeploymentStackProvisioningState string

DeploymentStackProvisioningState - State of the deployment stack.

const (
	DeploymentStackProvisioningStateCanceled                DeploymentStackProvisioningState = "canceled"
	DeploymentStackProvisioningStateCanceling               DeploymentStackProvisioningState = "canceling"
	DeploymentStackProvisioningStateCreating                DeploymentStackProvisioningState = "creating"
	DeploymentStackProvisioningStateDeleting                DeploymentStackProvisioningState = "deleting"
	DeploymentStackProvisioningStateDeletingResources       DeploymentStackProvisioningState = "deletingResources"
	DeploymentStackProvisioningStateDeploying               DeploymentStackProvisioningState = "deploying"
	DeploymentStackProvisioningStateFailed                  DeploymentStackProvisioningState = "failed"
	DeploymentStackProvisioningStateSucceeded               DeploymentStackProvisioningState = "succeeded"
	DeploymentStackProvisioningStateUpdatingDenyAssignments DeploymentStackProvisioningState = "updatingDenyAssignments"
	DeploymentStackProvisioningStateValidating              DeploymentStackProvisioningState = "validating"
	DeploymentStackProvisioningStateWaiting                 DeploymentStackProvisioningState = "waiting"
)

func PossibleDeploymentStackProvisioningStateValues

func PossibleDeploymentStackProvisioningStateValues() []DeploymentStackProvisioningState

PossibleDeploymentStackProvisioningStateValues returns the possible values for the DeploymentStackProvisioningState const type.

type DeploymentStackTemplateDefinition

type DeploymentStackTemplateDefinition struct {
	// The template content. Use this element to pass the template syntax directly in the request rather than link to an existing
	// template. It can be a JObject or well-formed JSON string. Use either the
	// templateLink property or the template property, but not both.
	Template any

	// The URI of the template. Use either the templateLink property or the template property, but not both.
	TemplateLink *TemplateLink
}

DeploymentStackTemplateDefinition - Export Template specific properties of the Deployment stack.

func (DeploymentStackTemplateDefinition) MarshalJSON

func (d DeploymentStackTemplateDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeploymentStackTemplateDefinition.

func (*DeploymentStackTemplateDefinition) UnmarshalJSON

func (d *DeploymentStackTemplateDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentStackTemplateDefinition.

type DeploymentStackValidateProperties added in v1.0.0

type DeploymentStackValidateProperties struct {
	// Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted.
	ActionOnUnmanage *ActionOnUnmanage

	// The correlation id of the Deployment stack validate operation. It is in GUID format and is used for tracing.
	CorrelationID *string

	// The Deployment stack deny settings.
	DenySettings *DenySettings

	// The Deployment stack deployment scope.
	DeploymentScope *string

	// The Deployment stack validation description.
	Description *string

	// Deployment parameters.
	Parameters map[string]*DeploymentParameter

	// The URI of the template.
	TemplateLink *TemplateLink

	// The array of resources that were validated.
	ValidatedResources []*ResourceReference
}

DeploymentStackValidateProperties - The Deployment stack validation result details.

func (DeploymentStackValidateProperties) MarshalJSON added in v1.0.0

func (d DeploymentStackValidateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeploymentStackValidateProperties.

func (*DeploymentStackValidateProperties) UnmarshalJSON added in v1.0.0

func (d *DeploymentStackValidateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentStackValidateProperties.

type DeploymentStackValidateResult added in v1.0.0

type DeploymentStackValidateResult struct {
	// The error detail.
	Error *ErrorDetail

	// The validation result details.
	Properties *DeploymentStackValidateProperties

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

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

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

DeploymentStackValidateResult - The Deployment stack validation result.

func (DeploymentStackValidateResult) MarshalJSON added in v1.0.0

func (d DeploymentStackValidateResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeploymentStackValidateResult.

func (*DeploymentStackValidateResult) UnmarshalJSON added in v1.0.0

func (d *DeploymentStackValidateResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentStackValidateResult.

type DeploymentStacksDeleteDetachEnum

type DeploymentStacksDeleteDetachEnum string

DeploymentStacksDeleteDetachEnum - Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state.

const (
	DeploymentStacksDeleteDetachEnumDelete DeploymentStacksDeleteDetachEnum = "delete"
	DeploymentStacksDeleteDetachEnumDetach DeploymentStacksDeleteDetachEnum = "detach"
)

func PossibleDeploymentStacksDeleteDetachEnumValues

func PossibleDeploymentStacksDeleteDetachEnumValues() []DeploymentStacksDeleteDetachEnum

PossibleDeploymentStacksDeleteDetachEnumValues returns the possible values for the DeploymentStacksDeleteDetachEnum const type.

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

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail

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

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

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

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

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

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type KeyVaultParameterReference added in v1.0.0

type KeyVaultParameterReference struct {
	// REQUIRED; Azure Key Vault reference.
	KeyVault *KeyVaultReference

	// REQUIRED; Azure Key Vault secret name.
	SecretName *string

	// Azure Key Vault secret version.
	SecretVersion *string
}

KeyVaultParameterReference - Azure Key Vault parameter reference.

func (KeyVaultParameterReference) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type KeyVaultParameterReference.

func (*KeyVaultParameterReference) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultParameterReference.

type KeyVaultReference added in v1.0.0

type KeyVaultReference struct {
	// REQUIRED; Azure Key Vault resourceId.
	ID *string
}

KeyVaultReference - Azure Key Vault reference.

func (KeyVaultReference) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type KeyVaultReference.

func (*KeyVaultReference) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultReference.

type ManagedResourceReference

type ManagedResourceReference struct {
	// denyAssignment settings applied to the resource.
	DenyStatus *DenyStatusMode

	// Current management state of the resource in the deployment stack.
	Status *ResourceStatusMode

	// READ-ONLY; The resourceId of a resource managed by the deployment stack.
	ID *string
}

ManagedResourceReference - The managed resource model.

func (ManagedResourceReference) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedResourceReference.

func (*ManagedResourceReference) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedResourceReference.

type ParametersLink struct {
	// REQUIRED; The URI of the parameters file.
	URI *string

	// If included, must match the ContentVersion in the template.
	ContentVersion *string
}

ParametersLink - Entity representing the reference to the deployment parameters.

func (ParametersLink) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ParametersLink.

func (*ParametersLink) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ParametersLink.

type ResourceReference

type ResourceReference struct {
	// READ-ONLY; The resourceId of a resource managed by the deployment stack.
	ID *string
}

ResourceReference - The resourceId model.

func (ResourceReference) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceReference.

func (*ResourceReference) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceReference.

type ResourceReferenceExtended

type ResourceReferenceExtended struct {
	// The error detail.
	Error *ErrorDetail

	// READ-ONLY; The resourceId of a resource managed by the deployment stack.
	ID *string
}

ResourceReferenceExtended - The resourceId extended model. This is used to document failed resources with a resourceId and a corresponding error.

func (ResourceReferenceExtended) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceReferenceExtended.

func (*ResourceReferenceExtended) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceReferenceExtended.

type ResourceStatusMode

type ResourceStatusMode string

ResourceStatusMode - Current management state of the resource in the deployment stack.

const (
	// ResourceStatusModeDeleteFailed - Unable to delete the resource from Azure. The delete will be retried on the next stack
	// deployment, or can be deleted manually.
	ResourceStatusModeDeleteFailed ResourceStatusMode = "deleteFailed"
	// ResourceStatusModeManaged - This resource is managed by the deployment stack.
	ResourceStatusModeManaged ResourceStatusMode = "managed"
	// ResourceStatusModeRemoveDenyFailed - Unable to remove the deny assignment on resource.
	ResourceStatusModeRemoveDenyFailed ResourceStatusMode = "removeDenyFailed"
)

func PossibleResourceStatusModeValues

func PossibleResourceStatusModeValues() []ResourceStatusMode

PossibleResourceStatusModeValues returns the possible values for the ResourceStatusMode const type.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TemplateLink struct {
	// If included, must match the ContentVersion in the template.
	ContentVersion *string

	// The resourceId of a Template Spec. Use either the id or uri property, but not both.
	ID *string

	// The query string (for example, a SAS token) to be used with the templateLink URI.
	QueryString *string

	// The relativePath property can be used to deploy a linked template at a location relative to the parent. If the parent template
	// was linked with a TemplateSpec, this will reference an artifact in the
	// TemplateSpec. If the parent was linked with a URI, the child deployment will be a combination of the parent and relativePath
	// URIs.
	RelativePath *string

	// The URI of the template to deploy. Use either the uri or id property, but not both.
	URI *string
}

TemplateLink - Entity representing the reference to the template.

func (TemplateLink) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TemplateLink.

func (*TemplateLink) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TemplateLink.

type UnmanageActionManagementGroupMode

type UnmanageActionManagementGroupMode string
const (
	UnmanageActionManagementGroupModeDelete UnmanageActionManagementGroupMode = "delete"
	UnmanageActionManagementGroupModeDetach UnmanageActionManagementGroupMode = "detach"
)

func PossibleUnmanageActionManagementGroupModeValues

func PossibleUnmanageActionManagementGroupModeValues() []UnmanageActionManagementGroupMode

PossibleUnmanageActionManagementGroupModeValues returns the possible values for the UnmanageActionManagementGroupMode const type.

type UnmanageActionResourceGroupMode

type UnmanageActionResourceGroupMode string
const (
	UnmanageActionResourceGroupModeDelete UnmanageActionResourceGroupMode = "delete"
	UnmanageActionResourceGroupModeDetach UnmanageActionResourceGroupMode = "detach"
)

func PossibleUnmanageActionResourceGroupModeValues

func PossibleUnmanageActionResourceGroupModeValues() []UnmanageActionResourceGroupMode

PossibleUnmanageActionResourceGroupModeValues returns the possible values for the UnmanageActionResourceGroupMode const type.

type UnmanageActionResourceMode

type UnmanageActionResourceMode string
const (
	UnmanageActionResourceModeDelete UnmanageActionResourceMode = "delete"
	UnmanageActionResourceModeDetach UnmanageActionResourceMode = "detach"
)

func PossibleUnmanageActionResourceModeValues

func PossibleUnmanageActionResourceModeValues() []UnmanageActionResourceMode

PossibleUnmanageActionResourceModeValues returns the possible values for the UnmanageActionResourceMode const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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