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/servicelinker/2024-04-01/connector
Documentation
The connector
SDK allows for interaction with the Azure Resource Manager Service servicelinker
(API Version 2024-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/servicelinker/2024-04-01/connector"
Client Initialization
client := connector.NewConnectorClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ConnectorClient.CreateDryrun
ctx := context.TODO()
id := connector.NewDryrunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "dryrunValue")
payload := connector.DryrunResource{
// ...
}
if err := client.CreateDryrunThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ConnectorClient.Delete
ctx := context.TODO()
id := connector.NewConnectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "connectorValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ConnectorClient.DeleteDryrun
ctx := context.TODO()
id := connector.NewDryrunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "dryrunValue")
read, err := client.DeleteDryrun(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConnectorClient.GenerateConfigurations
ctx := context.TODO()
id := connector.NewConnectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "connectorValue")
payload := connector.ConfigurationInfo{
// ...
}
read, err := client.GenerateConfigurations(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConnectorClient.GetDryrun
ctx := context.TODO()
id := connector.NewDryrunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "dryrunValue")
read, err := client.GetDryrun(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ConnectorClient.ListDryrun
ctx := context.TODO()
id := connector.NewLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue")
// alternatively `client.ListDryrun(ctx, id)` can be used to do batched pagination
items, err := client.ListDryrunComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ConnectorClient.Update
ctx := context.TODO()
id := connector.NewConnectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "connectorValue")
payload := connector.LinkerPatch{
// ...
}
if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ConnectorClient.UpdateDryrun
ctx := context.TODO()
id := connector.NewDryrunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "dryrunValue")
payload := connector.DryrunPatch{
// ...
}
if err := client.UpdateDryrunThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ConnectorClient.Validate
ctx := context.TODO()
id := connector.NewConnectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "connectorValue")
if err := client.ValidateThenPoll(ctx, id); err != nil {
// handle the error
}