alertruleincidents

package
v0.20230523.1140858 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/alertruleincidents Documentation

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

Client Initialization

client := alertruleincidents.NewAlertRuleIncidentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AlertRuleIncidentsClient.Get

ctx := context.TODO()
id := alertruleincidents.NewIncidentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "alertRuleValue", "incidentValue")

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: AlertRuleIncidentsClient.ListByAlertRule

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

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

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

ValidateAlertRuleID checks that 'input' can be parsed as a Alert Rule ID

func ValidateIncidentID

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

ValidateIncidentID checks that 'input' can be parsed as a Incident ID

Types

type AlertRuleId

type AlertRuleId struct {
	SubscriptionId    string
	ResourceGroupName string
	AlertRuleName     string
}

AlertRuleId is a struct representing the Resource ID for a Alert Rule

func NewAlertRuleID

func NewAlertRuleID(subscriptionId string, resourceGroupName string, alertRuleName string) AlertRuleId

NewAlertRuleID returns a new AlertRuleId struct

func ParseAlertRuleID

func ParseAlertRuleID(input string) (*AlertRuleId, error)

ParseAlertRuleID parses 'input' into a AlertRuleId

func ParseAlertRuleIDInsensitively

func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error)

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

func (AlertRuleId) ID

func (id AlertRuleId) ID() string

ID returns the formatted Alert Rule ID

func (AlertRuleId) Segments

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

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

func (AlertRuleId) String

func (id AlertRuleId) String() string

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

type AlertRuleIncidentsClient

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

func NewAlertRuleIncidentsClientWithBaseURI

func NewAlertRuleIncidentsClientWithBaseURI(endpoint string) AlertRuleIncidentsClient

func (AlertRuleIncidentsClient) Get

Get ...

func (AlertRuleIncidentsClient) ListByAlertRule

ListByAlertRule ...

type GetOperationResponse

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

type Incident

type Incident struct {
	ActivatedTime *string `json:"activatedTime,omitempty"`
	IsActive      *bool   `json:"isActive,omitempty"`
	Name          *string `json:"name,omitempty"`
	ResolvedTime  *string `json:"resolvedTime,omitempty"`
	RuleName      *string `json:"ruleName,omitempty"`
}

func (*Incident) GetActivatedTimeAsTime

func (o *Incident) GetActivatedTimeAsTime() (*time.Time, error)

func (*Incident) GetResolvedTimeAsTime

func (o *Incident) GetResolvedTimeAsTime() (*time.Time, error)

func (*Incident) SetActivatedTimeAsTime

func (o *Incident) SetActivatedTimeAsTime(input time.Time)

func (*Incident) SetResolvedTimeAsTime

func (o *Incident) SetResolvedTimeAsTime(input time.Time)

type IncidentId

type IncidentId struct {
	SubscriptionId    string
	ResourceGroupName string
	AlertRuleName     string
	IncidentName      string
}

IncidentId is a struct representing the Resource ID for a Incident

func NewIncidentID

func NewIncidentID(subscriptionId string, resourceGroupName string, alertRuleName string, incidentName string) IncidentId

NewIncidentID returns a new IncidentId struct

func ParseIncidentID

func ParseIncidentID(input string) (*IncidentId, error)

ParseIncidentID parses 'input' into a IncidentId

func ParseIncidentIDInsensitively

func ParseIncidentIDInsensitively(input string) (*IncidentId, error)

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

func (IncidentId) ID

func (id IncidentId) ID() string

ID returns the formatted Incident ID

func (IncidentId) Segments

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

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

func (IncidentId) String

func (id IncidentId) String() string

String returns a human-readable description of this Incident ID

type IncidentListResult

type IncidentListResult struct {
	Value *[]Incident `json:"value,omitempty"`
}

type ListByAlertRuleOperationResponse

type ListByAlertRuleOperationResponse struct {
	HttpResponse *http.Response
	Model        *IncidentListResult
}

Jump to

Keyboard shortcuts

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