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/operationalinsights/2020-08-01/workspaces
Documentation
The workspaces
SDK allows for interaction with the Azure Resource Manager Service operationalinsights
(API Version 2020-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces"
Client Initialization
client := workspaces.NewWorkspacesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: WorkspacesClient.CreateOrUpdate
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
payload := workspaces.Workspace{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: WorkspacesClient.Delete
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
if err := client.DeleteThenPoll(ctx, id, workspaces.DefaultDeleteOperationOptions()); err != nil {
// handle the error
}
Example Usage: WorkspacesClient.GatewaysDelete
ctx := context.TODO()
id := workspaces.NewGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "gatewayIdValue")
read, err := client.GatewaysDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.Get
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
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: WorkspacesClient.IntelligencePacksDisable
ctx := context.TODO()
id := workspaces.NewIntelligencePackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "intelligencePackValue")
read, err := client.IntelligencePacksDisable(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.IntelligencePacksEnable
ctx := context.TODO()
id := workspaces.NewIntelligencePackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "intelligencePackValue")
read, err := client.IntelligencePacksEnable(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.IntelligencePacksList
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
read, err := client.IntelligencePacksList(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.List
ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
read, err := client.List(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.ListByResourceGroup
ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")
read, err := client.ListByResourceGroup(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.ManagementGroupsList
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
read, err := client.ManagementGroupsList(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.SchemaGet
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
read, err := client.SchemaGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.SharedKeysGetSharedKeys
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
read, err := client.SharedKeysGetSharedKeys(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.SharedKeysRegenerate
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
read, err := client.SharedKeysRegenerate(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.Update
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
payload := workspaces.WorkspacePatch{
// ...
}
read, err := client.Update(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.UsagesList
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
read, err := client.UsagesList(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.WorkspacePurgeGetPurgeStatus
ctx := context.TODO()
id := workspaces.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "purgeIdValue")
read, err := client.WorkspacePurgeGetPurgeStatus(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: WorkspacesClient.WorkspacePurgePurge
ctx := context.TODO()
id := workspaces.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
payload := workspaces.WorkspacePurgeBody{
// ...
}
read, err := client.WorkspacePurgePurge(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}