alertsmanagements

package
v0.20240125.1172517 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements Documentation

The alertsmanagements SDK allows for interaction with the Azure Resource Manager Service alertsmanagement (API Version 2019-05-05-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/alertsmanagement/2019-05-05-preview/alertsmanagements"

Client Initialization

client := alertsmanagements.NewAlertsManagementsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AlertsManagementsClient.AlertsChangeState

ctx := context.TODO()
id := alertsmanagements.NewAlertID("12345678-1234-9876-4563-123456789012", "alertIdValue")

payload := alertsmanagements.Comments{
	// ...
}


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

Example Usage: AlertsManagementsClient.AlertsGetAll

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

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

Example Usage: AlertsManagementsClient.AlertsGetById

ctx := context.TODO()
id := alertsmanagements.NewAlertID("12345678-1234-9876-4563-123456789012", "alertIdValue")

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

Example Usage: AlertsManagementsClient.AlertsGetHistory

ctx := context.TODO()
id := alertsmanagements.NewAlertID("12345678-1234-9876-4563-123456789012", "alertIdValue")

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

Example Usage: AlertsManagementsClient.AlertsGetSummary

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

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

Example Usage: AlertsManagementsClient.AlertsMetaData

ctx := context.TODO()


read, err := client.AlertsMetaData(ctx, alertsmanagements.DefaultAlertsMetaDataOperationOptions())
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 PossibleValuesForAlertModificationEvent

func PossibleValuesForAlertModificationEvent() []string

func PossibleValuesForAlertState

func PossibleValuesForAlertState() []string

func PossibleValuesForAlertsSortByFields

func PossibleValuesForAlertsSortByFields() []string

func PossibleValuesForAlertsSummaryGroupByFields

func PossibleValuesForAlertsSummaryGroupByFields() []string

func PossibleValuesForIdentifier

func PossibleValuesForIdentifier() []string

func PossibleValuesForMetadataIdentifier

func PossibleValuesForMetadataIdentifier() []string

func PossibleValuesForMonitorCondition

func PossibleValuesForMonitorCondition() []string

func PossibleValuesForMonitorService

func PossibleValuesForMonitorService() []string

func PossibleValuesForSeverity

func PossibleValuesForSeverity() []string

func PossibleValuesForSignalType

func PossibleValuesForSignalType() []string

func PossibleValuesForSortOrder

func PossibleValuesForSortOrder() []string

func PossibleValuesForTimeRange

func PossibleValuesForTimeRange() []string

func ValidateAlertID

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

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

Types

type ActionStatus

type ActionStatus struct {
	IsSuppressed *bool `json:"isSuppressed,omitempty"`
}

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 AlertId

type AlertId struct {
	SubscriptionId string
	AlertId        string
}

AlertId is a struct representing the Resource ID for a Alert

func NewAlertID

func NewAlertID(subscriptionId string, alertId 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) FromParseResult

func (id *AlertId) FromParseResult(input resourceids.ParseResult) error

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 AlertModification

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

type AlertModificationEvent

type AlertModificationEvent string
const (
	AlertModificationEventActionRuleSuppressed   AlertModificationEvent = "ActionRuleSuppressed"
	AlertModificationEventActionRuleTriggered    AlertModificationEvent = "ActionRuleTriggered"
	AlertModificationEventActionsFailed          AlertModificationEvent = "ActionsFailed"
	AlertModificationEventActionsSuppressed      AlertModificationEvent = "ActionsSuppressed"
	AlertModificationEventActionsTriggered       AlertModificationEvent = "ActionsTriggered"
	AlertModificationEventAlertCreated           AlertModificationEvent = "AlertCreated"
	AlertModificationEventMonitorConditionChange AlertModificationEvent = "MonitorConditionChange"
	AlertModificationEventSeverityChange         AlertModificationEvent = "SeverityChange"
	AlertModificationEventStateChange            AlertModificationEvent = "StateChange"
)

func (*AlertModificationEvent) UnmarshalJSON

func (s *AlertModificationEvent) UnmarshalJSON(bytes []byte) error

type AlertModificationItem

type AlertModificationItem struct {
	Comments          *string                 `json:"comments,omitempty"`
	Description       *string                 `json:"description,omitempty"`
	ModificationEvent *AlertModificationEvent `json:"modificationEvent,omitempty"`
	ModifiedAt        *string                 `json:"modifiedAt,omitempty"`
	ModifiedBy        *string                 `json:"modifiedBy,omitempty"`
	NewValue          *string                 `json:"newValue,omitempty"`
	OldValue          *string                 `json:"oldValue,omitempty"`
}

type AlertModificationProperties

type AlertModificationProperties struct {
	AlertId       *string                  `json:"alertId,omitempty"`
	Modifications *[]AlertModificationItem `json:"modifications,omitempty"`
}

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 {
	Context      *interface{} `json:"context,omitempty"`
	EgressConfig *interface{} `json:"egressConfig,omitempty"`
	Essentials   *Essentials  `json:"essentials,omitempty"`
}

type AlertState

type AlertState string
const (
	AlertStateAcknowledged AlertState = "Acknowledged"
	AlertStateClosed       AlertState = "Closed"
	AlertStateNew          AlertState = "New"
)

func (*AlertState) UnmarshalJSON

func (s *AlertState) UnmarshalJSON(bytes []byte) error

type AlertsChangeStateOperationOptions

type AlertsChangeStateOperationOptions struct {
	NewState *AlertState
}

func DefaultAlertsChangeStateOperationOptions

func DefaultAlertsChangeStateOperationOptions() AlertsChangeStateOperationOptions

func (AlertsChangeStateOperationOptions) ToHeaders

func (AlertsChangeStateOperationOptions) ToOData

func (AlertsChangeStateOperationOptions) ToQuery

type AlertsChangeStateOperationResponse

type AlertsChangeStateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Alert
}

