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/share
Documentation
The share
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/share"
Client Initialization
client := share.NewShareClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ShareClient.Create
ctx := context.TODO()
id := share.NewShareID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareValue")
payload := share.Share{
// ...
}
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: ShareClient.Delete
ctx := context.TODO()
id := share.NewShareID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ShareClient.Get
ctx := context.TODO()
id := share.NewShareID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareValue")
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: ShareClient.ListByAccount
ctx := context.TODO()
id := share.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue")
// alternatively `client.ListByAccount(ctx, id, share.DefaultListByAccountOperationOptions())` can be used to do batched pagination
items, err := client.ListByAccountComplete(ctx, id, share.DefaultListByAccountOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ShareClient.ListSynchronizationDetails
ctx := context.TODO()
id := share.NewShareID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareValue")
payload := share.ShareSynchronization{
// ...
}
// alternatively `client.ListSynchronizationDetails(ctx, id, payload, share.DefaultListSynchronizationDetailsOperationOptions())` can be used to do batched pagination
items, err := client.ListSynchronizationDetailsComplete(ctx, id, payload, share.DefaultListSynchronizationDetailsOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ShareClient.ListSynchronizations
ctx := context.TODO()
id := share.NewShareID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareValue")
// alternatively `client.ListSynchronizations(ctx, id, share.DefaultListSynchronizationsOperationOptions())` can be used to do batched pagination
items, err := client.ListSynchronizationsComplete(ctx, id, share.DefaultListSynchronizationsOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ShareClient.ProviderShareSubscriptionsAdjust
ctx := context.TODO()
id := share.NewProviderShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareValue", "providerShareSubscriptionIdValue")
payload := share.ProviderShareSubscription{
// ...
}
read, err := client.ProviderShareSubscriptionsAdjust(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ShareClient.ProviderShareSubscriptionsGetByShare
ctx := context.TODO()
id := share.NewProviderShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareValue", "providerShareSubscriptionIdValue")
read, err := client.ProviderShareSubscriptionsGetByShare(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ShareClient.ProviderShareSubscriptionsListByShare
ctx := context.TODO()
id := share.NewShareID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareValue")
// alternatively `client.ProviderShareSubscriptionsListByShare(ctx, id)` can be used to do batched pagination
items, err := client.ProviderShareSubscriptionsListByShareComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ShareClient.ProviderShareSubscriptionsReinstate
ctx := context.TODO()
id := share.NewProviderShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareValue", "providerShareSubscriptionIdValue")
payload := share.ProviderShareSubscription{
// ...
}
read, err := client.ProviderShareSubscriptionsReinstate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ShareClient.ProviderShareSubscriptionsRevoke
ctx := context.TODO()
id := share.NewProviderShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareValue", "providerShareSubscriptionIdValue")
if err := client.ProviderShareSubscriptionsRevokeThenPoll(ctx, id); err != nil {
// handle the error
}
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
NewAccountID returns a new AccountId struct.
NewProviderShareSubscriptionID returns a new ProviderShareSubscriptionId struct.
No description provided by the author
NewShareID returns a new ShareId struct.
ParseAccountID parses 'input' into a AccountId.
ParseAccountIDInsensitively parses 'input' case-insensitively into a AccountId note: this method should only be used for API response data and not user input.
ParseProviderShareSubscriptionID parses 'input' into a ProviderShareSubscriptionId.
ParseProviderShareSubscriptionIDInsensitively parses 'input' case-insensitively into a ProviderShareSubscriptionId note: this method should only be used for API response data and not user input.
ParseShareID parses 'input' into a ShareId.
ParseShareIDInsensitively parses 'input' case-insensitively into a ShareId note: this method should only be used for API response data and not user input.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ValidateAccountID checks that 'input' can be parsed as a Account ID.
ValidateProviderShareSubscriptionID checks that 'input' can be parsed as a Provider Share Subscription ID.
ValidateShareID checks that 'input' can be parsed as a Share ID.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AccountId is a struct representing the Resource ID for a Account.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProviderShareSubscriptionId is a struct representing the Resource ID for a Provider Share Subscription.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ShareId is a struct representing the Resource ID for a Share.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author