get Conversation
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:
conversations.members 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")
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 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
})
}
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
Return
A collection of values returned by getConversation.
Parameters
A collection of arguments for invoking getConversation.
Return
A collection of values returned by getConversation.
Parameters
The ID of the channel
The conversation is privileged between two or more members Either channel_id
or name
must be provided. is_private
only works in conjunction with name
.
The name of the public or private channel
See also
Return
A collection of values returned by getConversation.
Parameters
Builder for com.pulumi.slack.kotlin.inputs.GetConversationPlainArgs.