1. Packages
  2. Okta Provider
  3. API Docs
  4. getDomain
Okta v4.16.0 published on Wednesday, Apr 9, 2025 by Pulumi

okta.getDomain

Explore with Pulumi AI

Okta v4.16.0 published on Wednesday, Apr 9, 2025 by Pulumi

Get a domain from Okta.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const example = new okta.Domain("example", {name: "www.example.com"});
const by_name = okta.getDomain({
    domainIdOrName: "www.example.com",
});
const by_id = okta.getDomainOutput({
    domainIdOrName: example.id,
});
Copy
import pulumi
import pulumi_okta as okta

example = okta.Domain("example", name="www.example.com")
by_name = okta.get_domain(domain_id_or_name="www.example.com")
by_id = okta.get_domain_output(domain_id_or_name=example.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-okta/sdk/v4/go/okta"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := okta.NewDomain(ctx, "example", &okta.DomainArgs{
			Name: pulumi.String("www.example.com"),
		})
		if err != nil {
			return err
		}
		_, err = okta.LookupDomain(ctx, &okta.LookupDomainArgs{
			DomainIdOrName: "www.example.com",
		}, nil)
		if err != nil {
			return err
		}
		_ = okta.LookupDomainOutput(ctx, okta.GetDomainOutputArgs{
			DomainIdOrName: example.ID(),
		}, nil)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;

