1. Packages
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. getIamIdp
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 an IAM Identity Provider (IdP). You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

    For more information, see the IAM Identity Services API documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const myIdp = ibm.getIamIdp({
        idpId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    my_idp = ibm.get_iam_idp(idp_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890")
    
    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.LookupIamIdp(ctx, &ibm.LookupIamIdpArgs{
    			IdpId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    		}, 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 myIdp = Ibm.GetIamIdp.Invoke(new()
        {
            IdpId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        });
    
    });
    
    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.GetIamIdpArgs;
    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 myIdp = IbmFunctions.getIamIdp(GetIamIdpArgs.builder()
                .idpId("a1b2c3d4-e5f6-7890-abcd-ef1234567890")
                .build());
    
        }
    }
    
    variables:
      myIdp:
        fn::invoke:
          function: ibm:getIamIdp
          arguments:
            idpId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
    
    Example coming soon!
    

    Reference fields from the data source

    import * as pulumi from "@pulumi/pulumi";
    
    export const idpName = myIdp.name;
    export const idpActive = myIdp.active;
    
    import pulumi
    
    pulumi.export("idpName", my_idp["name"])
    pulumi.export("idpActive", my_idp["active"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ctx.Export("idpName", myIdp.Name)
    		ctx.Export("idpActive", myIdp.Active)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        return new Dictionary<string, object?>
        {
            ["idpName"] = myIdp.Name,
            ["idpActive"] = myIdp.Active,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
            ctx.export("idpName", myIdp.name());
            ctx.export("idpActive", myIdp.active());
        }
    }
    
    outputs:
      idpName: ${myIdp.name}
      idpActive: ${myIdp.active}
    
    Example coming soon!
    

    Using getIamIdp

    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 getIamIdp(args: GetIamIdpArgs, opts?: InvokeOptions): Promise<GetIamIdpResult>
    function getIamIdpOutput(args: GetIamIdpOutputArgs, opts?: InvokeOptions): Output<GetIamIdpResult>
    def get_iam_idp(id: Optional[str] = None,
                    idp_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetIamIdpResult
    def get_iam_idp_output(id: pulumi.Input[Optional[str]] = None,
                    idp_id: pulumi.Input[Optional[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetIamIdpResult]
    func LookupIamIdp(ctx *Context, args *LookupIamIdpArgs, opts ...InvokeOption) (*LookupIamIdpResult, error)
    func LookupIamIdpOutput(ctx *Context, args *LookupIamIdpOutputArgs, opts ...InvokeOption) LookupIamIdpResultOutput

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

    public static class GetIamIdp 
    {
        public static Task<GetIamIdpResult> InvokeAsync(GetIamIdpArgs args, InvokeOptions? opts = null)
        public static Output<GetIamIdpResult> Invoke(GetIamIdpInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamIdpResult> getIamIdp(GetIamIdpArgs args, InvokeOptions options)
    public static Output<GetIamIdpResult> getIamIdp(GetIamIdpArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIamIdp:getIamIdp
      arguments:
        # arguments dictionary
    data "ibm_get_iam_idp" "name" {
        # arguments
    }

    The following arguments are supported:

    IdpId string
    Unique identifier of the Identity Provider to retrieve.
    Id string
    (String) ID of the account or enterprise.
    IdpId string
    Unique identifier of the Identity Provider to retrieve.
    Id string
    (String) ID of the account or enterprise.
    idp_id string
    Unique identifier of the Identity Provider to retrieve.
    id string
    (String) ID of the account or enterprise.
    idpId String
    Unique identifier of the Identity Provider to retrieve.
    id String
    (String) ID of the account or enterprise.
    idpId string
    Unique identifier of the Identity Provider to retrieve.
    id string
    (String) ID of the account or enterprise.
    idp_id str
    Unique identifier of the Identity Provider to retrieve.
    id str
    (String) ID of the account or enterprise.
    idpId String
    Unique identifier of the Identity Provider to retrieve.
    id String
    (String) ID of the account or enterprise.

    getIamIdp Result

    The following output properties are available:

    AccountId string
    (String) Account where the IdP resides.
    Active bool
    (Boolean) Whether the IDP is active (enabled) for all consuming accounts.
    CreatedAt string
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    EntityTag string
    (String) Version of the IDP. Required when updating the IDP to avoid stale writes.
    Id string
    (String) ID of the account or enterprise.
    IdpId string
    ModifiedAt string
    (String) Timestamp when the IDP was last modified, in ISO 8601 format.
    Name string
    (String) Speaking name of the Identity Provider.
    ShareScopes List<GetIamIdpShareScope>
    (List) List of targets (accounts or enterprises) that can consume the IdP. Nested schema for share_scope:
    Type string
    (String) Type of the share target. Possible values are account, enterprise.
    AccountId string
    (String) Account where the IdP resides.
    Active bool
    (Boolean) Whether the IDP is active (enabled) for all consuming accounts.
    CreatedAt string
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    EntityTag string
    (String) Version of the IDP. Required when updating the IDP to avoid stale writes.
    Id string
    (String) ID of the account or enterprise.
    IdpId string
    ModifiedAt string
    (String) Timestamp when the IDP was last modified, in ISO 8601 format.
    Name string
    (String) Speaking name of the Identity Provider.
    ShareScopes []GetIamIdpShareScope
    (List) List of targets (accounts or enterprises) that can consume the IdP. Nested schema for share_scope:
    Type string
    (String) Type of the share target. Possible values are account, enterprise.
    account_id string
    (String) Account where the IdP resides.
    active bool
    (Boolean) Whether the IDP is active (enabled) for all consuming accounts.
    created_at string
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    entity_tag string
    (String) Version of the IDP. Required when updating the IDP to avoid stale writes.
    id string
    (String) ID of the account or enterprise.
    idp_id string
    modified_at string
    (String) Timestamp when the IDP was last modified, in ISO 8601 format.
    name string
    (String) Speaking name of the Identity Provider.
    share_scopes list(object)
    (List) List of targets (accounts or enterprises) that can consume the IdP. Nested schema for share_scope:
    type string
    (String) Type of the share target. Possible values are account, enterprise.
    accountId String
    (String) Account where the IdP resides.
    active Boolean
    (Boolean) Whether the IDP is active (enabled) for all consuming accounts.
    createdAt String
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    entityTag String
    (String) Version of the IDP. Required when updating the IDP to avoid stale writes.
    id String
    (String) ID of the account or enterprise.
    idpId String
    modifiedAt String
    (String) Timestamp when the IDP was last modified, in ISO 8601 format.
    name String
    (String) Speaking name of the Identity Provider.
    shareScopes List<GetIamIdpShareScope>
    (List) List of targets (accounts or enterprises) that can consume the IdP. Nested schema for share_scope:
    type String
    (String) Type of the share target. Possible values are account, enterprise.
    accountId string
    (String) Account where the IdP resides.
    active boolean
    (Boolean) Whether the IDP is active (enabled) for all consuming accounts.
    createdAt string
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    entityTag string
    (String) Version of the IDP. Required when updating the IDP to avoid stale writes.
    id string
    (String) ID of the account or enterprise.
    idpId string
    modifiedAt string
    (String) Timestamp when the IDP was last modified, in ISO 8601 format.
    name string
    (String) Speaking name of the Identity Provider.
    shareScopes GetIamIdpShareScope[]
    (List) List of targets (accounts or enterprises) that can consume the IdP. Nested schema for share_scope:
    type string
    (String) Type of the share target. Possible values are account, enterprise.
    account_id str
    (String) Account where the IdP resides.
    active bool
    (Boolean) Whether the IDP is active (enabled) for all consuming accounts.
    created_at str
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    entity_tag str
    (String) Version of the IDP. Required when updating the IDP to avoid stale writes.
    id str
    (String) ID of the account or enterprise.
    idp_id str
    modified_at str
    (String) Timestamp when the IDP was last modified, in ISO 8601 format.
    name str
    (String) Speaking name of the Identity Provider.
    share_scopes Sequence[GetIamIdpShareScope]
    (List) List of targets (accounts or enterprises) that can consume the IdP. Nested schema for share_scope:
    type str
    (String) Type of the share target. Possible values are account, enterprise.
    accountId String
    (String) Account where the IdP resides.
    active Boolean
    (Boolean) Whether the IDP is active (enabled) for all consuming accounts.
    createdAt String
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    entityTag String
    (String) Version of the IDP. Required when updating the IDP to avoid stale writes.
    id String
    (String) ID of the account or enterprise.
    idpId String
    modifiedAt String
    (String) Timestamp when the IDP was last modified, in ISO 8601 format.
    name String
    (String) Speaking name of the Identity Provider.
    shareScopes List<Property Map>
    (List) List of targets (accounts or enterprises) that can consume the IdP. Nested schema for share_scope:
    type String
    (String) Type of the share target. Possible values are account, enterprise.

    Supporting Types

    GetIamIdpShareScope

    Id string
    (String) ID of the account or enterprise.
    Type string
    (String) Type of the share target. Possible values are account, enterprise.
    Id string
    (String) ID of the account or enterprise.
    Type string
    (String) Type of the share target. Possible values are account, enterprise.
    id string
    (String) ID of the account or enterprise.
    type string
    (String) Type of the share target. Possible values are account, enterprise.
    id String
    (String) ID of the account or enterprise.
    type String
    (String) Type of the share target. Possible values are account, enterprise.
    id string
    (String) ID of the account or enterprise.
    type string
    (String) Type of the share target. Possible values are account, enterprise.
    id str
    (String) ID of the account or enterprise.
    type str
    (String) Type of the share target. Possible values are account, enterprise.
    id String
    (String) ID of the account or enterprise.
    type String
    (String) Type of the share target. Possible values are account, enterprise.

    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