1. Packages
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. getIamIdentityPreferences
Viewing docs for ibm 2.5.0
published on Wednesday, Aug 5, 2026 by ibm-cloud
Viewing docs for ibm 2.5.0
published on Wednesday, Aug 5, 2026 by ibm-cloud

    Provides a read-only data source to retrieve information about iam_identity_preferences. You can then reference the fields of the data source in other resources within the same configuration by using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const iamIdentityPreferences = ibm.getIamIdentityPreferences({
        accountId: "account_id",
        iamId: "iam_id",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    iam_identity_preferences = ibm.get_iam_identity_preferences(account_id="account_id",
        iam_id="iam_id")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/v2/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetIamIdentityPreferences(ctx, &ibm.GetIamIdentityPreferencesArgs{
    			AccountId: "account_id",
    			IamId:     "iam_id",
    		}, 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 iamIdentityPreferences = Ibm.GetIamIdentityPreferences.Invoke(new()
        {
            AccountId = "account_id",
            IamId = "iam_id",
        });
    
    });
    
    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.GetIamIdentityPreferencesArgs;
    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 iamIdentityPreferences = IbmFunctions.getIamIdentityPreferences(GetIamIdentityPreferencesArgs.builder()
                .accountId("account_id")
                .iamId("iam_id")
                .build());
    
        }
    }
    
    variables:
      iamIdentityPreferences:
        fn::invoke:
          function: ibm:getIamIdentityPreferences
          arguments:
            accountId: account_id
            iamId: iam_id
    
    Example coming soon!
    

    Using getIamIdentityPreferences

    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 getIamIdentityPreferences(args: GetIamIdentityPreferencesArgs, opts?: InvokeOptions): Promise<GetIamIdentityPreferencesResult>
    function getIamIdentityPreferencesOutput(args: GetIamIdentityPreferencesOutputArgs, opts?: InvokeOptions): Output<GetIamIdentityPreferencesResult>
    def get_iam_identity_preferences(account_id: Optional[str] = None,
                                     iam_id: Optional[str] = None,
                                     id: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetIamIdentityPreferencesResult
    def get_iam_identity_preferences_output(account_id: pulumi.Input[Optional[str]] = None,
                                     iam_id: pulumi.Input[Optional[str]] = None,
                                     id: pulumi.Input[Optional[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetIamIdentityPreferencesResult]
    func GetIamIdentityPreferences(ctx *Context, args *GetIamIdentityPreferencesArgs, opts ...InvokeOption) (*GetIamIdentityPreferencesResult, error)
    func GetIamIdentityPreferencesOutput(ctx *Context, args *GetIamIdentityPreferencesOutputArgs, opts ...InvokeOption) GetIamIdentityPreferencesResultOutput

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

    public static class GetIamIdentityPreferences 
    {
        public static Task<GetIamIdentityPreferencesResult> InvokeAsync(GetIamIdentityPreferencesArgs args, InvokeOptions? opts = null)
        public static Output<GetIamIdentityPreferencesResult> Invoke(GetIamIdentityPreferencesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamIdentityPreferencesResult> getIamIdentityPreferences(GetIamIdentityPreferencesArgs args, InvokeOptions options)
    public static Output<GetIamIdentityPreferencesResult> getIamIdentityPreferences(GetIamIdentityPreferencesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIamIdentityPreferences:getIamIdentityPreferences
      arguments:
        # arguments dictionary
    data "ibm_get_iam_identity_preferences" "name" {
        # arguments
    }

    The following arguments are supported:

    AccountId string
    Account id to get preferences for.
    IamId string
    IAM id to get the preferences for.
    Id string
    (String) Unique ID of the preference.
    AccountId string
    Account id to get preferences for.
    IamId string
    IAM id to get the preferences for.
    Id string
    (String) Unique ID of the preference.
    account_id string
    Account id to get preferences for.
    iam_id string
    IAM id to get the preferences for.
    id string
    (String) Unique ID of the preference.
    accountId String
    Account id to get preferences for.
    iamId String
    IAM id to get the preferences for.
    id String
    (String) Unique ID of the preference.
    accountId string
    Account id to get preferences for.
    iamId string
    IAM id to get the preferences for.
    id string
    (String) Unique ID of the preference.
    account_id str
    Account id to get preferences for.
    iam_id str
    IAM id to get the preferences for.
    id str
    (String) Unique ID of the preference.
    accountId String
    Account id to get preferences for.
    iamId String
    IAM id to get the preferences for.
    id String
    (String) Unique ID of the preference.

    getIamIdentityPreferences Result

    The following output properties are available:

    AccountId string
    (String) Account ID of the preference, only present for scope 'account'.
    IamId string
    Id string
    (String) Unique ID of the preference.
    Preferences List<GetIamIdentityPreferencesPreference>
    (List) List of Identity Preferences. Nested schema for preferences:
    AccountId string
    (String) Account ID of the preference, only present for scope 'account'.
    IamId string
    Id string
    (String) Unique ID of the preference.
    Preferences []GetIamIdentityPreferencesPreference
    (List) List of Identity Preferences. Nested schema for preferences:
    account_id string
    (String) Account ID of the preference, only present for scope 'account'.
    iam_id string
    id string
    (String) Unique ID of the preference.
    preferences list(object)
    (List) List of Identity Preferences. Nested schema for preferences:
    accountId String
    (String) Account ID of the preference, only present for scope 'account'.
    iamId String
    id String
    (String) Unique ID of the preference.
    preferences List<GetIamIdentityPreferencesPreference>
    (List) List of Identity Preferences. Nested schema for preferences:
    accountId string
    (String) Account ID of the preference, only present for scope 'account'.
    iamId string
    id string
    (String) Unique ID of the preference.
    preferences GetIamIdentityPreferencesPreference[]
    (List) List of Identity Preferences. Nested schema for preferences:
    account_id str
    (String) Account ID of the preference, only present for scope 'account'.
    iam_id str
    id str
    (String) Unique ID of the preference.
    preferences Sequence[GetIamIdentityPreferencesPreference]
    (List) List of Identity Preferences. Nested schema for preferences:
    accountId String
    (String) Account ID of the preference, only present for scope 'account'.
    iamId String
    id String
    (String) Unique ID of the preference.
    preferences List<Property Map>
    (List) List of Identity Preferences. Nested schema for preferences:

    Supporting Types

    GetIamIdentityPreferencesPreference

    AccountId string
    Account id to get preferences for.
    Id string
    (String) Unique ID of the preference.
    Scope string
    (String) Scope of the preference, 'global' or 'account'.
    Service string
    (String) Service of the preference.
    ValueListOfStrings List<string>
    (List) List of values of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    ValueString string
    (String) String value of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    AccountId string
    Account id to get preferences for.
    Id string
    (String) Unique ID of the preference.
    Scope string
    (String) Scope of the preference, 'global' or 'account'.
    Service string
    (String) Service of the preference.
    ValueListOfStrings []string
    (List) List of values of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    ValueString string
    (String) String value of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    account_id string
    Account id to get preferences for.
    id string
    (String) Unique ID of the preference.
    scope string
    (String) Scope of the preference, 'global' or 'account'.
    service string
    (String) Service of the preference.
    value_list_of_strings list(string)
    (List) List of values of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    value_string string
    (String) String value of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    accountId String
    Account id to get preferences for.
    id String
    (String) Unique ID of the preference.
    scope String
    (String) Scope of the preference, 'global' or 'account'.
    service String
    (String) Service of the preference.
    valueListOfStrings List<String>
    (List) List of values of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    valueString String
    (String) String value of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    accountId string
    Account id to get preferences for.
    id string
    (String) Unique ID of the preference.
    scope string
    (String) Scope of the preference, 'global' or 'account'.
    service string
    (String) Service of the preference.
    valueListOfStrings string[]
    (List) List of values of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    valueString string
    (String) String value of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    account_id str
    Account id to get preferences for.
    id str
    (String) Unique ID of the preference.
    scope str
    (String) Scope of the preference, 'global' or 'account'.
    service str
    (String) Service of the preference.
    value_list_of_strings Sequence[str]
    (List) List of values of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    value_string str
    (String) String value of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    accountId String
    Account id to get preferences for.
    id String
    (String) Unique ID of the preference.
    scope String
    (String) Scope of the preference, 'global' or 'account'.
    service String
    (String) Service of the preference.
    valueListOfStrings List<String>
    (List) List of values of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
    valueString String
    (String) String value of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    Viewing docs for ibm 2.5.0
    published on Wednesday, Aug 5, 2026 by ibm-cloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial