Class MetricAlert
Manages a Metric Alert within Azure Monitor.
Inherited Members
Namespace: Pulumi.Azure.Monitoring
Assembly: Pulumi.Azure.dll
Syntax
public class MetricAlert : CustomResource
Constructors
View SourceMetricAlert(String, MetricAlertArgs, CustomResourceOptions)
Create a MetricAlert resource with the given unique name, arguments, and options.
Declaration
public MetricAlert(string name, MetricAlertArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| MetricAlertArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceActions
One or more action blocks as defined below.
Declaration
public Output<ImmutableArray<MetricAlertAction>> Actions { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<MetricAlertAction>> |
AutoMitigate
Should the alerts in this Metric Alert be auto resolved? Defaults to true.
Declaration
public Output<bool?> AutoMitigate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Criterias
One or more criteria blocks as defined below.
Declaration
public Output<ImmutableArray<MetricAlertCriteria>> Criterias { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<MetricAlertCriteria>> |
Description
The description of this Metric Alert.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Enabled
Should this Metric Alert be enabled? Defaults to true.
Declaration
public Output<bool?> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Frequency
The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT15M, PT30M and PT1H. Defaults to PT1M.
Declaration
public Output<string> Frequency { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the Metric Alert. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the resource group in which to create the Metric Alert instance.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Scopes
A set of strings of resource IDs at which the metric criteria should be applied.
Declaration
public Output<string> Scopes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Severity
The severity of this Metric Alert. Possible values are 0, 1, 2, 3 and 4. Defaults to 3.
Declaration
public Output<int?> Severity { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Tags
A mapping of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
WindowSize
The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than frequency. Possible values are PT1M, PT5M, PT15M, PT30M, PT1H, PT6H, PT12H and P1D. Defaults to PT5M.
Declaration
public Output<string> WindowSize { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, MetricAlertState, CustomResourceOptions)
Get an existing MetricAlert resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static MetricAlert Get(string name, Input<string> id, MetricAlertState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| MetricAlertState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| MetricAlert |