pagerduty.Ruleset
Explore with Pulumi AI
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={
"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={
"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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Ruleset resource accepts the following input properties:
- Name string
- Name of the ruleset.
- Team
Ruleset
Team - Reference to the team that owns the ruleset. If none is specified, only admins have access.
- Name string
- Name of the ruleset.
- Team
Ruleset
Team Args - Reference to the team that owns the ruleset. If none is specified, only admins have access.
- name String
- Name of the ruleset.
- team
Ruleset
Team - Reference to the team that owns the ruleset. If none is specified, only admins have access.
- name string
- Name of the ruleset.
- team
Ruleset
Team - Reference to the team that owns the ruleset. If none is specified, only admins have access.
- name str
- Name of the ruleset.
- team
Ruleset
Team Args - 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.
- Routing
Keys 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.
- Routing
Keys []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.
- routing
Keys 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.
- routing
Keys 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.
- routing
Keys 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.
- Name string
- Name of the ruleset.
- Routing
Keys List<string> - Routing keys routed to this ruleset.
- Team
Ruleset
Team - 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.
- Routing
Keys []string - Routing keys routed to this ruleset.
- Team
Ruleset
Team Args - 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.
- routing
Keys List<String> - Routing keys routed to this ruleset.
- team
Ruleset
Team - 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.
- routing
Keys string[] - Routing keys routed to this ruleset.
- team
Ruleset
Team - 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
Ruleset
Team Args - 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.
- routing
Keys 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.