package
0.20240125.1100331
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev
# README
github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-07-01-preview/actions
Documentation
The actions
SDK allows for interaction with the Azure Resource Manager Service securityinsights
(API Version 2022-07-01-preview
).
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/securityinsights/2022-07-01-preview/actions"
Client Initialization
client := actions.NewActionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ActionsClient.CreateOrUpdate
ctx := context.TODO()
id := actions.NewActionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "ruleIdValue", "actionIdValue")
payload := actions.ActionRequest{
// ...
}
read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ActionsClient.Delete
ctx := context.TODO()
id := actions.NewActionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "ruleIdValue", "actionIdValue")
read, err := client.Delete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ActionsClient.Get
ctx := context.TODO()
id := actions.NewActionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "ruleIdValue", "actionIdValue")
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: ActionsClient.ListByAlertRule
ctx := context.TODO()
id := actions.NewAlertRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "ruleIdValue")
// alternatively `client.ListByAlertRule(ctx, id)` can be used to do batched pagination
items, err := client.ListByAlertRuleComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
# Functions
NewActionID returns a new ActionId struct.
No description provided by the author
NewAlertRuleID returns a new AlertRuleId struct.
ParseActionID parses 'input' into a ActionId.
ParseActionIDInsensitively parses 'input' case-insensitively into a ActionId note: this method should only be used for API response data and not user input.
ParseAlertRuleID parses 'input' into a AlertRuleId.
ParseAlertRuleIDInsensitively parses 'input' case-insensitively into a AlertRuleId note: this method should only be used for API response data and not user input.
ValidateActionID checks that 'input' can be parsed as a Action ID.
ValidateAlertRuleID checks that 'input' can be parsed as a Alert Rule ID.
# Structs
ActionId is a struct representing the Resource ID for a Action.
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
AlertRuleId is a struct representing the Resource ID for a Alert Rule.
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