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/datashare/2021-08-01/sharesubscription
Documentation
The sharesubscription
SDK allows for interaction with the Azure Resource Manager Service datashare
(API Version 2021-08-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/datashare/2021-08-01/sharesubscription"
Client Initialization
client := sharesubscription.NewShareSubscriptionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ShareSubscriptionClient.CancelSynchronization
ctx := context.TODO()
id := sharesubscription.NewShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareSubscriptionValue")
payload := sharesubscription.ShareSubscriptionSynchronization{
// ...
}
if err := client.CancelSynchronizationThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ShareSubscriptionClient.ConsumerSourceDataSetsListByShareSubscription
ctx := context.TODO()
id := sharesubscription.NewShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareSubscriptionValue")
// alternatively `client.ConsumerSourceDataSetsListByShareSubscription(ctx, id)` can be used to do batched pagination
items, err := client.ConsumerSourceDataSetsListByShareSubscriptionComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ShareSubscriptionClient.Create
ctx := context.TODO()
id := sharesubscription.NewShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareSubscriptionValue")
payload := sharesubscription.ShareSubscription{
// ...
}
read, err := client.Create(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ShareSubscriptionClient.Delete
ctx := context.TODO()
id := sharesubscription.NewShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareSubscriptionValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ShareSubscriptionClient.Get
ctx := context.TODO()
id := sharesubscription.NewShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareSubscriptionValue")
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: ShareSubscriptionClient.ListByAccount
ctx := context.TODO()
id := sharesubscription.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue")
// alternatively `client.ListByAccount(ctx, id, sharesubscription.DefaultListByAccountOperationOptions())` can be used to do batched pagination
items, err := client.ListByAccountComplete(ctx, id, sharesubscription.DefaultListByAccountOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ShareSubscriptionClient.ListSourceShareSynchronizationSettings
ctx := context.TODO()
id := sharesubscription.NewShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareSubscriptionValue")
// alternatively `client.ListSourceShareSynchronizationSettings(ctx, id)` can be used to do batched pagination
items, err := client.ListSourceShareSynchronizationSettingsComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ShareSubscriptionClient.ListSynchronizationDetails
ctx := context.TODO()
id := sharesubscription.NewShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareSubscriptionValue")
payload := sharesubscription.ShareSubscriptionSynchronization{
// ...
}
// alternatively `client.ListSynchronizationDetails(ctx, id, payload, sharesubscription.DefaultListSynchronizationDetailsOperationOptions())` can be used to do batched pagination
items, err := client.ListSynchronizationDetailsComplete(ctx, id, payload, sharesubscription.DefaultListSynchronizationDetailsOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ShareSubscriptionClient.ListSynchronizations
ctx := context.TODO()
id := sharesubscription.NewShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareSubscriptionValue")
// alternatively `client.ListSynchronizations(ctx, id, sharesubscription.DefaultListSynchronizationsOperationOptions())` can be used to do batched pagination
items, err := client.ListSynchronizationsComplete(ctx, id, sharesubscription.DefaultListSynchronizationsOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ShareSubscriptionClient.Synchronize
ctx := context.TODO()
id := sharesubscription.NewShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareSubscriptionValue")
payload := sharesubscription.Synchronize{
// ...
}
if err := client.SynchronizeThenPoll(ctx, id, payload); err != nil {
// handle the error
}