azure-native.insights.getMetricAlert
Explore with Pulumi AI
Retrieve an alert rule definition. Azure REST API version: 2018-03-01.
Using getMetricAlert
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getMetricAlert(args: GetMetricAlertArgs, opts?: InvokeOptions): Promise<GetMetricAlertResult>
function getMetricAlertOutput(args: GetMetricAlertOutputArgs, opts?: InvokeOptions): Output<GetMetricAlertResult>
def get_metric_alert(resource_group_name: Optional[str] = None,
rule_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMetricAlertResult
def get_metric_alert_output(resource_group_name: Optional[pulumi.Input[str]] = None,
rule_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMetricAlertResult]
func LookupMetricAlert(ctx *Context, args *LookupMetricAlertArgs, opts ...InvokeOption) (*LookupMetricAlertResult, error)
func LookupMetricAlertOutput(ctx *Context, args *LookupMetricAlertOutputArgs, opts ...InvokeOption) LookupMetricAlertResultOutput
> Note: This function is named LookupMetricAlert
in the Go SDK.
public static class GetMetricAlert
{
public static Task<GetMetricAlertResult> InvokeAsync(GetMetricAlertArgs args, InvokeOptions? opts = null)
public static Output<GetMetricAlertResult> Invoke(GetMetricAlertInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetMetricAlertResult> getMetricAlert(GetMetricAlertArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure-native:insights:getMetricAlert
arguments:
# arguments dictionary
The following arguments are supported:
- Resource
Group stringName The name of the resource group. The name is case insensitive.
- Rule
Name string The name of the rule.
- Resource
Group stringName The name of the resource group. The name is case insensitive.
- Rule
Name string The name of the rule.
- resource
Group StringName The name of the resource group. The name is case insensitive.
- rule
Name String The name of the rule.
- resource
Group stringName The name of the resource group. The name is case insensitive.
- rule
Name string The name of the rule.
- resource_
group_ strname The name of the resource group. The name is case insensitive.
- rule_
name str The name of the rule.
- resource
Group StringName The name of the resource group. The name is case insensitive.
- rule
Name String The name of the rule.
getMetricAlert Result
The following output properties are available:
- Criteria
Pulumi.
Azure | Pulumi.Native. Insights. Outputs. Metric Alert Multiple Resource Multiple Metric Criteria Response Azure | Pulumi.Native. Insights. Outputs. Metric Alert Single Resource Multiple Metric Criteria Response Azure Native. Insights. Outputs. Webtest Location Availability Criteria Response defines the specific alert criteria information.
- Enabled bool
the flag that indicates whether the metric alert is enabled.
- Evaluation
Frequency string how often the metric alert is evaluated represented in ISO 8601 duration format.
- Id string
Azure resource Id
- Is
Migrated bool the value indicating whether this alert rule is migrated.
- Last
Updated stringTime Last time the rule was updated in ISO8601 format.
- Location string
Resource location
- Name string
Azure resource name
- Scopes List<string>
the list of resource id's that this metric alert is scoped to.
- Severity int
Alert severity {0, 1, 2, 3, 4}
- Type string
Azure resource type
- Window
Size string the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
- Actions
List<Pulumi.
Azure Native. Insights. Outputs. Metric Alert Action Response> the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
- Auto
Mitigate bool the flag that indicates whether the alert should be auto resolved or not. The default is true.
- Description string
the description of the metric alert that will be included in the alert email.
- Dictionary<string, string>
Resource tags
- Target
Resource stringRegion 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.
- Target
Resource stringType 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.
- Criteria
Metric
Alert | MetricMultiple Resource Multiple Metric Criteria Response Alert | WebtestSingle Resource Multiple Metric Criteria Response Location Availability Criteria Response defines the specific alert criteria information.
- Enabled bool
the flag that indicates whether the metric alert is enabled.
- Evaluation
Frequency string how often the metric alert is evaluated represented in ISO 8601 duration format.
- Id string
Azure resource Id
- Is
Migrated bool the value indicating whether this alert rule is migrated.
- Last
Updated stringTime Last time the rule was updated in ISO8601 format.
- Location string
Resource location
- Name string
Azure resource name
- Scopes []string
the list of resource id's that this metric alert is scoped to.
- Severity int
Alert severity {0, 1, 2, 3, 4}
- Type string
Azure resource type
- Window
Size string the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
- Actions
[]Metric
Alert Action Response the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
- Auto
Mitigate bool the flag that indicates whether the alert should be auto resolved or not. The default is true.
- Description string
the description of the metric alert that will be included in the alert email.
- map[string]string
Resource tags
- Target
Resource stringRegion 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.
- Target
Resource stringType 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.
- criteria
Metric
Alert | MetricMultiple Resource Multiple Metric Criteria Response Alert | WebtestSingle Resource Multiple Metric Criteria Response Location Availability Criteria Response defines the specific alert criteria information.
- enabled Boolean
the flag that indicates whether the metric alert is enabled.
- evaluation
Frequency String how often the metric alert is evaluated represented in ISO 8601 duration format.
- id String
Azure resource Id
- is
Migrated Boolean the value indicating whether this alert rule is migrated.
- last
Updated StringTime Last time the rule was updated in ISO8601 format.
- location String
Resource location
- name String
Azure resource name
- scopes List<String>
the list of resource id's that this metric alert is scoped to.
- severity Integer
Alert severity {0, 1, 2, 3, 4}
- type String
Azure resource type
- window
Size String the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
- actions
List<Metric
Alert Action Response> the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
- auto
Mitigate Boolean the flag that indicates whether the alert should be auto resolved or not. The default is true.
- description String
the description of the metric alert that will be included in the alert email.
- Map<String,String>
Resource tags
- target
Resource StringRegion 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.
- target
Resource StringType 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.
- criteria
Metric
Alert | MetricMultiple Resource Multiple Metric Criteria Response Alert | WebtestSingle Resource Multiple Metric Criteria Response Location Availability Criteria Response defines the specific alert criteria information.
- enabled boolean
the flag that indicates whether the metric alert is enabled.
- evaluation
Frequency string how often the metric alert is evaluated represented in ISO 8601 duration format.
- id string
Azure resource Id
- is
Migrated boolean the value indicating whether this alert rule is migrated.
- last
Updated stringTime Last time the rule was updated in ISO8601 format.
- location string
Resource location
- name string
Azure resource name
- scopes string[]
the list of resource id's that this metric alert is scoped to.
- severity number
Alert severity {0, 1, 2, 3, 4}
- type string
Azure resource type
- window
Size string the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
- actions
Metric
Alert Action Response[] the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
- auto
Mitigate boolean the flag that indicates whether the alert should be auto resolved or not. The default is true.
- description string
the description of the metric alert that will be included in the alert email.
- {[key: string]: string}
Resource tags
- target
Resource stringRegion 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.
- target
Resource stringType 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.
- criteria
Metric
Alert | MetricMultiple Resource Multiple Metric Criteria Response Alert | WebtestSingle Resource Multiple Metric Criteria Response Location Availability Criteria Response defines the specific alert criteria information.
- enabled bool
the flag that indicates whether the metric alert is enabled.
- evaluation_
frequency str how often the metric alert is evaluated represented in ISO 8601 duration format.
- id str
Azure resource Id
- is_
migrated bool the value indicating whether this alert rule is migrated.
- last_
updated_ strtime Last time the rule was updated in ISO8601 format.
- location str
Resource location
- name str
Azure resource name
- scopes Sequence[str]
the list of resource id's that this metric alert is scoped to.
- severity int
Alert severity {0, 1, 2, 3, 4}
- type str
Azure resource type
- window_
size str the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
- actions
Sequence[Metric
Alert Action Response] the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
- auto_
mitigate bool the flag that indicates whether the alert should be auto resolved or not. The default is true.
- description str
the description of the metric alert that will be included in the alert email.
- Mapping[str, str]
Resource tags
- target_
resource_ strregion 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.
- target_
resource_ strtype 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.
- criteria Property Map | Property Map | Property Map
defines the specific alert criteria information.
- enabled Boolean
the flag that indicates whether the metric alert is enabled.
- evaluation
Frequency String how often the metric alert is evaluated represented in ISO 8601 duration format.
- id String
Azure resource Id
- is
Migrated Boolean the value indicating whether this alert rule is migrated.
- last
Updated StringTime Last time the rule was updated in ISO8601 format.
- location String
Resource location
- name String
Azure resource name
- scopes List<String>
the list of resource id's that this metric alert is scoped to.
- severity Number
Alert severity {0, 1, 2, 3, 4}
- type String
Azure resource type
- window
Size String the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
- actions List<Property Map>
the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
- auto
Mitigate Boolean the flag that indicates whether the alert should be auto resolved or not. The default is true.
- description String
the description of the metric alert that will be included in the alert email.
- Map<String>
Resource tags
- target
Resource StringRegion 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.
- target
Resource StringType 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.
Supporting Types
DynamicMetricCriteriaResponse
- Alert
Sensitivity string The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
- Failing
Periods Pulumi.Azure Native. Insights. Inputs. Dynamic Threshold Failing Periods Response The minimum number of violations required within the selected lookback time window required to raise an alert.
- Metric
Name string Name of the metric.
- Name string
Name of the criteria.
- Operator string
The operator used to compare the metric value against the threshold.
- Time
Aggregation string the criteria time aggregation types.
- Dimensions
List<Pulumi.
Azure Native. Insights. Inputs. Metric Dimension Response> List of dimension conditions.
- Ignore
Data stringBefore Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
- Metric
Namespace string Namespace of the metric.
- Skip
Metric boolValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
- Alert
Sensitivity string The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
- Failing
Periods DynamicThreshold Failing Periods Response The minimum number of violations required within the selected lookback time window required to raise an alert.
- Metric
Name string Name of the metric.
- Name string
Name of the criteria.
- Operator string
The operator used to compare the metric value against the threshold.
- Time
Aggregation string the criteria time aggregation types.
- Dimensions
[]Metric
Dimension Response List of dimension conditions.
- Ignore
Data stringBefore Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
- Metric
Namespace string Namespace of the metric.
- Skip
Metric boolValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
- alert
Sensitivity String The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
- failing
Periods DynamicThreshold Failing Periods Response The minimum number of violations required within the selected lookback time window required to raise an alert.
- metric
Name String Name of the metric.
- name String
Name of the criteria.
- operator String
The operator used to compare the metric value against the threshold.
- time
Aggregation String the criteria time aggregation types.
- dimensions
List<Metric
Dimension Response> List of dimension conditions.
- ignore
Data StringBefore Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
- metric
Namespace String Namespace of the metric.
- skip
Metric BooleanValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
- alert
Sensitivity string The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
- failing
Periods DynamicThreshold Failing Periods Response The minimum number of violations required within the selected lookback time window required to raise an alert.
- metric
Name string Name of the metric.
- name string
Name of the criteria.
- operator string
The operator used to compare the metric value against the threshold.
- time
Aggregation string the criteria time aggregation types.
- dimensions
Metric
Dimension Response[] List of dimension conditions.
- ignore
Data stringBefore Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
- metric
Namespace string Namespace of the metric.
- skip
Metric booleanValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
- alert_
sensitivity str The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
- failing_
periods DynamicThreshold Failing Periods Response The minimum number of violations required within the selected lookback time window required to raise an alert.
- metric_
name str Name of the metric.
- name str
Name of the criteria.
- operator str
The operator used to compare the metric value against the threshold.
- time_
aggregation str the criteria time aggregation types.
- dimensions
Sequence[Metric
Dimension Response] List of dimension conditions.
- ignore_
data_ strbefore Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
- metric_
namespace str Namespace of the metric.
- skip_
metric_ boolvalidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
- alert
Sensitivity String The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
- failing
Periods Property Map The minimum number of violations required within the selected lookback time window required to raise an alert.
- metric
Name String Name of the metric.
- name String
Name of the criteria.
- operator String
The operator used to compare the metric value against the threshold.
- time
Aggregation String the criteria time aggregation types.
- dimensions List<Property Map>
List of dimension conditions.
- ignore
Data StringBefore Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
- metric
Namespace String Namespace of the metric.
- skip
Metric BooleanValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
DynamicThresholdFailingPeriodsResponse
- Min
Failing doublePeriods To Alert The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods.
- Number
Of doubleEvaluation Periods 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.
- Min
Failing float64Periods To Alert The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods.
- Number
Of float64Evaluation Periods 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.
- min
Failing DoublePeriods To Alert The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods.
- number
Of DoubleEvaluation Periods 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.
- min
Failing numberPeriods To Alert The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods.
- number
Of numberEvaluation Periods 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.
- min_
failing_ floatperiods_ to_ alert The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods.
- number_
of_ floatevaluation_ periods 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.
- min
Failing NumberPeriods To Alert The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods.
- number
Of NumberEvaluation Periods 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.
MetricAlertActionResponse
- Action
Group stringId the id of the action group to use.
- Web
Hook Dictionary<string, string>Properties This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.
- Action
Group stringId the id of the action group to use.
- Web
Hook map[string]stringProperties This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.
- action
Group StringId the id of the action group to use.
- web
Hook Map<String,String>Properties This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.
- action
Group stringId the id of the action group to use.
- web
Hook {[key: string]: string}Properties This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.
- action_
group_ strid the id of the action group to use.
- web_
hook_ Mapping[str, str]properties This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.
- action
Group StringId the id of the action group to use.
- web
Hook Map<String>Properties This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.
MetricAlertMultipleResourceMultipleMetricCriteriaResponse
- All
Of List<Union<Pulumi.Azure Native. Insights. Inputs. Dynamic Metric Criteria Response, Pulumi. Azure Native. Insights. Inputs. Metric Criteria Response>> the list of multiple metric criteria for this 'all of' operation.
- All
Of []interface{} the list of multiple metric criteria for this 'all of' operation.
- all
Of List<Either<DynamicMetric Criteria Response,Metric Criteria Response>> the list of multiple metric criteria for this 'all of' operation.
- all
Of (DynamicMetric Criteria Response | Metric Criteria Response)[] the list of multiple metric criteria for this 'all of' operation.
- all_
of Sequence[Union[DynamicMetric Criteria Response, Metric Criteria Response]] the list of multiple metric criteria for this 'all of' operation.
- all
Of List<Property Map | Property Map> the list of multiple metric criteria for this 'all of' operation.
MetricAlertSingleResourceMultipleMetricCriteriaResponse
- All
Of List<Pulumi.Azure Native. Insights. Inputs. Metric Criteria Response> The list of metric criteria for this 'all of' operation.
- All
Of []MetricCriteria Response The list of metric criteria for this 'all of' operation.
- all
Of List<MetricCriteria Response> The list of metric criteria for this 'all of' operation.
- all
Of MetricCriteria Response[] The list of metric criteria for this 'all of' operation.
- all_
of Sequence[MetricCriteria Response] The list of metric criteria for this 'all of' operation.
- all
Of List<Property Map> The list of metric criteria for this 'all of' operation.
MetricCriteriaResponse
- Metric
Name string Name of the metric.
- Name string
Name of the criteria.
- Operator string
the criteria operator.
- Threshold double
the criteria threshold value that activates the alert.
- Time
Aggregation string the criteria time aggregation types.
- Dimensions
List<Pulumi.
Azure Native. Insights. Inputs. Metric Dimension Response> List of dimension conditions.
- Metric
Namespace string Namespace of the metric.
- Skip
Metric boolValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
- Metric
Name string Name of the metric.
- Name string
Name of the criteria.
- Operator string
the criteria operator.
- Threshold float64
the criteria threshold value that activates the alert.
- Time
Aggregation string the criteria time aggregation types.
- Dimensions
[]Metric
Dimension Response List of dimension conditions.
- Metric
Namespace string Namespace of the metric.
- Skip
Metric boolValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
- metric
Name String Name of the metric.
- name String
Name of the criteria.
- operator String
the criteria operator.
- threshold Double
the criteria threshold value that activates the alert.
- time
Aggregation String the criteria time aggregation types.
- dimensions
List<Metric
Dimension Response> List of dimension conditions.
- metric
Namespace String Namespace of the metric.
- skip
Metric BooleanValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
- metric
Name string Name of the metric.
- name string
Name of the criteria.
- operator string
the criteria operator.
- threshold number
the criteria threshold value that activates the alert.
- time
Aggregation string the criteria time aggregation types.
- dimensions
Metric
Dimension Response[] List of dimension conditions.
- metric
Namespace string Namespace of the metric.
- skip
Metric booleanValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
- metric_
name str Name of the metric.
- name str
Name of the criteria.
- operator str
the criteria operator.
- threshold float
the criteria threshold value that activates the alert.
- time_
aggregation str the criteria time aggregation types.
- dimensions
Sequence[Metric
Dimension Response] List of dimension conditions.
- metric_
namespace str Namespace of the metric.
- skip_
metric_ boolvalidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
- metric
Name String Name of the metric.
- name String
Name of the criteria.
- operator String
the criteria operator.
- threshold Number
the criteria threshold value that activates the alert.
- time
Aggregation String the criteria time aggregation types.
- dimensions List<Property Map>
List of dimension conditions.
- metric
Namespace String Namespace of the metric.
- skip
Metric BooleanValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
MetricDimensionResponse
WebtestLocationAvailabilityCriteriaResponse
- Component
Id string The Application Insights resource Id.
- Failed
Location doubleCount The number of failed locations.
- Web
Test stringId The Application Insights web test Id.
- Component
Id string The Application Insights resource Id.
- Failed
Location float64Count The number of failed locations.
- Web
Test stringId The Application Insights web test Id.
- component
Id String The Application Insights resource Id.
- failed
Location DoubleCount The number of failed locations.
- web
Test StringId The Application Insights web test Id.
- component
Id string The Application Insights resource Id.
- failed
Location numberCount The number of failed locations.
- web
Test stringId The Application Insights web test Id.
- component_
id str The Application Insights resource Id.
- failed_
location_ floatcount The number of failed locations.
- web_
test_ strid The Application Insights web test Id.
- component
Id String The Application Insights resource Id.
- failed
Location NumberCount The number of failed locations.
- web
Test StringId The Application Insights web test Id.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0