2016-05-21 02:01:16 -04:00
|
|
|
package template
|
|
|
|
|
|
|
|
import (
|
2018-04-06 04:12:58 -04:00
|
|
|
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute"
|
|
|
|
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network"
|
2016-05-21 02:01:16 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////
|
|
|
|
// 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 > Parameters
|
|
|
|
type Parameters struct {
|
|
|
|
Type *string `json:"type"`
|
|
|
|
DefaultValue *string `json:"defaultValue,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////
|
|
|
|
// Template > Resource
|
|
|
|
type Resource struct {
|
2016-07-29 17:17:33 -04:00
|
|
|
ApiVersion *string `json:"apiVersion"`
|
|
|
|
Name *string `json:"name"`
|
|
|
|
Type *string `json:"type"`
|
|
|
|
Location *string `json:"location,omitempty"`
|
|
|
|
DependsOn *[]string `json:"dependsOn,omitempty"`
|
2018-03-05 04:27:52 -05:00
|
|
|
Plan *Plan `json:"plan,omitempty"`
|
2016-07-29 17:17:33 -04:00
|
|
|
Properties *Properties `json:"properties,omitempty"`
|
|
|
|
Tags *map[string]*string `json:"tags,omitempty"`
|
|
|
|
Resources *[]Resource `json:"resources,omitempty"`
|
2020-05-20 23:39:28 -04:00
|
|
|
Identity *Identity `json:"identity,omitempty"`
|
2016-05-21 02:01:16 -04:00
|
|
|
}
|
|
|
|
|
2018-03-05 04:27:52 -05:00
|
|
|
type Plan struct {
|
|
|
|
Name *string `json:"name"`
|
|
|
|
Product *string `json:"product"`
|
|
|
|
Publisher *string `json:"publisher"`
|
|
|
|
PromotionCode *string `json:"promotionCode,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-06-09 14:59:46 -04:00
|
|
|
type OSDiskUnion struct {
|
|
|
|
OsType compute.OperatingSystemTypes `json:"osType,omitempty"`
|
|
|
|
OsState compute.OperatingSystemStateTypes `json:"osState,omitempty"`
|
|
|
|
BlobURI *string `json:"blobUri,omitempty"`
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
Vhd *compute.VirtualHardDisk `json:"vhd,omitempty"`
|
|
|
|
Image *compute.VirtualHardDisk `json:"image,omitempty"`
|
|
|
|
Caching compute.CachingTypes `json:"caching,omitempty"`
|
|
|
|
CreateOption compute.DiskCreateOptionTypes `json:"createOption,omitempty"`
|
|
|
|
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
|
2017-08-13 04:45:04 -04:00
|
|
|
ManagedDisk *compute.ManagedDiskParameters `json:"managedDisk,omitempty"`
|
2017-06-09 14:59:46 -04:00
|
|
|
}
|
|
|
|
|
2018-02-23 18:34:13 -05:00
|
|
|
type DataDiskUnion struct {
|
|
|
|
Lun *int `json:"lun,omitempty"`
|
|
|
|
BlobURI *string `json:"blobUri,omitempty"`
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
Vhd *compute.VirtualHardDisk `json:"vhd,omitempty"`
|
|
|
|
Image *compute.VirtualHardDisk `json:"image,omitempty"`
|
|
|
|
Caching compute.CachingTypes `json:"caching,omitempty"`
|
|
|
|
CreateOption compute.DiskCreateOptionTypes `json:"createOption,omitempty"`
|
|
|
|
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
|
|
|
|
ManagedDisk *compute.ManagedDiskParameters `json:"managedDisk,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-06-09 14:59:46 -04:00
|
|
|
// Union of the StorageProfile and ImageStorageProfile types.
|
|
|
|
type StorageProfileUnion struct {
|
|
|
|
ImageReference *compute.ImageReference `json:"imageReference,omitempty"`
|
|
|
|
OsDisk *OSDiskUnion `json:"osDisk,omitempty"`
|
2018-02-23 18:34:13 -05:00
|
|
|
DataDisks *[]DataDiskUnion `json:"dataDisks,omitempty"`
|
2017-06-09 14:59:46 -04:00
|
|
|
}
|
|
|
|
|
2016-05-21 02:01:16 -04:00
|
|
|
/////////////////////////////////////////////////
|
|
|
|
// Template > Resource > Properties
|
|
|
|
type Properties struct {
|
2016-07-29 17:17:33 -04:00
|
|
|
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"`
|
2017-06-09 14:59:46 -04:00
|
|
|
//StorageProfile3 *compute.StorageProfile `json:"storageProfile,omitempty"`
|
2019-10-08 17:56:43 -04:00
|
|
|
StorageProfile *StorageProfileUnion `json:"storageProfile,omitempty"`
|
|
|
|
Subnets *[]network.Subnet `json:"subnets,omitempty"`
|
|
|
|
SecurityRules *[]network.SecurityRule `json:"securityRules,omitempty"`
|
|
|
|
TenantId *string `json:"tenantId,omitempty"`
|
|
|
|
Value *string `json:"value,omitempty"`
|
2016-07-29 17:17:33 -04:00
|
|
|
}
|
|
|
|
|
2020-05-20 23:39:28 -04:00
|
|
|
// Template > Resource > Identity
|
|
|
|
type Identity struct {
|
|
|
|
Type *string `json:"type,omitempty"`
|
|
|
|
UserAssignedIdentities map[string]*UserAssignedIdentitiesValue `json:"userAssignedIdentities"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UserAssignedIdentitiesValue struct {
|
|
|
|
PrincipalId *string `json:"principalId,omitempty"`
|
|
|
|
ClientId *string `json:"clientId,omitempty"`
|
|
|
|
}
|
|
|
|
|
2016-07-29 17:17:33 -04:00
|
|
|
type AccessPolicies struct {
|
|
|
|
ObjectId *string `json:"objectId,omitempty"`
|
|
|
|
TenantId *string `json:"tenantId,omitempty"`
|
|
|
|
Permissions *Permissions `json:"permissions,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Permissions struct {
|
|
|
|
Keys *[]string `json:"keys,omitempty"`
|
|
|
|
Secrets *[]string `json:"secrets,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Sku struct {
|
|
|
|
Family *string `json:"family,omitempty"`
|
|
|
|
Name *string `json:"name,omitempty"`
|
2016-05-21 02:01:16 -04:00
|
|
|
}
|