slack.getConversation
Explore with Pulumi AI
Use this data source to get information about a Slack conversation for use in other resources.
Required scopes
This resource requires the following scopes:
- channels:read (public channels)
- groups:read (private channels)
The Slack API methods used by the resource are:
If you get missing_scope
errors while using this resource check the scopes against
the documentation for the methods above.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";
const test = slack.getConversation({
channelId: "my-channel",
});
const test-name = slack.getConversation({
name: "my-channel-name",
});
import pulumi
import pulumi_slack as slack
test = slack.get_conversation(channel_id="my-channel")
test_name = slack.get_conversation(name="my-channel-name")
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.LookupConversation(ctx, &slack.LookupConversationArgs{
ChannelId: pulumi.StringRef("my-channel"),
}, nil)
if err != nil {
return err
}
_, err = slack.LookupConversation(ctx, &slack.LookupConversationArgs{
Name: pulumi.StringRef("my-channel-name"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Slack = Pulumi.Slack;
return await Deployment.RunAsync(() =>
{
var test = Slack.GetConversation.Invoke(new()
{
ChannelId = "my-channel",
});
var test_name = Slack.GetConversation.Invoke(new()
{
Name = "my-channel-name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.slack.SlackFunctions;
import com.pulumi.slack.inputs.GetConversationArgs;
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) {
final var test = SlackFunctions.getConversation(GetConversationArgs.builder()
.channelId("my-channel")
.build());
final var test-name = SlackFunctions.getConversation(GetConversationArgs.builder()
.name("my-channel-name")
.build());
}
}
variables:
test:
fn::invoke:
Function: slack:getConversation
Arguments:
channelId: my-channel
test-name:
fn::invoke:
Function: slack:getConversation
Arguments:
name: my-channel-name
Using getConversation
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getConversation(args: GetConversationArgs, opts?: InvokeOptions): Promise<GetConversationResult>
function getConversationOutput(args: GetConversationOutputArgs, opts?: InvokeOptions): Output<GetConversationResult>
def get_conversation(channel_id: Optional[str] = None,
is_private: Optional[bool] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetConversationResult
def get_conversation_output(channel_id: Optional[pulumi.Input[str]] = None,
is_private: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetConversationResult]
func LookupConversation(ctx *Context, args *LookupConversationArgs, opts ...InvokeOption) (*LookupConversationResult, error)
func LookupConversationOutput(ctx *Context, args *LookupConversationOutputArgs, opts ...InvokeOption) LookupConversationResultOutput
> Note: This function is named LookupConversation
in the Go SDK.
public static class GetConversation
{
public static Task<GetConversationResult> InvokeAsync(GetConversationArgs args, InvokeOptions? opts = null)
public static Output<GetConversationResult> Invoke(GetConversationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConversationResult> getConversation(GetConversationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: slack:index/getConversation:getConversation
arguments:
# arguments dictionary
The following arguments are supported:
- channel_
id str - The ID of the channel
- is_
private bool The conversation is privileged between two or more members
Either
channel_id
orname
must be provided.is_private
only works in conjunction withname
.- name str
- The name of the public or private channel
getConversation Result
The following output properties are available:
- 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.
- 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.
- bool
- means the conversation is in some way shared between multiple workspaces.
- Purpose string
- purpose of the channel.
- Topic string
- topic for the channel.
- Channel
Id string - Is
Private bool - means the conversation is privileged between two or more members.
- Name string
- name of the public or private channel.
- 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.
- 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.
- bool
- means the conversation is in some way shared between multiple workspaces.
- Purpose string
- purpose of the channel.
- Topic string
- topic for the channel.
- Channel
Id string - Is
Private bool - means the conversation is privileged between two or more members.
- Name string
- name of the public or private channel.
- 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.
- 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.
- Boolean
- means the conversation is in some way shared between multiple workspaces.
- purpose String
- purpose of the channel.
- topic String
- topic for the channel.
- channel
Id String - is
Private Boolean - means the conversation is privileged between two or more members.
- name String
- name of the public or private channel.
- 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.
- 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.
- boolean
- means the conversation is in some way shared between multiple workspaces.
- purpose string
- purpose of the channel.
- topic string
- topic for the channel.
- channel
Id string - is
Private boolean - means the conversation is privileged between two or more members.
- name string
- name of the public or private channel.
- 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.
- 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.
- bool
- means the conversation is in some way shared between multiple workspaces.
- purpose str
- purpose of the channel.
- topic str
- topic for the channel.
- channel_
id str - is_
private bool - means the conversation is privileged between two or more members.
- name str
- name of the public or private channel.
- 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.
- 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.
- Boolean
- means the conversation is in some way shared between multiple workspaces.
- purpose String
- purpose of the channel.
- topic String
- topic for the channel.
- channel
Id String - is
Private Boolean - means the conversation is privileged between two or more members.
- name String
- name of the public or private channel.
Package Details
- Repository
- slack pulumi/pulumi-slack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
slack
Terraform Provider.