pagerduty.EscalationPolicy
Explore with Pulumi AI
An escalation policy determines what user or schedule will be notified first, second, and so on when an incident is triggered. Escalation policies are used by one or more services.
Example Usage
Coming soon!
Coming soon!
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.User;
import com.pulumi.pagerduty.UserArgs;
import com.pulumi.pagerduty.EscalationPolicy;
import com.pulumi.pagerduty.EscalationPolicyArgs;
import com.pulumi.pagerduty.inputs.EscalationPolicyRuleArgs;
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 exampleTeam = new Team("exampleTeam", TeamArgs.builder()
.description("All engineering")
.build());
var exampleUser = new User("exampleUser", UserArgs.builder()
.email("125.greenholt.earline@graham.name")
.teams(exampleTeam.id())
.build());
var exampleEscalationPolicy = new EscalationPolicy("exampleEscalationPolicy", EscalationPolicyArgs.builder()
.numLoops(2)
.teams(exampleTeam.id())
.rules(EscalationPolicyRuleArgs.builder()
.escalationDelayInMinutes(10)
.targets(
EscalationPolicyRuleTargetArgs.builder()
.type("user_reference")
.id(exampleUser.id())
.build(),
EscalationPolicyRuleTargetArgs.builder()
.type("user_reference")
.id(pagerduty_user.example2().id())
.build())
.build())
.build());
}
}
Coming soon!
Coming soon!
resources:
exampleTeam:
type: pagerduty:Team
properties:
description: All engineering
exampleUser:
type: pagerduty:User
properties:
email: 125.greenholt.earline@graham.name
teams:
- ${exampleTeam.id}
exampleEscalationPolicy:
type: pagerduty:EscalationPolicy
properties:
numLoops: 2
teams:
- ${exampleTeam.id}
rules:
- escalationDelayInMinutes: 10
targets:
- type: user_reference
id: ${exampleUser.id}
- type: user_reference
id: ${pagerduty_user.example2.id}
Create EscalationPolicy Resource
new EscalationPolicy(name: string, args: EscalationPolicyArgs, opts?: CustomResourceOptions);
@overload
def EscalationPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
num_loops: Optional[int] = None,
rules: Optional[Sequence[EscalationPolicyRuleArgs]] = None,
teams: Optional[str] = None)
@overload
def EscalationPolicy(resource_name: str,
args: EscalationPolicyArgs,
opts: Optional[ResourceOptions] = None)
func NewEscalationPolicy(ctx *Context, name string, args EscalationPolicyArgs, opts ...ResourceOption) (*EscalationPolicy, error)
public EscalationPolicy(string name, EscalationPolicyArgs args, CustomResourceOptions? opts = null)
public EscalationPolicy(String name, EscalationPolicyArgs args)
public EscalationPolicy(String name, EscalationPolicyArgs args, CustomResourceOptions options)
type: pagerduty:EscalationPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EscalationPolicyArgs
- 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 EscalationPolicyArgs
- 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 EscalationPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EscalationPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EscalationPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
EscalationPolicy 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 EscalationPolicy resource accepts the following input properties:
- Rules
List<Escalation
Policy Rule> An Escalation rule block. Escalation rules documented below.
- Description string
- Name string
The name of the escalation policy.
- Num
Loops int The number of times the escalation policy will repeat after reaching the end of its escalation.
- Teams string
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
- Rules
[]Escalation
Policy Rule Args An Escalation rule block. Escalation rules documented below.
- Description string
- Name string
The name of the escalation policy.
- Num
Loops int The number of times the escalation policy will repeat after reaching the end of its escalation.
- Teams string
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
- rules
List<Escalation
Policy Rule> An Escalation rule block. Escalation rules documented below.
- description String
- name String
The name of the escalation policy.
- num
Loops Integer The number of times the escalation policy will repeat after reaching the end of its escalation.
- teams String
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
- rules
Escalation
Policy Rule[] An Escalation rule block. Escalation rules documented below.
- description string
- name string
The name of the escalation policy.
- num
Loops number The number of times the escalation policy will repeat after reaching the end of its escalation.
- teams string
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
- rules
Sequence[Escalation
Policy Rule Args] An Escalation rule block. Escalation rules documented below.
- description str
- name str
The name of the escalation policy.
- num_
loops int The number of times the escalation policy will repeat after reaching the end of its escalation.
- teams str
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
- rules List<Property Map>
An Escalation rule block. Escalation rules documented below.
- description String
- name String
The name of the escalation policy.
- num
Loops Number The number of times the escalation policy will repeat after reaching the end of its escalation.
- teams String
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
Outputs
All input properties are implicitly available as output properties. Additionally, the EscalationPolicy resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing EscalationPolicy Resource
Get an existing EscalationPolicy 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?: EscalationPolicyState, opts?: CustomResourceOptions): EscalationPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
num_loops: Optional[int] = None,
rules: Optional[Sequence[EscalationPolicyRuleArgs]] = None,
teams: Optional[str] = None) -> EscalationPolicy
func GetEscalationPolicy(ctx *Context, name string, id IDInput, state *EscalationPolicyState, opts ...ResourceOption) (*EscalationPolicy, error)
public static EscalationPolicy Get(string name, Input<string> id, EscalationPolicyState? state, CustomResourceOptions? opts = null)
public static EscalationPolicy get(String name, Output<String> id, EscalationPolicyState 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.
- Description string
- Name string
The name of the escalation policy.
- Num
Loops int The number of times the escalation policy will repeat after reaching the end of its escalation.
- Rules
List<Escalation
Policy Rule> An Escalation rule block. Escalation rules documented below.
- Teams string
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
- Description string
- Name string
The name of the escalation policy.
- Num
Loops int The number of times the escalation policy will repeat after reaching the end of its escalation.
- Rules
[]Escalation
Policy Rule Args An Escalation rule block. Escalation rules documented below.
- Teams string
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
- description String
- name String
The name of the escalation policy.
- num
Loops Integer The number of times the escalation policy will repeat after reaching the end of its escalation.
- rules
List<Escalation
Policy Rule> An Escalation rule block. Escalation rules documented below.
- teams String
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
- description string
- name string
The name of the escalation policy.
- num
Loops number The number of times the escalation policy will repeat after reaching the end of its escalation.
- rules
Escalation
Policy Rule[] An Escalation rule block. Escalation rules documented below.
- teams string
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
- description str
- name str
The name of the escalation policy.
- num_
loops int The number of times the escalation policy will repeat after reaching the end of its escalation.
- rules
Sequence[Escalation
Policy Rule Args] An Escalation rule block. Escalation rules documented below.
- teams str
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
- description String
- name String
The name of the escalation policy.
- num
Loops Number The number of times the escalation policy will repeat after reaching the end of its escalation.
- rules List<Property Map>
An Escalation rule block. Escalation rules documented below.
- teams String
Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the
teams
ability to use this parameter.
Supporting Types
EscalationPolicyRule, EscalationPolicyRuleArgs
- Escalation
Delay intIn Minutes The number of minutes before an unacknowledged incident escalates away from this rule.
- Targets
List<Escalation
Policy Rule Target> - Id string
A target ID
- Escalation
Delay intIn Minutes The number of minutes before an unacknowledged incident escalates away from this rule.
- Targets
[]Escalation
Policy Rule Target - Id string
A target ID
- escalation
Delay IntegerIn Minutes The number of minutes before an unacknowledged incident escalates away from this rule.
- targets
List<Escalation
Policy Rule Target> - id String
A target ID
- escalation
Delay numberIn Minutes The number of minutes before an unacknowledged incident escalates away from this rule.
- targets
Escalation
Policy Rule Target[] - id string
A target ID
- escalation_
delay_ intin_ minutes The number of minutes before an unacknowledged incident escalates away from this rule.
- targets
Sequence[Escalation
Policy Rule Target] - id str
A target ID
- escalation
Delay NumberIn Minutes The number of minutes before an unacknowledged incident escalates away from this rule.
- targets List<Property Map>
- id String
A target ID
EscalationPolicyRuleTarget, EscalationPolicyRuleTargetArgs
Import
Escalation policies can be imported using the id
, e.g.
$ pulumi import pagerduty:index/escalationPolicy:EscalationPolicy main PLBP09X
Package Details
- Repository
- PagerDuty pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
pagerduty
Terraform Provider.