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/insights/2023-01-01/actiongroupsapis
Documentation
The actiongroupsapis
SDK allows for interaction with the Azure Resource Manager Service insights
(API Version 2023-01-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/insights/2023-01-01/actiongroupsapis"
Client Initialization
client := actiongroupsapis.NewActionGroupsAPIsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ActionGroupsAPIsClient.ActionGroupsCreateNotificationsAtActionGroupResourceLevel
ctx := context.TODO()
id := actiongroupsapis.NewActionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "actionGroupValue")
payload := actiongroupsapis.NotificationRequestBody{
// ...
}
if err := client.ActionGroupsCreateNotificationsAtActionGroupResourceLevelThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ActionGroupsAPIsClient.ActionGroupsCreateOrUpdate
ctx := context.TODO()
id := actiongroupsapis.NewActionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "actionGroupValue")
payload := actiongroupsapis.ActionGroupResource{
// ...
}
read, err := client.ActionGroupsCreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ActionGroupsAPIsClient.ActionGroupsDelete
ctx := context.TODO()
id := actiongroupsapis.NewActionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "actionGroupValue")
read, err := client.ActionGroupsDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ActionGroupsAPIsClient.ActionGroupsEnableReceiver
ctx := context.TODO()
id := actiongroupsapis.NewActionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "actionGroupValue")
payload := actiongroupsapis.EnableRequest{
// ...
}
read, err := client.ActionGroupsEnableReceiver(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ActionGroupsAPIsClient.ActionGroupsGet
ctx := context.TODO()
id := actiongroupsapis.NewActionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "actionGroupValue")
read, err := client.ActionGroupsGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ActionGroupsAPIsClient.ActionGroupsGetTestNotificationsAtActionGroupResourceLevel
ctx := context.TODO()
id := actiongroupsapis.NewNotificationStatusID("12345678-1234-9876-4563-123456789012", "example-resource-group", "actionGroupValue", "notificationIdValue")
read, err := client.ActionGroupsGetTestNotificationsAtActionGroupResourceLevel(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ActionGroupsAPIsClient.ActionGroupsListByResourceGroup
ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")
// alternatively `client.ActionGroupsListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ActionGroupsListByResourceGroupComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ActionGroupsAPIsClient.ActionGroupsListBySubscriptionId
ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
// alternatively `client.ActionGroupsListBySubscriptionId(ctx, id)` can be used to do batched pagination
items, err := client.ActionGroupsListBySubscriptionIdComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ActionGroupsAPIsClient.ActionGroupsUpdate
ctx := context.TODO()
id := actiongroupsapis.NewActionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "actionGroupValue")
payload := actiongroupsapis.ActionGroupPatchBody{
// ...
}
read, err := client.ActionGroupsUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}