-
Notifications
You must be signed in to change notification settings - Fork 11
/
VolumeGroups_Get.go
120 lines (117 loc) · 7.34 KB
/
VolumeGroups_Get.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
package armnetapp_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v4"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-09-01/examples/VolumeGroups_Get.json
func ExampleVolumeGroupsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetapp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewVolumeGroupsClient().Get(ctx, "myRG", "account1", "group1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.VolumeGroupDetails = armnetapp.VolumeGroupDetails{
// Name: to.Ptr("group1"),
// Type: to.Ptr("Microsoft.NetApp/netAppAccounts/volumeGroups"),
// ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/volumeGroups/group1"),
// Location: to.Ptr("eastus"),
// Properties: &armnetapp.VolumeGroupProperties{
// GroupMetaData: &armnetapp.VolumeGroupMetaData{
// ApplicationIdentifier: to.Ptr("DEV"),
// ApplicationType: to.Ptr(armnetapp.ApplicationTypeSAPHANA),
// GroupDescription: to.Ptr("Volume group"),
// VolumesCount: to.Ptr[int64](5),
// },
// ProvisioningState: to.Ptr("Succeeded"),
// Volumes: []*armnetapp.VolumeGroupVolumeProperties{
// {
// Name: to.Ptr("account1/pool1/test-data-mnt00001"),
// Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"),
// ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-data-mnt00001"),
// Properties: &armnetapp.VolumeProperties{
// CreationToken: to.Ptr("test-data-mnt00001"),
// ProvisioningState: to.Ptr("Succeeded"),
// ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"),
// ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium),
// SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"),
// ThroughputMibps: to.Ptr[float32](10),
// UsageThreshold: to.Ptr[int64](107374182400),
// VolumeSpecName: to.Ptr("data"),
// },
// },
// {
// Name: to.Ptr("account1/pool1/test-log-mnt00001"),
// Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"),
// ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-log-mnt00001"),
// Properties: &armnetapp.VolumeProperties{
// CreationToken: to.Ptr("test-log-mnt00001"),
// ProvisioningState: to.Ptr("Succeeded"),
// ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"),
// ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium),
// SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"),
// ThroughputMibps: to.Ptr[float32](10),
// UsageThreshold: to.Ptr[int64](107374182400),
// VolumeSpecName: to.Ptr("log"),
// },
// },
// {
// Name: to.Ptr("account1/pool1/test-shared"),
// Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"),
// ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-shared"),
// Properties: &armnetapp.VolumeProperties{
// CreationToken: to.Ptr("test-shared"),
// ProvisioningState: to.Ptr("Succeeded"),
// ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"),
// ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium),
// SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"),
// ThroughputMibps: to.Ptr[float32](10),
// UsageThreshold: to.Ptr[int64](107374182400),
// VolumeSpecName: to.Ptr("shared"),
// },
// },
// {
// Name: to.Ptr("account1/pool1/test-data-backup"),
// Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"),
// ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-data-backup"),
// Properties: &armnetapp.VolumeProperties{
// CreationToken: to.Ptr("test-log-backup"),
// ProvisioningState: to.Ptr("Succeeded"),
// ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"),
// ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium),
// SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"),
// ThroughputMibps: to.Ptr[float32](10),
// UsageThreshold: to.Ptr[int64](107374182400),
// VolumeSpecName: to.Ptr("data-backup"),
// },
// },
// {
// Name: to.Ptr("account1/pool1/test-log-backup"),
// Type: to.Ptr("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"),
// ID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-log-backup"),
// Properties: &armnetapp.VolumeProperties{
// CreationToken: to.Ptr("test-data-backup"),
// ProvisioningState: to.Ptr("Succeeded"),
// ProximityPlacementGroup: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"),
// ServiceLevel: to.Ptr(armnetapp.ServiceLevelPremium),
// SubnetID: to.Ptr("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"),
// ThroughputMibps: to.Ptr[float32](10),
// UsageThreshold: to.Ptr[int64](107374182400),
// VolumeSpecName: to.Ptr("log-backup"),
// },
// }},
// },
// }
}