Skip to main content

eip_associations

Used to retrieve a list of eip_associations in a region or to create or delete a eip_associations resource, use eip_association to read or update an individual resource.

Overview

Nameeip_associations
TypeResource
DescriptionResource schema for EC2 EIP association.
Idaws.ec2.eip_associations

Fields

NameDatatypeDescription
idstringComposite ID of non-empty properties, to determine the identification.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
list_resourceSELECTregion

SELECT Example

SELECT
region,
id
FROM aws.ec2.eip_associations
WHERE region = 'us-east-1';

INSERT Example

Use the following StackQL query and manifest file to create a new eip_association resource, using stack-deploy.

/*+ create */
INSERT INTO aws.ec2.eip_associations (
AllocationId,
NetworkInterfaceId,
InstanceId,
PrivateIpAddress,
EIP,
region
)
SELECT
'{{ AllocationId }}',
'{{ NetworkInterfaceId }}',
'{{ InstanceId }}',
'{{ PrivateIpAddress }}',
'{{ EIP }}',
'{{ region }}';

DELETE Example

/*+ delete */
DELETE FROM aws.ec2.eip_associations
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

To operate on the eip_associations resource, the following permissions are required:

Create

ec2:DescribeAddresses,
ec2:AssociateAddress

Delete

ec2:DisassociateAddress,
ec2:DescribeAddresses

List

ec2:DescribeAddresses