# 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 Union
from .. import utilities, tables


class Pool(pulumi.CustomResource):
    account_name: 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.
    """
    auto_scale: pulumi.Output[dict]
    """
    A `auto_scale` block that describes the scale settings when using auto scale.

      * `evaluationInterval` (`str`) - The interval to wait before evaluating if the pool needs to be scaled. Defaults to `PT15M`.
      * `formula` (`str`) - The autoscale formula that needs to be used for scaling the Batch pool.
    """
    certificates: pulumi.Output[list]
    """
    One or more `certificate` blocks that describe the certificates to be installed on each compute node in the pool.

      * `id` (`str`) - The ID of the Batch Certificate to install on the Batch Pool, which must be inside the same Batch Account.
      * `storeLocation` (`str`) - The location of the certificate store on the compute node into which to install the certificate. Possible values are `CurrentUser` or `LocalMachine`.
      * `storeName` (`str`) - The name of the certificate store on the compute node into which to install the certificate. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: `My`, `Root`, `CA`, `Trust`, `Disallowed`, `TrustedPeople`, `TrustedPublisher`, `AuthRoot`, `AddressBook`, but any custom store name can also be used. The default value is `My`.
      * `visibilities` (`list`) - Which user accounts on the compute node should have access to the private data of the certificate.
    """
    container_configuration: pulumi.Output[dict]
    """
    The container configuration used in the pool's VMs.

      * `containerImageNames` (`list`) - A list of container image names to use, as would be specified by `docker pull`.
      * `containerRegistries` (`list`) - Additional container registries from which container images can be pulled by the pool's VMs.
        * `password` (`str`) - The password to log into the registry server. Changing this forces a new resource to be created.
        * `registryServer` (`str`) - The container registry URL. The default is "docker.io". Changing this forces a new resource to be created.
        * `userName` (`str`) - The user name to log into the registry server. Changing this forces a new resource to be created.

      * `type` (`str`) - The type of container configuration. Possible value is `DockerCompatible`.
    """
    display_name: pulumi.Output[str]
    """
    Specifies the display name of the Batch pool.
    """
    fixed_scale: pulumi.Output[dict]
    """
    A `fixed_scale` block that describes the scale settings when using fixed scale.

      * `resizeTimeout` (`str`) - The timeout for resize operations. Defaults to `PT15M`.
      * `targetDedicatedNodes` (`float`) - The number of nodes in the Batch pool. Defaults to `1`.
      * `targetLowPriorityNodes` (`float`) - The number of low priority nodes in the Batch pool. Defaults to `0`.
    """
    max_tasks_per_node: pulumi.Output[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.
    """
    metadata: pulumi.Output[dict]
    """
    A map of custom batch pool metadata.
    """
    name: pulumi.Output[str]
    """
    Specifies the name of the Batch pool. Changing this forces a new resource to be created.
    """
    network_configuration: pulumi.Output[dict]
    """
    A `network_configuration` block that describes the network configurations for the Batch pool.

      * `endpointConfigurations` (`list`) - A list of inbound NAT pools that can be used to address specific ports on an individual compute node externally. Set as documented in the inbound_nat_pools block below. Changing this forces a new resource to be created.
        * `backend_port` (`float`) - The port number on the compute node. Acceptable values are between `1` and `65535` except for `29876`, `29877` as these are reserved. Changing this forces a new resource to be created.
        * `frontendPortRange` (`str`) - The range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes in the format of `1000-1100`. Acceptable values range between `1` and `65534` except ports from `50000` to `55000` which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. Values must be a range of at least `100` nodes. Changing this forces a new resource to be created.
        * `name` (`str`) - The name of the endpoint. The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. Changing this forces a new resource to be created.
        * `networkSecurityGroupRules` (`list`) - A list of network security group rules that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch pool is `25`. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. Set as documented in the network_security_group_rules block below. Changing this forces a new resource to be created.
          * `access` (`str`) - The action that should be taken for a specified IP address, subnet range or tag. Acceptable values are `Allow` and `Deny`. Changing this forces a new resource to be created.
          * `priority` (`float`) - The priority for this rule. The value must be at least `150`. Changing this forces a new resource to be created.
          * `source_address_prefix` (`str`) - The source address prefix or tag to match for the rule. Changing this forces a new resource to be created.

        * `protocol` (`str`) - The protocol of the endpoint. Acceptable values are `TCP` and `UDP`. Changing this forces a new resource to be created.

      * `publicIps` (`list`) - A list of public ip ids that will be allocated to nodes. Changing this forces a new resource to be created.
      * `subnet_id` (`str`) - The ARM resource identifier of the virtual network subnet which the compute nodes of the pool will join. Changing this forces a new resource to be created.
    """
    node_agent_sku_id: pulumi.Output[str]
    """
    Specifies the Sku of the node agents that will be created in the Batch pool.
    """
    resource_group_name: 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.
    """
    start_task: pulumi.Output[dict]
    """
    A `start_task` block that describes the start task settings for the Batch pool.

      * `commandLine` (`str`) - The command line executed by the start task.
      * `environment` (`dict`) - A map of strings (key,value) that represents the environment variables to set in the start task.
      * `maxTaskRetryCount` (`float`) - The number of retry count. Defaults to `1`.
      * `resourceFiles` (`list`) - One or more `resource_file` blocks that describe the files to be downloaded to a compute node.
        * `autoStorageContainerName` (`str`) - The storage container name in the auto storage account.
        * `blobPrefix` (`str`) - The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. The property is valid only when `auto_storage_container_name` or `storage_container_url` is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded.
        * `fileMode` (`str`) - The file permission mode represented as a string in octal format (e.g. `"0644"`). This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a `resource_file` which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file.
        * `file_path` (`str`) - The location on the compute node to which to download the file, relative to the task's working directory. If the `http_url` property is specified, the `file_path` is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the `auto_storage_container_name` or `storage_container_url` property is specified, `file_path` is optional and is the directory to download the files to. In the case where `file_path` is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the task's working directory (for example by using '..').
        * `httpUrl` (`str`) - The URL of the file to download. If the URL is Azure Blob Storage, it must be readable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, or set the ACL for the blob or its container to allow public access.
        * `storageContainerUrl` (`str`) - The URL of the blob container within Azure Blob Storage. This URL must be readable and listable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the blob, or set the ACL for the blob or its container to allow public access.

      * `userIdentity` (`dict`) - A `user_identity` block that describes the user identity under which the start task runs.
        * `autoUser` (`dict`) - A `auto_user` block that describes the user identity under which the start task runs.
          * `elevationLevel` (`str`) - The elevation level of the user identity under which the start task runs. Possible values are `Admin` or `NonAdmin`. Defaults to `NonAdmin`.
          * `scope` (`str`) - The scope of the user identity under which the start task runs. Possible values are `Task` or `Pool`. Defaults to `Task`.

        * `userName` (`str`) - The username to be used by the Batch pool start task.

      * `waitForSuccess` (`bool`) - A flag that indicates if the Batch pool should wait for the start task to be completed. Default to `false`.
    """
    stop_pending_resize_operation: pulumi.Output[bool]
    storage_image_reference: pulumi.Output[dict]
    """
    A `storage_image_reference` for the virtual machines that will compose the Batch pool.

      * `id` (`str`) - Specifies the ID of the Custom Image which the virtual machines should be created from. Changing this forces a new resource to be created. See [official documentation](https://docs.microsoft.com/en-us/azure/batch/batch-custom-images) for more details.
        ---
      * `offer` (`str`) - Specifies the offer of the image used to create the virtual machines. Changing this forces a new resource to be created.
      * `publisher` (`str`) - Specifies the publisher of the image used to create the virtual machines. Changing this forces a new resource to be created.
      * `sku` (`str`) - Specifies the SKU of the image used to create the virtual machines. Changing this forces a new resource to be created.
      * `version` (`str`) - Specifies the version of the image used to create the virtual machines. Changing this forces a new resource to be created.
    """
    vm_size: pulumi.Output[str]
    """
    Specifies the size of the VM created in the Batch pool.
    """
    def __init__(__self__, resource_name, opts=None, account_name=None, auto_scale=None, certificates=None, container_configuration=None, display_name=None, fixed_scale=None, max_tasks_per_node=None, metadata=None, name=None, network_configuration=None, node_agent_sku_id=None, resource_group_name=None, start_task=None, stop_pending_resize_operation=None, storage_image_reference=None, vm_size=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[dict] auto_scale: A `auto_scale` block that describes the scale settings when using auto scale.
        :param pulumi.Input[list] certificates: One or more `certificate` blocks that describe the certificates to be installed on each compute node in the pool.
        :param pulumi.Input[dict] 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[dict] 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[dict] 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[dict] 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[dict] start_task: A `start_task` block that describes the start task settings for the Batch pool.
        :param pulumi.Input[dict] 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.

        The **auto_scale** object supports the following:

          * `evaluationInterval` (`pulumi.Input[str]`) - The interval to wait before evaluating if the pool needs to be scaled. Defaults to `PT15M`.
          * `formula` (`pulumi.Input[str]`) - The autoscale formula that needs to be used for scaling the Batch pool.

        The **certificates** object supports the following:

          * `id` (`pulumi.Input[str]`) - The ID of the Batch Certificate to install on the Batch Pool, which must be inside the same Batch Account.
          * `storeLocation` (`pulumi.Input[str]`) - The location of the certificate store on the compute node into which to install the certificate. Possible values are `CurrentUser` or `LocalMachine`.
          * `storeName` (`pulumi.Input[str]`) - The name of the certificate store on the compute node into which to install the certificate. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: `My`, `Root`, `CA`, `Trust`, `Disallowed`, `TrustedPeople`, `TrustedPublisher`, `AuthRoot`, `AddressBook`, but any custom store name can also be used. The default value is `My`.
          * `visibilities` (`pulumi.Input[list]`) - Which user accounts on the compute node should have access to the private data of the certificate.

        The **container_configuration** object supports the following:

          * `containerImageNames` (`pulumi.Input[list]`) - A list of container image names to use, as would be specified by `docker pull`.
          * `containerRegistries` (`pulumi.Input[list]`) - Additional container registries from which container images can be pulled by the pool's VMs.
            * `password` (`pulumi.Input[str]`) - The password to log into the registry server. Changing this forces a new resource to be created.
            * `registryServer` (`pulumi.Input[str]`) - The container registry URL. The default is "docker.io". Changing this forces a new resource to be created.
            * `userName` (`pulumi.Input[str]`) - The user name to log into the registry server. Changing this forces a new resource to be created.

          * `type` (`pulumi.Input[str]`) - The type of container configuration. Possible value is `DockerCompatible`.

        The **fixed_scale** object supports the following:

          * `resizeTimeout` (`pulumi.Input[str]`) - The timeout for resize operations. Defaults to `PT15M`.
          * `targetDedicatedNodes` (`pulumi.Input[float]`) - The number of nodes in the Batch pool. Defaults to `1`.
          * `targetLowPriorityNodes` (`pulumi.Input[float]`) - The number of low priority nodes in the Batch pool. Defaults to `0`.

        The **network_configuration** object supports the following:

          * `endpointConfigurations` (`pulumi.Input[list]`) - A list of inbound NAT pools that can be used to address specific ports on an individual compute node externally. Set as documented in the inbound_nat_pools block below. Changing this forces a new resource to be created.
            * `backend_port` (`pulumi.Input[float]`) - The port number on the compute node. Acceptable values are between `1` and `65535` except for `29876`, `29877` as these are reserved. Changing this forces a new resource to be created.
            * `frontendPortRange` (`pulumi.Input[str]`) - The range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes in the format of `1000-1100`. Acceptable values range between `1` and `65534` except ports from `50000` to `55000` which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. Values must be a range of at least `100` nodes. Changing this forces a new resource to be created.
            * `name` (`pulumi.Input[str]`) - The name of the endpoint. The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. Changing this forces a new resource to be created.
            * `networkSecurityGroupRules` (`pulumi.Input[list]`) - A list of network security group rules that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch pool is `25`. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. Set as documented in the network_security_group_rules block below. Changing this forces a new resource to be created.
              * `access` (`pulumi.Input[str]`) - The action that should be taken for a specified IP address, subnet range or tag. Acceptable values are `Allow` and `Deny`. Changing this forces a new resource to be created.
              * `priority` (`pulumi.Input[float]`) - The priority for this rule. The value must be at least `150`. Changing this forces a new resource to be created.
              * `source_address_prefix` (`pulumi.Input[str]`) - The source address prefix or tag to match for the rule. Changing this forces a new resource to be created.

            * `protocol` (`pulumi.Input[str]`) - The protocol of the endpoint. Acceptable values are `TCP` and `UDP`. Changing this forces a new resource to be created.

          * `publicIps` (`pulumi.Input[list]`) - A list of public ip ids that will be allocated to nodes. Changing this forces a new resource to be created.
          * `subnet_id` (`pulumi.Input[str]`) - The ARM resource identifier of the virtual network subnet which the compute nodes of the pool will join. Changing this forces a new resource to be created.

        The **start_task** object supports the following:

          * `commandLine` (`pulumi.Input[str]`) - The command line executed by the start task.
          * `environment` (`pulumi.Input[dict]`) - A map of strings (key,value) that represents the environment variables to set in the start task.
          * `maxTaskRetryCount` (`pulumi.Input[float]`) - The number of retry count. Defaults to `1`.
          * `resourceFiles` (`pulumi.Input[list]`) - One or more `resource_file` blocks that describe the files to be downloaded to a compute node.
            * `autoStorageContainerName` (`pulumi.Input[str]`) - The storage container name in the auto storage account.
            * `blobPrefix` (`pulumi.Input[str]`) - The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. The property is valid only when `auto_storage_container_name` or `storage_container_url` is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded.
            * `fileMode` (`pulumi.Input[str]`) - The file permission mode represented as a string in octal format (e.g. `"0644"`). This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a `resource_file` which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file.
            * `file_path` (`pulumi.Input[str]`) - The location on the compute node to which to download the file, relative to the task's working directory. If the `http_url` property is specified, the `file_path` is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the `auto_storage_container_name` or `storage_container_url` property is specified, `file_path` is optional and is the directory to download the files to. In the case where `file_path` is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the task's working directory (for example by using '..').
            * `httpUrl` (`pulumi.Input[str]`) - The URL of the file to download. If the URL is Azure Blob Storage, it must be readable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, or set the ACL for the blob or its container to allow public access.
            * `storageContainerUrl` (`pulumi.Input[str]`) - The URL of the blob container within Azure Blob Storage. This URL must be readable and listable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the blob, or set the ACL for the blob or its container to allow public access.

          * `userIdentity` (`pulumi.Input[dict]`) - A `user_identity` block that describes the user identity under which the start task runs.
            * `autoUser` (`pulumi.Input[dict]`) - A `auto_user` block that describes the user identity under which the start task runs.
              * `elevationLevel` (`pulumi.Input[str]`) - The elevation level of the user identity under which the start task runs. Possible values are `Admin` or `NonAdmin`. Defaults to `NonAdmin`.
              * `scope` (`pulumi.Input[str]`) - The scope of the user identity under which the start task runs. Possible values are `Task` or `Pool`. Defaults to `Task`.

            * `userName` (`pulumi.Input[str]`) - The username to be used by the Batch pool start task.

          * `waitForSuccess` (`pulumi.Input[bool]`) - A flag that indicates if the Batch pool should wait for the start task to be completed. Default to `false`.

        The **storage_image_reference** object supports the following:

          * `id` (`pulumi.Input[str]`) - Specifies the ID of the Custom Image which the virtual machines should be created from. Changing this forces a new resource to be created. See [official documentation](https://docs.microsoft.com/en-us/azure/batch/batch-custom-images) for more details.
            ---
          * `offer` (`pulumi.Input[str]`) - Specifies the offer of the image used to create the virtual machines. Changing this forces a new resource to be created.
          * `publisher` (`pulumi.Input[str]`) - Specifies the publisher of the image used to create the virtual machines. Changing this forces a new resource to be created.
          * `sku` (`pulumi.Input[str]`) - Specifies the SKU of the image used to create the virtual machines. Changing this forces a new resource to be created.
          * `version` (`pulumi.Input[str]`) - Specifies the version of the image used to create the virtual machines. Changing this forces a new resource to be created.
        """
        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, id, opts=None, account_name=None, auto_scale=None, certificates=None, container_configuration=None, display_name=None, fixed_scale=None, max_tasks_per_node=None, metadata=None, name=None, network_configuration=None, node_agent_sku_id=None, resource_group_name=None, start_task=None, stop_pending_resize_operation=None, storage_image_reference=None, vm_size=None):
        """
        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 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[dict] auto_scale: A `auto_scale` block that describes the scale settings when using auto scale.
        :param pulumi.Input[list] certificates: One or more `certificate` blocks that describe the certificates to be installed on each compute node in the pool.
        :param pulumi.Input[dict] 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[dict] 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[dict] 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[dict] 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[dict] start_task: A `start_task` block that describes the start task settings for the Batch pool.
        :param pulumi.Input[dict] 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.

        The **auto_scale** object supports the following:

          * `evaluationInterval` (`pulumi.Input[str]`) - The interval to wait before evaluating if the pool needs to be scaled. Defaults to `PT15M`.
          * `formula` (`pulumi.Input[str]`) - The autoscale formula that needs to be used for scaling the Batch pool.

        The **certificates** object supports the following:

          * `id` (`pulumi.Input[str]`) - The ID of the Batch Certificate to install on the Batch Pool, which must be inside the same Batch Account.
          * `storeLocation` (`pulumi.Input[str]`) - The location of the certificate store on the compute node into which to install the certificate. Possible values are `CurrentUser` or `LocalMachine`.
          * `storeName` (`pulumi.Input[str]`) - The name of the certificate store on the compute node into which to install the certificate. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: `My`, `Root`, `CA`, `Trust`, `Disallowed`, `TrustedPeople`, `TrustedPublisher`, `AuthRoot`, `AddressBook`, but any custom store name can also be used. The default value is `My`.
          * `visibilities` (`pulumi.Input[list]`) - Which user accounts on the compute node should have access to the private data of the certificate.

        The **container_configuration** object supports the following:

          * `containerImageNames` (`pulumi.Input[list]`) - A list of container image names to use, as would be specified by `docker pull`.
          * `containerRegistries` (`pulumi.Input[list]`) - Additional container registries from which container images can be pulled by the pool's VMs.
            * `password` (`pulumi.Input[str]`) - The password to log into the registry server. Changing this forces a new resource to be created.
            * `registryServer` (`pulumi.Input[str]`) - The container registry URL. The default is "docker.io". Changing this forces a new resource to be created.
            * `userName` (`pulumi.Input[str]`) - The user name to log into the registry server. Changing this forces a new resource to be created.

          * `type` (`pulumi.Input[str]`) - The type of container configuration. Possible value is `DockerCompatible`.

        The **fixed_scale** object supports the following:

          * `resizeTimeout` (`pulumi.Input[str]`) - The timeout for resize operations. Defaults to `PT15M`.
          * `targetDedicatedNodes` (`pulumi.Input[float]`) - The number of nodes in the Batch pool. Defaults to `1`.
          * `targetLowPriorityNodes` (`pulumi.Input[float]`) - The number of low priority nodes in the Batch pool. Defaults to `0`.

        The **network_configuration** object supports the following:

          * `endpointConfigurations` (`pulumi.Input[list]`) - A list of inbound NAT pools that can be used to address specific ports on an individual compute node externally. Set as documented in the inbound_nat_pools block below. Changing this forces a new resource to be created.
            * `backend_port` (`pulumi.Input[float]`) - The port number on the compute node. Acceptable values are between `1` and `65535` except for `29876`, `29877` as these are reserved. Changing this forces a new resource to be created.
            * `frontendPortRange` (`pulumi.Input[str]`) - The range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes in the format of `1000-1100`. Acceptable values range between `1` and `65534` except ports from `50000` to `55000` which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. Values must be a range of at least `100` nodes. Changing this forces a new resource to be created.
            * `name` (`pulumi.Input[str]`) - The name of the endpoint. The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. Changing this forces a new resource to be created.
            * `networkSecurityGroupRules` (`pulumi.Input[list]`) - A list of network security group rules that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch pool is `25`. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. Set as documented in the network_security_group_rules block below. Changing this forces a new resource to be created.
              * `access` (`pulumi.Input[str]`) - The action that should be taken for a specified IP address, subnet range or tag. Acceptable values are `Allow` and `Deny`. Changing this forces a new resource to be created.
              * `priority` (`pulumi.Input[float]`) - The priority for this rule. The value must be at least `150`. Changing this forces a new resource to be created.
              * `source_address_prefix` (`pulumi.Input[str]`) - The source address prefix or tag to match for the rule. Changing this forces a new resource to be created.

            * `protocol` (`pulumi.Input[str]`) - The protocol of the endpoint. Acceptable values are `TCP` and `UDP`. Changing this forces a new resource to be created.

          * `publicIps` (`pulumi.Input[list]`) - A list of public ip ids that will be allocated to nodes. Changing this forces a new resource to be created.
          * `subnet_id` (`pulumi.Input[str]`) - The ARM resource identifier of the virtual network subnet which the compute nodes of the pool will join. Changing this forces a new resource to be created.

        The **start_task** object supports the following:

          * `commandLine` (`pulumi.Input[str]`) - The command line executed by the start task.
          * `environment` (`pulumi.Input[dict]`) - A map of strings (key,value) that represents the environment variables to set in the start task.
          * `maxTaskRetryCount` (`pulumi.Input[float]`) - The number of retry count. Defaults to `1`.
          * `resourceFiles` (`pulumi.Input[list]`) - One or more `resource_file` blocks that describe the files to be downloaded to a compute node.
            * `autoStorageContainerName` (`pulumi.Input[str]`) - The storage container name in the auto storage account.
            * `blobPrefix` (`pulumi.Input[str]`) - The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. The property is valid only when `auto_storage_container_name` or `storage_container_url` is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded.
            * `fileMode` (`pulumi.Input[str]`) - The file permission mode represented as a string in octal format (e.g. `"0644"`). This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a `resource_file` which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file.
            * `file_path` (`pulumi.Input[str]`) - The location on the compute node to which to download the file, relative to the task's working directory. If the `http_url` property is specified, the `file_path` is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the `auto_storage_container_name` or `storage_container_url` property is specified, `file_path` is optional and is the directory to download the files to. In the case where `file_path` is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the task's working directory (for example by using '..').
            * `httpUrl` (`pulumi.Input[str]`) - The URL of the file to download. If the URL is Azure Blob Storage, it must be readable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, or set the ACL for the blob or its container to allow public access.
            * `storageContainerUrl` (`pulumi.Input[str]`) - The URL of the blob container within Azure Blob Storage. This URL must be readable and listable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the blob, or set the ACL for the blob or its container to allow public access.

          * `userIdentity` (`pulumi.Input[dict]`) - A `user_identity` block that describes the user identity under which the start task runs.
            * `autoUser` (`pulumi.Input[dict]`) - A `auto_user` block that describes the user identity under which the start task runs.
              * `elevationLevel` (`pulumi.Input[str]`) - The elevation level of the user identity under which the start task runs. Possible values are `Admin` or `NonAdmin`. Defaults to `NonAdmin`.
              * `scope` (`pulumi.Input[str]`) - The scope of the user identity under which the start task runs. Possible values are `Task` or `Pool`. Defaults to `Task`.

            * `userName` (`pulumi.Input[str]`) - The username to be used by the Batch pool start task.

          * `waitForSuccess` (`pulumi.Input[bool]`) - A flag that indicates if the Batch pool should wait for the start task to be completed. Default to `false`.

        The **storage_image_reference** object supports the following:

          * `id` (`pulumi.Input[str]`) - Specifies the ID of the Custom Image which the virtual machines should be created from. Changing this forces a new resource to be created. See [official documentation](https://docs.microsoft.com/en-us/azure/batch/batch-custom-images) for more details.
            ---
          * `offer` (`pulumi.Input[str]`) - Specifies the offer of the image used to create the virtual machines. Changing this forces a new resource to be created.
          * `publisher` (`pulumi.Input[str]`) - Specifies the publisher of the image used to create the virtual machines. Changing this forces a new resource to be created.
          * `sku` (`pulumi.Input[str]`) - Specifies the SKU of the image used to create the virtual machines. Changing this forces a new resource to be created.
          * `version` (`pulumi.Input[str]`) - Specifies the version of the image used to create the virtual machines. Changing this forces a new resource to be created.
        """
        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__)

    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
