#[non_exhaustive]pub struct NetworkInterface {Show 31 fields
pub association: Option<NetworkInterfaceAssociation>,
pub attachment: Option<NetworkInterfaceAttachment>,
pub availability_zone: Option<String>,
pub connection_tracking_configuration: Option<ConnectionTrackingConfiguration>,
pub description: Option<String>,
pub groups: Option<Vec<GroupIdentifier>>,
pub interface_type: Option<NetworkInterfaceType>,
pub ipv6_addresses: Option<Vec<NetworkInterfaceIpv6Address>>,
pub mac_address: Option<String>,
pub network_interface_id: Option<String>,
pub outpost_arn: Option<String>,
pub owner_id: Option<String>,
pub private_dns_name: Option<String>,
pub public_dns_name: Option<String>,
pub public_ip_dns_name_options: Option<PublicIpDnsNameOptions>,
pub private_ip_address: Option<String>,
pub private_ip_addresses: Option<Vec<NetworkInterfacePrivateIpAddress>>,
pub ipv4_prefixes: Option<Vec<Ipv4PrefixSpecification>>,
pub ipv6_prefixes: Option<Vec<Ipv6PrefixSpecification>>,
pub requester_id: Option<String>,
pub requester_managed: Option<bool>,
pub source_dest_check: Option<bool>,
pub status: Option<NetworkInterfaceStatus>,
pub subnet_id: Option<String>,
pub tag_set: Option<Vec<Tag>>,
pub vpc_id: Option<String>,
pub deny_all_igw_traffic: Option<bool>,
pub ipv6_native: Option<bool>,
pub ipv6_address: Option<String>,
pub operator: Option<OperatorResponse>,
pub associated_subnets: Option<Vec<String>>,
}
Expand description
Describes a network interface.
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.association: Option<NetworkInterfaceAssociation>
The association information for an Elastic IP address (IPv4) associated with the network interface.
attachment: Option<NetworkInterfaceAttachment>
The network interface attachment.
availability_zone: Option<String>
The Availability Zone.
connection_tracking_configuration: Option<ConnectionTrackingConfiguration>
A security group connection tracking configuration that enables you to set the timeout for connection tracking on an Elastic network interface. For more information, see Connection tracking timeouts in the Amazon EC2 User Guide.
description: Option<String>
A description.
groups: Option<Vec<GroupIdentifier>>
Any security groups for the network interface.
interface_type: Option<NetworkInterfaceType>
The type of network interface.
ipv6_addresses: Option<Vec<NetworkInterfaceIpv6Address>>
The IPv6 addresses associated with the network interface.
mac_address: Option<String>
The MAC address.
network_interface_id: Option<String>
The ID of the network interface.
outpost_arn: Option<String>
The Amazon Resource Name (ARN) of the Outpost.
owner_id: Option<String>
The Amazon Web Services account ID of the owner of the network interface.
private_dns_name: Option<String>
The private hostname. For more information, see EC2 instance hostnames, DNS names, and domains in the Amazon EC2 User Guide.
public_dns_name: Option<String>
A public hostname. For more information, see EC2 instance hostnames, DNS names, and domains in the Amazon EC2 User Guide.
public_ip_dns_name_options: Option<PublicIpDnsNameOptions>
Public hostname type options. For more information, see EC2 instance hostnames, DNS names, and domains in the Amazon EC2 User Guide.
private_ip_address: Option<String>
The IPv4 address of the network interface within the subnet.
private_ip_addresses: Option<Vec<NetworkInterfacePrivateIpAddress>>
The private IPv4 addresses associated with the network interface.
ipv4_prefixes: Option<Vec<Ipv4PrefixSpecification>>
The IPv4 prefixes that are assigned to the network interface.
ipv6_prefixes: Option<Vec<Ipv6PrefixSpecification>>
The IPv6 prefixes that are assigned to the network interface.
requester_id: Option<String>
The alias or Amazon Web Services account ID of the principal or service that created the network interface.
requester_managed: Option<bool>
Indicates whether the network interface is being managed by Amazon Web Services.
source_dest_check: Option<bool>
Indicates whether source/destination checking is enabled.
status: Option<NetworkInterfaceStatus>
The status of the network interface.
subnet_id: Option<String>
The ID of the subnet.
tag_set: Option<Vec<Tag>>
Any tags assigned to the network interface.
vpc_id: Option<String>
The ID of the VPC.
deny_all_igw_traffic: Option<bool>
Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is true
, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.
ipv6_native: Option<bool>
Indicates whether this is an IPv6 only network interface.
ipv6_address: Option<String>
The IPv6 globally unique address associated with the network interface.
operator: Option<OperatorResponse>
The service provider that manages the network interface.
associated_subnets: Option<Vec<String>>
The subnets associated with this network interface.
Implementations§
Source§impl NetworkInterface
impl NetworkInterface
Sourcepub fn association(&self) -> Option<&NetworkInterfaceAssociation>
pub fn association(&self) -> Option<&NetworkInterfaceAssociation>
The association information for an Elastic IP address (IPv4) associated with the network interface.
Sourcepub fn attachment(&self) -> Option<&NetworkInterfaceAttachment>
pub fn attachment(&self) -> Option<&NetworkInterfaceAttachment>
The network interface attachment.
Sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone.
Sourcepub fn connection_tracking_configuration(
&self,
) -> Option<&ConnectionTrackingConfiguration>
pub fn connection_tracking_configuration( &self, ) -> Option<&ConnectionTrackingConfiguration>
A security group connection tracking configuration that enables you to set the timeout for connection tracking on an Elastic network interface. For more information, see Connection tracking timeouts in the Amazon EC2 User Guide.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
A description.
Sourcepub fn groups(&self) -> &[GroupIdentifier]
pub fn groups(&self) -> &[GroupIdentifier]
Any security groups for the network interface.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .groups.is_none()
.
Sourcepub fn interface_type(&self) -> Option<&NetworkInterfaceType>
pub fn interface_type(&self) -> Option<&NetworkInterfaceType>
The type of network interface.
Sourcepub fn ipv6_addresses(&self) -> &[NetworkInterfaceIpv6Address]
pub fn ipv6_addresses(&self) -> &[NetworkInterfaceIpv6Address]
The IPv6 addresses associated with the network interface.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .ipv6_addresses.is_none()
.
Sourcepub fn mac_address(&self) -> Option<&str>
pub fn mac_address(&self) -> Option<&str>
The MAC address.
Sourcepub fn network_interface_id(&self) -> Option<&str>
pub fn network_interface_id(&self) -> Option<&str>
The ID of the network interface.
Sourcepub fn outpost_arn(&self) -> Option<&str>
pub fn outpost_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the Outpost.
Sourcepub fn owner_id(&self) -> Option<&str>
pub fn owner_id(&self) -> Option<&str>
The Amazon Web Services account ID of the owner of the network interface.
Sourcepub fn private_dns_name(&self) -> Option<&str>
pub fn private_dns_name(&self) -> Option<&str>
The private hostname. For more information, see EC2 instance hostnames, DNS names, and domains in the Amazon EC2 User Guide.
Sourcepub fn public_dns_name(&self) -> Option<&str>
pub fn public_dns_name(&self) -> Option<&str>
A public hostname. For more information, see EC2 instance hostnames, DNS names, and domains in the Amazon EC2 User Guide.
Sourcepub fn public_ip_dns_name_options(&self) -> Option<&PublicIpDnsNameOptions>
pub fn public_ip_dns_name_options(&self) -> Option<&PublicIpDnsNameOptions>
Public hostname type options. For more information, see EC2 instance hostnames, DNS names, and domains in the Amazon EC2 User Guide.
Sourcepub fn private_ip_address(&self) -> Option<&str>
pub fn private_ip_address(&self) -> Option<&str>
The IPv4 address of the network interface within the subnet.
Sourcepub fn private_ip_addresses(&self) -> &[NetworkInterfacePrivateIpAddress]
pub fn private_ip_addresses(&self) -> &[NetworkInterfacePrivateIpAddress]
The private IPv4 addresses associated with the network interface.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .private_ip_addresses.is_none()
.
Sourcepub fn ipv4_prefixes(&self) -> &[Ipv4PrefixSpecification]
pub fn ipv4_prefixes(&self) -> &[Ipv4PrefixSpecification]
The IPv4 prefixes that are assigned to the network interface.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .ipv4_prefixes.is_none()
.
Sourcepub fn ipv6_prefixes(&self) -> &[Ipv6PrefixSpecification]
pub fn ipv6_prefixes(&self) -> &[Ipv6PrefixSpecification]
The IPv6 prefixes that are assigned to the network interface.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .ipv6_prefixes.is_none()
.
Sourcepub fn requester_id(&self) -> Option<&str>
pub fn requester_id(&self) -> Option<&str>
The alias or Amazon Web Services account ID of the principal or service that created the network interface.
Sourcepub fn requester_managed(&self) -> Option<bool>
pub fn requester_managed(&self) -> Option<bool>
Indicates whether the network interface is being managed by Amazon Web Services.
Sourcepub fn source_dest_check(&self) -> Option<bool>
pub fn source_dest_check(&self) -> Option<bool>
Indicates whether source/destination checking is enabled.
Sourcepub fn status(&self) -> Option<&NetworkInterfaceStatus>
pub fn status(&self) -> Option<&NetworkInterfaceStatus>
The status of the network interface.
Sourcepub fn tag_set(&self) -> &[Tag]
pub fn tag_set(&self) -> &[Tag]
Any tags assigned to the network interface.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .tag_set.is_none()
.
Sourcepub fn deny_all_igw_traffic(&self) -> Option<bool>
pub fn deny_all_igw_traffic(&self) -> Option<bool>
Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is true
, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.
Sourcepub fn ipv6_native(&self) -> Option<bool>
pub fn ipv6_native(&self) -> Option<bool>
Indicates whether this is an IPv6 only network interface.
Sourcepub fn ipv6_address(&self) -> Option<&str>
pub fn ipv6_address(&self) -> Option<&str>
The IPv6 globally unique address associated with the network interface.
Sourcepub fn operator(&self) -> Option<&OperatorResponse>
pub fn operator(&self) -> Option<&OperatorResponse>
The service provider that manages the network interface.
Sourcepub fn associated_subnets(&self) -> &[String]
pub fn associated_subnets(&self) -> &[String]
The subnets associated with this network interface.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .associated_subnets.is_none()
.
Source§impl NetworkInterface
impl NetworkInterface
Sourcepub fn builder() -> NetworkInterfaceBuilder
pub fn builder() -> NetworkInterfaceBuilder
Creates a new builder-style object to manufacture NetworkInterface
.
Trait Implementations§
Source§impl Clone for NetworkInterface
impl Clone for NetworkInterface
Source§fn clone(&self) -> NetworkInterface
fn clone(&self) -> NetworkInterface
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for NetworkInterface
impl Debug for NetworkInterface
Source§impl PartialEq for NetworkInterface
impl PartialEq for NetworkInterface
impl StructuralPartialEq for NetworkInterface
Auto Trait Implementations§
impl Freeze for NetworkInterface
impl RefUnwindSafe for NetworkInterface
impl Send for NetworkInterface
impl Sync for NetworkInterface
impl Unpin for NetworkInterface
impl UnwindSafe for NetworkInterface
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);