# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class KubernetesClusterNodePool(pulumi.CustomResource):
    availability_zones: pulumi.Output[list]
    """
    A list of Availability Zones where the Nodes in this Node Pool should be created in.
    """
    enable_auto_scaling: pulumi.Output[bool]
    """
    Whether to enable [auto-scaler](https://docs.microsoft.com/en-us/azure/aks/cluster-autoscaler). Defaults to `false`.
    """
    enable_node_public_ip: pulumi.Output[bool]
    """
    Should each node have a Public IP Address? Defaults to `false`.
    """
    kubernetes_cluster_id: pulumi.Output[str]
    """
    The ID of the Kubernetes Cluster where this Node Pool should exist. Changing this forces a new resource to be created.
    """
    max_count: pulumi.Output[float]
    """
    The maximum number of nodes which should exist within this Node Pool. Valid values are between `1` and `100` and must be greater than or equal to `min_count`.
    """
    max_pods: pulumi.Output[float]
    """
    The maximum number of pods that can run on each agent. Changing this forces a new resource to be created.
    """
    min_count: pulumi.Output[float]
    """
    The minimum number of nodes which should exist within this Node Pool. Valid values are between `1` and `100` and must be less than or equal to `max_count`.
    """
    name: pulumi.Output[str]
    """
    The name of the Node Pool which should be created within the Kubernetes Cluster. Changing this forces a new resource to be created.
    """
    node_count: pulumi.Output[float]
    """
    The number of nodes which should exist within this Node Pool. Valid values are between `1` and `100`.
    """
    node_taints: pulumi.Output[list]
    """
    A list of Kubernetes taints which should be applied to nodes in the agent pool (e.g `key=value:NoSchedule`).
    """
    os_disk_size_gb: pulumi.Output[float]
    """
    The Agent Operating System disk size in GB. Changing this forces a new resource to be created.
    """
    os_type: pulumi.Output[str]
    """
    The Operating System which should be used for this Node Pool. Changing this forces a new resource to be created. Possible values are `Linux` and `Windows`. Defaults to `Linux`.
    """
    vm_size: pulumi.Output[str]
    """
    The SKU which should be used for the Virtual Machines used in this Node Pool. Changing this forces a new resource to be created.
    """
    vnet_subnet_id: pulumi.Output[str]
    """
    The ID of the Subnet where this Node Pool should exist.
    """
    def __init__(__self__, resource_name, opts=None, availability_zones=None, enable_auto_scaling=None, enable_node_public_ip=None, kubernetes_cluster_id=None, max_count=None, max_pods=None, min_count=None, name=None, node_count=None, node_taints=None, os_disk_size_gb=None, os_type=None, vm_size=None, vnet_subnet_id=None, __props__=None, __name__=None, __opts__=None):
        """
        Manages a Node Pool within a Kubernetes Cluster
        
        > **NOTE:** Multiple Node Pools are only supported when the Kubernetes Cluster is using Virtual Machine Scale Sets.
        
        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[list] availability_zones: A list of Availability Zones where the Nodes in this Node Pool should be created in.
        :param pulumi.Input[bool] enable_auto_scaling: Whether to enable [auto-scaler](https://docs.microsoft.com/en-us/azure/aks/cluster-autoscaler). Defaults to `false`.
        :param pulumi.Input[bool] enable_node_public_ip: Should each node have a Public IP Address? Defaults to `false`.
        :param pulumi.Input[str] kubernetes_cluster_id: The ID of the Kubernetes Cluster where this Node Pool should exist. Changing this forces a new resource to be created.
        :param pulumi.Input[float] max_count: The maximum number of nodes which should exist within this Node Pool. Valid values are between `1` and `100` and must be greater than or equal to `min_count`.
        :param pulumi.Input[float] max_pods: The maximum number of pods that can run on each agent. Changing this forces a new resource to be created.
        :param pulumi.Input[float] min_count: The minimum number of nodes which should exist within this Node Pool. Valid values are between `1` and `100` and must be less than or equal to `max_count`.
        :param pulumi.Input[str] name: The name of the Node Pool which should be created within the Kubernetes Cluster. Changing this forces a new resource to be created.
        :param pulumi.Input[float] node_count: The number of nodes which should exist within this Node Pool. Valid values are between `1` and `100`.
        :param pulumi.Input[list] node_taints: A list of Kubernetes taints which should be applied to nodes in the agent pool (e.g `key=value:NoSchedule`).
        :param pulumi.Input[float] os_disk_size_gb: The Agent Operating System disk size in GB. Changing this forces a new resource to be created.
        :param pulumi.Input[str] os_type: The Operating System which should be used for this Node Pool. Changing this forces a new resource to be created. Possible values are `Linux` and `Windows`. Defaults to `Linux`.
        :param pulumi.Input[str] vm_size: The SKU which should be used for the Virtual Machines used in this Node Pool. Changing this forces a new resource to be created.
        :param pulumi.Input[str] vnet_subnet_id: The ID of the Subnet where this Node Pool should exist.

        > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/kubernetes_cluster_node_pool.html.markdown.
        """
        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()

            __props__['availability_zones'] = availability_zones
            __props__['enable_auto_scaling'] = enable_auto_scaling
            __props__['enable_node_public_ip'] = enable_node_public_ip
            if kubernetes_cluster_id is None:
                raise TypeError("Missing required property 'kubernetes_cluster_id'")
            __props__['kubernetes_cluster_id'] = kubernetes_cluster_id
            __props__['max_count'] = max_count
            __props__['max_pods'] = max_pods
            __props__['min_count'] = min_count
            __props__['name'] = name
            __props__['node_count'] = node_count
            __props__['node_taints'] = node_taints
            __props__['os_disk_size_gb'] = os_disk_size_gb
            __props__['os_type'] = os_type
            if vm_size is None:
                raise TypeError("Missing required property 'vm_size'")
            __props__['vm_size'] = vm_size
            __props__['vnet_subnet_id'] = vnet_subnet_id
        super(KubernetesClusterNodePool, __self__).__init__(
            'azure:containerservice/kubernetesClusterNodePool:KubernetesClusterNodePool',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name, id, opts=None, availability_zones=None, enable_auto_scaling=None, enable_node_public_ip=None, kubernetes_cluster_id=None, max_count=None, max_pods=None, min_count=None, name=None, node_count=None, node_taints=None, os_disk_size_gb=None, os_type=None, vm_size=None, vnet_subnet_id=None):
        """
        Get an existing KubernetesClusterNodePool 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 str id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[list] availability_zones: A list of Availability Zones where the Nodes in this Node Pool should be created in.
        :param pulumi.Input[bool] enable_auto_scaling: Whether to enable [auto-scaler](https://docs.microsoft.com/en-us/azure/aks/cluster-autoscaler). Defaults to `false`.
        :param pulumi.Input[bool] enable_node_public_ip: Should each node have a Public IP Address? Defaults to `false`.
        :param pulumi.Input[str] kubernetes_cluster_id: The ID of the Kubernetes Cluster where this Node Pool should exist. Changing this forces a new resource to be created.
        :param pulumi.Input[float] max_count: The maximum number of nodes which should exist within this Node Pool. Valid values are between `1` and `100` and must be greater than or equal to `min_count`.
        :param pulumi.Input[float] max_pods: The maximum number of pods that can run on each agent. Changing this forces a new resource to be created.
        :param pulumi.Input[float] min_count: The minimum number of nodes which should exist within this Node Pool. Valid values are between `1` and `100` and must be less than or equal to `max_count`.
        :param pulumi.Input[str] name: The name of the Node Pool which should be created within the Kubernetes Cluster. Changing this forces a new resource to be created.
        :param pulumi.Input[float] node_count: The number of nodes which should exist within this Node Pool. Valid values are between `1` and `100`.
        :param pulumi.Input[list] node_taints: A list of Kubernetes taints which should be applied to nodes in the agent pool (e.g `key=value:NoSchedule`).
        :param pulumi.Input[float] os_disk_size_gb: The Agent Operating System disk size in GB. Changing this forces a new resource to be created.
        :param pulumi.Input[str] os_type: The Operating System which should be used for this Node Pool. Changing this forces a new resource to be created. Possible values are `Linux` and `Windows`. Defaults to `Linux`.
        :param pulumi.Input[str] vm_size: The SKU which should be used for the Virtual Machines used in this Node Pool. Changing this forces a new resource to be created.
        :param pulumi.Input[str] vnet_subnet_id: The ID of the Subnet where this Node Pool should exist.

        > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/kubernetes_cluster_node_pool.html.markdown.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()
        __props__["availability_zones"] = availability_zones
        __props__["enable_auto_scaling"] = enable_auto_scaling
        __props__["enable_node_public_ip"] = enable_node_public_ip
        __props__["kubernetes_cluster_id"] = kubernetes_cluster_id
        __props__["max_count"] = max_count
        __props__["max_pods"] = max_pods
        __props__["min_count"] = min_count
        __props__["name"] = name
        __props__["node_count"] = node_count
        __props__["node_taints"] = node_taints
        __props__["os_disk_size_gb"] = os_disk_size_gb
        __props__["os_type"] = os_type
        __props__["vm_size"] = vm_size
        __props__["vnet_subnet_id"] = vnet_subnet_id
        return KubernetesClusterNodePool(resource_name, opts=opts, __props__=__props__)
    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

