armdeploymentstacks

package module
v0.2.0 Latest Latest
Warning

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

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

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 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.
  • 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. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • managementGroupID - Management Group.
  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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.DeploymentStackPropertiesActionOnUnmanage{
				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]any{
				"parameter1": map[string]any{
					"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.DeploymentStackPropertiesActionOnUnmanage{
	// 			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]any{
	// 					"parameter1":map[string]any{
	// 						"value": "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningStateSucceeded),
	// 			},
	// 			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. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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.DeploymentStackPropertiesActionOnUnmanage{
				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]any{
				"parameter1": map[string]any{
					"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.DeploymentStackPropertiesActionOnUnmanage{
	// 			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]any{
	// 					"parameter1":map[string]any{
	// 						"value": "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningStateSucceeded),
	// 			},
	// 			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. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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.DeploymentStackPropertiesActionOnUnmanage{
				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]any{
				"parameter1": map[string]any{
					"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.DeploymentStackPropertiesActionOnUnmanage{
	// 			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]any{
	// 					"parameter1":map[string]any{
	// 						"value": "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningStateSucceeded),
	// 			},
	// 			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. When operation completes, status code 200 returned without content. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • managementGroupID - Management Group.
  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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,
	})
	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. When operation completes, status code 200 returned without content. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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,
	})
	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. When operation completes, status code 200 returned without content. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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,
	})
	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) 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. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • managementGroupID - Management Group.
  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • managementGroupID - Management Group.
  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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.DeploymentStackPropertiesActionOnUnmanage{
	// 			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]any{
	// 					"parameter1":map[string]any{
	// 						"value": "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningStateSucceeded),
	// 				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. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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.DeploymentStackPropertiesActionOnUnmanage{
	// 			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]any{
	// 					"parameter1":map[string]any{
	// 						"value": "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningStateSucceeded),
	// 				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. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01-preview

  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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.DeploymentStackPropertiesActionOnUnmanage{
	// 			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]any{
	// 					"parameter1":map[string]any{
	// 						"value": "a string",
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningStateSucceeded),
	// 				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 2022-08-01-preview

  • managementGroupID - Management Group.
  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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.DeploymentStackPropertiesActionOnUnmanage{
		// 					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]any{
		// 							"parameter1":map[string]any{
		// 								"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.DeploymentStackPropertiesActionOnUnmanage{
		// 							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]any{
		// 									"parameter1":map[string]any{
		// 										"value": "a string",
		// 									},
		// 								},
		// 								ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningStateSucceeded),
		// 								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 2022-08-01-preview

  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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.DeploymentStackPropertiesActionOnUnmanage{
		// 					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]any{
		// 							"parameter1":map[string]any{
		// 								"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.DeploymentStackPropertiesActionOnUnmanage{
		// 							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]any{
		// 									"parameter1":map[string]any{
		// 										"value": "a string",
		// 									},
		// 								},
		// 								ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningStateSucceeded),
		// 								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 2022-08-01-preview

  • 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/ca162308f1010bfb85b9c85021e863e7bd397a1f/specification/resources/resource-manager/Microsoft.Resources/preview/2022-08-01-preview/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.DeploymentStackPropertiesActionOnUnmanage{
		// 					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]any{
		// 							"parameter1":map[string]any{
		// 								"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.DeploymentStackPropertiesActionOnUnmanage{
		// 							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]any{
		// 									"parameter1":map[string]any{
		// 										"value": "a string",
		// 									},
		// 								},
		// 								ProvisioningState: to.Ptr(armdeploymentstacks.DeploymentStackProvisioningStateSucceeded),
		// 								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 {
	// Resumes the LRO from the provided token.
	ResumeToken string

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

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

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

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

type ClientBeginDeleteAtResourceGroupOptions

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

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

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

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

type ClientBeginDeleteAtSubscriptionOptions

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

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

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

ClientBeginDeleteAtSubscriptionOptions contains the optional parameters for the Client.BeginDeleteAtSubscription 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 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 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 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.
  • 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 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.
	Mode *DenySettingsMode

	// DenySettings will be applied to child scopes.
	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.

const (
	// DenySettingsModeDenyDelete - Authorized users are able to read and modify the resources, but cannot delete.
	DenySettingsModeDenyDelete DenySettingsMode = "denyDelete"
	// DenySettingsModeDenyWriteAndDelete - Authorized users can only 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 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 not managed immediately after the stack is updated.
	ActionOnUnmanage *DeploymentStackPropertiesActionOnUnmanage

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

	// 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.
	Description *string

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

	// 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. It can be a JObject or a well formed
	// JSON string.
	Parameters any

	// 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; An array of resources that were deleted during the most recent update.
	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 update.
	DetachedResources []*ResourceReference

	// READ-ONLY; The duration of the deployment stack update.
	Duration *string

	// READ-ONLY; An array of resources that failed to reach goal state during the most recent update.
	FailedResources []*ResourceReferenceExtended

	// READ-ONLY; The outputs of the underlying deployment.
	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 DeploymentStackPropertiesActionOnUnmanage

type DeploymentStackPropertiesActionOnUnmanage struct {
	// REQUIRED; Specifies the action that should be taken on the resource when the deployment stack is deleted. Delete will attempt
	// to delete the resource from Azure. Detach will leave the resource in it's current
	// state.
	Resources *DeploymentStacksDeleteDetachEnum

	// Specifies the action that should be taken on the resource when the deployment stack is deleted. Delete will attempt to
	// delete the resource from Azure. Detach will leave the resource in it's current
	// state.
	ManagementGroups *DeploymentStacksDeleteDetachEnum

	// Specifies the action that should be taken on the resource when the deployment stack is deleted. Delete will attempt to
	// delete the resource from Azure. Detach will leave the resource in it's current
	// state.
	ResourceGroups *DeploymentStacksDeleteDetachEnum
}

DeploymentStackPropertiesActionOnUnmanage - Defines the behavior of resources that are not managed immediately after the stack is updated.

func (DeploymentStackPropertiesActionOnUnmanage) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type DeploymentStackPropertiesActionOnUnmanage.

func (*DeploymentStackPropertiesActionOnUnmanage) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentStackPropertiesActionOnUnmanage.

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"
	DeploymentStackProvisioningStateLocking           DeploymentStackProvisioningState = "Locking"
	DeploymentStackProvisioningStateSucceeded         DeploymentStackProvisioningState = "Succeeded"
	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 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 DeploymentStacksDeleteDetachEnum

type DeploymentStacksDeleteDetachEnum string

DeploymentStacksDeleteDetachEnum - Specifies the action that should be taken on the resource when the deployment stack is deleted. 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 ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

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

func (ErrorResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

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 resource Id 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 {
	// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
	// the OData error response format.).
	Error *ErrorResponse

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

ResourceReferenceExtended - The resource Id extended model.

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"
	// ResourceStatusModeNone - No denyAssignments have been applied.
	ResourceStatusModeNone ResourceStatusMode = "None"
	// 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 resource id 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