Struct openstack::network::FloatingIp
source · pub struct FloatingIp { /* private fields */ }
Expand description
Structure representing a single floating IP.
Implementations§
source§impl FloatingIp
impl FloatingIp
sourcepub fn created_at(&self) -> Option<DateTime<FixedOffset>>
pub fn created_at(&self) -> Option<DateTime<FixedOffset>>
Creation data and time (if available).
sourcepub fn description(&self) -> &Option<String>
pub fn description(&self) -> &Option<String>
Floating IP description.
sourcepub fn set_description<S: Into<String>>(&mut self, value: S)
pub fn set_description<S: Into<String>>(&mut self, value: S)
Update the description.
sourcepub fn with_description<S: Into<String>>(self, value: S) -> Self
pub fn with_description<S: Into<String>>(self, value: S) -> Self
Update the description.
sourcepub fn dns_domain(&self) -> &Option<String>
pub fn dns_domain(&self) -> &Option<String>
DNS domain for the floating IP (if available).
sourcepub fn fixed_ip_address(&self) -> Option<IpAddr>
pub fn fixed_ip_address(&self) -> Option<IpAddr>
IP address of the port associated with the IP (if any).
sourcepub fn set_fixed_ip_address(&mut self, value: IpAddr)
pub fn set_fixed_ip_address(&mut self, value: IpAddr)
Update which fixed IP address is associated with the floating IP.
sourcepub fn with_fixed_ip_address(self, value: IpAddr) -> Self
pub fn with_fixed_ip_address(self, value: IpAddr) -> Self
Update which fixed IP address is associated with the floating IP.
sourcepub fn floating_ip_address(&self) -> IpAddr
pub fn floating_ip_address(&self) -> IpAddr
Floating IP address
sourcepub fn floating_network_id(&self) -> &String
pub fn floating_network_id(&self) -> &String
ID of the network this floating IP belongs to.
sourcepub async fn floating_network(&self) -> Result<Network>
pub async fn floating_network(&self) -> Result<Network>
Get network this floating IP belongs to.
sourcepub fn is_associated(&self) -> bool
pub fn is_associated(&self) -> bool
Whether the floating IP is associated.
sourcepub fn port_forwardings(&self) -> &Vec<PortForwarding> ⓘ
pub fn port_forwardings(&self) -> &Vec<PortForwarding> ⓘ
List of port forwardings (if any).
sourcepub async fn port(&self) -> Result<Port>
pub async fn port(&self) -> Result<Port>
Fetch the port this IP is associated with.
Fails with ResourceNotFound
if the floating IP is not associated.
sourcepub fn status(&self) -> FloatingIpStatus
pub fn status(&self) -> FloatingIpStatus
Status of the floating IP.
sourcepub fn updated_at(&self) -> Option<DateTime<FixedOffset>>
pub fn updated_at(&self) -> Option<DateTime<FixedOffset>>
Last update data and time (if available).
sourcepub async fn associate<P>(
&mut self,
port: P,
fixed_ip_address: Option<IpAddr>
) -> Result<()>where
P: Into<PortRef>,
pub async fn associate<P>( &mut self, port: P, fixed_ip_address: Option<IpAddr> ) -> Result<()>where P: Into<PortRef>,
Associate this floating IP with a port.
Optionally provide a fixed IP address to associate with, in case the port has several fixed IP addresses.
Warning
Any changes to fixed_ip_address
are reset on this call.
sourcepub async fn dissociate(&mut self) -> Result<()>
pub async fn dissociate(&mut self) -> Result<()>
Dissociate this floating IP from a port.
Warning
Any changes to fixed_ip_address
are reset on this call.
sourcepub async fn delete(self) -> Result<DeletionWaiter<FloatingIp>>
pub async fn delete(self) -> Result<DeletionWaiter<FloatingIp>>
Delete the floating IP.
Trait Implementations§
source§impl Clone for FloatingIp
impl Clone for FloatingIp
source§fn clone(&self) -> FloatingIp
fn clone(&self) -> FloatingIp
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more