get User
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.email The Slack API methods used by the resource are:
users.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.GetUserArgs;
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.getUser(GetUserArgs.builder()
.name("my-user")
.build());
final var byEmail = SlackFunctions.getUser(GetUserArgs.builder()
.email("my-user@example.com")
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getUser.
Parameters
argument
A collection of arguments for invoking getUser.
Return
A collection of values returned by getUser.
See also
Parameters
email
The email of the user
name
The name of the user
Return
A collection of values returned by getUser.
See also
Parameters
argument
Builder for com.pulumi.slack.kotlin.inputs.GetUserPlainArgs.