Skip to main content

internet_gateways

Creates, updates, deletes or gets an internet_gateway resource or lists internet_gateways in a region

Overview

Nameinternet_gateways
TypeResource
DescriptionAllocates an internet gateway for use with a VPC. After creating the Internet gateway, you then attach it to a VPC.
Idaws.ec2.internet_gateways

Fields

NameDatatypeDescription
internet_gateway_idstring
tagsarrayAny tags to assign to the internet gateway.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all internet_gateways in a region.

SELECT
region,
internet_gateway_id,
tags
FROM aws.ec2.internet_gateways
WHERE region = 'us-east-1';

Gets all properties from an individual internet_gateway.

SELECT
region,
internet_gateway_id,
tags
FROM aws.ec2.internet_gateways
WHERE region = 'us-east-1' AND data__Identifier = '<InternetGatewayId>';

INSERT example

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

/*+ create */
INSERT INTO aws.ec2.internet_gateways (
Tags,
region
)
SELECT
'{{ Tags }}',
'{{ region }}';

DELETE example

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

Permissions

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

Create

ec2:CreateInternetGateway,
ec2:CreateTags,
ec2:DescribeInternetGateways

Read

ec2:DescribeInternetGateways

Delete

ec2:DeleteInternetGateway,
ec2:DescribeInternetGateways

Update

ec2:DeleteTags,
ec2:CreateTags,
ec2:DescribeInternetGateways

List

ec2:DescribeInternetGateways