1. Packages
  2. Ucloud Provider
  3. API Docs
  4. getIamGroups
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

ucloud.getIamGroups

Explore with Pulumi AI

ucloud logo
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

    Provides a list of IAM groups.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ucloud from "@pulumi/ucloud";
    
    const foo = ucloud.getIamGroups({
        nameRegex: "^Administrator$",
    });
    
    import pulumi
    import pulumi_ucloud as ucloud
    
    foo = ucloud.get_iam_groups(name_regex="^Administrator$")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ucloud.GetIamGroups(ctx, &ucloud.GetIamGroupsArgs{
    			NameRegex: pulumi.StringRef("^Administrator$"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ucloud = Pulumi.Ucloud;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = Ucloud.GetIamGroups.Invoke(new()
        {
            NameRegex = "^Administrator$",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ucloud.UcloudFunctions;
    import com.pulumi.ucloud.inputs.GetIamGroupsArgs;
    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 foo = UcloudFunctions.getIamGroups(GetIamGroupsArgs.builder()
                .nameRegex("^Administrator$")
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          function: ucloud:getIamGroups
          arguments:
            nameRegex: ^Administrator$
    

    Using getIamGroups

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getIamGroups(args: GetIamGroupsArgs, opts?: InvokeOptions): Promise<GetIamGroupsResult>
    function getIamGroupsOutput(args: GetIamGroupsOutputArgs, opts?: InvokeOptions): Output<GetIamGroupsResult>
    def get_iam_groups(id: Optional[str] = None,
                       name_regex: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetIamGroupsResult
    def get_iam_groups_output(id: Optional[pulumi.Input[str]] = None,
                       name_regex: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetIamGroupsResult]
    func GetIamGroups(ctx *Context, args *GetIamGroupsArgs, opts ...InvokeOption) (*GetIamGroupsResult, error)
    func GetIamGroupsOutput(ctx *Context, args *GetIamGroupsOutputArgs, opts ...InvokeOption) GetIamGroupsResultOutput

    > Note: This function is named GetIamGroups in the Go SDK.

    public static class GetIamGroups 
    {
        public static Task<GetIamGroupsResult> InvokeAsync(GetIamGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetIamGroupsResult> Invoke(GetIamGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamGroupsResult> getIamGroups(GetIamGroupsArgs args, InvokeOptions options)
    public static Output<GetIamGroupsResult> getIamGroups(GetIamGroupsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ucloud:index/getIamGroups:getIamGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    NameRegex string
    A regex string to filter the returned groups by their names.
    Id string
    NameRegex string
    A regex string to filter the returned groups by their names.
    id String
    nameRegex String
    A regex string to filter the returned groups by their names.
    id string
    nameRegex string
    A regex string to filter the returned groups by their names.
    id str
    name_regex str
    A regex string to filter the returned groups by their names.
    id String
    nameRegex String
    A regex string to filter the returned groups by their names.

    getIamGroups Result

    The following output properties are available:

    Groups List<GetIamGroupsGroup>
    A list of groups. Each element contains the following attributes
    Id string
    Names List<string>
    A list of IAM user group names.
    NameRegex string
    Groups []GetIamGroupsGroup
    A list of groups. Each element contains the following attributes
    Id string
    Names []string
    A list of IAM user group names.
    NameRegex string
    groups List<GetIamGroupsGroup>
    A list of groups. Each element contains the following attributes
    id String
    names List<String>
    A list of IAM user group names.
    nameRegex String
    groups GetIamGroupsGroup[]
    A list of groups. Each element contains the following attributes
    id string
    names string[]
    A list of IAM user group names.
    nameRegex string
    groups Sequence[GetIamGroupsGroup]
    A list of groups. Each element contains the following attributes
    id str
    names Sequence[str]
    A list of IAM user group names.
    name_regex str
    groups List<Property Map>
    A list of groups. Each element contains the following attributes
    id String
    names List<String>
    A list of IAM user group names.
    nameRegex String

    Supporting Types

    GetIamGroupsGroup

    Comment string
    Comment of the group.
    Name string
    Name of the group.
    Comment string
    Comment of the group.
    Name string
    Name of the group.
    comment String
    Comment of the group.
    name String
    Name of the group.
    comment string
    Comment of the group.
    name string
    Name of the group.
    comment str
    Comment of the group.
    name str
    Name of the group.
    comment String
    Comment of the group.
    name String
    Name of the group.

    Package Details

    Repository
    ucloud ucloud/terraform-provider-ucloud
    License
    Notes
    This Pulumi package is based on the ucloud Terraform Provider.
    ucloud logo
    ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud