CreateDirectConnectGatewayAssociation
In this article:
CreateDirectConnectGatewayAssociation#
Description#
Creates a Direct Connect gateway association with a transit gateway.
Request Parameters#
addAllowedPrefixesToDirectConnectGateway — The list of subnets allowed to be advertised via BGP to the user equipment.
Type: List of RouteFilterPrefix objects
Required: Yes
Constraints: Should not overlap with the prefixes of associations of this Direct Connect gateway
directConnectGatewayId — The ID of the Direct Connect gateway.
Type: String
Required: Yes
gatewayId — The ID of the transit gateway.
Type: String
Required: Yes
Response Elements#
directConnectGatewayAssociation — Information about the Direct Connect gateway association.
Type: DirectConnectGatewayAssociation object
Examples#
Request
https://directconnect.k2.cloud/?Action=CreateDirectConnectGatewayAssociation
&directConnectGatewayId=dxgw-A1BF7297
&gatewayId=tgw-83EDA0ED
&addAllowedPrefixesToDirectConnectGateway.0.cidr=10.0.0.0/24
Response
{
"directConnectGatewayAssociation": {
"directConnectGatewayId": "dxgw-A1BF7297",
"directConnectGatewayOwnerAccount": "user-1@c2dev",
"associationState": "associated",
"associatedGateway": {
"id": "tgw-83EDA0ED",
"type": "transitGateway",
"onwerAccount": "user-1@c2dev"
},
"associationId": "dxassoc-4419A549",
"allowedPrefixesToDirectConnectGateway": [
{
"cidr": "10.0.0.0/24"
}
]
}
}
c2-dc CreateDirectConnectGatewayAssociation directConnectGatewayId dxgw-A1BF7297 gatewayId tgw-83EDA0ED addAllowedPrefixesToDirectConnectGateway.0.cidr "10.0.0.0/24"