Slack

v0.2.2 published on Friday, Aug 19, 2022 by Pulumi

getConversation

Use this data source to get information about a Slack conversation for use in other resources.

Required scopes

This resource requires the following scopes:

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

using System.Collections.Generic;
using Pulumi;
using Slack = Pulumi.Slack;

return await Deployment.RunAsync(() => 
{
    var test = Slack.GetConversation.Invoke(new()
    {
        ChannelId = "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.LookupConversation(ctx, &GetConversationArgs{
			ChannelId: "my-channel",
		}, 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());

    }
}
import pulumi
import pulumi_slack as slack

test = slack.get_conversation(channel_id="my-channel")
import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";

const test = pulumi.output(slack.getConversation({
    channelId: "my-channel",
}));
variables:
  test:
    Fn::Invoke:
      Function: slack:getConversation
      Arguments:
        channelId: my-channel

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,
                     opts: Optional[InvokeOptions] = None) -> GetConversationResult
def get_conversation_output(channel_id: 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:

ChannelId string

The ID of the channel

ChannelId string

The ID of the channel

channelId String

The ID of the channel

channelId string

The ID of the channel

channel_id str

The ID of the channel

channelId String

The ID of the channel

getConversation Result

The following output properties are available:

ChannelId string
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.

IsArchived bool

indicates a conversation is archived. Frozen in time.

IsExtShared bool

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

IsGeneral bool

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

IsOrgShared bool

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

IsPrivate bool

means the conversation is privileged between two or more members.

IsShared bool

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

Name string

name of the public or private channel.

Purpose string

purpose of the channel.

Topic string

topic for the channel.

ChannelId string
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.

IsArchived bool

indicates a conversation is archived. Frozen in time.

IsExtShared bool

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

IsGeneral bool

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

IsOrgShared bool

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

IsPrivate bool

means the conversation is privileged between two or more members.

IsShared bool

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

Name string

name of the public or private channel.

Purpose string

purpose of the channel.

Topic string

topic for the channel.

channelId String
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.

isArchived Boolean

indicates a conversation is archived. Frozen in time.

isExtShared Boolean

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

isGeneral Boolean

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

isOrgShared Boolean

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

isPrivate Boolean

means the conversation is privileged between two or more members.

isShared Boolean

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

name String

name of the public or private channel.

purpose String

purpose of the channel.

topic String

topic for the channel.

channelId string
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.

isArchived boolean

indicates a conversation is archived. Frozen in time.

isExtShared boolean

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

isGeneral boolean

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

isOrgShared boolean

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

isPrivate boolean

means the conversation is privileged between two or more members.

isShared boolean

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

name string

name of the public or private channel.

purpose string

purpose of the channel.

topic string

topic for the channel.

channel_id str
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.

is_ext_shared 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.

is_org_shared bool

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

is_private bool

means the conversation is privileged between two or more members.

is_shared bool

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

name str

name of the public or private channel.

purpose str

purpose of the channel.

topic str

topic for the channel.

channelId String
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.

isArchived Boolean

indicates a conversation is archived. Frozen in time.

isExtShared Boolean

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

isGeneral Boolean

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

isOrgShared Boolean

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

isPrivate Boolean

means the conversation is privileged between two or more members.

isShared Boolean

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

name String

name of the public or private channel.

purpose String

purpose of the channel.

topic String

topic for the channel.

Package Details

Repository
https://github.com/pulumi/pulumi-slack
License
Apache-2.0
Notes

This Pulumi package is based on the slack Terraform Provider.