Skip to main content

local_gateway_route_table_vpc_associations

Creates, updates, deletes, gets or lists a local_gateway_route_table_vpc_associations resource.

Overview

Namelocal_gateway_route_table_vpc_associations
TypeResource
Idaws.ec2.local_gateway_route_table_vpc_associations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
local_gateway_idstringThe ID of the local gateway.
local_gateway_route_table_arnstringThe Amazon Resource Name (ARN) of the local gateway route table for the association.
local_gateway_route_table_idstringThe ID of the local gateway route table.
local_gateway_route_table_vpc_association_idstringThe ID of the association.
owner_idstringThe ID of the Amazon Web Services account that owns the local gateway route table for the association.
statestringThe state of the association.
tagsstringThe tags assigned to the association.
vpc_idstringThe ID of the VPC.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_local_gateway_route_table_vpc_associationsselectregionLocalGatewayRouteTableVpcAssociationId, Filter, MaxResults, NextToken, DryRunDescribes the specified associations between VPCs and local gateway route tables.
create_local_gateway_route_table_vpc_associationinsertLocalGatewayRouteTableId, VpcId, regionTagSpecification, DryRunAssociates the specified VPC with the specified local gateway route table.
delete_local_gateway_route_table_vpc_associationdeleteLocalGatewayRouteTableVpcAssociationId, regionDryRunDeletes the specified association between a VPC and local gateway route table.

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
LocalGatewayRouteTableIdstringThe ID of the local gateway route table.
LocalGatewayRouteTableVpcAssociationIdstringThe ID of the association.
VpcIdstringThe ID of the VPC.
regionstringAWS region (default: us-east-1)
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.
FilterarrayOne or more filters. local-gateway-id - The ID of a local gateway. local-gateway-route-table-arn - The Amazon Resource Name (ARN) of the local gateway route table for the association. local-gateway-route-table-id - The ID of the local gateway route table. local-gateway-route-table-vpc-association-id - The ID of the association. owner-id - The ID of the Amazon Web Services account that owns the local gateway route table for the association. state - The state of the association. vpc-id - The ID of the VPC.
LocalGatewayRouteTableVpcAssociationIdarrayThe IDs of the associations.
MaxResultsintegerThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
NextTokenstringThe token for the next page of results.
TagSpecificationarrayThe tags to assign to the local gateway route table VPC association.

SELECT examples

Describes the specified associations between VPCs and local gateway route tables.

SELECT
local_gateway_id,
local_gateway_route_table_arn,
local_gateway_route_table_id,
local_gateway_route_table_vpc_association_id,
owner_id,
state,
tags,
vpc_id
FROM aws.ec2.local_gateway_route_table_vpc_associations
WHERE region = '{{ region }}' -- required
AND LocalGatewayRouteTableVpcAssociationId = '{{ LocalGatewayRouteTableVpcAssociationId }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
;

INSERT examples

Associates the specified VPC with the specified local gateway route table.

INSERT INTO aws.ec2.local_gateway_route_table_vpc_associations (
LocalGatewayRouteTableId,
VpcId,
region,
TagSpecification,
DryRun
)
SELECT
'{{ LocalGatewayRouteTableId }}',
'{{ VpcId }}',
'{{ region }}',
'{{ TagSpecification }}',
'{{ DryRun }}'
RETURNING
local_gateway_id,
local_gateway_route_table_arn,
local_gateway_route_table_id,
local_gateway_route_table_vpc_association_id,
owner_id,
state,
tags,
vpc_id
;

DELETE examples

Deletes the specified association between a VPC and local gateway route table.

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