alerts

package
v0.20230720.1190320 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01/alerts Documentation

The alerts SDK allows for interaction with the Azure Resource Manager Service security (API Version 2019-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-sdk/resource-manager/security/2019-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 := alerts.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: AlertsClient.ListByResourceGroup

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

// alternatively `client.ListByResourceGroup(ctx, id, alerts.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id, alerts.DefaultListByResourceGroupOperationOptions())
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, alerts.DefaultListResourceGroupLevelAlertsByRegionOperationOptions())` can be used to do batched pagination
items, err := client.ListResourceGroupLevelAlertsByRegionComplete(ctx, id, alerts.DefaultListResourceGroupLevelAlertsByRegionOperationOptions())
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, alerts.DefaultListSubscriptionLevelAlertsByRegionOperationOptions())` can be used to do batched pagination
items, err := client.ListSubscriptionLevelAlertsByRegionComplete(ctx, id, alerts.DefaultListSubscriptionLevelAlertsByRegionOperationOptions())
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.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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForReportedSeverity

func PossibleValuesForReportedSeverity() []string

func ValidateAlertID

func ValidateAlertID(input interface{}, key string) (warnings []string, errors []error)

ValidateAlertID checks that 'input' can be parsed as a Alert ID

func ValidateLocationAlertID

func ValidateLocationAlertID(input interface{}, key string) (warnings []string, errors []error)

ValidateLocationAlertID checks that 'input' can be parsed as a Location Alert ID

func ValidateLocationID

func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error)

ValidateLocationID checks that 'input' can be parsed as a Location ID

func ValidateProviderLocationID

func ValidateProviderLocationID(input interface{}, key string) (warnings []string, errors []error)

ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID

Types

type Alert

type Alert struct {
	Id         *string          `json:"id,omitempty"`
	Name       *string          `json:"name,omitempty"`
	Properties *AlertProperties `json:"properties,omitempty"`
	Type       *string          `json:"type,omitempty"`
}

type AlertConfidenceReason

type AlertConfidenceReason struct {
	Reason *string `json:"reason,omitempty"`
	Type   *string `json:"type,omitempty"`
}

type AlertEntity

type AlertEntity struct {
	Type *string `json:"type,omitempty"`
}

type AlertId

type AlertId struct {
	SubscriptionId string
	LocationName   string
	AlertName      string
}

AlertId is a struct representing the Resource ID for a Alert

func NewAlertID

func NewAlertID(subscriptionId string, locationName string, alertName string) AlertId

NewAlertID returns a new AlertId struct

func ParseAlertID

func ParseAlertID(input string) (*AlertId, error)

ParseAlertID parses 'input' into a AlertId

func ParseAlertIDInsensitively

func ParseAlertIDInsensitively(input string) (*AlertId, error)

ParseAlertIDInsensitively parses 'input' case-insensitively into a AlertId note: this method should only be used for API response data and not user input

func (AlertId) ID

func (id AlertId) ID() string

ID returns the formatted Alert ID

func (AlertId) Segments