return await Deployment.RunAsync(() => 
{
    var example = new Okta.Domain("example", new()
    {
        Name = "www.example.com",
    });

    var by_name = Okta.GetDomain.Invoke(new()
    {
        DomainIdOrName = "www.example.com",
    });

    var by_id = Okta.GetDomain.Invoke(new()
    {
        DomainIdOrName = example.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.Domain;
import com.pulumi.okta.DomainArgs;
import com.pulumi.okta.OktaFunctions;
import com.pulumi.okta.inputs.GetDomainArgs;
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 example = new Domain("example", DomainArgs.builder()
            .name("www.example.com")
            .build());

        final var by-name = OktaFunctions.getDomain(GetDomainArgs.builder()
            .domainIdOrName("www.example.com")
            .build());

        final var by-id = OktaFunctions.getDomain(GetDomainArgs.builder()
            .domainIdOrName(example.id())
            .build());

    }
}
Copy
resources:
  example:
    type: okta:Domain
    properties:
      name: www.example.com
variables:
  by-name:
    fn::invoke:
      function: okta:getDomain
      arguments:
        domainIdOrName: www.example.com
  by-id:
    fn::invoke:
      function: okta:getDomain
      arguments:
        domainIdOrName: ${example.id}
Copy

Using getDomain

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 getDomain(args: GetDomainArgs, opts?: InvokeOptions): Promise<GetDomainResult>
function getDomainOutput(args: GetDomainOutputArgs, opts?: InvokeOptions): Output<GetDomainResult>
Copy
def get_domain(domain_id_or_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetDomainResult
def get_domain_output(domain_id_or_name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetDomainResult]
Copy
func LookupDomain(ctx *Context, args *LookupDomainArgs, opts ...InvokeOption) (*LookupDomainResult, error)
func LookupDomainOutput(ctx *Context, args *LookupDomainOutputArgs, opts ...InvokeOption) LookupDomainResultOutput
Copy

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

public static class GetDomain 
{
    public static Task<GetDomainResult> InvokeAsync(GetDomainArgs args, InvokeOptions? opts = null)
    public static Output<GetDomainResult> Invoke(GetDomainInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDomainResult> getDomain(GetDomainArgs args, InvokeOptions options)
public static Output<GetDomainResult> getDomain(GetDomainArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: okta:index/getDomain:getDomain
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DomainIdOrName This property is required. string
Brand ID
DomainIdOrName This property is required. string
Brand ID
domainIdOrName This property is required. String
Brand ID
domainIdOrName This property is required. string
Brand ID
domain_id_or_name This property is required. str
Brand ID
domainIdOrName This property is required. String
Brand ID

getDomain Result

The following output properties are available:

CertificateSourceType string
Certificate source type that indicates whether the certificate is provided by the user or Okta. Values: MANUAL, OKTA_MANAGED
DnsRecords List<GetDomainDnsRecord>
TXT and CNAME records to be registered for the Domain
Domain string
Domain name
DomainIdOrName string
Brand ID
Id string
The ID of the Domain
PublicCertificate Dictionary<string, string>
Certificate metadata for the Domain
ValidationStatus string
Status of the domain. Values: NOTSTARTED, INPROGRESS, VERIFIED, COMPLETED
CertificateSourceType string
Certificate source type that indicates whether the certificate is provided by the user or Okta. Values: MANUAL, OKTA_MANAGED
DnsRecords []GetDomainDnsRecord
TXT and CNAME records to be registered for the Domain
Domain string
Domain name
DomainIdOrName string
Brand ID
Id string
The ID of the Domain
PublicCertificate map[string]string
Certificate metadata for the Domain
ValidationStatus string
Status of the domain. Values: NOTSTARTED, INPROGRESS, VERIFIED, COMPLETED
certificateSourceType String
Certificate source type that indicates whether the certificate is provided by the user or Okta. Values: MANUAL, OKTA_MANAGED
dnsRecords List<GetDomainDnsRecord>
TXT and CNAME records to be registered for the Domain
domain String
Domain name
domainIdOrName String
Brand ID
id String
The ID of the Domain
publicCertificate Map<String,String>
Certificate metadata for the Domain
validationStatus String
Status of the domain. Values: NOTSTARTED, INPROGRESS, VERIFIED, COMPLETED
certificateSourceType string
Certificate source type that indicates whether the certificate is provided by the user or Okta. Values: MANUAL, OKTA_MANAGED
dnsRecords GetDomainDnsRecord[]
TXT and CNAME records to be registered for the Domain
domain string
Domain name
domainIdOrName string
Brand ID
id string
The ID of the Domain
publicCertificate {[key: string]: string}
Certificate metadata for the Domain
validationStatus string
Status of the domain. Values: NOTSTARTED, INPROGRESS, VERIFIED, COMPLETED
certificate_source_type str
Certificate source type that indicates whether the certificate is provided by the user or Okta. Values: MANUAL, OKTA_MANAGED
dns_records Sequence[GetDomainDnsRecord]
TXT and CNAME records to be registered for the Domain
domain str
Domain name
domain_id_or_name str
Brand ID
id str
The ID of the Domain
public_certificate Mapping[str, str]
Certificate metadata for the Domain
validation_status str
Status of the domain. Values: NOTSTARTED, INPROGRESS, VERIFIED, COMPLETED
certificateSourceType String
Certificate source type that indicates whether the certificate is provided by the user or Okta. Values: MANUAL, OKTA_MANAGED
dnsRecords List<Property Map>
TXT and CNAME records to be registered for the Domain
domain String
Domain name
domainIdOrName String
Brand ID
id String
The ID of the Domain
publicCertificate Map<String>
Certificate metadata for the Domain
validationStatus String
Status of the domain. Values: NOTSTARTED, INPROGRESS, VERIFIED, COMPLETED

Supporting Types

GetDomainDnsRecord

Expiration This property is required. string
TXT record expiration
Fqdn This property is required. string
DNS record name
RecordType This property is required. string
Record type can be TXT or CNAME
Values This property is required. List<string>
DNS verification value
Expiration This property is required. string
TXT record expiration
Fqdn This property is required. string
DNS record name
RecordType This property is required. string
Record type can be TXT or CNAME
Values This property is required. []string
DNS verification value
expiration This property is required. String
TXT record expiration
fqdn This property is required. String
DNS record name
recordType This property is required. String
Record type can be TXT or CNAME
values This property is required. List<String>
DNS verification value
expiration This property is required. string
TXT record expiration
fqdn This property is required. string
DNS record name
recordType This property is required. string
Record type can be TXT or CNAME
values This property is required. string[]
DNS verification value
expiration This property is required. str
TXT record expiration
fqdn This property is required. str
DNS record name
record_type This property is required. str
Record type can be TXT or CNAME
values This property is required. Sequence[str]
DNS verification value
expiration This property is required. String
TXT record expiration
fqdn This property is required. String
DNS record name
recordType This property is required. String
Record type can be TXT or CNAME
values This property is required. List<String>
DNS verification value

Package Details

Repository
Okta pulumi/pulumi-okta
License
Apache-2.0
Notes
This Pulumi package is based on the okta Terraform Provider.
Okta v4.16.0 published on Wednesday, Apr 9, 2025 by Pulumi