UNPKG

@pulumi/slack

Version:

A Pulumi package for managing Slack workspaces.

92 lines 2.85 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getUserOutput = exports.getUser = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Use this data source to get information about a user for use in other * resources. * * ## Required scopes * * This resource requires the following scopes: * * - [users:read](https://api.slack.com/scopes/users:read) * - [users:read.email](https://api.slack.com/scopes/users:read.email) * * The Slack API methods used by the resource are: * * - [users.lookupByEmail](https://api.slack.com/methods/users.lookupByEmail) * - [users.list](https://api.slack.com/methods/users.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.getUser({ * name: "my-user", * }); * const byEmail = slack.getUser({ * email: "my-user@example.com", * }); * ``` */ function getUser(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("slack:index/getUser:getUser", { "email": args.email, "name": args.name, }, opts); } exports.getUser = getUser; /** * Use this data source to get information about a user for use in other * resources. * * ## Required scopes * * This resource requires the following scopes: * * - [users:read](https://api.slack.com/scopes/users:read) * - [users:read.email](https://api.slack.com/scopes/users:read.email) * * The Slack API methods used by the resource are: * * - [users.lookupByEmail](https://api.slack.com/methods/users.lookupByEmail) * - [users.list](https://api.slack.com/methods/users.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.getUser({ * name: "my-user", * }); * const byEmail = slack.getUser({ * email: "my-user@example.com", * }); * ``` */ function getUserOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("slack:index/getUser:getUser", { "email": args.email, "name": args.name, }, opts); } exports.getUserOutput = getUserOutput; //# sourceMappingURL=getUser.js.map