internet_gateways
Creates, updates, deletes or gets an internet_gateway
resource or lists internet_gateways
in a region
Overview
Name | internet_gateways |
Type | Resource |
Description | Allocates an internet gateway for use with a VPC. After creating the Internet gateway, you then attach it to a VPC. |
Id | aws.ec2.internet_gateways |
Fields
Name | Datatype | Description |
---|---|---|
internet_gateway_id | string | |
tags | array | Any tags to assign to the internet gateway. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.internet_gateways (
Tags,
region
)
SELECT
'{{ Tags }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.internet_gateways (
Tags,
region
)
SELECT
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: internet_gateway
props:
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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