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

ibm.getIamUserProfile

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. For more information, about IAM role action, see updating company profile details.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const userSetting = new ibm.IamUserSettings("userSetting", {
        iamId: "example@in.ibm.com",
        allowedIpAddresses: [
            "192.168.0.2",
            "192.168.0.3",
            "192.168.0.4",
        ],
    });
    const userProfle = ibm.getIamUserProfileOutput({
        iamId: userSetting.iamId,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    user_setting = ibm.IamUserSettings("userSetting",
        iam_id="example@in.ibm.com",
        allowed_ip_addresses=[
            "192.168.0.2",
            "192.168.0.3",
            "192.168.0.4",
        ])
    user_profle = ibm.get_iam_user_profile_output(iam_id=user_setting.iam_id)
    
    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 {
    		userSetting, err := ibm.NewIamUserSettings(ctx, "userSetting", &ibm.IamUserSettingsArgs{
    			IamId: pulumi.String("example@in.ibm.com"),
    			AllowedIpAddresses: pulumi.StringArray{
    				pulumi.String("192.168.0.2"),
    				pulumi.String("192.168.0.3"),
    				pulumi.String("192.168.0.4"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = ibm.GetIamUserProfileOutput(ctx, ibm.GetIamUserProfileOutputArgs{
    			IamId: userSetting.IamId,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var userSetting = new Ibm.IamUserSettings("userSetting", new()
        {
            IamId = "example@in.ibm.com",
            AllowedIpAddresses = new[]
            {
                "192.168.0.2",
                "192.168.0.3",
                "192.168.0.4",
            },
        });
    
        var userProfle = Ibm.GetIamUserProfile.Invoke(new()
        {
            IamId = userSetting.IamId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IamUserSettings;
    import com.pulumi.ibm.IamUserSettingsArgs;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetIamUserProfileArgs;
    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) {
            var userSetting = new IamUserSettings("userSetting", IamUserSettingsArgs.builder()
                .iamId("example@in.ibm.com")
                .allowedIpAddresses(            
                    "192.168.0.2",
                    "192.168.0.3",
                    "192.168.0.4")
                .build());
    
            final var userProfle = IbmFunctions.getIamUserProfile(GetIamUserProfileArgs.builder()
                .iamId(userSetting.iamId())
                .build());
    
        }
    }
    
    resources:
      userSetting:
        type: ibm:IamUserSettings
        properties:
          iamId: example@in.ibm.com
          allowedIpAddresses:
            - 192.168.0.2
            - 192.168.0.3
            - 192.168.0.4
    variables:
      userProfle:
        fn::invoke:
          function: ibm:getIamUserProfile
          arguments:
            iamId: ${userSetting.iamId}
    

    Using getIamUserProfile

    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 getIamUserProfile(args: GetIamUserProfileArgs, opts?: InvokeOptions): Promise<GetIamUserProfileResult>
    function getIamUserProfileOutput(args: GetIamUserProfileOutputArgs, opts?: InvokeOptions): Output<GetIamUserProfileResult>
    def get_iam_user_profile(iam_id: Optional[str] = None,
                             id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetIamUserProfileResult
    def get_iam_user_profile_output(iam_id: Optional[pulumi.Input[str]] = None,
                             id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetIamUserProfileResult]
    func GetIamUserProfile(ctx *Context, args *GetIamUserProfileArgs, opts ...InvokeOption) (*GetIamUserProfileResult, error)
    func GetIamUserProfileOutput(ctx *Context, args *GetIamUserProfileOutputArgs, opts ...InvokeOption) GetIamUserProfileResultOutput

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

    public static class GetIamUserProfile 
    {
        public static Task<GetIamUserProfileResult> InvokeAsync(GetIamUserProfileArgs args, InvokeOptions? opts = null)
        public static Output<GetIamUserProfileResult> Invoke(GetIamUserProfileInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamUserProfileResult> getIamUserProfile(GetIamUserProfileArgs args, InvokeOptions options)
    public static Output<GetIamUserProfileResult> getIamUserProfile(GetIamUserProfileArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIamUserProfile:getIamUserProfile
      arguments:
        # arguments dictionary

    The following arguments are supported:

    IamId string
    The IBM ID or email address of the user.
    Id string
    (String) The unique identifier or email address of the IAM user.
    IamId string
    The IBM ID or email address of the user.
    Id string
    (String) The unique identifier or email address of the IAM user.
    iamId String
    The IBM ID or email address of the user.
    id String
    (String) The unique identifier or email address of the IAM user.
    iamId string
    The IBM ID or email address of the user.
    id string
    (String) The unique identifier or email address of the IAM user.
    iam_id str
    The IBM ID or email address of the user.
    id str
    (String) The unique identifier or email address of the IAM user.
    iamId String
    The IBM ID or email address of the user.
    id String
    (String) The unique identifier or email address of the IAM user.

    getIamUserProfile Result

    The following output properties are available:

    AccountId string
    AllowedIpAddresses List<string>
    (List) List of invited users IP's to access the IBM cloud console.
    Altphonenumber string
    Email string
    (String) The email address of the user.
    Firstname string
    (String) The first name of the user.
    IamId string
    IbmId string
    (String) An alphanumeric value identifying the user's IAM ID.
    Id string
    (String) The unique identifier or email address of the IAM user.
    Lastname string
    (String) The last name of the user.
    Phonenumber string
    (String) The contact number of the user.
    State string
    (String) The state of the user.
    UserId string
    AccountId string
    AllowedIpAddresses []string
    (List) List of invited users IP's to access the IBM cloud console.
    Altphonenumber string
    Email string
    (String) The email address of the user.
    Firstname string
    (String) The first name of the user.
    IamId string
    IbmId string
    (String) An alphanumeric value identifying the user's IAM ID.
    Id string
    (String) The unique identifier or email address of the IAM user.
    Lastname string
    (String) The last name of the user.
    Phonenumber string
    (String) The contact number of the user.
    State string
    (String) The state of the user.
    UserId string
    accountId String
    allowedIpAddresses List<String>
    (List) List of invited users IP's to access the IBM cloud console.
    altphonenumber String
    email String
    (String) The email address of the user.
    firstname String
    (String) The first name of the user.
    iamId String
    ibmId String
    (String) An alphanumeric value identifying the user's IAM ID.
    id String
    (String) The unique identifier or email address of the IAM user.
    lastname String
    (String) The last name of the user.
    phonenumber String
    (String) The contact number of the user.
    state String
    (String) The state of the user.
    userId String
    accountId string
    allowedIpAddresses string[]
    (List) List of invited users IP's to access the IBM cloud console.
    altphonenumber string
    email string
    (String) The email address of the user.
    firstname string
    (String) The first name of the user.
    iamId string
    ibmId string
    (String) An alphanumeric value identifying the user's IAM ID.
    id string
    (String) The unique identifier or email address of the IAM user.
    lastname string
    (String) The last name of the user.
    phonenumber string
    (String) The contact number of the user.
    state string
    (String) The state of the user.
    userId string
    account_id str
    allowed_ip_addresses Sequence[str]
    (List) List of invited users IP's to access the IBM cloud console.
    altphonenumber str
    email str
    (String) The email address of the user.
    firstname str
    (String) The first name of the user.
    iam_id str
    ibm_id str
    (String) An alphanumeric value identifying the user's IAM ID.
    id str
    (String) The unique identifier or email address of the IAM user.
    lastname str
    (String) The last name of the user.
    phonenumber str
    (String) The contact number of the user.
    state str
    (String) The state of the user.
    user_id str
    accountId String
    allowedIpAddresses List<String>
    (List) List of invited users IP's to access the IBM cloud console.
    altphonenumber String
    email String
    (String) The email address of the user.
    firstname String
    (String) The first name of the user.
    iamId String
    ibmId String
    (String) An alphanumeric value identifying the user's IAM ID.
    id String
    (String) The unique identifier or email address of the IAM user.
    lastname String
    (String) The last name of the user.
    phonenumber String
    (String) The contact number of the user.
    state String
    (String) The state of the user.
    userId String

    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