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/digitaltwins/2023-01-31/privateendpoints
Documentation
The privateendpoints
SDK allows for interaction with the Azure Resource Manager Service digitaltwins
(API Version 2023-01-31
).
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/digitaltwins/2023-01-31/privateendpoints"
Client Initialization
client := privateendpoints.NewPrivateEndpointsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: PrivateEndpointsClient.PrivateEndpointConnectionsCreateOrUpdate
ctx := context.TODO()
id := privateendpoints.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "digitalTwinsInstanceValue", "privateEndpointConnectionValue")
payload := privateendpoints.PrivateEndpointConnection{
// ...
}
if err := client.PrivateEndpointConnectionsCreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: PrivateEndpointsClient.PrivateEndpointConnectionsDelete
ctx := context.TODO()
id := privateendpoints.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "digitalTwinsInstanceValue", "privateEndpointConnectionValue")
if err := client.PrivateEndpointConnectionsDeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: PrivateEndpointsClient.PrivateEndpointConnectionsGet
ctx := context.TODO()
id := privateendpoints.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "digitalTwinsInstanceValue", "privateEndpointConnectionValue")
read, err := client.PrivateEndpointConnectionsGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: PrivateEndpointsClient.PrivateEndpointConnectionsList
ctx := context.TODO()
id := privateendpoints.NewDigitalTwinsInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "digitalTwinsInstanceValue")
read, err := client.PrivateEndpointConnectionsList(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: PrivateEndpointsClient.PrivateLinkResourcesGet
ctx := context.TODO()
id := privateendpoints.NewResourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "digitalTwinsInstanceValue", "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")
read, err := client.PrivateLinkResourcesGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: PrivateEndpointsClient.PrivateLinkResourcesList
ctx := context.TODO()
id := privateendpoints.NewDigitalTwinsInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "digitalTwinsInstanceValue")
read, err := client.PrivateLinkResourcesList(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}