Categorygithub.com/hashicorp/go-azure-sdk/resource-managerdesktopvirtualization2022-02-10-previewprivatelink
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/desktopvirtualization/2022-02-10-preview/privatelink
Documentation
The privatelink
SDK allows for interaction with the Azure Resource Manager Service desktopvirtualization
(API Version 2022-02-10-preview
).
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/desktopvirtualization/2022-02-10-preview/privatelink"
Client Initialization
client := privatelink.NewPrivateLinkClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: PrivateLinkClient.PrivateEndpointConnectionsDeleteByHostPool
ctx := context.TODO()
id := privatelink.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue", "privateEndpointConnectionValue")
read, err := client.PrivateEndpointConnectionsDeleteByHostPool(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: PrivateLinkClient.PrivateEndpointConnectionsDeleteByWorkspace
ctx := context.TODO()
id := privatelink.NewWorkspacePrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "privateEndpointConnectionValue")
read, err := client.PrivateEndpointConnectionsDeleteByWorkspace(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: PrivateLinkClient.PrivateEndpointConnectionsGetByHostPool
ctx := context.TODO()
id := privatelink.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue", "privateEndpointConnectionValue")
read, err := client.PrivateEndpointConnectionsGetByHostPool(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: PrivateLinkClient.PrivateEndpointConnectionsGetByWorkspace
ctx := context.TODO()
id := privatelink.NewWorkspacePrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "privateEndpointConnectionValue")
read, err := client.PrivateEndpointConnectionsGetByWorkspace(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: PrivateLinkClient.PrivateEndpointConnectionsListByHostPool
ctx := context.TODO()
id := privatelink.NewHostPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue")
// alternatively `client.PrivateEndpointConnectionsListByHostPool(ctx, id)` can be used to do batched pagination
items, err := client.PrivateEndpointConnectionsListByHostPoolComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: PrivateLinkClient.PrivateEndpointConnectionsListByWorkspace
ctx := context.TODO()
id := privatelink.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
// alternatively `client.PrivateEndpointConnectionsListByWorkspace(ctx, id)` can be used to do batched pagination
items, err := client.PrivateEndpointConnectionsListByWorkspaceComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: PrivateLinkClient.PrivateEndpointConnectionsUpdateByHostPool
ctx := context.TODO()
id := privatelink.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue", "privateEndpointConnectionValue")
payload := privatelink.PrivateEndpointConnection{
// ...
}
read, err := client.PrivateEndpointConnectionsUpdateByHostPool(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: PrivateLinkClient.PrivateEndpointConnectionsUpdateByWorkspace
ctx := context.TODO()
id := privatelink.NewWorkspacePrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "privateEndpointConnectionValue")
payload := privatelink.PrivateEndpointConnection{
// ...
}
read, err := client.PrivateEndpointConnectionsUpdateByWorkspace(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: PrivateLinkClient.ResourcesListByHostPool
ctx := context.TODO()
id := privatelink.NewHostPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue")
// alternatively `client.ResourcesListByHostPool(ctx, id)` can be used to do batched pagination
items, err := client.ResourcesListByHostPoolComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: PrivateLinkClient.ResourcesListByWorkspace
ctx := context.TODO()
id := privatelink.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
// alternatively `client.ResourcesListByWorkspace(ctx, id)` can be used to do batched pagination
items, err := client.ResourcesListByWorkspaceComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}