Skip to main content

eips

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

Overview

Nameeips
TypeResource
DescriptionSpecifies an Elastic IP (EIP) address and can, optionally, associate it with an Amazon EC2 instance.<br/> You can allocate an Elastic IP address from an address pool owned by AWS or from an address pool created from a public IPv4 address range that you have brought to AWS for use with your AWS resources using bring your own IP addresses (BYOIP). For more information, see [Bring Your Own IP Addresses (BYOIP)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) in the *Amazon EC2 User Guide*.<br/> For more information, see [Elastic IP Addresses](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) in the *Amazon EC2 User Guide*.
Idaws.ec2.eips

Fields

NameDatatypeDescription
public_ipstring
allocation_idstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
list_resourceSELECTregion

SELECT Example

SELECT
region,
public_ip,
allocation_id
FROM aws.ec2.eips
WHERE region = 'us-east-1';

INSERT Example

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

/*+ create */
INSERT INTO aws.ec2.eips (
Domain,
NetworkBorderGroup,
TransferAddress,
InstanceId,
PublicIpv4Pool,
Tags,
region
)
SELECT
'{{ Domain }}',
'{{ NetworkBorderGroup }}',
'{{ TransferAddress }}',
'{{ InstanceId }}',
'{{ PublicIpv4Pool }}',
'{{ Tags }}',
'{{ region }}';

DELETE Example

/*+ delete */
DELETE FROM aws.ec2.eips
WHERE data__Identifier = '<PublicIp|AllocationId>'
AND region = 'us-east-1';

Permissions

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

Create

ec2:AllocateAddress,
ec2:AcceptAddressTransfer,
ec2:DescribeAddresses,
ec2:AssociateAddress,
ec2:CreateTags

Delete

ec2:ReleaseAddress,
ec2:DescribeAddresses,
ec2:DisassociateAddress

List

ec2:DescribeAddresses