Reference documentation and code samples for the Compute V1 Client class NetworkRoutingConfig.
A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide.
Generated from protobuf message google.cloud.compute.v1.NetworkRoutingConfig
Namespace
Google \ Cloud \ Compute \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ bgp_always_compare_med
bool
Enable comparison of Multi-Exit Discriminators (MED) across routes with different neighbor ASNs when using the STANDARD BGP best path selection algorithm.
↳ bgp_best_path_selection_mode
string
The BGP best path selection algorithm to be employed within this network for dynamic routes learned by Cloud Routers. Can be LEGACY (default) or STANDARD. Check the BgpBestPathSelectionMode enum for the list of possible values.
↳ bgp_inter_region_cost
string
Allows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path selection algorithm. Can be DEFAULT or ADD_COST_TO_MED. Check the BgpInterRegionCost enum for the list of possible values.
↳ effective_bgp_always_compare_med
bool
[Output Only] Effective value of the bgp_always_compare_med field.
↳ effective_bgp_inter_region_cost
string
[Output Only] Effective value of the bgp_inter_region_cost field. Check the EffectiveBgpInterRegionCost enum for the list of possible values.
↳ routing_mode
string
The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions. Check the RoutingMode enum for the list of possible values.
getBgpAlwaysCompareMed
Enable comparison of Multi-Exit Discriminators (MED) across routes with different neighbor ASNs when using the STANDARD BGP best path selection algorithm.
Returns
Type
Description
bool
hasBgpAlwaysCompareMed
clearBgpAlwaysCompareMed
setBgpAlwaysCompareMed
Enable comparison of Multi-Exit Discriminators (MED) across routes with different neighbor ASNs when using the STANDARD BGP best path selection algorithm.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getBgpBestPathSelectionMode
The BGP best path selection algorithm to be employed within this network for dynamic routes learned by Cloud Routers. Can be LEGACY (default) or STANDARD.
Check the BgpBestPathSelectionMode enum for the list of possible values.
Returns
Type
Description
string
hasBgpBestPathSelectionMode
clearBgpBestPathSelectionMode
setBgpBestPathSelectionMode
The BGP best path selection algorithm to be employed within this network for dynamic routes learned by Cloud Routers. Can be LEGACY (default) or STANDARD.
Check the BgpBestPathSelectionMode enum for the list of possible values.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getBgpInterRegionCost
Allows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path selection algorithm. Can be DEFAULT or ADD_COST_TO_MED.
Check the BgpInterRegionCost enum for the list of possible values.
Returns
Type
Description
string
hasBgpInterRegionCost
clearBgpInterRegionCost
setBgpInterRegionCost
Allows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path selection algorithm. Can be DEFAULT or ADD_COST_TO_MED.
Check the BgpInterRegionCost enum for the list of possible values.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getEffectiveBgpAlwaysCompareMed
[Output Only] Effective value of the bgp_always_compare_med field.
Returns
Type
Description
bool
hasEffectiveBgpAlwaysCompareMed
clearEffectiveBgpAlwaysCompareMed
setEffectiveBgpAlwaysCompareMed
[Output Only] Effective value of the bgp_always_compare_med field.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getEffectiveBgpInterRegionCost
[Output Only] Effective value of the bgp_inter_region_cost field.
Check the EffectiveBgpInterRegionCost enum for the list of possible values.
Returns
Type
Description
string
hasEffectiveBgpInterRegionCost
clearEffectiveBgpInterRegionCost
setEffectiveBgpInterRegionCost
[Output Only] Effective value of the bgp_inter_region_cost field.
Check the EffectiveBgpInterRegionCost enum for the list of possible values.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getRoutingMode
The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.
Check the RoutingMode enum for the list of possible values.
Returns
Type
Description
string
hasRoutingMode
clearRoutingMode
setRoutingMode
The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.
Check the RoutingMode enum for the list of possible values.
[[["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-08-28 UTC."],[],[],null,["# Compute V1 Client - Class NetworkRoutingConfig (1.35.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.35.0 (latest)](/php/docs/reference/cloud-compute/latest/V1.NetworkRoutingConfig)\n- [1.34.0](/php/docs/reference/cloud-compute/1.34.0/V1.NetworkRoutingConfig)\n- [1.33.0](/php/docs/reference/cloud-compute/1.33.0/V1.NetworkRoutingConfig)\n- [1.32.0](/php/docs/reference/cloud-compute/1.32.0/V1.NetworkRoutingConfig)\n- [1.31.0](/php/docs/reference/cloud-compute/1.31.0/V1.NetworkRoutingConfig)\n- [1.30.0](/php/docs/reference/cloud-compute/1.30.0/V1.NetworkRoutingConfig)\n- [1.29.0](/php/docs/reference/cloud-compute/1.29.0/V1.NetworkRoutingConfig)\n- [1.28.0](/php/docs/reference/cloud-compute/1.28.0/V1.NetworkRoutingConfig)\n- [1.27.0](/php/docs/reference/cloud-compute/1.27.0/V1.NetworkRoutingConfig)\n- [1.26.0](/php/docs/reference/cloud-compute/1.26.0/V1.NetworkRoutingConfig)\n- [1.25.0](/php/docs/reference/cloud-compute/1.25.0/V1.NetworkRoutingConfig)\n- [1.24.0](/php/docs/reference/cloud-compute/1.24.0/V1.NetworkRoutingConfig)\n- [1.23.0](/php/docs/reference/cloud-compute/1.23.0/V1.NetworkRoutingConfig)\n- [1.22.1](/php/docs/reference/cloud-compute/1.22.1/V1.NetworkRoutingConfig)\n- [1.21.0](/php/docs/reference/cloud-compute/1.21.0/V1.NetworkRoutingConfig)\n- [1.20.0](/php/docs/reference/cloud-compute/1.20.0/V1.NetworkRoutingConfig)\n- [1.19.0](/php/docs/reference/cloud-compute/1.19.0/V1.NetworkRoutingConfig)\n- [1.18.1](/php/docs/reference/cloud-compute/1.18.1/V1.NetworkRoutingConfig)\n- [1.17.0](/php/docs/reference/cloud-compute/1.17.0/V1.NetworkRoutingConfig)\n- [1.16.2](/php/docs/reference/cloud-compute/1.16.2/V1.NetworkRoutingConfig)\n- [1.14.0](/php/docs/reference/cloud-compute/1.14.0/V1.NetworkRoutingConfig)\n- [1.13.0](/php/docs/reference/cloud-compute/1.13.0/V1.NetworkRoutingConfig)\n- [1.12.1](/php/docs/reference/cloud-compute/1.12.1/V1.NetworkRoutingConfig)\n- [1.11.1](/php/docs/reference/cloud-compute/1.11.1/V1.NetworkRoutingConfig)\n- [1.10.1](/php/docs/reference/cloud-compute/1.10.1/V1.NetworkRoutingConfig)\n- [1.9.1](/php/docs/reference/cloud-compute/1.9.1/V1.NetworkRoutingConfig)\n- [1.8.3](/php/docs/reference/cloud-compute/1.8.3/V1.NetworkRoutingConfig)\n- [1.7.1](/php/docs/reference/cloud-compute/1.7.1/V1.NetworkRoutingConfig)\n- [1.6.1](/php/docs/reference/cloud-compute/1.6.1/V1.NetworkRoutingConfig)\n- [1.5.0](/php/docs/reference/cloud-compute/1.5.0/V1.NetworkRoutingConfig) \nReference documentation and code samples for the Compute V1 Client class NetworkRoutingConfig.\n\nA routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide.\n\nGenerated from protobuf message `google.cloud.compute.v1.NetworkRoutingConfig`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Compute \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getBgpAlwaysCompareMed\n\nEnable comparison of Multi-Exit Discriminators (MED) across routes with different neighbor ASNs when using the STANDARD BGP best path selection algorithm.\n\n### hasBgpAlwaysCompareMed\n\n### clearBgpAlwaysCompareMed\n\n### setBgpAlwaysCompareMed\n\nEnable comparison of Multi-Exit Discriminators (MED) across routes with different neighbor ASNs when using the STANDARD BGP best path selection algorithm.\n\n### getBgpBestPathSelectionMode\n\nThe BGP best path selection algorithm to be employed within this network for dynamic routes learned by Cloud Routers. Can be LEGACY (default) or STANDARD.\n\nCheck the BgpBestPathSelectionMode enum for the list of possible values.\n\n### hasBgpBestPathSelectionMode\n\n### clearBgpBestPathSelectionMode\n\n### setBgpBestPathSelectionMode\n\nThe BGP best path selection algorithm to be employed within this network for dynamic routes learned by Cloud Routers. Can be LEGACY (default) or STANDARD.\n\nCheck the BgpBestPathSelectionMode enum for the list of possible values.\n\n### getBgpInterRegionCost\n\nAllows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path selection algorithm. Can be DEFAULT or ADD_COST_TO_MED.\n\nCheck the BgpInterRegionCost enum for the list of possible values.\n\n### hasBgpInterRegionCost\n\n### clearBgpInterRegionCost\n\n### setBgpInterRegionCost\n\nAllows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path selection algorithm. Can be DEFAULT or ADD_COST_TO_MED.\n\nCheck the BgpInterRegionCost enum for the list of possible values.\n\n### getEffectiveBgpAlwaysCompareMed\n\n\\[Output Only\\] Effective value of the bgp_always_compare_med field.\n\n### hasEffectiveBgpAlwaysCompareMed\n\n### clearEffectiveBgpAlwaysCompareMed\n\n### setEffectiveBgpAlwaysCompareMed\n\n\\[Output Only\\] Effective value of the bgp_always_compare_med field.\n\n### getEffectiveBgpInterRegionCost\n\n\\[Output Only\\] Effective value of the bgp_inter_region_cost field.\n\nCheck the EffectiveBgpInterRegionCost enum for the list of possible values.\n\n### hasEffectiveBgpInterRegionCost\n\n### clearEffectiveBgpInterRegionCost\n\n### setEffectiveBgpInterRegionCost\n\n\\[Output Only\\] Effective value of the bgp_inter_region_cost field.\n\nCheck the EffectiveBgpInterRegionCost enum for the list of possible values.\n\n### getRoutingMode\n\nThe network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.\n\nCheck the RoutingMode enum for the list of possible values.\n\n### hasRoutingMode\n\n### clearRoutingMode\n\n### setRoutingMode\n\nThe network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.\n\nCheck the RoutingMode enum for the list of possible values."]]