HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/doc/awscli/examples/directconnect/create-direct-connect-gateway-association.rst
**To associate a virtual private gateway with a Direct Connect gateway**

The following example associates virtual private gateway ``vgw-6efe725e`` with Direct Connect gateway ``5f294f92-bafb-4011-916d-9b0bexample``. You must run the command in the region in which the virtual private gateway is located.

Command::

  aws directconnect create-direct-connect-gateway-association --direct-connect-gateway-id 5f294f92-bafb-4011-916d-9b0bexample --virtual-gateway-id vgw-6efe725e

Output::

  {
    "directConnectGatewayAssociation": {
        "associationState": "associating", 
        "virtualGatewayOwnerAccount": "123456789012", 
        "directConnectGatewayId": "5f294f92-bafb-4011-916d-9b0bexample", 
        "virtualGatewayId": "vgw-6efe725e", 
        "virtualGatewayRegion": "us-east-2"
    }
  }