rootly.WorkflowTaskSendSlackBlocks
Explore with Pulumi AI
Manages workflow send_slack_blocks task.
Example Usage
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rootly.WorkflowIncident;
import com.pulumi.rootly.WorkflowIncidentArgs;
import com.pulumi.rootly.inputs.WorkflowIncidentTriggerParamsArgs;
import com.pulumi.rootly.WorkflowTaskSendSlackBlocks;
import com.pulumi.rootly.WorkflowTaskSendSlackBlocksArgs;
import com.pulumi.rootly.inputs.WorkflowTaskSendSlackBlocksTaskParamsArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 sendMessageInIncidentChannel = new WorkflowIncident("sendMessageInIncidentChannel", WorkflowIncidentArgs.builder()
.description("Send a message in the incident channel")
.triggerParams(WorkflowIncidentTriggerParamsArgs.builder()
.triggers("incident_created")
.incidentStatuses("started")
.incidentConditionStatus("IS")
.build())
.enabled(true)
.build());
var sendSlackBlocks = new WorkflowTaskSendSlackBlocks("sendSlackBlocks", WorkflowTaskSendSlackBlocksArgs.builder()
.workflowId(sendMessageInIncidentChannel.id())
.skipOnFailure(false)
.enabled(true)
.taskParams(WorkflowTaskSendSlackBlocksTaskParamsArgs.builder()
.name("Send Slack message")
.message(":boom: New incident!")
.channels(WorkflowTaskSendSlackBlocksTaskParamsChannelArgs.builder()
.name("{{ incident.slack_channel_id }}")
.id("{{ incident.slack_channel_id }}")
.build())
.blocks(serializeJson(
jsonArray(jsonObject(
jsonProperty("text", jsonObject(
jsonProperty("emoji", true),
jsonProperty("text", "This is the incident title: {{ incident.title }}"),
jsonProperty("type", "plain_text")
)),
jsonProperty("type", "header")
))))
.build())
.build());
}
}
Coming soon!
Coming soon!
resources:
sendMessageInIncidentChannel:
type: rootly:WorkflowIncident
properties:
description: Send a message in the incident channel
triggerParams:
triggers:
- incident_created
incidentStatuses:
- started
incidentConditionStatus: IS
enabled: true
sendSlackBlocks:
type: rootly:WorkflowTaskSendSlackBlocks
properties:
workflowId: ${sendMessageInIncidentChannel.id}
skipOnFailure: false
enabled: true
taskParams:
name: Send Slack message
message: ':boom: New incident!'
channels:
- name: '{{ incident.slack_channel_id }}'
id: '{{ incident.slack_channel_id }}'
blocks:
fn::toJSON:
- text:
emoji: true
text: 'This is the incident title: {{ incident.title }}'
type: plain_text
type: header
Create WorkflowTaskSendSlackBlocks Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkflowTaskSendSlackBlocks(name: string, args: WorkflowTaskSendSlackBlocksArgs, opts?: CustomResourceOptions);
@overload
def WorkflowTaskSendSlackBlocks(resource_name: str,
args: WorkflowTaskSendSlackBlocksArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkflowTaskSendSlackBlocks(resource_name: str,
opts: Optional[ResourceOptions] = None,
task_params: Optional[WorkflowTaskSendSlackBlocksTaskParamsArgs] = None,
workflow_id: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
position: Optional[int] = None,
skip_on_failure: Optional[bool] = None)
func NewWorkflowTaskSendSlackBlocks(ctx *Context, name string, args WorkflowTaskSendSlackBlocksArgs, opts ...ResourceOption) (*WorkflowTaskSendSlackBlocks, error)
public WorkflowTaskSendSlackBlocks(string name, WorkflowTaskSendSlackBlocksArgs args, CustomResourceOptions? opts = null)
public WorkflowTaskSendSlackBlocks(String name, WorkflowTaskSendSlackBlocksArgs args)
public WorkflowTaskSendSlackBlocks(String name, WorkflowTaskSendSlackBlocksArgs args, CustomResourceOptions options)
type: rootly:WorkflowTaskSendSlackBlocks
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 WorkflowTaskSendSlackBlocksArgs
- 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 WorkflowTaskSendSlackBlocksArgs
- 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 WorkflowTaskSendSlackBlocksArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkflowTaskSendSlackBlocksArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkflowTaskSendSlackBlocksArgs
- 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 workflowTaskSendSlackBlocksResource = new Rootly.WorkflowTaskSendSlackBlocks("workflowTaskSendSlackBlocksResource", new()
{
TaskParams = new Rootly.Inputs.WorkflowTaskSendSlackBlocksTaskParamsArgs
{
Blocks = "string",
Attachments = "string",
BroadcastThreadReplyToChannel = false,
Channels = new[]
{
new Rootly.Inputs.WorkflowTaskSendSlackBlocksTaskParamsChannelArgs
{
Id = "string",
Name = "string",
},
},
Message = "string",
ParentMessageThreadTask =
{
{ "string", "any" },
},
PinToChannel = false,
SendAsEphemeral = false,
SlackUserGroups = new[]
{
new Rootly.Inputs.WorkflowTaskSendSlackBlocksTaskParamsSlackUserGroupArgs
{
Id = "string",
Name = "string",
},
},
SlackUsers = new[]
{
new Rootly.Inputs.WorkflowTaskSendSlackBlocksTaskParamsSlackUserArgs
{
Id = "string",
Name = "string",
},
},
TaskType = "string",
UpdateParentMessage = false,
},
WorkflowId = "string",
Enabled = false,
Name = "string",
Position = 0,
SkipOnFailure = false,
});
example, err := rootly.NewWorkflowTaskSendSlackBlocks(ctx, "workflowTaskSendSlackBlocksResource", &rootly.WorkflowTaskSendSlackBlocksArgs{
TaskParams: &rootly.WorkflowTaskSendSlackBlocksTaskParamsArgs{
Blocks: pulumi.String("string"),
Attachments: pulumi.String("string"),
BroadcastThreadReplyToChannel: pulumi.Bool(false),
Channels: rootly.WorkflowTaskSendSlackBlocksTaskParamsChannelArray{
&rootly.WorkflowTaskSendSlackBlocksTaskParamsChannelArgs{
Id: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
Message: pulumi.String("string"),
ParentMessageThreadTask: pulumi.Map{
"string": pulumi.Any("any"),
},
PinToChannel: pulumi.Bool(false),
SendAsEphemeral: pulumi.Bool(false),
SlackUserGroups: rootly.WorkflowTaskSendSlackBlocksTaskParamsSlackUserGroupArray{
&rootly.WorkflowTaskSendSlackBlocksTaskParamsSlackUserGroupArgs{
Id: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
SlackUsers: rootly.WorkflowTaskSendSlackBlocksTaskParamsSlackUserArray{
&rootly.WorkflowTaskSendSlackBlocksTaskParamsSlackUserArgs{
Id: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
TaskType: pulumi.String("string"),
UpdateParentMessage: pulumi.Bool(false),
},
WorkflowId: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
Position: pulumi.Int(0),
SkipOnFailure: pulumi.Bool(false),
})
var workflowTaskSendSlackBlocksResource = new WorkflowTaskSendSlackBlocks("workflowTaskSendSlackBlocksResource", WorkflowTaskSendSlackBlocksArgs.builder()
.taskParams(WorkflowTaskSendSlackBlocksTaskParamsArgs.builder()
.blocks("string")
.attachments("string")
.broadcastThreadReplyToChannel(false)
.channels(WorkflowTaskSendSlackBlocksTaskParamsChannelArgs.builder()
.id("string")
.name("string")
.build())
.message("string")
.parentMessageThreadTask(Map.of("string", "any"))
.pinToChannel(false)
.sendAsEphemeral(false)
.slackUserGroups(WorkflowTaskSendSlackBlocksTaskParamsSlackUserGroupArgs.builder()
.id("string")
.name("string")
.build())
.slackUsers(WorkflowTaskSendSlackBlocksTaskParamsSlackUserArgs.builder()
.id("string")
.name("string")
.build())
.taskType("string")
.updateParentMessage(false)
.build())
.workflowId("string")
.enabled(false)
.name("string")
.position(0)
.skipOnFailure(false)
.build());
workflow_task_send_slack_blocks_resource = rootly.WorkflowTaskSendSlackBlocks("workflowTaskSendSlackBlocksResource",
task_params={
"blocks": "string",
"attachments": "string",
"broadcast_thread_reply_to_channel": False,
"channels": [{
"id": "string",
"name": "string",
}],
"message": "string",
"parent_message_thread_task": {
"string": "any",
},
"pin_to_channel": False,
"send_as_ephemeral": False,
"slack_user_groups": [{
"id": "string",
"name": "string",
}],
"slack_users": [{
"id": "string",
"name": "string",
}],
"task_type": "string",
"update_parent_message": False,
},
workflow_id="string",
enabled=False,
name="string",
position=0,
skip_on_failure=False)
const workflowTaskSendSlackBlocksResource = new rootly.WorkflowTaskSendSlackBlocks("workflowTaskSendSlackBlocksResource", {
taskParams: {
blocks: "string",
attachments: "string",
broadcastThreadReplyToChannel: false,
channels: [{
id: "string",
name: "string",
}],
message: "string",
parentMessageThreadTask: {
string: "any",
},
pinToChannel: false,
sendAsEphemeral: false,
slackUserGroups: [{
id: "string",
name: "string",
}],
slackUsers: [{
id: "string",
name: "string",
}],
taskType: "string",
updateParentMessage: false,
},
workflowId: "string",
enabled: false,
name: "string",
position: 0,
skipOnFailure: false,
});
type: rootly:WorkflowTaskSendSlackBlocks
properties:
enabled: false
name: string
position: 0
skipOnFailure: false
taskParams:
attachments: string
blocks: string
broadcastThreadReplyToChannel: false
channels:
- id: string
name: string
message: string
parentMessageThreadTask:
string: any
pinToChannel: false
sendAsEphemeral: false
slackUserGroups:
- id: string
name: string
slackUsers:
- id: string
name: string
taskType: string
updateParentMessage: false
workflowId: string
WorkflowTaskSendSlackBlocks 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 WorkflowTaskSendSlackBlocks resource accepts the following input properties:
- Task
Params WorkflowTask Send Slack Blocks Task Params - The parameters for this workflow task.
- Workflow
Id string - The ID of the parent workflow
- Enabled bool
- Enable/disable this workflow task
- Name string
- Name of the workflow task
- Position int
- The position of the workflow task (1 being top of list)
- Skip
On boolFailure - Skip workflow task if any failures
- Task
Params WorkflowTask Send Slack Blocks Task Params Args - The parameters for this workflow task.
- Workflow
Id string - The ID of the parent workflow
- Enabled bool
- Enable/disable this workflow task
- Name string
- Name of the workflow task
- Position int
- The position of the workflow task (1 being top of list)
- Skip
On boolFailure - Skip workflow task if any failures
- task
Params WorkflowTask Send Slack Blocks Task Params - The parameters for this workflow task.
- workflow
Id String - The ID of the parent workflow
- enabled Boolean
- Enable/disable this workflow task
- name String
- Name of the workflow task
- position Integer
- The position of the workflow task (1 being top of list)
- skip
On BooleanFailure - Skip workflow task if any failures
- task
Params WorkflowTask Send Slack Blocks Task Params - The parameters for this workflow task.
- workflow
Id string - The ID of the parent workflow
- enabled boolean
- Enable/disable this workflow task
- name string
- Name of the workflow task
- position number
- The position of the workflow task (1 being top of list)
- skip
On booleanFailure - Skip workflow task if any failures
- task_
params WorkflowTask Send Slack Blocks Task Params Args - The parameters for this workflow task.
- workflow_
id str - The ID of the parent workflow
- enabled bool
- Enable/disable this workflow task
- name str
- Name of the workflow task
- position int
- The position of the workflow task (1 being top of list)
- skip_
on_ boolfailure - Skip workflow task if any failures
- task
Params Property Map - The parameters for this workflow task.
- workflow
Id String - The ID of the parent workflow
- enabled Boolean
- Enable/disable this workflow task
- name String
- Name of the workflow task
- position Number
- The position of the workflow task (1 being top of list)
- skip
On BooleanFailure - Skip workflow task if any failures
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkflowTaskSendSlackBlocks 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 WorkflowTaskSendSlackBlocks Resource
Get an existing WorkflowTaskSendSlackBlocks 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?: WorkflowTaskSendSlackBlocksState, opts?: CustomResourceOptions): WorkflowTaskSendSlackBlocks
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
position: Optional[int] = None,
skip_on_failure: Optional[bool] = None,
task_params: Optional[WorkflowTaskSendSlackBlocksTaskParamsArgs] = None,
workflow_id: Optional[str] = None) -> WorkflowTaskSendSlackBlocks
func GetWorkflowTaskSendSlackBlocks(ctx *Context, name string, id IDInput, state *WorkflowTaskSendSlackBlocksState, opts ...ResourceOption) (*WorkflowTaskSendSlackBlocks, error)
public static WorkflowTaskSendSlackBlocks Get(string name, Input<string> id, WorkflowTaskSendSlackBlocksState? state, CustomResourceOptions? opts = null)
public static WorkflowTaskSendSlackBlocks get(String name, Output<String> id, WorkflowTaskSendSlackBlocksState 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.
- Enabled bool
- Enable/disable this workflow task
- Name string
- Name of the workflow task
- Position int
- The position of the workflow task (1 being top of list)
- Skip
On boolFailure - Skip workflow task if any failures
- Task
Params WorkflowTask Send Slack Blocks Task Params - The parameters for this workflow task.
- Workflow
Id string - The ID of the parent workflow
- Enabled bool
- Enable/disable this workflow task
- Name string
- Name of the workflow task
- Position int
- The position of the workflow task (1 being top of list)
- Skip
On boolFailure - Skip workflow task if any failures
- Task
Params WorkflowTask Send Slack Blocks Task Params Args - The parameters for this workflow task.
- Workflow
Id string - The ID of the parent workflow
- enabled Boolean
- Enable/disable this workflow task
- name String
- Name of the workflow task
- position Integer
- The position of the workflow task (1 being top of list)
- skip
On BooleanFailure - Skip workflow task if any failures
- task
Params WorkflowTask Send Slack Blocks Task Params - The parameters for this workflow task.
- workflow
Id String - The ID of the parent workflow
- enabled boolean
- Enable/disable this workflow task
- name string
- Name of the workflow task
- position number
- The position of the workflow task (1 being top of list)
- skip
On booleanFailure - Skip workflow task if any failures
- task
Params WorkflowTask Send Slack Blocks Task Params - The parameters for this workflow task.
- workflow
Id string - The ID of the parent workflow
- enabled bool
- Enable/disable this workflow task
- name str
- Name of the workflow task
- position int
- The position of the workflow task (1 being top of list)
- skip_
on_ boolfailure - Skip workflow task if any failures
- task_
params WorkflowTask Send Slack Blocks Task Params Args - The parameters for this workflow task.
- workflow_
id str - The ID of the parent workflow
- enabled Boolean
- Enable/disable this workflow task
- name String
- Name of the workflow task
- position Number
- The position of the workflow task (1 being top of list)
- skip
On BooleanFailure - Skip workflow task if any failures
- task
Params Property Map - The parameters for this workflow task.
- workflow
Id String - The ID of the parent workflow
Supporting Types
WorkflowTaskSendSlackBlocksTaskParams, WorkflowTaskSendSlackBlocksTaskParamsArgs
- Blocks string
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- Attachments string
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- Broadcast
Thread boolReply To Channel - Value must be one of true or false
- Channels
List<Workflow
Task Send Slack Blocks Task Params Channel> - Message string
- Parent
Message Dictionary<string, object>Thread Task - Map must contain two fields,
id
andname
. A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task - Pin
To boolChannel - Value must be one of true or false
- Send
As boolEphemeral - Value must be one of true or false
- Slack
User List<WorkflowGroups Task Send Slack Blocks Task Params Slack User Group> - Slack
Users List<WorkflowTask Send Slack Blocks Task Params Slack User> - Task
Type string - Update
Parent boolMessage - Value must be one of true or false
- Blocks string
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- Attachments string
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- Broadcast
Thread boolReply To Channel - Value must be one of true or false
- Channels
[]Workflow
Task Send Slack Blocks Task Params Channel - Message string
- Parent
Message map[string]interface{}Thread Task - Map must contain two fields,
id
andname
. A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task - Pin
To boolChannel - Value must be one of true or false
- Send
As boolEphemeral - Value must be one of true or false
- Slack
User []WorkflowGroups Task Send Slack Blocks Task Params Slack User Group - Slack
Users []WorkflowTask Send Slack Blocks Task Params Slack User - Task
Type string - Update
Parent boolMessage - Value must be one of true or false
- blocks String
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- attachments String
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- broadcast
Thread BooleanReply To Channel - Value must be one of true or false
- channels
List<Workflow
Task Send Slack Blocks Task Params Channel> - message String
- parent
Message Map<String,Object>Thread Task - Map must contain two fields,
id
andname
. A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task - pin
To BooleanChannel - Value must be one of true or false
- send
As BooleanEphemeral - Value must be one of true or false
- slack
User List<WorkflowGroups Task Send Slack Blocks Task Params Slack User Group> - slack
Users List<WorkflowTask Send Slack Blocks Task Params Slack User> - task
Type String - update
Parent BooleanMessage - Value must be one of true or false
- blocks string
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- attachments string
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- broadcast
Thread booleanReply To Channel - Value must be one of true or false
- channels
Workflow
Task Send Slack Blocks Task Params Channel[] - message string
- parent
Message {[key: string]: any}Thread Task - Map must contain two fields,
id
andname
. A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task - pin
To booleanChannel - Value must be one of true or false
- send
As booleanEphemeral - Value must be one of true or false
- slack
User WorkflowGroups Task Send Slack Blocks Task Params Slack User Group[] - slack
Users WorkflowTask Send Slack Blocks Task Params Slack User[] - task
Type string - update
Parent booleanMessage - Value must be one of true or false
- blocks str
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- attachments str
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- broadcast_
thread_ boolreply_ to_ channel - Value must be one of true or false
- channels
Sequence[Workflow
Task Send Slack Blocks Task Params Channel] - message str
- parent_
message_ Mapping[str, Any]thread_ task - Map must contain two fields,
id
andname
. A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task - pin_
to_ boolchannel - Value must be one of true or false
- send_
as_ boolephemeral - Value must be one of true or false
- slack_
user_ Sequence[Workflowgroups Task Send Slack Blocks Task Params Slack User Group] - slack_
users Sequence[WorkflowTask Send Slack Blocks Task Params Slack User] - task_
type str - update_
parent_ boolmessage - Value must be one of true or false
- blocks String
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- attachments String
- Support liquid markup. Needs to be a valid JSON string after liquid is parsed
- broadcast
Thread BooleanReply To Channel - Value must be one of true or false
- channels List<Property Map>
- message String
- parent
Message Map<Any>Thread Task - Map must contain two fields,
id
andname
. A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task - pin
To BooleanChannel - Value must be one of true or false
- send
As BooleanEphemeral - Value must be one of true or false
- slack
User List<Property Map>Groups - slack
Users List<Property Map> - task
Type String - update
Parent BooleanMessage - Value must be one of true or false
WorkflowTaskSendSlackBlocksTaskParamsChannel, WorkflowTaskSendSlackBlocksTaskParamsChannelArgs
WorkflowTaskSendSlackBlocksTaskParamsSlackUser, WorkflowTaskSendSlackBlocksTaskParamsSlackUserArgs
WorkflowTaskSendSlackBlocksTaskParamsSlackUserGroup, WorkflowTaskSendSlackBlocksTaskParamsSlackUserGroupArgs
Package Details
- Repository
- rootly rootlyhq/pulumi-rootly
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rootly
Terraform Provider.