transit_gateways
Creates, updates, deletes, gets or lists a transit_gateways resource.
Overview
| Name | transit_gateways |
| Type | Resource |
| Id | aws.ec2.transit_gateways |
Fields
The following fields are returned by SELECT queries:
- describe_transit_gateways
| Name | Datatype | Description |
|---|---|---|
creation_time | string | The creation time. |
description | string | The description of the transit gateway. |
options | string | The transit gateway options. |
owner_id | string | The ID of the Amazon Web Services account that owns the transit gateway. |
state | string | The state of the transit gateway. |
tags | string | The tags for the transit gateway. |
transit_gateway_arn | string | The Amazon Resource Name (ARN) of the transit gateway. |
transit_gateway_id | string | The ID of the transit gateway. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_transit_gateways | select | region | TransitGatewayIds, Filter, MaxResults, NextToken, DryRun | Describes one or more transit gateways. By default, all transit gateways are described. Alternatively, you can filter the results. |
create_transit_gateway | insert | region | Description, Options, TagSpecification, DryRun | Creates a transit gateway. You can use a transit gateway to interconnect your virtual private clouds (VPC) and on-premises networks. After the transit gateway enters the available state, you can attach your VPCs and VPN connections to the transit gateway. To attach your VPCs, use CreateTransitGatewayVpcAttachment. To attach a VPN connection, use CreateCustomerGateway to create a customer gateway and specify the ID of the customer gateway and the ID of the transit gateway in a call to CreateVpnConnection. When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table and the default propagation route table. You can use CreateTransitGatewayRouteTable to create additional transit gateway route tables. If you disable automatic route propagation, we do not create a default transit gateway route table. You can use EnableTransitGatewayRouteTablePropagation to propagate routes from a resource attachment to a transit gateway route table. If you disable automatic associations, you can use AssociateTransitGatewayRouteTable to associate a resource attachment with a transit gateway route table. |
modify_transit_gateway | update | TransitGatewayId, region | Description, Options, DryRun | Modifies the specified transit gateway. When you modify a transit gateway, the modified options are applied to new transit gateway attachments only. Your existing transit gateway attachments are not modified. |
delete_transit_gateway | delete | TransitGatewayId, region | DryRun | Deletes the specified transit gateway. |
delete_transit_gateway_client_vpn_attachment | delete | TransitGatewayAttachmentId, region | DryRun | Deletes a Transit Gateway attachment for a Client VPN endpoint. The Transit Gateway owner can delete the attachment to remove the association between the Client VPN endpoint and the Transit Gateway. |
accept_transit_gateway_client_vpn_attachment | exec | TransitGatewayAttachmentId, region | DryRun | Accepts a Transit Gateway attachment request for a Client VPN endpoint. The Transit Gateway owner must accept the attachment request before the Client VPN endpoint can route traffic through the Transit Gateway. |
accept_transit_gateway_peering_attachment | exec | TransitGatewayAttachmentId, region | DryRun | Accepts a transit gateway peering attachment request. The peering attachment must be in the pendingAcceptance state. |
accept_transit_gateway_vpc_attachment | exec | TransitGatewayAttachmentId, region | DryRun | Accepts a request to attach a VPC to a transit gateway. The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to view your pending VPC attachment requests. Use RejectTransitGatewayVpcAttachment to reject a VPC attachment request. |
reject_transit_gateway_client_vpn_attachment | exec | TransitGatewayAttachmentId, region | DryRun | Rejects a Transit Gateway attachment request for a Client VPN endpoint. The Transit Gateway owner can reject the attachment request to prevent the Client VPN endpoint from routing traffic through the Transit Gateway. |
reject_transit_gateway_peering_attachment | exec | TransitGatewayAttachmentId, region | DryRun | Rejects a transit gateway peering attachment request. |
reject_transit_gateway_vpc_attachment | exec | TransitGatewayAttachmentId, region | DryRun | Rejects a request to attach a VPC to a transit gateway. The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to view your pending VPC attachment requests. Use AcceptTransitGatewayVpcAttachment to accept a VPC attachment request. |
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 |
|---|---|---|
TransitGatewayAttachmentId | string | The ID of the attachment. |
TransitGatewayId | string | The ID of the transit gateway. |
region | string | AWS region (default: us-east-1) |
Description | string | The description for the transit gateway. |
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: options.propagation-default-route-table-id - The ID of the default propagation route table. options.amazon-side-asn - The private ASN for the Amazon side of a BGP session. options.association-default-route-table-id - The ID of the default association route table. options.auto-accept-shared-attachments - Indicates whether there is automatic acceptance of attachment requests (enable | disable). options.default-route-table-association - Indicates whether resource attachments are automatically associated with the default association route table (enable | disable). options.default-route-table-propagation - Indicates whether resource attachments automatically propagate routes to the default propagation route table (enable | disable). options.dns-support - Indicates whether DNS support is enabled (enable | disable). options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol support is enabled (enable | disable). owner-id - The ID of the Amazon Web Services account that owns the transit gateway. state - The state of the transit gateway (available | deleted | deleting | modifying | pending). transit-gateway-id - The ID of the transit gateway. tag-key - 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. |
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. |
Options | object | The options to modify. |
TagSpecification | array | The tags to apply to the transit gateway. |
TransitGatewayIds | array | The IDs of the transit gateways. |
SELECT examples
- describe_transit_gateways
Describes one or more transit gateways. By default, all transit gateways are described. Alternatively, you can filter the results.
SELECT
creation_time,
description,
options,
owner_id,
state,
tags,
transit_gateway_arn,
transit_gateway_id
FROM aws.ec2.transit_gateways
WHERE region = '{{ region }}' -- required
AND TransitGatewayIds = '{{ TransitGatewayIds }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
;
INSERT examples
- create_transit_gateway
- Manifest
Creates a transit gateway. You can use a transit gateway to interconnect your virtual private clouds (VPC) and on-premises networks. After the transit gateway enters the available state, you can attach your VPCs and VPN connections to the transit gateway. To attach your VPCs, use CreateTransitGatewayVpcAttachment. To attach a VPN connection, use CreateCustomerGateway to create a customer gateway and specify the ID of the customer gateway and the ID of the transit gateway in a call to CreateVpnConnection. When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table and the default propagation route table. You can use CreateTransitGatewayRouteTable to create additional transit gateway route tables. If you disable automatic route propagation, we do not create a default transit gateway route table. You can use EnableTransitGatewayRouteTablePropagation to propagate routes from a resource attachment to a transit gateway route table. If you disable automatic associations, you can use AssociateTransitGatewayRouteTable to associate a resource attachment with a transit gateway route table.
INSERT INTO aws.ec2.transit_gateways (
region,
Description,
Options,
TagSpecification,
DryRun
)
SELECT
'{{ region }}',
'{{ Description }}',
'{{ Options }}',
'{{ TagSpecification }}',
'{{ DryRun }}'
RETURNING
creation_time,
description,
options,
owner_id,
state,
tags,
transit_gateway_arn,
transit_gateway_id
;
# Description fields are for documentation purposes
- name: transit_gateways
props:
- name: region
value: "{{ region }}"
description: Required parameter for the transit_gateways resource.
- name: Description
value: "{{ Description }}"
description: A description of the transit gateway.
description: A description of the transit gateway.
- name: Options
value: "{{ Options }}"
description: The transit gateway options.
description: The transit gateway options.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to apply to the transit gateway.
description: The tags to apply to the transit gateway.
- 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
Modifies the specified transit gateway. When you modify a transit gateway, the modified options are applied to new transit gateway attachments only. Your existing transit gateway attachments are not modified.
UPDATE aws.ec2.transit_gateways
SET
-- No updatable properties
WHERE
TransitGatewayId = '{{ TransitGatewayId }}' --required
AND region = '{{ region }}' --required
AND Description = '{{ Description}}'
AND Options = '{{ Options}}'
AND DryRun = {{ DryRun}}
RETURNING
creation_time,
description,
options,
owner_id,
state,
tags,
transit_gateway_arn,
transit_gateway_id;
DELETE examples
- delete_transit_gateway
- delete_transit_gateway_client_vpn_attachment
Deletes the specified transit gateway.
DELETE FROM aws.ec2.transit_gateways
WHERE TransitGatewayId = '{{ TransitGatewayId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;
Deletes a Transit Gateway attachment for a Client VPN endpoint. The Transit Gateway owner can delete the attachment to remove the association between the Client VPN endpoint and the Transit Gateway.
DELETE FROM aws.ec2.transit_gateways
WHERE TransitGatewayAttachmentId = '{{ TransitGatewayAttachmentId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;
Lifecycle Methods
- accept_transit_gateway_client_vpn_attachment
- accept_transit_gateway_peering_attachment
- accept_transit_gateway_vpc_attachment
- reject_transit_gateway_client_vpn_attachment
- reject_transit_gateway_peering_attachment
- reject_transit_gateway_vpc_attachment
Accepts a Transit Gateway attachment request for a Client VPN endpoint. The Transit Gateway owner must accept the attachment request before the Client VPN endpoint can route traffic through the Transit Gateway.
EXEC aws.ec2.transit_gateways.accept_transit_gateway_client_vpn_attachment
@TransitGatewayAttachmentId='{{ TransitGatewayAttachmentId }}' --required,
@region='{{ region }}' --required,
@DryRun={{ DryRun }}
;
Accepts a transit gateway peering attachment request. The peering attachment must be in the pendingAcceptance state.
EXEC aws.ec2.transit_gateways.accept_transit_gateway_peering_attachment
@TransitGatewayAttachmentId='{{ TransitGatewayAttachmentId }}' --required,
@region='{{ region }}' --required,
@DryRun={{ DryRun }}
;
Accepts a request to attach a VPC to a transit gateway. The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to view your pending VPC attachment requests. Use RejectTransitGatewayVpcAttachment to reject a VPC attachment request.
EXEC aws.ec2.transit_gateways.accept_transit_gateway_vpc_attachment
@TransitGatewayAttachmentId='{{ TransitGatewayAttachmentId }}' --required,
@region='{{ region }}' --required,
@DryRun={{ DryRun }}
;
Rejects a Transit Gateway attachment request for a Client VPN endpoint. The Transit Gateway owner can reject the attachment request to prevent the Client VPN endpoint from routing traffic through the Transit Gateway.
EXEC aws.ec2.transit_gateways.reject_transit_gateway_client_vpn_attachment
@TransitGatewayAttachmentId='{{ TransitGatewayAttachmentId }}' --required,
@region='{{ region }}' --required,
@DryRun={{ DryRun }}
;
Rejects a transit gateway peering attachment request.
EXEC aws.ec2.transit_gateways.reject_transit_gateway_peering_attachment
@TransitGatewayAttachmentId='{{ TransitGatewayAttachmentId }}' --required,
@region='{{ region }}' --required,
@DryRun={{ DryRun }}
;
Rejects a request to attach a VPC to a transit gateway. The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to view your pending VPC attachment requests. Use AcceptTransitGatewayVpcAttachment to accept a VPC attachment request.
EXEC aws.ec2.transit_gateways.reject_transit_gateway_vpc_attachment
@TransitGatewayAttachmentId='{{ TransitGatewayAttachmentId }}' --required,
@region='{{ region }}' --required,
@DryRun={{ DryRun }}
;