ActionRuleSuppression
Manages an Monitor Action Rule which type is suppression.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleActionRuleSuppression = new Azure.Monitoring.ActionRuleSuppression("exampleActionRuleSuppression", new Azure.Monitoring.ActionRuleSuppressionArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Scope = new Azure.Monitoring.Inputs.ActionRuleSuppressionScopeArgs
{
Type = "ResourceGroup",
ResourceIds =
{
exampleResourceGroup.Id,
},
},
Suppression = new Azure.Monitoring.Inputs.ActionRuleSuppressionSuppressionArgs
{
RecurrenceType = "Weekly",
Schedule = new Azure.Monitoring.Inputs.ActionRuleSuppressionSuppressionScheduleArgs
{
StartDateUtc = "2019-01-01T01:02:03Z",
EndDateUtc = "2019-01-03T15:02:07Z",
RecurrenceWeeklies =
{
"Sunday",
"Monday",
"Friday",
"Saturday",
},
},
},
Tags =
{
{ "foo", "bar" },
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/monitoring"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = monitoring.NewActionRuleSuppression(ctx, "exampleActionRuleSuppression", &monitoring.ActionRuleSuppressionArgs{
ResourceGroupName: exampleResourceGroup.Name,
Scope: &monitoring.ActionRuleSuppressionScopeArgs{
Type: pulumi.String("ResourceGroup"),
ResourceIds: pulumi.StringArray{
exampleResourceGroup.ID(),
},
},
Suppression: &monitoring.ActionRuleSuppressionSuppressionArgs{
RecurrenceType: pulumi.String("Weekly"),
Schedule: &monitoring.ActionRuleSuppressionSuppressionScheduleArgs{
StartDateUtc: pulumi.String("2019-01-01T01:02:03Z"),
EndDateUtc: pulumi.String("2019-01-03T15:02:07Z"),
RecurrenceWeeklies: pulumi.StringArray{
pulumi.String("Sunday"),
pulumi.String("Monday"),
pulumi.String("Friday"),
pulumi.String("Saturday"),
},
},
},
Tags: pulumi.Map{
"foo": pulumi.String("bar"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_action_rule_suppression = azure.monitoring.ActionRuleSuppression("exampleActionRuleSuppression",
resource_group_name=example_resource_group.name,
scope={
"type": "ResourceGroup",
"resourceIds": [example_resource_group.id],
},
suppression={
"recurrence_type": "Weekly",
"schedule": {
"startDateUtc": "2019-01-01T01:02:03Z",
"endDateUtc": "2019-01-03T15:02:07Z",
"recurrenceWeeklies": [
"Sunday",
"Monday",
"Friday",
"Saturday",
],
},
},
tags={
"foo": "bar",
})import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleActionRuleSuppression = new azure.monitoring.ActionRuleSuppression("exampleActionRuleSuppression", {
resourceGroupName: exampleResourceGroup.name,
scope: {
type: "ResourceGroup",
resourceIds: [exampleResourceGroup.id],
},
suppression: {
recurrenceType: "Weekly",
schedule: {
startDateUtc: "2019-01-01T01:02:03Z",
endDateUtc: "2019-01-03T15:02:07Z",
recurrenceWeeklies: [
"Sunday",
"Monday",
"Friday",
"Saturday",
],
},
},
tags: {
foo: "bar",
},
});Create a ActionRuleSuppression Resource
new ActionRuleSuppression(name: string, args: ActionRuleSuppressionArgs, opts?: CustomResourceOptions);def ActionRuleSuppression(resource_name, opts=None, condition=None, description=None, enabled=None, name=None, resource_group_name=None, scope=None, suppression=None, tags=None, __props__=None);func NewActionRuleSuppression(ctx *Context, name string, args ActionRuleSuppressionArgs, opts ...ResourceOption) (*ActionRuleSuppression, error)public ActionRuleSuppression(string name, ActionRuleSuppressionArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ActionRuleSuppressionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ActionRuleSuppressionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ActionRuleSuppressionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ActionRuleSuppression Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ActionRuleSuppression resource accepts the following input properties:
- Resource
Group stringName Specifies the name of the resource group in which the Monitor Action Rule should exist. Changing this forces a new resource to be created.
- Suppression
Action
Rule Suppression Suppression Args A
suppressionblock as defined below.- Condition
Action
Rule Suppression Condition Args A
conditionblock as defined below.- Description string
Specifies a description for the Action Rule.
- Enabled bool
Is the Action Rule enabled? Defaults to
true.- Name string
Specifies the name of the Monitor Action Rule. Changing this forces a new resource to be created.
- Scope
Action
Rule Suppression Scope Args A
scopeblock as defined below.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Resource
Group stringName Specifies the name of the resource group in which the Monitor Action Rule should exist. Changing this forces a new resource to be created.
- Suppression
Action
Rule Suppression Suppression A
suppressionblock as defined below.- Condition
Action
Rule Suppression Condition A
conditionblock as defined below.- Description string
Specifies a description for the Action Rule.
- Enabled bool
Is the Action Rule enabled? Defaults to
true.- Name string
Specifies the name of the Monitor Action Rule. Changing this forces a new resource to be created.
- Scope
Action
Rule Suppression Scope A
scopeblock as defined below.- map[string]string
A mapping of tags to assign to the resource.
- resource
Group stringName Specifies the name of the resource group in which the Monitor Action Rule should exist. Changing this forces a new resource to be created.
- suppression
Action
Rule Suppression Suppression A
suppressionblock as defined below.- condition
Action
Rule Suppression Condition A
conditionblock as defined below.- description string
Specifies a description for the Action Rule.
- enabled boolean
Is the Action Rule enabled? Defaults to
true.- name string
Specifies the name of the Monitor Action Rule. Changing this forces a new resource to be created.
- scope
Action
Rule Suppression Scope A
scopeblock as defined below.- {[key: string]: string}
A mapping of tags to assign to the resource.
- resource_
group_ strname Specifies the name of the resource group in which the Monitor Action Rule should exist. Changing this forces a new resource to be created.
- suppression
Dict[Action
Rule Suppression Suppression] A
suppressionblock as defined below.- condition
Dict[Action
Rule Suppression Condition] A
conditionblock as defined below.- description str
Specifies a description for the Action Rule.
- enabled bool
Is the Action Rule enabled? Defaults to
true.- name str
Specifies the name of the Monitor Action Rule. Changing this forces a new resource to be created.
- scope
Dict[Action
Rule Suppression Scope] A
scopeblock as defined below.- Dict[str, str]
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ActionRuleSuppression resource produces the following output properties:
Look up an Existing ActionRuleSuppression Resource
Get an existing ActionRuleSuppression resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ActionRuleSuppressionState, opts?: CustomResourceOptions): ActionRuleSuppressionstatic get(resource_name, id, opts=None, condition=None, description=None, enabled=None, name=None, resource_group_name=None, scope=None, suppression=None, tags=None, __props__=None);func GetActionRuleSuppression(ctx *Context, name string, id IDInput, state *ActionRuleSuppressionState, opts ...ResourceOption) (*ActionRuleSuppression, error)public static ActionRuleSuppression Get(string name, Input<string> id, ActionRuleSuppressionState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Condition
Action
Rule Suppression Condition Args A
conditionblock as defined below.- Description string
Specifies a description for the Action Rule.
- Enabled bool
Is the Action Rule enabled? Defaults to
true.- Name string
Specifies the name of the Monitor Action Rule. Changing this forces a new resource to be created.
- Resource
Group stringName Specifies the name of the resource group in which the Monitor Action Rule should exist. Changing this forces a new resource to be created.
- Scope
Action
Rule Suppression Scope Args A
scopeblock as defined below.- Suppression
Action
Rule Suppression Suppression Args A
suppressionblock as defined below.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Condition
Action
Rule Suppression Condition A
conditionblock as defined below.- Description string
Specifies a description for the Action Rule.
- Enabled bool
Is the Action Rule enabled? Defaults to
true.- Name string
Specifies the name of the Monitor Action Rule. Changing this forces a new resource to be created.
- Resource
Group stringName Specifies the name of the resource group in which the Monitor Action Rule should exist. Changing this forces a new resource to be created.
- Scope
Action
Rule Suppression Scope A
scopeblock as defined below.- Suppression
Action
Rule Suppression Suppression A
suppressionblock as defined below.- map[string]string
A mapping of tags to assign to the resource.
- condition
Action
Rule Suppression Condition A
conditionblock as defined below.- description string
Specifies a description for the Action Rule.
- enabled boolean
Is the Action Rule enabled? Defaults to
true.- name string
Specifies the name of the Monitor Action Rule. Changing this forces a new resource to be created.
- resource
Group stringName Specifies the name of the resource group in which the Monitor Action Rule should exist. Changing this forces a new resource to be created.
- scope
Action
Rule Suppression Scope A
scopeblock as defined below.- suppression
Action
Rule Suppression Suppression A
suppressionblock as defined below.- {[key: string]: string}
A mapping of tags to assign to the resource.
- condition
Dict[Action
Rule Suppression Condition] A
conditionblock as defined below.- description str
Specifies a description for the Action Rule.
- enabled bool
Is the Action Rule enabled? Defaults to
true.- name str
Specifies the name of the Monitor Action Rule. Changing this forces a new resource to be created.
- resource_
group_ strname Specifies the name of the resource group in which the Monitor Action Rule should exist. Changing this forces a new resource to be created.
- scope
Dict[Action
Rule Suppression Scope] A
scopeblock as defined below.- suppression
Dict[Action
Rule Suppression Suppression] A
suppressionblock as defined below.- Dict[str, str]
A mapping of tags to assign to the resource.
Supporting Types
ActionRuleSuppressionCondition
- Alert
Context ActionRule Suppression Condition Alert Context Args A
alert_contextblock as defined below.- Alert
Rule ActionId Rule Suppression Condition Alert Rule Id Args A
alert_rule_idblock as defined below.- Description
Action
Rule Suppression Condition Description Args A
descriptionblock as defined below.- Monitor
Action
Rule Suppression Condition Monitor Args A
monitorblock as defined below.- Monitor
Service ActionRule Suppression Condition Monitor Service Args A
monitor_serviceas block defined below.- Severity
Action
Rule Suppression Condition Severity Args A
severityblock as defined below.- Target
Resource ActionType Rule Suppression Condition Target Resource Type Args A
target_resource_typeblock as defined below.
- Alert
Context ActionRule Suppression Condition Alert Context A
alert_contextblock as defined below.- Alert
Rule ActionId Rule Suppression Condition Alert Rule Id A
alert_rule_idblock as defined below.- Description
Action
Rule Suppression Condition Description A
descriptionblock as defined below.- Monitor
Action
Rule Suppression Condition Monitor A
monitorblock as defined below.- Monitor
Service ActionRule Suppression Condition Monitor Service A
monitor_serviceas block defined below.- Severity
Action
Rule Suppression Condition Severity A
severityblock as defined below.- Target
Resource ActionType Rule Suppression Condition Target Resource Type A
target_resource_typeblock as defined below.
- alert
Context ActionRule Suppression Condition Alert Context A
alert_contextblock as defined below.- alert
Rule ActionId Rule Suppression Condition Alert Rule Id A
alert_rule_idblock as defined below.- description
Action
Rule Suppression Condition Description A
descriptionblock as defined below.- monitor
Action
Rule Suppression Condition Monitor A
monitorblock as defined below.- monitor
Service ActionRule Suppression Condition Monitor Service A
monitor_serviceas block defined below.- severity
Action
Rule Suppression Condition Severity A
severityblock as defined below.- target
Resource ActionType Rule Suppression Condition Target Resource Type A
target_resource_typeblock as defined below.
- alert
Context Dict[ActionRule Suppression Condition Alert Context] A
alert_contextblock as defined below.- alert
Rule Dict[ActionId Rule Suppression Condition Alert Rule Id] A
alert_rule_idblock as defined below.- description
Dict[Action
Rule Suppression Condition Description] A
descriptionblock as defined below.- monitor
Dict[Action
Rule Suppression Condition Monitor] A
monitorblock as defined below.- monitor
Service Dict[ActionRule Suppression Condition Monitor Service] A
monitor_serviceas block defined below.- severity
Dict[Action
Rule Suppression Condition Severity] A
severityblock as defined below.- target
Resource Dict[ActionType Rule Suppression Condition Target Resource Type] A
target_resource_typeblock as defined below.
ActionRuleSuppressionConditionAlertContext
- Operator string
The operator for a given condition. Possible values are
Equals,NotEquals,Contains, andDoesNotContain.- Values List<string>
A list of values to match for a given condition.
ActionRuleSuppressionConditionAlertRuleId
- Operator string
The operator for a given condition. Possible values are
Equals,NotEquals,Contains, andDoesNotContain.- Values List<string>
A list of values to match for a given condition.
ActionRuleSuppressionConditionDescription
- Operator string
The operator for a given condition. Possible values are
Equals,NotEquals,Contains, andDoesNotContain.- Values List<string>
A list of values to match for a given condition.
ActionRuleSuppressionConditionMonitor
- Operator string
The operator for a given condition. Possible values are
EqualsandNotEquals.- Values List<string>
A list of values to match for a given condition. Possible values are
FiredandResolved.
ActionRuleSuppressionConditionMonitorService
- Operator string
The operator for a given condition. Possible values are
EqualsandNotEquals.- Values List<string>
A list of values to match for a given condition. Possible values are
ActivityLog Administrative,ActivityLog Autoscale,ActivityLog Policy,ActivityLog Recommendation,ActivityLog Security,Application Insights,Azure Backup,Data Box Edge,Data Box Gateway,Health Platform,Log Analytics,Platform, andResource Health.
- Operator string
The operator for a given condition. Possible values are
EqualsandNotEquals.- Values []string
A list of values to match for a given condition. Possible values are
ActivityLog Administrative,ActivityLog Autoscale,ActivityLog Policy,ActivityLog Recommendation,ActivityLog Security,Application Insights,Azure Backup,Data Box Edge,Data Box Gateway,Health Platform,Log Analytics,Platform, andResource Health.
- operator string
The operator for a given condition. Possible values are
EqualsandNotEquals.- values string[]
A list of values to match for a given condition. Possible values are
ActivityLog Administrative,ActivityLog Autoscale,ActivityLog Policy,ActivityLog Recommendation,ActivityLog Security,Application Insights,Azure Backup,Data Box Edge,Data Box Gateway,Health Platform,Log Analytics,Platform, andResource Health.
- operator str
The operator for a given condition. Possible values are
EqualsandNotEquals.- values List[str]
A list of values to match for a given condition. Possible values are
ActivityLog Administrative,ActivityLog Autoscale,ActivityLog Policy,ActivityLog Recommendation,ActivityLog Security,Application Insights,Azure Backup,Data Box Edge,Data Box Gateway,Health Platform,Log Analytics,Platform, andResource Health.
ActionRuleSuppressionConditionSeverity
- Operator string
The operator for a given condition. Possible values are
EqualsandNotEquals.- Values List<string>
A list of values to match for a given condition. Possible values are
Sev0,Sev1,Sev2,Sev3, andSev4.
ActionRuleSuppressionConditionTargetResourceType
- Operator string
The operator for a given condition. Possible values are
EqualsandNotEquals.- Values List<string>
A list of values to match for a given condition. The values should be valid resource types.
ActionRuleSuppressionScope
- Resource
Ids List<string> A list of resource IDs of the given scope type which will be the target of action rule.
- Type string
Specifies the type of target scope. Possible values are
ResourceGroupandResource.
- Resource
Ids []string A list of resource IDs of the given scope type which will be the target of action rule.
- Type string
Specifies the type of target scope. Possible values are
ResourceGroupandResource.
- resource
Ids string[] A list of resource IDs of the given scope type which will be the target of action rule.
- type string
Specifies the type of target scope. Possible values are
ResourceGroupandResource.
- resource
Ids List[str] A list of resource IDs of the given scope type which will be the target of action rule.
- type str
Specifies the type of target scope. Possible values are
ResourceGroupandResource.
ActionRuleSuppressionSuppression
- Recurrence
Type string Specifies the type of suppression. Possible values are
Always,Daily,Monthly,Once, andWeekly.- Schedule
Action
Rule Suppression Suppression Schedule Args A
scheduleblock as defined below. Required ifrecurrence_typeisDaily,Monthly,OnceorWeekly.
- Recurrence
Type string Specifies the type of suppression. Possible values are
Always,Daily,Monthly,Once, andWeekly.- Schedule
Action
Rule Suppression Suppression Schedule A
scheduleblock as defined below. Required ifrecurrence_typeisDaily,Monthly,OnceorWeekly.
- recurrence
Type string Specifies the type of suppression. Possible values are
Always,Daily,Monthly,Once, andWeekly.- schedule
Action
Rule Suppression Suppression Schedule A
scheduleblock as defined below. Required ifrecurrence_typeisDaily,Monthly,OnceorWeekly.
- recurrence_
type str Specifies the type of suppression. Possible values are
Always,Daily,Monthly,Once, andWeekly.- schedule
Dict[Action
Rule Suppression Suppression Schedule] A
scheduleblock as defined below. Required ifrecurrence_typeisDaily,Monthly,OnceorWeekly.
ActionRuleSuppressionSuppressionSchedule
- End
Date stringUtc specifies the recurrence UTC end datetime (Y-m-d’T’H:M:S’Z’).
- Start
Date stringUtc specifies the recurrence UTC start datetime (Y-m-d’T’H:M:S’Z’).
- Recurrence
Monthlies List<int> specifies the list of dayOfMonth to recurrence. Possible values are between
1-31. Required ifrecurrence_typeisMonthly.- Recurrence
Weeklies List<string> specifies the list of dayOfWeek to recurrence. Possible values are
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayandSaturday.
- End
Date stringUtc specifies the recurrence UTC end datetime (Y-m-d’T’H:M:S’Z’).
- Start
Date stringUtc specifies the recurrence UTC start datetime (Y-m-d’T’H:M:S’Z’).
- Recurrence
Monthlies []int specifies the list of dayOfMonth to recurrence. Possible values are between
1-31. Required ifrecurrence_typeisMonthly.- Recurrence
Weeklies []string specifies the list of dayOfWeek to recurrence. Possible values are
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayandSaturday.
- end
Date stringUtc specifies the recurrence UTC end datetime (Y-m-d’T’H:M:S’Z’).
- start
Date stringUtc specifies the recurrence UTC start datetime (Y-m-d’T’H:M:S’Z’).
- recurrence
Monthlies number[] specifies the list of dayOfMonth to recurrence. Possible values are between
1-31. Required ifrecurrence_typeisMonthly.- recurrence
Weeklies string[] specifies the list of dayOfWeek to recurrence. Possible values are
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayandSaturday.
- end
Date strUtc specifies the recurrence UTC end datetime (Y-m-d’T’H:M:S’Z’).
- start
Date strUtc specifies the recurrence UTC start datetime (Y-m-d’T’H:M:S’Z’).
- recurrence
Monthlies List[Integer] specifies the list of dayOfMonth to recurrence. Possible values are between
1-31. Required ifrecurrence_typeisMonthly.- recurrence
Weeklies List[str] specifies the list of dayOfWeek to recurrence. Possible values are
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayandSaturday.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.