InboundNatPool Class

  • java.lang.Object
    • com.azure.resourcemanager.batch.models.InboundNatPool

public final class InboundNatPool

A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally.

Constructor Summary

Constructor Description
InboundNatPool()

Creates an instance of InboundNatPool class.

Method Summary

Modifier and Type Method and Description
int backendPort()

Get the backendPort property: The port number on the compute node.

int frontendPortRangeEnd()

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 frontendPortRangeStart()

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 name()

Get the name property: The name of the endpoint.

List<NetworkSecurityGroupRule> networkSecurityGroupRules()

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

InboundEndpointProtocol protocol()

Get the protocol property: The protocol of the endpoint.

void validate()

Validates the instance.

InboundNatPool withBackendPort(int backendPort)

Set the backendPort property: The port number on the compute node.

InboundNatPool withFrontendPortRangeEnd(int frontendPortRangeEnd)

Set 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.

InboundNatPool withFrontendPortRangeStart(int frontendPortRangeStart)

Set 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.

InboundNatPool withName(String name)

Set the name property: The name of the endpoint.

InboundNatPool withNetworkSecurityGroupRules(List<NetworkSecurityGroupRule> networkSecurityGroupRules)

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

InboundNatPool withProtocol(InboundEndpointProtocol protocol)

Set the protocol property: The protocol of the endpoint.

Methods inherited from java.lang.Object

Constructor Details

InboundNatPool

public InboundNatPool()

Creates an instance of InboundNatPool class.

Method Details

backendPort

public int backendPort()

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 22, 3389, 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.

frontendPortRangeEnd

public int frontendPortRangeEnd()

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. If any reserved or overlapping values are provided the request fails with HTTP status code 400.

Returns:

the frontendPortRangeEnd value.

frontendPortRangeStart

public int frontendPortRangeStart()

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. If any reserved or overlapping values are provided the request fails with HTTP status code 400.

Returns:

the frontendPortRangeStart value.

name

public String name()

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.

networkSecurityGroupRules

public List networkSecurityGroupRules()

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.

protocol

public InboundEndpointProtocol protocol()

Get the protocol property: The protocol of the endpoint.

Returns:

the protocol value.

validate

public void validate()

Validates the instance.

withBackendPort

public InboundNatPool withBackendPort(int backendPort)

Set 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 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400.

Parameters:

backendPort - the backendPort value to set.

Returns:

the InboundNatPool object itself.

withFrontendPortRangeEnd

public InboundNatPool withFrontendPortRangeEnd(int frontendPortRangeEnd)

Set 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. If any reserved or overlapping values are provided the request fails with HTTP status code 400.

Parameters:

frontendPortRangeEnd - the frontendPortRangeEnd value to set.

Returns:

the InboundNatPool object itself.

withFrontendPortRangeStart

public InboundNatPool withFrontendPortRangeStart(int frontendPortRangeStart)

Set 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. If any reserved or overlapping values are provided the request fails with HTTP status code 400.

Parameters:

frontendPortRangeStart - the frontendPortRangeStart value to set.

Returns:

the InboundNatPool object itself.

withName

public InboundNatPool withName(String name)

Set 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.

Parameters:

name - the name value to set.

Returns:

the InboundNatPool object itself.

withNetworkSecurityGroupRules

public InboundNatPool withNetworkSecurityGroupRules(List 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.

withProtocol

public InboundNatPool withProtocol(InboundEndpointProtocol protocol)

Set the protocol property: The protocol of the endpoint.

Parameters:

protocol - the protocol value to set.

Returns:

the InboundNatPool object itself.

Applies to