package
0.20240125.1100331
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev
# README
github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/virtualnetworkgateways
Documentation
The virtualnetworkgateways
SDK allows for interaction with the Azure Resource Manager Service network
(API Version 2023-04-01
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/virtualnetworkgateways"
Client Initialization
client := virtualnetworkgateways.NewVirtualNetworkGatewaysClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: VirtualNetworkGatewaysClient.CreateOrUpdate
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
payload := virtualnetworkgateways.VirtualNetworkGateway{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.Delete
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.DisconnectVirtualNetworkGatewayVpnConnections
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
payload := virtualnetworkgateways.P2SVpnConnectionRequest{
// ...
}
if err := client.DisconnectVirtualNetworkGatewayVpnConnectionsThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.GenerateVpnProfile
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
payload := virtualnetworkgateways.VpnClientParameters{
// ...
}
if err := client.GenerateVpnProfileThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.Generatevpnclientpackage
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
payload := virtualnetworkgateways.VpnClientParameters{
// ...
}
if err := client.GeneratevpnclientpackageThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.Get
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
read, err := client.Get(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: VirtualNetworkGatewaysClient.GetAdvertisedRoutes
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
if err := client.GetAdvertisedRoutesThenPoll(ctx, id, virtualnetworkgateways.DefaultGetAdvertisedRoutesOperationOptions()); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.GetBgpPeerStatus
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
if err := client.GetBgpPeerStatusThenPoll(ctx, id, virtualnetworkgateways.DefaultGetBgpPeerStatusOperationOptions()); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.GetLearnedRoutes
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
if err := client.GetLearnedRoutesThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.GetVpnProfilePackageUrl
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
if err := client.GetVpnProfilePackageUrlThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
if err := client.GetVpnclientConnectionHealthThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.GetVpnclientIPsecParameters
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
if err := client.GetVpnclientIPsecParametersThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.List
ctx := context.TODO()
id := virtualnetworkgateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")
// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: VirtualNetworkGatewaysClient.ListConnections
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
// alternatively `client.ListConnections(ctx, id)` can be used to do batched pagination
items, err := client.ListConnectionsComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: VirtualNetworkGatewaysClient.Reset
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
if err := client.ResetThenPoll(ctx, id, virtualnetworkgateways.DefaultResetOperationOptions()); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.ResetVpnClientSharedKey
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
if err := client.ResetVpnClientSharedKeyThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.SetVpnclientIPsecParameters
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
payload := virtualnetworkgateways.VpnClientIPsecParameters{
// ...
}
if err := client.SetVpnclientIPsecParametersThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.StartPacketCapture
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
payload := virtualnetworkgateways.VpnPacketCaptureStartParameters{
// ...
}
if err := client.StartPacketCaptureThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.StopPacketCapture
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
payload := virtualnetworkgateways.VpnPacketCaptureStopParameters{
// ...
}
if err := client.StopPacketCaptureThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.SupportedVpnDevices
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
read, err := client.SupportedVpnDevices(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: VirtualNetworkGatewaysClient.UpdateTags
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
payload := virtualnetworkgateways.TagsObject{
// ...
}
if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesCreateOrUpdate
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue")
payload := virtualnetworkgateways.VirtualNetworkGatewayNatRule{
// ...
}
if err := client.VirtualNetworkGatewayNatRulesCreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesDelete
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue")
if err := client.VirtualNetworkGatewayNatRulesDeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesGet
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue")
read, err := client.VirtualNetworkGatewayNatRulesGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway
ctx := context.TODO()
id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue")
// alternatively `client.VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway(ctx, id)` can be used to do batched pagination
items, err := client.VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: VirtualNetworkGatewaysClient.VpnDeviceConfigurationScript
ctx := context.TODO()
id := virtualnetworkgateways.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue")
payload := virtualnetworkgateways.VpnDeviceScriptParameters{
// ...
}
read, err := client.VpnDeviceConfigurationScript(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
NewConnectionID returns a new ConnectionId struct.
NewVirtualNetworkGatewayID returns a new VirtualNetworkGatewayId struct.
NewVirtualNetworkGatewayNatRuleID returns a new VirtualNetworkGatewayNatRuleId struct.
No description provided by the author
ParseConnectionID parses 'input' into a ConnectionId.
ParseConnectionIDInsensitively parses 'input' case-insensitively into a ConnectionId note: this method should only be used for API response data and not user input.
ParseVirtualNetworkGatewayID parses 'input' into a VirtualNetworkGatewayId.
ParseVirtualNetworkGatewayIDInsensitively parses 'input' case-insensitively into a VirtualNetworkGatewayId note: this method should only be used for API response data and not user input.
ParseVirtualNetworkGatewayNatRuleID parses 'input' into a VirtualNetworkGatewayNatRuleId.
ParseVirtualNetworkGatewayNatRuleIDInsensitively parses 'input' case-insensitively into a VirtualNetworkGatewayNatRuleId note: this method should only be used for API response data and not user input.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ValidateConnectionID checks that 'input' can be parsed as a Connection ID.
ValidateVirtualNetworkGatewayID checks that 'input' can be parsed as a Virtual Network Gateway ID.
ValidateVirtualNetworkGatewayNatRuleID checks that 'input' can be parsed as a Virtual Network Gateway Nat Rule ID.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ConnectionId is a struct representing the Resource ID for a Connection.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
VirtualNetworkGatewayId is a struct representing the Resource ID for a Virtual Network Gateway.
No description provided by the author
No description provided by the author
No description provided by the author
VirtualNetworkGatewayNatRuleId is a struct representing the Resource ID for a Virtual Network Gateway Nat Rule.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author