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/security/2020-01-01/alerts Documentation

The alerts SDK allows for interaction with the Azure Resource Manager Service security (API Version 2020-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/security/2020-01-01/alerts"

Client Initialization

client := alerts.NewAlertsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AlertsClient.GetResourceGroupLevelAlerts

ctx := context.TODO()
id := alerts.NewLocationAlertID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "alertValue")

read, err := client.GetResourceGroupLevelAlerts(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AlertsClient.GetSubscriptionLevelAlert

ctx := context.TODO()
id := alerts.NewAlertID("12345678-1234-9876-4563-123456789012", "locationValue", "alertValue")

read, err := client.GetSubscriptionLevelAlert(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AlertsClient.List

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: AlertsClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: AlertsClient.ListResourceGroupLevelAlertsByRegion

ctx := context.TODO()
id := alerts.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue")

// alternatively `client.ListResourceGroupLevelAlertsByRegion(ctx, id)` can be used to do batched pagination
items, err := client.ListResourceGroupLevelAlertsByRegionComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: AlertsClient.ListSubscriptionLevelAlertsByRegion

ctx := context.TODO()
id := alerts.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")

// alternatively `client.ListSubscriptionLevelAlertsByRegion(ctx, id)` can be used to do batched pagination
items, err := client.ListSubscriptionLevelAlertsByRegionComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: AlertsClient.UpdateResourceGroupLevelAlertStateToDismiss

ctx := context.TODO()
id := alerts.NewLocationAlertID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "alertValue")

read, err := client.UpdateResourceGroupLevelAlertStateToDismiss(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AlertsClient.UpdateResourceGroupLevelAlertStateToReactivate

ctx := context.TODO()
id := alerts.NewLocationAlertID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "alertValue")

read, err := client.UpdateResourceGroupLevelAlertStateToReactivate(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AlertsClient.UpdateResourceGroupLevelStateToResolve

ctx := context.TODO()
id := alerts.NewLocationAlertID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "alertValue")

read, err := client.UpdateResourceGroupLevelStateToResolve(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AlertsClient.UpdateSubscriptionLevelAlertStateToDismiss

ctx := context.TODO()
id := alerts.NewAlertID("12345678-1234-9876-4563-123456789012", "locationValue", "alertValue")

read, err := client.UpdateSubscriptionLevelAlertStateToDismiss(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AlertsClient.UpdateSubscriptionLevelAlertStateToReactivate

ctx := context.TODO()
id := alerts.NewAlertID("12345678-1234-9876-4563-123456789012", "locationValue", "alertValue")

read, err := client.UpdateSubscriptionLevelAlertStateToReactivate(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AlertsClient.UpdateSubscriptionLevelStateToResolve

ctx := context.TODO()
id := alerts.NewAlertID("12345678-1234-9876-4563-123456789012", "locationValue", "alertValue")

read, err := client.UpdateSubscriptionLevelStateToResolve(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

# Functions

NewAlertID returns a new AlertId struct.
No description provided by the author
NewLocationAlertID returns a new LocationAlertId struct.
NewLocationID returns a new LocationId struct.
NewProviderLocationID returns a new ProviderLocationId struct.
ParseAlertID parses 'input' into a AlertId.
ParseAlertIDInsensitively parses 'input' case-insensitively into a AlertId note: this method should only be used for API response data and not user input.
ParseLocationAlertID parses 'input' into a LocationAlertId.
ParseLocationAlertIDInsensitively parses 'input' case-insensitively into a LocationAlertId note: this method should only be used for API response data and not user input.
ParseLocationID parses 'input' into a LocationId.
ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId note: this method should only be used for API response data and not user input.
ParseProviderLocationID parses 'input' into a ProviderLocationId.
ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId 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
ValidateAlertID checks that 'input' can be parsed as a Alert ID.
ValidateLocationAlertID checks that 'input' can be parsed as a Location Alert ID.
ValidateLocationID checks that 'input' can be parsed as a Location ID.
ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location 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

# Structs

No description provided by the author
No description provided by the author
AlertId is a struct representing the Resource ID for a Alert.
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
LocationAlertId is a struct representing the Resource ID for a Location Alert.
LocationId is a struct representing the Resource ID for a Location.
No description provided by the author
ProviderLocationId is a struct representing the Resource ID for a Provider Location.
RawResourceIdentifierImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g.
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

# Interfaces

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