GetPriority

Use this data source to get information about a specific priority that you can use for other PagerDuty resources.

Example Usage

using Pulumi;
using Pagerduty = Pulumi.Pagerduty;

class MyStack : Stack
{
    public MyStack()
    {
        var p1 = Output.Create(Pagerduty.GetPriority.InvokeAsync(new Pagerduty.GetPriorityArgs
        {
            Name = "P1",
        }));
        var fooRuleset = new Pagerduty.Ruleset("fooRuleset", new Pagerduty.RulesetArgs
        {
        });
        var fooRulesetRule = new Pagerduty.RulesetRule("fooRulesetRule", new Pagerduty.RulesetRuleArgs
        {
            Ruleset = fooRuleset.Id,
            Position = 0,
            Disabled = "false",
            Conditions = new Pagerduty.Inputs.RulesetRuleConditionsArgs
            {
                Operator = "and",
                Subconditions = 
                {
                    new Pagerduty.Inputs.RulesetRuleConditionsSubconditionArgs
                    {
                        Operator = "contains",
                        Parameter = 
                        {
                            
                            {
                                { "value", "disk space" },
                                { "path", "payload.summary" },
                            },
                        },
                    },
                    new Pagerduty.Inputs.RulesetRuleConditionsSubconditionArgs
                    {
                        Operator = "contains",
                        Parameter = 
                        {
                            
                            {
                                { "value", "db" },
                                { "path", "payload.source" },
                            },
                        },
                    },
                },
            },
            Actions = new Pagerduty.Inputs.RulesetRuleActionsArgs
            {
                Route = 
                {
                    
                    {
                        { "value", "P5DTL0K" },
                    },
                },
                Priority = 
                {
                    
                    {
                        { "value", pagerduty_priority.P1.Id },
                    },
                },
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_pagerduty as pagerduty

p1 = pagerduty.get_priority(name="P1")
foo_ruleset = pagerduty.Ruleset("fooRuleset")
foo_ruleset_rule = pagerduty.RulesetRule("fooRulesetRule",
    ruleset=foo_ruleset.id,
    position=0,
    disabled="false",
    conditions={
        "operator": "and",
        "subconditions": [
            {
                "operator": "contains",
                "parameter": [{
                    "value": "disk space",
                    "path": "payload.summary",
                }],
            },
            {
                "operator": "contains",
                "parameter": [{
                    "value": "db",
                    "path": "payload.source",
                }],
            },
        ],
    },
    actions={
        "route": [{
            "value": "P5DTL0K",
        }],
        "priority": [{
            "value": pagerduty_priority["p1"]["id"],
        }],
    })
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";

const p1 = pagerduty.getPriority({
    name: "P1",
});
const fooRuleset = new pagerduty.Ruleset("fooRuleset", {});
const fooRulesetRule = new pagerduty.RulesetRule("fooRulesetRule", {
    ruleset: fooRuleset.id,
    position: 0,
    disabled: "false",
    conditions: {
        operator: "and",
        subconditions: [
            {
                operator: "contains",
                parameter: [{
                    value: "disk space",
                    path: "payload.summary",
                }],
            },
            {
                operator: "contains",
                parameter: [{
                    value: "db",
                    path: "payload.source",
                }],
            },
        ],
    },
    actions: {
        route: [{
            value: "P5DTL0K",
        }],
        priority: [{
            value: pagerduty_priority.p1.id,
        }],
    },
});

Using GetPriority

function getPriority(args: GetPriorityArgs, opts?: InvokeOptions): Promise<GetPriorityResult>
function  get_priority(name=None, opts=None)
func GetPriority(ctx *Context, args *GetPriorityArgs, opts ...InvokeOption) (*GetPriorityResult, error)
public static class GetPriority {
    public static Task<GetPriorityResult> InvokeAsync(GetPriorityArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the priority to find in the PagerDuty API.

Name string

The name of the priority to find in the PagerDuty API.

name string

The name of the priority to find in the PagerDuty API.

name str

The name of the priority to find in the PagerDuty API.

GetPriority Result

The following output properties are available:

Description string

A description of the found priority.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the found priority.

Description string

A description of the found priority.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the found priority.

description string

A description of the found priority.

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the found priority.

description str

A description of the found priority.

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the found priority.

Package Details

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