metrics

package
v64.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package metrics implements the Azure ARM Metrics service API version .

Monitor Management Client

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Metrics
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type AggregationType

type AggregationType string

AggregationType enumerates the values for aggregation type.

const (
	// AggregationTypeAverage ...
	AggregationTypeAverage AggregationType = "Average"
	// AggregationTypeCount ...
	AggregationTypeCount AggregationType = "Count"
	// AggregationTypeMaximum ...
	AggregationTypeMaximum AggregationType = "Maximum"
	// AggregationTypeMinimum ...
	AggregationTypeMinimum AggregationType = "Minimum"
	// AggregationTypeNone ...
	AggregationTypeNone AggregationType = "None"
	// AggregationTypeTotal ...
	AggregationTypeTotal AggregationType = "Total"
)

func PossibleAggregationTypeValues

func PossibleAggregationTypeValues() []AggregationType

PossibleAggregationTypeValues returns an array of possible values for the AggregationType const type.

type AggregationTypeEnum

type AggregationTypeEnum string

AggregationTypeEnum enumerates the values for aggregation type enum.

const (
	// AggregationTypeEnumAverage ...
	AggregationTypeEnumAverage AggregationTypeEnum = "Average"
	// AggregationTypeEnumCount ...
	AggregationTypeEnumCount AggregationTypeEnum = "Count"
	// AggregationTypeEnumMaximum ...
	AggregationTypeEnumMaximum AggregationTypeEnum = "Maximum"
	// AggregationTypeEnumMinimum ...
	AggregationTypeEnumMinimum AggregationTypeEnum = "Minimum"
	// AggregationTypeEnumTotal ...
	AggregationTypeEnumTotal AggregationTypeEnum = "Total"
)

func PossibleAggregationTypeEnumValues

func PossibleAggregationTypeEnumValues() []AggregationTypeEnum

PossibleAggregationTypeEnumValues returns an array of possible values for the AggregationTypeEnum const type.

type AlertAction

type AlertAction struct {
	// ActionGroupID - the id of the action group to use.
	ActionGroupID *string `json:"actionGroupId,omitempty"`
	// WebHookProperties - This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.
	WebHookProperties map[string]*string `json:"webHookProperties"`
}

AlertAction an alert action.

func (AlertAction) MarshalJSON

func (aa AlertAction) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertAction.

type AlertCriteria

type AlertCriteria struct {
	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
	AdditionalProperties map[string]interface{} `json:""`
	// OdataType - Possible values include: 'OdataTypeMetricAlertCriteria', 'OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria', 'OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria', 'OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria'
	OdataType OdataType `json:"odata.type,omitempty"`
}

AlertCriteria the rule criteria that defines the conditions of the alert rule.

func (AlertCriteria) AsAlertCriteria

func (ac AlertCriteria) AsAlertCriteria() (*AlertCriteria, bool)

AsAlertCriteria is the BasicAlertCriteria implementation for AlertCriteria.

func (AlertCriteria) AsAlertMultipleResourceMultipleMetricCriteria

func (ac AlertCriteria) AsAlertMultipleResourceMultipleMetricCriteria() (*AlertMultipleResourceMultipleMetricCriteria, bool)

AsAlertMultipleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertCriteria.

func (AlertCriteria) AsAlertSingleResourceMultipleMetricCriteria

func (ac AlertCriteria) AsAlertSingleResourceMultipleMetricCriteria() (*AlertSingleResourceMultipleMetricCriteria, bool)

AsAlertSingleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertCriteria.

func (AlertCriteria) AsBasicAlertCriteria

func (ac AlertCriteria) AsBasicAlertCriteria() (BasicAlertCriteria, bool)

AsBasicAlertCriteria is the BasicAlertCriteria implementation for AlertCriteria.

func (AlertCriteria) AsWebtestLocationAvailabilityCriteria

func (ac AlertCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool)

AsWebtestLocationAvailabilityCriteria is the BasicAlertCriteria implementation for AlertCriteria.

func (AlertCriteria) MarshalJSON

func (ac AlertCriteria) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertCriteria.

func (*AlertCriteria) UnmarshalJSON

func (ac *AlertCriteria) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AlertCriteria struct.

type AlertMultipleResourceMultipleMetricCriteria

type AlertMultipleResourceMultipleMetricCriteria struct {
	// AllOf - the list of multiple metric criteria for this 'all of' operation.
	AllOf *[]BasicMultiMetricCriteria `json:"allOf,omitempty"`
	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
	AdditionalProperties map[string]interface{} `json:""`
	// OdataType - Possible values include: 'OdataTypeMetricAlertCriteria', 'OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria', 'OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria', 'OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria'
	OdataType OdataType `json:"odata.type,omitempty"`
}

AlertMultipleResourceMultipleMetricCriteria specifies the metric alert criteria for multiple resource that has multiple metric criteria.

func (AlertMultipleResourceMultipleMetricCriteria) AsAlertCriteria

func (amrmmc AlertMultipleResourceMultipleMetricCriteria) AsAlertCriteria() (*AlertCriteria, bool)

AsAlertCriteria is the BasicAlertCriteria implementation for AlertMultipleResourceMultipleMetricCriteria.

func (AlertMultipleResourceMultipleMetricCriteria) AsAlertMultipleResourceMultipleMetricCriteria

func (amrmmc AlertMultipleResourceMultipleMetricCriteria) AsAlertMultipleResourceMultipleMetricCriteria() (*AlertMultipleResourceMultipleMetricCriteria, bool)

AsAlertMultipleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertMultipleResourceMultipleMetricCriteria.

func (AlertMultipleResourceMultipleMetricCriteria) AsAlertSingleResourceMultipleMetricCriteria

func (amrmmc AlertMultipleResourceMultipleMetricCriteria) AsAlertSingleResourceMultipleMetricCriteria() (*AlertSingleResourceMultipleMetricCriteria, bool)

AsAlertSingleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertMultipleResourceMultipleMetricCriteria.

func (AlertMultipleResourceMultipleMetricCriteria) AsBasicAlertCriteria

func (amrmmc AlertMultipleResourceMultipleMetricCriteria) AsBasicAlertCriteria() (BasicAlertCriteria, bool)

AsBasicAlertCriteria is the BasicAlertCriteria implementation for AlertMultipleResourceMultipleMetricCriteria.

func (AlertMultipleResourceMultipleMetricCriteria) AsWebtestLocationAvailabilityCriteria

func (amrmmc AlertMultipleResourceMultipleMetricCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool)

AsWebtestLocationAvailabilityCriteria is the BasicAlertCriteria implementation for AlertMultipleResourceMultipleMetricCriteria.

func (AlertMultipleResourceMultipleMetricCriteria) MarshalJSON

func (amrmmc AlertMultipleResourceMultipleMetricCriteria) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertMultipleResourceMultipleMetricCriteria.

func (*AlertMultipleResourceMultipleMetricCriteria) UnmarshalJSON

func (amrmmc *AlertMultipleResourceMultipleMetricCriteria) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AlertMultipleResourceMultipleMetricCriteria struct.

type AlertProperties

type AlertProperties struct {
	// Description - the description of the metric alert that will be included in the alert email.
	Description *string `json:"description,omitempty"`
	// Severity - Alert severity {0, 1, 2, 3, 4}
	Severity *int32 `json:"severity,omitempty"`
	// Enabled - the flag that indicates whether the metric alert is enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// Scopes - the list of resource id's that this metric alert is scoped to.
	Scopes *[]string `json:"scopes,omitempty"`
	// EvaluationFrequency - how often the metric alert is evaluated represented in ISO 8601 duration format.
	EvaluationFrequency *string `json:"evaluationFrequency,omitempty"`
	// WindowSize - the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
	WindowSize *string `json:"windowSize,omitempty"`
	// TargetResourceType - the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
	TargetResourceType *string `json:"targetResourceType,omitempty"`
	// TargetResourceRegion - the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
	TargetResourceRegion *string `json:"targetResourceRegion,omitempty"`
	// Criteria - defines the specific alert criteria information.
	Criteria BasicAlertCriteria `json:"criteria,omitempty"`
	// AutoMitigate - the flag that indicates whether the alert should be auto resolved or not. The default is true.
	AutoMitigate *bool `json:"autoMitigate,omitempty"`
	// Actions - the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
	Actions *[]AlertAction `json:"actions,omitempty"`
	// LastUpdatedTime - READ-ONLY; Last time the rule was updated in ISO8601 format.
	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
	// IsMigrated - READ-ONLY; the value indicating whether this alert rule is migrated.
	IsMigrated *bool `json:"isMigrated,omitempty"`
}

AlertProperties an alert rule.

func (AlertProperties) MarshalJSON

