NetworkConfiguration Class
- java.
lang. Object - com.
azure. resourcemanager. batch. models. NetworkConfiguration
- com.
public final class NetworkConfiguration
The network configuration for a pool.
Constructor Summary
Constructor | Description |
---|---|
NetworkConfiguration() |
Creates an instance of Network |
Method Summary
Modifier and Type | Method and Description |
---|---|
Dynamic |
dynamicVnetAssignmentScope()
Get the dynamic |
Boolean |
enableAcceleratedNetworking()
Get the enable |
Pool |
endpointConfiguration()
Get the endpoint |
Public |
publicIpAddressConfiguration()
Get the public |
String |
subnetId()
Get the subnet |
void |
validate()
Validates the instance. |
Network |
withDynamicVnetAssignmentScope(DynamicVNetAssignmentScope dynamicVnetAssignmentScope)
Set the dynamic |
Network |
withEnableAcceleratedNetworking(Boolean enableAcceleratedNetworking)
Set the enable |
Network |
withEndpointConfiguration(PoolEndpointConfiguration endpointConfiguration)
Set the endpoint |
Network |
withPublicIpAddressConfiguration(PublicIpAddressConfiguration publicIpAddressConfiguration)
Set the public |
Network |
withSubnetId(String subnetId)
Set the subnet |
Methods inherited from java.lang.Object
Constructor Details
NetworkConfiguration
public NetworkConfiguration()
Creates an instance of NetworkConfiguration class.
Method Details
dynamicVnetAssignmentScope
public DynamicVNetAssignmentScope dynamicVnetAssignmentScope()
Get the dynamicVnetAssignmentScope property: The scope of dynamic vnet assignment.
Returns:
enableAcceleratedNetworking
public Boolean enableAcceleratedNetworking()
Get the enableAcceleratedNetworking property: Whether this pool should enable accelerated networking. Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved networking performance. For more details, see: https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview.
Returns:
endpointConfiguration
public PoolEndpointConfiguration endpointConfiguration()
Get the endpointConfiguration property: The endpoint configuration for a pool. Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.
Returns:
publicIpAddressConfiguration
public PublicIpAddressConfiguration publicIpAddressConfiguration()
Get the publicIpAddressConfiguration property: This property is only supported on Pools with the virtualMachineConfiguration property.
Returns:
subnetId
public String subnetId()
Get the subnetId property: The ARM resource identifier of the virtual network subnet which the compute nodes of the pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially allocate compute nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule tasks on the compute nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the compute nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the compute nodes to unusable. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. For pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. For pools created with a cloud service configuration, enable ports 10100, 20100, and 30100. Also enable outbound connections to Azure Storage on port 443. For cloudServiceConfiguration pools, only 'classic' VNETs are supported. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics\#virtual-network-vnet-and-firewall-configuration.
Returns:
validate
public void validate()
Validates the instance.
withDynamicVnetAssignmentScope
public NetworkConfiguration withDynamicVnetAssignmentScope(DynamicVNetAssignmentScope dynamicVnetAssignmentScope)
Set the dynamicVnetAssignmentScope property: The scope of dynamic vnet assignment.
Parameters:
Returns:
withEnableAcceleratedNetworking
public NetworkConfiguration withEnableAcceleratedNetworking(Boolean enableAcceleratedNetworking)
Set the enableAcceleratedNetworking property: Whether this pool should enable accelerated networking. Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved networking performance. For more details, see: https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview.
Parameters:
Returns:
withEndpointConfiguration
public NetworkConfiguration withEndpointConfiguration(PoolEndpointConfiguration endpointConfiguration)
Set the endpointConfiguration property: The endpoint configuration for a pool. Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.
Parameters:
Returns:
withPublicIpAddressConfiguration
public NetworkConfiguration withPublicIpAddressConfiguration(PublicIpAddressConfiguration publicIpAddressConfiguration)
Set the publicIpAddressConfiguration property: This property is only supported on Pools with the virtualMachineConfiguration property.
Parameters:
Returns:
withSubnetId
public NetworkConfiguration withSubnetId(String subnetId)
Set the subnetId property: The ARM resource identifier of the virtual network subnet which the compute nodes of the pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially allocate compute nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule tasks on the compute nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the compute nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the compute nodes to unusable. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. For pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. For pools created with a cloud service configuration, enable ports 10100, 20100, and 30100. Also enable outbound connections to Azure Storage on port 443. For cloudServiceConfiguration pools, only 'classic' VNETs are supported. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics\#virtual-network-vnet-and-firewall-configuration.
Parameters:
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for