/
compute.go
68 lines (54 loc) · 1.68 KB
/
compute.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
// Code generated by go generate; DO NOT EDIT.
// This file was generated by robots at
// 2019-09-18 18:26:03.958204026 -0500 CDT m=+0.000175229
package azure_resources
import (
"context"
"github.com/Azure/azure-sdk-for-go/profiles/latest/compute/mgmt/compute"
"github.com/Azure/go-autorest/autorest"
)
type ComputeVirtualMachines struct {
subscriptionID string
groupName string
resourceName *string
authorizer autorest.Authorizer
}
func (r *ComputeVirtualMachines) GetProperties() ([]byte, error) {
client := compute.NewVirtualMachinesClient(r.subscriptionID)
client.Authorizer = r.authorizer
resource, err := client.Get(context.Background(), r.groupName, *r.resourceName, "")
if err != nil {
return []byte{}, err
}
return resource.MarshalJSON()
}
type ComputeVirtualMachineExtensions struct {
subscriptionID string
groupName string
resourceName *string
authorizer autorest.Authorizer
}
func (r *ComputeVirtualMachineExtensions) GetProperties() ([]byte, error) {
client := compute.NewVirtualMachineExtensionsClient(r.subscriptionID)
client.Authorizer = r.authorizer
resource, err := client.Get(context.Background(), r.groupName, *r.resourceName, "", "")
if err != nil {
return []byte{}, err
}
return resource.MarshalJSON()
}
type ComputeDisks struct {
subscriptionID string
groupName string
resourceName *string
authorizer autorest.Authorizer
}
func (r *ComputeDisks) GetProperties() ([]byte, error) {
client := compute.NewDisksClient(r.subscriptionID)
client.Authorizer = r.authorizer
resource, err := client.Get(context.Background(), r.groupName, *r.resourceName)
if err != nil {
return []byte{}, err
}
return resource.MarshalJSON()
}