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

ibm.getIamTrustedProfileIdentity

Explore with Pulumi AI

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

    Provides a read-only data source for iam_trusted_profile_identity. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const iamTrustedProfile = new ibm.IamTrustedProfile("iamTrustedProfile", {});
    const iamTrustedProfileIdentity = ibm.getIamTrustedProfileIdentityOutput({
        identifierId: "IBMid-1234567898",
        identityType: "user",
        profileId: iamTrustedProfile.iamTrustedProfileId,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    iam_trusted_profile = ibm.IamTrustedProfile("iamTrustedProfile")
    iam_trusted_profile_identity = ibm.get_iam_trusted_profile_identity_output(identifier_id="IBMid-1234567898",
        identity_type="user",
        profile_id=iam_trusted_profile.iam_trusted_profile_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 {
    		iamTrustedProfile, err := ibm.NewIamTrustedProfile(ctx, "iamTrustedProfile", nil)
    		if err != nil {
    			return err
    		}
    		_ = ibm.LookupIamTrustedProfileIdentityOutput(ctx, ibm.GetIamTrustedProfileIdentityOutputArgs{
    			IdentifierId: pulumi.String("IBMid-1234567898"),
    			IdentityType: pulumi.String("user"),
    			ProfileId:    iamTrustedProfile.IamTrustedProfileId,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var iamTrustedProfile = new Ibm.IamTrustedProfile("iamTrustedProfile");
    
        var iamTrustedProfileIdentity = Ibm.GetIamTrustedProfileIdentity.Invoke(new()
        {
            IdentifierId = "IBMid-1234567898",
            IdentityType = "user",
            ProfileId = iamTrustedProfile.IamTrustedProfileId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IamTrustedProfile;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetIamTrustedProfileIdentityArgs;
    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 iamTrustedProfile = new IamTrustedProfile("iamTrustedProfile");
    
            final var iamTrustedProfileIdentity = IbmFunctions.getIamTrustedProfileIdentity(GetIamTrustedProfileIdentityArgs.builder()
                .identifierId("IBMid-1234567898")
                .identityType("user")
                .profileId(iamTrustedProfile.iamTrustedProfileId())
                .build());
    
        }
    }
    
    resources:
      iamTrustedProfile:
        type: ibm:IamTrustedProfile
    variables:
      iamTrustedProfileIdentity:
        fn::invoke:
          function: ibm:getIamTrustedProfileIdentity
          arguments:
            identifierId: IBMid-1234567898
            identityType: user
            profileId: ${iamTrustedProfile.iamTrustedProfileId}
    

    Using getIamTrustedProfileIdentity

    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 getIamTrustedProfileIdentity(args: GetIamTrustedProfileIdentityArgs, opts?: InvokeOptions): Promise<GetIamTrustedProfileIdentityResult>
    function getIamTrustedProfileIdentityOutput(args: GetIamTrustedProfileIdentityOutputArgs, opts?: InvokeOptions): Output<GetIamTrustedProfileIdentityResult>
    def get_iam_trusted_profile_identity(id: Optional[str] = None,
                                         identifier_id: Optional[str] = None,
                                         identity_type: Optional[str] = None,
                                         profile_id: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetIamTrustedProfileIdentityResult
    def get_iam_trusted_profile_identity_output(id: Optional[pulumi.Input[str]] = None,
                                         identifier_id: Optional[pulumi.Input[str]] = None,
                                         identity_type: Optional[pulumi.Input[str]] = None,
                                         profile_id: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetIamTrustedProfileIdentityResult]
    func LookupIamTrustedProfileIdentity(ctx *Context, args *LookupIamTrustedProfileIdentityArgs, opts ...InvokeOption) (*LookupIamTrustedProfileIdentityResult, error)
    func LookupIamTrustedProfileIdentityOutput(ctx *Context, args *LookupIamTrustedProfileIdentityOutputArgs, opts ...InvokeOption) LookupIamTrustedProfileIdentityResultOutput

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

    public static class GetIamTrustedProfileIdentity 
    {
        public static Task<GetIamTrustedProfileIdentityResult> InvokeAsync(GetIamTrustedProfileIdentityArgs args, InvokeOptions? opts = null)
        public static Output<GetIamTrustedProfileIdentityResult> Invoke(GetIamTrustedProfileIdentityInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamTrustedProfileIdentityResult> getIamTrustedProfileIdentity(GetIamTrustedProfileIdentityArgs args, InvokeOptions options)
    public static Output<GetIamTrustedProfileIdentityResult> getIamTrustedProfileIdentity(GetIamTrustedProfileIdentityArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIamTrustedProfileIdentity:getIamTrustedProfileIdentity
      arguments:
        # arguments dictionary

    The following arguments are supported:

    IdentifierId string
    Identifier of the identity that can assume the trusted profiles.
    IdentityType string
    Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.
    ProfileId string
    ID of the trusted profile.
    Id string
    The unique identifier of the iam_trusted_profile_identity.
    IdentifierId string
    Identifier of the identity that can assume the trusted profiles.
    IdentityType string
    Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.
    ProfileId string
    ID of the trusted profile.
    Id string
    The unique identifier of the iam_trusted_profile_identity.
    identifierId String
    Identifier of the identity that can assume the trusted profiles.
    identityType String
    Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.
    profileId String
    ID of the trusted profile.
    id String
    The unique identifier of the iam_trusted_profile_identity.
    identifierId string
    Identifier of the identity that can assume the trusted profiles.
    identityType string
    Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.
    profileId string
    ID of the trusted profile.
    id string
    The unique identifier of the iam_trusted_profile_identity.
    identifier_id str
    Identifier of the identity that can assume the trusted profiles.
    identity_type str
    Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.
    profile_id str
    ID of the trusted profile.
    id str
    The unique identifier of the iam_trusted_profile_identity.
    identifierId String
    Identifier of the identity that can assume the trusted profiles.
    identityType String
    Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.
    profileId String
    ID of the trusted profile.
    id String
    The unique identifier of the iam_trusted_profile_identity.

    getIamTrustedProfileIdentity Result

    The following output properties are available:

    Accounts List<string>
    (List) Only valid for the type user. Accounts from which a user can assume the trusted profile.
    Description string
    (String) Description of the identity that can assume the trusted profile. This is optional field for all the types of identities. When this field is not set for the identity type 'serviceid' then the description of the service id is used. Description is recommended for the identity type 'crn' E.g. 'Instance 1234 of IBM Cloud Service project'.
    IamId string
    (String) IAM ID of the identity.
    Id string
    The unique identifier of the iam_trusted_profile_identity.
    Identifier string
    (String) Identifier of the identity that can assume the trusted profiles. This can be a user identifier (IAM id), serviceid or crn. Internally it uses account id of the service id for the identifier 'serviceid' and for the identifier 'crn' it uses account id contained in the CRN.
    IdentifierId string
    IdentityType string
    ProfileId string
    Type string
    (String) Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.
    Accounts []string
    (List) Only valid for the type user. Accounts from which a user can assume the trusted profile.
    Description string
    (String) Description of the identity that can assume the trusted profile. This is optional field for all the types of identities. When this field is not set for the identity type 'serviceid' then the description of the service id is used. Description is recommended for the identity type 'crn' E.g. 'Instance 1234 of IBM Cloud Service project'.
    IamId string
    (String) IAM ID of the identity.
    Id string
    The unique identifier of the iam_trusted_profile_identity.
    Identifier string
    (String) Identifier of the identity that can assume the trusted profiles. This can be a user identifier (IAM id), serviceid or crn. Internally it uses account id of the service id for the identifier 'serviceid' and for the identifier 'crn' it uses account id contained in the CRN.
    IdentifierId string
    IdentityType string
    ProfileId string
    Type string
    (String) Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.
    accounts List<String>
    (List) Only valid for the type user. Accounts from which a user can assume the trusted profile.
    description String
    (String) Description of the identity that can assume the trusted profile. This is optional field for all the types of identities. When this field is not set for the identity type 'serviceid' then the description of the service id is used. Description is recommended for the identity type 'crn' E.g. 'Instance 1234 of IBM Cloud Service project'.
    iamId String
    (String) IAM ID of the identity.
    id String
    The unique identifier of the iam_trusted_profile_identity.
    identifier String
    (String) Identifier of the identity that can assume the trusted profiles. This can be a user identifier (IAM id), serviceid or crn. Internally it uses account id of the service id for the identifier 'serviceid' and for the identifier 'crn' it uses account id contained in the CRN.
    identifierId String
    identityType String
    profileId String
    type String
    (String) Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.
    accounts string[]
    (List) Only valid for the type user. Accounts from which a user can assume the trusted profile.
    description string
    (String) Description of the identity that can assume the trusted profile. This is optional field for all the types of identities. When this field is not set for the identity type 'serviceid' then the description of the service id is used. Description is recommended for the identity type 'crn' E.g. 'Instance 1234 of IBM Cloud Service project'.
    iamId string
    (String) IAM ID of the identity.
    id string
    The unique identifier of the iam_trusted_profile_identity.
    identifier string
    (String) Identifier of the identity that can assume the trusted profiles. This can be a user identifier (IAM id), serviceid or crn. Internally it uses account id of the service id for the identifier 'serviceid' and for the identifier 'crn' it uses account id contained in the CRN.
    identifierId string
    identityType string
    profileId string
    type string
    (String) Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.
    accounts Sequence[str]
    (List) Only valid for the type user. Accounts from which a user can assume the trusted profile.
    description str
    (String) Description of the identity that can assume the trusted profile. This is optional field for all the types of identities. When this field is not set for the identity type 'serviceid' then the description of the service id is used. Description is recommended for the identity type 'crn' E.g. 'Instance 1234 of IBM Cloud Service project'.
    iam_id str
    (String) IAM ID of the identity.
    id str
    The unique identifier of the iam_trusted_profile_identity.
    identifier str
    (String) Identifier of the identity that can assume the trusted profiles. This can be a user identifier (IAM id), serviceid or crn. Internally it uses account id of the service id for the identifier 'serviceid' and for the identifier 'crn' it uses account id contained in the CRN.
    identifier_id str
    identity_type str
    profile_id str
    type str
    (String) Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.
    accounts List<String>
    (List) Only valid for the type user. Accounts from which a user can assume the trusted profile.
    description String
    (String) Description of the identity that can assume the trusted profile. This is optional field for all the types of identities. When this field is not set for the identity type 'serviceid' then the description of the service id is used. Description is recommended for the identity type 'crn' E.g. 'Instance 1234 of IBM Cloud Service project'.
    iamId String
    (String) IAM ID of the identity.
    id String
    The unique identifier of the iam_trusted_profile_identity.
    identifier String
    (String) Identifier of the identity that can assume the trusted profiles. This can be a user identifier (IAM id), serviceid or crn. Internally it uses account id of the service id for the identifier 'serviceid' and for the identifier 'crn' it uses account id contained in the CRN.
    identifierId String
    identityType String
    profileId String
    type String
    (String) Type of the identity.

    • Constraints: Allowable values are: user, serviceid, crn.

    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