template

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2016 License: MPL-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const BasicTemplate = `` /* 4546-byte string literal not displayed */
View Source
const KeyVault = `` /* 1663-byte string literal not displayed */

Template to deploy a KeyVault.

This template is still hard-coded unlike the ARM templates used for VMs for a couple of reasons.

  1. The SDK defines no types for a Key Vault
  2. The Key Vault template is relatively simple, and is static.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessPolicies

type AccessPolicies struct {
	ObjectId    *string      `json:"objectId,omitempty"`
	TenantId    *string      `json:"tenantId,omitempty"`
	Permissions *Permissions `json:"permissions,omitempty"`
}

type Parameters

type Parameters struct {
	Type         *string `json:"type"`
	DefaultValue *string `json:"defaultValue,omitempty"`
}

/////////////////////////////////////////////// Template > Parameters

type Permissions

type Permissions struct {
	Keys    *[]string `json:"keys,omitempty"`
	Secrets *[]string `json:"secrets,omitempty"`
}

type Properties

type Properties struct {
	AccessPolicies               *[]AccessPolicies                   `json:"accessPolicies,omitempty"`
	AddressSpace                 *network.AddressSpace               `json:"addressSpace,omitempty"`
	DiagnosticsProfile           *compute.DiagnosticsProfile         `json:"diagnosticsProfile,omitempty"`
	DNSSettings                  *network.PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
	EnabledForDeployment         *string                             `json:"enabledForDeployment,omitempty"`
	EnabledForTemplateDeployment *string                             `json:"enabledForTemplateDeployment,omitempty"`
	HardwareProfile              *compute.HardwareProfile            `json:"hardwareProfile,omitempty"`
	IPConfigurations             *[]network.IPConfiguration          `json:"ipConfigurations,omitempty"`
	NetworkProfile               *compute.NetworkProfile             `json:"networkProfile,omitempty"`
	OsProfile                    *compute.OSProfile                  `json:"osProfile,omitempty"`
	PublicIPAllocatedMethod      *network.IPAllocationMethod         `json:"publicIPAllocationMethod,omitempty"`
	Sku                          *Sku                                `json:"sku,omitempty"`
	StorageProfile               *compute.StorageProfile             `json:"storageProfile,omitempty"`
	Subnets                      *[]network.Subnet                   `json:"subnets,omitempty"`
	TenantId                     *string                             `json:"tenantId,omitempty"`
	Value                        *string                             `json:"value,omitempty"`
}

/////////////////////////////////////////////// Template > Resource > Properties

type Resource

type Resource struct {
	ApiVersion *string             `json:"apiVersion"`
	Name       *string             `json:"name"`
	Type       *string             `json:"type"`
	Location   *string             `json:"location,omitempty"`
	DependsOn  *[]string           `json:"dependsOn,omitempty"`
	Properties *Properties         `json:"properties,omitempty"`
	Tags       *map[string]*string `json:"tags,omitempty"`
	Resources  *[]Resource         `json:"resources,omitempty"`
}

/////////////////////////////////////////////// Template > Resource

type Sku

type Sku struct {
	Family *string `json:"family,omitempty"`
	Name   *string `json:"name,omitempty"`
}

type Template

type Template struct {
	Schema         *string                `json:"$schema"`
	ContentVersion *string                `json:"contentVersion"`
	Parameters     *map[string]Parameters `json:"parameters"`
	Variables      *map[string]string     `json:"variables"`
	Resources      *[]Resource            `json:"resources"`
}

/////////////////////////////////////////////// Template

type TemplateBuilder

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

func NewTemplateBuilder

func NewTemplateBuilder(template string) (*TemplateBuilder, error)

func (*TemplateBuilder) BuildLinux

func (s *TemplateBuilder) BuildLinux(sshAuthorizedKey string) error

func (*TemplateBuilder) BuildWindows

func (s *TemplateBuilder) BuildWindows(keyVaultName, winRMCertificateUrl string) error

func (*TemplateBuilder) SetCustomData

func (s *TemplateBuilder) SetCustomData(customData string) error

func (*TemplateBuilder) SetImageUrl

func (s *TemplateBuilder) SetImageUrl(imageUrl string, osType compute.OperatingSystemTypes) error

func (*TemplateBuilder) SetMarketPlaceImage

func (s *TemplateBuilder) SetMarketPlaceImage(publisher, offer, sku, version string) error

func (*TemplateBuilder) SetOSDiskSizeGB

func (s *TemplateBuilder) SetOSDiskSizeGB(diskSizeGB int32) error

func (*TemplateBuilder) SetTags

func (s *TemplateBuilder) SetTags(tags *map[string]*string) error

func (*TemplateBuilder) SetVirtualNetwork

func (s *TemplateBuilder) SetVirtualNetwork(virtualNetworkResourceGroup, virtualNetworkName, subnetName string) error

func (*TemplateBuilder) ToJSON

func (s *TemplateBuilder) ToJSON() (*string, error)

type TemplateParameter

type TemplateParameter struct {
	Value string `json:"value"`
}

type TemplateParameters

type TemplateParameters struct {
	AdminUsername              *TemplateParameter `json:"adminUsername,omitempty"`
	AdminPassword              *TemplateParameter `json:"adminPassword,omitempty"`
	DnsNameForPublicIP         *TemplateParameter `json:"dnsNameForPublicIP,omitempty"`
	KeyVaultName               *TemplateParameter `json:"keyVaultName,omitempty"`
	KeyVaultSecretValue        *TemplateParameter `json:"keyVaultSecretValue,omitempty"`
	ObjectId                   *TemplateParameter `json:"objectId,omitempty"`
	OSDiskName                 *TemplateParameter `json:"osDiskName,omitempty"`
	StorageAccountBlobEndpoint *TemplateParameter `json:"storageAccountBlobEndpoint,omitempty"`
	TenantId                   *TemplateParameter `json:"tenantId,omitempty"`
	VMSize                     *TemplateParameter `json:"vmSize,omitempty"`
	VMName                     *TemplateParameter `json:"vmName,omitempty"`
}

Jump to

Keyboard shortcuts

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