func (id AlertId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Alert ID

func (AlertId) String

func (id AlertId) String() string

String returns a human-readable description of this Alert ID

type AlertOperationPredicate

type AlertOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (AlertOperationPredicate) Matches

func (p AlertOperationPredicate) Matches(input Alert) bool

type AlertProperties

type AlertProperties struct {
	ActionTaken        *string                  `json:"actionTaken,omitempty"`
	AlertDisplayName   *string                  `json:"alertDisplayName,omitempty"`
	AlertName          *string                  `json:"alertName,omitempty"`
	AssociatedResource *string                  `json:"associatedResource,omitempty"`
	CanBeInvestigated  *bool                    `json:"canBeInvestigated,omitempty"`
	CompromisedEntity  *string                  `json:"compromisedEntity,omitempty"`
	ConfidenceReasons  *[]AlertConfidenceReason `json:"confidenceReasons,omitempty"`
	ConfidenceScore    *float64                 `json:"confidenceScore,omitempty"`
	CorrelationKey     *string                  `json:"correlationKey,omitempty"`
	Description        *string                  `json:"description,omitempty"`
	DetectedTimeUtc    *string                  `json:"detectedTimeUtc,omitempty"`
	Entities           *[]AlertEntity           `json:"entities,omitempty"`
	ExtendedProperties *interface{}             `json:"extendedProperties,omitempty"`
	InstanceId         *string                  `json:"instanceId,omitempty"`
	IsIncident         *bool                    `json:"isIncident,omitempty"`
	RemediationSteps   *string                  `json:"remediationSteps,omitempty"`
	ReportedSeverity   *ReportedSeverity        `json:"reportedSeverity,omitempty"`
	ReportedTimeUtc    *string                  `json:"reportedTimeUtc,omitempty"`
	State              *string                  `json:"state,omitempty"`
	SubscriptionId     *string                  `json:"subscriptionId,omitempty"`
	SystemSource       *string                  `json:"systemSource,omitempty"`
	VendorName         *string                  `json:"vendorName,omitempty"`
	WorkspaceArmId     *string                  `json:"workspaceArmId,omitempty"`
}

func (*AlertProperties) GetDetectedTimeUtcAsTime

func (o *AlertProperties) GetDetectedTimeUtcAsTime() (*time.Time, error)

func (*AlertProperties) GetReportedTimeUtcAsTime

func (o *AlertProperties) GetReportedTimeUtcAsTime() (*time.Time, error)

func (*AlertProperties) SetDetectedTimeUtcAsTime

func (o *AlertProperties) SetDetectedTimeUtcAsTime(input time.Time)

func (*AlertProperties) SetReportedTimeUtcAsTime

func (o *AlertProperties) SetReportedTimeUtcAsTime(input time.Time)

type AlertsClient

type AlertsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewAlertsClientWithBaseURI

func NewAlertsClientWithBaseURI(endpoint string) AlertsClient

func (AlertsClient) GetResourceGroupLevelAlerts

func (c AlertsClient) GetResourceGroupLevelAlerts(ctx context.Context, id LocationAlertId) (result GetResourceGroupLevelAlertsOperationResponse, err error)

GetResourceGroupLevelAlerts ...

func (AlertsClient) GetSubscriptionLevelAlert

func (c AlertsClient) GetSubscriptionLevelAlert(ctx context.Context, id AlertId) (result GetSubscriptionLevelAlertOperationResponse, err error)

GetSubscriptionLevelAlert ...

func (AlertsClient) List

List ...

func (AlertsClient) ListByResourceGroup

ListByResourceGroup ...

func (AlertsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (AlertsClient) ListByResourceGroupCompleteMatchingPredicate

func (c AlertsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate AlertOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (AlertsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (AlertsClient) ListCompleteMatchingPredicate

func (c AlertsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate AlertOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (AlertsClient) ListResourceGroupLevelAlertsByRegion

ListResourceGroupLevelAlertsByRegion ...

func (AlertsClient) ListResourceGroupLevelAlertsByRegionComplete

ListResourceGroupLevelAlertsByRegionComplete retrieves all of the results into a single object

func (AlertsClient) ListResourceGroupLevelAlertsByRegionCompleteMatchingPredicate

func (c AlertsClient) ListResourceGroupLevelAlertsByRegionCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, options ListResourceGroupLevelAlertsByRegionOperationOptions, predicate AlertOperationPredicate) (resp ListResourceGroupLevelAlertsByRegionCompleteResult, err error)

ListResourceGroupLevelAlertsByRegionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (AlertsClient) ListSubscriptionLevelAlertsByRegion

ListSubscriptionLevelAlertsByRegion ...

func (AlertsClient) ListSubscriptionLevelAlertsByRegionComplete

ListSubscriptionLevelAlertsByRegionComplete retrieves all of the results into a single object

func (AlertsClient) ListSubscriptionLevelAlertsByRegionCompleteMatchingPredicate

func (c AlertsClient) ListSubscriptionLevelAlertsByRegionCompleteMatchingPredicate(ctx context.Context, id LocationId, options ListSubscriptionLevelAlertsByRegionOperationOptions, predicate AlertOperationPredicate) (resp ListSubscriptionLevelAlertsByRegionCompleteResult, err error)

ListSubscriptionLevelAlertsByRegionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (AlertsClient) UpdateResourceGroupLevelAlertStateToDismiss

func (c AlertsClient) UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, id LocationAlertId) (result UpdateResourceGroupLevelAlertStateToDismissOperationResponse, err error)

UpdateResourceGroupLevelAlertStateToDismiss ...

func (AlertsClient) UpdateResourceGroupLevelAlertStateToReactivate

func (c AlertsClient) UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, id LocationAlertId) (result UpdateResourceGroupLevelAlertStateToReactivateOperationResponse, err error)

UpdateResourceGroupLevelAlertStateToReactivate ...

func (AlertsClient) UpdateSubscriptionLevelAlertStateToDismiss

func (c AlertsClient) UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, id AlertId) (result UpdateSubscriptionLevelAlertStateToDismissOperationResponse, err error)

UpdateSubscriptionLevelAlertStateToDismiss ...

func (AlertsClient) UpdateSubscriptionLevelAlertStateToReactivate

func (c AlertsClient) UpdateSubscriptionLevelAlertStateToReactivate(ctx context.Context, id AlertId) (result UpdateSubscriptionLevelAlertStateToReactivateOperationResponse, err error)

UpdateSubscriptionLevelAlertStateToReactivate ...

type GetResourceGroupLevelAlertsOperationResponse

type GetResourceGroupLevelAlertsOperationResponse struct {
	HttpResponse *http.Response
	Model        *Alert
}

type GetSubscriptionLevelAlertOperationResponse

type GetSubscriptionLevelAlertOperationResponse struct {
	HttpResponse *http.Response
	Model        *Alert
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []Alert
}

type ListByResourceGroupOperationOptions

type ListByResourceGroupOperationOptions struct {
	AutoDismissRuleName *string
	Expand              *string
	Filter              *string
	Select              *string
}

func DefaultListByResourceGroupOperationOptions

func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Alert
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []Alert
}

