Conversation

class Conversation : KotlinCustomResource

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

Properties

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

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
Link copied to clipboard
val created: Output<Int>

is a unix timestamp.

Link copied to clipboard
val creator: Output<String>

is the user ID of the member that created this channel.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val isArchived: Output<Boolean>?

indicates a conversation is archived. Frozen in time.

Link copied to clipboard
val isExtShared: Output<Boolean>

represents this conversation as being part of a Shared Channel with a remote organization.

Link copied to clipboard
val isGeneral: Output<Boolean>

will be true if this channel is the "general" channel that includes all regular team members.

Link copied to clipboard
val isOrgShared: Output<Boolean>

explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.

Link copied to clipboard
val isPrivate: Output<Boolean>

create a private channel instead of a public one.

Link copied to clipboard
val isShared: Output<Boolean>

means the conversation is in some way shared between multiple workspaces.

Link copied to clipboard
val name: Output<String>

name of the public or private channel.

Link copied to clipboard

user IDs to add to the channel.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val purpose: Output<String>?

purpose of the channel.

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

topic for the channel.

Link copied to clipboard
val urn: Output<String>