alertprocessingrules

package
v0.20220916.1125744 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules Documentation

The alertprocessingrules SDK allows for interaction with the Azure Resource Manager Service alertsmanagement (API Version 2021-08-08).

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/2021-08-08/alertprocessingrules"

Client Initialization

client := alertprocessingrules.NewAlertProcessingRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AlertProcessingRulesClient.AlertProcessingRulesCreateOrUpdate

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

payload := alertprocessingrules.AlertProcessingRule{
	// ...
}


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

Example Usage: AlertProcessingRulesClient.AlertProcessingRulesDelete

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

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

Example Usage: AlertProcessingRulesClient.AlertProcessingRulesGetByName

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

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

Example Usage: AlertProcessingRulesClient.AlertProcessingRulesListByResourceGroup

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

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

Example Usage: AlertProcessingRulesClient.AlertProcessingRulesListBySubscription

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

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

Example Usage: AlertProcessingRulesClient.AlertProcessingRulesUpdate

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

payload := alertprocessingrules.PatchObject{
	// ...
}


read, err := client.AlertProcessingRulesUpdate(ctx, id, payload)
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 PossibleValuesForActionType

func PossibleValuesForActionType() []string

func PossibleValuesForDaysOfWeek

func PossibleValuesForDaysOfWeek() []string

func PossibleValuesForField

func PossibleValuesForField() []string

func PossibleValuesForOperator

func PossibleValuesForOperator() []string

func PossibleValuesForRecurrenceType

func PossibleValuesForRecurrenceType() []string

func ValidateActionRuleID

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

ValidateActionRuleID checks that 'input' can be parsed as a Action Rule ID

Types

type Action

type Action interface {
}

type ActionRuleId

type ActionRuleId struct {
	SubscriptionId          string
	ResourceGroupName       string
	AlertProcessingRuleName string
}

ActionRuleId is a struct representing the Resource ID for a Action Rule

func NewActionRuleID

func NewActionRuleID(subscriptionId string, resourceGroupName string, alertProcessingRuleName string) ActionRuleId

NewActionRuleID returns a new ActionRuleId struct

func ParseActionRuleID

func ParseActionRuleID(input string) (*ActionRuleId, error)

ParseActionRuleID parses 'input' into a ActionRuleId

func ParseActionRuleIDInsensitively

func ParseActionRuleIDInsensitively(input string) (*ActionRuleId, error)

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

func (ActionRuleId) ID

func (id ActionRuleId) ID() string

ID returns the formatted Action Rule ID

