-
Notifications
You must be signed in to change notification settings - Fork 11
/
VendorNfGet.go
86 lines (83 loc) · 3.91 KB
/
VendorNfGet.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
package armhybridnetwork_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorNfGet.json
func ExampleVendorNetworkFunctionsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewVendorNetworkFunctionsClient().Get(ctx, "eastus", "testVendor", "testServiceKey", 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.VendorNetworkFunction = armhybridnetwork.VendorNetworkFunction{
// Name: to.Ptr("testServiceKey"),
// Type: to.Ptr("Microsoft.HybridNetwork/locations/vendors/networkFunctions"),
// ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/locations/eastus/vendors/testVendor/networkFunctions/testServiceKey"),
// Properties: &armhybridnetwork.VendorNetworkFunctionPropertiesFormat{
// NetworkFunctionVendorConfigurations: []*armhybridnetwork.NetworkFunctionVendorConfiguration{
// {
// NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
// {
// IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
// {
// Gateway: to.Ptr(""),
// IPAddress: to.Ptr(""),
// IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
// IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
// Subnet: to.Ptr(""),
// }},
// MacAddress: to.Ptr(""),
// NetworkInterfaceName: to.Ptr("nic1"),
// VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
// },
// {
// IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
// {
// Gateway: to.Ptr(""),
// IPAddress: to.Ptr(""),
// IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
// IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
// Subnet: to.Ptr(""),
// }},
// MacAddress: to.Ptr("DC-97-F8-79-16-7D"),
// NetworkInterfaceName: to.Ptr("nic2"),
// VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeWan),
// }},
// OSProfile: &armhybridnetwork.OsProfile{
// AdminUsername: to.Ptr("dummyuser"),
// CustomData: to.Ptr("base-64 encoded string of custom data"),
// LinuxConfiguration: &armhybridnetwork.LinuxConfiguration{
// SSH: &armhybridnetwork.SSHConfiguration{
// PublicKeys: []*armhybridnetwork.SSHPublicKey{
// {
// Path: to.Ptr("home/user/.ssh/authorized_keys"),
// KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAwrr66r8n6B8Y0zMF3dOpXEapIQD9DiYQ6D6/zwor9o39jSkHNiMMER/GETBbzP83LOcekm02aRjo55ArO7gPPVvCXbrirJu9pkm4AC4BBre5xSLS= user@constoso-DSH"),
// }},
// },
// },
// },
// RoleName: to.Ptr("testRole"),
// UserDataParameters: map[string]any{
// },
// }},
// ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
// SKUName: to.Ptr("testSku"),
// SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
// VendorProvisioningState: to.Ptr(armhybridnetwork.VendorProvisioningStateProvisioning),
// },
// }
}