type AlertsGetAllCompleteResult

type AlertsGetAllCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Alert
}

type AlertsGetAllOperationOptions

type AlertsGetAllOperationOptions struct {
	AlertRule           *string
	AlertState          *AlertState
	CustomTimeRange     *string
	IncludeContext      *bool
	IncludeEgressConfig *bool
	MonitorCondition    *MonitorCondition
	MonitorService      *MonitorService
	PageCount           *int64
	Select              *string
	Severity            *Severity
	SmartGroupId        *string
	SortBy              *AlertsSortByFields
	SortOrder           *SortOrder
	TargetResource      *string
	TargetResourceGroup *string
	TargetResourceType  *string
	TimeRange           *TimeRange
}

func DefaultAlertsGetAllOperationOptions

func DefaultAlertsGetAllOperationOptions() AlertsGetAllOperationOptions

func (AlertsGetAllOperationOptions) ToHeaders

func (AlertsGetAllOperationOptions) ToOData

func (AlertsGetAllOperationOptions) ToQuery

type AlertsGetAllOperationResponse

type AlertsGetAllOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Alert
}

type AlertsGetByIdOperationResponse

type AlertsGetByIdOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Alert
}

type AlertsGetHistoryOperationResponse

type AlertsGetHistoryOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AlertModification
}

type AlertsGetSummaryOperationOptions

type AlertsGetSummaryOperationOptions struct {
	AlertRule               *string
	AlertState              *AlertState
	CustomTimeRange         *string
	Groupby                 *AlertsSummaryGroupByFields
	IncludeSmartGroupsCount *bool
	MonitorCondition        *MonitorCondition
	MonitorService          *MonitorService
	Severity                *Severity
	TargetResource          *string
	TargetResourceGroup     *string
	TargetResourceType      *string
	TimeRange               *TimeRange
}

func DefaultAlertsGetSummaryOperationOptions

func DefaultAlertsGetSummaryOperationOptions() AlertsGetSummaryOperationOptions

func (AlertsGetSummaryOperationOptions) ToHeaders

