const ( // DefaultBaseURI is the default URI used for the service Metrics DefaultBaseURI = "https://management.azure.com" )
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
AggregationType enumerates the values for aggregation type.
type AggregationType string
const ( // Average ... Average AggregationType = "Average" // Count ... Count AggregationType = "Count" // Maximum ... Maximum AggregationType = "Maximum" // Minimum ... Minimum AggregationType = "Minimum" // None ... None AggregationType = "None" // Total ... Total AggregationType = "Total" )
func PossibleAggregationTypeValues() []AggregationType
PossibleAggregationTypeValues returns an array of possible values for the AggregationType const type.
AggregationTypeEnum enumerates the values for aggregation type enum.
type AggregationTypeEnum string
const ( // AggregationTypeEnumAverage ... AggregationTypeEnumAverage AggregationTypeEnum = "Average" // AggregationTypeEnumCount ... AggregationTypeEnumCount AggregationTypeEnum = "Count" // AggregationTypeEnumMaximum ... AggregationTypeEnumMaximum AggregationTypeEnum = "Maximum" // AggregationTypeEnumMinimum ... AggregationTypeEnumMinimum AggregationTypeEnum = "Minimum" // AggregationTypeEnumTotal ... AggregationTypeEnumTotal AggregationTypeEnum = "Total" )
func PossibleAggregationTypeEnumValues() []AggregationTypeEnum
PossibleAggregationTypeEnumValues returns an array of possible values for the AggregationTypeEnum const type.
AlertAction an alert action.
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"` }
func (aa AlertAction) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertAction.
AlertCriteria the rule criteria that defines the conditions of the alert rule.
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"` }
func (ac AlertCriteria) AsAlertCriteria() (*AlertCriteria, bool)
AsAlertCriteria is the BasicAlertCriteria implementation for AlertCriteria.
func (ac AlertCriteria) AsAlertMultipleResourceMultipleMetricCriteria() (*AlertMultipleResourceMultipleMetricCriteria, bool)
AsAlertMultipleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertCriteria.
func (ac AlertCriteria) AsAlertSingleResourceMultipleMetricCriteria() (*AlertSingleResourceMultipleMetricCriteria, bool)
AsAlertSingleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertCriteria.
func (ac AlertCriteria) AsBasicAlertCriteria() (BasicAlertCriteria, bool)
AsBasicAlertCriteria is the BasicAlertCriteria implementation for AlertCriteria.
func (ac AlertCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool)
AsWebtestLocationAvailabilityCriteria is the BasicAlertCriteria implementation for AlertCriteria.
func (ac AlertCriteria) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertCriteria.
func (ac *AlertCriteria) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AlertCriteria struct.
AlertMultipleResourceMultipleMetricCriteria specifies the metric alert criteria for multiple resource that has multiple metric criteria.
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"` }
func (amrmmc AlertMultipleResourceMultipleMetricCriteria) AsAlertCriteria() (*AlertCriteria, bool)
AsAlertCriteria is the BasicAlertCriteria implementation for AlertMultipleResourceMultipleMetricCriteria.
func (amrmmc AlertMultipleResourceMultipleMetricCriteria) AsAlertMultipleResourceMultipleMetricCriteria() (*AlertMultipleResourceMultipleMetricCriteria, bool)
AsAlertMultipleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertMultipleResourceMultipleMetricCriteria.
func (amrmmc AlertMultipleResourceMultipleMetricCriteria) AsAlertSingleResourceMultipleMetricCriteria() (*AlertSingleResourceMultipleMetricCriteria, bool)
AsAlertSingleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertMultipleResourceMultipleMetricCriteria.
func (amrmmc AlertMultipleResourceMultipleMetricCriteria) AsBasicAlertCriteria() (BasicAlertCriteria, bool)
AsBasicAlertCriteria is the BasicAlertCriteria implementation for AlertMultipleResourceMultipleMetricCriteria.
func (amrmmc AlertMultipleResourceMultipleMetricCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool)
AsWebtestLocationAvailabilityCriteria is the BasicAlertCriteria implementation for AlertMultipleResourceMultipleMetricCriteria.
func (amrmmc AlertMultipleResourceMultipleMetricCriteria) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertMultipleResourceMultipleMetricCriteria.
func (amrmmc *AlertMultipleResourceMultipleMetricCriteria) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AlertMultipleResourceMultipleMetricCriteria struct.
AlertProperties an alert rule.
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"` }
func (ap AlertProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertProperties.
func (ap *AlertProperties) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AlertProperties struct.
AlertPropertiesPatch an alert rule properties for patch.
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"` }
func (app AlertPropertiesPatch) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertPropertiesPatch.
func (app *AlertPropertiesPatch) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AlertPropertiesPatch struct.
AlertResource the metric alert resource.
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"` }
func (ar AlertResource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertResource.
func (ar *AlertResource) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AlertResource struct.
AlertResourceCollection represents a collection of alert rule resources.
type AlertResourceCollection struct { autorest.Response `json:"-"` // Value - the values for the alert rule resources. Value *[]AlertResource `json:"value,omitempty"` }
AlertResourcePatch the metric alert resource for patch operations.
type AlertResourcePatch struct { // Tags - Resource tags Tags map[string]*string `json:"tags"` // AlertPropertiesPatch - The alert rule properties of the resource. *AlertPropertiesPatch `json:"properties,omitempty"` }
func (arp AlertResourcePatch) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertResourcePatch.
func (arp *AlertResourcePatch) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AlertResourcePatch struct.
AlertSingleResourceMultipleMetricCriteria specifies the metric alert criteria for a single resource that has multiple metric criteria.
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"` }
func (asrmmc AlertSingleResourceMultipleMetricCriteria) AsAlertCriteria() (*AlertCriteria, bool)
AsAlertCriteria is the BasicAlertCriteria implementation for AlertSingleResourceMultipleMetricCriteria.
func (asrmmc AlertSingleResourceMultipleMetricCriteria) AsAlertMultipleResourceMultipleMetricCriteria() (*AlertMultipleResourceMultipleMetricCriteria, bool)
AsAlertMultipleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertSingleResourceMultipleMetricCriteria.
func (asrmmc AlertSingleResourceMultipleMetricCriteria) AsAlertSingleResourceMultipleMetricCriteria() (*AlertSingleResourceMultipleMetricCriteria, bool)
AsAlertSingleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for AlertSingleResourceMultipleMetricCriteria.
func (asrmmc AlertSingleResourceMultipleMetricCriteria) AsBasicAlertCriteria() (BasicAlertCriteria, bool)
AsBasicAlertCriteria is the BasicAlertCriteria implementation for AlertSingleResourceMultipleMetricCriteria.
func (asrmmc AlertSingleResourceMultipleMetricCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool)
AsWebtestLocationAvailabilityCriteria is the BasicAlertCriteria implementation for AlertSingleResourceMultipleMetricCriteria.
func (asrmmc AlertSingleResourceMultipleMetricCriteria) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertSingleResourceMultipleMetricCriteria.
func (asrmmc *AlertSingleResourceMultipleMetricCriteria) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AlertSingleResourceMultipleMetricCriteria struct.
AlertStatus an alert status.
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"` }
AlertStatusCollection represents a collection of alert rule resources.
type AlertStatusCollection struct { autorest.Response `json:"-"` // Value - the values for the alert rule resources. Value *[]AlertStatus `json:"value,omitempty"` }
AlertStatusProperties an alert status properties.
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"` }
func (asp AlertStatusProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertStatusProperties.
AlertsClient is the monitor Management Client
type AlertsClient struct { BaseClient }
func NewAlertsClient(subscriptionID string) AlertsClient
NewAlertsClient creates an instance of the AlertsClient client.
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 (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 (client AlertsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, ruleName string, parameters AlertResource) (*http.Request, error)
CreateOrUpdatePreparer prepares the CreateOrUpdate request.
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 (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 (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 (client AlertsClient) DeletePreparer(ctx context.Context, resourceGroupName string, ruleName string) (*http.Request, error)
DeletePreparer prepares the Delete request.
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 (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 (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 (client AlertsClient) GetPreparer(ctx context.Context, resourceGroupName string, ruleName string) (*http.Request, error)
GetPreparer prepares the Get request.
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 (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 (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 (client AlertsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error)
ListByResourceGroupPreparer prepares the ListByResourceGroup request.
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 (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 (client AlertsClient) ListBySubscription(ctx context.Context) (result AlertResourceCollection, err error)
ListBySubscription retrieve alert rule definitions in a subscription.
func (client AlertsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error)
ListBySubscriptionPreparer prepares the ListBySubscription request.
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 (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 (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 (client AlertsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, ruleName string, parameters AlertResourcePatch) (*http.Request, error)
UpdatePreparer prepares the Update request.
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 (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.
AlertsStatusClient is the monitor Management Client
type AlertsStatusClient struct { BaseClient }
func NewAlertsStatusClient(subscriptionID string) AlertsStatusClient
NewAlertsStatusClient creates an instance of the AlertsStatusClient client.
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 (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 (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 (client AlertsStatusClient) ListByNamePreparer(ctx context.Context, resourceGroupName string, ruleName string, statusName string) (*http.Request, error)
ListByNamePreparer prepares the ListByName request.
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 (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 (client AlertsStatusClient) ListPreparer(ctx context.Context, resourceGroupName string, ruleName string) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
Availability metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain.
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"` }
BaseClient is the base client for Metrics.
type BaseClient struct { autorest.Client BaseURI string SubscriptionID string }
func New(subscriptionID string) BaseClient
New creates an instance of the BaseClient client.
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).
BaselineMetadata represents a baseline metadata value.
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"` }
BaselineSensitivity enumerates the values for baseline sensitivity.
type BaselineSensitivity string
const ( // High ... High BaselineSensitivity = "High" // Low ... Low BaselineSensitivity = "Low" // Medium ... Medium BaselineSensitivity = "Medium" )
func PossibleBaselineSensitivityValues() []BaselineSensitivity
PossibleBaselineSensitivityValues returns an array of possible values for the BaselineSensitivity const type.
BaselinesClient is the monitor Management Client
type BaselinesClient struct { BaseClient }
func NewBaselinesClient(subscriptionID string) BaselinesClient
NewBaselinesClient creates an instance of the BaselinesClient client.
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 (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 (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 (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 (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.
BaselinesProperties the response to a metric baselines query.
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"` }
BaselinesResponse a list of metric baselines.
type BaselinesResponse struct { autorest.Response `json:"-"` // Value - The list of metric baselines. Value *[]SingleMetricBaseline `json:"value,omitempty"` }
BasicAlertCriteria the rule criteria that defines the conditions of the alert rule.
type BasicAlertCriteria interface { AsAlertSingleResourceMultipleMetricCriteria() (*AlertSingleResourceMultipleMetricCriteria, bool) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool) AsAlertMultipleResourceMultipleMetricCriteria() (*AlertMultipleResourceMultipleMetricCriteria, bool) AsAlertCriteria() (*AlertCriteria, bool) }
BasicMultiMetricCriteria the types of conditions for a multi resource alert.
type BasicMultiMetricCriteria interface { AsCriteria() (*Criteria, bool) AsDynamicMetricCriteria() (*DynamicMetricCriteria, bool) AsMultiMetricCriteria() (*MultiMetricCriteria, bool) }
Client is the monitor Management Client
type Client struct { BaseClient }
func NewClient(subscriptionID string) Client
NewClient creates an instance of the Client client.
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 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 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 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 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 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 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 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 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 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 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 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 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.
Criteria criterion to filter metrics.
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"` }
func (c Criteria) AsBasicMultiMetricCriteria() (BasicMultiMetricCriteria, bool)
AsBasicMultiMetricCriteria is the BasicMultiMetricCriteria implementation for Criteria.
func (c Criteria) AsCriteria() (*Criteria, bool)
AsCriteria is the BasicMultiMetricCriteria implementation for Criteria.
func (c Criteria) AsDynamicMetricCriteria() (*DynamicMetricCriteria, bool)
AsDynamicMetricCriteria is the BasicMultiMetricCriteria implementation for Criteria.
func (c Criteria) AsMultiMetricCriteria() (*MultiMetricCriteria, bool)
AsMultiMetricCriteria is the BasicMultiMetricCriteria implementation for Criteria.
func (c Criteria) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Criteria.
func (c *Criteria) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Criteria struct.
CriterionType enumerates the values for criterion type.
type CriterionType string
const ( // CriterionTypeDynamicThresholdCriterion ... CriterionTypeDynamicThresholdCriterion CriterionType = "DynamicThresholdCriterion" // CriterionTypeMultiMetricCriteria ... CriterionTypeMultiMetricCriteria CriterionType = "MultiMetricCriteria" // CriterionTypeStaticThresholdCriterion ... CriterionTypeStaticThresholdCriterion CriterionType = "StaticThresholdCriterion" )
func PossibleCriterionTypeValues() []CriterionType
PossibleCriterionTypeValues returns an array of possible values for the CriterionType const type.
Definition metric definition class specifies the metadata for a metric.
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: 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' 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"` }
DefinitionCollection represents collection of metric definitions.
type DefinitionCollection struct { autorest.Response `json:"-"` // Value - the values for the metric definitions. Value *[]Definition `json:"value,omitempty"` }
DefinitionsClient is the monitor Management Client
type DefinitionsClient struct { BaseClient }
func NewDefinitionsClient(subscriptionID string) DefinitionsClient
NewDefinitionsClient creates an instance of the DefinitionsClient client.
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 (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 (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 (client DefinitionsClient) ListAtSubscriptionScopePreparer(ctx context.Context, region string, metricnamespace string) (*http.Request, error)
ListAtSubscriptionScopePreparer prepares the ListAtSubscriptionScope request.
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 (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 (client DefinitionsClient) ListPreparer(ctx context.Context, resourceURI string, metricnamespace string) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
Dimension specifies a metric 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"` }
DimensionProperties type of operation: get, read, delete, etc.
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"` }
DynamicMetricCriteria criterion for dynamic threshold.
type DynamicMetricCriteria struct { // Operator - The operator used to compare the metric value against the threshold. Possible values include: 'GreaterThan', 'LessThan', 'GreaterOrLessThan' 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"` }
func (dmc DynamicMetricCriteria) AsBasicMultiMetricCriteria() (BasicMultiMetricCriteria, bool)
AsBasicMultiMetricCriteria is the BasicMultiMetricCriteria implementation for DynamicMetricCriteria.
func (dmc DynamicMetricCriteria) AsCriteria() (*Criteria, bool)
AsCriteria is the BasicMultiMetricCriteria implementation for DynamicMetricCriteria.
func (dmc DynamicMetricCriteria) AsDynamicMetricCriteria() (*DynamicMetricCriteria, bool)
AsDynamicMetricCriteria is the BasicMultiMetricCriteria implementation for DynamicMetricCriteria.
func (dmc DynamicMetricCriteria) AsMultiMetricCriteria() (*MultiMetricCriteria, bool)
AsMultiMetricCriteria is the BasicMultiMetricCriteria implementation for DynamicMetricCriteria.
func (dmc DynamicMetricCriteria) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for DynamicMetricCriteria.
func (dmc *DynamicMetricCriteria) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for DynamicMetricCriteria struct.
DynamicThresholdFailingPeriods the minimum number of violations required within the selected lookback time window required to raise an alert.
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"` }
DynamicThresholdOperator enumerates the values for dynamic threshold operator.
type DynamicThresholdOperator string
const ( // GreaterOrLessThan ... GreaterOrLessThan DynamicThresholdOperator = "GreaterOrLessThan" // GreaterThan ... GreaterThan DynamicThresholdOperator = "GreaterThan" // LessThan ... LessThan DynamicThresholdOperator = "LessThan" )
func PossibleDynamicThresholdOperatorValues() []DynamicThresholdOperator
PossibleDynamicThresholdOperatorValues returns an array of possible values for the DynamicThresholdOperator const type.
DynamicThresholdSensitivity enumerates the values for dynamic threshold sensitivity.
type DynamicThresholdSensitivity string
const ( // DynamicThresholdSensitivityHigh ... DynamicThresholdSensitivityHigh DynamicThresholdSensitivity = "High" // DynamicThresholdSensitivityLow ... DynamicThresholdSensitivityLow DynamicThresholdSensitivity = "Low" // DynamicThresholdSensitivityMedium ... DynamicThresholdSensitivityMedium DynamicThresholdSensitivity = "Medium" )
func PossibleDynamicThresholdSensitivityValues() []DynamicThresholdSensitivity
PossibleDynamicThresholdSensitivityValues returns an array of possible values for the DynamicThresholdSensitivity const type.
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 ErrorContract struct { // Error - The error object. Error *ErrorResponse `json:"error,omitempty"` }
ErrorResponse describes the format of Error response.
type ErrorResponse struct { // Code - Error code Code *string `json:"code,omitempty"` // Message - Error message indicating why the operation failed. Message *string `json:"message,omitempty"` }
LocalizableString the localizable string class.
type LocalizableString struct { // Value - the invariant value. Value *string `json:"value,omitempty"` // LocalizedValue - the locale specific value. LocalizedValue *string `json:"localizedValue,omitempty"` }
LogSpecification log specification of operation.
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"` }
MetadataValue represents a metric metadata value.
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"` }
Metric the result data of a query.
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"` }
MetricAggregationType enumerates the values for metric aggregation type.
type MetricAggregationType string
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() []MetricAggregationType
PossibleMetricAggregationTypeValues returns an array of possible values for the MetricAggregationType const type.
MetricClass enumerates the values for metric class.
type MetricClass string
const ( // MetricClassAvailability ... MetricClassAvailability MetricClass = "Availability" // MetricClassErrors ... MetricClassErrors MetricClass = "Errors" // MetricClassLatency ... MetricClassLatency MetricClass = "Latency" // MetricClassSaturation ... MetricClassSaturation MetricClass = "Saturation" // MetricClassTransactions ... MetricClassTransactions MetricClass = "Transactions" )
func PossibleMetricClassValues() []MetricClass
PossibleMetricClassValues returns an array of possible values for the MetricClass const type.
MetricResultType enumerates the values for metric result type.
type MetricResultType string
const ( // Data ... Data MetricResultType = "Data" // Metadata ... Metadata MetricResultType = "Metadata" )
func PossibleMetricResultTypeValues() []MetricResultType
PossibleMetricResultTypeValues returns an array of possible values for the MetricResultType const type.
MetricUnit enumerates the values for metric unit.
type MetricUnit string
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() []MetricUnit
PossibleMetricUnitValues returns an array of possible values for the MetricUnit const type.
MultiMetricCriteria the types of conditions for a multi resource alert.
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"` }
func (mmc MultiMetricCriteria) AsBasicMultiMetricCriteria() (BasicMultiMetricCriteria, bool)
AsBasicMultiMetricCriteria is the BasicMultiMetricCriteria implementation for MultiMetricCriteria.
func (mmc MultiMetricCriteria) AsCriteria() (*Criteria, bool)
AsCriteria is the BasicMultiMetricCriteria implementation for MultiMetricCriteria.
func (mmc MultiMetricCriteria) AsDynamicMetricCriteria() (*DynamicMetricCriteria, bool)
AsDynamicMetricCriteria is the BasicMultiMetricCriteria implementation for MultiMetricCriteria.
func (mmc MultiMetricCriteria) AsMultiMetricCriteria() (*MultiMetricCriteria, bool)
AsMultiMetricCriteria is the BasicMultiMetricCriteria implementation for MultiMetricCriteria.
func (mmc MultiMetricCriteria) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for MultiMetricCriteria.
func (mmc *MultiMetricCriteria) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for MultiMetricCriteria struct.
Namespace metric namespace class specifies the metadata for a metric 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: 'Platform', 'Custom', 'Qos' Classification NamespaceClassification `json:"classification,omitempty"` // Properties - Properties which include the fully qualified namespace name. Properties *NamespaceName `json:"properties,omitempty"` }
NamespaceClassification enumerates the values for namespace classification.
type NamespaceClassification string
const ( // Custom ... Custom NamespaceClassification = "Custom" // Platform ... Platform NamespaceClassification = "Platform" // Qos ... Qos NamespaceClassification = "Qos" )
func PossibleNamespaceClassificationValues() []NamespaceClassification
PossibleNamespaceClassificationValues returns an array of possible values for the NamespaceClassification const type.
NamespaceCollection represents collection of metric namespaces.
type NamespaceCollection struct { autorest.Response `json:"-"` // Value - The values for the metric namespaces. Value *[]Namespace `json:"value,omitempty"` }
NamespaceName the fully qualified metric namespace name.
type NamespaceName struct { // MetricNamespaceName - The metric namespace name. MetricNamespaceName *string `json:"metricNamespaceName,omitempty"` }
NamespacesClient is the monitor Management Client
type NamespacesClient struct { BaseClient }
func NewNamespacesClient(subscriptionID string) NamespacesClient
NewNamespacesClient creates an instance of the NamespacesClient client.
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 (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 (client NamespacesClient) ListPreparer(ctx context.Context, resourceURI string, startTime string) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
OdataType enumerates the values for odata type.
type OdataType string
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() []OdataType
PossibleOdataTypeValues returns an array of possible values for the OdataType const type.
Operation microsoft Insights API operation definition.
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"` }
func (o Operation) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Operation.
func (o *Operation) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Operation struct.
OperationDisplay display metadata associated with the operation.
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"` }
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 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"` }
OperationProperties properties of operation, include metric specifications.
type OperationProperties struct { // ServiceSpecification - One property of operation, include metric specifications. ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` }
OperationsClient is the monitor Management Client
type OperationsClient struct { BaseClient }
func NewOperationsClient(subscriptionID string) OperationsClient
NewOperationsClient creates an instance of the OperationsClient client.
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 (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error)
List lists all of the available operations from Microsoft.Insights provider.
func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
Operator enumerates the values for operator.
type Operator string
const ( // OperatorEquals ... OperatorEquals Operator = "Equals" // OperatorGreaterThan ... OperatorGreaterThan Operator = "GreaterThan" // OperatorGreaterThanOrEqual ... OperatorGreaterThanOrEqual Operator = "GreaterThanOrEqual" // OperatorLessThan ... OperatorLessThan Operator = "LessThan" // OperatorLessThanOrEqual ... OperatorLessThanOrEqual Operator = "LessThanOrEqual" )
func PossibleOperatorValues() []Operator
PossibleOperatorValues returns an array of possible values for the Operator const type.
Resource an azure resource object
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"` }
func (r Resource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Resource.
Response the response to a metrics query.
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"` }
ResultType enumerates the values for result type.
type ResultType string
const ( // ResultTypeData ... ResultTypeData ResultType = "Data" // ResultTypeMetadata ... ResultTypeMetadata ResultType = "Metadata" )
func PossibleResultTypeValues() []ResultType
PossibleResultTypeValues returns an array of possible values for the ResultType const type.
ServiceSpecification one property of operation, include log specifications.
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"` }
SingleBaseline the baseline values for a single sensitivity value.
type SingleBaseline struct { // Sensitivity - the sensitivity of the baseline. Possible values include: 'Low', 'Medium', 'High' 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"` }
SingleDimension the metric dimension name and value.
type SingleDimension struct { // Name - Name of the dimension. Name *string `json:"name,omitempty"` // Value - Value of the dimension. Value *string `json:"value,omitempty"` }
SingleMetricBaseline the baseline results of a single metric.
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"` }
func (smb SingleMetricBaseline) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for SingleMetricBaseline.
func (smb *SingleMetricBaseline) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for SingleMetricBaseline struct.
Specification metric specification of operation.
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"` }
SubscriptionScopeMetric the result data of a query.
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"` }
SubscriptionScopeMetricDefinition metric definition class specifies the metadata for a metric.
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"` }
SubscriptionScopeMetricDefinitionCollection represents collection of metric definitions.
type SubscriptionScopeMetricDefinitionCollection struct { autorest.Response `json:"-"` // Value - The values for the metric definitions. Value *[]SubscriptionScopeMetricDefinition `json:"value,omitempty"` }
SubscriptionScopeMetricResponse the response to a subscription scope metrics query.
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"` }
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 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: 'Data', 'Metadata' 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"` }
TimeSeriesBaseline the baseline values for a single time series.
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"` }
TimeSeriesElement a time series result type. The discriminator value is always TimeSeries in this case.
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"` }
Unit enumerates the values for unit.
type Unit string
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() []Unit
PossibleUnitValues returns an array of possible values for the Unit const type.
Value represents a metric 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"` }
WebtestLocationAvailabilityCriteria specifies the metric alert rule criteria for a web test resource.
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"` }
func (wlac WebtestLocationAvailabilityCriteria) AsAlertCriteria() (*AlertCriteria, bool)
AsAlertCriteria is the BasicAlertCriteria implementation for WebtestLocationAvailabilityCriteria.
func (wlac WebtestLocationAvailabilityCriteria) AsAlertMultipleResourceMultipleMetricCriteria() (*AlertMultipleResourceMultipleMetricCriteria, bool)
AsAlertMultipleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for WebtestLocationAvailabilityCriteria.
func (wlac WebtestLocationAvailabilityCriteria) AsAlertSingleResourceMultipleMetricCriteria() (*AlertSingleResourceMultipleMetricCriteria, bool)
AsAlertSingleResourceMultipleMetricCriteria is the BasicAlertCriteria implementation for WebtestLocationAvailabilityCriteria.
func (wlac WebtestLocationAvailabilityCriteria) AsBasicAlertCriteria() (BasicAlertCriteria, bool)
AsBasicAlertCriteria is the BasicAlertCriteria implementation for WebtestLocationAvailabilityCriteria.
func (wlac WebtestLocationAvailabilityCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool)
AsWebtestLocationAvailabilityCriteria is the BasicAlertCriteria implementation for WebtestLocationAvailabilityCriteria.
func (wlac WebtestLocationAvailabilityCriteria) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for WebtestLocationAvailabilityCriteria.
func (wlac *WebtestLocationAvailabilityCriteria) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for WebtestLocationAvailabilityCriteria struct.
Name | Synopsis |
---|---|
.. | |
metricsapi | Deprecated: Please note, this package has been deprecated. |