published on Wednesday, Aug 5, 2026 by ibm-cloud
published on Wednesday, Aug 5, 2026 by ibm-cloud
Update and delete iam_identity_preferences with this resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const iamIdentityPreferenceInstance = new ibm.IamIdentityPreference("iam_identity_preference_instance", {
accountId: "account_id",
iamId: "iam_id",
preferenceId: "preference_id",
service: "service",
valueString: "value_string",
});
import pulumi
import pulumi_ibm as ibm
iam_identity_preference_instance = ibm.IamIdentityPreference("iam_identity_preference_instance",
account_id="account_id",
iam_id="iam_id",
preference_id="preference_id",
service="service",
value_string="value_string")
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.NewIamIdentityPreference(ctx, "iam_identity_preference_instance", &ibm.IamIdentityPreferenceArgs{
AccountId: pulumi.String("account_id"),
IamId: pulumi.String("iam_id"),
PreferenceId: pulumi.String("preference_id"),
Service: pulumi.String("service"),
ValueString: pulumi.String("value_string"),
})
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 iamIdentityPreferenceInstance = new Ibm.IamIdentityPreference("iam_identity_preference_instance", new()
{
AccountId = "account_id",
IamId = "iam_id",
PreferenceId = "preference_id",
Service = "service",
ValueString = "value_string",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IamIdentityPreference;
import com.pulumi.ibm.IamIdentityPreferenceArgs;
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 iamIdentityPreferenceInstance = new IamIdentityPreference("iamIdentityPreferenceInstance", IamIdentityPreferenceArgs.builder()
.accountId("account_id")
.iamId("iam_id")
.preferenceId("preference_id")
.service("service")
.valueString("value_string")
.build());
}
}
resources:
iamIdentityPreferenceInstance:
type: ibm:IamIdentityPreference
name: iam_identity_preference_instance
properties:
accountId: account_id
iamId: iam_id
preferenceId: preference_id
service: service
valueString: value_string
Example coming soon!
Create IamIdentityPreference Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IamIdentityPreference(name: string, args: IamIdentityPreferenceArgs, opts?: CustomResourceOptions);@overload
def IamIdentityPreference(resource_name: str,
args: IamIdentityPreferenceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IamIdentityPreference(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
iam_id: Optional[str] = None,
preference_id: Optional[str] = None,
service: Optional[str] = None,
iam_identity_preference_id: Optional[str] = None,
value_list_of_strings: Optional[Sequence[str]] = None,
value_string: Optional[str] = None)func NewIamIdentityPreference(ctx *Context, name string, args IamIdentityPreferenceArgs, opts ...ResourceOption) (*IamIdentityPreference, error)public IamIdentityPreference(string name, IamIdentityPreferenceArgs args, CustomResourceOptions? opts = null)
public IamIdentityPreference(String name, IamIdentityPreferenceArgs args)
public IamIdentityPreference(String name, IamIdentityPreferenceArgs args, CustomResourceOptions options)
type: ibm:IamIdentityPreference
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "ibm_iam_identity_preference" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args IamIdentityPreferenceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args IamIdentityPreferenceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args IamIdentityPreferenceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamIdentityPreferenceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamIdentityPreferenceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var iamIdentityPreferenceResource = new Ibm.IamIdentityPreference("iamIdentityPreferenceResource", new()
{
AccountId = "string",
IamId = "string",
PreferenceId = "string",
Service = "string",
IamIdentityPreferenceId = "string",
ValueListOfStrings = new[]
{
"string",
},
ValueString = "string",
});
example, err := ibm.NewIamIdentityPreference(ctx, "iamIdentityPreferenceResource", &ibm.IamIdentityPreferenceArgs{
AccountId: pulumi.String("string"),
IamId: pulumi.String("string"),
PreferenceId: pulumi.String("string"),
Service: pulumi.String("string"),
IamIdentityPreferenceId: pulumi.String("string"),
ValueListOfStrings: pulumi.StringArray{
pulumi.String("string"),
},
ValueString: pulumi.String("string"),
})
resource "ibm_iam_identity_preference" "iamIdentityPreferenceResource" {
lifecycle {
create_before_destroy = true
}
account_id = "string"
iam_id = "string"
preference_id = "string"
service = "string"
iam_identity_preference_id = "string"
value_list_of_strings = ["string"]
value_string = "string"
}
var iamIdentityPreferenceResource = new IamIdentityPreference("iamIdentityPreferenceResource", IamIdentityPreferenceArgs.builder()
.accountId("string")
.iamId("string")
.preferenceId("string")
.service("string")
.iamIdentityPreferenceId("string")
.valueListOfStrings("string")
.valueString("string")
.build());
iam_identity_preference_resource = ibm.IamIdentityPreference("iamIdentityPreferenceResource",
account_id="string",
iam_id="string",
preference_id="string",
service="string",
iam_identity_preference_id="string",
value_list_of_strings=["string"],
value_string="string")
const iamIdentityPreferenceResource = new ibm.IamIdentityPreference("iamIdentityPreferenceResource", {
accountId: "string",
iamId: "string",
preferenceId: "string",
service: "string",
iamIdentityPreferenceId: "string",
valueListOfStrings: ["string"],
valueString: "string",
});
type: ibm:IamIdentityPreference
properties:
accountId: string
iamId: string
iamIdentityPreferenceId: string
preferenceId: string
service: string
valueListOfStrings:
- string
valueString: string
IamIdentityPreference Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The IamIdentityPreference resource accepts the following input properties:
- Account
Id string - Account id to update preference for.
- Iam
Id string - IAM id to update the preference for.
- Preference
Id string - Identifier of preference to be updated.
- Service string
- Service of the preference to be updated.
- Iam
Identity stringPreference Id - The unique identifier of the iam_identity_preference.
- Value
List List<string>Of Strings - 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 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 update preference for.
- Iam
Id string - IAM id to update the preference for.
- Preference
Id string - Identifier of preference to be updated.
- Service string
- Service of the preference to be updated.
- Iam
Identity stringPreference Id - The unique identifier of the iam_identity_preference.
- Value
List []stringOf Strings - 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 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 update preference for.
- iam_
id string - IAM id to update the preference for.
- preference_
id string - Identifier of preference to be updated.
- service string
- Service of the preference to be updated.
- iam_
identity_ stringpreference_ id - The unique identifier of the iam_identity_preference.
- value_
list_ list(string)of_ strings - 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 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 update preference for.
- iam
Id String - IAM id to update the preference for.
- preference
Id String - Identifier of preference to be updated.
- service String
- Service of the preference to be updated.
- iam
Identity StringPreference Id - The unique identifier of the iam_identity_preference.
- value
List List<String>Of Strings - 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 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 update preference for.
- iam
Id string - IAM id to update the preference for.
- preference
Id string - Identifier of preference to be updated.
- service string
- Service of the preference to be updated.
- iam
Identity stringPreference Id - The unique identifier of the iam_identity_preference.
- value
List string[]Of Strings - 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 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 update preference for.
- iam_
id str - IAM id to update the preference for.
- preference_
id str - Identifier of preference to be updated.
- service str
- Service of the preference to be updated.
- iam_
identity_ strpreference_ id - The unique identifier of the iam_identity_preference.
- value_
list_ Sequence[str]of_ strings - 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 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 update preference for.
- iam
Id String - IAM id to update the preference for.
- preference
Id String - Identifier of preference to be updated.
- service String
- Service of the preference to be updated.
- iam
Identity StringPreference Id - The unique identifier of the iam_identity_preference.
- value
List List<String>Of Strings - 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 value of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
Outputs
All input properties are implicitly available as output properties. Additionally, the IamIdentityPreference resource produces the following output properties:
Look up Existing IamIdentityPreference Resource
Get an existing IamIdentityPreference resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: IamIdentityPreferenceState, opts?: CustomResourceOptions): IamIdentityPreference@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
iam_id: Optional[str] = None,
iam_identity_preference_id: Optional[str] = None,
preference_id: Optional[str] = None,
scope: Optional[str] = None,
service: Optional[str] = None,
value_list_of_strings: Optional[Sequence[str]] = None,
value_string: Optional[str] = None) -> IamIdentityPreferencefunc GetIamIdentityPreference(ctx *Context, name string, id IDInput, state *IamIdentityPreferenceState, opts ...ResourceOption) (*IamIdentityPreference, error)public static IamIdentityPreference Get(string name, Input<string> id, IamIdentityPreferenceState? state, CustomResourceOptions? opts = null)public static IamIdentityPreference get(String name, Output<String> id, IamIdentityPreferenceState state, CustomResourceOptions options)resources: _: type: ibm:IamIdentityPreference get: id: ${id}import {
to = ibm_iam_identity_preference.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - Account id to update preference for.
- Iam
Id string - IAM id to update the preference for.
- Iam
Identity stringPreference Id - The unique identifier of the iam_identity_preference.
- Preference
Id string - Identifier of preference to be updated.
- Scope string
- (String) Scope of the preference, 'global' or 'account'.
- Service string
- Service of the preference to be updated.
- Value
List List<string>Of Strings - 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 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 update preference for.
- Iam
Id string - IAM id to update the preference for.
- Iam
Identity stringPreference Id - The unique identifier of the iam_identity_preference.
- Preference
Id string - Identifier of preference to be updated.
- Scope string
- (String) Scope of the preference, 'global' or 'account'.
- Service string
- Service of the preference to be updated.
- Value
List []stringOf Strings - 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 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 update preference for.
- iam_
id string - IAM id to update the preference for.
- iam_
identity_ stringpreference_ id - The unique identifier of the iam_identity_preference.
- preference_
id string - Identifier of preference to be updated.
- scope string
- (String) Scope of the preference, 'global' or 'account'.
- service string
- Service of the preference to be updated.
- value_
list_ list(string)of_ strings - 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 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 update preference for.
- iam
Id String - IAM id to update the preference for.
- iam
Identity StringPreference Id - The unique identifier of the iam_identity_preference.
- preference
Id String - Identifier of preference to be updated.
- scope String
- (String) Scope of the preference, 'global' or 'account'.
- service String
- Service of the preference to be updated.
- value
List List<String>Of Strings - 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 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 update preference for.
- iam
Id string - IAM id to update the preference for.
- iam
Identity stringPreference Id - The unique identifier of the iam_identity_preference.
- preference
Id string - Identifier of preference to be updated.
- scope string
- (String) Scope of the preference, 'global' or 'account'.
- service string
- Service of the preference to be updated.
- value
List string[]Of Strings - 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 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 update preference for.
- iam_
id str - IAM id to update the preference for.
- iam_
identity_ strpreference_ id - The unique identifier of the iam_identity_preference.
- preference_
id str - Identifier of preference to be updated.
- scope str
- (String) Scope of the preference, 'global' or 'account'.
- service str
- Service of the preference to be updated.
- value_
list_ Sequence[str]of_ strings - 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 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 update preference for.
- iam
Id String - IAM id to update the preference for.
- iam
Identity StringPreference Id - The unique identifier of the iam_identity_preference.
- preference
Id String - Identifier of preference to be updated.
- scope String
- (String) Scope of the preference, 'global' or 'account'.
- service String
- Service of the preference to be updated.
- value
List List<String>Of Strings - 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 value of the preference, only one value property is set, either 'value_string' or 'value_list_of_strings' is present.
Import
You can import the ibm_iam_identity_preference resource by using id.
The id property can be formed from account_id, iam_id, service, and preference_id in the following format:
<account_id>/<iam_id>/<service>/<preference_id>
account_id: A string. Account id to update preference for.iam_id: A string. IAM id to update the preference for.service: A string. Service of the preference to be updated.preference_id: A string. Identifier of preference to be updated.
Syntax
```sh $ pulumi import ibm:index/iamIdentityPreference:IamIdentityPreference iam_identity_preference <account_id>/<iam_id>/<service>/<preference_id> ```
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibmTerraform Provider.
published on Wednesday, Aug 5, 2026 by ibm-cloud