pagerduty.IncidentWorkflow
Explore with Pulumi AI
An Incident Workflow is a series of steps which can be executed on an incident.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const myFirstWorkflow = new pagerduty.IncidentWorkflow("my_first_workflow", {
name: "Example Incident Workflow",
description: "This Incident Workflow is an example",
steps: [{
name: "Send Status Update",
action: "pagerduty.com:incident-workflows:send-status-update:1",
inputs: [{
name: "Message",
value: "Example status message sent on {{current_date}}",
}],
}],
});
import pulumi
import pulumi_pagerduty as pagerduty
my_first_workflow = pagerduty.IncidentWorkflow("my_first_workflow",
name="Example Incident Workflow",
description="This Incident Workflow is an example",
steps=[{
"name": "Send Status Update",
"action": "pagerduty.com:incident-workflows:send-status-update:1",
"inputs": [{
"name": "Message",
"value": "Example status message sent on {{current_date}}",
}],
}])
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 {
_, err := pagerduty.NewIncidentWorkflow(ctx, "my_first_workflow", &pagerduty.IncidentWorkflowArgs{
Name: pulumi.String("Example Incident Workflow"),
Description: pulumi.String("This Incident Workflow is an example"),
Steps: pagerduty.IncidentWorkflowStepArray{
&pagerduty.IncidentWorkflowStepArgs{
Name: pulumi.String("Send Status Update"),
Action: pulumi.String("pagerduty.com:incident-workflows:send-status-update:1"),
Inputs: pagerduty.IncidentWorkflowStepInputTypeArray{
&pagerduty.IncidentWorkflowStepInputTypeArgs{
Name: pulumi.String("Message"),
Value: pulumi.String("Example status message sent on {{current_date}}"),
},
},
},
},
})
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 myFirstWorkflow = new Pagerduty.IncidentWorkflow("my_first_workflow", new()
{
Name = "Example Incident Workflow",
Description = "This Incident Workflow is an example",
Steps = new[]
{
new Pagerduty.Inputs.IncidentWorkflowStepArgs
{
Name = "Send Status Update",
Action = "pagerduty.com:incident-workflows:send-status-update:1",
Inputs = new[]
{
new Pagerduty.Inputs.IncidentWorkflowStepInputArgs
{
Name = "Message",
Value = "Example status message sent on {{current_date}}",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.pagerduty.IncidentWorkflow;
import com.pulumi.pagerduty.IncidentWorkflowArgs;
import com.pulumi.pagerduty.inputs.IncidentWorkflowStepArgs;
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 myFirstWorkflow = new IncidentWorkflow("myFirstWorkflow", IncidentWorkflowArgs.builder()
.name("Example Incident Workflow")
.description("This Incident Workflow is an example")
.steps(IncidentWorkflowStepArgs.builder()
.name("Send Status Update")
.action("pagerduty.com:incident-workflows:send-status-update:1")
.inputs(IncidentWorkflowStepInputArgs.builder()
.name("Message")
.value("Example status message sent on {{current_date}}")
.build())
.build())
.build());
}
}
resources:
myFirstWorkflow:
type: pagerduty:IncidentWorkflow
name: my_first_workflow
properties:
name: Example Incident Workflow
description: This Incident Workflow is an example
steps:
- name: Send Status Update
action: pagerduty.com:incident-workflows:send-status-update:1
inputs:
- name: Message
value: Example status message sent on {{current_date}}
Create IncidentWorkflow Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IncidentWorkflow(name: string, args?: IncidentWorkflowArgs, opts?: CustomResourceOptions);
@overload
def IncidentWorkflow(resource_name: str,
args: Optional[IncidentWorkflowArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def IncidentWorkflow(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
steps: Optional[Sequence[IncidentWorkflowStepArgs]] = None,
team: Optional[str] = None)
func NewIncidentWorkflow(ctx *Context, name string, args *IncidentWorkflowArgs, opts ...ResourceOption) (*IncidentWorkflow, error)
public IncidentWorkflow(string name, IncidentWorkflowArgs? args = null, CustomResourceOptions? opts = null)
public IncidentWorkflow(String name, IncidentWorkflowArgs args)
public IncidentWorkflow(String name, IncidentWorkflowArgs args, CustomResourceOptions options)
type: pagerduty:IncidentWorkflow
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 IncidentWorkflowArgs
- 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 IncidentWorkflowArgs
- 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 IncidentWorkflowArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IncidentWorkflowArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IncidentWorkflowArgs
- 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 incidentWorkflowResource = new Pagerduty.IncidentWorkflow("incidentWorkflowResource", new()
{
Description = "string",
Name = "string",
Steps = new[]
{
new Pagerduty.Inputs.IncidentWorkflowStepArgs
{
Action = "string",
Name = "string",
Id = "string",
InlineStepsInputs = new[]
{
new Pagerduty.Inputs.IncidentWorkflowStepInlineStepsInputArgs
{
Name = "string",
Steps = new[]
{
new Pagerduty.Inputs.IncidentWorkflowStepInlineStepsInputStepArgs
{
Action = "string",
Name = "string",
Inputs = new[]
{
new Pagerduty.Inputs.IncidentWorkflowStepInlineStepsInputStepInputArgs
{
Name = "string",
Value = "string",
Generated = false,
},
},
},
},
},
},
Inputs = new[]
{
new Pagerduty.Inputs.IncidentWorkflowStepInputArgs
{
Name = "string",
Value = "string",
Generated = false,
},
},
},
},
Team = "string",
});
example, err := pagerduty.NewIncidentWorkflow(ctx, "incidentWorkflowResource", &pagerduty.IncidentWorkflowArgs{
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Steps: pagerduty.IncidentWorkflowStepArray{
&pagerduty.IncidentWorkflowStepArgs{
Action: pulumi.String("string"),
Name: pulumi.String("string"),
Id: pulumi.String("string"),
InlineStepsInputs: pagerduty.IncidentWorkflowStepInlineStepsInputArray{
&pagerduty.IncidentWorkflowStepInlineStepsInputArgs{
Name: pulumi.String("string"),
Steps: pagerduty.IncidentWorkflowStepInlineStepsInputStepArray{
&pagerduty.IncidentWorkflowStepInlineStepsInputStepArgs{
Action: pulumi.String("string"),
Name: pulumi.String("string"),
Inputs: pagerduty.IncidentWorkflowStepInlineStepsInputStepInputTypeArray{
&pagerduty.IncidentWorkflowStepInlineStepsInputStepInputTypeArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
Generated: pulumi.Bool(false),
},
},
},
},
},
},
Inputs: pagerduty.IncidentWorkflowStepInputTypeArray{
&pagerduty.IncidentWorkflowStepInputTypeArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
Generated: pulumi.Bool(false),
},
},
},
},
Team: pulumi.String("string"),
})
var incidentWorkflowResource = new IncidentWorkflow("incidentWorkflowResource", IncidentWorkflowArgs.builder()
.description("string")
.name("string")
.steps(IncidentWorkflowStepArgs.builder()
.action("string")
.name("string")
.id("string")
.inlineStepsInputs(IncidentWorkflowStepInlineStepsInputArgs.builder()
.name("string")
.steps(IncidentWorkflowStepInlineStepsInputStepArgs.builder()
.action("string")
.name("string")
.inputs(IncidentWorkflowStepInlineStepsInputStepInputArgs.builder()
.name("string")
.value("string")
.generated(false)
.build())
.build())
.build())
.inputs(IncidentWorkflowStepInputArgs.builder()
.name("string")
.value("string")
.generated(false)
.build())
.build())
.team("string")
.build());
incident_workflow_resource = pagerduty.IncidentWorkflow("incidentWorkflowResource",
description="string",
name="string",
steps=[{
"action": "string",
"name": "string",
"id": "string",
"inline_steps_inputs": [{
"name": "string",
"steps": [{
"action": "string",
"name": "string",
"inputs": [{
"name": "string",
"value": "string",
"generated": False,
}],
}],
}],
"inputs": [{
"name": "string",
"value": "string",
"generated": False,
}],
}],
team="string")
const incidentWorkflowResource = new pagerduty.IncidentWorkflow("incidentWorkflowResource", {
description: "string",
name: "string",
steps: [{
action: "string",
name: "string",
id: "string",
inlineStepsInputs: [{
name: "string",
steps: [{
action: "string",
name: "string",
inputs: [{
name: "string",
value: "string",
generated: false,
}],
}],
}],
inputs: [{
name: "string",
value: "string",
generated: false,
}],
}],
team: "string",
});
type: pagerduty:IncidentWorkflow
properties:
description: string
name: string
steps:
- action: string
id: string
inlineStepsInputs:
- name: string
steps:
- action: string
inputs:
- generated: false
name: string
value: string
name: string
inputs:
- generated: false
name: string
value: string
name: string
team: string
IncidentWorkflow 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 IncidentWorkflow resource accepts the following input properties:
- Description string
- The description of the workflow.
- Name string
- The name of the workflow.
- Steps
List<Incident
Workflow Step> - The steps in the workflow.
- Team string
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
- Description string
- The description of the workflow.
- Name string
- The name of the workflow.
- Steps
[]Incident
Workflow Step Args - The steps in the workflow.
- Team string
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
- description String
- The description of the workflow.
- name String
- The name of the workflow.
- steps
List<Incident
Workflow Step> - The steps in the workflow.
- team String
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
- description string
- The description of the workflow.
- name string
- The name of the workflow.
- steps
Incident
Workflow Step[] - The steps in the workflow.
- team string
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
- description str
- The description of the workflow.
- name str
- The name of the workflow.
- steps
Sequence[Incident
Workflow Step Args] - The steps in the workflow.
- team str
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
- description String
- The description of the workflow.
- name String
- The name of the workflow.
- steps List<Property Map>
- The steps in the workflow.
- team String
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
Outputs
All input properties are implicitly available as output properties. Additionally, the IncidentWorkflow 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 IncidentWorkflow Resource
Get an existing IncidentWorkflow 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?: IncidentWorkflowState, opts?: CustomResourceOptions): IncidentWorkflow
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
steps: Optional[Sequence[IncidentWorkflowStepArgs]] = None,
team: Optional[str] = None) -> IncidentWorkflow
func GetIncidentWorkflow(ctx *Context, name string, id IDInput, state *IncidentWorkflowState, opts ...ResourceOption) (*IncidentWorkflow, error)
public static IncidentWorkflow Get(string name, Input<string> id, IncidentWorkflowState? state, CustomResourceOptions? opts = null)
public static IncidentWorkflow get(String name, Output<String> id, IncidentWorkflowState 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
- The description of the workflow.
- Name string
- The name of the workflow.
- Steps
List<Incident
Workflow Step> - The steps in the workflow.
- Team string
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
- Description string
- The description of the workflow.
- Name string
- The name of the workflow.
- Steps
[]Incident
Workflow Step Args - The steps in the workflow.
- Team string
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
- description String
- The description of the workflow.
- name String
- The name of the workflow.
- steps
List<Incident
Workflow Step> - The steps in the workflow.
- team String
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
- description string
- The description of the workflow.
- name string
- The name of the workflow.
- steps
Incident
Workflow Step[] - The steps in the workflow.
- team string
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
- description str
- The description of the workflow.
- name str
- The name of the workflow.
- steps
Sequence[Incident
Workflow Step Args] - The steps in the workflow.
- team str
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
- description String
- The description of the workflow.
- name String
- The name of the workflow.
- steps List<Property Map>
- The steps in the workflow.
- team String
- A team ID. If specified then workflow edit permissions will be scoped to members of this team.
Supporting Types
IncidentWorkflowStep, IncidentWorkflowStepArgs
- Action string
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- Name string
- The name of the workflow step.
- Id string
- The ID of the incident workflow.
- Inline
Steps List<IncidentInputs Workflow Step Inline Steps Input> - The list of inputs that contain a series of inline steps for the workflow action.
- Inputs
List<Incident
Workflow Step Input> - The list of standard inputs for the workflow action.
- Action string
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- Name string
- The name of the workflow step.
- Id string
- The ID of the incident workflow.
- Inline
Steps []IncidentInputs Workflow Step Inline Steps Input - The list of inputs that contain a series of inline steps for the workflow action.
- Inputs
[]Incident
Workflow Step Input Type - The list of standard inputs for the workflow action.
- action String
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- name String
- The name of the workflow step.
- id String
- The ID of the incident workflow.
- inline
Steps List<IncidentInputs Workflow Step Inline Steps Input> - The list of inputs that contain a series of inline steps for the workflow action.
- inputs
List<Incident
Workflow Step Input> - The list of standard inputs for the workflow action.
- action string
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- name string
- The name of the workflow step.
- id string
- The ID of the incident workflow.
- inline
Steps IncidentInputs Workflow Step Inline Steps Input[] - The list of inputs that contain a series of inline steps for the workflow action.
- inputs
Incident
Workflow Step Input[] - The list of standard inputs for the workflow action.
- action str
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- name str
- The name of the workflow step.
- id str
- The ID of the incident workflow.
- inline_
steps_ Sequence[Incidentinputs Workflow Step Inline Steps Input] - The list of inputs that contain a series of inline steps for the workflow action.
- inputs
Sequence[Incident
Workflow Step Input] - The list of standard inputs for the workflow action.
- action String
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- name String
- The name of the workflow step.
- id String
- The ID of the incident workflow.
- inline
Steps List<Property Map>Inputs - The list of inputs that contain a series of inline steps for the workflow action.
- inputs List<Property Map>
- The list of standard inputs for the workflow action.
IncidentWorkflowStepInlineStepsInput, IncidentWorkflowStepInlineStepsInputArgs
- Name string
- The name of the input.
- Steps
List<Incident
Workflow Step Inline Steps Input Step> - The inline steps of the input. An inline step adheres to the step schema described above.
- Name string
- The name of the input.
- Steps
[]Incident
Workflow Step Inline Steps Input Step - The inline steps of the input. An inline step adheres to the step schema described above.
- name String
- The name of the input.
- steps
List<Incident
Workflow Step Inline Steps Input Step> - The inline steps of the input. An inline step adheres to the step schema described above.
- name string
- The name of the input.
- steps
Incident
Workflow Step Inline Steps Input Step[] - The inline steps of the input. An inline step adheres to the step schema described above.
- name str
- The name of the input.
- steps
Sequence[Incident
Workflow Step Inline Steps Input Step] - The inline steps of the input. An inline step adheres to the step schema described above.
- name String
- The name of the input.
- steps List<Property Map>
- The inline steps of the input. An inline step adheres to the step schema described above.
IncidentWorkflowStepInlineStepsInputStep, IncidentWorkflowStepInlineStepsInputStepArgs
- Action string
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- Name string
- The name of the workflow step.
- Inputs
List<Incident
Workflow Step Inline Steps Input Step Input> - The list of standard inputs for the workflow action.
- Action string
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- Name string
- The name of the workflow step.
- Inputs
[]Incident
Workflow Step Inline Steps Input Step Input Type - The list of standard inputs for the workflow action.
- action String
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- name String
- The name of the workflow step.
- inputs
List<Incident
Workflow Step Inline Steps Input Step Input> - The list of standard inputs for the workflow action.
- action string
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- name string
- The name of the workflow step.
- inputs
Incident
Workflow Step Inline Steps Input Step Input[] - The list of standard inputs for the workflow action.
- action str
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- name str
- The name of the workflow step.
- inputs
Sequence[Incident
Workflow Step Inline Steps Input Step Input] - The list of standard inputs for the workflow action.
- action String
- The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.
- name String
- The name of the workflow step.
- inputs List<Property Map>
- The list of standard inputs for the workflow action.
IncidentWorkflowStepInlineStepsInputStepInput, IncidentWorkflowStepInlineStepsInputStepInputArgs
IncidentWorkflowStepInput, IncidentWorkflowStepInputArgs
Import
Incident workflows can be imported using the id
, e.g.
$ pulumi import pagerduty:index/incidentWorkflow:IncidentWorkflow major_incident_workflow PLBP09X
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.