func (AlertsGetSummaryOperationOptions) ToOData

func (AlertsGetSummaryOperationOptions) ToQuery

type AlertsGetSummaryOperationResponse

type AlertsGetSummaryOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AlertsSummary
}

type AlertsManagementsClient

type AlertsManagementsClient struct {
	Client *resourcemanager.Client
}

func NewAlertsManagementsClientWithBaseURI

func NewAlertsManagementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsManagementsClient, error)

func (AlertsManagementsClient) AlertsChangeState

AlertsChangeState ...

func (AlertsManagementsClient) AlertsGetAll

AlertsGetAll ...

func (AlertsManagementsClient) AlertsGetAllComplete

AlertsGetAllComplete retrieves all the results into a single object

func (AlertsManagementsClient) AlertsGetAllCompleteMatchingPredicate

func (c AlertsManagementsClient) AlertsGetAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options AlertsGetAllOperationOptions, predicate AlertOperationPredicate) (result AlertsGetAllCompleteResult, err error)

AlertsGetAllCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AlertsManagementsClient) AlertsGetById

func (c AlertsManagementsClient) AlertsGetById(ctx context.Context, id AlertId) (result AlertsGetByIdOperationResponse, err error)

AlertsGetById ...

func (AlertsManagementsClient) AlertsGetHistory

func (c AlertsManagementsClient) AlertsGetHistory(ctx context.Context, id AlertId) (result AlertsGetHistoryOperationResponse, err error)

AlertsGetHistory ...

func (AlertsManagementsClient) AlertsGetSummary

AlertsGetSummary ...

func (AlertsManagementsClient) AlertsMetaData

AlertsMetaData ...

type AlertsMetaData

type AlertsMetaData struct {
	Properties AlertsMetaDataProperties `json:"properties"`
}

func (*AlertsMetaData) UnmarshalJSON

func (s *AlertsMetaData) UnmarshalJSON(bytes []byte) error

type AlertsMetaDataOperationOptions

type AlertsMetaDataOperationOptions struct {
	Identifier *Identifier
}

func DefaultAlertsMetaDataOperationOptions

func DefaultAlertsMetaDataOperationOptions() AlertsMetaDataOperationOptions

func (AlertsMetaDataOperationOptions) ToHeaders

func (AlertsMetaDataOperationOptions) ToOData

func (AlertsMetaDataOperationOptions) ToQuery

type AlertsMetaDataOperationResponse

type AlertsMetaDataOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AlertsMetaData
}

type AlertsMetaDataProperties

type AlertsMetaDataProperties interface {
}

type AlertsSortByFields

type AlertsSortByFields string
const (
	AlertsSortByFieldsAlertState           AlertsSortByFields = "alertState"
	AlertsSortByFieldsLastModifiedDateTime AlertsSortByFields = "lastModifiedDateTime"
	AlertsSortByFieldsMonitorCondition     AlertsSortByFields = "monitorCondition"
	AlertsSortByFieldsName                 AlertsSortByFields = "name"
	AlertsSortByFieldsSeverity             AlertsSortByFields = "severity"
	AlertsSortByFieldsStartDateTime        AlertsSortByFields = "startDateTime"
	AlertsSortByFieldsTargetResource       AlertsSortByFields = "targetResource"
	AlertsSortByFieldsTargetResourceGroup  AlertsSortByFields = "targetResourceGroup"
	AlertsSortByFieldsTargetResourceName   AlertsSortByFields = "targetResourceName"
	AlertsSortByFieldsTargetResourceType   AlertsSortByFields = "targetResourceType"
)

func (*AlertsSortByFields) UnmarshalJSON

func (s *AlertsSortByFields) UnmarshalJSON(bytes []byte) error

type AlertsSummary

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

type AlertsSummaryGroup

