Skip to main content

transit_gateway_peering_attachments

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

Overview

Nametransit_gateway_peering_attachments
TypeResource
Idaws.ec2.transit_gateway_peering_attachments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
accepter_tgw_infostringInformation about the accepter transit gateway.
accepter_transit_gateway_attachment_idstringThe ID of the accepter transit gateway attachment.
creation_timestringThe time the transit gateway peering attachment was created.
optionsstringDetails about the transit gateway peering attachment.
requester_tgw_infostringInformation about the requester transit gateway.
statestringThe state of the transit gateway peering attachment. Note that the initiating state has been deprecated.
statusstringThe status of the transit gateway peering attachment.
tagsstringThe tags for the transit gateway peering attachment.
transit_gateway_attachment_idstringThe ID of the transit gateway peering attachment.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_transit_gateway_peering_attachmentsselectregionTransitGatewayAttachmentIds, Filter, MaxResults, NextToken, DryRunDescribes your transit gateway peering attachments.
create_transit_gateway_peering_attachmentinsertTransitGatewayId, PeerTransitGatewayId, PeerAccountId, PeerRegion, regionOptions, TagSpecification, DryRunRequests a transit gateway peering attachment between the specified transit gateway (requester) and a peer transit gateway (accepter). The peer transit gateway can be in your account or a different Amazon Web Services account. After you create the peering attachment, the owner of the accepter transit gateway must accept the attachment request.
delete_transit_gateway_peering_attachmentdeleteTransitGatewayAttachmentId, regionDryRunDeletes a transit gateway peering attachment.

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
PeerAccountIdstringThe ID of the Amazon Web Services account that owns the peer transit gateway.
PeerRegionstringThe Region where the peer transit gateway is located.
PeerTransitGatewayIdstringThe ID of the peer transit gateway with which to create the peering attachment.
TransitGatewayAttachmentIdstringThe ID of the transit gateway peering attachment.
TransitGatewayIdstringThe ID of the transit gateway.
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: transit-gateway-attachment-id - The ID of the transit gateway attachment. local-owner-id - The ID of your Amazon Web Services account. remote-owner-id - The ID of the Amazon Web Services account in the remote Region that owns the transit gateway. state - The state of the peering attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting). 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. tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value. transit-gateway-id - The ID of the transit gateway.
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.
OptionsobjectRequests a transit gateway peering attachment.
TagSpecificationarrayThe tags to apply to the transit gateway peering attachment.
TransitGatewayAttachmentIdsarrayOne or more IDs of the transit gateway peering attachments.

SELECT examples

Describes your transit gateway peering attachments.

SELECT
accepter_tgw_info,
accepter_transit_gateway_attachment_id,
creation_time,
options,
requester_tgw_info,
state,
status,
tags,
transit_gateway_attachment_id
FROM aws.ec2.transit_gateway_peering_attachments
WHERE region = '{{ region }}' -- required
AND TransitGatewayAttachmentIds = '{{ TransitGatewayAttachmentIds }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
;

INSERT examples

Requests a transit gateway peering attachment between the specified transit gateway (requester) and a peer transit gateway (accepter). The peer transit gateway can be in your account or a different Amazon Web Services account. After you create the peering attachment, the owner of the accepter transit gateway must accept the attachment request.

INSERT INTO aws.ec2.transit_gateway_peering_attachments (
TransitGatewayId,
PeerTransitGatewayId,
PeerAccountId,
PeerRegion,
region,
Options,
TagSpecification,
DryRun
)
SELECT
'{{ TransitGatewayId }}',
'{{ PeerTransitGatewayId }}',
'{{ PeerAccountId }}',
'{{ PeerRegion }}',
'{{ region }}',
'{{ Options }}',
'{{ TagSpecification }}',
'{{ DryRun }}'
RETURNING
accepter_tgw_info,
accepter_transit_gateway_attachment_id,
creation_time,
options,
requester_tgw_info,
state,
status,
tags,
transit_gateway_attachment_id
;

DELETE examples

Deletes a transit gateway peering attachment.

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