func (ActionRuleId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Action Rule ID

func (ActionRuleId) String

func (id ActionRuleId) String() string

String returns a human-readable description of this Action Rule ID

type ActionType

type ActionType string
const (
	ActionTypeAddActionGroups       ActionType = "AddActionGroups"
	ActionTypeRemoveAllActionGroups ActionType = "RemoveAllActionGroups"
)

type AddActionGroups

type AddActionGroups struct {
	ActionGroupIds []string `json:"actionGroupIds"`
}

func (AddActionGroups) MarshalJSON

func (s AddActionGroups) MarshalJSON() ([]byte, error)

type AlertProcessingRule

type AlertProcessingRule struct {
	Id         *string                        `json:"id,omitempty"`
	Location   string                         `json:"location"`
	Name       *string                        `json:"name,omitempty"`
	Properties *AlertProcessingRuleProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData         `json:"systemData,omitempty"`
	Tags       *map[string]string             `json:"tags,omitempty"`
	Type       *string                        `json:"type,omitempty"`
}

type AlertProcessingRuleOperationPredicate

type AlertProcessingRuleOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (AlertProcessingRuleOperationPredicate) Matches

type AlertProcessingRuleProperties

type AlertProcessingRuleProperties struct {
	Actions     []Action     `json:"actions"`
	Conditions  *[]Condition `json:"conditions,omitempty"`
	Description *string      `json:"description,omitempty"`
	Enabled     *bool        `json:"enabled,omitempty"`
	Schedule    *Schedule    `json:"schedule,omitempty"`
	Scopes      []string     `json:"scopes"`
}

func (*AlertProcessingRuleProperties) UnmarshalJSON

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

type AlertProcessingRulesClient

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

func NewAlertProcessingRulesClientWithBaseURI

func NewAlertProcessingRulesClientWithBaseURI(endpoint string) AlertProcessingRulesClient

func (AlertProcessingRulesClient) AlertProcessingRulesCreateOrUpdate

AlertProcessingRulesCreateOrUpdate ...

func (AlertProcessingRulesClient) AlertProcessingRulesDelete

AlertProcessingRulesDelete ...

func (AlertProcessingRulesClient) AlertProcessingRulesGetByName

func (c AlertProcessingRulesClient) AlertProcessingRulesGetByName(ctx context.Context, id ActionRuleId) (result AlertProcessingRulesGetByNameOperationResponse, err error)

AlertProcessingRulesGetByName ...

func (AlertProcessingRulesClient) AlertProcessingRulesListByResourceGroup

AlertProcessingRulesListByResourceGroup ...

func (AlertProcessingRulesClient) AlertProcessingRulesListByResourceGroupComplete

AlertProcessingRulesListByResourceGroupComplete retrieves all of the results into a single object

func (AlertProcessingRulesClient) AlertProcessingRulesListByResourceGroupCompleteMatchingPredicate

func (c AlertProcessingRulesClient) AlertProcessingRulesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AlertProcessingRuleOperationPredicate) (resp AlertProcessingRulesListByResourceGroupCompleteResult, err error)

AlertProcessingRulesListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (AlertProcessingRulesClient) AlertProcessingRulesListBySubscription

AlertProcessingRulesListBySubscription ...

func (AlertProcessingRulesClient) AlertProcessingRulesListBySubscriptionComplete

AlertProcessingRulesListBySubscriptionComplete retrieves all of the results into a single object

func (AlertProcessingRulesClient) AlertProcessingRulesListBySubscriptionCompleteMatchingPredicate

func (c AlertProcessingRulesClient) AlertProcessingRulesListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AlertProcessingRuleOperationPredicate) (resp AlertProcessingRulesListBySubscriptionCompleteResult, err error)

AlertProcessingRulesListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (AlertProcessingRulesClient) AlertProcessingRulesUpdate

func (c AlertProcessingRulesClient) AlertProcessingRulesUpdate(ctx context.Context, id ActionRuleId, input PatchObject) (result AlertProcessingRulesUpdateOperationResponse, err error)

AlertProcessingRulesUpdate ...

type AlertProcessingRulesCreateOrUpdateOperationResponse

type AlertProcessingRulesCreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *AlertProcessingRule
}

type AlertProcessingRulesDeleteOperationResponse

type AlertProcessingRulesDeleteOperationResponse struct {
	HttpResponse *http.Response
}

type AlertProcessingRulesGetByNameOperationResponse

type AlertProcessingRulesGetByNameOperationResponse struct {
	HttpResponse *http.Response
	Model        *AlertProcessingRule
}

type AlertProcessingRulesListByResourceGroupCompleteResult

type AlertProcessingRulesListByResourceGroupCompleteResult struct {
	Items []AlertProcessingRule
}

type AlertProcessingRulesListByResourceGroupOperationResponse

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

func (AlertProcessingRulesListByResourceGroupOperationResponse) HasMore

func (AlertProcessingRulesListByResourceGroupOperationResponse) LoadMore

type AlertProcessingRulesListBySubscriptionCompleteResult

type AlertProcessingRulesListBySubscriptionCompleteResult struct {
	Items []AlertProcessingRule
}

type AlertProcessingRulesListBySubscriptionOperationResponse

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

func (AlertProcessingRulesListBySubscriptionOperationResponse) HasMore

func (AlertProcessingRulesListBySubscriptionOperationResponse) LoadMore

type AlertProcessingRulesUpdateOperationResponse

type AlertProcessingRulesUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *AlertProcessingRule
}

type Condition

type Condition struct {
	Field    *Field    `json:"field,omitempty"`
	Operator *Operator `json:"operator,omitempty"`
	Values   *[]string `json:"values,omitempty"`
}

type DailyRecurrence

type DailyRecurrence struct {

	// Fields inherited from Recurrence
	EndTime   *string `json:"endTime,omitempty"`
	StartTime *string `json:"startTime,omitempty"`
}

func (DailyRecurrence) MarshalJSON

func (s DailyRecurrence) MarshalJSON() ([]byte, error)

type DaysOfWeek

type DaysOfWeek string
const (
	DaysOfWeekFriday    DaysOfWeek = "Friday"
	DaysOfWeekMonday    DaysOfWeek = "Monday"
	DaysOfWeekSaturday  DaysOfWeek = "Saturday"
	DaysOfWeekSunday    DaysOfWeek = "Sunday"
	DaysOfWeekThursday  DaysOfWeek = "Thursday"
	DaysOfWeekTuesday   DaysOfWeek = "Tuesday"
	DaysOfWeekWednesday DaysOfWeek = "Wednesday"
)

type Field

type Field string
const (
	FieldAlertContext        Field = "AlertContext"
	FieldAlertRuleId         Field = "AlertRuleId"
	FieldAlertRuleName       Field = "AlertRuleName"
	FieldDescription         Field = "Description"
	FieldMonitorCondition    Field = "MonitorCondition"
	FieldMonitorService      Field = "MonitorService"
	FieldSeverity            Field = "Severity"
	FieldSignalType          Field = "SignalType"
	FieldTargetResource      Field = "TargetResource"
	FieldTargetResourceGroup Field = "TargetResourceGroup"
	FieldTargetResourceType  Field = "TargetResourceType"
)

type MonthlyRecurrence

type MonthlyRecurrence struct {
	DaysOfMonth []int64 `json:"daysOfMonth"`

	// Fields inherited from Recurrence
	EndTime   *string `json:"endTime,omitempty"`
	StartTime *string `json:"startTime,omitempty"`
}

func (MonthlyRecurrence) MarshalJSON

func (s MonthlyRecurrence) MarshalJSON() ([]byte, error)

type Operator

type Operator string
const (
	OperatorContains       Operator = "Contains"
	OperatorDoesNotContain Operator = "DoesNotContain"
	OperatorEquals         Operator = "Equals"
	OperatorNotEquals      Operator = "NotEquals"
)

type PatchObject

type PatchObject struct {
	Properties *PatchProperties   `json:"properties,omitempty"`
	Tags       *map[string]string `json:"tags,omitempty"`
}

type PatchProperties

type PatchProperties struct {
	Enabled *bool `json:"enabled,omitempty"`
}

type Recurrence

type Recurrence interface {
}

type RecurrenceType

type RecurrenceType string
const (
	RecurrenceTypeDaily   RecurrenceType = "Daily"
	RecurrenceTypeMonthly RecurrenceType = "Monthly"
	RecurrenceTypeWeekly  RecurrenceType = "Weekly"
)

type RemoveAllActionGroups

type RemoveAllActionGroups struct {
}

func (RemoveAllActionGroups) MarshalJSON

func (s RemoveAllActionGroups) MarshalJSON() ([]byte, error)

type Schedule

type Schedule struct {
	EffectiveFrom  *string       `json:"effectiveFrom,omitempty"`
	EffectiveUntil *string       `json:"effectiveUntil,omitempty"`
	Recurrences    *[]Recurrence `json:"recurrences,omitempty"`
	TimeZone       *string       `json:"timeZone,omitempty"`
}

func (*Schedule) UnmarshalJSON

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

type WeeklyRecurrence

type WeeklyRecurrence struct {
	DaysOfWeek []DaysOfWeek `json:"daysOfWeek"`

	// Fields inherited from Recurrence
	EndTime   *string `json:"endTime,omitempty"`
	StartTime *string `json:"startTime,omitempty"`
}

func (WeeklyRecurrence) MarshalJSON

func (s WeeklyRecurrence) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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