# 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__ = [
    'GetMicrotenantResult',
    'AwaitableGetMicrotenantResult',
    'get_microtenant',
    'get_microtenant_output',
]

@pulumi.output_type
class GetMicrotenantResult:
    """
    A collection of values returned by getMicrotenant.
    """
    def __init__(__self__, creation_time=None, criteria_attribute=None, criteria_attribute_values=None, description=None, enabled=None, id=None, modified_by=None, modified_time=None, name=None, operator=None, priority=None, roles=None, users=None):
        if creation_time and not isinstance(creation_time, str):
            raise TypeError("Expected argument 'creation_time' to be a str")
        pulumi.set(__self__, "creation_time", creation_time)
        if criteria_attribute and not isinstance(criteria_attribute, str):
            raise TypeError("Expected argument 'criteria_attribute' to be a str")
        pulumi.set(__self__, "criteria_attribute", criteria_attribute)
        if criteria_attribute_values and not isinstance(criteria_attribute_values, list):
            raise TypeError("Expected argument 'criteria_attribute_values' to be a list")
        pulumi.set(__self__, "criteria_attribute_values", criteria_attribute_values)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if enabled and not isinstance(enabled, bool):
            raise TypeError("Expected argument 'enabled' to be a bool")
        pulumi.set(__self__, "enabled", enabled)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if modified_by and not isinstance(modified_by, str):
            raise TypeError("Expected argument 'modified_by' to be a str")
        pulumi.set(__self__, "modified_by", modified_by)
        if modified_time and not isinstance(modified_time, str):
            raise TypeError("Expected argument 'modified_time' to be a str")
        pulumi.set(__self__, "modified_time", modified_time)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if operator and not isinstance(operator, str):
            raise TypeError("Expected argument 'operator' to be a str")
        pulumi.set(__self__, "operator", operator)
        if priority and not isinstance(priority, str):
            raise TypeError("Expected argument 'priority' to be a str")
        pulumi.set(__self__, "priority", priority)
        if roles and not isinstance(roles, list):
            raise TypeError("Expected argument 'roles' to be a list")
        pulumi.set(__self__, "roles", roles)
        if users and not isinstance(users, list):
            raise TypeError("Expected argument 'users' to be a list")
        pulumi.set(__self__, "users", users)

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

    @property
    @pulumi.getter(name="criteriaAttribute")
    def criteria_attribute(self) -> str:
        """
        (string) Type of authentication criteria for the microtenant
        """
        return pulumi.get(self, "criteria_attribute")

    @property
    @pulumi.getter(name="criteriaAttributeValues")
    def criteria_attribute_values(self) -> Sequence[str]:
        """
        (string) The domain associated with the respective microtenant controller resource
        """
        return pulumi.get(self, "criteria_attribute_values")

    @property
    @pulumi.getter
    def description(self) -> str:
        """
        (string) Description of the microtenant controller.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def enabled(self) -> bool:
        """
        (bool) Whether this microtenant resource is enabled or not.
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter
    def id(self) -> Optional[str]:
        return pulumi.get(self, "id")

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

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

    @property
    @pulumi.getter
    def name(self) -> Optional[str]:
        """
        (Required) Name of the microtenant controller.
        """
        return pulumi.get(self, "name")

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

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

    @property
    @pulumi.getter
    def roles(self) -> Sequence['outputs.GetMicrotenantRoleResult']:
        return pulumi.get(self, "roles")

    @property
    @pulumi.getter
    def users(self) -> Sequence['outputs.GetMicrotenantUserResult']:
        return pulumi.get(self, "users")


class AwaitableGetMicrotenantResult(GetMicrotenantResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetMicrotenantResult(
            creation_time=self.creation_time,
            criteria_attribute=self.criteria_attribute,
            criteria_attribute_values=self.criteria_attribute_values,
            description=self.description,
            enabled=self.enabled,
            id=self.id,
            modified_by=self.modified_by,
            modified_time=self.modified_time,
            name=self.name,
            operator=self.operator,
            priority=self.priority,
            roles=self.roles,
            users=self.users)


def get_microtenant(id: Optional[str] = None,
                    name: Optional[str] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetMicrotenantResult:
    """
    The **zpa_microtenant_controller** data source to get information about a machine group created in the Zscaler Private Access cloud. This data source allows administrators to retrieve a specific microtenant ID, which can be passed to other supported resources via the `microtenant_id` attribute.

    ⚠️ **WARNING:**: This feature is in limited availability and requires additional license. To learn more, contact Zscaler Support or your local account team.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_zpa as zpa

    this = zpa.get_microtenant(name="Microtenant_A")
    ```


    :param str name: (Required) Name of the microtenant controller.
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('zpa:index/getMicrotenant:getMicrotenant', __args__, opts=opts, typ=GetMicrotenantResult).value

    return AwaitableGetMicrotenantResult(
        creation_time=pulumi.get(__ret__, 'creation_time'),
        criteria_attribute=pulumi.get(__ret__, 'criteria_attribute'),
        criteria_attribute_values=pulumi.get(__ret__, 'criteria_attribute_values'),
        description=pulumi.get(__ret__, 'description'),
        enabled=pulumi.get(__ret__, 'enabled'),
        id=pulumi.get(__ret__, 'id'),
        modified_by=pulumi.get(__ret__, 'modified_by'),
        modified_time=pulumi.get(__ret__, 'modified_time'),
        name=pulumi.get(__ret__, 'name'),
        operator=pulumi.get(__ret__, 'operator'),
        priority=pulumi.get(__ret__, 'priority'),
        roles=pulumi.get(__ret__, 'roles'),
        users=pulumi.get(__ret__, 'users'))


@_utilities.lift_output_func(get_microtenant)
def get_microtenant_output(id: Optional[pulumi.Input[Optional[str]]] = None,
                           name: Optional[pulumi.Input[Optional[str]]] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetMicrotenantResult]:
    """
    The **zpa_microtenant_controller** data source to get information about a machine group created in the Zscaler Private Access cloud. This data source allows administrators to retrieve a specific microtenant ID, which can be passed to other supported resources via the `microtenant_id` attribute.

    ⚠️ **WARNING:**: This feature is in limited availability and requires additional license. To learn more, contact Zscaler Support or your local account team.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_zpa as zpa

    this = zpa.get_microtenant(name="Microtenant_A")
    ```


    :param str name: (Required) Name of the microtenant controller.
    """
    ...
