@pulumi/slack
Version:
A Pulumi package for managing Slack workspaces.
88 lines • 2.81 kB
JavaScript
;
// *** 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.getUsergroupOutput = exports.getUsergroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* 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",
* });
* ```
*/
function getUsergroup(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("slack:index/getUsergroup:getUsergroup", {
"name": args.name,
"usergroupId": args.usergroupId,
}, opts);
}
exports.getUsergroup = getUsergroup;
/**
* 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",
* });
* ```
*/
function getUsergroupOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("slack:index/getUsergroup:getUsergroup", {
"name": args.name,
"usergroupId": args.usergroupId,
}, opts);
}
exports.getUsergroupOutput = getUsergroupOutput;
//# sourceMappingURL=getUsergroup.js.map