Ruleset

Rulesets allow you to route events to an endpoint and create collections of event rules, which define sets of actions to take based on event content.

Example Usage

using Pulumi;
using Pagerduty = Pulumi.Pagerduty;

class MyStack : Stack
{
    public MyStack()
    {
        var fooTeam = new Pagerduty.Team("fooTeam", new Pagerduty.TeamArgs
        {
        });
        var fooRuleset = new Pagerduty.Ruleset("fooRuleset", new Pagerduty.RulesetArgs
        {
            Team = new Pagerduty.Inputs.RulesetTeamArgs
            {
                Id = fooTeam.Id,
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-pagerduty/sdk/v2/go/pagerduty"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooTeam, err := pagerduty.NewTeam(ctx, "fooTeam", nil)
		if err != nil {
			return err
		}
		_, err = pagerduty.NewRuleset(ctx, "fooRuleset", &pagerduty.RulesetArgs{
			Team: &pagerduty.RulesetTeamArgs{
				Id: fooTeam.ID(),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_pagerduty as pagerduty

foo_team = pagerduty.Team("fooTeam")
foo_ruleset = pagerduty.Ruleset("fooRuleset", team=pagerduty.RulesetTeamArgs(
    id=foo_team.id,
))
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";

const fooTeam = new pagerduty.Team("fooTeam", {});
const fooRuleset = new pagerduty.Ruleset("fooRuleset", {team: {
    id: fooTeam.id,
}});

Create a Ruleset Resource

new Ruleset(name: string, args?: RulesetArgs, opts?: CustomResourceOptions);
@overload
def Ruleset(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            team: Optional[RulesetTeamArgs] = None)
@overload
def Ruleset(resource_name: str,
            args: Optional[RulesetArgs] = None,
            opts: Optional[ResourceOptions] = None)
func NewRuleset(ctx *Context, name string, args *RulesetArgs, opts ...ResourceOption) (*Ruleset, error)
public Ruleset(string name, RulesetArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args RulesetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args RulesetArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args RulesetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RulesetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Ruleset Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Ruleset resource accepts the following input properties:

Name string
Name of the ruleset.
Team RulesetTeamArgs
Reference to the team that owns the ruleset. If none is specified, only admins have access.
Name string
Name of the ruleset.
Team RulesetTeam
Reference to the team that owns the ruleset. If none is specified, only admins have access.
name string
Name of the ruleset.
team RulesetTeamArgs
Reference to the team that owns the ruleset. If none is specified, only admins have access.
name str
Name of the ruleset.
team RulesetTeamArgs
Reference to the team that owns the ruleset. If none is specified, only admins have access.

Outputs

All input properties are implicitly available as output properties. Additionally, the Ruleset resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
RoutingKeys List<string>
Routing keys routed to this ruleset.
Type string
Type of ruleset. Currently only sets to global.
Id string
The provider-assigned unique ID for this managed resource.
RoutingKeys []string
Routing keys routed to this ruleset.
Type string
Type of ruleset. Currently only sets to global.
id string
The provider-assigned unique ID for this managed resource.
routingKeys string[]
Routing keys routed to this ruleset.
type string
Type of ruleset. Currently only sets to global.
id str
The provider-assigned unique ID for this managed resource.
routing_keys Sequence[str]
Routing keys routed to this ruleset.
type str
Type of ruleset. Currently only sets to global.

Look up an Existing Ruleset Resource

Get an existing Ruleset 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?: RulesetState, opts?: CustomResourceOptions): Ruleset
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        name: Optional[str] = None,
        routing_keys: Optional[Sequence[str]] = None,
        team: Optional[RulesetTeamArgs] = None,
        type: Optional[str] = None) -> Ruleset
func GetRuleset(ctx *Context, name string, id IDInput, state *RulesetState, opts ...ResourceOption) (*Ruleset, error)
public static Ruleset Get(string name, Input<string> id, RulesetState? 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:

Name string
Name of the ruleset.
RoutingKeys List<string>
Routing keys routed to this ruleset.
Team RulesetTeamArgs
Reference to the team that owns the ruleset. If none is specified, only admins have access.
Type string
Type of ruleset. Currently only sets to global.
Name string
Name of the ruleset.
RoutingKeys []string
Routing keys routed to this ruleset.
Team RulesetTeam
Reference to the team that owns the ruleset. If none is specified, only admins have access.
Type string
Type of ruleset. Currently only sets to global.
name string
Name of the ruleset.
routingKeys string[]
Routing keys routed to this ruleset.
team RulesetTeamArgs
Reference to the team that owns the ruleset. If none is specified, only admins have access.
type string
Type of ruleset. Currently only sets to global.
name str
Name of the ruleset.
routing_keys Sequence[str]
Routing keys routed to this ruleset.
team RulesetTeamArgs
Reference to the team that owns the ruleset. If none is specified, only admins have access.
type str
Type of ruleset. Currently only sets to global.

Supporting Types

RulesetTeam

Id string
The ID of the ruleset.
Id string
The ID of the ruleset.
id string
The ID of the ruleset.
id str
The ID of the ruleset.

Import

Rulesets can be imported using the id, e.g.

 $ pulumi import pagerduty:index/ruleset:Ruleset main 19acac92-027a-4ea0-b06c-bbf516519601

Package Details

Repository
https://github.com/pulumi/pulumi-pagerduty
License
Apache-2.0
Notes
This Pulumi package is based on the pagerduty Terraform Provider.