scheduledqueryrules

package
v0.20230802.1160114 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-04-16/scheduledqueryrules Documentation

The scheduledqueryrules SDK allows for interaction with the Azure Resource Manager Service insights (API Version 2018-04-16).

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/2018-04-16/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.LogSearchRuleResource{
	// ...
}


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")

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

Example Usage: ScheduledQueryRulesClient.ListBySubscription

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

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

Example Usage: ScheduledQueryRulesClient.Update

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

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


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() []string

func PossibleValuesForConditionalOperator

func PossibleValuesForConditionalOperator() []string

func PossibleValuesForEnabled

func PossibleValuesForEnabled() []string

func PossibleValuesForMetricTriggerType

func PossibleValuesForMetricTriggerType() []string

func PossibleValuesForOperator

func PossibleValuesForOperator() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForQueryType

func PossibleValuesForQueryType() []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 Action

type Action interface {
}

type AlertSeverity

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

type AlertingAction

type AlertingAction struct {
	AznsAction      *AzNsActionGroup `json:"aznsAction,omitempty"`
	Severity        AlertSeverity    `json:"severity"`
	ThrottlingInMin *int64           `json:"throttlingInMin,omitempty"`
	Trigger         TriggerCondition `json:"trigger"`
}

func (AlertingAction) MarshalJSON

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

type AzNsActionGroup

type AzNsActionGroup struct {
	ActionGroup          *[]string `json:"actionGroup,omitempty"`
	CustomWebhookPayload *string   `json:"customWebhookPayload,omitempty"`
	EmailSubject         *string   `json:"emailSubject,omitempty"`
}

type ConditionalOperator

type ConditionalOperator string
const (
	ConditionalOperatorEqual              ConditionalOperator = "Equal"
	ConditionalOperatorGreaterThan        ConditionalOperator = "GreaterThan"
	ConditionalOperatorGreaterThanOrEqual ConditionalOperator = "GreaterThanOrEqual"
	ConditionalOperatorLessThan           ConditionalOperator = "LessThan"
	ConditionalOperatorLessThanOrEqual    ConditionalOperator = "LessThanOrEqual"
)

type CreateOrUpdateOperationResponse

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

type Criteria

type Criteria struct {
	Dimensions *[]Dimension `json:"dimensions,omitempty"`
	MetricName string       `json:"metricName"`
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type Dimension

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

type Enabled

type Enabled string
const (
	EnabledFalse Enabled = "false"
	EnabledTrue  Enabled = "true"
)

type GetOperationResponse

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

type ListByResourceGroupOperationOptions

type ListByResourceGroupOperationOptions struct {
	Filter *string
}

func DefaultListByResourceGroupOperationOptions

func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *LogSearchRuleResourceCollection
}

type ListBySubscriptionOperationOptions

type ListBySubscriptionOperationOptions struct {
	Filter *string
}

func DefaultListBySubscriptionOperationOptions

func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	Model        *LogSearchRuleResourceCollection
}

type LogMetricTrigger

type LogMetricTrigger struct {
	MetricColumn      *string              `json:"metricColumn,omitempty"`
	MetricTriggerType *MetricTriggerType   `json:"metricTriggerType,omitempty"`
	Threshold         *float64             `json:"threshold,omitempty"`
	ThresholdOperator *ConditionalOperator `json:"thresholdOperator,omitempty"`
}

type LogSearchRule

type LogSearchRule struct {
	Action                   Action             `json:"action"`
	AutoMitigate             *bool              `json:"autoMitigate,omitempty"`
	CreatedWithApiVersion    *string            `json:"createdWithApiVersion,omitempty"`
	Description              *string            `json:"description,omitempty"`
	DisplayName              *string            `json:"displayName,omitempty"`
	Enabled                  *Enabled           `json:"enabled,omitempty"`
	IsLegacyLogAnalyticsRule *bool              `json:"isLegacyLogAnalyticsRule,omitempty"`
	LastUpdatedTime          *string            `json:"lastUpdatedTime,omitempty"`
	ProvisioningState        *ProvisioningState `json:"provisioningState,omitempty"`
	Schedule                 *Schedule          `json:"schedule,omitempty"`
	Source                   Source             `json:"source"`
}

func (*LogSearchRule) GetLastUpdatedTimeAsTime

func (o *LogSearchRule) GetLastUpdatedTimeAsTime() (*time.Time, error)

func (*LogSearchRule) SetLastUpdatedTimeAsTime

func (o *LogSearchRule) SetLastUpdatedTimeAsTime(input time.Time)

func (*LogSearchRule) UnmarshalJSON

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

type LogSearchRulePatch

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

type LogSearchRuleResource

type LogSearchRuleResource struct {
	Etag       *string            `json:"etag,omitempty"`
	Id         *string            `json:"id,omitempty"`
	Kind       *string            `json:"kind,omitempty"`
	Location   string             `json:"location"`
	Name       *string            `json:"name,omitempty"`
	Properties LogSearchRule      `json:"properties"`
	Tags       *map[string]string `json:"tags,omitempty"`
	Type       *string            `json:"type,omitempty"`
}

type LogSearchRuleResourceCollection

type LogSearchRuleResourceCollection struct {
	Value *[]LogSearchRuleResource `json:"value,omitempty"`
}

type LogSearchRuleResourcePatch

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

type LogToMetricAction

type LogToMetricAction struct {
	Criteria []Criteria `json:"criteria"`
}

func (LogToMetricAction) MarshalJSON

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

type MetricTriggerType

type MetricTriggerType string
const (
	MetricTriggerTypeConsecutive MetricTriggerType = "Consecutive"
	MetricTriggerTypeTotal       MetricTriggerType = "Total"
)

type Operator

type Operator string
const (
	OperatorInclude Operator = "Include"
)

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateDeploying ProvisioningState = "Deploying"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

type QueryType

type QueryType string
const (
	QueryTypeResultCount QueryType = "ResultCount"
)

type Schedule

type Schedule struct {
	FrequencyInMinutes  int64 `json:"frequencyInMinutes"`
	TimeWindowInMinutes int64 `json:"timeWindowInMinutes"`
}

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 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) ListBySubscription

ListBySubscription ...

func (ScheduledQueryRulesClient) Update

Update ...

type Source

type Source struct {
	AuthorizedResources *[]string  `json:"authorizedResources,omitempty"`
	DataSourceId        string     `json:"dataSourceId"`
	Query               *string    `json:"query,omitempty"`
	QueryType           *QueryType `json:"queryType,omitempty"`
}

type TriggerCondition

type TriggerCondition struct {
	MetricTrigger     *LogMetricTrigger   `json:"metricTrigger,omitempty"`
	Threshold         float64             `json:"threshold"`
	ThresholdOperator ConditionalOperator `json:"thresholdOperator"`
}

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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