Skip to main content

RouterBgpPeer

Struct RouterBgpPeer 

Source
#[non_exhaustive]
pub struct RouterBgpPeer {
Show 24 fields pub advertise_mode: Option<AdvertiseMode>, pub advertised_groups: Vec<AdvertisedGroups>, pub advertised_ip_ranges: Vec<RouterAdvertisedIpRange>, pub advertised_route_priority: Option<u32>, pub bfd: Option<RouterBgpPeerBfd>, pub custom_learned_ip_ranges: Vec<RouterBgpPeerCustomLearnedIpRange>, pub custom_learned_route_priority: Option<i32>, pub enable: Option<Enable>, pub enable_ipv_4: Option<bool>, pub enable_ipv_6: Option<bool>, pub export_policies: Vec<String>, pub import_policies: Vec<String>, pub interface_name: Option<String>, pub ip_address: Option<String>, pub ipv_4_nexthop_address: Option<String>, pub ipv_6_nexthop_address: Option<String>, pub management_type: Option<ManagementType>, pub md_5_authentication_key_name: Option<String>, pub name: Option<String>, pub peer_asn: Option<u32>, pub peer_ip_address: Option<String>, pub peer_ipv_4_nexthop_address: Option<String>, pub peer_ipv_6_nexthop_address: Option<String>, pub router_appliance_instance: Option<String>, /* private fields */
}
Available on crate feature routers only.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§advertise_mode: Option<AdvertiseMode>

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

§advertised_groups: Vec<AdvertisedGroups>

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.

§advertised_ip_ranges: Vec<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: Option<u32>

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: Option<RouterBgpPeerBfd>

BFD configuration for the BGP peering.

§custom_learned_ip_ranges: Vec<RouterBgpPeerCustomLearnedIpRange>

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

§custom_learned_route_priority: Option<i32>

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: Option<Enable>

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.

§enable_ipv_4: Option<bool>

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

§enable_ipv_6: Option<bool>

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

§export_policies: Vec<String>

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.

§import_policies: Vec<String>

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.

§interface_name: Option<String>

Name of the interface the BGP peer is associated with.

§ip_address: Option<String>

IP address of the interface inside Google Cloud Platform.

§ipv_4_nexthop_address: Option<String>

IPv4 address of the interface inside Google Cloud Platform.

§ipv_6_nexthop_address: Option<String>

IPv6 address of the interface inside Google Cloud Platform.

§management_type: Option<ManagementType>

