transit_gateway_peering_attachments
Creates, updates, deletes, gets or lists a transit_gateway_peering_attachments resource.
Overview
| Name | transit_gateway_peering_attachments |
| Type | Resource |
| Id | aws.ec2.transit_gateway_peering_attachments |
Fields
The following fields are returned by SELECT queries:
- describe_transit_gateway_peering_attachments
| Name | Datatype | Description |
|---|---|---|
accepter_tgw_info | string | Information about the accepter transit gateway. |
accepter_transit_gateway_attachment_id | string | The ID of the accepter transit gateway attachment. |
creation_time | string | The time the transit gateway peering attachment was created. |
options | string | Details about the transit gateway peering attachment. |
requester_tgw_info | string | Information about the requester transit gateway. |
state | string | The state of the transit gateway peering attachment. Note that the initiating state has been deprecated. |
status | string | The status of the transit gateway peering attachment. |
tags | string | The tags for the transit gateway peering attachment. |
transit_gateway_attachment_id | string | The ID of the transit gateway peering attachment. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_transit_gateway_peering_attachments | select | region | TransitGatewayAttachmentIds, Filter, MaxResults, NextToken, DryRun | Describes your transit gateway peering attachments. |
create_transit_gateway_peering_attachment | insert | TransitGatewayId, PeerTransitGatewayId, PeerAccountId, PeerRegion, region | Options, TagSpecification, DryRun | 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. |
delete_transit_gateway_peering_attachment | delete | TransitGatewayAttachmentId, region | DryRun | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
PeerAccountId | string | The ID of the Amazon Web Services account that owns the peer transit gateway. |
PeerRegion | string | The Region where the peer transit gateway is located. |
PeerTransitGatewayId | string | The ID of the peer transit gateway with which to create the peering attachment. |
TransitGatewayAttachmentId | string | The ID of the transit gateway peering attachment. |
TransitGatewayId | string | The ID of the transit gateway. |
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: 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. |
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 | Requests a transit gateway peering attachment. |
TagSpecification | array | The tags to apply to the transit gateway peering attachment. |
TransitGatewayAttachmentIds | array | One or more IDs of the transit gateway peering attachments. |
SELECT examples
- describe_transit_gateway_peering_attachments
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
- create_transit_gateway_peering_attachment
- Manifest
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
;
# Description fields are for documentation purposes
- name: transit_gateway_peering_attachments
props:
- name: TransitGatewayId
value: "{{ TransitGatewayId }}"
description: Required parameter for the transit_gateway_peering_attachments resource.
- name: PeerTransitGatewayId
value: "{{ PeerTransitGatewayId }}"
description: Required parameter for the transit_gateway_peering_attachments resource.
- name: PeerAccountId
value: "{{ PeerAccountId }}"
description: Required parameter for the transit_gateway_peering_attachments resource.
- name: PeerRegion
value: "{{ PeerRegion }}"
description: Required parameter for the transit_gateway_peering_attachments resource.
- name: region
value: "{{ region }}"
description: Required parameter for the transit_gateway_peering_attachments resource.
- name: Options
value: "{{ Options }}"
description: Requests a transit gateway peering attachment.
description: Requests a transit gateway peering attachment.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to apply to the transit gateway peering attachment.
description: The tags to apply to the transit gateway peering attachment.
- 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.
DELETE examples
- delete_transit_gateway_peering_attachment
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 }}'
;