type AlertsSummaryGroup struct {
	Groupedby        *string                   `json:"groupedby,omitempty"`
	SmartGroupsCount *int64                    `json:"smartGroupsCount,omitempty"`
	Total            *int64                    `json:"total,omitempty"`
	Values           *[]AlertsSummaryGroupItem `json:"values,omitempty"`
}

type AlertsSummaryGroupByFields

type AlertsSummaryGroupByFields string
const (
	AlertsSummaryGroupByFieldsAlertRule        AlertsSummaryGroupByFields = "alertRule"
	AlertsSummaryGroupByFieldsAlertState       AlertsSummaryGroupByFields = "alertState"
	AlertsSummaryGroupByFieldsMonitorCondition AlertsSummaryGroupByFields = "monitorCondition"
	AlertsSummaryGroupByFieldsMonitorService   AlertsSummaryGroupByFields = "monitorService"
	AlertsSummaryGroupByFieldsSeverity         AlertsSummaryGroupByFields = "severity"
	AlertsSummaryGroupByFieldsSignalType       AlertsSummaryGroupByFields = "signalType"
)

func (*AlertsSummaryGroupByFields) UnmarshalJSON

func (s *AlertsSummaryGroupByFields) UnmarshalJSON(bytes []byte) error

type AlertsSummaryGroupItem

type AlertsSummaryGroupItem struct {
	Count     *int64                    `json:"count,omitempty"`
	Groupedby *string                   `json:"groupedby,omitempty"`
	Name      *string                   `json:"name,omitempty"`
	Values    *[]AlertsSummaryGroupItem `json:"values,omitempty"`
}

type Comments

type Comments struct {
	Comments *string `json:"comments,omitempty"`
}

type Essentials

type Essentials struct {
	ActionStatus                     *ActionStatus     `json:"actionStatus,omitempty"`
	AlertRule                        *string           `json:"alertRule,omitempty"`
	AlertState                       *AlertState       `json:"alertState,omitempty"`
	Description                      *string           `json:"description,omitempty"`
	LastModifiedDateTime             *string           `json:"lastModifiedDateTime,omitempty"`
	LastModifiedUserName             *string           `json:"lastModifiedUserName,omitempty"`
	MonitorCondition                 *MonitorCondition `json:"monitorCondition,omitempty"`
	MonitorConditionResolvedDateTime *string           `json:"monitorConditionResolvedDateTime,omitempty"`
	MonitorService                   *MonitorService   `json:"monitorService,omitempty"`
	Severity                         *Severity         `json:"severity,omitempty"`
	SignalType                       *SignalType       `json:"signalType,omitempty"`
	SmartGroupId                     *string           `json:"smartGroupId,omitempty"`
	SmartGroupingReason              *string           `json:"smartGroupingReason,omitempty"`
	SourceCreatedId                  *string           `json:"sourceCreatedId,omitempty"`
	StartDateTime                    *string           `json:"startDateTime,omitempty"`
	TargetResource                   *string           `json:"targetResource,omitempty"`
	TargetResourceGroup              *string           `json:"targetResourceGroup,omitempty"`
	TargetResourceName               *string           `json:"targetResourceName,omitempty"`
	TargetResourceType               *string           `json:"targetResourceType,omitempty"`
}

func (*Essentials) GetLastModifiedDateTimeAsTime

func (o *Essentials) GetLastModifiedDateTimeAsTime() (*time.Time, error)

func (*Essentials) GetMonitorConditionResolvedDateTimeAsTime

func (o *Essentials) GetMonitorConditionResolvedDateTimeAsTime() (*time.Time, error)

func (*Essentials) GetStartDateTimeAsTime

func (o *Essentials) GetStartDateTimeAsTime() (*time.Time, error)

func (*Essentials) SetLastModifiedDateTimeAsTime

func (o *Essentials) SetLastModifiedDateTimeAsTime(input time.Time)

func (*Essentials) SetMonitorConditionResolvedDateTimeAsTime

func (o *Essentials) SetMonitorConditionResolvedDateTimeAsTime(input time.Time)

func (*Essentials) SetStartDateTimeAsTime

