incident.IncidentRole
Explore with Pulumi AI
Manage incident roles.
During an incident, you can assign responders to one of the incident roles that are configured in your organisation settings.
Every organisation will have a special ’lead’ role, which signifies the incident lead or commander. This role cannot be deleted, but can be renamed in the incident.io dashboard.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as incident from "@pulumi/incident";
// Create a communications lead that is not required.
const comms = new incident.IncidentRole("comms", {
description: "Responsible for communications on behalf of the response team.",
instructions: "Manage internal and external communications on behalf of the response team.",
shortform: "comms",
});
import pulumi
import pulumi_incident as incident
# Create a communications lead that is not required.
comms = incident.IncidentRole("comms",
description="Responsible for communications on behalf of the response team.",
instructions="Manage internal and external communications on behalf of the response team.",
shortform="comms")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/incident/v5/incident"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a communications lead that is not required.
_, err := incident.NewIncidentRole(ctx, "comms", &incident.IncidentRoleArgs{
Description: pulumi.String("Responsible for communications on behalf of the response team."),
Instructions: pulumi.String("Manage internal and external communications on behalf of the response team."),
Shortform: pulumi.String("comms"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incident = Pulumi.Incident;
return await Deployment.RunAsync(() =>
{
// Create a communications lead that is not required.
var comms = new Incident.IncidentRole("comms", new()
{
Description = "Responsible for communications on behalf of the response team.",
Instructions = "Manage internal and external communications on behalf of the response team.",
Shortform = "comms",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incident.IncidentRole;
import com.pulumi.incident.IncidentRoleArgs;
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) {
// Create a communications lead that is not required.
var comms = new IncidentRole("comms", IncidentRoleArgs.builder()
.description("Responsible for communications on behalf of the response team.")
.instructions("Manage internal and external communications on behalf of the response team.")
.shortform("comms")
.build());
}
}
resources:
# Create a communications lead that is not required.
comms:
type: incident:IncidentRole
properties:
description: Responsible for communications on behalf of the response team.
instructions: Manage internal and external communications on behalf of the response team.
shortform: comms
Create IncidentRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IncidentRole(name: string, args: IncidentRoleArgs, opts?: CustomResourceOptions);
@overload
def IncidentRole(resource_name: str,
args: IncidentRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IncidentRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
instructions: Optional[str] = None,
shortform: Optional[str] = None,
name: Optional[str] = None)
func NewIncidentRole(ctx *Context, name string, args IncidentRoleArgs, opts ...ResourceOption) (*IncidentRole, error)
public IncidentRole(string name, IncidentRoleArgs args, CustomResourceOptions? opts = null)
public IncidentRole(String name, IncidentRoleArgs args)
public IncidentRole(String name, IncidentRoleArgs args, CustomResourceOptions options)
type: incident:IncidentRole
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 IncidentRoleArgs
- 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 IncidentRoleArgs
- 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 IncidentRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IncidentRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IncidentRoleArgs
- 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 incidentRoleResource = new Incident.IncidentRole("incidentRoleResource", new()
{
Description = "string",
Instructions = "string",
Shortform = "string",
Name = "string",
});
example, err := incident.NewIncidentRole(ctx, "incidentRoleResource", &incident.IncidentRoleArgs{
Description: pulumi.String("string"),
Instructions: pulumi.String("string"),
Shortform: pulumi.String("string"),
Name: pulumi.String("string"),
})
var incidentRoleResource = new IncidentRole("incidentRoleResource", IncidentRoleArgs.builder()
.description("string")
.instructions("string")
.shortform("string")
.name("string")
.build());
incident_role_resource = incident.IncidentRole("incidentRoleResource",
description="string",
instructions="string",
shortform="string",
name="string")
const incidentRoleResource = new incident.IncidentRole("incidentRoleResource", {
description: "string",
instructions: "string",
shortform: "string",
name: "string",
});
type: incident:IncidentRole
properties:
description: string
instructions: string
name: string
shortform: string
IncidentRole 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 IncidentRole resource accepts the following input properties:
- Description string
- Describes the purpose of the role
- Instructions string
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- Shortform string
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
- Name string
- Human readable name of the incident role
- Description string
- Describes the purpose of the role
- Instructions string
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- Shortform string
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
- Name string
- Human readable name of the incident role
- description String
- Describes the purpose of the role
- instructions String
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- shortform String
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
- name String
- Human readable name of the incident role
- description string
- Describes the purpose of the role
- instructions string
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- shortform string
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
- name string
- Human readable name of the incident role
- description str
- Describes the purpose of the role
- instructions str
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- shortform str
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
- name str
- Human readable name of the incident role
- description String
- Describes the purpose of the role
- instructions String
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- shortform String
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
- name String
- Human readable name of the incident role
Outputs
All input properties are implicitly available as output properties. Additionally, the IncidentRole 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 IncidentRole Resource
Get an existing IncidentRole 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?: IncidentRoleState, opts?: CustomResourceOptions): IncidentRole
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
instructions: Optional[str] = None,
name: Optional[str] = None,
shortform: Optional[str] = None) -> IncidentRole
func GetIncidentRole(ctx *Context, name string, id IDInput, state *IncidentRoleState, opts ...ResourceOption) (*IncidentRole, error)
public static IncidentRole Get(string name, Input<string> id, IncidentRoleState? state, CustomResourceOptions? opts = null)
public static IncidentRole get(String name, Output<String> id, IncidentRoleState state, CustomResourceOptions options)
resources: _: type: incident:IncidentRole 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.
- Description string
- Describes the purpose of the role
- Instructions string
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- Name string
- Human readable name of the incident role
- Shortform string
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
- Description string
- Describes the purpose of the role
- Instructions string
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- Name string
- Human readable name of the incident role
- Shortform string
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
- description String
- Describes the purpose of the role
- instructions String
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- name String
- Human readable name of the incident role
- shortform String
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
- description string
- Describes the purpose of the role
- instructions string
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- name string
- Human readable name of the incident role
- shortform string
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
- description str
- Describes the purpose of the role
- instructions str
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- name str
- Human readable name of the incident role
- shortform str
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
- description String
- Describes the purpose of the role
- instructions String
- Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.
- name String
- Human readable name of the incident role
- shortform String
- Short human readable name for Slack. Note that this will be empty for the 'reporter' role.
Import
#!/bin/bash
Import an incident role using its ID
Replace the ID with a real ID from your incident.io organization
$ pulumi import incident:index/incidentRole:IncidentRole example 01ABC123DEF456GHI789JKL
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- incident incident-io/terraform-provider-incident
- License
- Notes
- This Pulumi package is based on the
incident
Terraform Provider.