Class InboundNatPool

java.lang.Object
com.azure.compute.batch.models.InboundNatPool
All Implemented Interfaces:
com.azure.json.JsonSerializable<InboundNatPool>

public final class InboundNatPool extends Object implements com.azure.json.JsonSerializable<InboundNatPool>
A inbound NAT Pool that can be used to address specific ports on Compute Nodes in a Batch Pool externally.
  • Constructor Details

    • InboundNatPool

      public InboundNatPool(String name, InboundEndpointProtocol protocol, int backendPort, int frontendPortRangeStart, int frontendPortRangeEnd)
      Creates an instance of InboundNatPool class.
      Parameters:
      name - the name value to set.
      protocol - the protocol value to set.
      backendPort - the backendPort value to set.
      frontendPortRangeStart - the frontendPortRangeStart value to set.
      frontendPortRangeEnd - the frontendPortRangeEnd value to set.
  • Method Details

    • getName

      public String getName()
      Get the name property: 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. If any invalid values are provided the request fails with HTTP status code 400.
      Returns:
      the name value.
    • getProtocol

      public InboundEndpointProtocol getProtocol()
      Get the protocol property: The protocol of the endpoint.
      Returns:
      the protocol value.
    • getBackendPort

      public int getBackendPort()
      Get the backendPort property: The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400.
      Returns:
      the backendPort value.
    • getFrontendPortRangeStart

      public int getFrontendPortRangeStart()
      Get the frontendPortRangeStart property: The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
      Returns:
      the frontendPortRangeStart value.
    • getFrontendPortRangeEnd

      public int getFrontendPortRangeEnd()
      Get the frontendPortRangeEnd property: The last port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. 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. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
      Returns:
      the frontendPortRangeEnd value.
    • getNetworkSecurityGroupRules

      public List<NetworkSecurityGroupRule> getNetworkSecurityGroupRules()
      Get the networkSecurityGroupRules property: 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. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
      Returns:
      the networkSecurityGroupRules value.
    • setNetworkSecurityGroupRules

      public InboundNatPool setNetworkSecurityGroupRules(List<NetworkSecurityGroupRule> networkSecurityGroupRules)
      Set the networkSecurityGroupRules property: 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. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
      Parameters:
      networkSecurityGroupRules - the networkSecurityGroupRules value to set.
      Returns:
      the InboundNatPool object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<InboundNatPool>
      Throws:
      IOException
    • fromJson

      public static InboundNatPool fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of InboundNatPool from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of InboundNatPool if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the InboundNatPool.