# 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
from ._inputs import *

__all__ = [
    'GetExsiHostsResult',
    'AwaitableGetExsiHostsResult',
    'get_exsi_hosts',
    'get_exsi_hosts_output',
]

@pulumi.output_type
class GetExsiHostsResult:
    """
    A collection of values returned by getExsiHosts.
    """
    def __init__(__self__, compute_instance_id=None, display_name=None, esxi_host_collections=None, filters=None, id=None, sddc_id=None, state=None):
        if compute_instance_id and not isinstance(compute_instance_id, str):
            raise TypeError("Expected argument 'compute_instance_id' to be a str")
        pulumi.set(__self__, "compute_instance_id", compute_instance_id)
        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 esxi_host_collections and not isinstance(esxi_host_collections, list):
            raise TypeError("Expected argument 'esxi_host_collections' to be a list")
        pulumi.set(__self__, "esxi_host_collections", esxi_host_collections)
        if filters and not isinstance(filters, list):
            raise TypeError("Expected argument 'filters' to be a list")
        pulumi.set(__self__, "filters", filters)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if sddc_id and not isinstance(sddc_id, str):
            raise TypeError("Expected argument 'sddc_id' to be a str")
        pulumi.set(__self__, "sddc_id", sddc_id)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)

    @property
    @pulumi.getter(name="computeInstanceId")
    def compute_instance_id(self) -> Optional[str]:
        """
        In terms of implementation, an ESXi host is a Compute instance that is configured with the chosen bundle of VMware software. The `computeInstanceId` is the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of that Compute instance.
        """
        return pulumi.get(self, "compute_instance_id")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> Optional[str]:
        """
        A descriptive name for the ESXi host. Does not have to be unique, and it's changeable. Avoid entering confidential information.
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter(name="esxiHostCollections")
    def esxi_host_collections(self) -> Sequence['outputs.GetExsiHostsEsxiHostCollectionResult']:
        """
        The list of esxi_host_collection.
        """
        return pulumi.get(self, "esxi_host_collections")

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

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="sddcId")
    def sddc_id(self) -> Optional[str]:
        """
        The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the SDDC that the ESXi host belongs to.
        """
        return pulumi.get(self, "sddc_id")

    @property
    @pulumi.getter
    def state(self) -> Optional[str]:
        """
        The current state of the ESXi host.
        """
        return pulumi.get(self, "state")


class AwaitableGetExsiHostsResult(GetExsiHostsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetExsiHostsResult(
            compute_instance_id=self.compute_instance_id,
            display_name=self.display_name,
            esxi_host_collections=self.esxi_host_collections,
            filters=self.filters,
            id=self.id,
            sddc_id=self.sddc_id,
            state=self.state)


def get_exsi_hosts(compute_instance_id: Optional[str] = None,
                   display_name: Optional[str] = None,
                   filters: Optional[Sequence[pulumi.InputType['GetExsiHostsFilterArgs']]] = None,
                   sddc_id: Optional[str] = None,
                   state: Optional[str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetExsiHostsResult:
    """
    This data source provides the list of Esxi Hosts in Oracle Cloud Infrastructure Oracle Cloud VMware Solution service.

    Lists the ESXi hosts in the specified SDDC. The list can be filtered
    by Compute instance OCID or ESXi display name.

    Remember that in terms of implementation, an ESXi host is a Compute instance that
    is configured with the chosen bundle of VMware software. Each `EsxiHost`
    object has its own OCID (`id`), and a separate attribute for the OCID of
    the Compute instance (`computeInstanceId`). When filtering the list of
    ESXi hosts, you can specify the OCID of the Compute instance, not the
    ESXi host OCID.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_esxi_hosts = oci.Ocvp.get_exsi_hosts(compute_instance_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        display_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        sddc_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        state=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str compute_instance_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Compute instance.
    :param str display_name: A filter to return only resources that match the given display name exactly.
    :param str sddc_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the SDDC.
    :param str state: The lifecycle state of the resource.
    """
    __args__ = dict()
    __args__['computeInstanceId'] = compute_instance_id
    __args__['displayName'] = display_name
    __args__['filters'] = filters
    __args__['sddcId'] = sddc_id
    __args__['state'] = state
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:Ocvp/getExsiHosts:getExsiHosts', __args__, opts=opts, typ=GetExsiHostsResult).value

    return AwaitableGetExsiHostsResult(
        compute_instance_id=__ret__.compute_instance_id,
        display_name=__ret__.display_name,
        esxi_host_collections=__ret__.esxi_host_collections,
        filters=__ret__.filters,
        id=__ret__.id,
        sddc_id=__ret__.sddc_id,
        state=__ret__.state)


@_utilities.lift_output_func(get_exsi_hosts)
def get_exsi_hosts_output(compute_instance_id: Optional[pulumi.Input[Optional[str]]] = None,
                          display_name: Optional[pulumi.Input[Optional[str]]] = None,
                          filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetExsiHostsFilterArgs']]]]] = None,
                          sddc_id: Optional[pulumi.Input[Optional[str]]] = None,
                          state: Optional[pulumi.Input[Optional[str]]] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetExsiHostsResult]:
    """
    This data source provides the list of Esxi Hosts in Oracle Cloud Infrastructure Oracle Cloud VMware Solution service.

    Lists the ESXi hosts in the specified SDDC. The list can be filtered
    by Compute instance OCID or ESXi display name.

    Remember that in terms of implementation, an ESXi host is a Compute instance that
    is configured with the chosen bundle of VMware software. Each `EsxiHost`
    object has its own OCID (`id`), and a separate attribute for the OCID of
    the Compute instance (`computeInstanceId`). When filtering the list of
    ESXi hosts, you can specify the OCID of the Compute instance, not the
    ESXi host OCID.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_esxi_hosts = oci.Ocvp.get_exsi_hosts(compute_instance_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        display_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        sddc_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        state=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str compute_instance_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Compute instance.
    :param str display_name: A filter to return only resources that match the given display name exactly.
    :param str sddc_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the SDDC.
    :param str state: The lifecycle state of the resource.
    """
    ...