func (ap AlertProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertProperties.

func (*AlertProperties) UnmarshalJSON

func (ap *AlertProperties) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AlertProperties struct.

type AlertPropertiesPatch

type AlertPropertiesPatch struct {
	// Description - the description of the metric alert that will be included in the alert email.
	Description *string `json:"description,omitempty"`
	// Severity - Alert severity {0, 1, 2, 3, 4}
	Severity *int32 `json:"severity,omitempty"`
	// Enabled - the flag that indicates whether the metric alert is enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// Scopes - the list of resource id's that this metric alert is scoped to.
	Scopes *[]string `json:"scopes,omitempty"`
	// EvaluationFrequency - how often the metric alert is evaluated represented in ISO 8601 duration format.
	EvaluationFrequency *string `json:"evaluationFrequency,omitempty"`
	// WindowSize - the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
	WindowSize *string `json:"windowSize,omitempty"`
	// TargetResourceType - the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
	TargetResourceType *string `json:"targetResourceType,omitempty"`
	// TargetResourceRegion - the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
	TargetResourceRegion *string `json:"targetResourceRegion,omitempty"`
	// Criteria - defines the specific alert criteria information.
	Criteria BasicAlertCriteria `json:"criteria,omitempty"`
	// AutoMitigate - the flag that indicates whether the alert should be auto resolved or not. The default is true.
	AutoMitigate *bool `json:"autoMitigate,omitempty"`
	// Actions - the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
	Actions *[]AlertAction `json:"actions,omitempty"`
	// LastUpdatedTime - READ-ONLY; Last time the rule was updated in ISO8601 format.
	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
	// IsMigrated - READ-ONLY; the value indicating whether this alert rule is migrated.
	IsMigrated *bool `json:"isMigrated,omitempty"`
}

AlertPropertiesPatch an alert rule properties for patch.

func (AlertPropertiesPatch) MarshalJSON

func (app AlertPropertiesPatch) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertPropertiesPatch.

func (*AlertPropertiesPatch) UnmarshalJSON

func (app *AlertPropertiesPatch) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AlertPropertiesPatch struct.

type AlertResource

type AlertResource struct {
	autorest.Response `json:"-"`
	// AlertProperties - The alert rule properties of the resource.
	*AlertProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Azure resource Id
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Azure resource name
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Azure resource type
	Type *string `json:"type,omitempty"`
	// Location - Resource location
	Location *string `json:"location,omitempty"`
	// Tags - Resource tags
	Tags map[string]*string `json:"tags"`
}

AlertResource the metric alert resource.

func (AlertResource) MarshalJSON

func (ar AlertResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertResource.

func (*AlertResource) UnmarshalJSON

func (ar *AlertResource) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AlertResource struct.

type AlertResourceCollection

type AlertResourceCollection struct {
	autorest.Response `json:"-"`
	// Value - the values for the alert rule resources.
	Value *[]AlertResource `json:"value,omitempty"`
}

AlertResourceCollection represents a collection of alert rule resources.

type AlertResourcePatch

type AlertResourcePatch struct {
	// Tags - Resource tags
	Tags map[string]*string `json:"tags"`
	// AlertPropertiesPatch - The alert rule properties of the resource.
	*AlertPropertiesPatch `json:"properties,omitempty"`
}

AlertResourcePatch the metric alert resource for patch operations.

func (AlertResourcePatch) MarshalJSON

func (arp AlertResourcePatch) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertResourcePatch.

func (*AlertResourcePatch) UnmarshalJSON

func (arp *AlertResourcePatch) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AlertResourcePatch struct.

type AlertSingleResourceMultipleMetricCriteria

type AlertSingleResourceMultipleMetricCriteria struct {
	// AllOf - The list of metric criteria for this 'all of' operation.
	AllOf *[]Criteria `json:"allOf,omitempty"`
	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
	AdditionalProperties map[string]interface{} `json:""`
	// OdataType - Possible values include: 'OdataTypeMetricAlertCriteria', 'OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria', 'OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria', 'OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria'
	OdataType OdataType `json:"odata.type,omitempty"`
}

AlertSingleResourceMultipleMetricCriteria specifies the metric alert criteria for a single resource that has multiple metric criteria.

func (AlertSingleResourceMultipleMetricCriteria) AsAlertCriteria

func (asrmmc AlertSingleResourceMultipleMetricCriteria) AsAlertCriteria() (*AlertCriteria, bool)

AsAlertCriteria is the BasicAlertCriteria implementation for AlertSingleResourceMultipleMetricCriteria.

func (AlertSingleResourceMultipleMetricCriteria) AsAlertMultipleResourceMultipleMetricCriteria

func (asrmmc AlertSingleResourceMultipleMetricCriteria) AsAlertMultipleResourceMultipleMetricCriteria() (*AlertMultipleResourceMultipleMetricCriteria, bool)

AsAlertMultipleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertSingleResourceMultipleMetricCriteria.

func (AlertSingleResourceMultipleMetricCriteria) AsAlertSingleResourceMultipleMetricCriteria

func (asrmmc AlertSingleResourceMultipleMetricCriteria) AsAlertSingleResourceMultipleMetricCriteria() (*AlertSingleResourceMultipleMetricCriteria, bool)

AsAlertSingleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertSingleResourceMultipleMetricCriteria.

func (AlertSingleResourceMultipleMetricCriteria) AsBasicAlertCriteria

func (asrmmc AlertSingleResourceMultipleMetricCriteria) AsBasicAlertCriteria() (BasicAlertCriteria, bool)

AsBasicAlertCriteria is the BasicAlertCriteria implementation for AlertSingleResourceMultipleMetricCriteria.

func (AlertSingleResourceMultipleMetricCriteria) AsWebtestLocationAvailabilityCriteria

func (asrmmc AlertSingleResourceMultipleMetricCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool)

AsWebtestLocationAvailabilityCriteria is the BasicAlertCriteria implementation for AlertSingleResourceMultipleMetricCriteria.

func (AlertSingleResourceMultipleMetricCriteria) MarshalJSON

func (asrmmc AlertSingleResourceMultipleMetricCriteria) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertSingleResourceMultipleMetricCriteria.

func (*AlertSingleResourceMultipleMetricCriteria) UnmarshalJSON

func (asrmmc *AlertSingleResourceMultipleMetricCriteria) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AlertSingleResourceMultipleMetricCriteria struct.

type AlertStatus

type AlertStatus struct {
	// Name - The status name.
	Name *string `json:"name,omitempty"`
	// ID - The alert rule arm id.
	ID *string `json:"id,omitempty"`
	// Type - The extended resource type name.
	Type *string `json:"type,omitempty"`
	// Properties - The alert status properties of the metric alert status.
	Properties *AlertStatusProperties `json:"properties,omitempty"`
}

AlertStatus an alert status.

type AlertStatusCollection

type AlertStatusCollection struct {
	autorest.Response `json:"-"`
	// Value - the values for the alert rule resources.
	Value *[]AlertStatus `json:"value,omitempty"`
}

AlertStatusCollection represents a collection of alert rule resources.

type AlertStatusProperties

type AlertStatusProperties struct {
	// Dimensions - An object describing the type of the dimensions.
	Dimensions map[string]*string `json:"dimensions"`
	// Status - status value
	Status *string `json:"status,omitempty"`
	// Timestamp - UTC time when the status was checked.
	Timestamp *date.Time `json:"timestamp,omitempty"`
}

AlertStatusProperties an alert status properties.

func (AlertStatusProperties) MarshalJSON

func (asp AlertStatusProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertStatusProperties.

type AlertsClient

type AlertsClient struct {
	BaseClient
}

AlertsClient is the monitor Management Client

func NewAlertsClient

func NewAlertsClient(subscriptionID string) AlertsClient

NewAlertsClient creates an instance of the AlertsClient client.

func NewAlertsClientWithBaseURI

func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient

NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (AlertsClient) CreateOrUpdate

func (client AlertsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ruleName string, parameters AlertResource) (result AlertResource, err error)

CreateOrUpdate create or update an metric alert definition. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule. parameters - the parameters of the rule to create or update.

func (AlertsClient) CreateOrUpdatePreparer

func (client AlertsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, ruleName string, parameters AlertResource) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (AlertsClient) CreateOrUpdateResponder

func (client AlertsClient) CreateOrUpdateResponder(resp *http.Response) (result AlertResource, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (AlertsClient) CreateOrUpdateSender

func (client AlertsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (AlertsClient) Delete

func (client AlertsClient) Delete(ctx context.Context, resourceGroupName string, ruleName string) (result autorest.Response, err error)

Delete delete an alert rule definition. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule.

func (AlertsClient) DeletePreparer

func (client AlertsClient) DeletePreparer(ctx context.Context, resourceGroupName string, ruleName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (AlertsClient) DeleteResponder

func (client AlertsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (AlertsClient) DeleteSender

func (client AlertsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (AlertsClient) Get

func (client AlertsClient) Get(ctx context.Context, resourceGroupName string, ruleName string) (result AlertResource, err error)

Get retrieve an alert rule definition. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule.

func (AlertsClient) GetPreparer

func (client AlertsClient) GetPreparer(ctx context.Context, resourceGroupName string, ruleName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (AlertsClient) GetResponder

func (client AlertsClient) GetResponder(resp *http.Response) (result AlertResource, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (AlertsClient) GetSender

func (client AlertsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (AlertsClient) ListByResourceGroup

func (client AlertsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AlertResourceCollection, err error)

ListByResourceGroup retrieve alert rule definitions in a resource group. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive.

func (AlertsClient) ListByResourceGroupPreparer

func (client AlertsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error)

ListByResourceGroupPreparer prepares the ListByResourceGroup request.

func (AlertsClient) ListByResourceGroupResponder

func (client AlertsClient) ListByResourceGroupResponder(resp *http.Response) (result AlertResourceCollection, err error)

ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always closes the http.Response Body.

func (AlertsClient) ListByResourceGroupSender

func (client AlertsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error)

ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the http.Response Body if it receives an error.

func (AlertsClient) ListBySubscription

func (client AlertsClient) ListBySubscription(ctx context.Context) (result AlertResourceCollection, err error)

ListBySubscription retrieve alert rule definitions in a subscription.

func (AlertsClient) ListBySubscriptionPreparer

func (client AlertsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error)

ListBySubscriptionPreparer prepares the ListBySubscription request.

func (AlertsClient) ListBySubscriptionResponder

func (client AlertsClient) ListBySubscriptionResponder(resp *http.Response) (result AlertResourceCollection, err error)

ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always closes the http.Response Body.

func (AlertsClient) ListBySubscriptionSender

func (client AlertsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error)

ListBySubscriptionSender sends the ListBySubscription request. The method will close the http.Response Body if it receives an error.

func (AlertsClient) Update

func (client AlertsClient) Update(ctx context.Context, resourceGroupName string, ruleName string, parameters AlertResourcePatch) (result AlertResource, err error)

Update update an metric alert definition. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule. parameters - the parameters of the rule to update.

func (AlertsClient) UpdatePreparer

func (client AlertsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, ruleName string, parameters AlertResourcePatch) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (AlertsClient) UpdateResponder

func (client AlertsClient) UpdateResponder(resp *http.Response) (result AlertResource, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (AlertsClient) UpdateSender

func (client AlertsClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type AlertsStatusClient

type AlertsStatusClient struct {
	BaseClient
}

AlertsStatusClient is the monitor Management Client

func NewAlertsStatusClient

func NewAlertsStatusClient(subscriptionID string) AlertsStatusClient

NewAlertsStatusClient creates an instance of the AlertsStatusClient client.

func NewAlertsStatusClientWithBaseURI

func NewAlertsStatusClientWithBaseURI(baseURI string, subscriptionID string) AlertsStatusClient

NewAlertsStatusClientWithBaseURI creates an instance of the AlertsStatusClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (AlertsStatusClient) List

func (client AlertsStatusClient) List(ctx context.Context, resourceGroupName string, ruleName string) (result AlertStatusCollection, err error)

List retrieve an alert rule status. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule.

func (AlertsStatusClient) ListByName

func (client AlertsStatusClient) ListByName(ctx context.Context, resourceGroupName string, ruleName string, statusName string) (result AlertStatusCollection, err error)

ListByName retrieve an alert rule status. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule. statusName - the name of the status.

func (AlertsStatusClient) ListByNamePreparer

func (client AlertsStatusClient) ListByNamePreparer(ctx context.Context, resourceGroupName string, ruleName string, statusName string) (*http.Request, error)

ListByNamePreparer prepares the ListByName request.

func (AlertsStatusClient) ListByNameResponder

func (client AlertsStatusClient) ListByNameResponder(resp *http.Response) (result AlertStatusCollection, err error)

ListByNameResponder handles the response to the ListByName request. The method always closes the http.Response Body.

func (AlertsStatusClient) ListByNameSender

func (client AlertsStatusClient) ListByNameSender(req *http.Request) (*http.Response, error)

ListByNameSender sends the ListByName request. The method will close the http.Response Body if it receives an error.

func (AlertsStatusClient) ListPreparer

func (client AlertsStatusClient) ListPreparer(ctx context.Context, resourceGroupName string, ruleName string) (*http.Request, error)

ListPreparer prepares the List request.

func (AlertsStatusClient) ListResponder

func (client AlertsStatusClient) ListResponder(resp *http.Response) (result AlertStatusCollection, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (AlertsStatusClient) ListSender

func (client AlertsStatusClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type Availability

type Availability struct {
	// TimeGrain - the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc.
	TimeGrain *string `json:"timeGrain,omitempty"`
	// Retention - the retention period for the metric at the specified timegrain.  Expressed as a duration 'PT1M', 'P1D', etc.
	Retention *string `json:"retention,omitempty"`
}

Availability metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain.

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

BaseClient is the base client for Metrics.

func New

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

type BaselineMetadata

type BaselineMetadata struct {
	// Name - Name of the baseline metadata.
	Name *string `json:"name,omitempty"`
	// Value - Value of the baseline metadata.
	Value *string `json:"value,omitempty"`
}

BaselineMetadata represents a baseline metadata value.

type BaselineSensitivity

type BaselineSensitivity string

BaselineSensitivity enumerates the values for baseline sensitivity.

const (
	// BaselineSensitivityHigh ...
	BaselineSensitivityHigh BaselineSensitivity = "High"
	// BaselineSensitivityLow ...
	BaselineSensitivityLow BaselineSensitivity = "Low"
	// BaselineSensitivityMedium ...
	BaselineSensitivityMedium BaselineSensitivity = "Medium"
)

func PossibleBaselineSensitivityValues

func PossibleBaselineSensitivityValues() []BaselineSensitivity

PossibleBaselineSensitivityValues returns an array of possible values for the BaselineSensitivity const type.

type BaselinesClient

type BaselinesClient struct {
	BaseClient
}

BaselinesClient is the monitor Management Client

func NewBaselinesClient

func NewBaselinesClient(subscriptionID string) BaselinesClient

NewBaselinesClient creates an instance of the BaselinesClient client.

func NewBaselinesClientWithBaseURI

func NewBaselinesClientWithBaseURI(baseURI string, subscriptionID string) BaselinesClient

NewBaselinesClientWithBaseURI creates an instance of the BaselinesClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (BaselinesClient) List

func (client BaselinesClient) List(ctx context.Context, resourceURI string, metricnames string, metricnamespace string, timespan string, interval *string, aggregation string, sensitivities string, filter string, resultType ResultType) (result BaselinesResponse, err error)

List **Lists the metric baseline values for a resource**. Parameters: resourceURI - the identifier of the resource. metricnames - the names of the metrics (comma separated) to retrieve. metricnamespace - metric namespace where the metrics you want reside. timespan - the timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. interval - the interval (i.e. timegrain) of the query. aggregation - the list of aggregation types (comma separated) to retrieve. sensitivities - the list of sensitivities (comma separated) to retrieve. filter - the **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "** resultType - allows retrieving only metadata of the baseline. On data request all information is retrieved.

func (BaselinesClient) ListPreparer

func (client BaselinesClient) ListPreparer(ctx context.Context, resourceURI string, metricnames string, metricnamespace string, timespan string, interval *string, aggregation string, sensitivities string, filter string, resultType ResultType) (*http.Request, error)

ListPreparer prepares the List request.

func (BaselinesClient) ListResponder

func (client BaselinesClient) ListResponder(resp *http.Response) (result BaselinesResponse, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (BaselinesClient) ListSender

func (client BaselinesClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type BaselinesProperties

type BaselinesProperties struct {
	// Timespan - The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'.  This may be adjusted in the future and returned back from what was originally requested.
	Timespan *string `json:"timespan,omitempty"`
	// Interval - The interval (window size) for which the metric data was returned in.  This may be adjusted in the future and returned back from what was originally requested.  This is not present if a metadata request was made.
	Interval *string `json:"interval,omitempty"`
	// Namespace - The namespace of the metrics been queried.
	Namespace *string `json:"namespace,omitempty"`
	// Baselines - The baseline for each time series that was queried.
	Baselines *[]TimeSeriesBaseline `json:"baselines,omitempty"`
}

BaselinesProperties the response to a metric baselines query.

type BaselinesResponse

type BaselinesResponse struct {
	autorest.Response `json:"-"`
	// Value - The list of metric baselines.
	Value *[]SingleMetricBaseline `json:"value,omitempty"`
}

BaselinesResponse a list of metric baselines.

type BasicAlertCriteria

type BasicAlertCriteria interface {
	AsAlertSingleResourceMultipleMetricCriteria() (*AlertSingleResourceMultipleMetricCriteria, bool)
	AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool)
	AsAlertMultipleResourceMultipleMetricCriteria() (*AlertMultipleResourceMultipleMetricCriteria, bool)
	AsAlertCriteria() (*AlertCriteria, bool)
}

BasicAlertCriteria the rule criteria that defines the conditions of the alert rule.

type BasicMultiMetricCriteria

type BasicMultiMetricCriteria interface {
	AsCriteria() (*Criteria, bool)
	AsDynamicMetricCriteria() (*DynamicMetricCriteria, bool)
	AsMultiMetricCriteria() (*MultiMetricCriteria, bool)
}

BasicMultiMetricCriteria the types of conditions for a multi resource alert.

type Client

type Client struct {
	BaseClient
}

Client is the monitor Management Client

func NewClient

func NewClient(subscriptionID string) Client

NewClient creates an instance of the Client client.

func NewClientWithBaseURI

func NewClientWithBaseURI(baseURI string, subscriptionID string) Client

NewClientWithBaseURI creates an instance of the Client client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (Client) List

func (client Client) List(ctx context.Context, resourceURI string, timespan string, interval *string, metricnames string, aggregation string, top *int32, orderby string, filter string, resultType ResultType, metricnamespace string, autoAdjustTimegrain *bool, validateDimensions *bool) (result Response, err error)

List **Lists the metric values for a resource**. Parameters: resourceURI - the identifier of the resource. timespan - the timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. interval - the interval (i.e. timegrain) of the query. metricnames - the names of the metrics (comma separated) to retrieve. aggregation - the list of aggregation types (comma separated) to retrieve. top - the maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10. orderby - the aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc. filter - the **$filter** is used to reduce the set of metric data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**. resultType - reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. metricnamespace - metric namespace where the metrics you want reside. autoAdjustTimegrain - when set to true, if the timespan passed in is not supported by this metric, the API will return the result using the closest supported timespan. When set to false, an error is returned for invalid timespan parameters. Defaults to false. validateDimensions - when set to false, invalid filter parameter values will be ignored. When set to true, an error is returned for invalid filter parameters. Defaults to true.

func (Client) ListAtSubscriptionScope

func (client Client) ListAtSubscriptionScope(ctx context.Context, region string, timespan string, interval *string, metricnames string, aggregation string, top *int32, orderby string, filter string, resultType MetricResultType, metricnamespace string, autoAdjustTimegrain *bool, validateDimensions *bool) (result SubscriptionScopeMetricResponse, err error)

ListAtSubscriptionScope **Lists the metric data for a subscription**. Parameters: region - the region where the metrics you want reside. timespan - the timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. interval - the interval (i.e. timegrain) of the query. metricnames - the names of the metrics (comma separated) to retrieve. aggregation - the list of aggregation types (comma separated) to retrieve. top - the maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10. orderby - the aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc. filter - the **$filter** is used to reduce the set of metric data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**. resultType - reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. metricnamespace - metric namespace where the metrics you want reside. autoAdjustTimegrain - when set to true, if the timespan passed in is not supported by this metric, the API will return the result using the closest supported timespan. When set to false, an error is returned for invalid timespan parameters. Defaults to false. validateDimensions - when set to false, invalid filter parameter values will be ignored. When set to true, an error is returned for invalid filter parameters. Defaults to true.

func (Client) ListAtSubscriptionScopePost

func (client Client) ListAtSubscriptionScopePost(ctx context.Context, region string, timespan string, interval *string, metricnames string, aggregation string, top *int32, orderby string, filter string, resultType MetricResultType, metricnamespace string, autoAdjustTimegrain *bool, validateDimensions *bool, body *SubscriptionScopeMetricsRequestBodyParameters) (result SubscriptionScopeMetricResponse, err error)

ListAtSubscriptionScopePost **Lists the metric data for a subscription**. Parameters can be specified on either query params or the body. Parameters: region - the region where the metrics you want reside. timespan - the timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. interval - the interval (i.e. timegrain) of the query. metricnames - the names of the metrics (comma separated) to retrieve. aggregation - the list of aggregation types (comma separated) to retrieve. top - the maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10. orderby - the aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc. filter - the **$filter** is used to reduce the set of metric data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**. resultType - reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. metricnamespace - metric namespace where the metrics you want reside. autoAdjustTimegrain - when set to true, if the timespan passed in is not supported by this metric, the API will return the result using the closest supported timespan. When set to false, an error is returned for invalid timespan parameters. Defaults to false. validateDimensions - when set to false, invalid filter parameter values will be ignored. When set to true, an error is returned for invalid filter parameters. Defaults to true. body - parameters serialized in the body

func (Client) ListAtSubscriptionScopePostPreparer

func (client Client) ListAtSubscriptionScopePostPreparer(ctx context.Context, region string, timespan string, interval *string, metricnames string, aggregation string, top *int32, orderby string, filter string, resultType MetricResultType, metricnamespace string, autoAdjustTimegrain *bool, validateDimensions *bool, body *SubscriptionScopeMetricsRequestBodyParameters) (*http.Request, error)

ListAtSubscriptionScopePostPreparer prepares the ListAtSubscriptionScopePost request.

func (Client) ListAtSubscriptionScopePostResponder

func (client Client) ListAtSubscriptionScopePostResponder(resp *http.Response) (result SubscriptionScopeMetricResponse, err error)

ListAtSubscriptionScopePostResponder handles the response to the ListAtSubscriptionScopePost request. The method always closes the http.Response Body.

func (Client) ListAtSubscriptionScopePostSender

func (client Client) ListAtSubscriptionScopePostSender(req *http.Request) (*http.Response, error)

ListAtSubscriptionScopePostSender sends the ListAtSubscriptionScopePost request. The method will close the http.Response Body if it receives an error.

func (Client) ListAtSubscriptionScopePreparer

func (client Client) ListAtSubscriptionScopePreparer(ctx context.Context, region string, timespan string, interval *string, metricnames string, aggregation string, top *int32, orderby string, filter string, resultType MetricResultType, metricnamespace string, autoAdjustTimegrain *bool, validateDimensions *bool) (*http.Request, error)

ListAtSubscriptionScopePreparer prepares the ListAtSubscriptionScope request.

func (Client) ListAtSubscriptionScopeResponder

func (client Client) ListAtSubscriptionScopeResponder(resp *http.Response) (result SubscriptionScopeMetricResponse, err error)

ListAtSubscriptionScopeResponder handles the response to the ListAtSubscriptionScope request. The method always closes the http.Response Body.

func (Client) ListAtSubscriptionScopeSender

func (client Client) ListAtSubscriptionScopeSender(req *http.Request) (*http.Response, error)

ListAtSubscriptionScopeSender sends the ListAtSubscriptionScope request. The method will close the http.Response Body if it receives an error.

func (Client) ListPreparer

func (client Client) ListPreparer(ctx context.Context, resourceURI string, timespan string, interval *string, metricnames string, aggregation string, top *int32, orderby string, filter string, resultType ResultType, metricnamespace string, autoAdjustTimegrain *bool, validateDimensions *bool) (*http.Request, error)

ListPreparer prepares the List request.

func (Client) ListResponder

func (client Client) ListResponder(resp *http.Response) (result Response, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (Client) ListSender

func (client Client) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type Criteria

type Criteria struct {
	// Operator - the criteria operator. Possible values include: 'OperatorEquals', 'OperatorGreaterThan', 'OperatorGreaterThanOrEqual', 'OperatorLessThan', 'OperatorLessThanOrEqual'
	Operator Operator `json:"operator,omitempty"`
	// Threshold - the criteria threshold value that activates the alert.
	Threshold *float64 `json:"threshold,omitempty"`
	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
	AdditionalProperties map[string]interface{} `json:""`
	// Name - Name of the criteria.
	Name *string `json:"name,omitempty"`
	// MetricName - Name of the metric.
	MetricName *string `json:"metricName,omitempty"`
	// MetricNamespace - Namespace of the metric.
	MetricNamespace *string `json:"metricNamespace,omitempty"`
	// TimeAggregation - the criteria time aggregation types. Possible values include: 'AggregationTypeEnumAverage', 'AggregationTypeEnumCount', 'AggregationTypeEnumMinimum', 'AggregationTypeEnumMaximum', 'AggregationTypeEnumTotal'
	TimeAggregation AggregationTypeEnum `json:"timeAggregation,omitempty"`
	// Dimensions - List of dimension conditions.
	Dimensions *[]Dimension `json:"dimensions,omitempty"`
	// SkipMetricValidation - Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
	SkipMetricValidation *bool `json:"skipMetricValidation,omitempty"`
	// CriterionType - Possible values include: 'CriterionTypeMultiMetricCriteria', 'CriterionTypeStaticThresholdCriterion', 'CriterionTypeDynamicThresholdCriterion'
	CriterionType CriterionType `json:"criterionType,omitempty"`
}

Criteria criterion to filter metrics.

func (Criteria) AsBasicMultiMetricCriteria

func (c Criteria) AsBasicMultiMetricCriteria() (BasicMultiMetricCriteria, bool)

AsBasicMultiMetricCriteria is the BasicMultiMetricCriteria implementation for Criteria.

func (Criteria) AsCriteria

func (c Criteria) AsCriteria() (*Criteria, bool)

AsCriteria is the BasicMultiMetricCriteria implementation for Criteria.

func (Criteria) AsDynamicMetricCriteria

func (c Criteria) AsDynamicMetricCriteria() (*DynamicMetricCriteria, bool)

AsDynamicMetricCriteria is the BasicMultiMetricCriteria implementation for Criteria.

func (Criteria) AsMultiMetricCriteria

func (c Criteria) AsMultiMetricCriteria() (*MultiMetricCriteria, bool)

AsMultiMetricCriteria is the BasicMultiMetricCriteria implementation for Criteria.

func (Criteria) MarshalJSON

func (c Criteria) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Criteria.

func (*Criteria) UnmarshalJSON

func (c *Criteria) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Criteria struct.

type CriterionType

type CriterionType string

CriterionType enumerates the values for criterion type.

const (
	// CriterionTypeDynamicThresholdCriterion ...
	CriterionTypeDynamicThresholdCriterion CriterionType = "DynamicThresholdCriterion"
	// CriterionTypeMultiMetricCriteria ...
	CriterionTypeMultiMetricCriteria CriterionType = "MultiMetricCriteria"
	// CriterionTypeStaticThresholdCriterion ...
	CriterionTypeStaticThresholdCriterion CriterionType = "StaticThresholdCriterion"
)

func PossibleCriterionTypeValues

func PossibleCriterionTypeValues() []CriterionType

PossibleCriterionTypeValues returns an array of possible values for the CriterionType const type.

type Definition

type Definition struct {
	// IsDimensionRequired - Flag to indicate whether the dimension is required.
	IsDimensionRequired *bool `json:"isDimensionRequired,omitempty"`
	// ResourceID - the resource identifier of the resource that emitted the metric.
	ResourceID *string `json:"resourceId,omitempty"`
	// Namespace - the namespace the metric belongs to.
	Namespace *string `json:"namespace,omitempty"`
	// Name - the name and the display name of the metric, i.e. it is a localizable string.
	Name *LocalizableString `json:"name,omitempty"`
	// DisplayDescription - Detailed description of this metric.
	DisplayDescription *string `json:"displayDescription,omitempty"`
	// Category - Custom category name for this metric.
	Category *string `json:"category,omitempty"`
	// MetricClass - The class of the metric. Possible values include: 'MetricClassAvailability', 'MetricClassTransactions', 'MetricClassErrors', 'MetricClassLatency', 'MetricClassSaturation'
	MetricClass MetricClass `json:"metricClass,omitempty"`
	// Unit - the unit of the metric. Possible values include: 'MetricUnitCount', 'MetricUnitBytes', 'MetricUnitSeconds', 'MetricUnitCountPerSecond', 'MetricUnitBytesPerSecond', 'MetricUnitPercent', 'MetricUnitMilliSeconds', 'MetricUnitByteSeconds', 'MetricUnitUnspecified', 'MetricUnitCores', 'MetricUnitMilliCores', 'MetricUnitNanoCores', 'MetricUnitBitsPerSecond'
	Unit MetricUnit `json:"unit,omitempty"`
	// PrimaryAggregationType - the primary aggregation type value defining how to use the values for display. Possible values include: 'AggregationTypeNone', 'AggregationTypeAverage', 'AggregationTypeCount', 'AggregationTypeMinimum', 'AggregationTypeMaximum', 'AggregationTypeTotal'
	PrimaryAggregationType AggregationType `json:"primaryAggregationType,omitempty"`
	// SupportedAggregationTypes - the collection of what aggregation types are supported.
	SupportedAggregationTypes *[]AggregationType `json:"supportedAggregationTypes,omitempty"`
	// MetricAvailabilities - the collection of what aggregation intervals are available to be queried.
	MetricAvailabilities *[]Availability `json:"metricAvailabilities,omitempty"`
	// ID - the resource identifier of the metric definition.
	ID *string `json:"id,omitempty"`
	// Dimensions - the name and the display name of the dimension, i.e. it is a localizable string.
	Dimensions *[]LocalizableString `json:"dimensions,omitempty"`
}

Definition metric definition class specifies the metadata for a metric.

type DefinitionCollection

type DefinitionCollection struct {
	autorest.Response `json:"-"`
	// Value - the values for the metric definitions.
	Value *[]Definition `json:"value,omitempty"`
}

DefinitionCollection represents collection of metric definitions.

type DefinitionsClient

type DefinitionsClient struct {
	BaseClient
}

DefinitionsClient is the monitor Management Client

func NewDefinitionsClient

func NewDefinitionsClient(subscriptionID string) DefinitionsClient

NewDefinitionsClient creates an instance of the DefinitionsClient client.

func NewDefinitionsClientWithBaseURI

func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient

NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (DefinitionsClient) List

func (client DefinitionsClient) List(ctx context.Context, resourceURI string, metricnamespace string) (result DefinitionCollection, err error)

List lists the metric definitions for the resource. Parameters: resourceURI - the identifier of the resource. metricnamespace - metric namespace where the metrics you want reside.

func (DefinitionsClient) ListAtSubscriptionScope

func (client DefinitionsClient) ListAtSubscriptionScope(ctx context.Context, region string, metricnamespace string) (result SubscriptionScopeMetricDefinitionCollection, err error)

ListAtSubscriptionScope lists the metric definitions for the subscription. Parameters: region - the region where the metrics you want reside. metricnamespace - metric namespace where the metrics you want reside.

func (DefinitionsClient) ListAtSubscriptionScopePreparer

func (client DefinitionsClient) ListAtSubscriptionScopePreparer(ctx context.Context, region string, metricnamespace string) (*http.Request, error)

ListAtSubscriptionScopePreparer prepares the ListAtSubscriptionScope request.

func (DefinitionsClient) ListAtSubscriptionScopeResponder

func (client DefinitionsClient) ListAtSubscriptionScopeResponder(resp *http.Response) (result SubscriptionScopeMetricDefinitionCollection, err error)

ListAtSubscriptionScopeResponder handles the response to the ListAtSubscriptionScope request. The method always closes the http.Response Body.

func (DefinitionsClient) ListAtSubscriptionScopeSender

func (client DefinitionsClient) ListAtSubscriptionScopeSender(req *http.Request) (*http.Response, error)

ListAtSubscriptionScopeSender sends the ListAtSubscriptionScope request. The method will close the http.Response Body if it receives an error.

func (DefinitionsClient) ListPreparer

func (client DefinitionsClient) ListPreparer(ctx context.Context, resourceURI string, metricnamespace string) (*http.Request, error)

ListPreparer prepares the List request.

func (DefinitionsClient) ListResponder

func (client DefinitionsClient) ListResponder(resp *http.Response) (result DefinitionCollection, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (DefinitionsClient) ListSender

func (client DefinitionsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type Dimension

type Dimension struct {
	// Name - Name of the dimension.
	Name *string `json:"name,omitempty"`
	// Operator - the dimension operator. Only 'Include' and 'Exclude' are supported
	Operator *string `json:"operator,omitempty"`
	// Values - list of dimension values.
	Values *[]string `json:"values,omitempty"`
}

Dimension specifies a metric dimension.

type DimensionProperties

type DimensionProperties struct {
	// Name - Name of dimension.
	Name *string `json:"name,omitempty"`
	// DisplayName - Display name of dimension.
	DisplayName *string `json:"displayName,omitempty"`
	// ToBeExportedForShoebox - Legacy usage, should not set.
	ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"`
	// IsHidden - When set, the dimension is hidden from the customer, used in conjunction with the defaultDimensionValues field below
	IsHidden *bool `json:"isHidden,omitempty"`
	// DefaultDimensionValues - Default dimension value to be sent down for the hidden dimension during query
	DefaultDimensionValues interface{} `json:"defaultDimensionValues,omitempty"`
}

DimensionProperties type of operation: get, read, delete, etc.

type DynamicMetricCriteria

type DynamicMetricCriteria struct {
	// Operator - The operator used to compare the metric value against the threshold. Possible values include: 'DynamicThresholdOperatorGreaterThan', 'DynamicThresholdOperatorLessThan', 'DynamicThresholdOperatorGreaterOrLessThan'
	Operator DynamicThresholdOperator `json:"operator,omitempty"`
	// AlertSensitivity - The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Possible values include: 'DynamicThresholdSensitivityLow', 'DynamicThresholdSensitivityMedium', 'DynamicThresholdSensitivityHigh'
	AlertSensitivity DynamicThresholdSensitivity `json:"alertSensitivity,omitempty"`
	// FailingPeriods - The minimum number of violations required within the selected lookback time window required to raise an alert.
	FailingPeriods *DynamicThresholdFailingPeriods `json:"failingPeriods,omitempty"`
	// IgnoreDataBefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
	IgnoreDataBefore *date.Time `json:"ignoreDataBefore,omitempty"`
	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
	AdditionalProperties map[string]interface{} `json:""`
	// Name - Name of the criteria.
	Name *string `json:"name,omitempty"`
	// MetricName - Name of the metric.
	MetricName *string `json:"metricName,omitempty"`
	// MetricNamespace - Namespace of the metric.
	MetricNamespace *string `json:"metricNamespace,omitempty"`
	// TimeAggregation - the criteria time aggregation types. Possible values include: 'AggregationTypeEnumAverage', 'AggregationTypeEnumCount', 'AggregationTypeEnumMinimum', 'AggregationTypeEnumMaximum', 'AggregationTypeEnumTotal'
	TimeAggregation AggregationTypeEnum `json:"timeAggregation,omitempty"`
	// Dimensions - List of dimension conditions.
	Dimensions *[]Dimension `json:"dimensions,omitempty"`
	// SkipMetricValidation - Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
	SkipMetricValidation *bool `json:"skipMetricValidation,omitempty"`
	// CriterionType - Possible values include: 'CriterionTypeMultiMetricCriteria', 'CriterionTypeStaticThresholdCriterion', 'CriterionTypeDynamicThresholdCriterion'
	CriterionType CriterionType `json:"criterionType,omitempty"`
}

DynamicMetricCriteria criterion for dynamic threshold.

func (DynamicMetricCriteria) AsBasicMultiMetricCriteria

func (dmc DynamicMetricCriteria) AsBasicMultiMetricCriteria() (BasicMultiMetricCriteria, bool)

AsBasicMultiMetricCriteria is the BasicMultiMetricCriteria implementation for DynamicMetricCriteria.

func (DynamicMetricCriteria) AsCriteria

func (dmc DynamicMetricCriteria) AsCriteria() (*Criteria, bool)

AsCriteria is the BasicMultiMetricCriteria implementation for DynamicMetricCriteria.

func (DynamicMetricCriteria) AsDynamicMetricCriteria

func (dmc DynamicMetricCriteria) AsDynamicMetricCriteria() (*DynamicMetricCriteria, bool)

AsDynamicMetricCriteria is the BasicMultiMetricCriteria implementation for DynamicMetricCriteria.

func (DynamicMetricCriteria) AsMultiMetricCriteria

func (dmc DynamicMetricCriteria) AsMultiMetricCriteria() (*MultiMetricCriteria, bool)

AsMultiMetricCriteria is the BasicMultiMetricCriteria implementation for DynamicMetricCriteria.

func (DynamicMetricCriteria) MarshalJSON

func (dmc DynamicMetricCriteria) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for DynamicMetricCriteria.

func (*DynamicMetricCriteria) UnmarshalJSON

func (dmc *DynamicMetricCriteria) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for DynamicMetricCriteria struct.

type DynamicThresholdFailingPeriods

type DynamicThresholdFailingPeriods struct {
	// NumberOfEvaluationPeriods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points.
	NumberOfEvaluationPeriods *float64 `json:"numberOfEvaluationPeriods,omitempty"`
	// MinFailingPeriodsToAlert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods.
	MinFailingPeriodsToAlert *float64 `json:"minFailingPeriodsToAlert,omitempty"`
}

DynamicThresholdFailingPeriods the minimum number of violations required within the selected lookback time window required to raise an alert.

type DynamicThresholdOperator

type DynamicThresholdOperator string

DynamicThresholdOperator enumerates the values for dynamic threshold operator.

const (
	// DynamicThresholdOperatorGreaterOrLessThan ...
	DynamicThresholdOperatorGreaterOrLessThan DynamicThresholdOperator = "GreaterOrLessThan"
	// DynamicThresholdOperatorGreaterThan ...
	DynamicThresholdOperatorGreaterThan DynamicThresholdOperator = "GreaterThan"
	// DynamicThresholdOperatorLessThan ...
	DynamicThresholdOperatorLessThan DynamicThresholdOperator = "LessThan"
)

func PossibleDynamicThresholdOperatorValues

func PossibleDynamicThresholdOperatorValues() []DynamicThresholdOperator

PossibleDynamicThresholdOperatorValues returns an array of possible values for the DynamicThresholdOperator const type.

type DynamicThresholdSensitivity

type DynamicThresholdSensitivity string

DynamicThresholdSensitivity enumerates the values for dynamic threshold sensitivity.

const (
	// DynamicThresholdSensitivityHigh ...
	DynamicThresholdSensitivityHigh DynamicThresholdSensitivity = "High"
	// DynamicThresholdSensitivityLow ...
	DynamicThresholdSensitivityLow DynamicThresholdSensitivity = "Low"
	// DynamicThresholdSensitivityMedium ...
	DynamicThresholdSensitivityMedium DynamicThresholdSensitivity = "Medium"
)

func PossibleDynamicThresholdSensitivityValues

func PossibleDynamicThresholdSensitivityValues() []DynamicThresholdSensitivity

PossibleDynamicThresholdSensitivityValues returns an array of possible values for the DynamicThresholdSensitivity const type.

type ErrorContract

type ErrorContract struct {
	// Error - The error object.
	Error *ErrorResponse `json:"error,omitempty"`
}

ErrorContract common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)

type ErrorResponse

type ErrorResponse struct {
	// Code - Error code
	Code *string `json:"code,omitempty"`
	// Message - Error message indicating why the operation failed.
	Message *string `json:"message,omitempty"`
}

ErrorResponse describes the format of Error response.

type LocalizableString

type LocalizableString struct {
	// Value - the invariant value.
	Value *string `json:"value,omitempty"`
	// LocalizedValue - the locale specific value.
	LocalizedValue *string `json:"localizedValue,omitempty"`
}

LocalizableString the localizable string class.

type LogSpecification

type LogSpecification struct {
	// Name - Name of log specification.
	Name *string `json:"name,omitempty"`
	// DisplayName - Display name of log specification.
	DisplayName *string `json:"displayName,omitempty"`
	// BlobDuration - Blob duration of specification.
	BlobDuration *string `json:"blobDuration,omitempty"`
}

LogSpecification log specification of operation.

type MetadataValue

type MetadataValue struct {
	// Name - the name of the metadata.
	Name *LocalizableString `json:"name,omitempty"`
	// Value - the value of the metadata.
	Value *string `json:"value,omitempty"`
}

MetadataValue represents a metric metadata value.

type Metric

type Metric struct {
	// ID - the metric Id.
	ID *string `json:"id,omitempty"`
	// Type - the resource type of the metric resource.
	Type *string `json:"type,omitempty"`
	// Name - the name and the display name of the metric, i.e. it is localizable string.
	Name *LocalizableString `json:"name,omitempty"`
	// DisplayDescription - Detailed description of this metric.
	DisplayDescription *string `json:"displayDescription,omitempty"`
	// ErrorCode - 'Success' or the error details on query failures for this metric.
	ErrorCode *string `json:"errorCode,omitempty"`
	// ErrorMessage - Error message encountered querying this specific metric.
	ErrorMessage *string `json:"errorMessage,omitempty"`
	// Unit - The unit of the metric. Possible values include: 'UnitCount', 'UnitBytes', 'UnitSeconds', 'UnitCountPerSecond', 'UnitBytesPerSecond', 'UnitPercent', 'UnitMilliSeconds', 'UnitByteSeconds', 'UnitUnspecified', 'UnitCores', 'UnitMilliCores', 'UnitNanoCores', 'UnitBitsPerSecond'
	Unit Unit `json:"unit,omitempty"`
	// Timeseries - the time series returned when a data query is performed.
	Timeseries *[]TimeSeriesElement `json:"timeseries,omitempty"`
}

Metric the result data of a query.

type MetricAggregationType

type MetricAggregationType string

MetricAggregationType enumerates the values for metric aggregation type.

const (
	// MetricAggregationTypeAverage ...
	MetricAggregationTypeAverage MetricAggregationType = "Average"
	// MetricAggregationTypeCount ...
	MetricAggregationTypeCount MetricAggregationType = "Count"
	// MetricAggregationTypeMaximum ...
	MetricAggregationTypeMaximum MetricAggregationType = "Maximum"
	// MetricAggregationTypeMinimum ...
	MetricAggregationTypeMinimum MetricAggregationType = "Minimum"
	// MetricAggregationTypeNone ...
	MetricAggregationTypeNone MetricAggregationType = "None"
	// MetricAggregationTypeTotal ...
	MetricAggregationTypeTotal MetricAggregationType = "Total"
)

func PossibleMetricAggregationTypeValues

func PossibleMetricAggregationTypeValues() []MetricAggregationType

PossibleMetricAggregationTypeValues returns an array of possible values for the MetricAggregationType const type.

type MetricClass

type MetricClass string

MetricClass enumerates the values for metric class.

const (
	// MetricClassAvailability ...
	MetricClassAvailability MetricClass = "Availability"
	// MetricClassErrors ...
	MetricClassErrors MetricClass = "Errors"
	// MetricClassLatency ...
	MetricClassLatency MetricClass = "Latency"
	// MetricClassSaturation ...
	MetricClassSaturation MetricClass = "Saturation"
	// MetricClassTransactions ...
	MetricClassTransactions MetricClass = "Transactions"
)

func PossibleMetricClassValues

func PossibleMetricClassValues() []MetricClass

PossibleMetricClassValues returns an array of possible values for the MetricClass const type.

type MetricResultType

type MetricResultType string

MetricResultType enumerates the values for metric result type.

const (
	// MetricResultTypeData ...
	MetricResultTypeData MetricResultType = "Data"
	// MetricResultTypeMetadata ...
	MetricResultTypeMetadata MetricResultType = "Metadata"
)

func PossibleMetricResultTypeValues

func PossibleMetricResultTypeValues() []MetricResultType

PossibleMetricResultTypeValues returns an array of possible values for the MetricResultType const type.

type MetricUnit

type MetricUnit string

MetricUnit enumerates the values for metric unit.

const (
	// MetricUnitBitsPerSecond ...
	MetricUnitBitsPerSecond MetricUnit = "BitsPerSecond"
	// MetricUnitBytes ...
	MetricUnitBytes MetricUnit = "Bytes"
	// MetricUnitByteSeconds ...
	MetricUnitByteSeconds MetricUnit = "ByteSeconds"
	// MetricUnitBytesPerSecond ...
	MetricUnitBytesPerSecond MetricUnit = "BytesPerSecond"
	// MetricUnitCores ...
	MetricUnitCores MetricUnit = "Cores"
	// MetricUnitCount ...
	MetricUnitCount MetricUnit = "Count"
	// MetricUnitCountPerSecond ...
	MetricUnitCountPerSecond MetricUnit = "CountPerSecond"
	// MetricUnitMilliCores ...
	MetricUnitMilliCores MetricUnit = "MilliCores"
	// MetricUnitMilliSeconds ...
	MetricUnitMilliSeconds MetricUnit = "MilliSeconds"
	// MetricUnitNanoCores ...
	MetricUnitNanoCores MetricUnit = "NanoCores"
	// MetricUnitPercent ...
	MetricUnitPercent MetricUnit = "Percent"
	// MetricUnitSeconds ...
	MetricUnitSeconds MetricUnit = "Seconds"
	// MetricUnitUnspecified ...
	MetricUnitUnspecified MetricUnit = "Unspecified"
)

func PossibleMetricUnitValues

func PossibleMetricUnitValues() []MetricUnit

PossibleMetricUnitValues returns an array of possible values for the MetricUnit const type.

type MultiMetricCriteria

type MultiMetricCriteria struct {
	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
	AdditionalProperties map[string]interface{} `json:""`
	// Name - Name of the criteria.
	Name *string `json:"name,omitempty"`
	// MetricName - Name of the metric.
	MetricName *string `json:"metricName,omitempty"`
	// MetricNamespace - Namespace of the metric.
	MetricNamespace *string `json:"metricNamespace,omitempty"`
	// TimeAggregation - the criteria time aggregation types. Possible values include: 'AggregationTypeEnumAverage', 'AggregationTypeEnumCount', 'AggregationTypeEnumMinimum', 'AggregationTypeEnumMaximum', 'AggregationTypeEnumTotal'
	TimeAggregation AggregationTypeEnum `json:"timeAggregation,omitempty"`
	// Dimensions - List of dimension conditions.
	Dimensions *[]Dimension `json:"dimensions,omitempty"`
	// SkipMetricValidation - Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
	SkipMetricValidation *bool `json:"skipMetricValidation,omitempty"`
	// CriterionType - Possible values include: 'CriterionTypeMultiMetricCriteria', 'CriterionTypeStaticThresholdCriterion', 'CriterionTypeDynamicThresholdCriterion'
	CriterionType CriterionType `json:"criterionType,omitempty"`
}

MultiMetricCriteria the types of conditions for a multi resource alert.

func (MultiMetricCriteria) AsBasicMultiMetricCriteria

func (mmc MultiMetricCriteria) AsBasicMultiMetricCriteria() (BasicMultiMetricCriteria, bool)

AsBasicMultiMetricCriteria is the BasicMultiMetricCriteria implementation for MultiMetricCriteria.

func (MultiMetricCriteria) AsCriteria

func (mmc MultiMetricCriteria) AsCriteria() (*Criteria, bool)

AsCriteria is the BasicMultiMetricCriteria implementation for MultiMetricCriteria.

func (MultiMetricCriteria) AsDynamicMetricCriteria

func (mmc MultiMetricCriteria) AsDynamicMetricCriteria() (*DynamicMetricCriteria, bool)

AsDynamicMetricCriteria is the BasicMultiMetricCriteria implementation for MultiMetricCriteria.

func (MultiMetricCriteria) AsMultiMetricCriteria

func (mmc MultiMetricCriteria) AsMultiMetricCriteria() (*MultiMetricCriteria, bool)

AsMultiMetricCriteria is the BasicMultiMetricCriteria implementation for MultiMetricCriteria.

func (MultiMetricCriteria) MarshalJSON

func (mmc MultiMetricCriteria) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for MultiMetricCriteria.

func (*MultiMetricCriteria) UnmarshalJSON

func (mmc *MultiMetricCriteria) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for MultiMetricCriteria struct.

type Namespace

type Namespace struct {
	// ID - The ID of the metric namespace.
	ID *string `json:"id,omitempty"`
	// Type - The type of the namespace.
	Type *string `json:"type,omitempty"`
	// Name - The escaped name of the namespace.
	Name *string `json:"name,omitempty"`
	// Classification - Kind of namespace. Possible values include: 'NamespaceClassificationPlatform', 'NamespaceClassificationCustom', 'NamespaceClassificationQos'
	Classification NamespaceClassification `json:"classification,omitempty"`
	// Properties - Properties which include the fully qualified namespace name.
	Properties *NamespaceName `json:"properties,omitempty"`
}

Namespace metric namespace class specifies the metadata for a metric namespace.

type NamespaceClassification

type NamespaceClassification string

NamespaceClassification enumerates the values for namespace classification.

const (
	// NamespaceClassificationCustom ...
	NamespaceClassificationCustom NamespaceClassification = "Custom"
	// NamespaceClassificationPlatform ...
	NamespaceClassificationPlatform NamespaceClassification = "Platform"
	// NamespaceClassificationQos ...
	NamespaceClassificationQos NamespaceClassification = "Qos"
)

func PossibleNamespaceClassificationValues

func PossibleNamespaceClassificationValues() []NamespaceClassification

PossibleNamespaceClassificationValues returns an array of possible values for the NamespaceClassification const type.

type NamespaceCollection

type NamespaceCollection struct {
	autorest.Response `json:"-"`
	// Value - The values for the metric namespaces.
	Value *[]Namespace `json:"value,omitempty"`
}

NamespaceCollection represents collection of metric namespaces.

type NamespaceName

type NamespaceName struct {
	// MetricNamespaceName - The metric namespace name.
	MetricNamespaceName *string `json:"metricNamespaceName,omitempty"`
}

NamespaceName the fully qualified metric namespace name.

type NamespacesClient

type NamespacesClient struct {
	BaseClient
}

NamespacesClient is the monitor Management Client

func NewNamespacesClient

func NewNamespacesClient(subscriptionID string) NamespacesClient

NewNamespacesClient creates an instance of the NamespacesClient client.

func NewNamespacesClientWithBaseURI

func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient

NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (NamespacesClient) List

func (client NamespacesClient) List(ctx context.Context, resourceURI string, startTime string) (result NamespaceCollection, err error)

List lists the metric namespaces for the resource. Parameters: resourceURI - the identifier of the resource. startTime - the ISO 8601 conform Date start time from which to query for metric namespaces.

func (NamespacesClient) ListPreparer

func (client NamespacesClient) ListPreparer(ctx context.Context, resourceURI string, startTime string) (*http.Request, error)

ListPreparer prepares the List request.

func (NamespacesClient) ListResponder

func (client NamespacesClient) ListResponder(resp *http.Response) (result NamespaceCollection, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (NamespacesClient) ListSender

func (client NamespacesClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type OdataType

type OdataType string

OdataType enumerates the values for odata type.

const (
	// OdataTypeMetricAlertCriteria ...
	OdataTypeMetricAlertCriteria OdataType = "MetricAlertCriteria"
	// OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria ...
	OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria OdataType = "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"
	// OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria ...
	OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria OdataType = "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"
	// OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria ...
	OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria OdataType = "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria"
)

func PossibleOdataTypeValues

func PossibleOdataTypeValues() []OdataType

PossibleOdataTypeValues returns an array of possible values for the OdataType const type.

type Operation

type Operation struct {
	// Name - Operation name: {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty"`
	// IsDataAction - Property to specify whether the action is a data action.
	IsDataAction *bool `json:"isDataAction,omitempty"`
	// Display - Display metadata associated with the operation.
	Display *OperationDisplay `json:"display,omitempty"`
	// OperationProperties - Properties of operation, include metric specifications.
	*OperationProperties `json:"properties,omitempty"`
}

Operation microsoft Insights API operation definition.

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Operation.

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Operation struct.

type OperationDisplay

type OperationDisplay struct {
	// Publisher - The publisher of this operation.
	Publisher *string `json:"publisher,omitempty"`
	// Provider - Service provider: Microsoft.Insights
	Provider *string `json:"provider,omitempty"`
	// Resource - Resource on which the operation is performed: AlertRules, Autoscale, etc.
	Resource *string `json:"resource,omitempty"`
	// Operation - Operation type: Read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`
	// Description - The description of the operation.
	Description *string `json:"description,omitempty"`
}

OperationDisplay display metadata associated with the operation.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - List of operations supported by the Microsoft.Insights provider.
	Value *[]Operation `json:"value,omitempty"`
	// NextLink - URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`
}

OperationListResult result of the request to list Microsoft.Insights operations. It contains a list of operations and a URL link to get the next set of results.

type OperationProperties

type OperationProperties struct {
	// ServiceSpecification - One property of operation, include metric specifications.
	ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"`
}

OperationProperties properties of operation, include metric specifications.

type OperationsClient

type OperationsClient struct {
	BaseClient
}

OperationsClient is the monitor Management Client

func NewOperationsClient

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (OperationsClient) List

func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error)

List lists all of the available operations from Microsoft.Insights provider.

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsClient) ListResponder

func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsClient) ListSender

func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type Operator

type Operator string

Operator enumerates the values for operator.

const (
	// OperatorEquals ...
	OperatorEquals Operator = "Equals"
	// OperatorGreaterThan ...
	OperatorGreaterThan Operator = "GreaterThan"
	// OperatorGreaterThanOrEqual ...
	OperatorGreaterThanOrEqual Operator = "GreaterThanOrEqual"
	// OperatorLessThan ...
	OperatorLessThan Operator = "LessThan"
	// OperatorLessThanOrEqual ...
	OperatorLessThanOrEqual Operator = "LessThanOrEqual"
)

func PossibleOperatorValues

func PossibleOperatorValues() []Operator

PossibleOperatorValues returns an array of possible values for the Operator const type.

type Resource

type Resource struct {
	// ID - READ-ONLY; Azure resource Id
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Azure resource name
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Azure resource type
	Type *string `json:"type,omitempty"`
	// Location - Resource location
	Location *string `json:"location,omitempty"`
	// Tags - Resource tags
	Tags map[string]*string `json:"tags"`
}

Resource an azure resource object

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Resource.

type Response

type Response struct {
	autorest.Response `json:"-"`
	// Cost - The integer value representing the relative cost of the query.
	Cost *float64 `json:"cost,omitempty"`
	// Timespan - The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'.  This may be adjusted in the future and returned back from what was originally requested.
	Timespan *string `json:"timespan,omitempty"`
	// Interval - The interval (window size) for which the metric data was returned in.  This may be adjusted in the future and returned back from what was originally requested.  This is not present if a metadata request was made.
	Interval *string `json:"interval,omitempty"`
	// Namespace - The namespace of the metrics being queried
	Namespace *string `json:"namespace,omitempty"`
	// Resourceregion - The region of the resource being queried for metrics.
	Resourceregion *string `json:"resourceregion,omitempty"`
	// Value - the value of the collection.
	Value *[]Metric `json:"value,omitempty"`
}

Response the response to a metrics query.

type ResultType

type ResultType string

ResultType enumerates the values for result type.

const (
	// ResultTypeData ...
	ResultTypeData ResultType = "Data"
	// ResultTypeMetadata ...
	ResultTypeMetadata ResultType = "Metadata"
)

func PossibleResultTypeValues

func PossibleResultTypeValues() []ResultType

PossibleResultTypeValues returns an array of possible values for the ResultType const type.

type ServiceSpecification

type ServiceSpecification struct {
	// LogSpecifications - Log specifications of operation.
	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
	// MetricSpecifications - Metric specifications of operation.
	MetricSpecifications *[]Specification `json:"metricSpecifications,omitempty"`
	// LegacyMetricSpecifications - Legacy Metric specifications for operation. Deprecated, do not use.
	LegacyMetricSpecifications interface{} `json:"legacyMetricSpecifications,omitempty"`
}

ServiceSpecification one property of operation, include log specifications.

type SingleBaseline

type SingleBaseline struct {
	// Sensitivity - the sensitivity of the baseline. Possible values include: 'BaselineSensitivityLow', 'BaselineSensitivityMedium', 'BaselineSensitivityHigh'
	Sensitivity BaselineSensitivity `json:"sensitivity,omitempty"`
	// LowThresholds - The low thresholds of the baseline.
	LowThresholds *[]float64 `json:"lowThresholds,omitempty"`
	// HighThresholds - The high thresholds of the baseline.
	HighThresholds *[]float64 `json:"highThresholds,omitempty"`
}

SingleBaseline the baseline values for a single sensitivity value.

type SingleDimension

type SingleDimension struct {
	// Name - Name of the dimension.
	Name *string `json:"name,omitempty"`
	// Value - Value of the dimension.
	Value *string `json:"value,omitempty"`
}

SingleDimension the metric dimension name and value.

type SingleMetricBaseline

type SingleMetricBaseline struct {
	// ID - The metric baseline Id.
	ID *string `json:"id,omitempty"`
	// Type - The resource type of the metric baseline resource.
	Type *string `json:"type,omitempty"`
	// Name - The name of the metric for which the baselines were retrieved.
	Name *string `json:"name,omitempty"`
	// BaselinesProperties - The metric baseline properties of the metric.
	*BaselinesProperties `json:"properties,omitempty"`
}

SingleMetricBaseline the baseline results of a single metric.

func (SingleMetricBaseline) MarshalJSON

func (smb SingleMetricBaseline) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for SingleMetricBaseline.

func (*SingleMetricBaseline) UnmarshalJSON

func (smb *SingleMetricBaseline) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for SingleMetricBaseline struct.

type Specification

type Specification struct {
	// Name - The name of the metric.
	Name *string `json:"name,omitempty"`
	// DisplayName - Display name of the metric.
	DisplayName *string `json:"displayName,omitempty"`
	// DisplayDescription - Display description of the metric.
	DisplayDescription *string `json:"displayDescription,omitempty"`
	// Unit - The metric unit. Possible values include: Count,Bytes,Seconds,Percent,CountPerSecond,BytesPerSecond,MilliSeconds,ByteSeconds,Unspecified,BitsPerSecond,Cores,MilliCores,NanoCores
	Unit *string `json:"unit,omitempty"`
	// AggregationType - The default metric aggregation type. Possible values include: Total,Average,Maximum,Minimum,Count
	AggregationType *string `json:"aggregationType,omitempty"`
	// SupportedAggregationTypes - The supported aggregation types for the metrics.
	SupportedAggregationTypes *[]string `json:"supportedAggregationTypes,omitempty"`
	// SupportedTimeGrainTypes - The supported time grain types for the metrics.
	SupportedTimeGrainTypes *[]string `json:"supportedTimeGrainTypes,omitempty"`
	// Availabilities - The supported time grain types for the metrics.
	Availabilities *[]string `json:"availabilities,omitempty"`
	// LockAggregationType - The metric lock aggregation type.
	LockAggregationType *string `json:"lockAggregationType,omitempty"`
	// Category - Category or type of metric.
	Category *string `json:"category,omitempty"`
	// Dimensions - The dimensions of metric.
	Dimensions *[]DimensionProperties `json:"dimensions,omitempty"`
	// FillGapWithZero - Property to specify whether to fill empty gaps with zero.
	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
	// InternalMetricName - The internal metric name.
	InternalMetricName *string `json:"internalMetricName,omitempty"`
}

Specification metric specification of operation.

type SubscriptionScopeMetric

type SubscriptionScopeMetric struct {
	// ID - the metric Id.
	ID *string `json:"id,omitempty"`
	// Type - the resource type of the metric resource.
	Type *string `json:"type,omitempty"`
	// Name - the name and the display name of the metric, i.e. it is localizable string.
	Name *LocalizableString `json:"name,omitempty"`
	// DisplayDescription - Detailed description of this metric.
	DisplayDescription *string `json:"displayDescription,omitempty"`
	// ErrorCode - 'Success' or the error details on query failures for this metric.
	ErrorCode *string `json:"errorCode,omitempty"`
	// ErrorMessage - Error message encountered querying this specific metric.
	ErrorMessage *string `json:"errorMessage,omitempty"`
	// Unit - The unit of the metric. Possible values include: 'MetricUnitCount', 'MetricUnitBytes', 'MetricUnitSeconds', 'MetricUnitCountPerSecond', 'MetricUnitBytesPerSecond', 'MetricUnitPercent', 'MetricUnitMilliSeconds', 'MetricUnitByteSeconds', 'MetricUnitUnspecified', 'MetricUnitCores', 'MetricUnitMilliCores', 'MetricUnitNanoCores', 'MetricUnitBitsPerSecond'
	Unit MetricUnit `json:"unit,omitempty"`
	// Timeseries - the time series returned when a data query is performed.
	Timeseries *[]TimeSeriesElement `json:"timeseries,omitempty"`
}

SubscriptionScopeMetric the result data of a query.

type SubscriptionScopeMetricDefinition

type SubscriptionScopeMetricDefinition struct {
	// IsDimensionRequired - Flag to indicate whether the dimension is required.
	IsDimensionRequired *bool `json:"isDimensionRequired,omitempty"`
	// ResourceID - the resource identifier of the resource that emitted the metric.
	ResourceID *string `json:"resourceId,omitempty"`
	// Namespace - the namespace the metric belongs to.
	Namespace *string `json:"namespace,omitempty"`
	// Name - the name and the display name of the metric, i.e. it is a localizable string.
	Name *LocalizableString `json:"name,omitempty"`
	// DisplayDescription - Detailed description of this metric.
	DisplayDescription *string `json:"displayDescription,omitempty"`
	// Category - Custom category name for this metric.
	Category *string `json:"category,omitempty"`
	// MetricClass - The class of the metric. Possible values include: 'MetricClassAvailability', 'MetricClassTransactions', 'MetricClassErrors', 'MetricClassLatency', 'MetricClassSaturation'
	MetricClass MetricClass `json:"metricClass,omitempty"`
	// Unit - the unit of the metric. Possible values include: 'MetricUnitCount', 'MetricUnitBytes', 'MetricUnitSeconds', 'MetricUnitCountPerSecond', 'MetricUnitBytesPerSecond', 'MetricUnitPercent', 'MetricUnitMilliSeconds', 'MetricUnitByteSeconds', 'MetricUnitUnspecified', 'MetricUnitCores', 'MetricUnitMilliCores', 'MetricUnitNanoCores', 'MetricUnitBitsPerSecond'
	Unit MetricUnit `json:"unit,omitempty"`
	// PrimaryAggregationType - the primary aggregation type value defining how to use the values for display. Possible values include: 'MetricAggregationTypeNone', 'MetricAggregationTypeAverage', 'MetricAggregationTypeCount', 'MetricAggregationTypeMinimum', 'MetricAggregationTypeMaximum', 'MetricAggregationTypeTotal'
	PrimaryAggregationType MetricAggregationType `json:"primaryAggregationType,omitempty"`
	// SupportedAggregationTypes - the collection of what aggregation types are supported.
	SupportedAggregationTypes *[]MetricAggregationType `json:"supportedAggregationTypes,omitempty"`
	// MetricAvailabilities - the collection of what aggregation intervals are available to be queried.
	MetricAvailabilities *[]Availability `json:"metricAvailabilities,omitempty"`
	// ID - the resource identifier of the metric definition.
	ID *string `json:"id,omitempty"`
	// Dimensions - the name and the display name of the dimension, i.e. it is a localizable string.
	Dimensions *[]LocalizableString `json:"dimensions,omitempty"`
}

SubscriptionScopeMetricDefinition metric definition class specifies the metadata for a metric.

type SubscriptionScopeMetricDefinitionCollection

type SubscriptionScopeMetricDefinitionCollection struct {
	autorest.Response `json:"-"`
	// Value - The values for the metric definitions.
	Value *[]SubscriptionScopeMetricDefinition `json:"value,omitempty"`
}

SubscriptionScopeMetricDefinitionCollection represents collection of metric definitions.

type SubscriptionScopeMetricResponse

type SubscriptionScopeMetricResponse struct {
	autorest.Response `json:"-"`
	// Cost - The integer value representing the relative cost of the query.
	Cost *float64 `json:"cost,omitempty"`
	// Timespan - The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'.  This may be adjusted in the future and returned back from what was originally requested.
	Timespan *string `json:"timespan,omitempty"`
	// Interval - The interval (window size) for which the metric data was returned in.  This may be adjusted in the future and returned back from what was originally requested.  This is not present if a metadata request was made.
	Interval *string `json:"interval,omitempty"`
	// Namespace - The namespace of the metrics being queried
	Namespace *string `json:"namespace,omitempty"`
	// Resourceregion - The region of the resource being queried for metrics.
	Resourceregion *string `json:"resourceregion,omitempty"`
	// Value - the value of the collection.
	Value *[]SubscriptionScopeMetric `json:"value,omitempty"`
}

SubscriptionScopeMetricResponse the response to a subscription scope metrics query.

type SubscriptionScopeMetricsRequestBodyParameters

type SubscriptionScopeMetricsRequestBodyParameters struct {
	// Timespan - The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.
	Timespan *string `json:"timespan,omitempty"`
	// Interval - The interval (i.e. timegrain) of the query.
	Interval *string `json:"interval,omitempty"`
	// MetricNames - The names of the metrics (comma separated) to retrieve.
	MetricNames *string `json:"metricNames,omitempty"`
	// Aggregation - The list of aggregation types (comma separated) to retrieve.
	Aggregation *string `json:"aggregation,omitempty"`
	// Filter - The **$filter** is used to reduce the set of metric data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.
	Filter *string `json:"filter,omitempty"`
	// Top - The maximum number of records to retrieve.
	// Valid only if $filter is specified.
	// Defaults to 10.
	Top *int32 `json:"top,omitempty"`
	// OrderBy - The aggregation to use for sorting results and the direction of the sort.
	// Only one order can be specified.
	// Examples: sum asc.
	OrderBy *string `json:"orderBy,omitempty"`
	// RollUpBy - Dimension name(s) to rollup results by. For example if you only want to see metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't want to see separate values for each city, you can specify 'RollUpBy=City' to see the results for Seattle and Tacoma rolled up into one timeseries.
	RollUpBy *string `json:"rollUpBy,omitempty"`
	// ResultType - Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Possible values include: 'MetricResultTypeData', 'MetricResultTypeMetadata'
	ResultType MetricResultType `json:"resultType,omitempty"`
	// MetricNamespace - Metric namespace where the metrics you want reside.
	MetricNamespace *string `json:"metricNamespace,omitempty"`
	// AutoAdjustTimegrain - When set to true, if the timespan passed in is not supported by this metric, the API will return the result using the closest supported timespan. When set to false, an error is returned for invalid timespan parameters. Defaults to false.
	AutoAdjustTimegrain *bool `json:"autoAdjustTimegrain,omitempty"`
	// ValidateDimensions - When set to false, invalid filter parameter values will be ignored. When set to true, an error is returned for invalid filter parameters. Defaults to true.
	ValidateDimensions *bool `json:"validateDimensions,omitempty"`
}

SubscriptionScopeMetricsRequestBodyParameters query parameters can also be specified in the body, specifying the same parameter in both the body and query parameters will result in an error.

type TimeSeriesBaseline

type TimeSeriesBaseline struct {
	// Aggregation - The aggregation type of the metric.
	Aggregation *string `json:"aggregation,omitempty"`
	// Dimensions - The dimensions of this time series.
	Dimensions *[]SingleDimension `json:"dimensions,omitempty"`
	// Timestamps - The list of timestamps of the baselines.
	Timestamps *[]date.Time `json:"timestamps,omitempty"`
	// Data - The baseline values for each sensitivity.
	Data *[]SingleBaseline `json:"data,omitempty"`
	// MetadataValues - The baseline metadata values.
	MetadataValues *[]BaselineMetadata `json:"metadataValues,omitempty"`
}

TimeSeriesBaseline the baseline values for a single time series.

type TimeSeriesElement

type TimeSeriesElement struct {
	// Metadatavalues - the metadata values returned if $filter was specified in the call.
	Metadatavalues *[]MetadataValue `json:"metadatavalues,omitempty"`
	// Data - An array of data points representing the metric values.  This is only returned if a result type of data is specified.
	Data *[]Value `json:"data,omitempty"`
}

TimeSeriesElement a time series result type. The discriminator value is always TimeSeries in this case.

type Unit

type Unit string

Unit enumerates the values for unit.

const (
	// UnitBitsPerSecond ...
	UnitBitsPerSecond Unit = "BitsPerSecond"
	// UnitBytes ...
	UnitBytes Unit = "Bytes"
	// UnitByteSeconds ...
	UnitByteSeconds Unit = "ByteSeconds"
	// UnitBytesPerSecond ...
	UnitBytesPerSecond Unit = "BytesPerSecond"
	// UnitCores ...
	UnitCores Unit = "Cores"
	// UnitCount ...
	UnitCount Unit = "Count"
	// UnitCountPerSecond ...
	UnitCountPerSecond Unit = "CountPerSecond"
	// UnitMilliCores ...
	UnitMilliCores Unit = "MilliCores"
	// UnitMilliSeconds ...
	UnitMilliSeconds Unit = "MilliSeconds"
	// UnitNanoCores ...
	UnitNanoCores Unit = "NanoCores"
	// UnitPercent ...
	UnitPercent Unit = "Percent"
	// UnitSeconds ...
	UnitSeconds Unit = "Seconds"
	// UnitUnspecified ...
	UnitUnspecified Unit = "Unspecified"
)

func PossibleUnitValues

func PossibleUnitValues() []Unit

PossibleUnitValues returns an array of possible values for the Unit const type.

type Value

type Value struct {
	// TimeStamp - the timestamp for the metric value in ISO 8601 format.
	TimeStamp *date.Time `json:"timeStamp,omitempty"`
	// Average - the average value in the time range.
	Average *float64 `json:"average,omitempty"`
	// Minimum - the least value in the time range.
	Minimum *float64 `json:"minimum,omitempty"`
	// Maximum - the greatest value in the time range.
	Maximum *float64 `json:"maximum,omitempty"`
	// Total - the sum of all of the values in the time range.
	Total *float64 `json:"total,omitempty"`
	// Count - the number of samples in the time range. Can be used to determine the number of values that contributed to the average value.
	Count *float64 `json:"count,omitempty"`
}

Value represents a metric value.

type WebtestLocationAvailabilityCriteria

type WebtestLocationAvailabilityCriteria struct {
	// WebTestID - The Application Insights web test Id.
	WebTestID *string `json:"webTestId,omitempty"`
	// ComponentID - The Application Insights resource Id.
	ComponentID *string `json:"componentId,omitempty"`
	// FailedLocationCount - The number of failed locations.
	FailedLocationCount *float64 `json:"failedLocationCount,omitempty"`
	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
	AdditionalProperties map[string]interface{} `json:""`
	// OdataType - Possible values include: 'OdataTypeMetricAlertCriteria', 'OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria', 'OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria', 'OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria'
	OdataType OdataType `json:"odata.type,omitempty"`
}

WebtestLocationAvailabilityCriteria specifies the metric alert rule criteria for a web test resource.

func (WebtestLocationAvailabilityCriteria) AsAlertCriteria

func (wlac WebtestLocationAvailabilityCriteria) AsAlertCriteria() (*AlertCriteria, bool)

AsAlertCriteria is the BasicAlertCriteria implementation for WebtestLocationAvailabilityCriteria.

func (WebtestLocationAvailabilityCriteria) AsAlertMultipleResourceMultipleMetricCriteria

func (wlac WebtestLocationAvailabilityCriteria) AsAlertMultipleResourceMultipleMetricCriteria() (*AlertMultipleResourceMultipleMetricCriteria, bool)

AsAlertMultipleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for WebtestLocationAvailabilityCriteria.

func (WebtestLocationAvailabilityCriteria) AsAlertSingleResourceMultipleMetricCriteria

func (wlac WebtestLocationAvailabilityCriteria) AsAlertSingleResourceMultipleMetricCriteria() (*AlertSingleResourceMultipleMetricCriteria, bool)

AsAlertSingleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for WebtestLocationAvailabilityCriteria.

func (WebtestLocationAvailabilityCriteria) AsBasicAlertCriteria

func (wlac WebtestLocationAvailabilityCriteria) AsBasicAlertCriteria() (BasicAlertCriteria, bool)

AsBasicAlertCriteria is the BasicAlertCriteria implementation for WebtestLocationAvailabilityCriteria.

func (WebtestLocationAvailabilityCriteria) AsWebtestLocationAvailabilityCriteria

func (wlac WebtestLocationAvailabilityCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool)

AsWebtestLocationAvailabilityCriteria is the BasicAlertCriteria implementation for WebtestLocationAvailabilityCriteria.

func (WebtestLocationAvailabilityCriteria) MarshalJSON

func (wlac WebtestLocationAvailabilityCriteria) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for WebtestLocationAvailabilityCriteria.

func (*WebtestLocationAvailabilityCriteria) UnmarshalJSON

func (wlac *WebtestLocationAvailabilityCriteria) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for WebtestLocationAvailabilityCriteria struct.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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