1. Packages
  2. AWS
  3. API Docs
  4. ssoadmin
  5. getInstances
AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi
aws-v6 logo
AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi

    Use this data source to get ARNs and Identity Store IDs of Single Sign-On (SSO) Instances.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ssoadmin.getInstances({});
    export const arn = example.then(example => example.arns?.[0]);
    export const identityStoreId = example.then(example => example.identityStoreIds?.[0]);
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssoadmin.get_instances()
    pulumi.export("arn", example.arns[0])
    pulumi.export("identityStoreId", example.identity_store_ids[0])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("arn", example.Arns[0])
    		ctx.Export("identityStoreId", example.IdentityStoreIds[0])
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.SsoAdmin.GetInstances.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["arn"] = example.Apply(getInstancesResult => getInstancesResult.Arns[0]),
            ["identityStoreId"] = example.Apply(getInstancesResult => getInstancesResult.IdentityStoreIds[0]),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssoadmin.SsoadminFunctions;
    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 example = SsoadminFunctions.getInstances(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
    
            ctx.export("arn", example.arns()[0]);
            ctx.export("identityStoreId", example.identityStoreIds()[0]);
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:ssoadmin:getInstances
          arguments: {}
    outputs:
      arn: ${example.arns[0]}
      identityStoreId: ${example.identityStoreIds[0]}
    

    Using getInstances

    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 getInstances(opts?: InvokeOptions): Promise<GetInstancesResult>
    function getInstancesOutput(opts?: InvokeOptions): Output<GetInstancesResult>
    def get_instances(opts: Optional[InvokeOptions] = None) -> GetInstancesResult
    def get_instances_output(opts: Optional[InvokeOptions] = None) -> Output[GetInstancesResult]
    func GetInstances(ctx *Context, opts ...InvokeOption) (*GetInstancesResult, error)
    func GetInstancesOutput(ctx *Context, opts ...InvokeOption) GetInstancesResultOutput

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

    public static class GetInstances 
    {
        public static Task<GetInstancesResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetInstancesResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstancesResult> getInstances(InvokeOptions options)
    public static Output<GetInstancesResult> getInstances(InvokeOptions options)
    
    fn::invoke:
      function: aws:ssoadmin/getInstances:getInstances
      arguments:
        # arguments dictionary

    getInstances Result

    The following output properties are available:

    Arns List<string>
    Set of Amazon Resource Names (ARNs) of the SSO Instances.
    Id string
    The provider-assigned unique ID for this managed resource.
    IdentityStoreIds List<string>
    Set of identifiers of the identity stores connected to the SSO Instances.
    Arns []string
    Set of Amazon Resource Names (ARNs) of the SSO Instances.
    Id string
    The provider-assigned unique ID for this managed resource.
    IdentityStoreIds []string
    Set of identifiers of the identity stores connected to the SSO Instances.
    arns List<String>
    Set of Amazon Resource Names (ARNs) of the SSO Instances.
    id String
    The provider-assigned unique ID for this managed resource.
    identityStoreIds List<String>
    Set of identifiers of the identity stores connected to the SSO Instances.
    arns string[]
    Set of Amazon Resource Names (ARNs) of the SSO Instances.
    id string
    The provider-assigned unique ID for this managed resource.
    identityStoreIds string[]
    Set of identifiers of the identity stores connected to the SSO Instances.
    arns Sequence[str]
    Set of Amazon Resource Names (ARNs) of the SSO Instances.
    id str
    The provider-assigned unique ID for this managed resource.
    identity_store_ids Sequence[str]
    Set of identifiers of the identity stores connected to the SSO Instances.
    arns List<String>
    Set of Amazon Resource Names (ARNs) of the SSO Instances.
    id String
    The provider-assigned unique ID for this managed resource.
    identityStoreIds List<String>
    Set of identifiers of the identity stores connected to the SSO Instances.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws-v6 logo
    AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate