# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = ['DomainArgs', 'Domain']

@pulumi.input_type
class DomainArgs:
    def __init__(__self__, *,
                 brand_id: Optional[pulumi.Input[_builtins.str]] = None,
                 certificate_source_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a Domain resource.
        :param pulumi.Input[_builtins.str] brand_id: Brand id of the domain
        :param pulumi.Input[_builtins.str] certificate_source_type: Certificate source type that indicates whether the certificate is provided by the user or Okta. Accepted values: `MANUAL`, `OKTA_MANAGED`. Warning: Use of OKTA_MANAGED requires a feature flag to be enabled. Default value = MANUAL
        :param pulumi.Input[_builtins.str] name: Custom Domain name
        """
        if brand_id is not None:
            pulumi.set(__self__, "brand_id", brand_id)
        if certificate_source_type is not None:
            pulumi.set(__self__, "certificate_source_type", certificate_source_type)
        if name is not None:
            pulumi.set(__self__, "name", name)

    @_builtins.property
    @pulumi.getter(name="brandId")
    def brand_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Brand id of the domain
        """
        return pulumi.get(self, "brand_id")

    @brand_id.setter
    def brand_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "brand_id", value)

    @_builtins.property
    @pulumi.getter(name="certificateSourceType")
    def certificate_source_type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Certificate source type that indicates whether the certificate is provided by the user or Okta. Accepted values: `MANUAL`, `OKTA_MANAGED`. Warning: Use of OKTA_MANAGED requires a feature flag to be enabled. Default value = MANUAL
        """
        return pulumi.get(self, "certificate_source_type")

    @certificate_source_type.setter
    def certificate_source_type(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "certificate_source_type", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Custom Domain name
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)


@pulumi.input_type
class _DomainState:
    def __init__(__self__, *,
                 brand_id: Optional[pulumi.Input[_builtins.str]] = None,
                 certificate_source_type: Optional[pulumi.Input[_builtins.str]] = None,
                 dns_records: Optional[pulumi.Input[Sequence[pulumi.Input['DomainDnsRecordArgs']]]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 validation_status: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering Domain resources.
        :param pulumi.Input[_builtins.str] brand_id: Brand id of the domain
        :param pulumi.Input[_builtins.str] certificate_source_type: Certificate source type that indicates whether the certificate is provided by the user or Okta. Accepted values: `MANUAL`, `OKTA_MANAGED`. Warning: Use of OKTA_MANAGED requires a feature flag to be enabled. Default value = MANUAL
        :param pulumi.Input[Sequence[pulumi.Input['DomainDnsRecordArgs']]] dns_records: TXT and CNAME records to be registered for the Domain
        :param pulumi.Input[_builtins.str] name: Custom Domain name
        :param pulumi.Input[_builtins.str] validation_status: Status of the domain
        """
        if brand_id is not None:
            pulumi.set(__self__, "brand_id", brand_id)
        if certificate_source_type is not None:
            pulumi.set(__self__, "certificate_source_type", certificate_source_type)
        if dns_records is not None:
            pulumi.set(__self__, "dns_records", dns_records)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if validation_status is not None:
            pulumi.set(__self__, "validation_status", validation_status)

    @_builtins.property
    @pulumi.getter(name="brandId")
    def brand_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Brand id of the domain
        """
        return pulumi.get(self, "brand_id")

    @brand_id.setter
    def brand_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "brand_id", value)

    @_builtins.property
    @pulumi.getter(name="certificateSourceType")
    def certificate_source_type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Certificate source type that indicates whether the certificate is provided by the user or Okta. Accepted values: `MANUAL`, `OKTA_MANAGED`. Warning: Use of OKTA_MANAGED requires a feature flag to be enabled. Default value = MANUAL
        """
        return pulumi.get(self, "certificate_source_type")

    @certificate_source_type.setter
    def certificate_source_type(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "certificate_source_type", value)

    @_builtins.property
    @pulumi.getter(name="dnsRecords")
    def dns_records(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DomainDnsRecordArgs']]]]:
        """
        TXT and CNAME records to be registered for the Domain
        """
        return pulumi.get(self, "dns_records")

    @dns_records.setter
    def dns_records(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DomainDnsRecordArgs']]]]):
        pulumi.set(self, "dns_records", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Custom Domain name
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter(name="validationStatus")
    def validation_status(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Status of the domain
        """
        return pulumi.get(self, "validation_status")

    @validation_status.setter
    def validation_status(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "validation_status", value)


@pulumi.type_token("okta:index/domain:Domain")
class Domain(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 brand_id: Optional[pulumi.Input[_builtins.str]] = None,
                 certificate_source_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        Manages custom domain for your organization.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_okta as okta

        example = okta.Domain("example", name="www.example.com")
        ```

        ## Import

        ```sh
        $ pulumi import okta:index/domain:Domain example <domain_id>
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] brand_id: Brand id of the domain
        :param pulumi.Input[_builtins.str] certificate_source_type: Certificate source type that indicates whether the certificate is provided by the user or Okta. Accepted values: `MANUAL`, `OKTA_MANAGED`. Warning: Use of OKTA_MANAGED requires a feature flag to be enabled. Default value = MANUAL
        :param pulumi.Input[_builtins.str] name: Custom Domain name
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[DomainArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manages custom domain for your organization.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_okta as okta

        example = okta.Domain("example", name="www.example.com")
        ```

        ## Import

        ```sh
        $ pulumi import okta:index/domain:Domain example <domain_id>
        ```

        :param str resource_name: The name of the resource.
        :param DomainArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(DomainArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 brand_id: Optional[pulumi.Input[_builtins.str]] = None,
                 certificate_source_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = DomainArgs.__new__(DomainArgs)

            __props__.__dict__["brand_id"] = brand_id
            __props__.__dict__["certificate_source_type"] = certificate_source_type
            __props__.__dict__["name"] = name
            __props__.__dict__["dns_records"] = None
            __props__.__dict__["validation_status"] = None
        super(Domain, __self__).__init__(
            'okta:index/domain:Domain',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            brand_id: Optional[pulumi.Input[_builtins.str]] = None,
            certificate_source_type: Optional[pulumi.Input[_builtins.str]] = None,
            dns_records: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DomainDnsRecordArgs', 'DomainDnsRecordArgsDict']]]]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            validation_status: Optional[pulumi.Input[_builtins.str]] = None) -> 'Domain':
        """
        Get an existing Domain resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] brand_id: Brand id of the domain
        :param pulumi.Input[_builtins.str] certificate_source_type: Certificate source type that indicates whether the certificate is provided by the user or Okta. Accepted values: `MANUAL`, `OKTA_MANAGED`. Warning: Use of OKTA_MANAGED requires a feature flag to be enabled. Default value = MANUAL
        :param pulumi.Input[Sequence[pulumi.Input[Union['DomainDnsRecordArgs', 'DomainDnsRecordArgsDict']]]] dns_records: TXT and CNAME records to be registered for the Domain
        :param pulumi.Input[_builtins.str] name: Custom Domain name
        :param pulumi.Input[_builtins.str] validation_status: Status of the domain
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _DomainState.__new__(_DomainState)

        __props__.__dict__["brand_id"] = brand_id
        __props__.__dict__["certificate_source_type"] = certificate_source_type
        __props__.__dict__["dns_records"] = dns_records
        __props__.__dict__["name"] = name
        __props__.__dict__["validation_status"] = validation_status
        return Domain(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="brandId")
    def brand_id(self) -> pulumi.Output[_builtins.str]:
        """
        Brand id of the domain
        """
        return pulumi.get(self, "brand_id")

    @_builtins.property
    @pulumi.getter(name="certificateSourceType")
    def certificate_source_type(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        Certificate source type that indicates whether the certificate is provided by the user or Okta. Accepted values: `MANUAL`, `OKTA_MANAGED`. Warning: Use of OKTA_MANAGED requires a feature flag to be enabled. Default value = MANUAL
        """
        return pulumi.get(self, "certificate_source_type")

    @_builtins.property
    @pulumi.getter(name="dnsRecords")
    def dns_records(self) -> pulumi.Output[Sequence['outputs.DomainDnsRecord']]:
        """
        TXT and CNAME records to be registered for the Domain
        """
        return pulumi.get(self, "dns_records")

    @_builtins.property
    @pulumi.getter
    def name(self) -> pulumi.Output[_builtins.str]:
        """
        Custom Domain name
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="validationStatus")
    def validation_status(self) -> pulumi.Output[_builtins.str]:
        """
        Status of the domain
        """
        return pulumi.get(self, "validation_status")

