UNPKG

@pulumi/slack

Version:

A Pulumi package for managing Slack workspaces.

124 lines (123 loc) 3.39 kB
import * as pulumi from "@pulumi/pulumi"; /** * Use this data source to get information about a usergroups for use in other * resources. The data source returns enabled groups only. * * ## Required scopes * * This resource requires the following scopes: * * - [usergroups:read](https://api.slack.com/scopes/usergroups:read) * * The Slack API methods used by the resource are: * * - [usergroups.list](https://api.slack.com/methods/usergroups.list) * * 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 byName = slack.getUsergroup({ * name: "my-usergroup", * }); * const byId = slack.getUsergroup({ * usergroupId: "USERGROUP00", * }); * ``` */ export declare function getUsergroup(args?: GetUsergroupArgs, opts?: pulumi.InvokeOptions): Promise<GetUsergroupResult>; /** * A collection of arguments for invoking getUsergroup. */ export interface GetUsergroupArgs { /** * The name of the usergroup */ name?: string; /** * The id of the usergroup * * The data source expects exactly one of these fields, you can't set both. */ usergroupId?: string; } /** * A collection of values returned by getUsergroup. */ export interface GetUsergroupResult { /** * The channel IDs for which the User Group uses as a default. */ readonly channels: string[]; /** * The short description of the User Group. */ readonly description: string; /** * The mention handle. */ readonly handle: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly name?: string; readonly usergroupId?: string; /** * The user IDs that represent the entire list of users for the * User Group. */ readonly users: string[]; } /** * Use this data source to get information about a usergroups for use in other * resources. The data source returns enabled groups only. * * ## Required scopes * * This resource requires the following scopes: * * - [usergroups:read](https://api.slack.com/scopes/usergroups:read) * * The Slack API methods used by the resource are: * * - [usergroups.list](https://api.slack.com/methods/usergroups.list) * * 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 byName = slack.getUsergroup({ * name: "my-usergroup", * }); * const byId = slack.getUsergroup({ * usergroupId: "USERGROUP00", * }); * ``` */ export declare function getUsergroupOutput(args?: GetUsergroupOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetUsergroupResult>; /** * A collection of arguments for invoking getUsergroup. */ export interface GetUsergroupOutputArgs { /** * The name of the usergroup */ name?: pulumi.Input<string>; /** * The id of the usergroup * * The data source expects exactly one of these fields, you can't set both. */ usergroupId?: pulumi.Input<string>; }