# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs

__all__ = [
    'GetDomainResult',
    'AwaitableGetDomainResult',
    'get_domain',
    'get_domain_output',
]

@pulumi.output_type
class GetDomainResult:
    """
    A collection of values returned by getDomain.
    """
    def __init__(__self__, admin_email=None, admin_first_name=None, admin_last_name=None, admin_user_name=None, compartment_id=None, defined_tags=None, description=None, display_name=None, domain_id=None, freeform_tags=None, home_region=None, home_region_url=None, id=None, is_hidden_on_login=None, is_notification_bypassed=None, is_primary_email_required=None, license_type=None, lifecycle_details=None, replica_regions=None, state=None, time_created=None, type=None, url=None):
        if admin_email and not isinstance(admin_email, str):
            raise TypeError("Expected argument 'admin_email' to be a str")
        pulumi.set(__self__, "admin_email", admin_email)
        if admin_first_name and not isinstance(admin_first_name, str):
            raise TypeError("Expected argument 'admin_first_name' to be a str")
        pulumi.set(__self__, "admin_first_name", admin_first_name)
        if admin_last_name and not isinstance(admin_last_name, str):
            raise TypeError("Expected argument 'admin_last_name' to be a str")
        pulumi.set(__self__, "admin_last_name", admin_last_name)
        if admin_user_name and not isinstance(admin_user_name, str):
            raise TypeError("Expected argument 'admin_user_name' to be a str")
        pulumi.set(__self__, "admin_user_name", admin_user_name)
        if compartment_id and not isinstance(compartment_id, str):
            raise TypeError("Expected argument 'compartment_id' to be a str")
        pulumi.set(__self__, "compartment_id", compartment_id)
        if defined_tags and not isinstance(defined_tags, dict):
            raise TypeError("Expected argument 'defined_tags' to be a dict")
        pulumi.set(__self__, "defined_tags", defined_tags)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        if domain_id and not isinstance(domain_id, str):
            raise TypeError("Expected argument 'domain_id' to be a str")
        pulumi.set(__self__, "domain_id", domain_id)
        if freeform_tags and not isinstance(freeform_tags, dict):
            raise TypeError("Expected argument 'freeform_tags' to be a dict")
        pulumi.set(__self__, "freeform_tags", freeform_tags)
        if home_region and not isinstance(home_region, str):
            raise TypeError("Expected argument 'home_region' to be a str")
        pulumi.set(__self__, "home_region", home_region)
        if home_region_url and not isinstance(home_region_url, str):
            raise TypeError("Expected argument 'home_region_url' to be a str")
        pulumi.set(__self__, "home_region_url", home_region_url)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if is_hidden_on_login and not isinstance(is_hidden_on_login, bool):
            raise TypeError("Expected argument 'is_hidden_on_login' to be a bool")
        pulumi.set(__self__, "is_hidden_on_login", is_hidden_on_login)
        if is_notification_bypassed and not isinstance(is_notification_bypassed, bool):
            raise TypeError("Expected argument 'is_notification_bypassed' to be a bool")
        pulumi.set(__self__, "is_notification_bypassed", is_notification_bypassed)
        if is_primary_email_required and not isinstance(is_primary_email_required, bool):
            raise TypeError("Expected argument 'is_primary_email_required' to be a bool")
        pulumi.set(__self__, "is_primary_email_required", is_primary_email_required)
        if license_type and not isinstance(license_type, str):
            raise TypeError("Expected argument 'license_type' to be a str")
        pulumi.set(__self__, "license_type", license_type)
        if lifecycle_details and not isinstance(lifecycle_details, str):
            raise TypeError("Expected argument 'lifecycle_details' to be a str")
        pulumi.set(__self__, "lifecycle_details", lifecycle_details)
        if replica_regions and not isinstance(replica_regions, list):
            raise TypeError("Expected argument 'replica_regions' to be a list")
        pulumi.set(__self__, "replica_regions", replica_regions)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if time_created and not isinstance(time_created, str):
            raise TypeError("Expected argument 'time_created' to be a str")
        pulumi.set(__self__, "time_created", time_created)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)
        if url and not isinstance(url, str):
            raise TypeError("Expected argument 'url' to be a str")
        pulumi.set(__self__, "url", url)

    @property
    @pulumi.getter(name="adminEmail")
    def admin_email(self) -> str:
        return pulumi.get(self, "admin_email")

    @property
    @pulumi.getter(name="adminFirstName")
    def admin_first_name(self) -> str:
        return pulumi.get(self, "admin_first_name")

    @property
    @pulumi.getter(name="adminLastName")
    def admin_last_name(self) -> str:
        return pulumi.get(self, "admin_last_name")

    @property
    @pulumi.getter(name="adminUserName")
    def admin_user_name(self) -> str:
        return pulumi.get(self, "admin_user_name")

    @property
    @pulumi.getter(name="compartmentId")
    def compartment_id(self) -> str:
        """
        The OCID of the compartment containing the domain.
        """
        return pulumi.get(self, "compartment_id")

    @property
    @pulumi.getter(name="definedTags")
    def defined_tags(self) -> Mapping[str, Any]:
        """
        Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
        """
        return pulumi.get(self, "defined_tags")

    @property
    @pulumi.getter
    def description(self) -> str:
        """
        The domain descripition
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> str:
        """
        The mutable display name of the domain
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter(name="domainId")
    def domain_id(self) -> str:
        return pulumi.get(self, "domain_id")

    @property
    @pulumi.getter(name="freeformTags")
    def freeform_tags(self) -> Mapping[str, Any]:
        """
        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
        """
        return pulumi.get(self, "freeform_tags")

    @property
    @pulumi.getter(name="homeRegion")
    def home_region(self) -> str:
        """
        The home region for the domain. See [Regions and Availability Domains](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm) for the full list of supported region names.  Example: `us-phoenix-1`
        """
        return pulumi.get(self, "home_region")

    @property
    @pulumi.getter(name="homeRegionUrl")
    def home_region_url(self) -> str:
        """
        Region specific domain URL.
        """
        return pulumi.get(self, "home_region_url")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The OCID of the domain
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="isHiddenOnLogin")
    def is_hidden_on_login(self) -> bool:
        """
        Indicates whether domain is hidden on login screen or not.
        """
        return pulumi.get(self, "is_hidden_on_login")

    @property
    @pulumi.getter(name="isNotificationBypassed")
    def is_notification_bypassed(self) -> bool:
        return pulumi.get(self, "is_notification_bypassed")

    @property
    @pulumi.getter(name="isPrimaryEmailRequired")
    def is_primary_email_required(self) -> bool:
        return pulumi.get(self, "is_primary_email_required")

    @property
    @pulumi.getter(name="licenseType")
    def license_type(self) -> str:
        """
        The License type of Domain
        """
        return pulumi.get(self, "license_type")

    @property
    @pulumi.getter(name="lifecycleDetails")
    def lifecycle_details(self) -> str:
        """
        Any additional details about the current state of the Domain.
        """
        return pulumi.get(self, "lifecycle_details")

    @property
    @pulumi.getter(name="replicaRegions")
    def replica_regions(self) -> Sequence['outputs.GetDomainReplicaRegionResult']:
        """
        The regions domain is replication to.
        """
        return pulumi.get(self, "replica_regions")

    @property
    @pulumi.getter
    def state(self) -> str:
        """
        The current state.
        """
        return pulumi.get(self, "state")

    @property
    @pulumi.getter(name="timeCreated")
    def time_created(self) -> str:
        """
        Date and time the domain was created, in the format defined by RFC3339.  Example: `2016-08-25T21:10:29.600Z`
        """
        return pulumi.get(self, "time_created")

    @property
    @pulumi.getter
    def type(self) -> str:
        """
        The type of the domain.
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter
    def url(self) -> str:
        """
        Region agnostic domain URL.
        """
        return pulumi.get(self, "url")


class AwaitableGetDomainResult(GetDomainResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDomainResult(
            admin_email=self.admin_email,
            admin_first_name=self.admin_first_name,
            admin_last_name=self.admin_last_name,
            admin_user_name=self.admin_user_name,
            compartment_id=self.compartment_id,
            defined_tags=self.defined_tags,
            description=self.description,
            display_name=self.display_name,
            domain_id=self.domain_id,
            freeform_tags=self.freeform_tags,
            home_region=self.home_region,
            home_region_url=self.home_region_url,
            id=self.id,
            is_hidden_on_login=self.is_hidden_on_login,
            is_notification_bypassed=self.is_notification_bypassed,
            is_primary_email_required=self.is_primary_email_required,
            license_type=self.license_type,
            lifecycle_details=self.lifecycle_details,
            replica_regions=self.replica_regions,
            state=self.state,
            time_created=self.time_created,
            type=self.type,
            url=self.url)


def get_domain(domain_id: Optional[str] = None,
               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDomainResult:
    """
    This data source provides details about a specific Domain resource in Oracle Cloud Infrastructure Identity service.

    Get the specified domain's information.

    - If the domain doesn't exists, returns 404 NOT FOUND.
    - If any internal error occurs, returns 500 INTERNAL SERVER ERROR.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_domain = oci.Identity.get_domain(domain_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str domain_id: The OCID of the domain
    """
    __args__ = dict()
    __args__['domainId'] = domain_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:Identity/getDomain:getDomain', __args__, opts=opts, typ=GetDomainResult).value

    return AwaitableGetDomainResult(
        admin_email=__ret__.admin_email,
        admin_first_name=__ret__.admin_first_name,
        admin_last_name=__ret__.admin_last_name,
        admin_user_name=__ret__.admin_user_name,
        compartment_id=__ret__.compartment_id,
        defined_tags=__ret__.defined_tags,
        description=__ret__.description,
        display_name=__ret__.display_name,
        domain_id=__ret__.domain_id,
        freeform_tags=__ret__.freeform_tags,
        home_region=__ret__.home_region,
        home_region_url=__ret__.home_region_url,
        id=__ret__.id,
        is_hidden_on_login=__ret__.is_hidden_on_login,
        is_notification_bypassed=__ret__.is_notification_bypassed,
        is_primary_email_required=__ret__.is_primary_email_required,
        license_type=__ret__.license_type,
        lifecycle_details=__ret__.lifecycle_details,
        replica_regions=__ret__.replica_regions,
        state=__ret__.state,
        time_created=__ret__.time_created,
        type=__ret__.type,
        url=__ret__.url)


@_utilities.lift_output_func(get_domain)
def get_domain_output(domain_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDomainResult]:
    """
    This data source provides details about a specific Domain resource in Oracle Cloud Infrastructure Identity service.

    Get the specified domain's information.

    - If the domain doesn't exists, returns 404 NOT FOUND.
    - If any internal error occurs, returns 500 INTERNAL SERVER ERROR.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_domain = oci.Identity.get_domain(domain_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str domain_id: The OCID of the domain
    """
    ...
