transit_gateway_peerings
Creates, updates, deletes or gets a transit_gateway_peering resource or lists transit_gateway_peerings in a region
Overview
| Name | transit_gateway_peerings |
| Type | Resource |
| Description | AWS::NetworkManager::TransitGatewayPeering Resoruce Type. |
| Id | awscc.networkmanager.transit_gateway_peerings |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
core_network_id | string | The Id of the core network that you want to peer a transit gateway to. |
core_network_arn | string | The ARN (Amazon Resource Name) of the core network that you want to peer a transit gateway to. |
transit_gateway_arn | string | The ARN (Amazon Resource Name) of the transit gateway that you will peer to a core network |
transit_gateway_peering_attachment_id | string | The ID of the TransitGatewayPeeringAttachment |
peering_id | string | The Id of the transit gateway peering |
state | string | The state of the transit gateway peering |
edge_location | string | The location of the transit gateway peering |
resource_arn | string | The ARN (Amazon Resource Name) of the resource that you will peer to a core network |
owner_account_id | string | Peering owner account Id |
peering_type | string | Peering type (TransitGatewayPeering) |
created_at | string | The creation time of the transit gateway peering |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
peering_id | string | The Id of the transit gateway peering |
region | string | AWS region. |
For more information, see AWS::NetworkManager::TransitGatewayPeering.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | transit_gateway_peerings | INSERT | CoreNetworkId, TransitGatewayArn, region |
delete_resource | transit_gateway_peerings | DELETE | Identifier, region |
update_resource | transit_gateway_peerings | UPDATE | Identifier, PatchDocument, region |
list_resources | transit_gateway_peerings_list_only | SELECT | region |
get_resource | transit_gateway_peerings | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.networkmanager.transit_gateway_peerings
WHERE
region = '{{ region }}' AND
Identifier = '{{ peering_id }}';
Lists all transit_gateway_peerings in a region.
SELECT
region,
peering_id
FROM awscc.networkmanager.transit_gateway_peerings_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new transit_gateway_peering resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.networkmanager.transit_gateway_peerings (
CoreNetworkId,
TransitGatewayArn,
region
)
SELECT
'{{ core_network_id }}',
'{{ transit_gateway_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.networkmanager.transit_gateway_peerings (
CoreNetworkId,
TransitGatewayArn,
Tags,
region
)
SELECT
'{{ core_network_id }}',
'{{ transit_gateway_arn }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: transit_gateway_peering
props:
- name: core_network_id
value: '{{ core_network_id }}'
- name: transit_gateway_arn
value: '{{ transit_gateway_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a transit_gateway_peering resource, using stack-deploy.
/*+ update */
UPDATE awscc.networkmanager.transit_gateway_peerings
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ peering_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.networkmanager.transit_gateway_peerings
WHERE
Identifier = '{{ peering_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the transit_gateway_peerings resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
networkmanager:CreateTransitGatewayPeering,
networkmanager:TagResource,
networkmanager:GetTransitGatewayPeering,
iam:CreateServiceLinkedRole,
ec2:CreateTransitGatewayPeeringAttachment,
ec2:AcceptTransitGatewayPeeringAttachment,
ec2:DescribeRegions
networkmanager:GetTransitGatewayPeering
networkmanager:TagResource,
networkmanager:UntagResource,
networkmanager:ListTagsForResource,
networkmanager:GetTransitGatewayPeering,
ec2:DescribeRegions
networkmanager:DeletePeering,
networkmanager:GetTransitGatewayPeering,
ec2:DescribeRegions
networkmanager:ListPeerings