alerts

package
v0.20240419.1132837 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/alerts Documentation

The alerts SDK allows for interaction with the Azure Resource Manager Service databoxedge (API Version 2023-12-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/databoxedge/2023-12-01/alerts"

Client Initialization

client := alerts.NewAlertsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AlertsClient.Get

ctx := context.TODO()
id := alerts.NewAlertID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "alertValue")

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: AlertsClient.ListByDataBoxEdgeDevice

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAlertSeverity

func PossibleValuesForAlertSeverity() []string

func ValidateAlertID

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

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

func ValidateDataBoxEdgeDeviceID

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

ValidateDataBoxEdgeDeviceID checks that 'input' can be parsed as a Data Box Edge Device ID

Types

type Alert

type Alert struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *AlertProperties       `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type AlertErrorDetails

type AlertErrorDetails struct {
	ErrorCode    *string `json:"errorCode,omitempty"`
	ErrorMessage *string `json:"errorMessage,omitempty"`
	Occurrences  *int64  `json:"occurrences,omitempty"`
}

type AlertId

type AlertId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
	AlertName             string
}

AlertId is a struct representing the Resource ID for a Alert

func NewAlertID

func NewAlertID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string, alertName 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 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 {
	AlertType           *string            `json:"alertType,omitempty"`
	AppearedAtDateTime  *string            `json:"appearedAtDateTime,omitempty"`
	DetailedInformation *map[string]string `json:"detailedInformation,omitempty"`
	ErrorDetails        *AlertErrorDetails `json:"errorDetails,omitempty"`
	Recommendation      *string            `json:"recommendation,omitempty"`
	Severity            *AlertSeverity     `json:"severity,omitempty"`
	Title               *string            `json:"title,omitempty"`
}

func (*AlertProperties) GetAppearedAtDateTimeAsTime

func (o *AlertProperties) GetAppearedAtDateTimeAsTime() (*time.Time, error)

func (*AlertProperties) SetAppearedAtDateTimeAsTime

func (o *AlertProperties) SetAppearedAtDateTimeAsTime(input time.Time)

type AlertSeverity

type AlertSeverity string
const (
	AlertSeverityCritical      AlertSeverity = "Critical"
	AlertSeverityInformational AlertSeverity = "Informational"
	AlertSeverityWarning       AlertSeverity = "Warning"
)

func (*AlertSeverity) UnmarshalJSON

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

type AlertsClient

type AlertsClient struct {
	Client *resourcemanager.Client
}

func NewAlertsClientWithBaseURI

func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error)

func (AlertsClient) Get

func (c AlertsClient) Get(ctx context.Context, id AlertId) (result GetOperationResponse, err error)

Get ...

func (AlertsClient) ListByDataBoxEdgeDevice

func (c AlertsClient) ListByDataBoxEdgeDevice(ctx context.Context, id DataBoxEdgeDeviceId) (result ListByDataBoxEdgeDeviceOperationResponse, err error)

ListByDataBoxEdgeDevice ...

func (AlertsClient) ListByDataBoxEdgeDeviceComplete

func (c AlertsClient) ListByDataBoxEdgeDeviceComplete(ctx context.Context, id DataBoxEdgeDeviceId) (ListByDataBoxEdgeDeviceCompleteResult, error)

ListByDataBoxEdgeDeviceComplete retrieves all the results into a single object

func (AlertsClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate

func (c AlertsClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate(ctx context.Context, id DataBoxEdgeDeviceId, predicate AlertOperationPredicate) (result ListByDataBoxEdgeDeviceCompleteResult, err error)

ListByDataBoxEdgeDeviceCompleteMatchingPredicate retrieves all the results and then applies the predicate

type DataBoxEdgeDeviceId

type DataBoxEdgeDeviceId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
}

DataBoxEdgeDeviceId is a struct representing the Resource ID for a Data Box Edge Device

func NewDataBoxEdgeDeviceID

func NewDataBoxEdgeDeviceID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string) DataBoxEdgeDeviceId

NewDataBoxEdgeDeviceID returns a new DataBoxEdgeDeviceId struct

func ParseDataBoxEdgeDeviceID

func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error)

ParseDataBoxEdgeDeviceID parses 'input' into a DataBoxEdgeDeviceId

func ParseDataBoxEdgeDeviceIDInsensitively

func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, error)

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

func (*DataBoxEdgeDeviceId) FromParseResult

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

func (DataBoxEdgeDeviceId) ID

func (id DataBoxEdgeDeviceId) ID() string

ID returns the formatted Data Box Edge Device ID

func (DataBoxEdgeDeviceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Data Box Edge Device ID

func (DataBoxEdgeDeviceId) String

func (id DataBoxEdgeDeviceId) String() string

String returns a human-readable description of this Data Box Edge Device ID

type GetOperationResponse

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

type ListByDataBoxEdgeDeviceCompleteResult

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

type ListByDataBoxEdgeDeviceOperationResponse

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

Jump to

Keyboard shortcuts

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