1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIamUsers
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getIamUsers

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Retrieve information about an IAM user profile on IBM Cloud as a read-only data source. For more information, about IAM users profile information, see assigning access to account management services.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const usersProfiles = ibm.getIamUsers({});
    
    import pulumi
    import pulumi_ibm as ibm
    
    users_profiles = ibm.get_iam_users()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetIamUsers(ctx, &ibm.GetIamUsersArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var usersProfiles = Ibm.GetIamUsers.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.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 usersProfiles = IbmFunctions.getIamUsers();
    
        }
    }
    
    variables:
      usersProfiles:
        fn::invoke:
          function: ibm:getIamUsers
          arguments: {}
    

    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(id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetIamUsersResult
    def get_iam_users_output(id: 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: ibm:index/getIamUsers:getIamUsers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    (String) The unique identifier user.
    Id string
    (String) The unique identifier user.
    id String
    (String) The unique identifier user.
    id string
    (String) The unique identifier user.
    id str
    (String) The unique identifier user.
    id String
    (String) The unique identifier user.

    getIamUsers Result

    The following output properties are available:

    Id string
    (String) The unique identifier user.
    Users List<GetIamUsersUser>
    (String) List of all IAM users. Each user profile has following list of arguments.
    Id string
    (String) The unique identifier user.
    Users []GetIamUsersUser
    (String) List of all IAM users. Each user profile has following list of arguments.
    id String
    (String) The unique identifier user.
    users List<GetIamUsersUser>
    (String) List of all IAM users. Each user profile has following list of arguments.
    id string
    (String) The unique identifier user.
    users GetIamUsersUser[]
    (String) List of all IAM users. Each user profile has following list of arguments.
    id str
    (String) The unique identifier user.
    users Sequence[GetIamUsersUser]
    (String) List of all IAM users. Each user profile has following list of arguments.
    id String
    (String) The unique identifier user.
    users List<Property Map>
    (String) List of all IAM users. Each user profile has following list of arguments.

    Supporting Types

    GetIamUsersUser

    AccountId string
    (String) The account ID of the user.
    AltPhonenumber string
    Email string
    (String) The email of the user.
    FirstName string
    IamId string
    (String) The ID of the IAM user.
    LastName string
    Phonenumber string
    (String) The phone for the user.
    Realm string
    (String) The realm of the user.
    State string
    (String) The state of the user.
    UserId string
    (String) The user ID used for log in.
    AccountId string
    (String) The account ID of the user.
    AltPhonenumber string
    Email string
    (String) The email of the user.
    FirstName string
    IamId string
    (String) The ID of the IAM user.
    LastName string
    Phonenumber string
    (String) The phone for the user.
    Realm string
    (String) The realm of the user.
    State string
    (String) The state of the user.
    UserId string
    (String) The user ID used for log in.
    accountId String
    (String) The account ID of the user.
    altPhonenumber String
    email String
    (String) The email of the user.
    firstName String
    iamId String
    (String) The ID of the IAM user.
    lastName String
    phonenumber String
    (String) The phone for the user.
    realm String
    (String) The realm of the user.
    state String
    (String) The state of the user.
    userId String
    (String) The user ID used for log in.
    accountId string
    (String) The account ID of the user.
    altPhonenumber string
    email string
    (String) The email of the user.
    firstName string
    iamId string
    (String) The ID of the IAM user.
    lastName string
    phonenumber string
    (String) The phone for the user.
    realm string
    (String) The realm of the user.
    state string
    (String) The state of the user.
    userId string
    (String) The user ID used for log in.
    account_id str
    (String) The account ID of the user.
    alt_phonenumber str
    email str
    (String) The email of the user.
    first_name str
    iam_id str
    (String) The ID of the IAM user.
    last_name str
    phonenumber str
    (String) The phone for the user.
    realm str
    (String) The realm of the user.
    state str
    (String) The state of the user.
    user_id str
    (String) The user ID used for log in.
    accountId String
    (String) The account ID of the user.
    altPhonenumber String
    email String
    (String) The email of the user.
    firstName String
    iamId String
    (String) The ID of the IAM user.
    lastName String
    phonenumber String
    (String) The phone for the user.
    realm String
    (String) The realm of the user.
    state String
    (String) The state of the user.
    userId String
    (String) The user ID used for log in.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud