resourcegroups

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package resourcegroups provides tools for interacting with the Azure Resource Manager resource groups API.

Index

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 is a client for interacting with Azure resource groups.

Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines.

func NewClient

func NewClient(auth *azure.Authentication, extraUserAgent string, retryConfig azure.HTTPRetryConfig) (*Client, error)

NewClient creates a new Azure resource groups client.

func (*Client) CreateResourceGroup

func (c *Client) CreateResourceGroup(resourceGroup string, properties Group) (*Group, error)

CreateResourceGroup creates a new Azure resource group with the provided properties. From: https://docs.microsoft.com/en-us/rest/api/resources/resourcegroups/createorupdate

func (*Client) DeleteResourceGroup

func (c *Client) DeleteResourceGroup(resourceGroup string) error

DeleteResourceGroup deletes an Azure resource group. From: https://docs.microsoft.com/en-us/rest/api/resources/resourcegroups/delete

func (*Client) GetResourceGroup

func (c *Client) GetResourceGroup(resourceGroup string) (*Group, error)

GetResourceGroup gets an Azure resource group. From: https://docs.microsoft.com/en-us/rest/api/resources/ResourceGroups/Get

func (*Client) ResourceGroupExists

func (c *Client) ResourceGroupExists(resourceGroup string) (bool, error)

ResourceGroupExists checks if an Azure resource group exists. From: https://docs.microsoft.com/en-us/rest/api/resources/resourcegroups/checkexistence

func (*Client) UpdateResourceGroup

func (c *Client) UpdateResourceGroup(resourceGroup string, properties Group) (*Group, error)

UpdateResourceGroup updates an Azure resource group with the provided properties. From: https://docs.microsoft.com/en-us/rest/api/resources/resourcegroups/createorupdate

type Group

type Group struct {
	api.ResponseMetadata `json:"-"`
	ID                   string            `json:"id,omitempty"`
	Name                 string            `json:"name,omitempty"`
	Properties           *GroupProperties  `json:"properties,omitempty"`
	Location             string            `json:"location,omitempty"`
	ManagedBy            string            `json:"managedBy,omitempty"`
	Tags                 map[string]string `json:"tags,omitempty"`
}

Group holds resource group information.

type GroupProperties

type GroupProperties struct {
	ProvisioningState string `json:"provisioningState,omitempty"`
}

GroupProperties deines the properties for an Azure resource group.

Jump to

Keyboard shortcuts

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