UNPKG

@pulumi/slack

Version:

A Pulumi package for managing Slack workspaces.

167 lines (166 loc) 4.88 kB
import * as pulumi from "@pulumi/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: * * - [channels:read](https://api.slack.com/scopes/channels:read) (public channels) * - [groups:read](https://api.slack.com/scopes/groups:read) (private channels) * * The Slack API methods used by the resource are: * * - [conversations.info](https://api.slack.com/methods/conversations.info) * - [conversations.members](https://api.slack.com/methods/conversations.members) * * If you get `missingScope` errors while using this resource check the scopes against * the documentation for the methods above. * * ## Example Usage * * ```typescript * 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", * }); * ``` */ export declare function getConversation(args?: GetConversationArgs, opts?: pulumi.InvokeOptions): Promise<GetConversationResult>; /** * A collection of arguments for invoking getConversation. */ export interface GetConversationArgs { /** * The ID of the channel */ channelId?: string; /** * The conversation is privileged between two or more members * * Either `channelId` or `name` must be provided. `isPrivate` only works in conjunction * with `name`. */ isPrivate?: boolean; /** * The name of the public or private channel */ name?: string; } /** * A collection of values returned by getConversation. */ export interface GetConversationResult { readonly channelId?: string; /** * is a unix timestamp. */ readonly created: number; /** * is the user ID of the member that created this channel. */ readonly creator: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * indicates a conversation is archived. Frozen in time. */ readonly isArchived: boolean; /** * represents this conversation as being part of a Shared Channel * with a remote organization. */ readonly isExtShared: boolean; /** * will be true if this channel is the "general" channel that includes * all regular team members. */ readonly isGeneral: boolean; /** * explains whether this shared channel is shared between Enterprise * Grid workspaces within the same organization. */ readonly isOrgShared: boolean; /** * means the conversation is privileged between two or more members. */ readonly isPrivate?: boolean; /** * means the conversation is in some way shared between multiple workspaces. */ readonly isShared: boolean; /** * name of the public or private channel. */ readonly name?: string; /** * purpose of the channel. */ readonly purpose: string; /** * topic for the channel. */ readonly topic: string; } /** * 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](https://api.slack.com/scopes/channels:read) (public channels) * - [groups:read](https://api.slack.com/scopes/groups:read) (private channels) * * The Slack API methods used by the resource are: * * - [conversations.info](https://api.slack.com/methods/conversations.info) * - [conversations.members](https://api.slack.com/methods/conversations.members) * * If you get `missingScope` errors while using this resource check the scopes against * the documentation for the methods above. * * ## Example Usage * * ```typescript * 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", * }); * ``` */ export declare function getConversationOutput(args?: GetConversationOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetConversationResult>; /** * A collection of arguments for invoking getConversation. */ export interface GetConversationOutputArgs { /** * The ID of the channel */ channelId?: pulumi.Input<string>; /** * The conversation is privileged between two or more members * * Either `channelId` or `name` must be provided. `isPrivate` only works in conjunction * with `name`. */ isPrivate?: pulumi.Input<boolean>; /** * The name of the public or private channel */ name?: pulumi.Input<string>; }