metricalertsstatus

package
v0.20241209.1115630 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalertsstatus Documentation

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

Client Initialization

client := metricalertsstatus.NewMetricAlertsStatusClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MetricAlertsStatusClient.List

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

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

Example Usage: MetricAlertsStatusClient.ListByName

ctx := context.TODO()
id := metricalertsstatus.NewStatusID("12345678-1234-9876-4563-123456789012", "example-resource-group", "metricAlertName", "statusName")

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

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

ValidateMetricAlertID checks that 'input' can be parsed as a Metric Alert ID

func ValidateStatusID

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

ValidateStatusID checks that 'input' can be parsed as a Status ID

Types

type ListByNameOperationResponse

type ListByNameOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MetricAlertStatusCollection
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MetricAlertStatusCollection
}

type MetricAlertId

type MetricAlertId struct {
	SubscriptionId    string
	ResourceGroupName string
	MetricAlertName   string
}

MetricAlertId is a struct representing the Resource ID for a Metric Alert

func NewMetricAlertID

func NewMetricAlertID(subscriptionId string, resourceGroupName string, metricAlertName string) MetricAlertId

NewMetricAlertID returns a new MetricAlertId struct

func ParseMetricAlertID

func ParseMetricAlertID(input string) (*MetricAlertId, error)

ParseMetricAlertID parses 'input' into a MetricAlertId

func ParseMetricAlertIDInsensitively

func ParseMetricAlertIDInsensitively(input string) (*MetricAlertId, error)

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

func (*MetricAlertId) FromParseResult

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

func (MetricAlertId) ID

func (id MetricAlertId) ID() string

ID returns the formatted Metric Alert ID

func (MetricAlertId) Segments

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

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

func (MetricAlertId) String

func (id MetricAlertId) String() string

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

type MetricAlertStatus

type MetricAlertStatus struct {
	Id         *string                      `json:"id,omitempty"`
	Name       *string                      `json:"name,omitempty"`
	Properties *MetricAlertStatusProperties `json:"properties,omitempty"`
	Type       *string                      `json:"type,omitempty"`
}

type MetricAlertStatusCollection

type MetricAlertStatusCollection struct {
	Value *[]MetricAlertStatus `json:"value,omitempty"`
}

type MetricAlertStatusProperties

type MetricAlertStatusProperties struct {
	Dimensions *map[string]string `json:"dimensions,omitempty"`
	Status     *string            `json:"status,omitempty"`
	Timestamp  *string            `json:"timestamp,omitempty"`
}

func (*MetricAlertStatusProperties) GetTimestampAsTime

func (o *MetricAlertStatusProperties) GetTimestampAsTime() (*time.Time, error)

func (*MetricAlertStatusProperties) SetTimestampAsTime

func (o *MetricAlertStatusProperties) SetTimestampAsTime(input time.Time)

type MetricAlertsStatusClient

type MetricAlertsStatusClient struct {
	Client *resourcemanager.Client
}

func NewMetricAlertsStatusClientWithBaseURI

func NewMetricAlertsStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricAlertsStatusClient, error)

func (MetricAlertsStatusClient) List

List ...

func (MetricAlertsStatusClient) ListByName

ListByName ...

type StatusId

type StatusId struct {
	SubscriptionId    string
	ResourceGroupName string
	MetricAlertName   string
	StatusName        string
}

StatusId is a struct representing the Resource ID for a Status

func NewStatusID

func NewStatusID(subscriptionId string, resourceGroupName string, metricAlertName string, statusName string) StatusId

NewStatusID returns a new StatusId struct

func ParseStatusID

func ParseStatusID(input string) (*StatusId, error)

ParseStatusID parses 'input' into a StatusId

func ParseStatusIDInsensitively

func ParseStatusIDInsensitively(input string) (*StatusId, error)

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

func (*StatusId) FromParseResult

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

func (StatusId) ID

func (id StatusId) ID() string

ID returns the formatted Status ID

func (StatusId) Segments

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

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

func (StatusId) String

func (id StatusId) String() string

String returns a human-readable description of this Status ID

Jump to

Keyboard shortcuts

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