rootly.WorkflowIncident
Explore with Pulumi AI
Example Usage
using Pulumi;
using Rootly = Pulumi.Rootly;
class MyStack : Stack
{
public MyStack()
{
var critical = Output.Create(Rootly.GetSeverity.InvokeAsync(new Rootly.GetSeverityArgs
{
Slug = "sev0",
}));
var my_workflow = new Rootly.WorkflowIncident("my-workflow", new Rootly.WorkflowIncidentArgs
{
Description = "This workflow will trigger when an incident is created and severity is critical",
TriggerParams = new Rootly.Inputs.WorkflowIncidentTriggerParamsArgs
{
Triggers =
{
"incident_created",
},
IncidentConditionKind = "IS",
IncidentKinds =
{
"normal",
},
IncidentConditionStatus = "IS",
IncidentStatuses =
{
"started",
},
IncidentConditionSeverity = "IS",
},
SeverityIds =
{
critical.Apply(critical => critical.Id),
},
Enabled = true,
});
}
}
package main
import (
"github.com/pulumi/pulumi-rootly/sdk/go/rootly"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
critical, err := rootly.LookupSeverity(ctx, &GetSeverityArgs{
Slug: pulumi.StringRef("sev0"),
}, nil)
if err != nil {
return err
}
_, err = rootly.NewWorkflowIncident(ctx, "my-workflow", &rootly.WorkflowIncidentArgs{
Description: pulumi.String("This workflow will trigger when an incident is created and severity is critical"),
TriggerParams: &WorkflowIncidentTriggerParamsArgs{
Triggers: pulumi.StringArray{
pulumi.String("incident_created"),
},
IncidentConditionKind: pulumi.String("IS"),
IncidentKinds: pulumi.StringArray{
pulumi.String("normal"),
},
IncidentConditionStatus: pulumi.String("IS"),
IncidentStatuses: pulumi.StringArray{
pulumi.String("started"),
},
IncidentConditionSeverity: pulumi.String("IS"),
},
SeverityIds: pulumi.StringArray{
pulumi.String(critical.Id),
},
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_rootly as rootly
critical = rootly.get_severity(slug="sev0")
my_workflow = rootly.WorkflowIncident("my-workflow",
description="This workflow will trigger when an incident is created and severity is critical",
trigger_params=rootly.WorkflowIncidentTriggerParamsArgs(
triggers=["incident_created"],
incident_condition_kind="IS",
incident_kinds=["normal"],
incident_condition_status="IS",
incident_statuses=["started"],
incident_condition_severity="IS",
),
severity_ids=[critical.id],
enabled=True)
import * as pulumi from "@pulumi/pulumi";
import * as rootly from "@pulumi/rootly";
const critical = rootly.getSeverity({
slug: "sev0",
});
const my_workflow = new rootly.WorkflowIncident("my-workflow", {
description: "This workflow will trigger when an incident is created and severity is critical",
triggerParams: {
triggers: ["incident_created"],
incidentConditionKind: "IS",
incidentKinds: ["normal"],
incidentConditionStatus: "IS",
incidentStatuses: ["started"],
incidentConditionSeverity: "IS",
},
severityIds: [critical.then(critical => critical.id)],
enabled: true,
});
Coming soon!
Create WorkflowIncident Resource
new WorkflowIncident(name: string, args?: WorkflowIncidentArgs, opts?: CustomResourceOptions);
@overload
def WorkflowIncident(resource_name: str,
opts: Optional[ResourceOptions] = None,
command: Optional[str] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
environment_ids: Optional[Sequence[str]] = None,
group_ids: Optional[Sequence[str]] = None,
incident_role_ids: Optional[Sequence[str]] = None,
incident_type_ids: Optional[Sequence[str]] = None,
name: Optional[str] = None,
position: Optional[int] = None,
repeat_every_duration: Optional[str] = None,
repeat_ons: Optional[Sequence[str]] = None,
service_ids: Optional[Sequence[str]] = None,
severity_ids: Optional[Sequence[str]] = None,
slug: Optional[str] = None,
trigger_params: Optional[WorkflowIncidentTriggerParamsArgs] = None,
wait: Optional[str] = None,
workflow_group_id: Optional[str] = None)
@overload
def WorkflowIncident(resource_name: str,
args: Optional[WorkflowIncidentArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewWorkflowIncident(ctx *Context, name string, args *WorkflowIncidentArgs, opts ...ResourceOption) (*WorkflowIncident, error)
public WorkflowIncident(string name, WorkflowIncidentArgs? args = null, CustomResourceOptions? opts = null)
public WorkflowIncident(String name, WorkflowIncidentArgs args)
public WorkflowIncident(String name, WorkflowIncidentArgs args, CustomResourceOptions options)
type: rootly:WorkflowIncident
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkflowIncidentArgs
- 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 WorkflowIncidentArgs
- 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 WorkflowIncidentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkflowIncidentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkflowIncidentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
WorkflowIncident 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 WorkflowIncident resource accepts the following input properties:
- Command string
Workflow command.
- Description string
The description of the workflow
- Enabled bool
- Environment
Ids List<string> - Group
Ids List<string> - Incident
Role List<string>Ids - Incident
Type List<string>Ids - Name string
The title of the workflow
- Position int
The order which the workflow should run with other workflows.
- Repeat
Every stringDuration Repeat workflow every duration.
- Repeat
Ons List<string> Value must be one of
S
,M
,T
,W
,R
,F
,U
.- Service
Ids List<string> - Severity
Ids List<string> - Slug string
The slug of the workflow
- Trigger
Params WorkflowIncident Trigger Params - Wait string
Wait this duration before executing.
- Workflow
Group stringId The group this workflow belongs to.
- Command string
Workflow command.
- Description string
The description of the workflow
- Enabled bool
- Environment
Ids []string - Group
Ids []string - Incident
Role []stringIds - Incident
Type []stringIds - Name string
The title of the workflow
- Position int
The order which the workflow should run with other workflows.
- Repeat
Every stringDuration Repeat workflow every duration.
- Repeat
Ons []string Value must be one of
S
,M
,T
,W
,R
,F
,U
.- Service
Ids []string - Severity
Ids []string - Slug string
The slug of the workflow
- Trigger
Params WorkflowIncident Trigger Params Args - Wait string
Wait this duration before executing.
- Workflow
Group stringId The group this workflow belongs to.
- command String
Workflow command.
- description String
The description of the workflow
- enabled Boolean
- environment
Ids List<String> - group
Ids List<String> - incident
Role List<String>Ids - incident
Type List<String>Ids - name String
The title of the workflow
- position Integer
The order which the workflow should run with other workflows.
- repeat
Every StringDuration Repeat workflow every duration.
- repeat
Ons List<String> Value must be one of
S
,M
,T
,W
,R
,F
,U
.- service
Ids List<String> - severity
Ids List<String> - slug String
The slug of the workflow
- trigger
Params WorkflowIncident Trigger Params - wait_ String
Wait this duration before executing.
- workflow
Group StringId The group this workflow belongs to.
- command string
Workflow command.
- description string
The description of the workflow
- enabled boolean
- environment
Ids string[] - group
Ids string[] - incident
Role string[]Ids - incident
Type string[]Ids - name string
The title of the workflow
- position number
The order which the workflow should run with other workflows.
- repeat
Every stringDuration Repeat workflow every duration.
- repeat
Ons string[] Value must be one of
S
,M
,T
,W
,R
,F
,U
.- service
Ids string[] - severity
Ids string[] - slug string
The slug of the workflow
- trigger
Params WorkflowIncident Trigger Params - wait string
Wait this duration before executing.
- workflow
Group stringId The group this workflow belongs to.
- command str
Workflow command.
- description str
The description of the workflow
- enabled bool
- environment_
ids Sequence[str] - group_
ids Sequence[str] - incident_
role_ Sequence[str]ids - incident_
type_ Sequence[str]ids - name str
The title of the workflow
- position int
The order which the workflow should run with other workflows.
- repeat_
every_ strduration Repeat workflow every duration.
- repeat_
ons Sequence[str] Value must be one of
S
,M
,T
,W
,R
,F
,U
.- service_
ids Sequence[str] - severity_
ids Sequence[str] - slug str
The slug of the workflow
- trigger_
params WorkflowIncident Trigger Params Args - wait str
Wait this duration before executing.
- workflow_
group_ strid The group this workflow belongs to.
- command String
Workflow command.
- description String
The description of the workflow
- enabled Boolean
- environment
Ids List<String> - group
Ids List<String> - incident
Role List<String>Ids - incident
Type List<String>Ids - name String
The title of the workflow
- position Number
The order which the workflow should run with other workflows.
- repeat
Every StringDuration Repeat workflow every duration.
- repeat
Ons List<String> Value must be one of
S
,M
,T
,W
,R
,F
,U
.- service
Ids List<String> - severity
Ids List<String> - slug String
The slug of the workflow
- trigger
Params Property Map - wait String
Wait this duration before executing.
- workflow
Group StringId The group this workflow belongs to.
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkflowIncident 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 WorkflowIncident Resource
Get an existing WorkflowIncident 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?: WorkflowIncidentState, opts?: CustomResourceOptions): WorkflowIncident
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
command: Optional[str] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
environment_ids: Optional[Sequence[str]] = None,
group_ids: Optional[Sequence[str]] = None,
incident_role_ids: Optional[Sequence[str]] = None,
incident_type_ids: Optional[Sequence[str]] = None,
name: Optional[str] = None,
position: Optional[int] = None,
repeat_every_duration: Optional[str] = None,
repeat_ons: Optional[Sequence[str]] = None,
service_ids: Optional[Sequence[str]] = None,
severity_ids: Optional[Sequence[str]] = None,
slug: Optional[str] = None,
trigger_params: Optional[WorkflowIncidentTriggerParamsArgs] = None,
wait: Optional[str] = None,
workflow_group_id: Optional[str] = None) -> WorkflowIncident
func GetWorkflowIncident(ctx *Context, name string, id IDInput, state *WorkflowIncidentState, opts ...ResourceOption) (*WorkflowIncident, error)
public static WorkflowIncident Get(string name, Input<string> id, WorkflowIncidentState? state, CustomResourceOptions? opts = null)
public static WorkflowIncident get(String name, Output<String> id, WorkflowIncidentState 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.
- Command string
Workflow command.
- Description string
The description of the workflow
- Enabled bool
- Environment
Ids List<string> - Group
Ids List<string> - Incident
Role List<string>Ids - Incident
Type List<string>Ids - Name string
The title of the workflow
- Position int
The order which the workflow should run with other workflows.
- Repeat
Every stringDuration Repeat workflow every duration.
- Repeat
Ons List<string> Value must be one of
S
,M
,T
,W
,R
,F
,U
.- Service
Ids List<string> - Severity
Ids List<string> - Slug string
The slug of the workflow
- Trigger
Params WorkflowIncident Trigger Params - Wait string
Wait this duration before executing.
- Workflow
Group stringId The group this workflow belongs to.
- Command string
Workflow command.
- Description string
The description of the workflow
- Enabled bool
- Environment
Ids []string - Group
Ids []string - Incident
Role []stringIds - Incident
Type []stringIds - Name string
The title of the workflow
- Position int
The order which the workflow should run with other workflows.
- Repeat
Every stringDuration Repeat workflow every duration.
- Repeat
Ons []string Value must be one of
S
,M
,T
,W
,R
,F
,U
.- Service
Ids []string - Severity
Ids []string - Slug string
The slug of the workflow
- Trigger
Params WorkflowIncident Trigger Params Args - Wait string
Wait this duration before executing.
- Workflow
Group stringId The group this workflow belongs to.
- command String
Workflow command.
- description String
The description of the workflow
- enabled Boolean
- environment
Ids List<String> - group
Ids List<String> - incident
Role List<String>Ids - incident
Type List<String>Ids - name String
The title of the workflow
- position Integer
The order which the workflow should run with other workflows.
- repeat
Every StringDuration Repeat workflow every duration.
- repeat
Ons List<String> Value must be one of
S
,M
,T
,W
,R
,F
,U
.- service
Ids List<String> - severity
Ids List<String> - slug String
The slug of the workflow
- trigger
Params WorkflowIncident Trigger Params - wait_ String
Wait this duration before executing.
- workflow
Group StringId The group this workflow belongs to.
- command string
Workflow command.
- description string
The description of the workflow
- enabled boolean
- environment
Ids string[] - group
Ids string[] - incident
Role string[]Ids - incident
Type string[]Ids - name string
The title of the workflow
- position number
The order which the workflow should run with other workflows.
- repeat
Every stringDuration Repeat workflow every duration.
- repeat
Ons string[] Value must be one of
S
,M
,T
,W
,R
,F
,U
.- service
Ids string[] - severity
Ids string[] - slug string
The slug of the workflow
- trigger
Params WorkflowIncident Trigger Params - wait string
Wait this duration before executing.
- workflow
Group stringId The group this workflow belongs to.
- command str
Workflow command.
- description str
The description of the workflow
- enabled bool
- environment_
ids Sequence[str] - group_
ids Sequence[str] - incident_
role_ Sequence[str]ids - incident_
type_ Sequence[str]ids - name str
The title of the workflow
- position int
The order which the workflow should run with other workflows.
- repeat_
every_ strduration Repeat workflow every duration.
- repeat_
ons Sequence[str] Value must be one of
S
,M
,T
,W
,R
,F
,U
.- service_
ids Sequence[str] - severity_
ids Sequence[str] - slug str
The slug of the workflow
- trigger_
params WorkflowIncident Trigger Params Args - wait str
Wait this duration before executing.
- workflow_
group_ strid The group this workflow belongs to.
- command String
Workflow command.
- description String
The description of the workflow
- enabled Boolean
- environment
Ids List<String> - group
Ids List<String> - incident
Role List<String>Ids - incident
Type List<String>Ids - name String
The title of the workflow
- position Number
The order which the workflow should run with other workflows.
- repeat
Every StringDuration Repeat workflow every duration.
- repeat
Ons List<String> Value must be one of
S
,M
,T
,W
,R
,F
,U
.- service
Ids List<String> - severity
Ids List<String> - slug String
The slug of the workflow
- trigger
Params Property Map - wait String
Wait this duration before executing.
- workflow
Group StringId The group this workflow belongs to.
Supporting Types
WorkflowIncidentTriggerParams, WorkflowIncidentTriggerParamsArgs
- Incident
Condition string - Incident
Condition stringAcknowledged At - Incident
Condition stringDetected At - Incident
Condition stringEnvironment - Incident
Condition stringFunctionality - Incident
Condition stringGroup - Incident
Condition stringIncident Roles - Incident
Condition stringIncident Type - Incident
Condition stringKind - Incident
Condition stringMitigated At - Incident
Condition stringResolved At - Incident
Condition stringService - Incident
Condition stringSeverity - Incident
Condition stringStarted At - Incident
Condition stringStatus - Incident
Condition stringSummary - Incident
Condition stringVisibility - Incident
Conditional stringInactivity - Incident
Inactivity stringDuration - Incident
Kinds List<string> - Incident
Statuses List<string> - Incident
Visibilities List<string> - Trigger
Type string - Triggers List<string>
- Incident
Condition string - Incident
Condition stringAcknowledged At - Incident
Condition stringDetected At - Incident
Condition stringEnvironment - Incident
Condition stringFunctionality - Incident
Condition stringGroup - Incident
Condition stringIncident Roles - Incident
Condition stringIncident Type - Incident
Condition stringKind - Incident
Condition stringMitigated At - Incident
Condition stringResolved At - Incident
Condition stringService - Incident
Condition stringSeverity - Incident
Condition stringStarted At - Incident
Condition stringStatus - Incident
Condition stringSummary - Incident
Condition stringVisibility - Incident
Conditional stringInactivity - Incident
Inactivity stringDuration - Incident
Kinds []string - Incident
Statuses []string - Incident
Visibilities []string - Trigger
Type string - Triggers []string
- incident
Condition String - incident
Condition StringAcknowledged At - incident
Condition StringDetected At - incident
Condition StringEnvironment - incident
Condition StringFunctionality - incident
Condition StringGroup - incident
Condition StringIncident Roles - incident
Condition StringIncident Type - incident
Condition StringKind - incident
Condition StringMitigated At - incident
Condition StringResolved At - incident
Condition StringService - incident
Condition StringSeverity - incident
Condition StringStarted At - incident
Condition StringStatus - incident
Condition StringSummary - incident
Condition StringVisibility - incident
Conditional StringInactivity - incident
Inactivity StringDuration - incident
Kinds List<String> - incident
Statuses List<String> - incident
Visibilities List<String> - trigger
Type String - triggers List<String>
- incident
Condition string - incident
Condition stringAcknowledged At - incident
Condition stringDetected At - incident
Condition stringEnvironment - incident
Condition stringFunctionality - incident
Condition stringGroup - incident
Condition stringIncident Roles - incident
Condition stringIncident Type - incident
Condition stringKind - incident
Condition stringMitigated At - incident
Condition stringResolved At - incident
Condition stringService - incident
Condition stringSeverity - incident
Condition stringStarted At - incident
Condition stringStatus - incident
Condition stringSummary - incident
Condition stringVisibility - incident
Conditional stringInactivity - incident
Inactivity stringDuration - incident
Kinds string[] - incident
Statuses string[] - incident
Visibilities string[] - trigger
Type string - triggers string[]
- incident_
condition str - incident_
condition_ stracknowledged_ at - incident_
condition_ strdetected_ at - incident_
condition_ strenvironment - incident_
condition_ strfunctionality - incident_
condition_ strgroup - incident_
condition_ strincident_ roles - incident_
condition_ strincident_ type - incident_
condition_ strkind - incident_
condition_ strmitigated_ at - incident_
condition_ strresolved_ at - incident_
condition_ strservice - incident_
condition_ strseverity - incident_
condition_ strstarted_ at - incident_
condition_ strstatus - incident_
condition_ strsummary - incident_
condition_ strvisibility - incident_
conditional_ strinactivity - incident_
inactivity_ strduration - incident_
kinds Sequence[str] - incident_
statuses Sequence[str] - incident_
visibilities Sequence[str] - trigger_
type str - triggers Sequence[str]
- incident
Condition String - incident
Condition StringAcknowledged At - incident
Condition StringDetected At - incident
Condition StringEnvironment - incident
Condition StringFunctionality - incident
Condition StringGroup - incident
Condition StringIncident Roles - incident
Condition StringIncident Type - incident
Condition StringKind - incident
Condition StringMitigated At - incident
Condition StringResolved At - incident
Condition StringService - incident
Condition StringSeverity - incident
Condition StringStarted At - incident
Condition StringStatus - incident
Condition StringSummary - incident
Condition StringVisibility - incident
Conditional StringInactivity - incident
Inactivity StringDuration - incident
Kinds List<String> - incident
Statuses List<String> - incident
Visibilities List<String> - trigger
Type String - triggers List<String>
Package Details
- Repository
- rootly rootlyhq/pulumi-rootly
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
rootly
Terraform Provider.