1. Packages
  2. PagerDuty
  3. API Docs
  4. Ruleset
PagerDuty v4.13.2 published on Thursday, Jun 27, 2024 by Pulumi

pagerduty.Ruleset

Explore with Pulumi AI

pagerduty logo
PagerDuty v4.13.2 published on Thursday, Jun 27, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as pagerduty from "@pulumi/pagerduty";
    
    const foo = new pagerduty.Team("foo", {name: "Engineering (Seattle)"});
    const fooRuleset = new pagerduty.Ruleset("foo", {
        name: "Primary Ruleset",
        team: {
            id: foo.id,
        },
    });
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    foo = pagerduty.Team("foo", name="Engineering (Seattle)")
    foo_ruleset = pagerduty.Ruleset("foo",
        name="Primary Ruleset",
        team=pagerduty.RulesetTeamArgs(
            id=foo.id,
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		foo, err := pagerduty.NewTeam(ctx, "foo", &pagerduty.TeamArgs{
    			Name: pulumi.String("Engineering (Seattle)"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pagerduty.NewRuleset(ctx, "foo", &pagerduty.RulesetArgs{
    			Name: pulumi.String("Primary Ruleset"),
    			Team: &pagerduty.RulesetTeamArgs{
    				Id: foo.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Pagerduty = Pulumi.Pagerduty;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Pagerduty.Team("foo", new()
        {
            Name = "Engineering (Seattle)",
        });
    
        var fooRuleset = new Pagerduty.Ruleset("foo", new()
        {
            Name = "Primary Ruleset",
            Team = new Pagerduty.Inputs.RulesetTeamArgs
            {
                Id = foo.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.pagerduty.Team;
    import com.pulumi.pagerduty.TeamArgs;
    import com.pulumi.pagerduty.Ruleset;
    import com.pulumi.pagerduty.RulesetArgs;
    import com.pulumi.pagerduty.inputs.RulesetTeamArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var foo = new Team("foo", TeamArgs.builder()
                .name("Engineering (Seattle)")
                .build());
    
            var fooRuleset = new Ruleset("fooRuleset", RulesetArgs.builder()
                .name("Primary Ruleset")
                .team(RulesetTeamArgs.builder()
                    .id(foo.id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      foo:
        type: pagerduty:Team
        properties:
          name: Engineering (Seattle)
      fooRuleset:
        type: pagerduty:Ruleset
        name: foo
        properties:
          name: Primary Ruleset
          team:
            id: ${foo.id}
    

    Create Ruleset Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

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

    Parameters

    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.
    name String
    The unique name of the resource.
    args RulesetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var rulesetResource = new Pagerduty.Ruleset("rulesetResource", new()
    {
        Name = "string",
        Team = new Pagerduty.Inputs.RulesetTeamArgs
        {
            Id = "string",
        },
    });
    
    example, err := pagerduty.NewRuleset(ctx, "rulesetResource", &pagerduty.RulesetArgs{
    	Name: pulumi.String("string"),
    	Team: &pagerduty.RulesetTeamArgs{
    		Id: pulumi.String("string"),
    	},
    })
    
    var rulesetResource = new Ruleset("rulesetResource", RulesetArgs.builder()
        .name("string")
        .team(RulesetTeamArgs.builder()
            .id("string")
            .build())
        .build());
    
    ruleset_resource = pagerduty.Ruleset("rulesetResource",
        name="string",
        team=pagerduty.RulesetTeamArgs(
            id="string",
        ))
    
    const rulesetResource = new pagerduty.Ruleset("rulesetResource", {
        name: "string",
        team: {
            id: "string",
        },
    });
    
    type: pagerduty:Ruleset
    properties:
        name: string
        team:
            id: string
    

    Ruleset Resource Properties

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

    Inputs

    The Ruleset resource accepts the following input properties:

    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 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 RulesetTeam
    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.
    name String
    Name of the ruleset.
    team Property Map
    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 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 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.
    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.

    Look up 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)
    public static Ruleset get(String name, Output<String> id, RulesetState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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 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 String
    Name of the ruleset.
    routingKeys List<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 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 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.
    name String
    Name of the ruleset.
    routingKeys List<String>
    Routing keys routed to this ruleset.
    team Property Map
    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.

    Supporting Types

    RulesetTeam, RulesetTeamArgs

    Id string
    The ID of the ruleset.
    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.
    id String
    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
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    PagerDuty pulumi/pulumi-pagerduty
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the pagerduty Terraform Provider.
    pagerduty logo
    PagerDuty v4.13.2 published on Thursday, Jun 27, 2024 by Pulumi