

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 在 AWS Transit Gateway 中接受或拒绝对等连接请求。
<a name="tgw-peering-accept-reject"></a>

创建后，转发网关对等连接会自动处于 `pendingAcceptance` 状态，并无限期保持此状态，直至被接受或拒绝。要激活对等连接，接受方中转网关的所有者必须接受对等连接请求，即使两个中转网关位于同一账户中。接受来自接受方中转网关所在区域的对等连接挂载请求。或者，如果您拒绝对等连接，则必须拒绝来自接受方中转网关所在区域的请求。

**使用控制台接受对等连接挂载请求**

1. 通过以下网址打开 Amazon VPC 控制台：[https://console.aws.amazon.com/vpc/](https://console.aws.amazon.com/vpc/)。

1. 在导航窗格中，选择 **Transit Gateway Attachments (中转网关挂载)**。

1. 选择等待接受的中转网关对等挂载。

1. 选择 **Actions** (操作)、**Accept transit gateway attachment** (接受中转网关挂载)。

1. 将静态路由添加到中转网关路由表中。有关更多信息，请参阅 [在 AWS Transit Gateway 中创建静态路由](tgw-create-static-route.md)。

**使用控制台拒绝对等连接挂载请求**

1. 通过以下网址打开 Amazon VPC 控制台：[https://console.aws.amazon.com/vpc/](https://console.aws.amazon.com/vpc/)。

1. 在导航窗格中，选择 **Transit Gateway Attachments (中转网关挂载)**。

1. 选择等待接受的中转网关对等挂载。

1. 选择 **Actions** (操作)、**Reject transit gateway attachment** (拒绝中转网关挂载)。

**使用 AWS CLI 接受或拒绝对等连接**  
使用 [accept-transit-gateway-peering-attachment](https://docs.aws.amazon.com/cli/latest/reference/ec2/accept-transit-gateway-peering-attachment.html) 和 [reject-transit-gateway-peering-attachment](https://docs.aws.amazon.com/cli/latest/reference/ec2/reject-transit-gateway-peering-attachment.html) 命令。