network_interface_attachments
Used to retrieve a list of network_interface_attachments
in a region or to create or delete a network_interface_attachments
resource, use network_interface_attachment
to read or update an individual resource.
Overview
Name | network_interface_attachments |
Type | Resource |
Description | Resource Type definition for AWS::EC2::NetworkInterfaceAttachment |
Id | aws.ec2.network_interface_attachments |
Fields
Name | Datatype | Description |
---|---|---|
attachment_id | string | The ID of the network interface attachment. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DeviceIndex, InstanceId, NetworkInterfaceId, region |
delete_resource | DELETE | data__Identifier, region |
list_resource | SELECT | region |
SELECT
Example
SELECT
region,
attachment_id
FROM aws.ec2.network_interface_attachments
WHERE region = 'us-east-1';
INSERT
Example
Use the following StackQL query and manifest file to create a new network_interface_attachment
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.network_interface_attachments (
DeviceIndex,
InstanceId,
NetworkInterfaceId,
region
)
SELECT
'{{ DeviceIndex }}',
'{{ InstanceId }}',
'{{ NetworkInterfaceId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.network_interface_attachments (
DeleteOnTermination,
DeviceIndex,
InstanceId,
NetworkInterfaceId,
EnaSrdSpecification,
region
)
SELECT
'{{ DeleteOnTermination }}',
'{{ DeviceIndex }}',
'{{ InstanceId }}',
'{{ NetworkInterfaceId }}',
'{{ EnaSrdSpecification }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: network_interface_attachment
props:
- name: DeleteOnTermination
value: '{{ DeleteOnTermination }}'
- name: DeviceIndex
value: '{{ DeviceIndex }}'
- name: InstanceId
value: '{{ InstanceId }}'
- name: NetworkInterfaceId
value: '{{ NetworkInterfaceId }}'
- name: EnaSrdSpecification
value:
EnaSrdEnabled: '{{ EnaSrdEnabled }}'
EnaSrdUdpSpecification:
EnaSrdUdpEnabled: '{{ EnaSrdUdpEnabled }}'
DELETE
Example
/*+ delete */
DELETE FROM aws.ec2.network_interface_attachments
WHERE data__Identifier = '<AttachmentId>'
AND region = 'us-east-1';
Permissions
To operate on the network_interface_attachments
resource, the following permissions are required:
Create
ec2:AttachNetworkInterface,
ec2:DescribeNetworkInterfaces,
ec2:ModifyNetworkInterfaceAttribute
List
ec2:DescribeNetworkInterfaces
Delete
ec2:DetachNetworkInterface,
ec2:DescribeNetworkInterfaces