resourcegroups

package
v0.0.0-...-64c179a Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureResourceGroupManager

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

AzureResourceGroupManager is the struct which contains helper functions for resource groups

func NewAzureResourceGroupManager

func NewAzureResourceGroupManager(creds config.Credentials) *AzureResourceGroupManager

func (*AzureResourceGroupManager) CheckExistence

func (m *AzureResourceGroupManager) CheckExistence(ctx context.Context, resourceGroupName string) (result autorest.Response, err error)

CheckExistence checks whether a resource exists

func (*AzureResourceGroupManager) CreateGroup

func (m *AzureResourceGroupManager) CreateGroup(ctx context.Context, groupName string, location string) (resources.Group, error)

CreateGroup creates a new resource group named by env var

func (*AzureResourceGroupManager) CreateGroupWithAuthFile

func (m *AzureResourceGroupManager) CreateGroupWithAuthFile(ctx context.Context, groupName, location string) (resources.Group, error)

CreateGroupWithAuthFile creates a new resource group. The client authorizer is set up based on an auth file created using the Azure CLI.

func (*AzureResourceGroupManager) Delete

func (*AzureResourceGroupManager) DeleteAllGroupsWithPrefix

func (m *AzureResourceGroupManager) DeleteAllGroupsWithPrefix(ctx context.Context, prefix string) (futures []resources.GroupsDeleteFuture, groups []string)

DeleteAllGroupsWithPrefix deletes all rescource groups that start with a certain prefix

func (*AzureResourceGroupManager) DeleteGroup

func (m *AzureResourceGroupManager) DeleteGroup(ctx context.Context, groupName string) (result autorest.Response, err error)

DeleteGroup removes the resource group named by env var

func (*AzureResourceGroupManager) DeleteGroupAsync

func (m *AzureResourceGroupManager) DeleteGroupAsync(ctx context.Context, groupName string) (result resources.GroupsDeleteFuture, err error)

func (*AzureResourceGroupManager) Ensure

func (*AzureResourceGroupManager) GetGroup

func (m *AzureResourceGroupManager) GetGroup(ctx context.Context, groupName string) (resources.Group, error)

GetGroup gets info on the resource group in use

func (*AzureResourceGroupManager) GetParents

func (*AzureResourceGroupManager) GetStatus

func (*AzureResourceGroupManager) ListGroups

ListGroups gets an interator that gets all resource groups in the subscription

func (*AzureResourceGroupManager) WaitForDeleteCompletion

func (m *AzureResourceGroupManager) WaitForDeleteCompletion(ctx context.Context, wg *sync.WaitGroup, futures []resources.GroupsDeleteFuture, groups []string)

WaitForDeleteCompletion concurrently waits for delete group operations to finish

type ResourceGroupManager

type ResourceGroupManager interface {
	// CreateGroup creates a new resource group named by env var
	CreateGroup(ctx context.Context, groupName string, location string) (resources.Group, error)

	// DeleteGroup removes the resource group named by env var
	DeleteGroup(ctx context.Context, groupName string) (result autorest.Response, err error)

	// DeleteGroup removes the resource group named by env var
	DeleteGroupAsync(ctx context.Context, groupName string) (result resources.GroupsDeleteFuture, err error)

	// CheckExistence checks whether a resource exists
	CheckExistence(ctx context.Context, resourceGroupName string) (result autorest.Response, err error)

	// also embed methods from AsyncClient
	resourcemanager.ARMClient
}

Jump to

Keyboard shortcuts

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