# 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 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

__all__ = [
    'GetNlbResult',
    'AwaitableGetNlbResult',
    'get_nlb',
    'get_nlb_output',
]

@pulumi.output_type
class GetNlbResult:
    """
    A collection of values returned by getNlb.
    """
    def __init__(__self__, created_at=None, description=None, id=None, ip_address=None, name=None, state=None, zone=None):
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ip_address and not isinstance(ip_address, str):
            raise TypeError("Expected argument 'ip_address' to be a str")
        pulumi.set(__self__, "ip_address", ip_address)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if zone and not isinstance(zone, str):
            raise TypeError("Expected argument 'zone' to be a str")
        pulumi.set(__self__, "zone", zone)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> str:
        """
        The NLB creation date.
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter
    def description(self) -> str:
        """
        The Network Load Balancers (NLB) description.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def id(self) -> Optional[str]:
        """
        The Network Load Balancers (NLB) ID to match (conflicts with `name`).
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="ipAddress")
    def ip_address(self) -> str:
        """
        The NLB public IPv4 address.
        """
        return pulumi.get(self, "ip_address")

    @property
    @pulumi.getter
    def name(self) -> Optional[str]:
        """
        The NLB name to match (conflicts with `id`).
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter
    def zone(self) -> str:
        """
        The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.
        """
        return pulumi.get(self, "zone")


class AwaitableGetNlbResult(GetNlbResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNlbResult(
            created_at=self.created_at,
            description=self.description,
            id=self.id,
            ip_address=self.ip_address,
            name=self.name,
            state=self.state,
            zone=self.zone)


def get_nlb(id: Optional[str] = None,
            name: Optional[str] = None,
            zone: Optional[str] = None,
            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNlbResult:
    """
    Fetch Exoscale [Network Load Balancers (NLB)](https://community.exoscale.com/documentation/compute/network-load-balancer/) data.

    Corresponding resource: exoscale_nlb.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_exoscale as exoscale

    my_nlb = exoscale.get_nlb(zone="ch-gva-2",
        name="my-nlb")
    pulumi.export("myNlbId", my_nlb.id)
    ```

    Please refer to the examples
    directory for complete configuration examples.


    :param str id: The Network Load Balancers (NLB) ID to match (conflicts with `name`).
    :param str name: The NLB name to match (conflicts with `id`).
    :param str zone: The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['name'] = name
    __args__['zone'] = zone
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('exoscale:index/getNlb:getNlb', __args__, opts=opts, typ=GetNlbResult).value

    return AwaitableGetNlbResult(
        created_at=pulumi.get(__ret__, 'created_at'),
        description=pulumi.get(__ret__, 'description'),
        id=pulumi.get(__ret__, 'id'),
        ip_address=pulumi.get(__ret__, 'ip_address'),
        name=pulumi.get(__ret__, 'name'),
        state=pulumi.get(__ret__, 'state'),
        zone=pulumi.get(__ret__, 'zone'))
def get_nlb_output(id: Optional[pulumi.Input[Optional[str]]] = None,
                   name: Optional[pulumi.Input[Optional[str]]] = None,
                   zone: Optional[pulumi.Input[str]] = None,
                   opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNlbResult]:
    """
    Fetch Exoscale [Network Load Balancers (NLB)](https://community.exoscale.com/documentation/compute/network-load-balancer/) data.

    Corresponding resource: exoscale_nlb.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_exoscale as exoscale

    my_nlb = exoscale.get_nlb(zone="ch-gva-2",
        name="my-nlb")
    pulumi.export("myNlbId", my_nlb.id)
    ```

    Please refer to the examples
    directory for complete configuration examples.


    :param str id: The Network Load Balancers (NLB) ID to match (conflicts with `name`).
    :param str name: The NLB name to match (conflicts with `id`).
    :param str zone: The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['name'] = name
    __args__['zone'] = zone
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('exoscale:index/getNlb:getNlb', __args__, opts=opts, typ=GetNlbResult)
    return __ret__.apply(lambda __response__: GetNlbResult(
        created_at=pulumi.get(__response__, 'created_at'),
        description=pulumi.get(__response__, 'description'),
        id=pulumi.get(__response__, 'id'),
        ip_address=pulumi.get(__response__, 'ip_address'),
        name=pulumi.get(__response__, 'name'),
        state=pulumi.get(__response__, 'state'),
        zone=pulumi.get(__response__, 'zone')))
