# 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, Dict, List, Mapping, Optional, Tuple, Union
from .. import _utilities, _tables
from . import outputs
from ._inputs import *

__all__ = ['Pool']


class Pool(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 account_name: Optional[pulumi.Input[str]] = None,
                 auto_scale: Optional[pulumi.Input[pulumi.InputType['PoolAutoScaleArgs']]] = None,
                 certificates: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['PoolCertificateArgs']]]]] = None,
                 container_configuration: Optional[pulumi.Input[pulumi.InputType['PoolContainerConfigurationArgs']]] = None,
                 display_name: Optional[pulumi.Input[str]] = None,
                 fixed_scale: Optional[pulumi.Input[pulumi.InputType['PoolFixedScaleArgs']]] = None,
                 max_tasks_per_node: Optional[pulumi.Input[float]] = None,
                 metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 network_configuration: Optional[pulumi.Input[pulumi.InputType['PoolNetworkConfigurationArgs']]] = None,
                 node_agent_sku_id: Optional[pulumi.Input[str]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 start_task: Optional[pulumi.Input[pulumi.InputType['PoolStartTaskArgs']]] = None,
                 stop_pending_resize_operation: Optional[pulumi.Input[bool]] = None,
                 storage_image_reference: Optional[pulumi.Input[pulumi.InputType['PoolStorageImageReferenceArgs']]] = None,
                 vm_size: Optional[pulumi.Input[str]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        Manages an Azure Batch pool.

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] account_name: Specifies the name of the Batch account in which the pool will be created. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['PoolAutoScaleArgs']] auto_scale: A `auto_scale` block that describes the scale settings when using auto scale.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['PoolCertificateArgs']]]] certificates: One or more `certificate` blocks that describe the certificates to be installed on each compute node in the pool.
        :param pulumi.Input[pulumi.InputType['PoolContainerConfigurationArgs']] container_configuration: The container configuration used in the pool's VMs.
        :param pulumi.Input[str] display_name: Specifies the display name of the Batch pool.
        :param pulumi.Input[pulumi.InputType['PoolFixedScaleArgs']] fixed_scale: A `fixed_scale` block that describes the scale settings when using fixed scale.
        :param pulumi.Input[float] max_tasks_per_node: Specifies the maximum number of tasks that can run concurrently on a single compute node in the pool. Defaults to `1`. Changing this forces a new resource to be created.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: A map of custom batch pool metadata.
        :param pulumi.Input[str] name: Specifies the name of the Batch pool. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['PoolNetworkConfigurationArgs']] network_configuration: A `network_configuration` block that describes the network configurations for the Batch pool.
        :param pulumi.Input[str] node_agent_sku_id: Specifies the Sku of the node agents that will be created in the Batch pool.
        :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Batch pool. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['PoolStartTaskArgs']] start_task: A `start_task` block that describes the start task settings for the Batch pool.
        :param pulumi.Input[pulumi.InputType['PoolStorageImageReferenceArgs']] storage_image_reference: A `storage_image_reference` for the virtual machines that will compose the Batch pool.
        :param pulumi.Input[str] vm_size: Specifies the size of the VM created in the Batch pool.
        """
        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 account_name is None:
                raise TypeError("Missing required property 'account_name'")
            __props__['account_name'] = account_name
            __props__['auto_scale'] = auto_scale
            __props__['certificates'] = certificates
            __props__['container_configuration'] = container_configuration
            __props__['display_name'] = display_name
            __props__['fixed_scale'] = fixed_scale
            __props__['max_tasks_per_node'] = max_tasks_per_node
            __props__['metadata'] = metadata
            __props__['name'] = name
            __props__['network_configuration'] = network_configuration
            if node_agent_sku_id is None:
                raise TypeError("Missing required property 'node_agent_sku_id'")
            __props__['node_agent_sku_id'] = node_agent_sku_id
            if resource_group_name is None:
                raise TypeError("Missing required property 'resource_group_name'")
            __props__['resource_group_name'] = resource_group_name
            __props__['start_task'] = start_task
            __props__['stop_pending_resize_operation'] = stop_pending_resize_operation
            if storage_image_reference is None:
                raise TypeError("Missing required property 'storage_image_reference'")
            __props__['storage_image_reference'] = storage_image_reference
            if vm_size is None:
                raise TypeError("Missing required property 'vm_size'")
            __props__['vm_size'] = vm_size
        super(Pool, __self__).__init__(
            'azure:batch/pool:Pool',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            account_name: Optional[pulumi.Input[str]] = None,
            auto_scale: Optional[pulumi.Input[pulumi.InputType['PoolAutoScaleArgs']]] = None,
            certificates: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['PoolCertificateArgs']]]]] = None,
            container_configuration: Optional[pulumi.Input[pulumi.InputType['PoolContainerConfigurationArgs']]] = None,
            display_name: Optional[pulumi.Input[str]] = None,
            fixed_scale: Optional[pulumi.Input[pulumi.InputType['PoolFixedScaleArgs']]] = None,
            max_tasks_per_node: Optional[pulumi.Input[float]] = None,
            metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            name: Optional[pulumi.Input[str]] = None,
            network_configuration: Optional[pulumi.Input[pulumi.InputType['PoolNetworkConfigurationArgs']]] = None,
            node_agent_sku_id: Optional[pulumi.Input[str]] = None,
            resource_group_name: Optional[pulumi.Input[str]] = None,
            start_task: Optional[pulumi.Input[pulumi.InputType['PoolStartTaskArgs']]] = None,
            stop_pending_resize_operation: Optional[pulumi.Input[bool]] = None,
            storage_image_reference: Optional[pulumi.Input[pulumi.InputType['PoolStorageImageReferenceArgs']]] = None,
            vm_size: Optional[pulumi.Input[str]] = None) -> 'Pool':
        """
        Get an existing Pool 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] account_name: Specifies the name of the Batch account in which the pool will be created. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['PoolAutoScaleArgs']] auto_scale: A `auto_scale` block that describes the scale settings when using auto scale.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['PoolCertificateArgs']]]] certificates: One or more `certificate` blocks that describe the certificates to be installed on each compute node in the pool.
        :param pulumi.Input[pulumi.InputType['PoolContainerConfigurationArgs']] container_configuration: The container configuration used in the pool's VMs.
        :param pulumi.Input[str] display_name: Specifies the display name of the Batch pool.
        :param pulumi.Input[pulumi.InputType['PoolFixedScaleArgs']] fixed_scale: A `fixed_scale` block that describes the scale settings when using fixed scale.
        :param pulumi.Input[float] max_tasks_per_node: Specifies the maximum number of tasks that can run concurrently on a single compute node in the pool. Defaults to `1`. Changing this forces a new resource to be created.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: A map of custom batch pool metadata.
        :param pulumi.Input[str] name: Specifies the name of the Batch pool. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['PoolNetworkConfigurationArgs']] network_configuration: A `network_configuration` block that describes the network configurations for the Batch pool.
        :param pulumi.Input[str] node_agent_sku_id: Specifies the Sku of the node agents that will be created in the Batch pool.
        :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Batch pool. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['PoolStartTaskArgs']] start_task: A `start_task` block that describes the start task settings for the Batch pool.
        :param pulumi.Input[pulumi.InputType['PoolStorageImageReferenceArgs']] storage_image_reference: A `storage_image_reference` for the virtual machines that will compose the Batch pool.
        :param pulumi.Input[str] vm_size: Specifies the size of the VM created in the Batch pool.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["account_name"] = account_name
        __props__["auto_scale"] = auto_scale
        __props__["certificates"] = certificates
        __props__["container_configuration"] = container_configuration
        __props__["display_name"] = display_name
        __props__["fixed_scale"] = fixed_scale
        __props__["max_tasks_per_node"] = max_tasks_per_node
        __props__["metadata"] = metadata
        __props__["name"] = name
        __props__["network_configuration"] = network_configuration
        __props__["node_agent_sku_id"] = node_agent_sku_id
        __props__["resource_group_name"] = resource_group_name
        __props__["start_task"] = start_task
        __props__["stop_pending_resize_operation"] = stop_pending_resize_operation
        __props__["storage_image_reference"] = storage_image_reference
        __props__["vm_size"] = vm_size
        return Pool(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="accountName")
    def account_name(self) -> pulumi.Output[str]:
        """
        Specifies the name of the Batch account in which the pool will be created. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "account_name")

    @property
    @pulumi.getter(name="autoScale")
    def auto_scale(self) -> pulumi.Output[Optional['outputs.PoolAutoScale']]:
        """
        A `auto_scale` block that describes the scale settings when using auto scale.
        """
        return pulumi.get(self, "auto_scale")

    @property
    @pulumi.getter
    def certificates(self) -> pulumi.Output[Optional[List['outputs.PoolCertificate']]]:
        """
        One or more `certificate` blocks that describe the certificates to be installed on each compute node in the pool.
        """
        return pulumi.get(self, "certificates")

    @property
    @pulumi.getter(name="containerConfiguration")
    def container_configuration(self) -> pulumi.Output[Optional['outputs.PoolContainerConfiguration']]:
        """
        The container configuration used in the pool's VMs.
        """
        return pulumi.get(self, "container_configuration")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Output[Optional[str]]:
        """
        Specifies the display name of the Batch pool.
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter(name="fixedScale")
    def fixed_scale(self) -> pulumi.Output[Optional['outputs.PoolFixedScale']]:
        """
        A `fixed_scale` block that describes the scale settings when using fixed scale.
        """
        return pulumi.get(self, "fixed_scale")

    @property
    @pulumi.getter(name="maxTasksPerNode")
    def max_tasks_per_node(self) -> pulumi.Output[Optional[float]]:
        """
        Specifies the maximum number of tasks that can run concurrently on a single compute node in the pool. Defaults to `1`. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "max_tasks_per_node")

    @property
    @pulumi.getter
    def metadata(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
        """
        A map of custom batch pool metadata.
        """
        return pulumi.get(self, "metadata")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        Specifies the name of the Batch pool. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="networkConfiguration")
    def network_configuration(self) -> pulumi.Output[Optional['outputs.PoolNetworkConfiguration']]:
        """
        A `network_configuration` block that describes the network configurations for the Batch pool.
        """
        return pulumi.get(self, "network_configuration")

    @property
    @pulumi.getter(name="nodeAgentSkuId")
    def node_agent_sku_id(self) -> pulumi.Output[str]:
        """
        Specifies the Sku of the node agents that will be created in the Batch pool.
        """
        return pulumi.get(self, "node_agent_sku_id")

    @property
    @pulumi.getter(name="resourceGroupName")
    def resource_group_name(self) -> pulumi.Output[str]:
        """
        The name of the resource group in which to create the Batch pool. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "resource_group_name")

    @property
    @pulumi.getter(name="startTask")
    def start_task(self) -> pulumi.Output[Optional['outputs.PoolStartTask']]:
        """
        A `start_task` block that describes the start task settings for the Batch pool.
        """
        return pulumi.get(self, "start_task")

    @property
    @pulumi.getter(name="stopPendingResizeOperation")
    def stop_pending_resize_operation(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "stop_pending_resize_operation")

    @property
    @pulumi.getter(name="storageImageReference")
    def storage_image_reference(self) -> pulumi.Output['outputs.PoolStorageImageReference']:
        """
        A `storage_image_reference` for the virtual machines that will compose the Batch pool.
        """
        return pulumi.get(self, "storage_image_reference")

    @property
    @pulumi.getter(name="vmSize")
    def vm_size(self) -> pulumi.Output[str]:
        """
        Specifies the size of the VM created in the Batch pool.
        """
        return pulumi.get(self, "vm_size")

    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

