Compute V1 Client - Class RouterBgpPeer (1.22.0)

Reference documentation and code samples for the Compute V1 Client class RouterBgpPeer.

Generated from protobuf message google.cloud.compute.v1.RouterBgpPeer

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. Check the AdvertiseMode enum for the list of possible values.

↳ advertised_groups array

User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are 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.

↳ advertised_ip_ranges array<RouterAdvertisedIpRange>

User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.

↳ advertised_route_priority int

The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.

↳ bfd RouterBgpPeerBfd

BFD configuration for the BGP peering.

↳ custom_learned_ip_ranges array<RouterBgpPeerCustomLearnedIpRange>

A list of user-defined custom learned route IP address ranges for a BGP session.

↳ custom_learned_route_priority int

The user-defined custom learned route priority for a BGP session. This value is applied to all custom learned route ranges for the session. You can choose a value from 0 to 65335. If you don't provide a value, Google Cloud assigns a priority of 100 to the ranges.

↳ enable string

The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE. Check the Enable enum for the list of possible values.

↳ enable_ipv4 bool

Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4.

↳ enable_ipv6 bool

Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6.

↳ export_policies array

List of export policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies.

↳ import_policies array

List of import policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies.

↳ interface_name string

Name of the interface the BGP peer is associated with.

↳ ip_address string

IP address of the interface inside Google Cloud Platform.

↳ ipv4_nexthop_address string

IPv4 address of the interface inside Google Cloud Platform.

↳ ipv6_nexthop_address string

IPv6 address of the interface inside Google Cloud Platform.

↳ management_type string

[Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted. Check the ManagementType enum for the list of possible values.

↳ md5_authentication_key_name string

Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.

↳ name string

Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

↳ peer_asn int

Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.

↳ peer_ip_address string

IP address of the BGP interface outside Google Cloud Platform.

↳ peer_ipv4_nexthop_address string

IPv4 address of the BGP interface outside Google Cloud Platform.

↳ peer_ipv6_nexthop_address string

IPv6 address of the BGP interface outside Google Cloud Platform.

↳ router_appliance_instance string

URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.

getAdvertiseMode

User-specified flag to indicate which mode to use for advertisement.

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.

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, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are 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.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setAdvertisedGroups

User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are 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 overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setAdvertisedIpRanges

User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.

Parameter
Name Description
var array<RouterAdvertisedIpRange>
Returns
Type Description
$this

getAdvertisedRoutePriority

The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.

Returns
Type Description
int

hasAdvertisedRoutePriority

clearAdvertisedRoutePriority

setAdvertisedRoutePriority

The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.

Parameter
Name Description
var int
Returns
Type Description
$this

getBfd

BFD configuration for the BGP peering.

Returns
Type Description
RouterBgpPeerBfd|null

hasBfd

clearBfd

setBfd

BFD configuration for the BGP peering.

Parameter
Name Description
var RouterBgpPeerBfd
Returns
Type Description
$this

getCustomLearnedIpRanges

A list of user-defined custom learned route IP address ranges for a BGP session.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setCustomLearnedIpRanges

A list of user-defined custom learned route IP address ranges for a BGP session.

Parameter
Name Description
var array<RouterBgpPeerCustomLearnedIpRange>
Returns
Type Description
$this

getCustomLearnedRoutePriority

The user-defined custom learned route priority for a BGP session. This value is applied to all custom learned route ranges for the session. You can choose a value from 0 to 65335. If you don't provide a value, Google Cloud assigns a priority of 100 to the ranges.

Returns
Type Description
int

hasCustomLearnedRoutePriority

clearCustomLearnedRoutePriority

setCustomLearnedRoutePriority

The user-defined custom learned route priority for a BGP session. This value is applied to all custom learned route ranges for the session. You can choose a value from 0 to 65335. If you don't provide a value, Google Cloud assigns a priority of 100 to the ranges.

Parameter
Name Description
var int
Returns
Type Description
$this

getEnable

The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.

Check the Enable enum for the list of possible values.

Returns
Type Description
string

hasEnable

clearEnable

setEnable

The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.

Check the Enable enum for the list of possible values.

Parameter
Name Description
var string
Returns
Type Description
$this

getEnableIpv4

Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4.

Returns
Type Description
bool

hasEnableIpv4

clearEnableIpv4

setEnableIpv4

Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4.

Parameter
Name Description
var bool
Returns
Type Description
$this

getEnableIpv6

Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6.

Returns
Type Description
bool

hasEnableIpv6

clearEnableIpv6

setEnableIpv6

Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6.

Parameter
Name Description
var bool
Returns
Type Description
$this

getExportPolicies

List of export policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setExportPolicies

List of export policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getImportPolicies

List of import policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setImportPolicies

List of import policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getInterfaceName

Name of the interface the BGP peer is associated with.

Returns
Type Description
string

hasInterfaceName

clearInterfaceName

setInterfaceName

Name of the interface the BGP peer is associated with.

Parameter
Name Description
var string
Returns
Type Description
$this

getIpAddress

IP address of the interface inside Google Cloud Platform.

Returns
Type Description
string

hasIpAddress

clearIpAddress

setIpAddress

IP address of the interface inside Google Cloud Platform.

Parameter
Name Description
var string
Returns
Type Description
$this

getIpv4NexthopAddress

IPv4 address of the interface inside Google Cloud Platform.

Returns
Type Description
string

hasIpv4NexthopAddress

clearIpv4NexthopAddress

setIpv4NexthopAddress

IPv4 address of the interface inside Google Cloud Platform.

Parameter
Name Description
var string
Returns
Type Description
$this

getIpv6NexthopAddress

IPv6 address of the interface inside Google Cloud Platform.

Returns
Type Description
string

hasIpv6NexthopAddress

clearIpv6NexthopAddress

setIpv6NexthopAddress

IPv6 address of the interface inside Google Cloud Platform.

Parameter
Name Description
var string
Returns
Type Description
$this

getManagementType

[Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.

Check the ManagementType enum for the list of possible values.

Returns
Type Description
string

hasManagementType

clearManagementType

setManagementType

[Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.

Check the ManagementType enum for the list of possible values.

Parameter
Name Description
var string
Returns
Type Description
$this

getMd5AuthenticationKeyName

Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.

Returns
Type Description
string

hasMd5AuthenticationKeyName

clearMd5AuthenticationKeyName

setMd5AuthenticationKeyName

Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.

Parameter
Name Description
var string
Returns
Type Description
$this

getName

Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Returns
Type Description
string

hasName

clearName

setName

Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Parameter
Name Description
var string
Returns
Type Description
$this

getPeerAsn

Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.

Returns
Type Description
int

hasPeerAsn

clearPeerAsn

setPeerAsn

Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.

Parameter
Name Description
var int
Returns
Type Description
$this

getPeerIpAddress

IP address of the BGP interface outside Google Cloud Platform.

Returns
Type Description
string

hasPeerIpAddress

clearPeerIpAddress

setPeerIpAddress

IP address of the BGP interface outside Google Cloud Platform.

Parameter
Name Description
var string
Returns
Type Description
$this

getPeerIpv4NexthopAddress

IPv4 address of the BGP interface outside Google Cloud Platform.

Returns
Type Description
string

hasPeerIpv4NexthopAddress

clearPeerIpv4NexthopAddress

setPeerIpv4NexthopAddress

IPv4 address of the BGP interface outside Google Cloud Platform.

Parameter
Name Description
var string
Returns
Type Description
$this

getPeerIpv6NexthopAddress

IPv6 address of the BGP interface outside Google Cloud Platform.

Returns
Type Description
string

hasPeerIpv6NexthopAddress

clearPeerIpv6NexthopAddress

setPeerIpv6NexthopAddress

IPv6 address of the BGP interface outside Google Cloud Platform.

Parameter
Name Description
var string
Returns
Type Description
$this

getRouterApplianceInstance

URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.

Returns
Type Description
string

hasRouterApplianceInstance

clearRouterApplianceInstance

setRouterApplianceInstance

URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.

Parameter
Name Description
var string
Returns
Type Description
$this