Struct aws_sdk_ec2::operation::create_network_interface::builders::CreateNetworkInterfaceFluentBuilder
source · pub struct CreateNetworkInterfaceFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateNetworkInterface
.
Creates a network interface in the specified subnet.
The number of IP addresses you can assign to a network interface varies by instance type. For more information, see IP Addresses Per ENI Per Instance Type in the Amazon Virtual Private Cloud User Guide.
For more information about network interfaces, see Elastic network interfaces in the Amazon Elastic Compute Cloud User Guide.
Implementations§
source§impl CreateNetworkInterfaceFluentBuilder
impl CreateNetworkInterfaceFluentBuilder
sourcepub fn as_input(&self) -> &CreateNetworkInterfaceInputBuilder
pub fn as_input(&self) -> &CreateNetworkInterfaceInputBuilder
Access the CreateNetworkInterface as a reference.
sourcepub async fn send(
self
) -> Result<CreateNetworkInterfaceOutput, SdkError<CreateNetworkInterfaceError, HttpResponse>>
pub async fn send( self ) -> Result<CreateNetworkInterfaceOutput, SdkError<CreateNetworkInterfaceError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<CreateNetworkInterfaceOutput, CreateNetworkInterfaceError>, SdkError<CreateNetworkInterfaceError>>
pub async fn customize( self ) -> Result<CustomizableOperation<CreateNetworkInterfaceOutput, CreateNetworkInterfaceError>, SdkError<CreateNetworkInterfaceError>>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A description for the network interface.
sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A description for the network interface.
sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
A description for the network interface.
sourcepub fn dry_run(self, input: bool) -> Self
pub fn dry_run(self, input: bool) -> Self
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
.
sourcepub fn set_dry_run(self, input: Option<bool>) -> Self
pub fn set_dry_run(self, input: Option<bool>) -> Self
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
.
sourcepub fn get_dry_run(&self) -> &Option<bool>
pub fn get_dry_run(&self) -> &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
.
sourcepub fn groups(self, input: impl Into<String>) -> Self
pub fn groups(self, input: impl Into<String>) -> Self
Appends an item to Groups
.
To override the contents of this collection use set_groups
.
The IDs of one or more security groups.
sourcepub fn set_groups(self, input: Option<Vec<String>>) -> Self
pub fn set_groups(self, input: Option<Vec<String>>) -> Self
The IDs of one or more security groups.
sourcepub fn get_groups(&self) -> &Option<Vec<String>>
pub fn get_groups(&self) -> &Option<Vec<String>>
The IDs of one or more security groups.
sourcepub fn ipv6_address_count(self, input: i32) -> Self
pub fn ipv6_address_count(self, input: i32) -> Self
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.
sourcepub fn set_ipv6_address_count(self, input: Option<i32>) -> Self
pub fn set_ipv6_address_count(self, input: Option<i32>) -> Self
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.
sourcepub fn get_ipv6_address_count(&self) -> &Option<i32>
pub fn get_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.
sourcepub fn ipv6_addresses(self, input: InstanceIpv6Address) -> Self
pub fn ipv6_addresses(self, input: InstanceIpv6Address) -> Self
Appends an item to Ipv6Addresses
.
To override the contents of this collection use set_ipv6_addresses
.
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.
sourcepub fn set_ipv6_addresses(self, input: Option<Vec<InstanceIpv6Address>>) -> Self
pub fn set_ipv6_addresses(self, input: Option<Vec<InstanceIpv6Address>>) -> Self
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.
sourcepub fn get_ipv6_addresses(&self) -> &Option<Vec<InstanceIpv6Address>>
pub fn get_ipv6_addresses(&self) -> &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.
sourcepub fn private_ip_address(self, input: impl Into<String>) -> Self
pub fn private_ip_address(self, input: impl Into<String>) -> Self
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 set_private_ip_address(self, input: Option<String>) -> Self
pub fn set_private_ip_address(self, input: Option<String>) -> Self
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 get_private_ip_address(&self) -> &Option<String>
pub fn get_private_ip_address(&self) -> &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).
sourcepub fn private_ip_addresses(self, input: PrivateIpAddressSpecification) -> Self
pub fn private_ip_addresses(self, input: PrivateIpAddressSpecification) -> Self
Appends an item to PrivateIpAddresses
.
To override the contents of this collection use set_private_ip_addresses
.
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.
sourcepub fn set_private_ip_addresses(
self,
input: Option<Vec<PrivateIpAddressSpecification>>
) -> Self
pub fn set_private_ip_addresses( self, input: Option<Vec<PrivateIpAddressSpecification>> ) -> Self
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.
sourcepub fn get_private_ip_addresses(
&self
) -> &Option<Vec<PrivateIpAddressSpecification>>
pub fn get_private_ip_addresses( &self ) -> &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.
sourcepub fn secondary_private_ip_address_count(self, input: i32) -> Self
pub fn secondary_private_ip_address_count(self, input: i32) -> Self
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 set_secondary_private_ip_address_count(self, input: Option<i32>) -> Self
pub fn set_secondary_private_ip_address_count(self, input: Option<i32>) -> Self
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 get_secondary_private_ip_address_count(&self) -> &Option<i32>
pub fn get_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 ipv4_prefixes(self, input: Ipv4PrefixSpecificationRequest) -> Self
pub fn ipv4_prefixes(self, input: Ipv4PrefixSpecificationRequest) -> Self
Appends an item to Ipv4Prefixes
.
To override the contents of this collection use set_ipv4_prefixes
.
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.
sourcepub fn set_ipv4_prefixes(
self,
input: Option<Vec<Ipv4PrefixSpecificationRequest>>
) -> Self
pub fn set_ipv4_prefixes( self, input: Option<Vec<Ipv4PrefixSpecificationRequest>> ) -> Self
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.
sourcepub fn get_ipv4_prefixes(&self) -> &Option<Vec<Ipv4PrefixSpecificationRequest>>
pub fn get_ipv4_prefixes(&self) -> &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.
sourcepub fn ipv4_prefix_count(self, input: i32) -> Self
pub fn ipv4_prefix_count(self, input: i32) -> Self
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 set_ipv4_prefix_count(self, input: Option<i32>) -> Self
pub fn set_ipv4_prefix_count(self, input: Option<i32>) -> Self
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 get_ipv4_prefix_count(&self) -> &Option<i32>
pub fn get_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, input: Ipv6PrefixSpecificationRequest) -> Self
pub fn ipv6_prefixes(self, input: Ipv6PrefixSpecificationRequest) -> Self
Appends an item to Ipv6Prefixes
.
To override the contents of this collection use set_ipv6_prefixes
.
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.
sourcepub fn set_ipv6_prefixes(
self,
input: Option<Vec<Ipv6PrefixSpecificationRequest>>
) -> Self
pub fn set_ipv6_prefixes( self, input: Option<Vec<Ipv6PrefixSpecificationRequest>> ) -> Self
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.
sourcepub fn get_ipv6_prefixes(&self) -> &Option<Vec<Ipv6PrefixSpecificationRequest>>
pub fn get_ipv6_prefixes(&self) -> &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.
sourcepub fn ipv6_prefix_count(self, input: i32) -> Self
pub fn ipv6_prefix_count(self, input: i32) -> Self
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 set_ipv6_prefix_count(self, input: Option<i32>) -> Self
pub fn set_ipv6_prefix_count(self, input: Option<i32>) -> Self
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 get_ipv6_prefix_count(&self) -> &Option<i32>
pub fn get_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, input: NetworkInterfaceCreationType) -> Self
pub fn interface_type(self, input: NetworkInterfaceCreationType) -> Self
The type of network interface. The default is interface
.
The only supported values are interface
, efa
, and trunk
.
sourcepub fn set_interface_type(
self,
input: Option<NetworkInterfaceCreationType>
) -> Self
pub fn set_interface_type( self, input: Option<NetworkInterfaceCreationType> ) -> Self
The type of network interface. The default is interface
.
The only supported values are interface
, efa
, and trunk
.
sourcepub fn get_interface_type(&self) -> &Option<NetworkInterfaceCreationType>
pub fn get_interface_type(&self) -> &Option<NetworkInterfaceCreationType>
The type of network interface. The default is interface
.
The only supported values are interface
, efa
, and trunk
.
sourcepub fn subnet_id(self, input: impl Into<String>) -> Self
pub fn subnet_id(self, input: impl Into<String>) -> Self
The ID of the subnet to associate with the network interface.
sourcepub fn set_subnet_id(self, input: Option<String>) -> Self
pub fn set_subnet_id(self, input: Option<String>) -> Self
The ID of the subnet to associate with the network interface.
sourcepub fn get_subnet_id(&self) -> &Option<String>
pub fn get_subnet_id(&self) -> &Option<String>
The ID of the subnet to associate with the network interface.
sourcepub fn tag_specifications(self, input: TagSpecification) -> Self
pub fn tag_specifications(self, input: TagSpecification) -> Self
Appends an item to TagSpecifications
.
To override the contents of this collection use set_tag_specifications
.
The tags to apply to the new network interface.
sourcepub fn set_tag_specifications(
self,
input: Option<Vec<TagSpecification>>
) -> Self
pub fn set_tag_specifications( self, input: Option<Vec<TagSpecification>> ) -> Self
The tags to apply to the new network interface.
sourcepub fn get_tag_specifications(&self) -> &Option<Vec<TagSpecification>>
pub fn get_tag_specifications(&self) -> &Option<Vec<TagSpecification>>
The tags to apply to the new network interface.
sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
sourcepub fn set_client_token(self, input: Option<String>) -> Self
pub fn set_client_token(self, input: Option<String>) -> Self
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
sourcepub fn get_client_token(&self) -> &Option<String>
pub fn get_client_token(&self) -> &Option<String>
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
Trait Implementations§
source§impl Clone for CreateNetworkInterfaceFluentBuilder
impl Clone for CreateNetworkInterfaceFluentBuilder
source§fn clone(&self) -> CreateNetworkInterfaceFluentBuilder
fn clone(&self) -> CreateNetworkInterfaceFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more