Output only. [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.
§md_5_authentication_key_name: Option<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: Option<String>

Name of this BGP peer. The name must be 1-63 characters long, and comply withRFC1035. 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: Option<u32>

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

§peer_ip_address: Option<String>

IP address of the BGP interface outside Google Cloud Platform.

§peer_ipv_4_nexthop_address: Option<String>

IPv4 address of the BGP interface outside Google Cloud Platform.

§peer_ipv_6_nexthop_address: Option<String>

IPv6 address of the BGP interface outside Google Cloud Platform.

§router_appliance_instance: Option<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.

Implementations§

Source§

impl RouterBgpPeer

Source

pub fn new() -> Self

Source

pub fn set_advertise_mode<T>(self, v: T) -> Self
where T: Into<AdvertiseMode>,

Sets the value of advertise_mode.

§Example
use google_cloud_compute_v1::model::router_bgp_peer::AdvertiseMode;
let x0 = RouterBgpPeer::new().set_advertise_mode(AdvertiseMode::Default);
Source

pub fn set_or_clear_advertise_mode<T>(self, v: Option<T>) -> Self
where T: Into<AdvertiseMode>,

Sets or clears the value of advertise_mode.

§Example
use google_cloud_compute_v1::model::router_bgp_peer::AdvertiseMode;
let x0 = RouterBgpPeer::new().set_or_clear_advertise_mode(Some(AdvertiseMode::Default));
let x_none = RouterBgpPeer::new().set_or_clear_advertise_mode(None::<AdvertiseMode>);
Source

pub fn set_advertised_groups<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<AdvertisedGroups>,

Sets the value of advertised_groups.

§Example
use google_cloud_compute_v1::model::router_bgp_peer::AdvertisedGroups;
let x = RouterBgpPeer::new().set_advertised_groups([
    AdvertisedGroups::AllSubnets,
]);
Source

pub fn set_advertised_ip_ranges<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<RouterAdvertisedIpRange>,

Sets the value of advertised_ip_ranges.

§Example
use google_cloud_compute_v1::model::RouterAdvertisedIpRange;
let x = RouterBgpPeer::new()
    .set_advertised_ip_ranges([
        RouterAdvertisedIpRange::default()/* use setters */,
        RouterAdvertisedIpRange::default()/* use (different) setters */,
    ]);
Source

pub fn set_advertised_route_priority<T>(self, v: T) -> Self
where T: Into<u32>,

Sets the value of advertised_route_priority.

§Example
let x = RouterBgpPeer::new().set_advertised_route_priority(42_u32);
Source

pub fn set_or_clear_advertised_route_priority<T>(self, v: Option<T>) -> Self
where T: Into<u32>,

Sets or clears the value of advertised_route_priority.

§Example
let x = RouterBgpPeer::new().set_or_clear_advertised_route_priority(Some(42_u32));
let x = RouterBgpPeer::new().set_or_clear_advertised_route_priority(None::<u32>);
Source

pub fn set_bfd<T>(self, v: T) -> Self

Sets the value of bfd.

§Example
use google_cloud_compute_v1::model::RouterBgpPeerBfd;
let x = RouterBgpPeer::new().set_bfd(RouterBgpPeerBfd::default()/* use setters */);
Source

pub fn set_or_clear_bfd<T>(self, v: Option<T>) -> Self

Sets or clears the value of bfd.

§Example
use google_cloud_compute_v1::model::RouterBgpPeerBfd;
let x = RouterBgpPeer::new().set_or_clear_bfd(Some(RouterBgpPeerBfd::default()/* use setters */));
let x = RouterBgpPeer::new().set_or_clear_bfd(None::<RouterBgpPeerBfd>);
Source

pub fn set_custom_learned_ip_ranges<T, V>(self, v: T) -> Self

Sets the value of custom_learned_ip_ranges.

§Example
use google_cloud_compute_v1::model::RouterBgpPeerCustomLearnedIpRange;
let x = RouterBgpPeer::new()
    .set_custom_learned_ip_ranges([
        RouterBgpPeerCustomLearnedIpRange::default()/* use setters */,
        RouterBgpPeerCustomLearnedIpRange::default()/* use (different) setters */,
    ]);
Source

pub fn set_custom_learned_route_priority<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of custom_learned_route_priority.

§Example
let x = RouterBgpPeer::new().set_custom_learned_route_priority(42);
Source

pub fn set_or_clear_custom_learned_route_priority<T>(self, v: Option<T>) -> Self
where T: Into<i32>,

Sets or clears the value of custom_learned_route_priority.

§Example
let x = RouterBgpPeer::new().set_or_clear_custom_learned_route_priority(Some(42));
let x = RouterBgpPeer::new().set_or_clear_custom_learned_route_priority(None::<i32>);
Source

pub fn set_enable<T>(self, v: T) -> Self
where T: Into<Enable>,

Sets the value of enable.

§Example
use google_cloud_compute_v1::model::router_bgp_peer::Enable;
let x0 = RouterBgpPeer::new().set_enable(Enable::True);
Source

pub fn set_or_clear_enable<T>(self, v: Option<T>) -> Self
where T: Into<Enable>,

Sets or clears the value of enable.

§Example
use google_cloud_compute_v1::model::router_bgp_peer::Enable;
let x0 = RouterBgpPeer::new().set_or_clear_enable(Some(Enable::True));
let x_none = RouterBgpPeer::new().set_or_clear_enable(None::<Enable>);
Source

pub fn set_enable_ipv_4<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of enable_ipv_4.

§Example
let x = RouterBgpPeer::new().set_enable_ipv_4(true);
Source

pub fn set_or_clear_enable_ipv_4<T>(self, v: Option<T>) -> Self
where T: Into<bool>,

Sets or clears the value of enable_ipv_4.

§Example
let x = RouterBgpPeer::new().set_or_clear_enable_ipv_4(Some(false));
let x = RouterBgpPeer::new().set_or_clear_enable_ipv_4(None::<bool>);
Source

pub fn set_enable_ipv_6<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of enable_ipv_6.

§Example
let x = RouterBgpPeer::new().set_enable_ipv_6(true);
Source

pub fn set_or_clear_enable_ipv_6<T>(self, v: Option<T>) -> Self
where T: Into<bool>,

Sets or clears the value of enable_ipv_6.

§Example
let x = RouterBgpPeer::new().set_or_clear_enable_ipv_6(Some(false));
let x = RouterBgpPeer::new().set_or_clear_enable_ipv_6(None::<bool>);
Source

pub fn set_export_policies<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of export_policies.

§Example
let x = RouterBgpPeer::new().set_export_policies(["a", "b", "c"]);
Source

pub fn set_import_policies<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of import_policies.

§Example
let x = RouterBgpPeer::new().set_import_policies(["a", "b", "c"]);
Source

pub fn set_interface_name<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of interface_name.

§Example
let x = RouterBgpPeer::new().set_interface_name("example");
Source

pub fn set_or_clear_interface_name<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of interface_name.

§Example
let x = RouterBgpPeer::new().set_or_clear_interface_name(Some("example"));
let x = RouterBgpPeer::new().set_or_clear_interface_name(None::<String>);
Source

pub fn set_ip_address<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of ip_address.

§Example
let x = RouterBgpPeer::new().set_ip_address("example");
Source

pub fn set_or_clear_ip_address<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of ip_address.

§Example
let x = RouterBgpPeer::new().set_or_clear_ip_address(Some("example"));
let x = RouterBgpPeer::new().set_or_clear_ip_address(None::<String>);
Source

pub fn set_ipv_4_nexthop_address<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of ipv_4_nexthop_address.

§Example
let x = RouterBgpPeer::new().set_ipv_4_nexthop_address("example");
Source

pub fn set_or_clear_ipv_4_nexthop_address<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of ipv_4_nexthop_address.

§Example
let x = RouterBgpPeer::new().set_or_clear_ipv_4_nexthop_address(Some("example"));
let x = RouterBgpPeer::new().set_or_clear_ipv_4_nexthop_address(None::<String>);
Source

pub fn set_ipv_6_nexthop_address<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of ipv_6_nexthop_address.

§Example
let x = RouterBgpPeer::new().set_ipv_6_nexthop_address("example");
Source

pub fn set_or_clear_ipv_6_nexthop_address<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of ipv_6_nexthop_address.

§Example
let x = RouterBgpPeer::new().set_or_clear_ipv_6_nexthop_address(Some("example"));
let x = RouterBgpPeer::new().set_or_clear_ipv_6_nexthop_address(None::<String>);
Source

pub fn set_management_type<T>(self, v: T) -> Self
where T: Into<ManagementType>,

Sets the value of management_type.

§Example
use google_cloud_compute_v1::model::router_bgp_peer::ManagementType;
let x0 = RouterBgpPeer::new().set_management_type(ManagementType::ManagedByUser);
Source

pub fn set_or_clear_management_type<T>(self, v: Option<T>) -> Self
where T: Into<ManagementType>,

Sets or clears the value of management_type.

§Example
use google_cloud_compute_v1::model::router_bgp_peer::ManagementType;
let x0 = RouterBgpPeer::new().set_or_clear_management_type(Some(ManagementType::ManagedByUser));
let x_none = RouterBgpPeer::new().set_or_clear_management_type(None::<ManagementType>);
Source

pub fn set_md_5_authentication_key_name<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of md_5_authentication_key_name.

§Example
let x = RouterBgpPeer::new().set_md_5_authentication_key_name("example");
Source

pub fn set_or_clear_md_5_authentication_key_name<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of md_5_authentication_key_name.

§Example
let x = RouterBgpPeer::new().set_or_clear_md_5_authentication_key_name(Some("example"));
let x = RouterBgpPeer::new().set_or_clear_md_5_authentication_key_name(None::<String>);
Source

pub fn set_name<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of name.

§Example
let x = RouterBgpPeer::new().set_name("example");
Source

pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of name.

§Example
let x = RouterBgpPeer::new().set_or_clear_name(Some("example"));
let x = RouterBgpPeer::new().set_or_clear_name(None::<String>);
Source

pub fn set_peer_asn<T>(self, v: T) -> Self
where T: Into<u32>,

Sets the value of peer_asn.

§Example
let x = RouterBgpPeer::new().set_peer_asn(42_u32);
Source

pub fn set_or_clear_peer_asn<T>(self, v: Option<T>) -> Self
where T: Into<u32>,

Sets or clears the value of peer_asn.

§Example
let x = RouterBgpPeer::new().set_or_clear_peer_asn(Some(42_u32));
let x = RouterBgpPeer::new().set_or_clear_peer_asn(None::<u32>);
Source

pub fn set_peer_ip_address<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of peer_ip_address.

§Example
let x = RouterBgpPeer::new().set_peer_ip_address("example");
Source

pub fn set_or_clear_peer_ip_address<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of peer_ip_address.

§Example
let x = RouterBgpPeer::new().set_or_clear_peer_ip_address(Some("example"));
let x = RouterBgpPeer::new().set_or_clear_peer_ip_address(None::<String>);
Source

pub fn set_peer_ipv_4_nexthop_address<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of peer_ipv_4_nexthop_address.

§Example
let x = RouterBgpPeer::new().set_peer_ipv_4_nexthop_address("example");
Source

pub fn set_or_clear_peer_ipv_4_nexthop_address<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of peer_ipv_4_nexthop_address.

§Example
let x = RouterBgpPeer::new().set_or_clear_peer_ipv_4_nexthop_address(Some("example"));
let x = RouterBgpPeer::new().set_or_clear_peer_ipv_4_nexthop_address(None::<String>);
Source

pub fn set_peer_ipv_6_nexthop_address<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of peer_ipv_6_nexthop_address.

§Example
let x = RouterBgpPeer::new().set_peer_ipv_6_nexthop_address("example");
Source

pub fn set_or_clear_peer_ipv_6_nexthop_address<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of peer_ipv_6_nexthop_address.

§Example
let x = RouterBgpPeer::new().set_or_clear_peer_ipv_6_nexthop_address(Some("example"));
let x = RouterBgpPeer::new().set_or_clear_peer_ipv_6_nexthop_address(None::<String>);
Source

pub fn set_router_appliance_instance<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of router_appliance_instance.

§Example
let x = RouterBgpPeer::new().set_router_appliance_instance("example");
Source

pub fn set_or_clear_router_appliance_instance<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of router_appliance_instance.

§Example
let x = RouterBgpPeer::new().set_or_clear_router_appliance_instance(Some("example"));
let x = RouterBgpPeer::new().set_or_clear_router_appliance_instance(None::<String>);

Trait Implementations§

Source§

impl Clone for RouterBgpPeer

Source§

fn clone(&self) -> RouterBgpPeer

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RouterBgpPeer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RouterBgpPeer

Source§

fn default() -> RouterBgpPeer

Returns the “default value” for a type. Read more
Source§

impl Message for RouterBgpPeer

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for RouterBgpPeer

Source§

fn eq(&self, other: &RouterBgpPeer) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for RouterBgpPeer

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,