1. Packages
  2. Packages
  3. Pagerduty Provider
  4. API Docs
  5. IncidentWorkflow
Viewing docs for PagerDuty v3.11.2 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
pagerduty logo
Viewing docs for PagerDuty v3.11.2 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    An Incident Workflow is a series of steps which can be executed on an incident.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Pagerduty = Pulumi.Pagerduty;
    
    return await Deployment.RunAsync(() => 
    {
        var myFirstWorkflow = new Pagerduty.IncidentWorkflow("myFirstWorkflow", new()
        {
            Description = "This Incident Workflow is an example",
            Steps = new[]
            {
                new Pagerduty.Inputs.IncidentWorkflowStepArgs
                {
                    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}}",
                        },
                    },
                    Name = "Send Status Update",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-pagerduty/sdk/v3/go/pagerduty"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := pagerduty.NewIncidentWorkflow(ctx, "myFirstWorkflow", &pagerduty.IncidentWorkflowArgs{
    			Description: pulumi.String("This Incident Workflow is an example"),
    			Steps: pagerduty.IncidentWorkflowStepArray{
    				&pagerduty.IncidentWorkflowStepArgs{
    					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}}"),
    						},
    					},
    					Name: pulumi.String("Send Status Update"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()        
                .description("This Incident Workflow is an example")
                .steps(IncidentWorkflowStepArgs.builder()
                    .action("pagerduty.com:incident-workflows:send-status-update:1")
                    .inputs(IncidentWorkflowStepInputArgs.builder()
                        .name("Message")
                        .value("Example status message sent on {{current_date}}")
                        .build())
                    .name("Send Status Update")
                    .build())
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as pagerduty from "@pulumi/pagerduty";
    
    const myFirstWorkflow = new pagerduty.IncidentWorkflow("myFirstWorkflow", {
        description: "This Incident Workflow is an example",
        steps: [{
            action: "pagerduty.com:incident-workflows:send-status-update:1",
            inputs: [{
                name: "Message",
                value: "Example status message sent on {{current_date}}",
            }],
            name: "Send Status Update",
        }],
    });
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    my_first_workflow = pagerduty.IncidentWorkflow("myFirstWorkflow",
        description="This Incident Workflow is an example",
        steps=[pagerduty.IncidentWorkflowStepArgs(
            action="pagerduty.com:incident-workflows:send-status-update:1",
            inputs=[pagerduty.IncidentWorkflowStepInputArgs(
                name="Message",
                value="Example status message sent on {{current_date}}",
            )],
            name="Send Status Update",
        )])
    
    resources:
      myFirstWorkflow:
        type: pagerduty:IncidentWorkflow
        properties:
          description: This Incident Workflow is an example
          steps:
            - action: pagerduty.com:incident-workflows:send-status-update:1
              inputs:
                - name: Message
                  value: Example status message sent on {{current_date}}
              name: Send Status Update
    

    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",
                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"),
    			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")
            .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",
            "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",
            inputs: [{
                name: "string",
                value: "string",
                generated: false,
            }],
        }],
        team: "string",
    });
    
    type: pagerduty:IncidentWorkflow
    properties:
        description: string
        name: string
        steps:
            - action: string
              id: 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<IncidentWorkflowStep>
    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 []IncidentWorkflowStepArgs
    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<IncidentWorkflowStep>
    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 IncidentWorkflowStep[]
    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[IncidentWorkflowStepArgs]
    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)
    resources:  _:    type: pagerduty:IncidentWorkflow    get:      id: ${id}
    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:
    Description string
    The description of the workflow.
    Name string
    The name of the workflow.
    Steps List<IncidentWorkflowStep>
    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 []IncidentWorkflowStepArgs
    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<IncidentWorkflowStep>
    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 IncidentWorkflowStep[]
    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[IncidentWorkflowStepArgs]
    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.
    Inputs List<IncidentWorkflowStepInput>
    The list of 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.
    Inputs []IncidentWorkflowStepInputType
    The list of 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.
    inputs List<IncidentWorkflowStepInput>
    The list of 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.
    inputs IncidentWorkflowStepInput[]
    The list of 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.
    inputs Sequence[IncidentWorkflowStepInput]
    The list of 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.
    inputs List<Property Map>
    The list of inputs for the workflow action.

    IncidentWorkflowStepInput, IncidentWorkflowStepInputArgs

    Name string
    The name of the input.
    Value string
    The value of the input.
    Generated bool
    Name string
    The name of the input.
    Value string
    The value of the input.
    Generated bool
    name String
    The name of the input.
    value String
    The value of the input.
    generated Boolean
    name string
    The name of the input.
    value string
    The value of the input.
    generated boolean
    name str
    The name of the input.
    value str
    The value of the input.
    generated bool
    name String
    The name of the input.
    value String
    The value of the input.
    generated Boolean

    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.
    pagerduty logo
    Viewing docs for PagerDuty v3.11.2 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.