Reference documentation and code samples for the Compute V1 Client class RouterBgp.
Generated from protobuf messagegoogle.cloud.compute.v1.RouterBgp
Namespace
Google \ Cloud \ Compute \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ advertise_mode
string
User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM. Check the AdvertiseMode enum for the list of possible values.
↳ advertised_groups
array
User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. Check the AdvertisedGroups enum for the list of possible values.
User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
↳ asn
int
Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
↳ identifier_range
string
Explicitly specifies a range of valid BGP Identifiers for this Router. It is provided as a link-local IPv4 range (from 169.254.0.0/16), of size at least /30, even if the BGP sessions are over IPv6. It must not overlap with any IPv4 BGP session ranges. Other vendors commonly call this "router ID".
↳ keepalive_interval
int
The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20.
getAdvertiseMode
User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Check the AdvertiseMode enum for the list of possible values.
Returns
Type
Description
string
hasAdvertiseMode
clearAdvertiseMode
setAdvertiseMode
User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.
Check the AdvertiseMode enum for the list of possible values.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getAdvertisedGroups
User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
Check the AdvertisedGroups enum for the list of possible values.
User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
Check the AdvertisedGroups enum for the list of possible values.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getAdvertisedIpRanges
User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
Returns
Type
Description
int
hasAsn
clearAsn
setAsn
Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getIdentifierRange
Explicitly specifies a range of valid BGP Identifiers for this Router. It is provided as a link-local IPv4 range (from 169.254.0.0/16), of size at least /30, even if the BGP sessions are over IPv6. It must not overlap with any IPv4 BGP session ranges. Other vendors commonly call this "router ID".
Returns
Type
Description
string
hasIdentifierRange
clearIdentifierRange
setIdentifierRange
Explicitly specifies a range of valid BGP Identifiers for this Router. It is provided as a link-local IPv4 range (from 169.254.0.0/16), of size at least /30, even if the BGP sessions are over IPv6. It must not overlap with any IPv4 BGP session ranges. Other vendors commonly call this "router ID".
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getKeepaliveInterval
The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20.
Returns
Type
Description
int
hasKeepaliveInterval
clearKeepaliveInterval
setKeepaliveInterval
The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20.
[[["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,["# Compute V1 Client - Class RouterBgp (1.35.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.35.0 (latest)](/php/docs/reference/cloud-compute/latest/V1.RouterBgp)\n- [1.34.0](/php/docs/reference/cloud-compute/1.34.0/V1.RouterBgp)\n- [1.33.0](/php/docs/reference/cloud-compute/1.33.0/V1.RouterBgp)\n- [1.32.0](/php/docs/reference/cloud-compute/1.32.0/V1.RouterBgp)\n- [1.31.0](/php/docs/reference/cloud-compute/1.31.0/V1.RouterBgp)\n- [1.30.0](/php/docs/reference/cloud-compute/1.30.0/V1.RouterBgp)\n- [1.29.0](/php/docs/reference/cloud-compute/1.29.0/V1.RouterBgp)\n- [1.28.0](/php/docs/reference/cloud-compute/1.28.0/V1.RouterBgp)\n- [1.27.0](/php/docs/reference/cloud-compute/1.27.0/V1.RouterBgp)\n- [1.26.0](/php/docs/reference/cloud-compute/1.26.0/V1.RouterBgp)\n- [1.25.0](/php/docs/reference/cloud-compute/1.25.0/V1.RouterBgp)\n- [1.24.0](/php/docs/reference/cloud-compute/1.24.0/V1.RouterBgp)\n- [1.23.0](/php/docs/reference/cloud-compute/1.23.0/V1.RouterBgp)\n- [1.22.1](/php/docs/reference/cloud-compute/1.22.1/V1.RouterBgp)\n- [1.21.0](/php/docs/reference/cloud-compute/1.21.0/V1.RouterBgp)\n- [1.20.0](/php/docs/reference/cloud-compute/1.20.0/V1.RouterBgp)\n- [1.19.0](/php/docs/reference/cloud-compute/1.19.0/V1.RouterBgp)\n- [1.18.1](/php/docs/reference/cloud-compute/1.18.1/V1.RouterBgp)\n- [1.17.0](/php/docs/reference/cloud-compute/1.17.0/V1.RouterBgp)\n- [1.16.2](/php/docs/reference/cloud-compute/1.16.2/V1.RouterBgp)\n- [1.14.0](/php/docs/reference/cloud-compute/1.14.0/V1.RouterBgp)\n- [1.13.0](/php/docs/reference/cloud-compute/1.13.0/V1.RouterBgp)\n- [1.12.1](/php/docs/reference/cloud-compute/1.12.1/V1.RouterBgp)\n- [1.11.1](/php/docs/reference/cloud-compute/1.11.1/V1.RouterBgp)\n- [1.10.1](/php/docs/reference/cloud-compute/1.10.1/V1.RouterBgp)\n- [1.9.1](/php/docs/reference/cloud-compute/1.9.1/V1.RouterBgp)\n- [1.8.3](/php/docs/reference/cloud-compute/1.8.3/V1.RouterBgp)\n- [1.7.1](/php/docs/reference/cloud-compute/1.7.1/V1.RouterBgp)\n- [1.6.1](/php/docs/reference/cloud-compute/1.6.1/V1.RouterBgp)\n- [1.5.0](/php/docs/reference/cloud-compute/1.5.0/V1.RouterBgp) \nReference documentation and code samples for the Compute V1 Client class RouterBgp.\n\nGenerated from protobuf message `google.cloud.compute.v1.RouterBgp`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Compute \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getAdvertiseMode\n\nUser-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.\n\nCheck the AdvertiseMode enum for the list of possible values.\n\n### hasAdvertiseMode\n\n### clearAdvertiseMode\n\n### setAdvertiseMode\n\nUser-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM.\n\nCheck the AdvertiseMode enum for the list of possible values.\n\n### getAdvertisedGroups\n\nUser-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.\n\nCheck the AdvertisedGroups enum for the list of possible values.\n\n### setAdvertisedGroups\n\nUser-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.\n\nCheck the AdvertisedGroups enum for the list of possible values.\n\n### getAdvertisedIpRanges\n\nUser-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.\n\n### setAdvertisedIpRanges\n\nUser-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.\n\n### getAsn\n\nLocal BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.\n\n### hasAsn\n\n### clearAsn\n\n### setAsn\n\nLocal BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.\n\n### getIdentifierRange\n\nExplicitly specifies a range of valid BGP Identifiers for this Router. It is provided as a link-local IPv4 range (from 169.254.0.0/16), of size at least /30, even if the BGP sessions are over IPv6. It must not overlap with any IPv4 BGP session ranges. Other vendors commonly call this \"router ID\".\n\n### hasIdentifierRange\n\n### clearIdentifierRange\n\n### setIdentifierRange\n\nExplicitly specifies a range of valid BGP Identifiers for this Router. It is provided as a link-local IPv4 range (from 169.254.0.0/16), of size at least /30, even if the BGP sessions are over IPv6. It must not overlap with any IPv4 BGP session ranges. Other vendors commonly call this \"router ID\".\n\n### getKeepaliveInterval\n\nThe interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20.\n\n### hasKeepaliveInterval\n\n### clearKeepaliveInterval\n\n### setKeepaliveInterval\n\nThe interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20."]]