1. Packages
  2. Slack
  3. API Docs
  4. getConversation
Slack v0.4.5 published on Friday, May 24, 2024 by Pulumi

slack.getConversation

Explore with Pulumi AI

slack logo
Slack v0.4.5 published on Friday, May 24, 2024 by Pulumi

    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

    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:

    ChannelId string
    The ID of the channel
    IsPrivate bool

    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.

    Name string
    The name of the public or private channel
    ChannelId string
    The ID of the channel
    IsPrivate bool

    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.

    Name string
    The name of the public or private channel
    channelId String
    The ID of the channel
    isPrivate Boolean

    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.

    name String
    The name of the public or private channel
    channelId string
    The ID of the channel
    isPrivate boolean

    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.

    name string
    The name of the public or private channel
    channel_id str
    The ID of the channel
    is_private bool

    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.

    name str
    The name of the public or private channel
    channelId String
    The ID of the channel
    isPrivate Boolean

    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.

    name String
    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.
    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.
    IsShared bool
    means the conversation is in some way shared between multiple workspaces.
    Purpose string
    purpose of the channel.
    Topic string
    topic for the channel.
    ChannelId string
    IsPrivate 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.
    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.
    IsShared bool
    means the conversation is in some way shared between multiple workspaces.
    Purpose string
    purpose of the channel.
    Topic string
    topic for the channel.
    ChannelId string
    IsPrivate 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.
    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.
    isShared Boolean
    means the conversation is in some way shared between multiple workspaces.
    purpose String
    purpose of the channel.
    topic String
    topic for the channel.
    channelId String
    isPrivate 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.
    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.
    isShared boolean
    means the conversation is in some way shared between multiple workspaces.
    purpose string
    purpose of the channel.
    topic string
    topic for the channel.
    channelId string
    isPrivate 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.
    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_shared 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.
    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.
    isShared Boolean
    means the conversation is in some way shared between multiple workspaces.
    purpose String
    purpose of the channel.
    topic String
    topic for the channel.
    channelId String
    isPrivate 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.
    slack logo
    Slack v0.4.5 published on Friday, May 24, 2024 by Pulumi