Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Azure Native

v1.42.0 published on Monday, Oct 25, 2021 by Pulumi

getAlertRule

The alert rule resource. API Version: 2016-03-01.

Using getAlertRule

function getAlertRule(args: GetAlertRuleArgs, opts?: InvokeOptions): Promise<GetAlertRuleResult>
def get_alert_rule(resource_group_name: Optional[str] = None,
                   rule_name: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetAlertRuleResult
func LookupAlertRule(ctx *Context, args *LookupAlertRuleArgs, opts ...InvokeOption) (*LookupAlertRuleResult, error)

Note: This function is named LookupAlertRule in the Go SDK.

public static class GetAlertRule {
    public static Task<GetAlertRuleResult> InvokeAsync(GetAlertRuleArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ResourceGroupName string
The name of the resource group.
RuleName string
The name of the rule.
ResourceGroupName string
The name of the resource group.
RuleName string
The name of the rule.
resourceGroupName string
The name of the resource group.
ruleName string
The name of the rule.
resource_group_name str
The name of the resource group.
rule_name str
The name of the rule.

getAlertRule Result

The following output properties are available:

Condition Pulumi.AzureNative.Insights.Outputs.LocationThresholdRuleConditionResponse | Pulumi.AzureNative.Insights.Outputs.ManagementEventRuleConditionResponse | Pulumi.AzureNative.Insights.Outputs.ThresholdRuleConditionResponse
the condition that results in the alert rule being activated.
Id string
Azure resource Id
IsEnabled bool
the flag that indicates whether the alert rule is enabled.
LastUpdatedTime string
Last time the rule was updated in ISO8601 format.
Location string
Resource location
Name string
Azure resource name
Type string
Azure resource type
Action Pulumi.AzureNative.Insights.Outputs.RuleEmailActionResponse | Pulumi.AzureNative.Insights.Outputs.RuleWebhookActionResponse
action that is performed when the alert rule becomes active, and when an alert condition is resolved.
Actions List<Union<Pulumi.AzureNative.Insights.Outputs.RuleEmailActionResponse, Pulumi.AzureNative.Insights.Outputs.RuleWebhookActionResponse>>
the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
Description string
the description of the alert rule that will be included in the alert email.
ProvisioningState string
the provisioning state.
Tags Dictionary<string, string>
Resource tags
Condition LocationThresholdRuleConditionResponse | ManagementEventRuleConditionResponse | ThresholdRuleConditionResponse
the condition that results in the alert rule being activated.
Id string
Azure resource Id
IsEnabled bool
the flag that indicates whether the alert rule is enabled.
LastUpdatedTime string
Last time the rule was updated in ISO8601 format.
Location string
Resource location
Name string
Azure resource name
Type string
Azure resource type
Action RuleEmailActionResponse | RuleWebhookActionResponse
action that is performed when the alert rule becomes active, and when an alert condition is resolved.
Actions []interface{}
the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
Description string
the description of the alert rule that will be included in the alert email.
ProvisioningState string
the provisioning state.
Tags map[string]string
Resource tags
condition LocationThresholdRuleConditionResponse | ManagementEventRuleConditionResponse | ThresholdRuleConditionResponse
the condition that results in the alert rule being activated.
id string
Azure resource Id
isEnabled boolean
the flag that indicates whether the alert rule is enabled.
lastUpdatedTime string
Last time the rule was updated in ISO8601 format.
location string
Resource location
name string
Azure resource name
type string
Azure resource type
action RuleEmailActionResponse | RuleWebhookActionResponse
action that is performed when the alert rule becomes active, and when an alert condition is resolved.
actions (RuleEmailActionResponse | RuleWebhookActionResponse)[]
the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
description string
the description of the alert rule that will be included in the alert email.
provisioningState string
the provisioning state.
tags {[key: string]: string}
Resource tags
condition LocationThresholdRuleConditionResponse | ManagementEventRuleConditionResponse | ThresholdRuleConditionResponse
the condition that results in the alert rule being activated.
id str
Azure resource Id
is_enabled bool
the flag that indicates whether the alert rule is enabled.
last_updated_time str
Last time the rule was updated in ISO8601 format.
location str
Resource location
name str
Azure resource name
type str
Azure resource type
action RuleEmailActionResponse | RuleWebhookActionResponse
action that is performed when the alert rule becomes active, and when an alert condition is resolved.
actions Sequence[Any]
the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
description str
the description of the alert rule that will be included in the alert email.
provisioning_state str
the provisioning state.
tags Mapping[str, str]
Resource tags

Supporting Types

LocationThresholdRuleConditionResponse

FailedLocationCount int
the number of locations that must fail to activate the alert.
DataSource Pulumi.AzureNative.Insights.Inputs.RuleManagementEventDataSourceResponse | Pulumi.AzureNative.Insights.Inputs.RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
WindowSize string
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
FailedLocationCount int
the number of locations that must fail to activate the alert.
DataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
WindowSize string
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
failedLocationCount number
the number of locations that must fail to activate the alert.
dataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
windowSize string
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
failed_location_count int
the number of locations that must fail to activate the alert.
data_source RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
window_size str
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.

ManagementEventAggregationConditionResponse

Operator string
the condition operator.
Threshold double
The threshold value that activates the alert.
WindowSize string
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
Operator string
the condition operator.
Threshold float64
The threshold value that activates the alert.
WindowSize string
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
operator string
the condition operator.
threshold number
The threshold value that activates the alert.
windowSize string
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
operator str
the condition operator.
threshold float
The threshold value that activates the alert.
window_size str
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.

ManagementEventRuleConditionResponse

Aggregation Pulumi.AzureNative.Insights.Inputs.ManagementEventAggregationConditionResponse
How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
DataSource Pulumi.AzureNative.Insights.Inputs.RuleManagementEventDataSourceResponse | Pulumi.AzureNative.Insights.Inputs.RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
Aggregation ManagementEventAggregationConditionResponse
How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
DataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
aggregation ManagementEventAggregationConditionResponse
How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
dataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
aggregation ManagementEventAggregationConditionResponse
How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
data_source RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.

RuleEmailActionResponse

CustomEmails List<string>
the list of administrator’s custom email addresses to notify of the activation of the alert.
SendToServiceOwners bool
Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
CustomEmails []string
the list of administrator’s custom email addresses to notify of the activation of the alert.
SendToServiceOwners bool
Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
customEmails string[]
the list of administrator’s custom email addresses to notify of the activation of the alert.
sendToServiceOwners boolean
Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
custom_emails Sequence[str]
the list of administrator’s custom email addresses to notify of the activation of the alert.
send_to_service_owners bool
Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.

RuleManagementEventClaimsDataSourceResponse

EmailAddress string
the email address.
EmailAddress string
the email address.
emailAddress string
the email address.
email_address str
the email address.

RuleManagementEventDataSourceResponse

Claims Pulumi.AzureNative.Insights.Inputs.RuleManagementEventClaimsDataSourceResponse
the claims.
EventName string
the event name.
EventSource string
the event source.
LegacyResourceId string
the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
Level string
the level.
MetricNamespace string
the namespace of the metric.
OperationName string
The name of the operation that should be checked for. If no name is provided, any operation will match.
ResourceGroupName string
the resource group name.
ResourceLocation string
the location of the resource.
ResourceProviderName string
the resource provider name.
ResourceUri string
the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
Status string
The status of the operation that should be checked for. If no status is provided, any status will match.
SubStatus string
the substatus.
Claims RuleManagementEventClaimsDataSourceResponse
the claims.
EventName string
the event name.
EventSource string
the event source.
LegacyResourceId string
the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
Level string
the level.
MetricNamespace string
the namespace of the metric.
OperationName string
The name of the operation that should be checked for. If no name is provided, any operation will match.
ResourceGroupName string
the resource group name.
ResourceLocation string
the location of the resource.
ResourceProviderName string
the resource provider name.
ResourceUri string
the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
Status string
The status of the operation that should be checked for. If no status is provided, any status will match.
SubStatus string
the substatus.
claims RuleManagementEventClaimsDataSourceResponse
the claims.
eventName string
the event name.
eventSource string
the event source.
legacyResourceId string
the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
level string
the level.
metricNamespace string
the namespace of the metric.
operationName string
The name of the operation that should be checked for. If no name is provided, any operation will match.
resourceGroupName string
the resource group name.
resourceLocation string
the location of the resource.
resourceProviderName string
the resource provider name.
resourceUri string
the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
status string
The status of the operation that should be checked for. If no status is provided, any status will match.
subStatus string
the substatus.
claims RuleManagementEventClaimsDataSourceResponse
the claims.
event_name str
the event name.
event_source str
the event source.
legacy_resource_id str
the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
level str
the level.
metric_namespace str
the namespace of the metric.
operation_name str
The name of the operation that should be checked for. If no name is provided, any operation will match.
resource_group_name str
the resource group name.
resource_location str
the location of the resource.
resource_provider_name str
the resource provider name.
resource_uri str
the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
status str
The status of the operation that should be checked for. If no status is provided, any status will match.
sub_status str
the substatus.

RuleMetricDataSourceResponse

LegacyResourceId string
the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
MetricName string
the name of the metric that defines what the rule monitors.
MetricNamespace string
the namespace of the metric.
ResourceLocation string
the location of the resource.
ResourceUri string
the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
LegacyResourceId string
the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
MetricName string
the name of the metric that defines what the rule monitors.
MetricNamespace string
the namespace of the metric.
ResourceLocation string
the location of the resource.
ResourceUri string
the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
legacyResourceId string
the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
metricName string
the name of the metric that defines what the rule monitors.
metricNamespace string
the namespace of the metric.
resourceLocation string
the location of the resource.
resourceUri string
the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
legacy_resource_id str
the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
metric_name str
the name of the metric that defines what the rule monitors.
metric_namespace str
the namespace of the metric.
resource_location str
the location of the resource.
resource_uri str
the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.

RuleWebhookActionResponse

Properties Dictionary<string, string>
the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
ServiceUri string
the service uri to Post the notification when the alert activates or resolves.
Properties map[string]string
the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
ServiceUri string
the service uri to Post the notification when the alert activates or resolves.
properties {[key: string]: string}
the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
serviceUri string
the service uri to Post the notification when the alert activates or resolves.
properties Mapping[str, str]
the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
service_uri str
the service uri to Post the notification when the alert activates or resolves.

ThresholdRuleConditionResponse

Operator string
the operator used to compare the data and the threshold.
Threshold double
the threshold value that activates the alert.
DataSource Pulumi.AzureNative.Insights.Inputs.RuleManagementEventDataSourceResponse | Pulumi.AzureNative.Insights.Inputs.RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
TimeAggregation string
the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
WindowSize string
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
Operator string
the operator used to compare the data and the threshold.
Threshold float64
the threshold value that activates the alert.
DataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
TimeAggregation string
the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
WindowSize string
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
operator string
the operator used to compare the data and the threshold.
threshold number
the threshold value that activates the alert.
dataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
timeAggregation string
the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
windowSize string
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
operator str
the operator used to compare the data and the threshold.
threshold float
the threshold value that activates the alert.
data_source RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
time_aggregation str
the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
window_size str
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0