okta logo
Okta v3.21.0, Mar 15 23

okta.Index.getDomain

Use this data source to retrieve a domain from Okta.

  • https://developer.okta.com/docs/reference/api/domains/#get-domain
  • https://developer.okta.com/docs/reference/api/domains/#domainresponse-object

Example Usage

using System.Collections.Generic;
using Pulumi;
using Okta = Pulumi.Okta;

return await Deployment.RunAsync(() => 
{
    var example = new Okta.Domain("example");

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

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

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := okta.NewDomain(ctx, "example", nil)
		if err != nil {
			return err
		}
		_, err = Index.GetDomain(ctx, &index.GetDomainArgs{
			DomainIdOrName: "www.example.com",
		}, nil)
		if err != nil {
			return err
		}
		_ = Index.GetDomainOutput(ctx, index.GetDomainOutputArgs{
			DomainIdOrName: example.ID(),
		}, nil)
		return nil
	})
}
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.Index.IndexFunctions;
import com.pulumi.okta.Index.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");

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

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

    }
}
import pulumi
import pulumi_okta as okta

example = okta.Domain("example")
by_name = okta.Index.get_domain(domain_id_or_name="www.example.com")
by_id = okta.Index.get_domain_output(domain_id_or_name=example.id)
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const example = new okta.Domain("example", {});
const by-name = okta.Index.getDomain({
    domainIdOrName: "www.example.com",
});
const by-id = okta.Index.getDomainOutput({
    domainIdOrName: example.id,
});
resources:
  example:
    type: okta:Domain
variables:
  by-name:
    fn::invoke:
      Function: okta:Index:getDomain
      Arguments:
        domainIdOrName: www.example.com
  by-id:
    fn::invoke:
      Function: okta:Index:getDomain
      Arguments:
        domainIdOrName: ${example.id}

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>
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]
func GetDomain(ctx *Context, args *GetDomainArgs, opts ...InvokeOption) (*GetDomainResult, error)
func GetDomainOutput(ctx *Context, args *GetDomainOutputArgs, opts ...InvokeOption) GetDomainResultOutput

> Note: This function is named GetDomain 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)
}
public static CompletableFuture<GetDomainResult> getDomain(GetDomainArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: okta:Index/getDomain:getDomain
  arguments:
    # arguments dictionary

The following arguments are supported:

DomainIdOrName string

The Okta ID of the domain or the domain name itself.

DomainIdOrName string

The Okta ID of the domain or the domain name itself.

domainIdOrName String

The Okta ID of the domain or the domain name itself.

domainIdOrName string

The Okta ID of the domain or the domain name itself.

domain_id_or_name str

The Okta ID of the domain or the domain name itself.

domainIdOrName String

The Okta ID of the domain or the domain name itself.

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
Id string

Domain ID

PublicCertificate Dictionary<string, string>

Certificate metadata for the Domain

ValidationStatus string

Status of the domain. Values: NOT_STARTED, IN_PROGRESS, 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
Id string

Domain ID

PublicCertificate map[string]string

Certificate metadata for the Domain

ValidationStatus string

Status of the domain. Values: NOT_STARTED, IN_PROGRESS, 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
id String

Domain ID

publicCertificate Map<String,String>

Certificate metadata for the Domain

validationStatus String

Status of the domain. Values: NOT_STARTED, IN_PROGRESS, 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
id string

Domain ID

publicCertificate {[key: string]: string}

Certificate metadata for the Domain

validationStatus string

Status of the domain. Values: NOT_STARTED, IN_PROGRESS, 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 GetDomainDnsRecord]

TXT and CNAME records to be registered for the Domain.

domain str

Domain name

domain_id_or_name str
id str

Domain ID

public_certificate Mapping[str, str]

Certificate metadata for the Domain

validation_status str

Status of the domain. Values: NOT_STARTED, IN_PROGRESS, 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
id String

Domain ID

publicCertificate Map<String>

Certificate metadata for the Domain

validationStatus String

Status of the domain. Values: NOT_STARTED, IN_PROGRESS, VERIFIED, COMPLETED

Supporting Types

GetDomainDnsRecord

Expiration string

TXT record expiration.

Fqdn string

DNS record name.

RecordType string

Record type can be TXT or CNAME.

Values List<string>

DNS verification value

Expiration string

TXT record expiration.

Fqdn string

DNS record name.

RecordType string

Record type can be TXT or CNAME.

Values []string

DNS verification value

expiration String

TXT record expiration.

fqdn String

DNS record name.

recordType String

Record type can be TXT or CNAME.

values List<String>

DNS verification value

expiration string

TXT record expiration.

fqdn string

DNS record name.

recordType string

Record type can be TXT or CNAME.

values string[]

DNS verification value

expiration str

TXT record expiration.

fqdn str

DNS record name.

record_type str

Record type can be TXT or CNAME.

values Sequence[str]

DNS verification value

expiration String

TXT record expiration.

fqdn String

DNS record name.

recordType String

Record type can be TXT or CNAME.

values 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.