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 The Slack API methods used by the resource are:

  • usergroups.list If you get missing_scope errors while using this resource check the scopes against the documentation for the methods above.

Example Usage

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.GetUsergroupArgs;
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 byName = SlackFunctions.getUsergroup(GetUsergroupArgs.builder()
.name("my-usergroup")
.build());
final var byId = SlackFunctions.getUsergroup(GetUsergroupArgs.builder()
.usergroupId("USERGROUP00")
.build());
}
}

Return

A collection of values returned by getUsergroup.

Parameters

argument

A collection of arguments for invoking getUsergroup.


suspend fun getUsergroup(name: String? = null, usergroupId: String? = null): GetUsergroupResult

Return

A collection of values returned by getUsergroup.

See also

Parameters

name

The name of the usergroup

usergroupId

The id of the usergroup


Return

A collection of values returned by getUsergroup.

See also

Parameters

argument

Builder for com.pulumi.slack.kotlin.inputs.GetUsergroupPlainArgs.