# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from . import outputs
from ._inputs import *

__all__ = ['Node']


class Node(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 address: Optional[pulumi.Input[str]] = None,
                 connection_limit: Optional[pulumi.Input[int]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 dynamic_ratio: Optional[pulumi.Input[int]] = None,
                 fqdn: Optional[pulumi.Input[pulumi.InputType['NodeFqdnArgs']]] = None,
                 monitor: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 rate_limit: Optional[pulumi.Input[str]] = None,
                 ratio: Optional[pulumi.Input[int]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        `ltm.Node` Manages a node configuration

        For resources should be named with their "full path". The full path is the combination of the partition + name of the resource. For example /Common/my-pool.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_f5bigip as f5bigip

        node = f5bigip.ltm.Node("node",
            address="192.168.30.1",
            connection_limit=0,
            description="Test-Node",
            dynamic_ratio=1,
            fqdn=f5bigip.ltm.NodeFqdnArgs(
                address_family="ipv4",
                interval="3000",
            ),
            monitor="/Common/icmp",
            name="/Common/terraform_node1",
            rate_limit="disabled")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] address: IP or hostname of the node
        :param pulumi.Input[int] connection_limit: Specifies the maximum number of connections allowed for the node or node address.
        :param pulumi.Input[str] description: User-defined description give ltm_node
        :param pulumi.Input[int] dynamic_ratio: Specifies the fixed ratio value used for a node during ratio load balancing.
        :param pulumi.Input[str] monitor: specifies the name of the monitor or monitor rule that you want to associate with the node.
        :param pulumi.Input[str] name: Name of the node
        :param pulumi.Input[str] rate_limit: Specifies the maximum number of connections per second allowed for a node or node address. The default value is 'disabled'.
        :param pulumi.Input[int] ratio: Sets the ratio number for the node.
        :param pulumi.Input[str] state: Default is "user-up" you can set to "user-down" if you want to disable
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = dict()

            if address is None and not opts.urn:
                raise TypeError("Missing required property 'address'")
            __props__['address'] = address
            __props__['connection_limit'] = connection_limit
            __props__['description'] = description
            __props__['dynamic_ratio'] = dynamic_ratio
            __props__['fqdn'] = fqdn
            __props__['monitor'] = monitor
            if name is None and not opts.urn:
                raise TypeError("Missing required property 'name'")
            __props__['name'] = name
            __props__['rate_limit'] = rate_limit
            __props__['ratio'] = ratio
            __props__['state'] = state
        super(Node, __self__).__init__(
            'f5bigip:ltm/node:Node',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            address: Optional[pulumi.Input[str]] = None,
            connection_limit: Optional[pulumi.Input[int]] = None,
            description: Optional[pulumi.Input[str]] = None,
            dynamic_ratio: Optional[pulumi.Input[int]] = None,
            fqdn: Optional[pulumi.Input[pulumi.InputType['NodeFqdnArgs']]] = None,
            monitor: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            rate_limit: Optional[pulumi.Input[str]] = None,
            ratio: Optional[pulumi.Input[int]] = None,
            state: Optional[pulumi.Input[str]] = None) -> 'Node':
        """
        Get an existing Node resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] address: IP or hostname of the node
        :param pulumi.Input[int] connection_limit: Specifies the maximum number of connections allowed for the node or node address.
        :param pulumi.Input[str] description: User-defined description give ltm_node
        :param pulumi.Input[int] dynamic_ratio: Specifies the fixed ratio value used for a node during ratio load balancing.
        :param pulumi.Input[str] monitor: specifies the name of the monitor or monitor rule that you want to associate with the node.
        :param pulumi.Input[str] name: Name of the node
        :param pulumi.Input[str] rate_limit: Specifies the maximum number of connections per second allowed for a node or node address. The default value is 'disabled'.
        :param pulumi.Input[int] ratio: Sets the ratio number for the node.
        :param pulumi.Input[str] state: Default is "user-up" you can set to "user-down" if you want to disable
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["address"] = address
        __props__["connection_limit"] = connection_limit
        __props__["description"] = description
        __props__["dynamic_ratio"] = dynamic_ratio
        __props__["fqdn"] = fqdn
        __props__["monitor"] = monitor
        __props__["name"] = name
        __props__["rate_limit"] = rate_limit
        __props__["ratio"] = ratio
        __props__["state"] = state
        return Node(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def address(self) -> pulumi.Output[str]:
        """
        IP or hostname of the node
        """
        return pulumi.get(self, "address")

    @property
    @pulumi.getter(name="connectionLimit")
    def connection_limit(self) -> pulumi.Output[int]:
        """
        Specifies the maximum number of connections allowed for the node or node address.
        """
        return pulumi.get(self, "connection_limit")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[str]]:
        """
        User-defined description give ltm_node
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="dynamicRatio")
    def dynamic_ratio(self) -> pulumi.Output[int]:
        """
        Specifies the fixed ratio value used for a node during ratio load balancing.
        """
        return pulumi.get(self, "dynamic_ratio")

    @property
    @pulumi.getter
    def fqdn(self) -> pulumi.Output[Optional['outputs.NodeFqdn']]:
        return pulumi.get(self, "fqdn")

    @property
    @pulumi.getter
    def monitor(self) -> pulumi.Output[Optional[str]]:
        """
        specifies the name of the monitor or monitor rule that you want to associate with the node.
        """
        return pulumi.get(self, "monitor")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        Name of the node
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="rateLimit")
    def rate_limit(self) -> pulumi.Output[str]:
        """
        Specifies the maximum number of connections per second allowed for a node or node address. The default value is 'disabled'.
        """
        return pulumi.get(self, "rate_limit")

    @property
    @pulumi.getter
    def ratio(self) -> pulumi.Output[int]:
        """
        Sets the ratio number for the node.
        """
        return pulumi.get(self, "ratio")

    @property
    @pulumi.getter
    def state(self) -> pulumi.Output[Optional[str]]:
        """
        Default is "user-up" you can set to "user-down" if you want to disable
        """
        return pulumi.get(self, "state")

    def translate_output_property(self, prop):
        return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

