Skip to main content

transit_gateway_peerings

Creates, updates, deletes or gets a transit_gateway_peering resource or lists transit_gateway_peerings in a region

Overview

Nametransit_gateway_peerings
TypeResource
DescriptionAWS::NetworkManager::TransitGatewayPeering Resoruce Type.
Idaws.networkmanager.transit_gateway_peerings

Fields

NameDatatypeDescription
core_network_idstringThe Id of the core network that you want to peer a transit gateway to.
core_network_arnstringThe ARN (Amazon Resource Name) of the core network that you want to peer a transit gateway to.
transit_gateway_arnstringThe ARN (Amazon Resource Name) of the transit gateway that you will peer to a core network
transit_gateway_peering_attachment_idstringThe ID of the TransitGatewayPeeringAttachment
peering_idstringThe Id of the transit gateway peering
statestringThe state of the transit gateway peering
edge_locationstringThe location of the transit gateway peering
resource_arnstringThe ARN (Amazon Resource Name) of the resource that you will peer to a core network
owner_account_idstringPeering owner account Id
peering_typestringPeering type (TransitGatewayPeering)
created_atstringThe creation time of the transit gateway peering
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTCoreNetworkId, TransitGatewayArn, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all transit_gateway_peerings in a region.

SELECT
region,
core_network_id,
core_network_arn,
transit_gateway_arn,
transit_gateway_peering_attachment_id,
peering_id,
state,
edge_location,
resource_arn,
owner_account_id,
peering_type,
created_at,
tags
FROM aws.networkmanager.transit_gateway_peerings
WHERE region = 'us-east-1';

Gets all properties from an individual transit_gateway_peering.

SELECT
region,
core_network_id,
core_network_arn,
transit_gateway_arn,
transit_gateway_peering_attachment_id,
peering_id,
state,
edge_location,
resource_arn,
owner_account_id,
peering_type,
created_at,
tags
FROM aws.networkmanager.transit_gateway_peerings
WHERE region = 'us-east-1' AND data__Identifier = '<PeeringId>';

INSERT example

Use the following StackQL query and manifest file to create a new transit_gateway_peering resource, using stack-deploy.

/*+ create */
INSERT INTO aws.networkmanager.transit_gateway_peerings (
CoreNetworkId,
TransitGatewayArn,
region
)
SELECT
'{{ CoreNetworkId }}',
'{{ TransitGatewayArn }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.networkmanager.transit_gateway_peerings
WHERE data__Identifier = '<PeeringId>'
AND region = 'us-east-1';

Permissions

To operate on the transit_gateway_peerings resource, the following permissions are required:

Create

networkmanager:CreateTransitGatewayPeering,
networkmanager:TagResource,
networkmanager:GetTransitGatewayPeering,
iam:CreateServiceLinkedRole,
ec2:CreateTransitGatewayPeeringAttachment,
ec2:AcceptTransitGatewayPeeringAttachment,
ec2:DescribeRegions

Read

networkmanager:GetTransitGatewayPeering,
networkmanager:TagResource

Update

networkmanager:TagResource,
networkmanager:UntagResource,
networkmanager:ListTagsForResource,
networkmanager:GetTransitGatewayPeering,
ec2:DescribeRegions

Delete

networkmanager:DeletePeering,
networkmanager:GetTransitGatewayPeering,
ec2:DescribeRegions

List

networkmanager:ListPeerings