local_gateway_routes
Creates, updates, deletes, gets or lists a local_gateway_routes resource.
Overview
| Name | local_gateway_routes |
| Type | Resource |
| Id | aws.ec2.local_gateway_routes |
Fields
The following fields are returned by SELECT queries:
- search_local_gateway_routes
| Name | Datatype | Description |
|---|---|---|
coip_pool_id | string | The ID of the customer-owned address pool. |
destination_cidr_block | string | The CIDR block used for destination matches. |
destination_prefix_list_id | string | The ID of the prefix list. |
local_gateway_route_table_arn | string | The Amazon Resource Name (ARN) of the local gateway route table. |
local_gateway_route_table_id | string | The ID of the local gateway route table. |
local_gateway_virtual_interface_group_id | string | The ID of the virtual interface group. |
network_interface_id | string | The ID of the network interface. |
owner_id | string | The ID of the Amazon Web Services account that owns the local gateway route. |
state | string | The state of the route. |
subnet_id | string | The ID of the subnet. |
type | string | The route type. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
search_local_gateway_routes | select | LocalGatewayRouteTableId, region | Filter, MaxResults, NextToken, DryRun | Searches for routes in the specified local gateway route table. |
create_local_gateway_route | insert | LocalGatewayRouteTableId, region | DestinationCidrBlock, LocalGatewayVirtualInterfaceGroupId, DryRun, NetworkInterfaceId, DestinationPrefixListId | Creates a static route for the specified local gateway route table. You must specify one of the following targets: LocalGatewayVirtualInterfaceGroupId NetworkInterfaceId |
modify_local_gateway_route | update | LocalGatewayRouteTableId, region | DestinationCidrBlock, LocalGatewayVirtualInterfaceGroupId, NetworkInterfaceId, DryRun, DestinationPrefixListId | Modifies the specified local gateway route. |
delete_local_gateway_route | delete | LocalGatewayRouteTableId, region | DestinationCidrBlock, DryRun, DestinationPrefixListId | Deletes the specified route from the specified 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.
| Name | Datatype | Description |
|---|---|---|
LocalGatewayRouteTableId | string | The ID of the local gateway route table. |
region | string | AWS region (default: us-east-1) |
DestinationCidrBlock | string | The CIDR range for the route. This must match the CIDR for the route exactly. |
DestinationPrefixListId | string | Use a prefix list in place of DestinationCidrBlock. You cannot use DestinationPrefixListId and DestinationCidrBlock in the same request. |
DryRun | boolean | Checks 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. |
Filter | array | One or more filters. prefix-list-id - The ID of the prefix list. route-search.exact-match - The exact match of the specified filter. route-search.longest-prefix-match - The longest prefix that matches the route. route-search.subnet-of-match - The routes with a subnet that match the specified CIDR filter. route-search.supernet-of-match - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29. state - The state of the route. type - The route type. |
LocalGatewayVirtualInterfaceGroupId | string | The ID of the virtual interface group. |
MaxResults | integer | The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. |
NetworkInterfaceId | string | The ID of the network interface. |
NextToken | string | The token for the next page of results. |
SELECT examples
- search_local_gateway_routes
Searches for routes in the specified local gateway route table.
SELECT
coip_pool_id,
destination_cidr_block,
destination_prefix_list_id,
local_gateway_route_table_arn,
local_gateway_route_table_id,
local_gateway_virtual_interface_group_id,
network_interface_id,
owner_id,
state,
subnet_id,
type
FROM aws.ec2.local_gateway_routes
WHERE LocalGatewayRouteTableId = '{{ LocalGatewayRouteTableId }}' -- required
AND region = '{{ region }}' -- required
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
;
INSERT examples
- create_local_gateway_route
- Manifest
Creates a static route for the specified local gateway route table. You must specify one of the following targets: LocalGatewayVirtualInterfaceGroupId NetworkInterfaceId
INSERT INTO aws.ec2.local_gateway_routes (
LocalGatewayRouteTableId,
region,
DestinationCidrBlock,
LocalGatewayVirtualInterfaceGroupId,
DryRun,
NetworkInterfaceId,
DestinationPrefixListId
)
SELECT
'{{ LocalGatewayRouteTableId }}',
'{{ region }}',
'{{ DestinationCidrBlock }}',
'{{ LocalGatewayVirtualInterfaceGroupId }}',
'{{ DryRun }}',
'{{ NetworkInterfaceId }}',
'{{ DestinationPrefixListId }}'
RETURNING
coip_pool_id,
destination_cidr_block,
destination_prefix_list_id,
local_gateway_route_table_arn,
local_gateway_route_table_id,
local_gateway_virtual_interface_group_id,
network_interface_id,
owner_id,
state,
subnet_id,
type
;
# Description fields are for documentation purposes
- name: local_gateway_routes
props:
- name: LocalGatewayRouteTableId
value: "{{ LocalGatewayRouteTableId }}"
description: Required parameter for the local_gateway_routes resource.
- name: region
value: "{{ region }}"
description: Required parameter for the local_gateway_routes resource.
- name: DestinationCidrBlock
value: "{{ DestinationCidrBlock }}"
description: The CIDR range used for destination matches. Routing decisions are based on the most specific match.
description: The CIDR range used for destination matches. Routing decisions are based on the most specific match.
- name: LocalGatewayVirtualInterfaceGroupId
value: "{{ LocalGatewayVirtualInterfaceGroupId }}"
description: The ID of the virtual interface group.
description: The ID of the virtual interface group.
- name: DryRun
value: {{ DryRun }}
description: Checks 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.
description: Checks 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.
- name: NetworkInterfaceId
value: "{{ NetworkInterfaceId }}"
description: The ID of the network interface.
description: The ID of the network interface.
- name: DestinationPrefixListId
value: "{{ DestinationPrefixListId }}"
description: The ID of the prefix list. Use a prefix list in place of DestinationCidrBlock. You cannot use DestinationPrefixListId and DestinationCidrBlock in the same request.
description: The ID of the prefix list. Use a prefix list in place of DestinationCidrBlock. You cannot use DestinationPrefixListId and DestinationCidrBlock in the same request.
UPDATE examples
- modify_local_gateway_route
Modifies the specified local gateway route.
UPDATE aws.ec2.local_gateway_routes
SET
-- No updatable properties
WHERE
LocalGatewayRouteTableId = '{{ LocalGatewayRouteTableId }}' --required
AND region = '{{ region }}' --required
AND DestinationCidrBlock = '{{ DestinationCidrBlock}}'
AND LocalGatewayVirtualInterfaceGroupId = '{{ LocalGatewayVirtualInterfaceGroupId}}'
AND NetworkInterfaceId = '{{ NetworkInterfaceId}}'
AND DryRun = {{ DryRun}}
AND DestinationPrefixListId = '{{ DestinationPrefixListId}}'
RETURNING
coip_pool_id,
destination_cidr_block,
destination_prefix_list_id,
local_gateway_route_table_arn,
local_gateway_route_table_id,
local_gateway_virtual_interface_group_id,
network_interface_id,
owner_id,
state,
subnet_id,
type;
DELETE examples
- delete_local_gateway_route
Deletes the specified route from the specified local gateway route table.
DELETE FROM aws.ec2.local_gateway_routes
WHERE LocalGatewayRouteTableId = '{{ LocalGatewayRouteTableId }}' --required
AND region = '{{ region }}' --required
AND DestinationCidrBlock = '{{ DestinationCidrBlock }}'
AND DryRun = '{{ DryRun }}'
AND DestinationPrefixListId = '{{ DestinationPrefixListId }}'
;