com.pulumi.slack.SlackFunctions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of slack Show documentation
Show all versions of slack Show documentation
A Pulumi package for managing Slack workspaces.
The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.slack;
import com.pulumi.core.Output;
import com.pulumi.core.TypeShape;
import com.pulumi.deployment.Deployment;
import com.pulumi.deployment.InvokeOptions;
import com.pulumi.slack.Utilities;
import com.pulumi.slack.inputs.GetConversationArgs;
import com.pulumi.slack.inputs.GetConversationPlainArgs;
import com.pulumi.slack.inputs.GetUserArgs;
import com.pulumi.slack.inputs.GetUserPlainArgs;
import com.pulumi.slack.inputs.GetUsergroupArgs;
import com.pulumi.slack.inputs.GetUsergroupPlainArgs;
import com.pulumi.slack.outputs.GetConversationResult;
import com.pulumi.slack.outputs.GetUserResult;
import com.pulumi.slack.outputs.GetUsergroupResult;
import java.util.concurrent.CompletableFuture;
public final class SlackFunctions {
/**
* Use this data source to get information about a Slack conversation for use in other
* resources.
*
* ## Required scopes
*
* This resource requires the following scopes:
*
* - [channels:read](https://api.slack.com/scopes/channels:read) (public channels)
* - [groups:read](https://api.slack.com/scopes/groups:read) (private channels)
*
* The Slack API methods used by the resource are:
*
* - [conversations.info](https://api.slack.com/methods/conversations.info)
* - [conversations.members](https://api.slack.com/methods/conversations.members)
*
* If you get `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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.GetConversationArgs;
* 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 test = SlackFunctions.getConversation(GetConversationArgs.builder()
* .channelId("my-channel")
* .build());
*
* final var test-name = SlackFunctions.getConversation(GetConversationArgs.builder()
* .name("my-channel-name")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getConversation() {
return getConversation(GetConversationArgs.Empty, InvokeOptions.Empty);
}
/**
* Use this data source to get information about a Slack conversation for use in other
* resources.
*
* ## Required scopes
*
* This resource requires the following scopes:
*
* - [channels:read](https://api.slack.com/scopes/channels:read) (public channels)
* - [groups:read](https://api.slack.com/scopes/groups:read) (private channels)
*
* The Slack API methods used by the resource are:
*
* - [conversations.info](https://api.slack.com/methods/conversations.info)
* - [conversations.members](https://api.slack.com/methods/conversations.members)
*
* If you get `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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.GetConversationArgs;
* 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 test = SlackFunctions.getConversation(GetConversationArgs.builder()
* .channelId("my-channel")
* .build());
*
* final var test-name = SlackFunctions.getConversation(GetConversationArgs.builder()
* .name("my-channel-name")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getConversationPlain() {
return getConversationPlain(GetConversationPlainArgs.Empty, InvokeOptions.Empty);
}
/**
* Use this data source to get information about a Slack conversation for use in other
* resources.
*
* ## Required scopes
*
* This resource requires the following scopes:
*
* - [channels:read](https://api.slack.com/scopes/channels:read) (public channels)
* - [groups:read](https://api.slack.com/scopes/groups:read) (private channels)
*
* The Slack API methods used by the resource are:
*
* - [conversations.info](https://api.slack.com/methods/conversations.info)
* - [conversations.members](https://api.slack.com/methods/conversations.members)
*
* If you get `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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.GetConversationArgs;
* 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 test = SlackFunctions.getConversation(GetConversationArgs.builder()
* .channelId("my-channel")
* .build());
*
* final var test-name = SlackFunctions.getConversation(GetConversationArgs.builder()
* .name("my-channel-name")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getConversation(GetConversationArgs args) {
return getConversation(args, InvokeOptions.Empty);
}
/**
* Use this data source to get information about a Slack conversation for use in other
* resources.
*
* ## Required scopes
*
* This resource requires the following scopes:
*
* - [channels:read](https://api.slack.com/scopes/channels:read) (public channels)
* - [groups:read](https://api.slack.com/scopes/groups:read) (private channels)
*
* The Slack API methods used by the resource are:
*
* - [conversations.info](https://api.slack.com/methods/conversations.info)
* - [conversations.members](https://api.slack.com/methods/conversations.members)
*
* If you get `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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.GetConversationArgs;
* 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 test = SlackFunctions.getConversation(GetConversationArgs.builder()
* .channelId("my-channel")
* .build());
*
* final var test-name = SlackFunctions.getConversation(GetConversationArgs.builder()
* .name("my-channel-name")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getConversationPlain(GetConversationPlainArgs args) {
return getConversationPlain(args, InvokeOptions.Empty);
}
/**
* Use this data source to get information about a Slack conversation for use in other
* resources.
*
* ## Required scopes
*
* This resource requires the following scopes:
*
* - [channels:read](https://api.slack.com/scopes/channels:read) (public channels)
* - [groups:read](https://api.slack.com/scopes/groups:read) (private channels)
*
* The Slack API methods used by the resource are:
*
* - [conversations.info](https://api.slack.com/methods/conversations.info)
* - [conversations.members](https://api.slack.com/methods/conversations.members)
*
* If you get `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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.GetConversationArgs;
* 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 test = SlackFunctions.getConversation(GetConversationArgs.builder()
* .channelId("my-channel")
* .build());
*
* final var test-name = SlackFunctions.getConversation(GetConversationArgs.builder()
* .name("my-channel-name")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getConversation(GetConversationArgs args, InvokeOptions options) {
return Deployment.getInstance().invoke("slack:index/getConversation:getConversation", TypeShape.of(GetConversationResult.class), args, Utilities.withVersion(options));
}
/**
* Use this data source to get information about a Slack conversation for use in other
* resources.
*
* ## Required scopes
*
* This resource requires the following scopes:
*
* - [channels:read](https://api.slack.com/scopes/channels:read) (public channels)
* - [groups:read](https://api.slack.com/scopes/groups:read) (private channels)
*
* The Slack API methods used by the resource are:
*
* - [conversations.info](https://api.slack.com/methods/conversations.info)
* - [conversations.members](https://api.slack.com/methods/conversations.members)
*
* If you get `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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.GetConversationArgs;
* 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 test = SlackFunctions.getConversation(GetConversationArgs.builder()
* .channelId("my-channel")
* .build());
*
* final var test-name = SlackFunctions.getConversation(GetConversationArgs.builder()
* .name("my-channel-name")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getConversationPlain(GetConversationPlainArgs args, InvokeOptions options) {
return Deployment.getInstance().invokeAsync("slack:index/getConversation:getConversation", TypeShape.of(GetConversationResult.class), args, Utilities.withVersion(options));
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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 }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* final var byName = SlackFunctions.getUser(GetUserArgs.builder()
* .name("my-user")
* .build());
*
* final var byEmail = SlackFunctions.getUser(GetUserArgs.builder()
* .email("my-user}{@literal @}{@code example.com")
* .build());
*
* }}{@code
* }}{@code
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getUser() {
return getUser(GetUserArgs.Empty, InvokeOptions.Empty);
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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 }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* final var byName = SlackFunctions.getUser(GetUserArgs.builder()
* .name("my-user")
* .build());
*
* final var byEmail = SlackFunctions.getUser(GetUserArgs.builder()
* .email("my-user}{@literal @}{@code example.com")
* .build());
*
* }}{@code
* }}{@code
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getUserPlain() {
return getUserPlain(GetUserPlainArgs.Empty, InvokeOptions.Empty);
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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 }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* final var byName = SlackFunctions.getUser(GetUserArgs.builder()
* .name("my-user")
* .build());
*
* final var byEmail = SlackFunctions.getUser(GetUserArgs.builder()
* .email("my-user}{@literal @}{@code example.com")
* .build());
*
* }}{@code
* }}{@code
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getUser(GetUserArgs args) {
return getUser(args, InvokeOptions.Empty);
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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 }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* final var byName = SlackFunctions.getUser(GetUserArgs.builder()
* .name("my-user")
* .build());
*
* final var byEmail = SlackFunctions.getUser(GetUserArgs.builder()
* .email("my-user}{@literal @}{@code example.com")
* .build());
*
* }}{@code
* }}{@code
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getUserPlain(GetUserPlainArgs args) {
return getUserPlain(args, InvokeOptions.Empty);
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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 }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* final var byName = SlackFunctions.getUser(GetUserArgs.builder()
* .name("my-user")
* .build());
*
* final var byEmail = SlackFunctions.getUser(GetUserArgs.builder()
* .email("my-user}{@literal @}{@code example.com")
* .build());
*
* }}{@code
* }}{@code
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getUser(GetUserArgs args, InvokeOptions options) {
return Deployment.getInstance().invoke("slack:index/getUser:getUser", TypeShape.of(GetUserResult.class), args, Utilities.withVersion(options));
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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 }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* final var byName = SlackFunctions.getUser(GetUserArgs.builder()
* .name("my-user")
* .build());
*
* final var byEmail = SlackFunctions.getUser(GetUserArgs.builder()
* .email("my-user}{@literal @}{@code example.com")
* .build());
*
* }}{@code
* }}{@code
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getUserPlain(GetUserPlainArgs args, InvokeOptions options) {
return Deployment.getInstance().invokeAsync("slack:index/getUser:getUser", TypeShape.of(GetUserResult.class), args, Utilities.withVersion(options));
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getUsergroup() {
return getUsergroup(GetUsergroupArgs.Empty, InvokeOptions.Empty);
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getUsergroupPlain() {
return getUsergroupPlain(GetUsergroupPlainArgs.Empty, InvokeOptions.Empty);
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getUsergroup(GetUsergroupArgs args) {
return getUsergroup(args, InvokeOptions.Empty);
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getUsergroupPlain(GetUsergroupPlainArgs args) {
return getUsergroupPlain(args, InvokeOptions.Empty);
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getUsergroup(GetUsergroupArgs args, InvokeOptions options) {
return Deployment.getInstance().invoke("slack:index/getUsergroup:getUsergroup", TypeShape.of(GetUsergroupResult.class), args, Utilities.withVersion(options));
}
/**
* 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 `missing_scope` errors while using this resource check the scopes against
* the documentation for the methods above.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getUsergroupPlain(GetUsergroupPlainArgs args, InvokeOptions options) {
return Deployment.getInstance().invokeAsync("slack:index/getUsergroup:getUsergroup", TypeShape.of(GetUsergroupResult.class), args, Utilities.withVersion(options));
}
}