Viewing docs for ibm 2.5.0
published on Wednesday, Aug 5, 2026 by ibm-cloud
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
published on Wednesday, Aug 5, 2026 by ibm-cloud
Provides a read-only data source to retrieve information about an iam_identity_preference. 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 iamIdentityPreference = ibm.getIamIdentityPreference({
accountId: iamIdentityPreferenceInstance.accountId,
iamId: iamIdentityPreferenceInstance.iamId,
preferenceId: iamIdentityPreferenceInstance.preferenceId,
service: iamIdentityPreferenceInstance.service,
});
import pulumi
import pulumi_ibm as ibm
iam_identity_preference = ibm.get_iam_identity_preference(account_id=iam_identity_preference_instance["accountId"],
iam_id=iam_identity_preference_instance["iamId"],
preference_id=iam_identity_preference_instance["preferenceId"],
service=iam_identity_preference_instance["service"])
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.LookupIamIdentityPreference(ctx, &ibm.LookupIamIdentityPreferenceArgs{
AccountId: iamIdentityPreferenceInstance.AccountId,
IamId: iamIdentityPreferenceInstance.IamId,
PreferenceId: iamIdentityPreferenceInstance.PreferenceId,
Service: iamIdentityPreferenceInstance.Service,
}, 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 iamIdentityPreference = Ibm.GetIamIdentityPreference.Invoke(new()
{
AccountId = iamIdentityPreferenceInstance.AccountId,
IamId = iamIdentityPreferenceInstance.IamId,
PreferenceId = iamIdentityPreferenceInstance.PreferenceId,
Service = iamIdentityPreferenceInstance.Service,
});
});
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.GetIamIdentityPreferenceArgs;
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 iamIdentityPreference = IbmFunctions.getIamIdentityPreference(GetIamIdentityPreferenceArgs.builder()
.accountId(iamIdentityPreferenceInstance.accountId())
.iamId(iamIdentityPreferenceInstance.iamId())
.preferenceId(iamIdentityPreferenceInstance.preferenceId())
.service(iamIdentityPreferenceInstance.service())
.build());
}
}
variables:
iamIdentityPreference:
fn::invoke:
function: ibm:getIamIdentityPreference
arguments:
accountId: ${iamIdentityPreferenceInstance.accountId}
iamId: ${iamIdentityPreferenceInstance.iamId}
preferenceId: ${iamIdentityPreferenceInstance.preferenceId}
service: ${iamIdentityPreferenceInstance.service}
Example coming soon!
Using getIamIdentityPreference
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 getIamIdentityPreference(args: GetIamIdentityPreferenceArgs, opts?: InvokeOptions): Promise<GetIamIdentityPreferenceResult>
function getIamIdentityPreferenceOutput(args: GetIamIdentityPreferenceOutputArgs, opts?: InvokeOptions): Output<GetIamIdentityPreferenceResult>def get_iam_identity_preference(account_id: Optional[str] = None,
iam_id: Optional[str] = None,
id: Optional[str] = None,
preference_id: Optional[str] = None,
service: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIamIdentityPreferenceResult
def get_iam_identity_preference_output(account_id: pulumi.Input[Optional[str]] = None,
iam_id: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[str]] = None,
preference_id: pulumi.Input[Optional[str]] = None,
service: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIamIdentityPreferenceResult]func LookupIamIdentityPreference(ctx *Context, args *LookupIamIdentityPreferenceArgs, opts ...InvokeOption) (*LookupIamIdentityPreferenceResult, error)
func LookupIamIdentityPreferenceOutput(ctx *Context, args *LookupIamIdentityPreferenceOutputArgs, opts ...InvokeOption) LookupIamIdentityPreferenceResultOutput> Note: This function is named LookupIamIdentityPreference in the Go SDK.
public static class GetIamIdentityPreference
{
public static Task<GetIamIdentityPreferenceResult> InvokeAsync(GetIamIdentityPreferenceArgs args, InvokeOptions? opts = null)
public static Output<GetIamIdentityPreferenceResult> Invoke(GetIamIdentityPreferenceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetIamIdentityPreferenceResult> getIamIdentityPreference(GetIamIdentityPreferenceArgs args, InvokeOptions options)
public static Output<GetIamIdentityPreferenceResult> getIamIdentityPreference(GetIamIdentityPreferenceArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIamIdentityPreference:getIamIdentityPreference
arguments:
# arguments dictionarydata "ibm_get_iam_identity_preference" "name" {
# arguments
}The following arguments are supported:
- Account
Id string - Account id to get preference for.
- Iam
Id string - IAM id to get the preference for.
- Preference
Id string - Identifier of preference to be fetched.
- Service string
- Service of the preference to be fetched.
- Id string
- The unique identifier of the iam_identity_preference.
- Account
Id string - Account id to get preference for.
- Iam
Id string - IAM id to get the preference for.
- Preference
Id string - Identifier of preference to be fetched.
- Service string
- Service of the preference to be fetched.
- Id string
- The unique identifier of the iam_identity_preference.
- account_
id string - Account id to get preference for.
- iam_
id string - IAM id to get the preference for.
- preference_
id string - Identifier of preference to be fetched.
- service string
- Service of the preference to be fetched.
- id string
- The unique identifier of the iam_identity_preference.
- account
Id String - Account id to get preference for.
- iam
Id String - IAM id to get the preference for.
- preference
Id String - Identifier of preference to be fetched.
- service String
- Service of the preference to be fetched.
- id String
- The unique identifier of the iam_identity_preference.
- account
Id string - Account id to get preference for.
- iam
Id string - IAM id to get the preference for.
- preference
Id string - Identifier of preference to be fetched.
- service string
- Service of the preference to be fetched.
- id string
- The unique identifier of the iam_identity_preference.
- account_
id str - Account id to get preference for.
- iam_
id str - IAM id to get the preference for.
- preference_
id str - Identifier of preference to be fetched.
- service str
- Service of the preference to be fetched.
- id str
- The unique identifier of the iam_identity_preference.
- account
Id String - Account id to get preference for.
- iam
Id String - IAM id to get the preference for.
- preference
Id String - Identifier of preference to be fetched.
- service String
- Service of the preference to be fetched.
- id String
- The unique identifier of the iam_identity_preference.
getIamIdentityPreference Result
The following output properties are available:
- Account
Id string - Iam
Id string - Id string
- The unique identifier of the iam_identity_preference.
- Preference
Id string - Scope string
- (String) Scope of the preference, 'global' or 'account'.
- Service string
- Value
List List<string>Of Strings - (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.
- Account
Id string - Iam
Id string - Id string
- The unique identifier of the iam_identity_preference.
- Preference
Id string - Scope string
- (String) Scope of the preference, 'global' or 'account'.
- Service string
- Value
List []stringOf Strings - (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.
- account_
id string - iam_
id string - id string
- The unique identifier of the iam_identity_preference.
- preference_
id string - scope string
- (String) Scope of the preference, 'global' or 'account'.
- service string
- value_
list_ list(string)of_ strings - (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.
- account
Id String - iam
Id String - id String
- The unique identifier of the iam_identity_preference.
- preference
Id String - scope String
- (String) Scope of the preference, 'global' or 'account'.
- service String
- value
List List<String>Of Strings - (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.
- account
Id string - iam
Id string - id string
- The unique identifier of the iam_identity_preference.
- preference
Id string - scope string
- (String) Scope of the preference, 'global' or 'account'.
- service string
- value
List string[]Of Strings - (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.
- account_
id str - iam_
id str - id str
- The unique identifier of the iam_identity_preference.
- preference_
id str - scope str
- (String) Scope of the preference, 'global' or 'account'.
- service str
- value_
list_ Sequence[str]of_ strings - (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.
- account
Id String - iam
Id String - id String
- The unique identifier of the iam_identity_preference.
- preference
Id String - scope String
- (String) Scope of the preference, 'global' or 'account'.
- service String
- value
List List<String>Of Strings - (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.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibmTerraform Provider.
Viewing docs for ibm 2.5.0
published on Wednesday, Aug 5, 2026 by ibm-cloud
published on Wednesday, Aug 5, 2026 by ibm-cloud