package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev

# README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkmanagerconnections Documentation

The networkmanagerconnections SDK allows for interaction with the Azure Resource Manager Service network (API Version 2024-01-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkmanagerconnections"

Client Initialization

client := networkmanagerconnections.NewNetworkManagerConnectionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsCreateOrUpdate

ctx := context.TODO()
id := networkmanagerconnections.NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue")

payload := networkmanagerconnections.NetworkManagerConnection{
	// ...
}


read, err := client.ManagementGroupNetworkManagerConnectionsCreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsDelete

ctx := context.TODO()
id := networkmanagerconnections.NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue")

read, err := client.ManagementGroupNetworkManagerConnectionsDelete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsGet

ctx := context.TODO()
id := networkmanagerconnections.NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue")

read, err := client.ManagementGroupNetworkManagerConnectionsGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsList

ctx := context.TODO()
id := commonids.NewManagementGroupID("groupIdValue")

// alternatively `client.ManagementGroupNetworkManagerConnectionsList(ctx, id, networkmanagerconnections.DefaultManagementGroupNetworkManagerConnectionsListOperationOptions())` can be used to do batched pagination
items, err := client.ManagementGroupNetworkManagerConnectionsListComplete(ctx, id, networkmanagerconnections.DefaultManagementGroupNetworkManagerConnectionsListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsCreateOrUpdate

ctx := context.TODO()
id := networkmanagerconnections.NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue")

payload := networkmanagerconnections.NetworkManagerConnection{
	// ...
}


read, err := client.SubscriptionNetworkManagerConnectionsCreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsDelete

ctx := context.TODO()
id := networkmanagerconnections.NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue")

read, err := client.SubscriptionNetworkManagerConnectionsDelete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsGet

ctx := context.TODO()
id := networkmanagerconnections.NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue")

read, err := client.SubscriptionNetworkManagerConnectionsGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsList

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.SubscriptionNetworkManagerConnectionsList(ctx, id, networkmanagerconnections.DefaultSubscriptionNetworkManagerConnectionsListOperationOptions())` can be used to do batched pagination
items, err := client.SubscriptionNetworkManagerConnectionsListComplete(ctx, id, networkmanagerconnections.DefaultSubscriptionNetworkManagerConnectionsListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}