transit_gateway_peering_attachments
Creates, updates, deletes or gets a transit_gateway_peering_attachment
resource or lists transit_gateway_peering_attachments
in a region
Overview
Name | transit_gateway_peering_attachments |
Type | Resource |
Description | The AWS::EC2::TransitGatewayPeeringAttachment type |
Id | aws.ec2.transit_gateway_peering_attachments |
Fields
Name | Datatype | Description |
---|---|---|
status | object | The status of the transit gateway peering attachment. |
transit_gateway_id | string | The ID of the transit gateway. |
peer_transit_gateway_id | string | The ID of the peer transit gateway. |
peer_account_id | string | The ID of the peer account |
state | string | The state of the transit gateway peering attachment. Note that the initiating state has been deprecated. |
creation_time | string | The time the transit gateway peering attachment was created. |
peer_region | string | Peer Region |
tags | array | The tags for the transit gateway peering attachment. |
transit_gateway_attachment_id | string | The ID of the transit gateway peering attachment. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | TransitGatewayId, PeerTransitGatewayId, PeerAccountId, PeerRegion, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all transit_gateway_peering_attachments
in a region.
SELECT
region,
status,
transit_gateway_id,
peer_transit_gateway_id,
peer_account_id,
state,
creation_time,
peer_region,
tags,
transit_gateway_attachment_id
FROM aws.ec2.transit_gateway_peering_attachments
WHERE region = 'us-east-1';
Gets all properties from an individual transit_gateway_peering_attachment
.
SELECT
region,
status,
transit_gateway_id,
peer_transit_gateway_id,
peer_account_id,
state,
creation_time,
peer_region,
tags,
transit_gateway_attachment_id
FROM aws.ec2.transit_gateway_peering_attachments
WHERE region = 'us-east-1' AND data__Identifier = '<TransitGatewayAttachmentId>';
INSERT
example
Use the following StackQL query and manifest file to create a new transit_gateway_peering_attachment
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.transit_gateway_peering_attachments (
TransitGatewayId,
PeerTransitGatewayId,
PeerAccountId,
PeerRegion,
region
)
SELECT
'{{ TransitGatewayId }}',
'{{ PeerTransitGatewayId }}',
'{{ PeerAccountId }}',
'{{ PeerRegion }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.transit_gateway_peering_attachments (
TransitGatewayId,
PeerTransitGatewayId,
PeerAccountId,
PeerRegion,
Tags,
region
)
SELECT
'{{ TransitGatewayId }}',
'{{ PeerTransitGatewayId }}',
'{{ PeerAccountId }}',
'{{ PeerRegion }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: transit_gateway_peering_attachment
props:
- name: TransitGatewayId
value: '{{ TransitGatewayId }}'
- name: PeerTransitGatewayId
value: '{{ PeerTransitGatewayId }}'
- name: PeerAccountId
value: '{{ PeerAccountId }}'
- name: PeerRegion
value: '{{ PeerRegion }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ec2.transit_gateway_peering_attachments
WHERE data__Identifier = '<TransitGatewayAttachmentId>'
AND region = 'us-east-1';
Permissions
To operate on the transit_gateway_peering_attachments
resource, the following permissions are required:
Read
ec2:DescribeTransitGatewayPeeringAttachments
Create
ec2:CreateTransitGatewayPeeringAttachment,
ec2:DescribeTransitGatewayPeeringAttachments
Update
ec2:DescribeTransitGatewayPeeringAttachments
List
ec2:DescribeTransitGatewayPeeringAttachments
Delete
ec2:DeleteTransitGatewayPeeringAttachment,
ec2:DescribeTransitGatewayPeeringAttachments