ActionRuleActionGroup
Manages an Monitor Action Rule which type is action group.
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 exampleActionGroup = new Azure.Monitoring.ActionGroup("exampleActionGroup", new Azure.Monitoring.ActionGroupArgs
{
ResourceGroupName = exampleResourceGroup.Name,
ShortName = "exampleactiongroup",
});
var exampleActionRuleActionGroup = new Azure.Monitoring.ActionRuleActionGroup("exampleActionRuleActionGroup", new Azure.Monitoring.ActionRuleActionGroupArgs
{
ResourceGroupName = exampleResourceGroup.Name,
ActionGroupId = exampleActionGroup.Id,
Scope = new Azure.Monitoring.Inputs.ActionRuleActionGroupScopeArgs
{
Type = "ResourceGroup",
ResourceIds =
{
exampleResourceGroup.Id,
},
},
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
}
exampleActionGroup, err := monitoring.NewActionGroup(ctx, "exampleActionGroup", &monitoring.ActionGroupArgs{
ResourceGroupName: exampleResourceGroup.Name,
ShortName: pulumi.String("exampleactiongroup"),
})
if err != nil {
return err
}
_, err = monitoring.NewActionRuleActionGroup(ctx, "exampleActionRuleActionGroup", &monitoring.ActionRuleActionGroupArgs{
ResourceGroupName: exampleResourceGroup.Name,
ActionGroupId: exampleActionGroup.ID(),
Scope: &monitoring.ActionRuleActionGroupScopeArgs{
Type: pulumi.String("ResourceGroup"),
ResourceIds: pulumi.StringArray{
exampleResourceGroup.ID(),
},
},
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_group = azure.monitoring.ActionGroup("exampleActionGroup",
resource_group_name=example_resource_group.name,
short_name="exampleactiongroup")
example_action_rule_action_group = azure.monitoring.ActionRuleActionGroup("exampleActionRuleActionGroup",
resource_group_name=example_resource_group.name,
action_group_id=example_action_group.id,
scope={
"type": "ResourceGroup",
"resourceIds": [example_resource_group.id],
},
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 exampleActionGroup = new azure.monitoring.ActionGroup("exampleActionGroup", {
resourceGroupName: exampleResourceGroup.name,
shortName: "exampleactiongroup",
});
const exampleActionRuleActionGroup = new azure.monitoring.ActionRuleActionGroup("exampleActionRuleActionGroup", {
resourceGroupName: exampleResourceGroup.name,
actionGroupId: exampleActionGroup.id,
scope: {
type: "ResourceGroup",
resourceIds: [exampleResourceGroup.id],
},
tags: {
foo: "bar",
},
});Create a ActionRuleActionGroup Resource
new ActionRuleActionGroup(name: string, args: ActionRuleActionGroupArgs, opts?: CustomResourceOptions);def ActionRuleActionGroup(resource_name, opts=None, action_group_id=None, condition=None, description=None, enabled=None, name=None, resource_group_name=None, scope=None, tags=None, __props__=None);func NewActionRuleActionGroup(ctx *Context, name string, args ActionRuleActionGroupArgs, opts ...ResourceOption) (*ActionRuleActionGroup, error)public ActionRuleActionGroup(string name, ActionRuleActionGroupArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ActionRuleActionGroupArgs
- 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 ActionRuleActionGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ActionRuleActionGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ActionRuleActionGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ActionRuleActionGroup resource accepts the following input properties:
- Action
Group stringId Specifies the resource id of monitor action group.
- 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.
- Condition
Action
Rule Action Group 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 Action Group Scope Args A
scopeblock as defined below.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Action
Group stringId Specifies the resource id of monitor action group.
- 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.
- Condition
Action
Rule Action Group 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 Action Group Scope A
scopeblock as defined below.- map[string]string
A mapping of tags to assign to the resource.
- action
Group stringId Specifies the resource id of monitor action group.
- 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.
- condition
Action
Rule Action Group 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 Action Group Scope A
scopeblock as defined below.- {[key: string]: string}
A mapping of tags to assign to the resource.
- action_
group_ strid Specifies the resource id of monitor action group.
- 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.
- condition
Dict[Action
Rule Action Group 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 Action Group 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 ActionRuleActionGroup resource produces the following output properties:
Look up an Existing ActionRuleActionGroup Resource
Get an existing ActionRuleActionGroup 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?: ActionRuleActionGroupState, opts?: CustomResourceOptions): ActionRuleActionGroupstatic get(resource_name, id, opts=None, action_group_id=None, condition=None, description=None, enabled=None, name=None, resource_group_name=None, scope=None, tags=None, __props__=None);func GetActionRuleActionGroup(ctx *Context, name string, id IDInput, state *ActionRuleActionGroupState, opts ...ResourceOption) (*ActionRuleActionGroup, error)public static ActionRuleActionGroup Get(string name, Input<string> id, ActionRuleActionGroupState? 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:
- Action
Group stringId Specifies the resource id of monitor action group.
- Condition
Action
Rule Action Group 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 Action Group Scope Args A
scopeblock as defined below.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Action
Group stringId Specifies the resource id of monitor action group.
- Condition
Action
Rule Action Group 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 Action Group Scope A
scopeblock as defined below.- map[string]string
A mapping of tags to assign to the resource.
- action
Group stringId Specifies the resource id of monitor action group.
- condition
Action
Rule Action Group 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 Action Group Scope A
scopeblock as defined below.- {[key: string]: string}
A mapping of tags to assign to the resource.
- action_
group_ strid Specifies the resource id of monitor action group.
- condition
Dict[Action
Rule Action Group 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 Action Group Scope] A
scopeblock as defined below.- Dict[str, str]
A mapping of tags to assign to the resource.
Supporting Types
ActionRuleActionGroupCondition
- Alert
Context ActionRule Action Group Condition Alert Context Args A
alert_contextblock as defined below.- Alert
Rule ActionId Rule Action Group Condition Alert Rule Id Args A
alert_rule_idblock as defined below.- Description
Action
Rule Action Group Condition Description Args A
descriptionblock as defined below.- Monitor
Action
Rule Action Group Condition Monitor Args A
monitorblock as defined below.- Monitor
Service ActionRule Action Group Condition Monitor Service Args A
monitor_serviceas block defined below.- Severity
Action
Rule Action Group Condition Severity Args A
severityblock as defined below.- Target
Resource ActionType Rule Action Group Condition Target Resource Type Args A
target_resource_typeblock as defined below.
- Alert
Context ActionRule Action Group Condition Alert Context A
alert_contextblock as defined below.- Alert
Rule ActionId Rule Action Group Condition Alert Rule Id A
alert_rule_idblock as defined below.- Description
Action
Rule Action Group Condition Description A
descriptionblock as defined below.- Monitor
Action
Rule Action Group Condition Monitor A
monitorblock as defined below.- Monitor
Service ActionRule Action Group Condition Monitor Service A
monitor_serviceas block defined below.- Severity
Action
Rule Action Group Condition Severity A
severityblock as defined below.- Target
Resource ActionType Rule Action Group Condition Target Resource Type A
target_resource_typeblock as defined below.
- alert
Context ActionRule Action Group Condition Alert Context A
alert_contextblock as defined below.- alert
Rule ActionId Rule Action Group Condition Alert Rule Id A
alert_rule_idblock as defined below.- description
Action
Rule Action Group Condition Description A
descriptionblock as defined below.- monitor
Action
Rule Action Group Condition Monitor A
monitorblock as defined below.- monitor
Service ActionRule Action Group Condition Monitor Service A
monitor_serviceas block defined below.- severity
Action
Rule Action Group Condition Severity A
severityblock as defined below.- target
Resource ActionType Rule Action Group Condition Target Resource Type A
target_resource_typeblock as defined below.
- alert
Context Dict[ActionRule Action Group Condition Alert Context] A
alert_contextblock as defined below.- alert
Rule Dict[ActionId Rule Action Group Condition Alert Rule Id] A
alert_rule_idblock as defined below.- description
Dict[Action
Rule Action Group Condition Description] A
descriptionblock as defined below.- monitor
Dict[Action
Rule Action Group Condition Monitor] A
monitorblock as defined below.- monitor
Service Dict[ActionRule Action Group Condition Monitor Service] A
monitor_serviceas block defined below.- severity
Dict[Action
Rule Action Group Condition Severity] A
severityblock as defined below.- target
Resource Dict[ActionType Rule Action Group Condition Target Resource Type] A
target_resource_typeblock as defined below.
ActionRuleActionGroupConditionAlertContext
- 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.
ActionRuleActionGroupConditionAlertRuleId
- 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.
ActionRuleActionGroupConditionDescription
- 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.
ActionRuleActionGroupConditionMonitor
- 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.
ActionRuleActionGroupConditionMonitorService
- 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.
ActionRuleActionGroupConditionSeverity
- 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.
ActionRuleActionGroupConditionTargetResourceType
- 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.
ActionRuleActionGroupScope
- 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.