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

ucloud.getIamUsers

Explore with Pulumi AI

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

    Provides a list of IAM users.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ucloud from "@pulumi/ucloud";
    
    const foo = ucloud.getIamUsers({
        nameRegex: "^tf-acc-iam-user$",
    });
    
    import pulumi
    import pulumi_ucloud as ucloud
    
    foo = ucloud.get_iam_users(name_regex="^tf-acc-iam-user$")
    
    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.GetIamUsers(ctx, &ucloud.GetIamUsersArgs{
    			NameRegex: pulumi.StringRef("^tf-acc-iam-user$"),
    		}, 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.GetIamUsers.Invoke(new()
        {
            NameRegex = "^tf-acc-iam-user$",
        });
    
    });
    
    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.GetIamUsersArgs;
    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.getIamUsers(GetIamUsersArgs.builder()
                .nameRegex("^tf-acc-iam-user$")
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          function: ucloud:getIamUsers
          arguments:
            nameRegex: ^tf-acc-iam-user$
    

    Using getIamUsers

    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 getIamUsers(args: GetIamUsersArgs, opts?: InvokeOptions): Promise<GetIamUsersResult>
    function getIamUsersOutput(args: GetIamUsersOutputArgs, opts?: InvokeOptions): Output<GetIamUsersResult>
    def get_iam_users(group_name: Optional[str] = None,
                      id: Optional[str] = None,
                      name_regex: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetIamUsersResult
    def get_iam_users_output(group_name: Optional[pulumi.Input[str]] = None,
                      id: Optional[pulumi.Input[str]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetIamUsersResult]
    func GetIamUsers(ctx *Context, args *GetIamUsersArgs, opts ...InvokeOption) (*GetIamUsersResult, error)
    func GetIamUsersOutput(ctx *Context, args *GetIamUsersOutputArgs, opts ...InvokeOption) GetIamUsersResultOutput

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

    public static class GetIamUsers 
    {
        public static Task<GetIamUsersResult> InvokeAsync(GetIamUsersArgs args, InvokeOptions? opts = null)
        public static Output<GetIamUsersResult> Invoke(GetIamUsersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamUsersResult> getIamUsers(GetIamUsersArgs args, InvokeOptions options)
    public static Output<GetIamUsersResult> getIamUsers(GetIamUsersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ucloud:index/getIamUsers:getIamUsers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GroupName string
    Filter results by a specific group name. Returned users are in the specified group.
    Id string
    NameRegex string
    A regex string to filter the returned users by their names.
    GroupName string
    Filter results by a specific group name. Returned users are in the specified group.
    Id string
    NameRegex string
    A regex string to filter the returned users by their names.
    groupName String
    Filter results by a specific group name. Returned users are in the specified group.
    id String
    nameRegex String
    A regex string to filter the returned users by their names.
    groupName string
    Filter results by a specific group name. Returned users are in the specified group.
    id string
    nameRegex string
    A regex string to filter the returned users by their names.
    group_name str
    Filter results by a specific group name. Returned users are in the specified group.
    id str
    name_regex str
    A regex string to filter the returned users by their names.
    groupName String
    Filter results by a specific group name. Returned users are in the specified group.
    id String
    nameRegex String
    A regex string to filter the returned users by their names.

    getIamUsers Result

    The following output properties are available:

    Id string
    Names List<string>
    A list of IAM user names.
    Users List<GetIamUsersUser>
    A list of users. Each element contains the following attributes
    GroupName string
    NameRegex string
    Id string
    Names []string
    A list of IAM user names.
    Users []GetIamUsersUser
    A list of users. Each element contains the following attributes
    GroupName string
    NameRegex string
    id String
    names List<String>
    A list of IAM user names.
    users List<GetIamUsersUser>
    A list of users. Each element contains the following attributes
    groupName String
    nameRegex String
    id string
    names string[]
    A list of IAM user names.
    users GetIamUsersUser[]
    A list of users. Each element contains the following attributes
    groupName string
    nameRegex string
    id str
    names Sequence[str]
    A list of IAM user names.
    users Sequence[GetIamUsersUser]
    A list of users. Each element contains the following attributes
    group_name str
    name_regex str
    id String
    names List<String>
    A list of IAM user names.
    users List<Property Map>
    A list of users. Each element contains the following attributes
    groupName String
    nameRegex String

    Supporting Types

    GetIamUsersUser

    DisplayName string
    Name of the IAM user which for display.
    Email string
    Email of the IAM user.
    LoginEnable bool
    true or false.
    Name string
    Name of the IAM user.
    Status string
    Status of the IAM user Active or Inactive.
    DisplayName string
    Name of the IAM user which for display.
    Email string
    Email of the IAM user.
    LoginEnable bool
    true or false.
    Name string
    Name of the IAM user.
    Status string
    Status of the IAM user Active or Inactive.
    displayName String
    Name of the IAM user which for display.
    email String
    Email of the IAM user.
    loginEnable Boolean
    true or false.
    name String
    Name of the IAM user.
    status String
    Status of the IAM user Active or Inactive.
    displayName string
    Name of the IAM user which for display.
    email string
    Email of the IAM user.
    loginEnable boolean
    true or false.
    name string
    Name of the IAM user.
    status string
    Status of the IAM user Active or Inactive.
    display_name str
    Name of the IAM user which for display.
    email str
    Email of the IAM user.
    login_enable bool
    true or false.
    name str
    Name of the IAM user.
    status str
    Status of the IAM user Active or Inactive.
    displayName String
    Name of the IAM user which for display.
    email String
    Email of the IAM user.
    loginEnable Boolean
    true or false.
    name String
    Name of the IAM user.
    status String
    Status of the IAM user Active or Inactive.

    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