Skip to main content

egress_only_internet_gateways

Creates, updates, deletes, gets or lists an egress_only_internet_gateways resource.

Overview

Nameegress_only_internet_gateways
TypeResource
Idaws.ec2.egress_only_internet_gateways

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
attachmentsstringInformation about the attachment of the egress-only internet gateway.
egress_only_internet_gateway_idstringThe ID of the egress-only internet gateway.
tagsstringThe tags assigned to the egress-only internet gateway.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_egress_only_internet_gatewaysselectregionDryRun, EgressOnlyInternetGatewayId, MaxResults, NextToken, FilterDescribes your egress-only internet gateways. The default is to describe all your egress-only internet gateways. Alternatively, you can specify specific egress-only internet gateway IDs or filter the results to include only the egress-only internet gateways that match specific criteria.
create_egress_only_internet_gatewayinsertVpcId, regionClientToken, DryRun, TagSpecification[IPv6 only] Creates an egress-only internet gateway for your VPC. An egress-only internet gateway is used to enable outbound communication over IPv6 from instances in your VPC to the internet, and prevents hosts outside of your VPC from initiating an IPv6 connection with your instance.
delete_egress_only_internet_gatewaydeleteEgressOnlyInternetGatewayId, regionDryRunDeletes an egress-only internet gateway.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
EgressOnlyInternetGatewayIdstringThe ID of the egress-only internet gateway.
VpcIdstringThe ID of the VPC for which to create the egress-only internet gateway.
regionstringAWS region (default: us-east-1)
ClientTokenstringUnique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
DryRunbooleanChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
EgressOnlyInternetGatewayIdarrayThe IDs of the egress-only internet gateways.
FilterarrayThe filters. tag - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value. tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
MaxResultsintegerThe maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
NextTokenstringThe token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.
TagSpecificationarrayThe tags to assign to the egress-only internet gateway.

SELECT examples

Describes your egress-only internet gateways. The default is to describe all your egress-only internet gateways. Alternatively, you can specify specific egress-only internet gateway IDs or filter the results to include only the egress-only internet gateways that match specific criteria.

SELECT
attachments,
egress_only_internet_gateway_id,
tags
FROM aws.ec2.egress_only_internet_gateways
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND EgressOnlyInternetGatewayId = '{{ EgressOnlyInternetGatewayId }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND Filter = '{{ Filter }}'
;

INSERT examples

[IPv6 only] Creates an egress-only internet gateway for your VPC. An egress-only internet gateway is used to enable outbound communication over IPv6 from instances in your VPC to the internet, and prevents hosts outside of your VPC from initiating an IPv6 connection with your instance.

INSERT INTO aws.ec2.egress_only_internet_gateways (
VpcId,
region,
ClientToken,
DryRun,
TagSpecification
)
SELECT
'{{ VpcId }}',
'{{ region }}',
'{{ ClientToken }}',
'{{ DryRun }}',
'{{ TagSpecification }}'
RETURNING
attachments,
egress_only_internet_gateway_id,
tags
;

DELETE examples

Deletes an egress-only internet gateway.

DELETE FROM aws.ec2.egress_only_internet_gateways
WHERE EgressOnlyInternetGatewayId = '{{ EgressOnlyInternetGatewayId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;