Categorygithub.com/hashicorp/go-azure-sdk/resource-managersecurityinsights2022-11-01threatintelligence
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/securityinsights/2022-11-01/threatintelligence
Documentation
The threatintelligence
SDK allows for interaction with the Azure Resource Manager Service securityinsights
(API Version 2022-11-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/securityinsights/2022-11-01/threatintelligence"
Client Initialization
client := threatintelligence.NewThreatIntelligenceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ThreatIntelligenceClient.IndicatorAppendTags
ctx := context.TODO()
id := threatintelligence.NewIndicatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "indicatorValue")
payload := threatintelligence.ThreatIntelligenceAppendTags{
// ...
}
read, err := client.IndicatorAppendTags(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ThreatIntelligenceClient.IndicatorCreate
ctx := context.TODO()
id := threatintelligence.NewIndicatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "indicatorValue")
payload := threatintelligence.ThreatIntelligenceIndicatorModel{
// ...
}
read, err := client.IndicatorCreate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ThreatIntelligenceClient.IndicatorCreateIndicator
ctx := context.TODO()
id := threatintelligence.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
payload := threatintelligence.ThreatIntelligenceIndicatorModel{
// ...
}
read, err := client.IndicatorCreateIndicator(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ThreatIntelligenceClient.IndicatorDelete
ctx := context.TODO()
id := threatintelligence.NewIndicatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "indicatorValue")
read, err := client.IndicatorDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ThreatIntelligenceClient.IndicatorGet
ctx := context.TODO()
id := threatintelligence.NewIndicatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "indicatorValue")
read, err := client.IndicatorGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ThreatIntelligenceClient.IndicatorMetricsList
ctx := context.TODO()
id := threatintelligence.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
read, err := client.IndicatorMetricsList(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ThreatIntelligenceClient.IndicatorQueryIndicators
ctx := context.TODO()
id := threatintelligence.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
payload := threatintelligence.ThreatIntelligenceFilteringCriteria{
// ...
}
// alternatively `client.IndicatorQueryIndicators(ctx, id, payload)` can be used to do batched pagination
items, err := client.IndicatorQueryIndicatorsComplete(ctx, id, payload)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ThreatIntelligenceClient.IndicatorReplaceTags
ctx := context.TODO()
id := threatintelligence.NewIndicatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "indicatorValue")
payload := threatintelligence.ThreatIntelligenceIndicatorModel{
// ...
}
read, err := client.IndicatorReplaceTags(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ThreatIntelligenceClient.IndicatorsList
ctx := context.TODO()
id := threatintelligence.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")
// alternatively `client.IndicatorsList(ctx, id, threatintelligence.DefaultIndicatorsListOperationOptions())` can be used to do batched pagination
items, err := client.IndicatorsListComplete(ctx, id, threatintelligence.DefaultIndicatorsListOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}