network_interfaces
Creates, updates, deletes, gets or lists a network_interfaces resource.
Overview
| Name | network_interfaces |
| Type | Resource |
| Id | aws.ec2.network_interfaces |
Fields
The following fields are returned by SELECT queries:
- describe_network_interfaces
| Name | Datatype | Description |
|---|---|---|
associated_subnets | string | The subnets associated with this network interface. |
association | string | The association information for an Elastic IP address (IPv4) associated with the network interface. |
attachment | string | The network interface attachment. |
availability_zone | string | The Availability Zone. |
availability_zone_id | string | The ID of the Availability Zone. |
connection_tracking_configuration | string | 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. |
deny_all_igw_traffic | boolean | 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. |
description | string | A description. |
groups | string | Any security groups for the network interface. |
interface_type | string | The type of network interface. |
ipv_4_prefixes | string | The IPv4 prefixes that are assigned to the network interface. |
ipv_6_address | string | The IPv6 globally unique address associated with the network interface. |
ipv_6_addresses | string | The IPv6 addresses associated with the network interface. |
ipv_6_native | boolean | Indicates whether this is an IPv6 only network interface. |
ipv_6_prefixes | string | The IPv6 prefixes that are assigned to the network interface. |
mac_address | string | The MAC address. |
network_interface_id | string | The ID of the network interface. |
operator | string | The service provider that manages the network interface. |
outpost_arn | string | The Amazon Resource Name (ARN) of the Outpost. |
owner_id | string | The Amazon Web Services account ID of the owner of the network interface. |
private_dns_name | string | The private hostname. For more information, see EC2 instance hostnames, DNS names, and domains in the Amazon EC2 User Guide. |
private_ip_address | string | The IPv4 address of the network interface within the subnet. |
private_ip_addresses | string | The private IPv4 addresses associated with the network interface. |
public_dns_name | 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 | string | Public hostname type options. For more information, see EC2 instance hostnames, DNS names, and domains in the Amazon EC2 User Guide. |
requester_id | string | The alias or Amazon Web Services account ID of the principal or service that created the network interface. |
requester_managed | boolean | Indicates whether the network interface is being managed by Amazon Web Services. |
source_dest_check | boolean | Indicates whether source/destination checking is enabled. |
status | string | The status of the network interface. |
subnet_id | string | The ID of the subnet. |
tag_set | string | Any tags assigned to the network interface. |
vpc_id | string | The ID of the VPC. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_network_interfaces | select | region | NextToken, MaxResults, IncludeManagedResources, DryRun, NetworkInterfaceId, Filter | Describes the specified network interfaces or all your network interfaces. If you have a large number of network interfaces, the operation fails unless you use pagination or one of the following filters: group-id, mac-address, private-dns-name, private-ip-address, subnet-id, or vpc-id. We strongly recommend using only paginated requests. Unpaginated requests are susceptible to throttling and timeouts. |
create_network_interface | insert | SubnetId, region | Ipv4Prefix, Ipv4PrefixCount, Ipv6Prefix, Ipv6PrefixCount, InterfaceType, TagSpecification, ClientToken, EnablePrimaryIpv6, ConnectionTrackingSpecification, Operator, Description, PrivateIpAddress, SecurityGroupId, PrivateIpAddresses, SecondaryPrivateIpAddressCount, Ipv6Addresses, Ipv6AddressCount, DryRun | 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 about network interfaces, see Elastic network interfaces in the Amazon EC2 User Guide. |
attach_network_interface | update | NetworkInterfaceId, InstanceId, DeviceIndex, region | NetworkCardIndex, EnaSrdSpecification, EnaQueueCount, DryRun | Attaches a network interface to an instance. |
modify_public_ip_dns_name_options | update | NetworkInterfaceId, HostnameType, region | DryRun | Modify public hostname options for a network interface. For more information, see EC2 instance hostnames, DNS names, and domains in the Amazon EC2 User Guide. |
detach_network_interface | update | AttachmentId, region | DryRun, Force | Detaches a network interface from an instance. |
delete_network_interface | delete | NetworkInterfaceId, region | DryRun | Deletes the specified network interface. You must detach the network interface before you can delete it. |
reset_network_interface_attribute | exec | NetworkInterfaceId, region | DryRun, SourceDestCheck | Resets a network interface attribute. You can specify only one attribute at a time. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
AttachmentId | string | The ID of the attachment. |
DeviceIndex | integer | The index of the device for the network interface attachment. |
HostnameType | string | The public hostname type. For more information, see EC2 instance hostnames, DNS names, and domains in the Amazon EC2 User Guide. public-dual-stack-dns-name: A dual-stack public hostname for a network interface. Requests from within the VPC resolve to both the private IPv4 address and the IPv6 Global Unicast Address of the network interface. Requests from the internet resolve to both the public IPv4 and the IPv6 GUA address of the network interface. public-ipv4-dns-name: An IPv4-enabled public hostname for a network interface. Requests from within the VPC resolve to the private primary IPv4 address of the network interface. Requests from the internet resolve to the public IPv4 address of the network interface. public-ipv6-dns-name: An IPv6-enabled public hostname for a network interface. Requests from within the VPC or from the internet resolve to the IPv6 GUA of the network interface. |
InstanceId | string | The ID of the instance. |
NetworkInterfaceId | string | The ID of the network interface. |
SubnetId | string | The ID of the subnet to associate with the network interface. |
region | string | AWS region (default: us-east-1) |
ClientToken | string | Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency. |
ConnectionTrackingSpecification | object | A connection tracking specification for the network interface. |
Description | string | A description for the network interface. |
DryRun | boolean | 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. |
EnaQueueCount | integer | The number of ENA queues to be created with the instance. |
EnaSrdSpecification | object | Configures ENA Express for the network interface that this action attaches to the instance. |
EnablePrimaryIpv6 | boolean | 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. |
Filter | array | One or more filters. association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. association.association-id - The association ID returned when the network interface was associated with an IPv4 address. addresses.association.owner-id - The owner ID of the addresses associated with the network interface. addresses.association.public-ip - The association ID returned when the network interface was associated with the Elastic IP address (IPv4). addresses.primary - Whether the private IPv4 address is the primary IP address associated with the network interface. addresses.private-ip-address - The private IPv4 addresses associated with the network interface. association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface. association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface. association.public-dns-name - The public DNS name for the network interface (IPv4). attachment.attach-time - The time that the network interface was attached to an instance. attachment.attachment-id - The ID of the interface attachment. attachment.delete-on-termination - Indicates whether the attachment is deleted when an instance is terminated. attachment.device-index - The device index to which the network interface is attached. attachment.instance-id - The ID of the instance to which the network interface is attached. attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached. attachment.status - The status of the attachment (attaching | attached | detaching | detached). availability-zone - The Availability Zone of the network interface. availability-zone-id - The ID of the Availability Zone of the network interface. description - The description of the network interface. group-id - The ID of a security group associated with the network interface. ipv6-addresses.ipv6-address - An IPv6 address associated with the network interface. interface-type - The type of network interface (api_gateway_managed | aws_codestar_connections_managed | branch | ec2_instance_connect_endpoint | efa | efa-only | efs | evs | gateway_load_balancer | gateway_load_balancer_endpoint | global_accelerator_managed | interface | iot_rules_managed | lambda | load_balancer | nat_gateway | network_load_balancer | quicksight | transit_gateway | trunk | vpc_endpoint). mac-address - The MAC address of the network interface. network-interface-id - The ID of the network interface. operator.managed - A Boolean that indicates whether this is a managed network interface. operator.principal - The principal that manages the network interface. Only valid for managed network interfaces, where managed is true. owner-id - The Amazon Web Services account ID of the network interface owner. private-dns-name - The private DNS name of the network interface (IPv4). private-ip-address - The private IPv4 address or addresses of the network interface. requester-id - The alias or Amazon Web Services account ID of the principal or service that created the network interface. requester-managed - Indicates whether the network interface is being managed by an Amazon Web Services service (for example, Amazon Web Services Management Console, Auto Scaling, and so on). source-dest-check - Indicates whether the network interface performs source/destination checking. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC. status - The status of the network interface. If the network interface is not attached to an instance, the status is available; if a network interface is attached to an instance the status is in-use. subnet-id - The ID of the subnet for the network interface. tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value. tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value. vpc-id - The ID of the VPC for the network interface. |
Force | boolean | Specifies whether to force a detachment. Use the Force parameter only as a last resort to detach a network interface from a failed instance. If you use the Force parameter to detach a network interface, you might not be able to attach a different network interface to the same index on the instance without first stopping and starting the instance. If you force the detachment of a network interface, the instance metadata might not get updated. This means that the attributes associated with the detached network interface might still be visible. The instance metadata will get updated when you stop and start the instance. |
IncludeManagedResources | boolean | Indicates whether to include managed resources in the output. If this parameter is set to true, the output includes resources that are managed by Amazon Web Services services, even if managed resource visibility is set to hidden. |
InterfaceType | string | 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. |
Ipv4Prefix | array | 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. |
Ipv4PrefixCount | integer | 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. |
Ipv6AddressCount | integer | 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. |
Ipv6Addresses | array | 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. |
Ipv6Prefix | array | 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. |
Ipv6PrefixCount | integer | 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. |
MaxResults | integer | The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. You cannot specify this parameter and the network interface IDs parameter in the same request. For more information, see Pagination. |
NetworkCardIndex | integer | The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0. |
NetworkInterfaceId | array | The network interface IDs. Default: Describes all your network interfaces. |
NextToken | string | The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request. |
Operator | object | Reserved for internal use. |
PrivateIpAddress | 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). |
PrivateIpAddresses | array | 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. |
SecondaryPrivateIpAddressCount | integer | 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. |
SecurityGroupId | array | The IDs of the security groups. |
SourceDestCheck | string | The source/destination checking attribute. Resets the value to true. |
TagSpecification | array | The tags to apply to the new network interface. |
SELECT examples
- describe_network_interfaces
Describes the specified network interfaces or all your network interfaces. If you have a large number of network interfaces, the operation fails unless you use pagination or one of the following filters: group-id, mac-address, private-dns-name, private-ip-address, subnet-id, or vpc-id. We strongly recommend using only paginated requests. Unpaginated requests are susceptible to throttling and timeouts.
SELECT
associated_subnets,
association,
attachment,
availability_zone,
availability_zone_id,
connection_tracking_configuration,
deny_all_igw_traffic,
description,
groups,
interface_type,
ipv_4_prefixes,
ipv_6_address,
ipv_6_addresses,
ipv_6_native,
ipv_6_prefixes,
mac_address,
network_interface_id,
operator,
outpost_arn,
owner_id,
private_dns_name,
private_ip_address,
private_ip_addresses,
public_dns_name,
public_ip_dns_name_options,
requester_id,
requester_managed,
source_dest_check,
status,
subnet_id,
tag_set,
vpc_id
FROM aws.ec2.network_interfaces
WHERE region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND IncludeManagedResources = '{{ IncludeManagedResources }}'
AND DryRun = '{{ DryRun }}'
AND NetworkInterfaceId = '{{ NetworkInterfaceId }}'
AND Filter = '{{ Filter }}'
;
INSERT examples
- create_network_interface
- Manifest
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 about network interfaces, see Elastic network interfaces in the Amazon EC2 User Guide.
INSERT INTO aws.ec2.network_interfaces (
SubnetId,
region,
Ipv4Prefix,
Ipv4PrefixCount,
Ipv6Prefix,
Ipv6PrefixCount,
InterfaceType,
TagSpecification,
ClientToken,
EnablePrimaryIpv6,
ConnectionTrackingSpecification,
Operator,
Description,
PrivateIpAddress,
SecurityGroupId,
PrivateIpAddresses,
SecondaryPrivateIpAddressCount,
Ipv6Addresses,
Ipv6AddressCount,
DryRun
)
SELECT
'{{ SubnetId }}',
'{{ region }}',
'{{ Ipv4Prefix }}',
'{{ Ipv4PrefixCount }}',
'{{ Ipv6Prefix }}',
'{{ Ipv6PrefixCount }}',
'{{ InterfaceType }}',
'{{ TagSpecification }}',
'{{ ClientToken }}',
'{{ EnablePrimaryIpv6 }}',
'{{ ConnectionTrackingSpecification }}',
'{{ Operator }}',
'{{ Description }}',
'{{ PrivateIpAddress }}',
'{{ SecurityGroupId }}',
'{{ PrivateIpAddresses }}',
'{{ SecondaryPrivateIpAddressCount }}',
'{{ Ipv6Addresses }}',
'{{ Ipv6AddressCount }}',
'{{ DryRun }}'
RETURNING
associated_subnets,
association,
attachment,
availability_zone,
availability_zone_id,
connection_tracking_configuration,
deny_all_igw_traffic,
description,
groups,
interface_type,
ipv_4_prefixes,
ipv_6_address,
ipv_6_addresses,
ipv_6_native,
ipv_6_prefixes,
mac_address,
network_interface_id,
operator,
outpost_arn,
owner_id,
private_dns_name,
private_ip_address,
private_ip_addresses,
public_dns_name,
public_ip_dns_name_options,
requester_id,
requester_managed,
source_dest_check,
status,
subnet_id,
tag_set,
vpc_id
;
# Description fields are for documentation purposes
- name: network_interfaces
props:
- name: SubnetId
value: "{{ SubnetId }}"
description: Required parameter for the network_interfaces resource.
- name: region
value: "{{ region }}"
description: Required parameter for the network_interfaces resource.
- name: Ipv4Prefix
value: "{{ Ipv4Prefix }}"
description: 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.
description: 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.
- name: Ipv4PrefixCount
value: {{ Ipv4PrefixCount }}
description: 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.
description: 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.
- name: Ipv6Prefix
value: "{{ Ipv6Prefix }}"
description: 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.
description: 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.
- name: Ipv6PrefixCount
value: {{ Ipv6PrefixCount }}
description: 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.
description: 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.
- name: InterfaceType
value: "{{ InterfaceType }}"
description: 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.
description: 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.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to apply to the new network interface.
description: The tags to apply to the new network interface.
- name: ClientToken
value: "{{ ClientToken }}"
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
- name: EnablePrimaryIpv6
value: {{ EnablePrimaryIpv6 }}
description: 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.
description: 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.
- name: ConnectionTrackingSpecification
value: "{{ ConnectionTrackingSpecification }}"
description: A connection tracking specification for the network interface.
description: A connection tracking specification for the network interface.
- name: Operator
value: "{{ Operator }}"
description: Reserved for internal use.
description: Reserved for internal use.
- name: Description
value: "{{ Description }}"
description: A description for the network interface.
description: A description for the network interface.
- name: PrivateIpAddress
value: "{{ PrivateIpAddress }}"
description: 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).
description: 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).
- name: SecurityGroupId
value: "{{ SecurityGroupId }}"
description: The IDs of the security groups.
description: The IDs of the security groups.
- name: PrivateIpAddresses
value: "{{ PrivateIpAddresses }}"
description: 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.
description: 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.
- name: SecondaryPrivateIpAddressCount
value: {{ SecondaryPrivateIpAddressCount }}
description: 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.
description: 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.
- name: Ipv6Addresses
value: "{{ Ipv6Addresses }}"
description: 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.
description: 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.
- name: Ipv6AddressCount
value: {{ Ipv6AddressCount }}
description: 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.
description: 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.
- name: DryRun
value: {{ DryRun }}
description: 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.
description: 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.
UPDATE examples
- attach_network_interface
- modify_public_ip_dns_name_options
- detach_network_interface
Attaches a network interface to an instance.
UPDATE aws.ec2.network_interfaces
SET
-- No updatable properties
WHERE
NetworkInterfaceId = '{{ NetworkInterfaceId }}' --required
AND InstanceId = '{{ InstanceId }}' --required
AND DeviceIndex = '{{ DeviceIndex }}' --required
AND region = '{{ region }}' --required
AND NetworkCardIndex = '{{ NetworkCardIndex}}'
AND EnaSrdSpecification = '{{ EnaSrdSpecification}}'
AND EnaQueueCount = '{{ EnaQueueCount}}'
AND DryRun = {{ DryRun}}
RETURNING
attachment_id,
network_card_index;
Modify public hostname options for a network interface. For more information, see EC2 instance hostnames, DNS names, and domains in the Amazon EC2 User Guide.
UPDATE aws.ec2.network_interfaces
SET
-- No updatable properties
WHERE
NetworkInterfaceId = '{{ NetworkInterfaceId }}' --required
AND HostnameType = '{{ HostnameType }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
RETURNING
successful;
Detaches a network interface from an instance.
UPDATE aws.ec2.network_interfaces
SET
-- No updatable properties
WHERE
AttachmentId = '{{ AttachmentId }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND Force = {{ Force}};
DELETE examples
- delete_network_interface
Deletes the specified network interface. You must detach the network interface before you can delete it.
DELETE FROM aws.ec2.network_interfaces
WHERE NetworkInterfaceId = '{{ NetworkInterfaceId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;
Lifecycle Methods
- reset_network_interface_attribute
Resets a network interface attribute. You can specify only one attribute at a time.
EXEC aws.ec2.network_interfaces.reset_network_interface_attribute
@NetworkInterfaceId='{{ NetworkInterfaceId }}' --required,
@region='{{ region }}' --required,
@DryRun={{ DryRun }},
@SourceDestCheck='{{ SourceDestCheck }}'
;