1. Packages
  2. Okta Provider
  3. API Docs
  4. getRealm
Okta v5.2.0 published on Thursday, Sep 4, 2025 by Pulumi

okta.getRealm

Explore with Pulumi AI

okta logo
Okta v5.2.0 published on Thursday, Sep 4, 2025 by Pulumi

    Get a realm from Okta.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const exampleName = okta.getRealm({
        name: "Example Realm",
    });
    const exampleId = okta.getRealm({
        id: "<realm_id>",
    });
    
    import pulumi
    import pulumi_okta as okta
    
    example_name = okta.get_realm(name="Example Realm")
    example_id = okta.get_realm(id="<realm_id>")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v5/go/okta"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := okta.LookupRealm(ctx, &okta.LookupRealmArgs{
    			Name: pulumi.StringRef("Example Realm"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = okta.LookupRealm(ctx, &okta.LookupRealmArgs{
    			Id: pulumi.StringRef("<realm_id>"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleName = Okta.GetRealm.Invoke(new()
        {
            Name = "Example Realm",
        });
    
        var exampleId = Okta.GetRealm.Invoke(new()
        {
            Id = "<realm_id>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.OktaFunctions;
    import com.pulumi.okta.inputs.GetRealmArgs;
    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 exampleName = OktaFunctions.getRealm(GetRealmArgs.builder()
                .name("Example Realm")
                .build());
    
            final var exampleId = OktaFunctions.getRealm(GetRealmArgs.builder()
                .id("<realm_id>")
                .build());
    
        }
    }
    
    variables:
      exampleName:
        fn::invoke:
          function: okta:getRealm
          arguments:
            name: Example Realm
      exampleId:
        fn::invoke:
          function: okta:getRealm
          arguments:
            id: <realm_id>
    

    Using getRealm

    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 getRealm(args: GetRealmArgs, opts?: InvokeOptions): Promise<GetRealmResult>
    function getRealmOutput(args: GetRealmOutputArgs, opts?: InvokeOptions): Output<GetRealmResult>
    def get_realm(id: Optional[str] = None,
                  name: Optional[str] = None,
                  realm_type: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetRealmResult
    def get_realm_output(id: Optional[pulumi.Input[str]] = None,
                  name: Optional[pulumi.Input[str]] = None,
                  realm_type: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetRealmResult]
    func LookupRealm(ctx *Context, args *LookupRealmArgs, opts ...InvokeOption) (*LookupRealmResult, error)
    func LookupRealmOutput(ctx *Context, args *LookupRealmOutputArgs, opts ...InvokeOption) LookupRealmResultOutput

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

    public static class GetRealm 
    {
        public static Task<GetRealmResult> InvokeAsync(GetRealmArgs args, InvokeOptions? opts = null)
        public static Output<GetRealmResult> Invoke(GetRealmInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRealmResult> getRealm(GetRealmArgs args, InvokeOptions options)
    public static Output<GetRealmResult> getRealm(GetRealmArgs args, InvokeOptions options)
    
    fn::invoke:
      function: okta:index/getRealm:getRealm
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The id of the Okta Realm.
    Name string
    The name of the Okta Realm.
    RealmType string
    The realm type. Valid values: PARTNER and DEFAULT
    Id string
    The id of the Okta Realm.
    Name string
    The name of the Okta Realm.
    RealmType string
    The realm type. Valid values: PARTNER and DEFAULT
    id String
    The id of the Okta Realm.
    name String
    The name of the Okta Realm.
    realmType String
    The realm type. Valid values: PARTNER and DEFAULT
    id string
    The id of the Okta Realm.
    name string
    The name of the Okta Realm.
    realmType string
    The realm type. Valid values: PARTNER and DEFAULT
    id str
    The id of the Okta Realm.
    name str
    The name of the Okta Realm.
    realm_type str
    The realm type. Valid values: PARTNER and DEFAULT
    id String
    The id of the Okta Realm.
    name String
    The name of the Okta Realm.
    realmType String
    The realm type. Valid values: PARTNER and DEFAULT

    getRealm Result

    The following output properties are available:

    Id string
    The id of the Okta Realm.
    IsDefault bool
    Indicates whether the realm is the default realm.
    Name string
    The name of the Okta Realm.
    RealmType string
    The realm type. Valid values: PARTNER and DEFAULT
    Id string
    The id of the Okta Realm.
    IsDefault bool
    Indicates whether the realm is the default realm.
    Name string
    The name of the Okta Realm.
    RealmType string
    The realm type. Valid values: PARTNER and DEFAULT
    id String
    The id of the Okta Realm.
    isDefault Boolean
    Indicates whether the realm is the default realm.
    name String
    The name of the Okta Realm.
    realmType String
    The realm type. Valid values: PARTNER and DEFAULT
    id string
    The id of the Okta Realm.
    isDefault boolean
    Indicates whether the realm is the default realm.
    name string
    The name of the Okta Realm.
    realmType string
    The realm type. Valid values: PARTNER and DEFAULT
    id str
    The id of the Okta Realm.
    is_default bool
    Indicates whether the realm is the default realm.
    name str
    The name of the Okta Realm.
    realm_type str
    The realm type. Valid values: PARTNER and DEFAULT
    id String
    The id of the Okta Realm.
    isDefault Boolean
    Indicates whether the realm is the default realm.
    name String
    The name of the Okta Realm.
    realmType String
    The realm type. Valid values: PARTNER and DEFAULT

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Okta v5.2.0 published on Thursday, Sep 4, 2025 by Pulumi