Skip to main content

transit_gateway_policy_table_entries

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

Overview

Nametransit_gateway_policy_table_entries
TypeResource
Idaws.ec2.transit_gateway_policy_table_entries

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
policy_rulestringThe policy rule associated with the transit gateway policy table.
policy_rule_numberstringThe rule number for the transit gateway policy table entry.
statestringThe state of the transit gateway policy table entry.
target_route_table_idstringThe ID of the target route table.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_transit_gateway_policy_table_entriesselectTransitGatewayPolicyTableId, regionFilter, MaxResults, NextToken, DryRunReturns a list of transit gateway policy table entries.
create_transit_gateway_policy_table_entryinsertTransitGatewayPolicyTableId, PolicyRuleNumber, TargetRouteTableId, regionPolicyRule, DryRunCreates an entry in a transit gateway policy table to route matching traffic to a specified route table.
modify_transit_gateway_policy_table_entryupdateTransitGatewayPolicyTableId, PolicyRuleNumber, regionPolicyRule, TargetRouteTableId, DryRunModifies the specified transit gateway policy table entry.
delete_transit_gateway_policy_table_entrydeleteTransitGatewayPolicyTableId, PolicyRuleNumber, regionDryRunDeletes the specified transit gateway policy table entry.

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
PolicyRuleNumberstringThe rule number of the policy table entry to delete.
TargetRouteTableIdstringThe ID of the transit gateway route table to use for traffic matching this rule.
TransitGatewayPolicyTableIdstringThe ID of the transit gateway policy table.
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. The possible values are: policy-rule-number - The rule number for the transit gateway policy table entry. target-route-table-id - The ID of the target route table. policy-rule.source-ip - The source CIDR block for the policy rule. policy-rule.destination-ip - The destination CIDR block for the policy rule. policy-rule.source-port - The source port or port range for the policy rule. policy-rule.destination-port - The destination port or port range for the policy rule. policy-rule.protocol - The protocol for the policy rule. policy-rule.meta-data.key - The metadata key for the policy rule. policy-rule.meta-data.value - The metadata value for the policy rule.
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.
PolicyRuleobjectThe updated matching criteria for the policy table entry. Unspecified fields retain their current values.
TargetRouteTableIdstringThe ID of the transit gateway route table to use for traffic matching this rule.

SELECT examples

Returns a list of transit gateway policy table entries.

SELECT
policy_rule,
policy_rule_number,
state,
target_route_table_id
FROM aws.ec2.transit_gateway_policy_table_entries
WHERE TransitGatewayPolicyTableId = '{{ TransitGatewayPolicyTableId }}' -- required
AND region = '{{ region }}' -- required
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
;

INSERT examples

Creates an entry in a transit gateway policy table to route matching traffic to a specified route table.

INSERT INTO aws.ec2.transit_gateway_policy_table_entries (
TransitGatewayPolicyTableId,
PolicyRuleNumber,
TargetRouteTableId,
region,
PolicyRule,
DryRun
)
SELECT
'{{ TransitGatewayPolicyTableId }}',
'{{ PolicyRuleNumber }}',
'{{ TargetRouteTableId }}',
'{{ region }}',
'{{ PolicyRule }}',
'{{ DryRun }}'
RETURNING
policy_rule,
policy_rule_number,
state,
target_route_table_id
;

UPDATE examples

Modifies the specified transit gateway policy table entry.

UPDATE aws.ec2.transit_gateway_policy_table_entries
SET
-- No updatable properties
WHERE
TransitGatewayPolicyTableId = '{{ TransitGatewayPolicyTableId }}' --required
AND PolicyRuleNumber = '{{ PolicyRuleNumber }}' --required
AND region = '{{ region }}' --required
AND PolicyRule = '{{ PolicyRule}}'
AND TargetRouteTableId = '{{ TargetRouteTableId}}'
AND DryRun = {{ DryRun}}
RETURNING
policy_rule,
policy_rule_number,
state,
target_route_table_id;

DELETE examples

Deletes the specified transit gateway policy table entry.

DELETE FROM aws.ec2.transit_gateway_policy_table_entries
WHERE TransitGatewayPolicyTableId = '{{ TransitGatewayPolicyTableId }}' --required
AND PolicyRuleNumber = '{{ PolicyRuleNumber }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;