type ListOperationOptions

type ListOperationOptions struct {
	AutoDismissRuleName *string
	Expand              *string
	Filter              *string
	Select              *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Alert
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type ListResourceGroupLevelAlertsByRegionCompleteResult

type ListResourceGroupLevelAlertsByRegionCompleteResult struct {
	Items []Alert
}

type ListResourceGroupLevelAlertsByRegionOperationOptions

type ListResourceGroupLevelAlertsByRegionOperationOptions struct {
	AutoDismissRuleName *string
	Expand              *string
	Filter              *string
	Select              *string
}

func DefaultListResourceGroupLevelAlertsByRegionOperationOptions

func DefaultListResourceGroupLevelAlertsByRegionOperationOptions() ListResourceGroupLevelAlertsByRegionOperationOptions

type ListResourceGroupLevelAlertsByRegionOperationResponse

type ListResourceGroupLevelAlertsByRegionOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Alert
	// contains filtered or unexported fields
}

func (ListResourceGroupLevelAlertsByRegionOperationResponse) HasMore

func (ListResourceGroupLevelAlertsByRegionOperationResponse) LoadMore

type ListSubscriptionLevelAlertsByRegionCompleteResult

type ListSubscriptionLevelAlertsByRegionCompleteResult struct {
	Items []Alert
}

type ListSubscriptionLevelAlertsByRegionOperationOptions

type ListSubscriptionLevelAlertsByRegionOperationOptions struct {
	AutoDismissRuleName *string
	Expand              *string
	Filter              *string
	Select              *string
}

func DefaultListSubscriptionLevelAlertsByRegionOperationOptions

func DefaultListSubscriptionLevelAlertsByRegionOperationOptions() ListSubscriptionLevelAlertsByRegionOperationOptions

type ListSubscriptionLevelAlertsByRegionOperationResponse

type ListSubscriptionLevelAlertsByRegionOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Alert
	// contains filtered or unexported fields
}

