scheduledqueryrules

package
v0.20230503.1121530 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-08-01/scheduledqueryrules Documentation

The scheduledqueryrules SDK allows for interaction with the Azure Resource Manager Service insights (API Version 2021-08-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/insights/2021-08-01/scheduledqueryrules"

Client Initialization

client := scheduledqueryrules.NewScheduledQueryRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ScheduledQueryRulesClient.CreateOrUpdate

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

payload := scheduledqueryrules.ScheduledQueryRuleResource{
	// ...
}


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

Example Usage: ScheduledQueryRulesClient.Delete

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

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

Example Usage: ScheduledQueryRulesClient.Get

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

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

Example Usage: ScheduledQueryRulesClient.ListByResourceGroup

ctx := context.TODO()
id := scheduledqueryrules.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: ScheduledQueryRulesClient.ListBySubscription

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

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

Example Usage: ScheduledQueryRulesClient.Update

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

payload := scheduledqueryrules.ScheduledQueryRuleResourcePatch{
	// ...
}


read, err := client.Update(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 PossibleValuesForAlertSeverity

func PossibleValuesForAlertSeverity() []int64

func PossibleValuesForConditionOperator

func PossibleValuesForConditionOperator() []string

func PossibleValuesForDimensionOperator

func PossibleValuesForDimensionOperator() []string

func PossibleValuesForKind

func PossibleValuesForKind() []string

func PossibleValuesForTimeAggregation

func PossibleValuesForTimeAggregation() []string

func ValidateScheduledQueryRuleID

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

ValidateScheduledQueryRuleID checks that 'input' can be parsed as a Scheduled Query Rule ID

Types

type Actions

type Actions struct {
	ActionGroups     *[]string          `json:"actionGroups,omitempty"`
	CustomProperties *map[string]string `json:"customProperties,omitempty"`
}

type AlertSeverity

type AlertSeverity int64
const (
	AlertSeverityFour  AlertSeverity = 4
	AlertSeverityOne   AlertSeverity = 1
	AlertSeverityThree AlertSeverity = 3
	AlertSeverityTwo   AlertSeverity = 2
	AlertSeverityZero  AlertSeverity = 0
)

type Condition

type Condition struct {
	Dimensions          *[]Dimension             `json:"dimensions,omitempty"`
	FailingPeriods      *ConditionFailingPeriods `json:"failingPeriods,omitempty"`
	MetricMeasureColumn *string                  `json:"metricMeasureColumn,omitempty"`
	MetricName          *string                  `json:"metricName,omitempty"`
	Operator            *ConditionOperator       `json:"operator,omitempty"`
	Query               *string                  `json:"query,omitempty"`
	ResourceIdColumn    *string                  `json:"resourceIdColumn,omitempty"`
	Threshold           *float64                 `json:"threshold,omitempty"`
	TimeAggregation     *TimeAggregation         `json:"timeAggregation,omitempty"`
}

type ConditionFailingPeriods

type ConditionFailingPeriods struct {
	MinFailingPeriodsToAlert  *int64 `json:"minFailingPeriodsToAlert,omitempty"`
	NumberOfEvaluationPeriods *int64 `json:"numberOfEvaluationPeriods,omitempty"`
}

type ConditionOperator

type ConditionOperator string
const (
	ConditionOperatorEquals             ConditionOperator = "Equals"
	ConditionOperatorGreaterThan        ConditionOperator = "GreaterThan"
	ConditionOperatorGreaterThanOrEqual ConditionOperator = "GreaterThanOrEqual"
	ConditionOperatorLessThan           ConditionOperator = "LessThan"
	ConditionOperatorLessThanOrEqual    ConditionOperator = "LessThanOrEqual"
)

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ScheduledQueryRuleResource
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type Dimension

type Dimension struct {
	Name     string            `json:"name"`
	Operator DimensionOperator `json:"operator"`
	Values   []string          `json:"values"`
}

type DimensionOperator

type DimensionOperator string
const (
	DimensionOperatorExclude DimensionOperator = "Exclude"
	DimensionOperatorInclude DimensionOperator = "Include"
)

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *ScheduledQueryRuleResource
}

type Kind

type Kind string
const (
	KindLogAlert    Kind = "LogAlert"
	KindLogToMetric Kind = "LogToMetric"
)

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []ScheduledQueryRuleResource
}

type ListByResourceGroupOperationResponse

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

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []ScheduledQueryRuleResource
}

type ListBySubscriptionOperationResponse

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

func (ListBySubscriptionOperationResponse) HasMore

func (ListBySubscriptionOperationResponse) LoadMore

type ScheduledQueryRuleCriteria

type ScheduledQueryRuleCriteria struct {
	AllOf *[]Condition `json:"allOf,omitempty"`
}

type ScheduledQueryRuleId

type ScheduledQueryRuleId struct {
	SubscriptionId         string
	ResourceGroupName      string
	ScheduledQueryRuleName string
}

ScheduledQueryRuleId is a struct representing the Resource ID for a Scheduled Query Rule

