ComputeBatchModelFactory.NetworkConfiguration Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The network configuration for a Pool.
public static Azure.Compute.Batch.NetworkConfiguration NetworkConfiguration(string subnetId = default, Azure.Compute.Batch.DynamicVNetAssignmentScope? dynamicVnetAssignmentScope = default, Azure.Compute.Batch.BatchPoolEndpointConfiguration endpointConfiguration = default, Azure.Compute.Batch.BatchPublicIpAddressConfiguration publicIpAddressConfiguration = default, bool? enableAcceleratedNetworking = default);
static member NetworkConfiguration : string * Nullable<Azure.Compute.Batch.DynamicVNetAssignmentScope> * Azure.Compute.Batch.BatchPoolEndpointConfiguration * Azure.Compute.Batch.BatchPublicIpAddressConfiguration * Nullable<bool> -> Azure.Compute.Batch.NetworkConfiguration
Public Shared Function NetworkConfiguration (Optional subnetId As String = Nothing, Optional dynamicVnetAssignmentScope As Nullable(Of DynamicVNetAssignmentScope) = Nothing, Optional endpointConfiguration As BatchPoolEndpointConfiguration = Nothing, Optional publicIpAddressConfiguration As BatchPublicIpAddressConfiguration = Nothing, Optional enableAcceleratedNetworking As Nullable(Of Boolean) = Nothing) As NetworkConfiguration
Parameters
- subnetId
- String
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 Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate 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 Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. Only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication, including ports 29876 and 29877. Also enable outbound connections to Azure Storage on port 443. For more details see: https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration.
- dynamicVnetAssignmentScope
- Nullable<DynamicVNetAssignmentScope>
The scope of dynamic vnet assignment.
- endpointConfiguration
- BatchPoolEndpointConfiguration
The configuration for endpoints on Compute Nodes in the Batch Pool.
- publicIpAddressConfiguration
- BatchPublicIpAddressConfiguration
The Public IPAddress configuration for Compute Nodes in the Batch Pool.
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
A new NetworkConfiguration instance for mocking.