azure

package
v0.0.0-...-8488f5b Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONAPIResource = "https://management.azure.com/"
	XMLAPIResource  = "https://management.core.windows.net/"
)

Variables

This section is empty.

Functions

func OAuth2Config

func OAuth2Config(clientID, tokenExchangeURL, resource string) *oauth2.Config

Types

type Client

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

func NewClient

func NewClient(jsonClient, xmlClient *http.Client) *Client

func (*Client) CreateResourceGroup

func (c *Client) CreateResourceGroup(rg *ResourceGroup) (*ResourceGroup, error)

func (*Client) CreateTemplateDeployment

func (c *Client) CreateTemplateDeployment(tdr *TemplateDeploymentRequest) (*TemplateDeploymentResponse, error)

func (*Client) DeleteResourceGroup

func (c *Client) DeleteResourceGroup(subscriptionID, resourceGroupName string) error

func (*Client) Get

func (c *Client) Get(path string, properties interface{}) error

func (*Client) ListLocations

func (c *Client) ListLocations(providerNamespace, resourceType string) ([]string, error)

func (*Client) ListSubscriptions

func (c *Client) ListSubscriptions() ([]Subscription, error)

func (*Client) WaitForTemplateDeployment

func (c *Client) WaitForTemplateDeployment(subscriptionID, resourceGroupName, deploymentName string, outputs interface{}) error

type ResourceGroup

type ResourceGroup struct {
	SubscriptionID string            `json:"-"`
	ID             string            `json:"id,omitempty"`
	Name           string            `json:"name,omitempty"`
	Location       string            `json:"location"`
	Tags           map[string]string `json:"tags,omitempty"`
	Properties     map[string]string `json:"properties,omitempty"`
}

type Subscription

type Subscription struct {
	ID     string `xml:"SubscriptionID" json:"id"`
	Name   string `xml:"SubscriptionName" json:"name"`
	Status string `xml:"SubscriptionStatus" json:"status"`
}

type TemplateDeploymentRequest

type TemplateDeploymentRequest struct {
	SubscriptionID    string                    `json:"-"`
	ResourceGroupName string                    `json:"-"`
	Name              string                    `json:"-"`
	Parameters        map[string]*TemplateParam `json:"parameters"`
	Template          json.RawMessage           `json:"template"`
	Mode              string                    `json:"mode"`
}

type TemplateDeploymentResponse

type TemplateDeploymentResponse struct {
	ID                string
	Name              string
	Parameters        map[string]*json.RawMessage `json:"parameters"`
	Mode              string                      `json:"mode"`
	ProvisioningState string                      `json:"provisioningState"`
	Timestamp         *time.Time                  `json:"timestamp"`
	CorrelationID     string                      `json:"correlationId"`
	Outputs           json.RawMessage             `json:"outputs"`
	Providers         json.RawMessage             `json:"providers"`
	Dependencies      json.RawMessage             `json:"dependencies"`
}

type TemplateParam

type TemplateParam struct {
	Value json.RawMessage `json:"value"`
}

func MustTemplateParam

func MustTemplateParam(v interface{}) *TemplateParam

Jump to

Keyboard shortcuts

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