#[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 */
}routers only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
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
impl RouterBgpPeer
pub fn new() -> Self
Sourcepub fn set_advertise_mode<T>(self, v: T) -> Selfwhere
T: Into<AdvertiseMode>,
pub fn set_advertise_mode<T>(self, v: T) -> Selfwhere
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);Sourcepub fn set_or_clear_advertise_mode<T>(self, v: Option<T>) -> Selfwhere
T: Into<AdvertiseMode>,
pub fn set_or_clear_advertise_mode<T>(self, v: Option<T>) -> Selfwhere
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>);Sourcepub fn set_advertised_groups<T, V>(self, v: T) -> Self
pub fn set_advertised_groups<T, V>(self, v: T) -> Self
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,
]);Sourcepub fn set_advertised_ip_ranges<T, V>(self, v: T) -> Self
pub fn set_advertised_ip_ranges<T, V>(self, v: T) -> Self
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 */,
]);Sourcepub fn set_advertised_route_priority<T>(self, v: T) -> Self
pub fn set_advertised_route_priority<T>(self, v: T) -> Self
Sets the value of advertised_route_priority.
§Example
let x = RouterBgpPeer::new().set_advertised_route_priority(42_u32);Sourcepub fn set_or_clear_advertised_route_priority<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_advertised_route_priority<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_bfd<T>(self, v: T) -> Selfwhere
T: Into<RouterBgpPeerBfd>,
pub fn set_bfd<T>(self, v: T) -> Selfwhere
T: Into<RouterBgpPeerBfd>,
Sourcepub fn set_or_clear_bfd<T>(self, v: Option<T>) -> Selfwhere
T: Into<RouterBgpPeerBfd>,
pub fn set_or_clear_bfd<T>(self, v: Option<T>) -> Selfwhere
T: Into<RouterBgpPeerBfd>,
Sourcepub fn set_custom_learned_ip_ranges<T, V>(self, v: T) -> Self
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 */,
]);Sourcepub fn set_custom_learned_route_priority<T>(self, v: T) -> Self
pub fn set_custom_learned_route_priority<T>(self, v: T) -> Self
Sets the value of custom_learned_route_priority.
§Example
let x = RouterBgpPeer::new().set_custom_learned_route_priority(42);Sourcepub fn set_or_clear_custom_learned_route_priority<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_custom_learned_route_priority<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_enable<T>(self, v: T) -> Self
pub fn set_enable<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_enable<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_enable<T>(self, v: Option<T>) -> Self
Sourcepub fn set_enable_ipv_4<T>(self, v: T) -> Self
pub fn set_enable_ipv_4<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_enable_ipv_4<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_enable_ipv_4<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_enable_ipv_6<T>(self, v: T) -> Self
pub fn set_enable_ipv_6<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_enable_ipv_6<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_enable_ipv_6<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_export_policies<T, V>(self, v: T) -> Self
pub fn set_export_policies<T, V>(self, v: T) -> Self
Sets the value of export_policies.
§Example
let x = RouterBgpPeer::new().set_export_policies(["a", "b", "c"]);Sourcepub fn set_import_policies<T, V>(self, v: T) -> Self
pub fn set_import_policies<T, V>(self, v: T) -> Self
Sets the value of import_policies.
§Example
let x = RouterBgpPeer::new().set_import_policies(["a", "b", "c"]);Sourcepub fn set_interface_name<T>(self, v: T) -> Self
pub fn set_interface_name<T>(self, v: T) -> Self
Sets the value of interface_name.
§Example
let x = RouterBgpPeer::new().set_interface_name("example");Sourcepub fn set_or_clear_interface_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_interface_name<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_ip_address<T>(self, v: T) -> Self
pub fn set_ip_address<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_ip_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ip_address<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_ipv_4_nexthop_address<T>(self, v: T) -> Self
pub fn set_ipv_4_nexthop_address<T>(self, v: T) -> Self
Sets the value of ipv_4_nexthop_address.
§Example
let x = RouterBgpPeer::new().set_ipv_4_nexthop_address("example");Sourcepub fn set_or_clear_ipv_4_nexthop_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ipv_4_nexthop_address<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_ipv_6_nexthop_address<T>(self, v: T) -> Self
pub fn set_ipv_6_nexthop_address<T>(self, v: T) -> Self
Sets the value of ipv_6_nexthop_address.
§Example
let x = RouterBgpPeer::new().set_ipv_6_nexthop_address("example");Sourcepub fn set_or_clear_ipv_6_nexthop_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ipv_6_nexthop_address<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_management_type<T>(self, v: T) -> Selfwhere
T: Into<ManagementType>,
pub fn set_management_type<T>(self, v: T) -> Selfwhere
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);Sourcepub fn set_or_clear_management_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<ManagementType>,
pub fn set_or_clear_management_type<T>(self, v: Option<T>) -> Selfwhere
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>);Sourcepub fn set_md_5_authentication_key_name<T>(self, v: T) -> Self
pub fn set_md_5_authentication_key_name<T>(self, v: T) -> Self
Sets the value of md_5_authentication_key_name.
§Example
let x = RouterBgpPeer::new().set_md_5_authentication_key_name("example");Sourcepub fn set_or_clear_md_5_authentication_key_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_md_5_authentication_key_name<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_peer_asn<T>(self, v: T) -> Self
pub fn set_peer_asn<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_peer_asn<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_peer_asn<T>(self, v: Option<T>) -> Self
Sourcepub fn set_peer_ip_address<T>(self, v: T) -> Self
pub fn set_peer_ip_address<T>(self, v: T) -> Self
Sets the value of peer_ip_address.
§Example
let x = RouterBgpPeer::new().set_peer_ip_address("example");Sourcepub fn set_or_clear_peer_ip_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_peer_ip_address<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_peer_ipv_4_nexthop_address<T>(self, v: T) -> Self
pub fn set_peer_ipv_4_nexthop_address<T>(self, v: T) -> Self
Sets the value of peer_ipv_4_nexthop_address.
§Example
let x = RouterBgpPeer::new().set_peer_ipv_4_nexthop_address("example");Sourcepub fn set_or_clear_peer_ipv_4_nexthop_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_peer_ipv_4_nexthop_address<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_peer_ipv_6_nexthop_address<T>(self, v: T) -> Self
pub fn set_peer_ipv_6_nexthop_address<T>(self, v: T) -> Self
Sets the value of peer_ipv_6_nexthop_address.
§Example
let x = RouterBgpPeer::new().set_peer_ipv_6_nexthop_address("example");Sourcepub fn set_or_clear_peer_ipv_6_nexthop_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_peer_ipv_6_nexthop_address<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_router_appliance_instance<T>(self, v: T) -> Self
pub fn set_router_appliance_instance<T>(self, v: T) -> Self
Sets the value of router_appliance_instance.
§Example
let x = RouterBgpPeer::new().set_router_appliance_instance("example");Sourcepub fn set_or_clear_router_appliance_instance<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_router_appliance_instance<T>(self, v: Option<T>) -> Self
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
impl Clone for RouterBgpPeer
Source§fn clone(&self) -> RouterBgpPeer
fn clone(&self) -> RouterBgpPeer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more