forked from Azure/aks-engine
/
armtype.go
144 lines (117 loc) · 4.16 KB
/
armtype.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
package engine
import (
"encoding/json"
"github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb"
"github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault"
sysauth "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization"
"github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization"
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources"
"github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
)
// ARMResource contains the fields that are common to all Azure Resource Manager objects.
type ARMResource struct {
APIVersion string `json:"apiVersion,omitempty"`
Copy map[string]string `json:"copy,omitempty"`
DependsOn []string `json:"dependsOn,omitempty"`
}
// DeploymentARMResource is an alias for the ARMResource type to avoid MarshalJSON override
type DeploymentARMResource ARMResource
// MarshalJSON is the custom marshaler for an ARMResource.
func (arm ARMResource) MarshalJSON() ([]byte, error) {
return json.Marshal(arm)
}
// VirtualMachineARM embeds the ARMResource type in compute.VirtualMachine.
type VirtualMachineARM struct {
ARMResource
compute.VirtualMachine
}
// VirtualMachineScaleSetARM embeds the ARMResource type in compute.VirtualMachineScaleSet.
type VirtualMachineScaleSetARM struct {
ARMResource
compute.VirtualMachineScaleSet
}
// VirtualMachineExtensionARM embeds the ARMResource type in compute.VirtualMachineExtension.
type VirtualMachineExtensionARM struct {
ARMResource
compute.VirtualMachineExtension
}
// RoleAssignmentARM embeds the ARMResource type in authorization.RoleAssignment.
type RoleAssignmentARM struct {
ARMResource
authorization.RoleAssignment
}
// AvailabilitySetARM embeds the ARMResource type in compute.AvailabilitySet.
type AvailabilitySetARM struct {
ARMResource
compute.AvailabilitySet
}
// StorageAccountARM embeds the ARMResource type in storage.Account.
type StorageAccountARM struct {
ARMResource
storage.Account
}
// SystemRoleAssignmentARM embeds the ARMResource type in authorization.SystemRoleAssignment(2018-01-01-preview).
type SystemRoleAssignmentARM struct {
ARMResource
sysauth.RoleAssignment
}
// VirtualNetworkARM embeds the ARMResource type in network.VirtualNetwork.
type VirtualNetworkARM struct {
ARMResource
network.VirtualNetwork
}
// NetworkSecurityGroupARM embeds the ARMResource type in network.SecurityGroup.
type NetworkSecurityGroupARM struct {
ARMResource
network.SecurityGroup
}
// RouteTableARM embeds the ARMResource type in network.RouteTable.
type RouteTableARM struct {
ARMResource
network.RouteTable
}
// PublicIPAddressARM embeds the ARMResource type in network.PublicIPAddress.
type PublicIPAddressARM struct {
ARMResource
network.PublicIPAddress
}
// LoadBalancerARM embeds the ARMResource type in network.LoadBalancer.
type LoadBalancerARM struct {
ARMResource
network.LoadBalancer
}
// NetworkInterfaceARM embeds the ARMResource type in network.Interface.
type NetworkInterfaceARM struct {
ARMResource
network.Interface
}
// DocumentDBAccountARM embeds the ARMResource type in documentdb.DatabaseAccountCreateUpdateParameters.
type DocumentDBAccountARM struct {
ARMResource
documentdb.DatabaseAccountCreateUpdateParameters
}
// KeyVaultARM embeds the ARMResource type in keyvault.Vault.
type KeyVaultARM struct {
ARMResource
keyvault.Vault
}
// UserAssignedIdentitiesARM embeds the ARMResource type in msi.Identity.
type UserAssignedIdentitiesARM struct {
ARMResource
msi.Identity
}
// ImageARM embeds the ARMResource type in compute.Image.
type ImageARM struct {
ARMResource
compute.Image
}
// DeploymentARM embeds the ARMResource type in resources.DeploymentExtended.
type DeploymentARM struct {
DeploymentARMResource
resources.DeploymentExtended
}