# 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__ = [
    'GetMachineGroupResult',
    'AwaitableGetMachineGroupResult',
    'get_machine_group',
    'get_machine_group_output',
]

@pulumi.output_type
class GetMachineGroupResult:
    """
    A collection of values returned by getMachineGroup.
    """
    def __init__(__self__, creation_time=None, description=None, enabled=None, id=None, machines=None, microtenant_id=None, microtenant_name=None, modified_by=None, modified_time=None, name=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 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 machines and not isinstance(machines, list):
            raise TypeError("Expected argument 'machines' to be a list")
        pulumi.set(__self__, "machines", machines)
        if microtenant_id and not isinstance(microtenant_id, str):
            raise TypeError("Expected argument 'microtenant_id' to be a str")
        pulumi.set(__self__, "microtenant_id", microtenant_id)
        if microtenant_name and not isinstance(microtenant_name, str):
            raise TypeError("Expected argument 'microtenant_name' to be a str")
        pulumi.set(__self__, "microtenant_name", microtenant_name)
        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)

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

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

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

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

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

    @property
    @pulumi.getter(name="microtenantId")
    def microtenant_id(self) -> Optional[str]:
        """
        (string) The ID of the microtenant the resource is to be associated with.
        """
        return pulumi.get(self, "microtenant_id")

    @property
    @pulumi.getter(name="microtenantName")
    def microtenant_name(self) -> Optional[str]:
        """
        (string) The name of the microtenant the resource is to be associated with.
        """
        return pulumi.get(self, "microtenant_name")

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

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

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


class AwaitableGetMachineGroupResult(GetMachineGroupResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetMachineGroupResult(
            creation_time=self.creation_time,
            description=self.description,
            enabled=self.enabled,
            id=self.id,
            machines=self.machines,
            microtenant_id=self.microtenant_id,
            microtenant_name=self.microtenant_name,
            modified_by=self.modified_by,
            modified_time=self.modified_time,
            name=self.name)


def get_machine_group(id: Optional[str] = None,
                      microtenant_id: Optional[str] = None,
                      microtenant_name: Optional[str] = None,
                      name: Optional[str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetMachineGroupResult:
    """
    Use the **zpa_machine_group** data source to get information about a machine group created in the Zscaler Private Access cloud. This data source can then be referenced in an Access Policy, Timeout policy, Forwarding Policy, Inspection Policy or Isolation Policy.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_zpa as zpa

    example = zpa.get_machine_group(name="MGR01")
    ```

    ```python
    import pulumi
    import pulumi_zpa as zpa

    example = zpa.get_machine_group(id="1234567890")
    ```


    :param str id: The ID of the machine group to be exported.
    :param str microtenant_id: (string) The ID of the microtenant the resource is to be associated with.
    :param str microtenant_name: (string) The name of the microtenant the resource is to be associated with.
    :param str name: The name of the machine group to be exported.
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['microtenantId'] = microtenant_id
    __args__['microtenantName'] = microtenant_name
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('zpa:index/getMachineGroup:getMachineGroup', __args__, opts=opts, typ=GetMachineGroupResult).value

    return AwaitableGetMachineGroupResult(
        creation_time=pulumi.get(__ret__, 'creation_time'),
        description=pulumi.get(__ret__, 'description'),
        enabled=pulumi.get(__ret__, 'enabled'),
        id=pulumi.get(__ret__, 'id'),
        machines=pulumi.get(__ret__, 'machines'),
        microtenant_id=pulumi.get(__ret__, 'microtenant_id'),
        microtenant_name=pulumi.get(__ret__, 'microtenant_name'),
        modified_by=pulumi.get(__ret__, 'modified_by'),
        modified_time=pulumi.get(__ret__, 'modified_time'),
        name=pulumi.get(__ret__, 'name'))


@_utilities.lift_output_func(get_machine_group)
def get_machine_group_output(id: Optional[pulumi.Input[Optional[str]]] = None,
                             microtenant_id: Optional[pulumi.Input[Optional[str]]] = None,
                             microtenant_name: Optional[pulumi.Input[Optional[str]]] = None,
                             name: Optional[pulumi.Input[Optional[str]]] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetMachineGroupResult]:
    """
    Use the **zpa_machine_group** data source to get information about a machine group created in the Zscaler Private Access cloud. This data source can then be referenced in an Access Policy, Timeout policy, Forwarding Policy, Inspection Policy or Isolation Policy.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_zpa as zpa

    example = zpa.get_machine_group(name="MGR01")
    ```

    ```python
    import pulumi
    import pulumi_zpa as zpa

    example = zpa.get_machine_group(id="1234567890")
    ```


    :param str id: The ID of the machine group to be exported.
    :param str microtenant_id: (string) The ID of the microtenant the resource is to be associated with.
    :param str microtenant_name: (string) The name of the microtenant the resource is to be associated with.
    :param str name: The name of the machine group to be exported.
    """
    ...