func (ListSubscriptionLevelAlertsByRegionOperationResponse) HasMore

func (ListSubscriptionLevelAlertsByRegionOperationResponse) LoadMore

type LocationAlertId

type LocationAlertId struct {
	SubscriptionId    string
	ResourceGroupName string
	LocationName      string
	AlertName         string
}

LocationAlertId is a struct representing the Resource ID for a Location Alert

func NewLocationAlertID

func NewLocationAlertID(subscriptionId string, resourceGroupName string, locationName string, alertName string) LocationAlertId

NewLocationAlertID returns a new LocationAlertId struct

func ParseLocationAlertID

func ParseLocationAlertID(input string) (*LocationAlertId, error)

ParseLocationAlertID parses 'input' into a LocationAlertId

func ParseLocationAlertIDInsensitively

func ParseLocationAlertIDInsensitively(input string) (*LocationAlertId, error)

ParseLocationAlertIDInsensitively parses 'input' case-insensitively into a LocationAlertId note: this method should only be used for API response data and not user input

func (LocationAlertId) ID

func (id LocationAlertId) ID() string

ID returns the formatted Location Alert ID

func (LocationAlertId) Segments

func (id LocationAlertId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Location Alert ID

func (LocationAlertId) String

func (id LocationAlertId) String() string

String returns a human-readable description of this Location Alert ID

type LocationId

type LocationId struct {
	SubscriptionId string
	LocationName   string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, locationName string) LocationId

NewLocationID returns a new LocationId struct

func ParseLocationID

func ParseLocationID(input string) (*LocationId, error)

ParseLocationID parses 'input' into a LocationId

func ParseLocationIDInsensitively

func ParseLocationIDInsensitively(input string) (*LocationId, error)

ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId note: this method should only be used for API response data and not user input

func (LocationId) ID

func (id LocationId) ID() string

ID returns the formatted Location ID

func (LocationId) Segments

func (id LocationId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Location ID

func (LocationId) String

func (id LocationId) String() string

String returns a human-readable description of this Location ID

type ProviderLocationId

type ProviderLocationId struct {
	SubscriptionId    string
	ResourceGroupName string
	LocationName      string
}

ProviderLocationId is a struct representing the Resource ID for a Provider Location

func NewProviderLocationID

func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId

NewProviderLocationID returns a new ProviderLocationId struct

func ParseProviderLocationID

func ParseProviderLocationID(input string) (*ProviderLocationId, error)

ParseProviderLocationID parses 'input' into a ProviderLocationId

func ParseProviderLocationIDInsensitively

func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error)

ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId note: this method should only be used for API response data and not user input

func (ProviderLocationId) ID

func (id ProviderLocationId) ID() string

ID returns the formatted Provider Location ID

func (ProviderLocationId) Segments

func (id ProviderLocationId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Provider Location ID

func (ProviderLocationId) String

func (id ProviderLocationId) String() string

String returns a human-readable description of this Provider Location ID

type ReportedSeverity

type ReportedSeverity string
const (
	ReportedSeverityHigh          ReportedSeverity = "High"
	ReportedSeverityInformational ReportedSeverity = "Informational"
	ReportedSeverityLow           ReportedSeverity = "Low"
	ReportedSeverityMedium        ReportedSeverity = "Medium"
)

type UpdateResourceGroupLevelAlertStateToDismissOperationResponse

type UpdateResourceGroupLevelAlertStateToDismissOperationResponse struct {
	HttpResponse *http.Response
}

type UpdateResourceGroupLevelAlertStateToReactivateOperationResponse

type UpdateResourceGroupLevelAlertStateToReactivateOperationResponse struct {
	HttpResponse *http.Response
}

type UpdateSubscriptionLevelAlertStateToDismissOperationResponse

type UpdateSubscriptionLevelAlertStateToDismissOperationResponse struct {
	HttpResponse *http.Response
}

type UpdateSubscriptionLevelAlertStateToReactivateOperationResponse

type UpdateSubscriptionLevelAlertStateToReactivateOperationResponse struct {
	HttpResponse *http.Response
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL