Skip to main content

vpc_gateway_attachments

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

Overview

Namevpc_gateway_attachments
TypeResource
DescriptionResource Type definition for AWS::EC2::VPCGatewayAttachment
Idaws.ec2.vpc_gateway_attachments

Fields

NameDatatypeDescription
attachment_typestringUsed to identify if this resource is an Internet Gateway or Vpn Gateway Attachment
vpc_idstringThe ID of the VPC.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTVpcId, region
delete_resourceDELETEdata__Identifier, region
list_resourceSELECTregion

SELECT Example

SELECT
region,
attachment_type,
vpc_id
FROM aws.ec2.vpc_gateway_attachments
WHERE region = 'us-east-1';

INSERT Example

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

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

DELETE Example

/*+ delete */
DELETE FROM aws.ec2.vpc_gateway_attachments
WHERE data__Identifier = '<AttachmentType|VpcId>'
AND region = 'us-east-1';

Permissions

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

Create

ec2:AttachInternetGateway,
ec2:AttachVpnGateway,
ec2:DescribeInternetGateways,
ec2:DescribeVpnGateways

Delete

ec2:DetachInternetGateway,
ec2:DetachVpnGateway,
ec2:DescribeInternetGateways,
ec2:DescribeVpnGateways

List

ec2:DescribeInternetGateways,
ec2:DescribeVpnGateways