func NewScheduledQueryRuleID

func NewScheduledQueryRuleID(subscriptionId string, resourceGroupName string, scheduledQueryRuleName string) ScheduledQueryRuleId

NewScheduledQueryRuleID returns a new ScheduledQueryRuleId struct

func ParseScheduledQueryRuleID

func ParseScheduledQueryRuleID(input string) (*ScheduledQueryRuleId, error)

ParseScheduledQueryRuleID parses 'input' into a ScheduledQueryRuleId

func ParseScheduledQueryRuleIDInsensitively

func ParseScheduledQueryRuleIDInsensitively(input string) (*ScheduledQueryRuleId, error)

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

func (ScheduledQueryRuleId) ID

func (id ScheduledQueryRuleId) ID() string

ID returns the formatted Scheduled Query Rule ID

func (ScheduledQueryRuleId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scheduled Query Rule ID

func (ScheduledQueryRuleId) String

func (id ScheduledQueryRuleId) String() string

String returns a human-readable description of this Scheduled Query Rule ID

type ScheduledQueryRuleProperties

type ScheduledQueryRuleProperties struct {
	Actions                               *Actions                    `json:"actions,omitempty"`
	AutoMitigate                          *bool                       `json:"autoMitigate,omitempty"`
	CheckWorkspaceAlertsStorageConfigured *bool                       `json:"checkWorkspaceAlertsStorageConfigured,omitempty"`
	CreatedWithApiVersion                 *string                     `json:"createdWithApiVersion,omitempty"`
	Criteria                              *ScheduledQueryRuleCriteria `json:"criteria,omitempty"`
	Description                           *string                     `json:"description,omitempty"`
	DisplayName                           *string                     `json:"displayName,omitempty"`
	Enabled                               *bool                       `json:"enabled,omitempty"`
	EvaluationFrequency                   *string                     `json:"evaluationFrequency,omitempty"`
	IsLegacyLogAnalyticsRule              *bool                       `json:"isLegacyLogAnalyticsRule,omitempty"`
	IsWorkspaceAlertsStorageConfigured    *bool                       `json:"isWorkspaceAlertsStorageConfigured,omitempty"`
	MuteActionsDuration                   *string                     `json:"muteActionsDuration,omitempty"`
	OverrideQueryTimeRange                *string                     `json:"overrideQueryTimeRange,omitempty"`
	Scopes                                *[]string                   `json:"scopes,omitempty"`
	Severity                              *AlertSeverity              `json:"severity,omitempty"`
	SkipQueryValidation                   *bool                       `json:"skipQueryValidation,omitempty"`
	TargetResourceTypes                   *[]string                   `json:"targetResourceTypes,omitempty"`
	WindowSize                            *string                     `json:"windowSize,omitempty"`
}

type ScheduledQueryRuleResource

type ScheduledQueryRuleResource struct {
	Etag       *string                      `json:"etag,omitempty"`
	Id         *string                      `json:"id,omitempty"`
	Kind       *Kind                        `json:"kind,omitempty"`
	Location   string                       `json:"location"`
	Name       *string                      `json:"name,omitempty"`
	Properties ScheduledQueryRuleProperties `json:"properties"`
	SystemData *systemdata.SystemData       `json:"systemData,omitempty"`
	Tags       *map[string]string           `json:"tags,omitempty"`
	Type       *string                      `json:"type,omitempty"`
}

type ScheduledQueryRuleResourceOperationPredicate

type ScheduledQueryRuleResourceOperationPredicate struct {
	Etag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (ScheduledQueryRuleResourceOperationPredicate) Matches

type ScheduledQueryRuleResourcePatch

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

type ScheduledQueryRulesClient

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

func NewScheduledQueryRulesClientWithBaseURI

func NewScheduledQueryRulesClientWithBaseURI(endpoint string) ScheduledQueryRulesClient

func (ScheduledQueryRulesClient) CreateOrUpdate

CreateOrUpdate ...

func (ScheduledQueryRulesClient) Delete

Delete ...

func (ScheduledQueryRulesClient) Get

Get ...

func (ScheduledQueryRulesClient) ListByResourceGroup

ListByResourceGroup ...

func (ScheduledQueryRulesClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (ScheduledQueryRulesClient) ListByResourceGroupCompleteMatchingPredicate

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ScheduledQueryRulesClient) ListBySubscription

ListBySubscription ...

func (ScheduledQueryRulesClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all of the results into a single object

func (ScheduledQueryRulesClient) ListBySubscriptionCompleteMatchingPredicate

ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ScheduledQueryRulesClient) Update

Update ...

type TimeAggregation

type TimeAggregation string
const (
	TimeAggregationAverage TimeAggregation = "Average"
	TimeAggregationCount   TimeAggregation = "Count"
	TimeAggregationMaximum TimeAggregation = "Maximum"
	TimeAggregationMinimum TimeAggregation = "Minimum"
	TimeAggregationTotal   TimeAggregation = "Total"
)

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ScheduledQueryRuleResource
}

Jump to

Keyboard shortcuts

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