ConversationArgs

data class ConversationArgs(val actionOnDestroy: Output<String>? = null, val actionOnUpdatePermanentMembers: Output<String>? = null, val adoptExistingChannel: Output<Boolean>? = null, val isArchived: Output<Boolean>? = null, val isPrivate: Output<Boolean>? = null, val name: Output<String>? = null, val permanentMembers: Output<List<String>>? = null, val purpose: Output<String>? = null, val topic: Output<String>? = null) : ConvertibleToJava<ConversationArgs>

Manages a Slack channel

Required scopes

This resource requires the following scopes: If using bot tokens:

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";
const test = new slack.Conversation("test", {
name: "my-channel",
topic: "The topic for my channel",
permanentMembers: [],
isPrivate: true,
});
import pulumi
import pulumi_slack as slack
test = slack.Conversation("test",
name="my-channel",
topic="The topic for my channel",
permanent_members=[],
is_private=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Slack = Pulumi.Slack;
return await Deployment.RunAsync(() =>
{
var test = new Slack.Conversation("test", new()
{
Name = "my-channel",
Topic = "The topic for my channel",
PermanentMembers = new[] {},
IsPrivate = true,
});
});
package main
import (
"github.com/pulumi/pulumi-slack/sdk/go/slack"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := slack.NewConversation(ctx, "test", &slack.ConversationArgs{
Name: pulumi.String("my-channel"),
Topic: pulumi.String("The topic for my channel"),
PermanentMembers: pulumi.StringArray{},
IsPrivate: pulumi.Bool(true),
})
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.slack.Conversation;
import com.pulumi.slack.ConversationArgs;
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 test = new Conversation("test", ConversationArgs.builder()
.name("my-channel")
.topic("The topic for my channel")
.permanentMembers()
.isPrivate(true)
.build());
}
}
resources:
test:
type: slack:Conversation
properties:
name: my-channel
topic: The topic for my channel
permanentMembers: []
isPrivate: true
import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";
const nonadmin = new slack.Conversation("nonadmin", {
name: "my-channel01",
topic: "The channel won't be archived on destroy",
permanentMembers: [],
isPrivate: true,
actionOnDestroy: "none",
});
import pulumi
import pulumi_slack as slack
nonadmin = slack.Conversation("nonadmin",
name="my-channel01",
topic="The channel won't be archived on destroy",
permanent_members=[],
is_private=True,
action_on_destroy="none")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Slack = Pulumi.Slack;
return await Deployment.RunAsync(() =>
{
var nonadmin = new Slack.Conversation("nonadmin", new()
{
Name = "my-channel01",
Topic = "The channel won't be archived on destroy",
PermanentMembers = new[] {},
IsPrivate = true,
ActionOnDestroy = "none",
});
});
package main
import (
"github.com/pulumi/pulumi-slack/sdk/go/slack"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := slack.NewConversation(ctx, "nonadmin", &slack.ConversationArgs{
Name: pulumi.String("my-channel01"),
Topic: pulumi.String("The channel won't be archived on destroy"),
PermanentMembers: pulumi.StringArray{},
IsPrivate: pulumi.Bool(true),
ActionOnDestroy: pulumi.String("none"),
})
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.slack.Conversation;
import com.pulumi.slack.ConversationArgs;
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 nonadmin = new Conversation("nonadmin", ConversationArgs.builder()
.name("my-channel01")
.topic("The channel won't be archived on destroy")
.permanentMembers()
.isPrivate(true)
.actionOnDestroy("none")
.build());
}
}
resources:
nonadmin:
type: slack:Conversation
properties:
name: my-channel01
topic: The channel won't be archived on destroy
permanentMembers: []
isPrivate: true
actionOnDestroy: none
import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";
const adopted = new slack.Conversation("adopted", {
name: "my-channel02",
topic: "Adopt existing, don't kick members",
permanentMembers: [],
adoptExistingChannel: true,
actionOnUpdatePermanentMembers: "none",
});
import pulumi
import pulumi_slack as slack
adopted = slack.Conversation("adopted",
name="my-channel02",
topic="Adopt existing, don't kick members",
permanent_members=[],
adopt_existing_channel=True,
action_on_update_permanent_members="none")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Slack = Pulumi.Slack;
return await Deployment.RunAsync(() =>
{
var adopted = new Slack.Conversation("adopted", new()
{
Name = "my-channel02",
Topic = "Adopt existing, don't kick members",
PermanentMembers = new[] {},
AdoptExistingChannel = true,
ActionOnUpdatePermanentMembers = "none",
});
});
package main
import (
"github.com/pulumi/pulumi-slack/sdk/go/slack"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := slack.NewConversation(ctx, "adopted", &slack.ConversationArgs{
Name: pulumi.String("my-channel02"),
Topic: pulumi.String("Adopt existing, don't kick members"),
PermanentMembers: pulumi.StringArray{},
AdoptExistingChannel: pulumi.Bool(true),
ActionOnUpdatePermanentMembers: pulumi.String("none"),
})
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.slack.Conversation;
import com.pulumi.slack.ConversationArgs;
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 adopted = new Conversation("adopted", ConversationArgs.builder()
.name("my-channel02")
.topic("Adopt existing, don't kick members")
.permanentMembers()
.adoptExistingChannel(true)
.actionOnUpdatePermanentMembers("none")
.build());
}
}
resources:
adopted:
type: slack:Conversation
properties:
name: my-channel02
topic: Adopt existing, don't kick members
permanentMembers: []
adoptExistingChannel: true
actionOnUpdatePermanentMembers: none

Import

slack_conversation can be imported using the ID of the conversation/channel, e.g.

$ pulumi import slack:index/conversation:Conversation my_conversation C023X7QTFHQ

Constructors

Link copied to clipboard
constructor(actionOnDestroy: Output<String>? = null, actionOnUpdatePermanentMembers: Output<String>? = null, adoptExistingChannel: Output<Boolean>? = null, isArchived: Output<Boolean>? = null, isPrivate: Output<Boolean>? = null, name: Output<String>? = null, permanentMembers: Output<List<String>>? = null, purpose: Output<String>? = null, topic: Output<String>? = null)

Properties

Link copied to clipboard
val actionOnDestroy: Output<String>? = null

indicates whether the conversation should be archived or left behind on destroy. Valid values are archive | none. Note that when set to none the conversation will be left as it is and as a result any subsequent runs of pulumi up with the same name will fail.

Link copied to clipboard

indicate whether the members should be kick of the channel when removed from permanent_members. When set to none the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.

Link copied to clipboard
val adoptExistingChannel: Output<Boolean>? = null
Link copied to clipboard
val isArchived: Output<Boolean>? = null

indicates a conversation is archived. Frozen in time.

Link copied to clipboard
val isPrivate: Output<Boolean>? = null

create a private channel instead of a public one.

Link copied to clipboard
val name: Output<String>? = null

name of the public or private channel.

Link copied to clipboard
val permanentMembers: Output<List<String>>? = null

user IDs to add to the channel.

Link copied to clipboard
val purpose: Output<String>? = null

purpose of the channel.

Link copied to clipboard
val topic: Output<String>? = null

topic for the channel.

Functions

Link copied to clipboard
open override fun toJava(): ConversationArgs