pub struct VpnConnection {Show 15 fields
pub name: String,
pub vpn_gateway: String,
pub customer_gateway: String,
pub type: i32,
pub remote_prefixes: Vec<String>,
pub ipsec_profile: i32,
pub pre_shared_key: String,
pub wireguard_public_key: String,
pub wireguard_endpoint: String,
pub tunnel_state: i32,
pub last_handshake_time: Option<Timestamp>,
pub create_time: Option<Timestamp>,
pub creator: String,
pub tags: BTreeMap<String, String>,
pub floating_ip: String,
}Expand description
A site-to-site VPN tunnel between a VPN gateway and a customer gateway.
Fields§
§name: StringThe connection’s resource name.
vpn_gateway: StringThe full name of the VPN gateway the tunnel ends at on the VPC’s side, in the connection’s zone and project.
customer_gateway: StringThe full name of the customer gateway the tunnel ends at on your side, of the same project, in the zone’s region. While a connection names it, the customer gateway can’t be deleted.
type: i32The tunnel’s technology.
remote_prefixes: Vec<String>The prefixes behind the far end that the tunnel carries traffic to, 1
to 20, each in CIDR notation with no bits set past its length, such as
198.51.100.0/24. Only IPv4 prefixes are supported so far: an IPv6 prefix
is refused with INVALID_ARGUMENT. A prefix may not overlap the VPC’s
IPv4 range, another prefix of the list, or a prefix of another
connection of any VPN gateway of the VPC, and may not be the default route
(an all-zero address with prefix length 0) or either half of it (the
lower or the upper half of the IPv4 space, prefix length 1), which the
VPC’s internet routing holds.
ipsec_profile: i32The IPsec algorithms of an vpn_connection::Type::Ipsec connection; vpn_connection::IpsecProfile::Modern when not set.
Refused on a vpn_connection::Type::Wireguard connection.
The preshared key both ends authenticate with: 32 random bytes,
base64-encoded (44 characters), as WireGuard writes a preshared key and
as the far end’s IPsec configuration takes it. Set only in the response
that created the connection or rotated its key, and empty everywhere
else: in a Get, a List, a later GetOperation of that same operation, and
the response to a repeat of that request with the same request_id.
wireguard_public_key: StringThe gateway side’s WireGuard public key for this connection, as
WireGuard writes it, on a vpn_connection::Type::Wireguard connection: the far end’s peer
public key. Not a secret; generated with the connection and replaced
when its key is rotated. Empty on an vpn_connection::Type::Ipsec connection.
wireguard_endpoint: StringWhere your device reaches the gateway on a vpn_connection::Type::Wireguard connection: the
connection’s floating IP and UDP port 51820, written <address>:<port>.
Empty on an vpn_connection::Type::Ipsec connection, whose IKE runs on the floating IP’s
ports 500 and 4500.
tunnel_state: i32Whether the tunnel carries traffic. vpn_connection::TunnelState::Down until the gateway reports
otherwise.
last_handshake_time: Option<Timestamp>When the tunnel’s last handshake succeeded; not set before the first.
create_time: Option<Timestamp>When the VPN connection was created.
creator: StringThe principal that created the VPN connection, by its full name on iam:
//iam.origincloudapis.eu/users/{user},
//iam.origincloudapis.eu/organizations/{organization}/serviceAccounts/{service_account},
or a platform service agent’s or service’s name when the platform did.
Labels of your own, at most 50. The origin:name tag is the name the
console shows.
floating_ip: StringThe full name of the floating IP the tunnel ends on, the connection’s public address, of the same project and in the VPN gateway’s zone. While the connection holds it, the floating IP can be neither associated with a network interface, nor a NAT gateway’s, nor released. It stays allocated when the connection is deleted.
Implementations§
Source§impl VpnConnection
impl VpnConnection
Sourcepub fn type(&self) -> Type
pub fn type(&self) -> Type
Returns the enum value of type, or the default if the field is set to an invalid enum value.
Sourcepub fn ipsec_profile(&self) -> IpsecProfile
pub fn ipsec_profile(&self) -> IpsecProfile
Returns the enum value of ipsec_profile, or the default if the field is set to an invalid enum value.
Sourcepub fn set_ipsec_profile(&mut self, value: IpsecProfile)
pub fn set_ipsec_profile(&mut self, value: IpsecProfile)
Sets ipsec_profile to the provided enum value.
Sourcepub fn tunnel_state(&self) -> TunnelState
pub fn tunnel_state(&self) -> TunnelState
Returns the enum value of tunnel_state, or the default if the field is set to an invalid enum value.
Sourcepub fn set_tunnel_state(&mut self, value: TunnelState)
pub fn set_tunnel_state(&mut self, value: TunnelState)
Sets tunnel_state to the provided enum value.
Trait Implementations§
Source§impl Clone for VpnConnection
impl Clone for VpnConnection
Source§impl Debug for VpnConnection
impl Debug for VpnConnection
Source§impl Default for VpnConnection
impl Default for VpnConnection
Source§impl<'de> Deserialize<'de> for VpnConnection
impl<'de> Deserialize<'de> for VpnConnection
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for VpnConnection
impl Message for VpnConnection
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.