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

pagerduty.IncidentWorkflow

Explore with Pulumi AI

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

    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("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",
        )])
    
    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, "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
    	})
    }
    
    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 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());
    
        }
    }
    
    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

    new IncidentWorkflow(name: string, args?: IncidentWorkflowArgs, opts?: CustomResourceOptions);
    @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)
    @overload
    def IncidentWorkflow(resource_name: str,
                         args: Optional[IncidentWorkflowArgs] = None,
                         opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    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)
    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:
    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.
    InlineStepsInputs List<IncidentWorkflowStepInlineStepsInput>
    The list of inputs that contain a series of inline steps for the workflow action.
    Inputs List<IncidentWorkflowStepInput>
    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.
    InlineStepsInputs []IncidentWorkflowStepInlineStepsInput
    The list of inputs that contain a series of inline steps for the workflow action.
    Inputs []IncidentWorkflowStepInputType
    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.
    inlineStepsInputs List<IncidentWorkflowStepInlineStepsInput>
    The list of inputs that contain a series of inline steps for the workflow action.
    inputs List<IncidentWorkflowStepInput>
    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.
    inlineStepsInputs IncidentWorkflowStepInlineStepsInput[]
    The list of inputs that contain a series of inline steps for the workflow action.
    inputs IncidentWorkflowStepInput[]
    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_inputs Sequence[IncidentWorkflowStepInlineStepsInput]
    The list of inputs that contain a series of inline steps for the workflow action.
    inputs Sequence[IncidentWorkflowStepInput]
    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.
    inlineStepsInputs List<Property Map>
    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<IncidentWorkflowStepInlineStepsInputStep>
    The inline steps of the input. An inline step adheres to the step schema described above.
    Name string
    The name of the input.
    Steps []IncidentWorkflowStepInlineStepsInputStep
    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<IncidentWorkflowStepInlineStepsInputStep>
    The inline steps of the input. An inline step adheres to the step schema described above.
    name string
    The name of the input.
    steps IncidentWorkflowStepInlineStepsInputStep[]
    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[IncidentWorkflowStepInlineStepsInputStep]
    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<IncidentWorkflowStepInlineStepsInputStepInput>
    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 []IncidentWorkflowStepInlineStepsInputStepInputType
    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<IncidentWorkflowStepInlineStepsInputStepInput>
    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 IncidentWorkflowStepInlineStepsInputStepInput[]
    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[IncidentWorkflowStepInlineStepsInputStepInput]
    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

    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

    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
    

    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