1. Packages
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. getIamIdps
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 list all IAM Identity Providers (IdPs) in a given account. 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 allIdps = ibm.getIamIdps({
        accountId: accountId,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    all_idps = ibm.get_iam_idps(account_id=account_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.GetIamIdps(ctx, &ibm.GetIamIdpsArgs{
    			AccountId: accountId,
    		}, 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 allIdps = Ibm.GetIamIdps.Invoke(new()
        {
            AccountId = accountId,
        });
    
    });
    
    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.GetIamIdpsArgs;
    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 allIdps = IbmFunctions.getIamIdps(GetIamIdpsArgs.builder()
                .accountId(accountId)
                .build());
    
        }
    }
    
    variables:
      allIdps:
        fn::invoke:
          function: ibm:getIamIdps
          arguments:
            accountId: ${accountId}
    
    Example coming soon!
    

    Iterate over returned IdPs

    import * as pulumi from "@pulumi/pulumi";
    
    export const idpNames = .map(idp => (idp.name));
    export const activeIdps = .filter(idp => idp.active == true).map(idp => (idp));
    
    import pulumi
    
    pulumi.export("idpNames", [idp["name"] for idp in all_idps["idps"]])
    pulumi.export("activeIdps", [idp for idp in all_idps["idps"] if idp["active"] == True])
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        return new Dictionary<string, object?>
        {
            ["idpNames"] = .Select(idp => 
            {
                return idp.Name;
            }).ToList(),
            ["activeIdps"] = .Where(idp => idp.Active == true).Select(idp => 
            {
                return idp;
            }).ToList(),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    

    Using getIamIdps

    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 getIamIdps(args: GetIamIdpsArgs, opts?: InvokeOptions): Promise<GetIamIdpsResult>
    function getIamIdpsOutput(args: GetIamIdpsOutputArgs, opts?: InvokeOptions): Output<GetIamIdpsResult>
    def get_iam_idps(account_id: Optional[str] = None,
                     id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetIamIdpsResult
    def get_iam_idps_output(account_id: pulumi.Input[Optional[str]] = None,
                     id: pulumi.Input[Optional[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetIamIdpsResult]
    func GetIamIdps(ctx *Context, args *GetIamIdpsArgs, opts ...InvokeOption) (*GetIamIdpsResult, error)
    func GetIamIdpsOutput(ctx *Context, args *GetIamIdpsOutputArgs, opts ...InvokeOption) GetIamIdpsResultOutput

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

    public static class GetIamIdps 
    {
        public static Task<GetIamIdpsResult> InvokeAsync(GetIamIdpsArgs args, InvokeOptions? opts = null)
        public static Output<GetIamIdpsResult> Invoke(GetIamIdpsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamIdpsResult> getIamIdps(GetIamIdpsArgs args, InvokeOptions options)
    public static Output<GetIamIdpsResult> getIamIdps(GetIamIdpsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIamIdps:getIamIdps
      arguments:
        # arguments dictionary
    data "ibm_get_iam_idps" "name" {
        # arguments
    }

    The following arguments are supported:

    AccountId string
    Account ID to list Identity Providers for.
    Id string
    (String) ID of the account or enterprise.
    AccountId string
    Account ID to list Identity Providers for.
    Id string
    (String) ID of the account or enterprise.
    account_id string
    Account ID to list Identity Providers for.
    id string
    (String) ID of the account or enterprise.
    accountId String
    Account ID to list Identity Providers for.
    id String
    (String) ID of the account or enterprise.
    accountId string
    Account ID to list Identity Providers for.
    id string
    (String) ID of the account or enterprise.
    account_id str
    Account ID to list Identity Providers for.
    id str
    (String) ID of the account or enterprise.
    accountId String
    Account ID to list Identity Providers for.
    id String
    (String) ID of the account or enterprise.

    getIamIdps Result

    The following output properties are available:

    AccountId string
    (String) Account where the IdP resides.
    Id string
    (String) ID of the account or enterprise.
    Idps List<GetIamIdpsIdp>
    (List) List of Identity Providers in the account. Nested schema for idps:
    AccountId string
    (String) Account where the IdP resides.
    Id string
    (String) ID of the account or enterprise.
    Idps []GetIamIdpsIdp
    (List) List of Identity Providers in the account. Nested schema for idps:
    account_id string
    (String) Account where the IdP resides.
    id string
    (String) ID of the account or enterprise.
    idps list(object)
    (List) List of Identity Providers in the account. Nested schema for idps:
    accountId String
    (String) Account where the IdP resides.
    id String
    (String) ID of the account or enterprise.
    idps List<GetIamIdpsIdp>
    (List) List of Identity Providers in the account. Nested schema for idps:
    accountId string
    (String) Account where the IdP resides.
    id string
    (String) ID of the account or enterprise.
    idps GetIamIdpsIdp[]
    (List) List of Identity Providers in the account. Nested schema for idps:
    account_id str
    (String) Account where the IdP resides.
    id str
    (String) ID of the account or enterprise.
    idps Sequence[GetIamIdpsIdp]
    (List) List of Identity Providers in the account. Nested schema for idps:
    accountId String
    (String) Account where the IdP resides.
    id String
    (String) ID of the account or enterprise.
    idps List<Property Map>
    (List) List of Identity Providers in the account. Nested schema for idps:

    Supporting Types

    GetIamIdpsIdp

    AccountId string
    Account ID to list Identity Providers for.
    Active bool
    (Boolean) Whether the IDP is active for all consuming accounts.
    CreatedAt string
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    EntityTag string
    (String) Version of the IDP.
    IdpId string
    (String) Unique identifier of the IDP.
    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<GetIamIdpsIdpShareScope>
    (List) List of targets 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
    Account ID to list Identity Providers for.
    Active bool
    (Boolean) Whether the IDP is active for all consuming accounts.
    CreatedAt string
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    EntityTag string
    (String) Version of the IDP.
    IdpId string
    (String) Unique identifier of the IDP.
    ModifiedAt string
    (String) Timestamp when the IDP was last modified, in ISO 8601 format.
    Name string
    (String) Speaking name of the Identity Provider.
    ShareScopes []GetIamIdpsIdpShareScope
    (List) List of targets 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
    Account ID to list Identity Providers for.
    active bool
    (Boolean) Whether the IDP is active 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.
    idp_id string
    (String) Unique identifier of the IDP.
    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 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
    Account ID to list Identity Providers for.
    active Boolean
    (Boolean) Whether the IDP is active for all consuming accounts.
    createdAt String
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    entityTag String
    (String) Version of the IDP.
    idpId String
    (String) Unique identifier of the IDP.
    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<GetIamIdpsIdpShareScope>
    (List) List of targets 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
    Account ID to list Identity Providers for.
    active boolean
    (Boolean) Whether the IDP is active for all consuming accounts.
    createdAt string
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    entityTag string
    (String) Version of the IDP.
    idpId string
    (String) Unique identifier of the IDP.
    modifiedAt string
    (String) Timestamp when the IDP was last modified, in ISO 8601 format.
    name string
    (String) Speaking name of the Identity Provider.
    shareScopes GetIamIdpsIdpShareScope[]
    (List) List of targets 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
    Account ID to list Identity Providers for.
    active bool
    (Boolean) Whether the IDP is active 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.
    idp_id str
    (String) Unique identifier of the IDP.
    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[GetIamIdpsIdpShareScope]
    (List) List of targets 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
    Account ID to list Identity Providers for.
    active Boolean
    (Boolean) Whether the IDP is active for all consuming accounts.
    createdAt String
    (String) Timestamp when the IDP was created, in ISO 8601 format.
    entityTag String
    (String) Version of the IDP.
    idpId String
    (String) Unique identifier of the IDP.
    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 that can consume the IdP. Nested schema for share_scope:
    type String
    (String) Type of the share target. Possible values are account, enterprise.

    GetIamIdpsIdpShareScope

    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