slack.Conversation
Explore with Pulumi AI
Manages a Slack channel
Required scopes
This resource requires the following scopes:
If using bot
tokens:
- channels:read (public channels)
- channels:manage (public channels)
- channels:join (adopting existing public channels)
- groups:read (private channels)
- groups:write (private channels)
If using user
tokens:
- channels:read (public channels)
- channels:write (public channels)
- groups:read (private channels)
- groups:write (private channels)
The Slack API methods used by the resource are:
- conversations.create
- conversations.join
- conversations.setTopic
- conversations.setPurpose
- conversations.info
- conversations.members
- conversations.kick
- conversations.invite
- conversations.rename
- conversations.archive
- conversations.unarchive
If you get missing_scope
errors while using this resource check the scopes against
the documentation for the methods above.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Slack = Pulumi.Slack;
return await Deployment.RunAsync(() =>
{
var test = new Slack.Conversation("test", new()
{
IsPrivate = true,
PermanentMembers = new[] {},
Topic = "The topic for my channel",
});
});
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{
IsPrivate: pulumi.Bool(true),
PermanentMembers: pulumi.StringArray{},
Topic: pulumi.String("The topic for my channel"),
})
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()
.isPrivate(true)
.permanentMembers()
.topic("The topic for my channel")
.build());
}
}
import pulumi
import pulumi_slack as slack
test = slack.Conversation("test",
is_private=True,
permanent_members=[],
topic="The topic for my channel")
import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";
const test = new slack.Conversation("test", {
isPrivate: true,
permanentMembers: [],
topic: "The topic for my channel",
});
resources:
test:
type: slack:Conversation
properties:
isPrivate: true
permanentMembers: []
topic: The topic for my channel
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Slack = Pulumi.Slack;
return await Deployment.RunAsync(() =>
{
var nonadmin = new Slack.Conversation("nonadmin", new()
{
ActionOnDestroy = "none",
IsPrivate = true,
PermanentMembers = new[] {},
Topic = "The channel won't be archived on destroy",
});
});
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{
ActionOnDestroy: pulumi.String("none"),
IsPrivate: pulumi.Bool(true),
PermanentMembers: pulumi.StringArray{},
Topic: pulumi.String("The channel won't be archived on destroy"),
})
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()
.actionOnDestroy("none")
.isPrivate(true)
.permanentMembers()
.topic("The channel won't be archived on destroy")
.build());
}
}
import pulumi
import pulumi_slack as slack
nonadmin = slack.Conversation("nonadmin",
action_on_destroy="none",
is_private=True,
permanent_members=[],
topic="The channel won't be archived on destroy")
import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";
const nonadmin = new slack.Conversation("nonadmin", {
actionOnDestroy: "none",
isPrivate: true,
permanentMembers: [],
topic: "The channel won't be archived on destroy",
});
resources:
nonadmin:
type: slack:Conversation
properties:
actionOnDestroy: none
isPrivate: true
permanentMembers: []
topic: The channel won't be archived on destroy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Slack = Pulumi.Slack;
return await Deployment.RunAsync(() =>
{
var adopted = new Slack.Conversation("adopted", new()
{
ActionOnUpdatePermanentMembers = "none",
AdoptExistingChannel = true,
PermanentMembers = new[] {},
Topic = "Adopt existing, don't kick members",
});
});
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{
ActionOnUpdatePermanentMembers: pulumi.String("none"),
AdoptExistingChannel: pulumi.Bool(true),
PermanentMembers: pulumi.StringArray{},
Topic: pulumi.String("Adopt existing, don't kick members"),
})
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()
.actionOnUpdatePermanentMembers("none")
.adoptExistingChannel(true)
.permanentMembers()
.topic("Adopt existing, don't kick members")
.build());
}
}
import pulumi
import pulumi_slack as slack
adopted = slack.Conversation("adopted",
action_on_update_permanent_members="none",
adopt_existing_channel=True,
permanent_members=[],
topic="Adopt existing, don't kick members")
import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";
const adopted = new slack.Conversation("adopted", {
actionOnUpdatePermanentMembers: "none",
adoptExistingChannel: true,
permanentMembers: [],
topic: "Adopt existing, don't kick members",
});
resources:
adopted:
type: slack:Conversation
properties:
actionOnUpdatePermanentMembers: none
adoptExistingChannel: true
permanentMembers: []
topic: Adopt existing, don't kick members
Create Conversation Resource
new Conversation(name: string, args: ConversationArgs, opts?: CustomResourceOptions);
@overload
def Conversation(resource_name: str,
opts: Optional[ResourceOptions] = None,
action_on_destroy: Optional[str] = None,
action_on_update_permanent_members: Optional[str] = None,
adopt_existing_channel: Optional[bool] = None,
is_archived: Optional[bool] = None,
is_private: Optional[bool] = None,
name: Optional[str] = None,
permanent_members: Optional[Sequence[str]] = None,
purpose: Optional[str] = None,
topic: Optional[str] = None)
@overload
def Conversation(resource_name: str,
args: ConversationArgs,
opts: Optional[ResourceOptions] = None)
func NewConversation(ctx *Context, name string, args ConversationArgs, opts ...ResourceOption) (*Conversation, error)
public Conversation(string name, ConversationArgs args, CustomResourceOptions? opts = null)
public Conversation(String name, ConversationArgs args)
public Conversation(String name, ConversationArgs args, CustomResourceOptions options)
type: slack:Conversation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConversationArgs
- 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 ConversationArgs
- 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 ConversationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConversationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConversationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Conversation 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 Conversation resource accepts the following input properties:
- Is
Private bool create a private channel instead of a public one.
- Action
On stringDestroy Either of none or archive
- Action
On stringUpdate Permanent Members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- Adopt
Existing boolChannel - Is
Archived bool indicates a conversation is archived. Frozen in time.
- Name string
name of the public or private channel.
- Permanent
Members List<string> user IDs to add to the channel.
- Purpose string
purpose of the channel.
- Topic string
topic for the channel.
- Is
Private bool create a private channel instead of a public one.
- Action
On stringDestroy Either of none or archive
- Action
On stringUpdate Permanent Members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- Adopt
Existing boolChannel - Is
Archived bool indicates a conversation is archived. Frozen in time.
- Name string
name of the public or private channel.
- Permanent
Members []string user IDs to add to the channel.
- Purpose string
purpose of the channel.
- Topic string
topic for the channel.
- is
Private Boolean create a private channel instead of a public one.
- action
On StringDestroy Either of none or archive
- action
On StringUpdate Permanent Members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- adopt
Existing BooleanChannel - is
Archived Boolean indicates a conversation is archived. Frozen in time.
- name String
name of the public or private channel.
- permanent
Members List<String> user IDs to add to the channel.
- purpose String
purpose of the channel.
- topic String
topic for the channel.
- is
Private boolean create a private channel instead of a public one.
- action
On stringDestroy Either of none or archive
- action
On stringUpdate Permanent Members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- adopt
Existing booleanChannel - is
Archived boolean indicates a conversation is archived. Frozen in time.
- name string
name of the public or private channel.
- permanent
Members string[] user IDs to add to the channel.
- purpose string
purpose of the channel.
- topic string
topic for the channel.
- is_
private bool create a private channel instead of a public one.
- action_
on_ strdestroy Either of none or archive
- action_
on_ strupdate_ permanent_ members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- adopt_
existing_ boolchannel - is_
archived bool indicates a conversation is archived. Frozen in time.
- name str
name of the public or private channel.
- permanent_
members Sequence[str] user IDs to add to the channel.
- purpose str
purpose of the channel.
- topic str
topic for the channel.
- is
Private Boolean create a private channel instead of a public one.
- action
On StringDestroy Either of none or archive
- action
On StringUpdate Permanent Members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- adopt
Existing BooleanChannel - is
Archived Boolean indicates a conversation is archived. Frozen in time.
- name String
name of the public or private channel.
- permanent
Members List<String> user IDs to add to the channel.
- purpose String
purpose of the channel.
- topic String
topic for the channel.
Outputs
All input properties are implicitly available as output properties. Additionally, the Conversation resource produces the following output properties:
- Created int
is a unix timestamp.
- Creator string
is the user ID of the member that created this channel.
- Id string
The provider-assigned unique ID for this managed resource.
- bool
represents this conversation as being part of a Shared Channel with a remote organization.
- Is
General bool will be true if this channel is the "general" channel that includes all regular team members.
- bool
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- bool
means the conversation is in some way shared between multiple workspaces.
- Created int
is a unix timestamp.
- Creator string
is the user ID of the member that created this channel.
- Id string
The provider-assigned unique ID for this managed resource.
- bool
represents this conversation as being part of a Shared Channel with a remote organization.
- Is
General bool will be true if this channel is the "general" channel that includes all regular team members.
- bool
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- bool
means the conversation is in some way shared between multiple workspaces.
- created Integer
is a unix timestamp.
- creator String
is the user ID of the member that created this channel.
- id String
The provider-assigned unique ID for this managed resource.
- Boolean
represents this conversation as being part of a Shared Channel with a remote organization.
- is
General Boolean will be true if this channel is the "general" channel that includes all regular team members.
- Boolean
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- Boolean
means the conversation is in some way shared between multiple workspaces.
- created number
is a unix timestamp.
- creator string
is the user ID of the member that created this channel.
- id string
The provider-assigned unique ID for this managed resource.
- boolean
represents this conversation as being part of a Shared Channel with a remote organization.
- is
General boolean will be true if this channel is the "general" channel that includes all regular team members.
- boolean
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- boolean
means the conversation is in some way shared between multiple workspaces.
- created int
is a unix timestamp.
- creator str
is the user ID of the member that created this channel.
- id str
The provider-assigned unique ID for this managed resource.
- bool
represents this conversation as being part of a Shared Channel with a remote organization.
- is_
general bool will be true if this channel is the "general" channel that includes all regular team members.
- bool
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- bool
means the conversation is in some way shared between multiple workspaces.
- created Number
is a unix timestamp.
- creator String
is the user ID of the member that created this channel.
- id String
The provider-assigned unique ID for this managed resource.
- Boolean
represents this conversation as being part of a Shared Channel with a remote organization.
- is
General Boolean will be true if this channel is the "general" channel that includes all regular team members.
- Boolean
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- Boolean
means the conversation is in some way shared between multiple workspaces.
Look up Existing Conversation Resource
Get an existing Conversation 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?: ConversationState, opts?: CustomResourceOptions): Conversation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action_on_destroy: Optional[str] = None,
action_on_update_permanent_members: Optional[str] = None,
adopt_existing_channel: Optional[bool] = None,
created: Optional[int] = None,
creator: Optional[str] = None,
is_archived: Optional[bool] = None,
is_ext_shared: Optional[bool] = None,
is_general: Optional[bool] = None,
is_org_shared: Optional[bool] = None,
is_private: Optional[bool] = None,
is_shared: Optional[bool] = None,
name: Optional[str] = None,
permanent_members: Optional[Sequence[str]] = None,
purpose: Optional[str] = None,
topic: Optional[str] = None) -> Conversation
func GetConversation(ctx *Context, name string, id IDInput, state *ConversationState, opts ...ResourceOption) (*Conversation, error)
public static Conversation Get(string name, Input<string> id, ConversationState? state, CustomResourceOptions? opts = null)
public static Conversation get(String name, Output<String> id, ConversationState 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.
- Action
On stringDestroy Either of none or archive
- Action
On stringUpdate Permanent Members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- Adopt
Existing boolChannel - Created int
is a unix timestamp.
- Creator string
is the user ID of the member that created this channel.
- Is
Archived bool indicates a conversation is archived. Frozen in time.
- bool
represents this conversation as being part of a Shared Channel with a remote organization.
- Is
General bool will be true if this channel is the "general" channel that includes all regular team members.
- bool
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- Is
Private bool create a private channel instead of a public one.
- bool
means the conversation is in some way shared between multiple workspaces.
- Name string
name of the public or private channel.
- Permanent
Members List<string> user IDs to add to the channel.
- Purpose string
purpose of the channel.
- Topic string
topic for the channel.
- Action
On stringDestroy Either of none or archive
- Action
On stringUpdate Permanent Members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- Adopt
Existing boolChannel - Created int
is a unix timestamp.
- Creator string
is the user ID of the member that created this channel.
- Is
Archived bool indicates a conversation is archived. Frozen in time.
- bool
represents this conversation as being part of a Shared Channel with a remote organization.
- Is
General bool will be true if this channel is the "general" channel that includes all regular team members.
- bool
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- Is
Private bool create a private channel instead of a public one.
- bool
means the conversation is in some way shared between multiple workspaces.
- Name string
name of the public or private channel.
- Permanent
Members []string user IDs to add to the channel.
- Purpose string
purpose of the channel.
- Topic string
topic for the channel.
- action
On StringDestroy Either of none or archive
- action
On StringUpdate Permanent Members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- adopt
Existing BooleanChannel - created Integer
is a unix timestamp.
- creator String
is the user ID of the member that created this channel.
- is
Archived Boolean indicates a conversation is archived. Frozen in time.
- Boolean
represents this conversation as being part of a Shared Channel with a remote organization.
- is
General Boolean will be true if this channel is the "general" channel that includes all regular team members.
- Boolean
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- is
Private Boolean create a private channel instead of a public one.
- Boolean
means the conversation is in some way shared between multiple workspaces.
- name String
name of the public or private channel.
- permanent
Members List<String> user IDs to add to the channel.
- purpose String
purpose of the channel.
- topic String
topic for the channel.
- action
On stringDestroy Either of none or archive
- action
On stringUpdate Permanent Members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- adopt
Existing booleanChannel - created number
is a unix timestamp.
- creator string
is the user ID of the member that created this channel.
- is
Archived boolean indicates a conversation is archived. Frozen in time.
- boolean
represents this conversation as being part of a Shared Channel with a remote organization.
- is
General boolean will be true if this channel is the "general" channel that includes all regular team members.
- boolean
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- is
Private boolean create a private channel instead of a public one.
- boolean
means the conversation is in some way shared between multiple workspaces.
- name string
name of the public or private channel.
- permanent
Members string[] user IDs to add to the channel.
- purpose string
purpose of the channel.
- topic string
topic for the channel.
- action_
on_ strdestroy Either of none or archive
- action_
on_ strupdate_ permanent_ members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- adopt_
existing_ boolchannel - created int
is a unix timestamp.
- creator str
is the user ID of the member that created this channel.
- is_
archived bool indicates a conversation is archived. Frozen in time.
- bool
represents this conversation as being part of a Shared Channel with a remote organization.
- is_
general bool will be true if this channel is the "general" channel that includes all regular team members.
- bool
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- is_
private bool create a private channel instead of a public one.
- bool
means the conversation is in some way shared between multiple workspaces.
- name str
name of the public or private channel.
- permanent_
members Sequence[str] user IDs to add to the channel.
- purpose str
purpose of the channel.
- topic str
topic for the channel.
- action
On StringDestroy Either of none or archive
- action
On StringUpdate Permanent Members indicate whether the members should be kick of the channel when removed from
permanent_members
. When set tonone
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.- adopt
Existing BooleanChannel - created Number
is a unix timestamp.
- creator String
is the user ID of the member that created this channel.
- is
Archived Boolean indicates a conversation is archived. Frozen in time.
- Boolean
represents this conversation as being part of a Shared Channel with a remote organization.
- is
General Boolean will be true if this channel is the "general" channel that includes all regular team members.
- Boolean
explains whether this shared channel is shared between Enterprise Grid workspaces within the same organization.
- is
Private Boolean create a private channel instead of a public one.
- Boolean
means the conversation is in some way shared between multiple workspaces.
- name String
name of the public or private channel.
- permanent
Members List<String> user IDs to add to the channel.
- purpose String
purpose of the channel.
- topic String
topic for the channel.
Import
slack_conversation
can be imported using the ID of the conversation/channel, e.g.
$ pulumi import slack:index/conversation:Conversation my_conversation C023X7QTFHQ
Package Details
- Repository
- slack pulumi/pulumi-slack
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
slack
Terraform Provider.