#[non_exhaustive]pub struct CreateNetworkInterfaceInput {Show 19 fields
pub ipv4_prefixes: Option<Vec<Ipv4PrefixSpecificationRequest>>,
pub ipv4_prefix_count: Option<i32>,
pub ipv6_prefixes: Option<Vec<Ipv6PrefixSpecificationRequest>>,
pub ipv6_prefix_count: Option<i32>,
pub interface_type: Option<NetworkInterfaceCreationType>,
pub tag_specifications: Option<Vec<TagSpecification>>,
pub client_token: Option<String>,
pub enable_primary_ipv6: Option<bool>,
pub connection_tracking_specification: Option<ConnectionTrackingSpecificationRequest>,
pub operator: Option<OperatorRequest>,
pub subnet_id: Option<String>,
pub description: Option<String>,
pub private_ip_address: Option<String>,
pub groups: Option<Vec<String>>,
pub private_ip_addresses: Option<Vec<PrivateIpAddressSpecification>>,
pub secondary_private_ip_address_count: Option<i32>,
pub ipv6_addresses: Option<Vec<InstanceIpv6Address>>,
pub ipv6_address_count: Option<i32>,
pub dry_run: Option<bool>,
}
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.ipv4_prefixes: Option<Vec<Ipv4PrefixSpecificationRequest>>
The IPv4 prefixes assigned to the network interface.
You can't specify IPv4 prefixes if you've specified one of the following: a count of IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.
ipv4_prefix_count: Option<i32>
The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface.
You can't specify a count of IPv4 prefixes if you've specified one of the following: specific IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.
ipv6_prefixes: Option<Vec<Ipv6PrefixSpecificationRequest>>
The IPv6 prefixes assigned to the network interface.
You can't specify IPv6 prefixes if you've specified one of the following: a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.
ipv6_prefix_count: Option<i32>
The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface.
You can't specify a count of IPv6 prefixes if you've specified one of the following: specific IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.
interface_type: Option<NetworkInterfaceCreationType>
The type of network interface. The default is interface
.
If you specify efa-only
, do not assign any IP addresses to the network interface. EFA-only network interfaces do not support IP addresses.
The only supported values are interface
, efa
, efa-only
, and trunk
.
tag_specifications: Option<Vec<TagSpecification>>
The tags to apply to the new network interface.
client_token: Option<String>
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
enable_primary_ipv6: Option<bool>
If you’re creating a network interface in a dual-stack or IPv6-only subnet, you have the option to assign a primary IPv6 IP address. A primary IPv6 address is an IPv6 GUA address associated with an ENI that you have enabled to use a primary IPv6 address. Use this option if the instance that this ENI will be attached to relies on its IPv6 address not changing. Amazon Web Services will automatically assign an IPv6 address associated with the ENI attached to your instance to be the primary IPv6 address. Once you enable an IPv6 GUA address to be a primary IPv6, you cannot disable it. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. If you have multiple IPv6 addresses associated with an ENI attached to your instance and you enable a primary IPv6 address, the first IPv6 GUA address associated with the ENI becomes the primary IPv6 address.
connection_tracking_specification: Option<ConnectionTrackingSpecificationRequest>
A connection tracking specification for the network interface.
operator: Option<OperatorRequest>
Reserved for internal use.
subnet_id: Option<String>
The ID of the subnet to associate with the network interface.
description: Option<String>
A description for the network interface.
private_ip_address: Option<String>
The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses
as primary (only one IP address can be designated as primary).
groups: Option<Vec<String>>
The IDs of the security groups.
private_ip_addresses: Option<Vec<PrivateIpAddressSpecification>>
The private IPv4 addresses.
You can't specify private IPv4 addresses if you've specified one of the following: a count of private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
secondary_private_ip_address_count: Option<i32>
The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses
.
You can't specify a count of private IPv4 addresses if you've specified one of the following: specific private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
ipv6_addresses: Option<Vec<InstanceIpv6Address>>
The IPv6 addresses from the IPv6 CIDR block range of your subnet.
You can't specify IPv6 addresses using this parameter if you've specified one of the following: a count of IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.
ipv6_address_count: Option<i32>
The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range.
You can't specify a count of IPv6 addresses using this parameter if you've specified one of the following: specific IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.
If your subnet has the AssignIpv6AddressOnCreation
attribute set, you can override that setting by specifying 0 as the IPv6 address count.
dry_run: Option<bool>
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
Implementations§
Source§impl CreateNetworkInterfaceInput
impl CreateNetworkInterfaceInput
Sourcepub fn ipv4_prefixes(&self) -> &[Ipv4PrefixSpecificationRequest]
pub fn ipv4_prefixes(&self) -> &[Ipv4PrefixSpecificationRequest]
The IPv4 prefixes assigned to the network interface.
You can't specify IPv4 prefixes if you've specified one of the following: a count of IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.
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 ipv4_prefix_count(&self) -> Option<i32>
pub fn ipv4_prefix_count(&self) -> Option<i32>
The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface.
You can't specify a count of IPv4 prefixes if you've specified one of the following: specific IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.
Sourcepub fn ipv6_prefixes(&self) -> &[Ipv6PrefixSpecificationRequest]
pub fn ipv6_prefixes(&self) -> &[Ipv6PrefixSpecificationRequest]
The IPv6 prefixes assigned to the network interface.
You can't specify IPv6 prefixes if you've specified one of the following: a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.
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 ipv6_prefix_count(&self) -> Option<i32>
pub fn ipv6_prefix_count(&self) -> Option<i32>
The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface.
You can't specify a count of IPv6 prefixes if you've specified one of the following: specific IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.
Sourcepub fn interface_type(&self) -> Option<&NetworkInterfaceCreationType>
pub fn interface_type(&self) -> Option<&NetworkInterfaceCreationType>
The type of network interface. The default is interface
.
If you specify efa-only
, do not assign any IP addresses to the network interface. EFA-only network interfaces do not support IP addresses.
The only supported values are interface
, efa
, efa-only
, and trunk
.
Sourcepub fn tag_specifications(&self) -> &[TagSpecification]
pub fn tag_specifications(&self) -> &[TagSpecification]
The tags to apply to the new 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_specifications.is_none()
.
Sourcepub fn client_token(&self) -> Option<&str>
pub fn client_token(&self) -> Option<&str>
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
Sourcepub fn enable_primary_ipv6(&self) -> Option<bool>
pub fn enable_primary_ipv6(&self) -> Option<bool>
If you’re creating a network interface in a dual-stack or IPv6-only subnet, you have the option to assign a primary IPv6 IP address. A primary IPv6 address is an IPv6 GUA address associated with an ENI that you have enabled to use a primary IPv6 address. Use this option if the instance that this ENI will be attached to relies on its IPv6 address not changing. Amazon Web Services will automatically assign an IPv6 address associated with the ENI attached to your instance to be the primary IPv6 address. Once you enable an IPv6 GUA address to be a primary IPv6, you cannot disable it. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. If you have multiple IPv6 addresses associated with an ENI attached to your instance and you enable a primary IPv6 address, the first IPv6 GUA address associated with the ENI becomes the primary IPv6 address.
Sourcepub fn connection_tracking_specification(
&self,
) -> Option<&ConnectionTrackingSpecificationRequest>
pub fn connection_tracking_specification( &self, ) -> Option<&ConnectionTrackingSpecificationRequest>
A connection tracking specification for the network interface.
Sourcepub fn operator(&self) -> Option<&OperatorRequest>
pub fn operator(&self) -> Option<&OperatorRequest>
Reserved for internal use.
Sourcepub fn subnet_id(&self) -> Option<&str>
pub fn subnet_id(&self) -> Option<&str>
The ID of the subnet to associate with the network interface.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
A description for the network interface.
Sourcepub fn private_ip_address(&self) -> Option<&str>
pub fn private_ip_address(&self) -> Option<&str>
The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses
as primary (only one IP address can be designated as primary).
Sourcepub fn groups(&self) -> &[String]
pub fn groups(&self) -> &[String]
The IDs of the security groups.
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 private_ip_addresses(&self) -> &[PrivateIpAddressSpecification]
pub fn private_ip_addresses(&self) -> &[PrivateIpAddressSpecification]
The private IPv4 addresses.
You can't specify private IPv4 addresses if you've specified one of the following: a count of private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
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 secondary_private_ip_address_count(&self) -> Option<i32>
pub fn secondary_private_ip_address_count(&self) -> Option<i32>
The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses
.
You can't specify a count of private IPv4 addresses if you've specified one of the following: specific private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
Sourcepub fn ipv6_addresses(&self) -> &[InstanceIpv6Address]
pub fn ipv6_addresses(&self) -> &[InstanceIpv6Address]
The IPv6 addresses from the IPv6 CIDR block range of your subnet.
You can't specify IPv6 addresses using this parameter if you've specified one of the following: a count of IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.
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 ipv6_address_count(&self) -> Option<i32>
pub fn ipv6_address_count(&self) -> Option<i32>
The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range.
You can't specify a count of IPv6 addresses using this parameter if you've specified one of the following: specific IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.
If your subnet has the AssignIpv6AddressOnCreation
attribute set, you can override that setting by specifying 0 as the IPv6 address count.
Source§impl CreateNetworkInterfaceInput
impl CreateNetworkInterfaceInput
Sourcepub fn builder() -> CreateNetworkInterfaceInputBuilder
pub fn builder() -> CreateNetworkInterfaceInputBuilder
Creates a new builder-style object to manufacture CreateNetworkInterfaceInput
.
Trait Implementations§
Source§impl Clone for CreateNetworkInterfaceInput
impl Clone for CreateNetworkInterfaceInput
Source§fn clone(&self) -> CreateNetworkInterfaceInput
fn clone(&self) -> CreateNetworkInterfaceInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CreateNetworkInterfaceInput
impl Debug for CreateNetworkInterfaceInput
impl StructuralPartialEq for CreateNetworkInterfaceInput
Auto Trait Implementations§
impl Freeze for CreateNetworkInterfaceInput
impl RefUnwindSafe for CreateNetworkInterfaceInput
impl Send for CreateNetworkInterfaceInput
impl Sync for CreateNetworkInterfaceInput
impl Unpin for CreateNetworkInterfaceInput
impl UnwindSafe for CreateNetworkInterfaceInput
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);