README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalertsstatus
Documentation
The metricalertsstatus
SDK allows for interaction with the Azure Resource Manager Service 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", "metricAlertValue")
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", "metricAlertValue", "statusValue")
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 ¶
- func ValidateMetricAlertID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateStatusID(input interface{}, key string) (warnings []string, errors []error)
- type ListByNameOperationResponse
- type ListOperationResponse
- type MetricAlertId
- type MetricAlertStatus
- type MetricAlertStatusCollection
- type MetricAlertStatusProperties
- type MetricAlertsStatusClient
- type StatusId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateMetricAlertID ¶
ValidateMetricAlertID checks that 'input' can be parsed as a Metric Alert ID
func ValidateStatusID ¶
ValidateStatusID checks that 'input' can be parsed as a Status ID
Types ¶
type ListByNameOperationResponse ¶
type ListByNameOperationResponse struct { HttpResponse *http.Response Model *MetricAlertStatusCollection }
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response Model *MetricAlertStatusCollection }
type MetricAlertId ¶
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) 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 autorest.Client // contains filtered or unexported fields }
func NewMetricAlertsStatusClientWithBaseURI ¶
func NewMetricAlertsStatusClientWithBaseURI(endpoint string) MetricAlertsStatusClient
func (MetricAlertsStatusClient) List ¶
func (c MetricAlertsStatusClient) List(ctx context.Context, id MetricAlertId) (result ListOperationResponse, err error)
List ...
func (MetricAlertsStatusClient) ListByName ¶
func (c MetricAlertsStatusClient) ListByName(ctx context.Context, id StatusId) (result ListByNameOperationResponse, err error)
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 ¶
ParseStatusID parses 'input' into a StatusId
func ParseStatusIDInsensitively ¶
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) Segments ¶
func (id StatusId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Status ID