func (o *Essentials) SetStartDateTimeAsTime(input time.Time)

type Identifier

type Identifier string
const (
	IdentifierMonitorServiceList Identifier = "MonitorServiceList"
)

func (*Identifier) UnmarshalJSON

func (s *Identifier) UnmarshalJSON(bytes []byte) error

type MetadataIdentifier

type MetadataIdentifier string
const (
	MetadataIdentifierMonitorServiceList MetadataIdentifier = "MonitorServiceList"
)

func (*MetadataIdentifier) UnmarshalJSON

func (s *MetadataIdentifier) UnmarshalJSON(bytes []byte) error

type MonitorCondition

type MonitorCondition string
const (
	MonitorConditionFired    MonitorCondition = "Fired"
	MonitorConditionResolved MonitorCondition = "Resolved"
)

func (*MonitorCondition) UnmarshalJSON

func (s *MonitorCondition) UnmarshalJSON(bytes []byte) error

type MonitorService

type MonitorService string
const (
	MonitorServiceActivityLogAdministrative MonitorService = "ActivityLog Administrative"
	MonitorServiceActivityLogAutoscale      MonitorService = "ActivityLog Autoscale"
	MonitorServiceActivityLogPolicy         MonitorService = "ActivityLog Policy"
	MonitorServiceActivityLogRecommendation MonitorService = "ActivityLog Recommendation"
	MonitorServiceActivityLogSecurity       MonitorService = "ActivityLog Security"
	MonitorServiceApplicationInsights       MonitorService = "Application Insights"
	MonitorServiceLogAnalytics              MonitorService = "Log Analytics"
	MonitorServiceNagios                    MonitorService = "Nagios"
	MonitorServicePlatform                  MonitorService = "Platform"
	MonitorServiceSCOM                      MonitorService = "SCOM"
	MonitorServiceServiceHealth             MonitorService = "ServiceHealth"
	MonitorServiceSmartDetector             MonitorService = "SmartDetector"
	MonitorServiceVMInsights                MonitorService = "VM Insights"
	MonitorServiceZabbix                    MonitorService = "Zabbix"
)

func (*MonitorService) UnmarshalJSON

func (s *MonitorService) UnmarshalJSON(bytes []byte) error

type RawAlertsMetaDataPropertiesImpl

type RawAlertsMetaDataPropertiesImpl struct {
	Type   string
	Values map[string]interface{}
}

RawAlertsMetaDataPropertiesImpl 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. this cannot be used as a Request Payload).

type Severity

type Severity string
const (
	SeveritySevFour  Severity = "Sev4"
	SeveritySevOne   Severity = "Sev1"
	SeveritySevThree Severity = "Sev3"
	SeveritySevTwo   Severity = "Sev2"
	SeveritySevZero  Severity = "Sev0"
)

func (*Severity) UnmarshalJSON

func (s *Severity) UnmarshalJSON(bytes []byte) error

type SignalType

type SignalType string
const (
	SignalTypeLog     SignalType = "Log"
	SignalTypeMetric  SignalType = "Metric"
	SignalTypeUnknown SignalType = "Unknown"
)

func (*SignalType) UnmarshalJSON

func (s *SignalType) UnmarshalJSON(bytes []byte) error

type SortOrder

type SortOrder string
const (
	SortOrderAsc  SortOrder = "asc"
	SortOrderDesc SortOrder = "desc"
)

func (*SortOrder) UnmarshalJSON

func (s *SortOrder) UnmarshalJSON(bytes []byte) error

type TimeRange

type TimeRange string
const (
	TimeRangeOned       TimeRange = "1d"
	TimeRangeOneh       TimeRange = "1h"
	TimeRangeSevend     TimeRange = "7d"
	TimeRangeThreeZerod TimeRange = "30d"
)

func (*TimeRange) UnmarshalJSON

func (s *TimeRange) UnmarshalJSON(bytes []byte) error

Jump to

Keyboard shortcuts

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