Share via


BatchInboundNatPool Class

  • java.lang.Object
    • com.azure.compute.batch.models.BatchInboundNatPool

Implements

public final class BatchInboundNatPool
implements JsonSerializable<BatchInboundNatPool>

A inbound NAT Pool that can be used to address specific ports on Compute Nodes in a Batch Pool externally.

Constructor Summary

Constructor Description
BatchInboundNatPool(String name, InboundEndpointProtocol protocol, int backendPort, int frontendPortRangeStart, int frontendPortRangeEnd)

Creates an instance of BatchInboundNatPool class.

Method Summary

Modifier and Type Method and Description
static BatchInboundNatPool fromJson(JsonReader jsonReader)

Reads an instance of BatchInboundNatPool from the JsonReader.

int getBackendPort()

Get the backendPort property: The port number on the Compute Node.

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.

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.

String getName()

Get the name property: The name of the endpoint.

List<NetworkSecurityGroupRule> getNetworkSecurityGroupRules()

Get the networkSecurityGroupRules property: A list of network security group rules that will be applied to the endpoint.

InboundEndpointProtocol getProtocol()

Get the protocol property: The protocol of the endpoint.

BatchInboundNatPool setNetworkSecurityGroupRules(List<NetworkSecurityGroupRule> networkSecurityGroupRules)

Set the networkSecurityGroupRules property: A list of network security group rules that will be applied to the endpoint.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

BatchInboundNatPool

public BatchInboundNatPool(String name, InboundEndpointProtocol protocol, int backendPort, int frontendPortRangeStart, int frontendPortRangeEnd)

Creates an instance of BatchInboundNatPool 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

fromJson

public static BatchInboundNatPool fromJson(JsonReader jsonReader)

Reads an instance of BatchInboundNatPool from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BatchInboundNatPool if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

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.

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.

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.

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.

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.

getProtocol

public InboundEndpointProtocol getProtocol()

Get the protocol property: The protocol of the endpoint.

Returns:

the protocol value.

setNetworkSecurityGroupRules

public BatchInboundNatPool 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 BatchInboundNatPool object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to