get Groups
This data source provides the Cloud Sso Groups of the current Alibaba Cloud user.
NOTE: Available in v1.138.0+. NOTE: Cloud SSO Only Support
cn-shanghai
Andus-west-1
Region
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cloudsso.CloudssoFunctions;
import com.pulumi.alicloud.cloudsso.inputs.GetGroupsArgs;
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 ids = CloudssoFunctions.getGroups(GetGroupsArgs.builder()
.directoryId("example_value")
.ids(
"example_value-1",
"example_value-2")
.build());
ctx.export("cloudSsoGroupId1", ids.applyValue(getGroupsResult -> getGroupsResult.groups()[0].id()));
final var nameRegex = CloudssoFunctions.getGroups(GetGroupsArgs.builder()
.directoryId("example_value")
.nameRegex("^my-Group")
.build());
ctx.export("cloudSsoGroupId2", nameRegex.applyValue(getGroupsResult -> getGroupsResult.groups()[0].id()));
}
}
Content copied to clipboard
Return
A collection of values returned by getGroups.
Parameters
argument
A collection of arguments for invoking getGroups.
suspend fun getGroups(directoryId: String, ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, provisionType: String? = null): GetGroupsResult
Return
A collection of values returned by getGroups.
See also
Parameters
directory Id
The ID of the Directory.
ids
A list of Group IDs.
name Regex
A regex string to filter results by Group name.
output File
provision Type
The Provision Type of the Group. Valid values: Manual
, Synchronized
.
Return
A collection of values returned by getGroups.
See also
Parameters
argument
Builder for com.pulumi.alicloud.cloudsso.kotlin.inputs.GetGroupsPlainArgs.