transit_gateway_policy_table_entries
Creates, updates, deletes, gets or lists a transit_gateway_policy_table_entries resource.
Overview
| Name | transit_gateway_policy_table_entries |
| Type | Resource |
| Id | aws.ec2.transit_gateway_policy_table_entries |
Fields
The following fields are returned by SELECT queries:
- get_transit_gateway_policy_table_entries
| Name | Datatype | Description |
|---|---|---|
policy_rule | string | The policy rule associated with the transit gateway policy table. |
policy_rule_number | string | The rule number for the transit gateway policy table entry. |
state | string | The state of the transit gateway policy table entry. |
target_route_table_id | string | The ID of the target route table. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_transit_gateway_policy_table_entries | select | TransitGatewayPolicyTableId, region | Filter, MaxResults, NextToken, DryRun | Returns a list of transit gateway policy table entries. |
create_transit_gateway_policy_table_entry | insert | TransitGatewayPolicyTableId, PolicyRuleNumber, TargetRouteTableId, region | PolicyRule, DryRun | Creates an entry in a transit gateway policy table to route matching traffic to a specified route table. |
modify_transit_gateway_policy_table_entry | update | TransitGatewayPolicyTableId, PolicyRuleNumber, region | PolicyRule, TargetRouteTableId, DryRun | Modifies the specified transit gateway policy table entry. |
delete_transit_gateway_policy_table_entry | delete | TransitGatewayPolicyTableId, PolicyRuleNumber, region | DryRun | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
PolicyRuleNumber | string | The rule number of the policy table entry to delete. |
TargetRouteTableId | string | The ID of the transit gateway route table to use for traffic matching this rule. |
TransitGatewayPolicyTableId | string | The ID of the transit gateway policy table. |
region | string | AWS region (default: us-east-1) |
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. 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. |
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. |
NextToken | string | The token for the next page of results. |
PolicyRule | object | The updated matching criteria for the policy table entry. Unspecified fields retain their current values. |
TargetRouteTableId | string | The ID of the transit gateway route table to use for traffic matching this rule. |
SELECT examples
- get_transit_gateway_policy_table_entries
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
- create_transit_gateway_policy_table_entry
- Manifest
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
;
# Description fields are for documentation purposes
- name: transit_gateway_policy_table_entries
props:
- name: TransitGatewayPolicyTableId
value: "{{ TransitGatewayPolicyTableId }}"
description: Required parameter for the transit_gateway_policy_table_entries resource.
- name: PolicyRuleNumber
value: "{{ PolicyRuleNumber }}"
description: Required parameter for the transit_gateway_policy_table_entries resource.
- name: TargetRouteTableId
value: "{{ TargetRouteTableId }}"
description: Required parameter for the transit_gateway_policy_table_entries resource.
- name: region
value: "{{ region }}"
description: Required parameter for the transit_gateway_policy_table_entries resource.
- name: PolicyRule
value: "{{ PolicyRule }}"
description: The matching criteria for the policy table entry.
description: The matching criteria for the policy table entry.
- 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.
UPDATE examples
- modify_transit_gateway_policy_table_entry
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
- delete_transit_gateway_policy_table_entry
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 }}'
;