Reference documentation and code samples for the Google Cloud Tpu V2 Client class NetworkConfig.
Network related configurations.
Generated from protobuf messagegoogle.cloud.tpu.v2.NetworkConfig
Namespace
Google \ Cloud \ Tpu \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ network
string
The name of the network for the TPU node. It must be a preexisting Google Compute Engine network. If none is provided, "default" will be used.
↳ subnetwork
string
The name of the subnetwork for the TPU node. It must be a preexisting Google Compute Engine subnetwork. If none is provided, "default" will be used.
↳ enable_external_ips
bool
Indicates that external IP addresses would be associated with the TPU workers. If set to false, the specified subnetwork or network should have Private Google Access enabled.
↳ can_ip_forward
bool
Allows the TPU node to send and receive packets with non-matching destination or source IPs. This is required if you plan to use the TPU workers to forward routes.
↳ queue_count
int
Optional. Specifies networking queue count for TPU VM instance's network interface.
getNetwork
The name of the network for the TPU node. It must be a preexisting Google
Compute Engine network. If none is provided, "default" will be used.
Returns
Type
Description
string
setNetwork
The name of the network for the TPU node. It must be a preexisting Google
Compute Engine network. If none is provided, "default" will be used.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSubnetwork
The name of the subnetwork for the TPU node. It must be a preexisting
Google Compute Engine subnetwork. If none is provided, "default" will be
used.
Returns
Type
Description
string
setSubnetwork
The name of the subnetwork for the TPU node. It must be a preexisting
Google Compute Engine subnetwork. If none is provided, "default" will be
used.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getEnableExternalIps
Indicates that external IP addresses would be associated with the TPU
workers. If set to false, the specified subnetwork or network should have
Private Google Access enabled.
Returns
Type
Description
bool
setEnableExternalIps
Indicates that external IP addresses would be associated with the TPU
workers. If set to false, the specified subnetwork or network should have
Private Google Access enabled.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getCanIpForward
Allows the TPU node to send and receive packets with non-matching
destination or source IPs. This is required if you plan to use the TPU
workers to forward routes.
Returns
Type
Description
bool
setCanIpForward
Allows the TPU node to send and receive packets with non-matching
destination or source IPs. This is required if you plan to use the TPU
workers to forward routes.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getQueueCount
Optional. Specifies networking queue count for TPU VM instance's network
interface.
Returns
Type
Description
int
setQueueCount
Optional. Specifies networking queue count for TPU VM instance's network
interface.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Tpu V2 Client - Class NetworkConfig (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-tpu/latest/V2.NetworkConfig)\n- [2.1.1](/php/docs/reference/cloud-tpu/2.1.1/V2.NetworkConfig)\n- [2.0.0](/php/docs/reference/cloud-tpu/2.0.0/V2.NetworkConfig)\n- [1.4.7](/php/docs/reference/cloud-tpu/1.4.7/V2.NetworkConfig)\n- [1.3.2](/php/docs/reference/cloud-tpu/1.3.2/V2.NetworkConfig)\n- [1.2.0](/php/docs/reference/cloud-tpu/1.2.0/V2.NetworkConfig)\n- [1.1.1](/php/docs/reference/cloud-tpu/1.1.1/V2.NetworkConfig)\n- [1.0.5](/php/docs/reference/cloud-tpu/1.0.5/V2.NetworkConfig) \nReference documentation and code samples for the Google Cloud Tpu V2 Client class NetworkConfig.\n\nNetwork related configurations.\n\nGenerated from protobuf message `google.cloud.tpu.v2.NetworkConfig`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Tpu \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getNetwork\n\nThe name of the network for the TPU node. It must be a preexisting Google\nCompute Engine network. If none is provided, \"default\" will be used.\n\n### setNetwork\n\nThe name of the network for the TPU node. It must be a preexisting Google\nCompute Engine network. If none is provided, \"default\" will be used.\n\n### getSubnetwork\n\nThe name of the subnetwork for the TPU node. It must be a preexisting\nGoogle Compute Engine subnetwork. If none is provided, \"default\" will be\nused.\n\n### setSubnetwork\n\nThe name of the subnetwork for the TPU node. It must be a preexisting\nGoogle Compute Engine subnetwork. If none is provided, \"default\" will be\nused.\n\n### getEnableExternalIps\n\nIndicates that external IP addresses would be associated with the TPU\nworkers. If set to false, the specified subnetwork or network should have\nPrivate Google Access enabled.\n\n### setEnableExternalIps\n\nIndicates that external IP addresses would be associated with the TPU\nworkers. If set to false, the specified subnetwork or network should have\nPrivate Google Access enabled.\n\n### getCanIpForward\n\nAllows the TPU node to send and receive packets with non-matching\ndestination or source IPs. This is required if you plan to use the TPU\nworkers to forward routes.\n\n### setCanIpForward\n\nAllows the TPU node to send and receive packets with non-matching\ndestination or source IPs. This is required if you plan to use the TPU\nworkers to forward routes.\n\n### getQueueCount\n\nOptional. Specifies networking queue count for TPU VM instance's network\ninterface.\n\n### setQueueCount\n\nOptional. Specifies networking queue count for TPU VM instance's network\ninterface."]]