1. Packages
  2. PagerDuty
  3. API Docs
  4. Ruleset
PagerDuty v4.10.1 published on Wednesday, Mar 27, 2024 by Pulumi

pagerduty.Ruleset

Explore with Pulumi AI

pagerduty logo
PagerDuty v4.10.1 published on Wednesday, Mar 27, 2024 by Pulumi

    Example Usage

    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,
    }});
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    foo_team = pagerduty.Team("fooTeam")
    foo_ruleset = pagerduty.Ruleset("fooRuleset", team=pagerduty.RulesetTeamArgs(
        id=foo_team.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 {
    		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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Pagerduty = Pulumi.Pagerduty;
    
    return await Deployment.RunAsync(() => 
    {
        var fooTeam = new Pagerduty.Team("fooTeam");
    
        var fooRuleset = new Pagerduty.Ruleset("fooRuleset", new()
        {
            Team = new Pagerduty.Inputs.RulesetTeamArgs
            {
                Id = fooTeam.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.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 fooTeam = new Team("fooTeam");
    
            var fooRuleset = new Ruleset("fooRuleset", RulesetArgs.builder()        
                .team(RulesetTeamArgs.builder()
                    .id(fooTeam.id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      fooTeam:
        type: pagerduty:Team
      fooRuleset:
        type: pagerduty:Ruleset
        properties:
          team:
            id: ${fooTeam.id}
    

    Create 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)
    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.
    
    
    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.

    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
    

    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.10.1 published on Wednesday, Mar 27, 2024 by Pulumi