describeDirectConnectGatewayAssociations method

Future<DescribeDirectConnectGatewayAssociationsResult> describeDirectConnectGatewayAssociations({
  1. String? associatedGatewayId,
  2. String? associationId,
  3. String? directConnectGatewayId,
  4. int? maxResults,
  5. String? nextToken,
  6. String? virtualGatewayId,
})

Lists the associations between your Direct Connect gateways and virtual private gateways and transit gateways. You must specify one of the following:

  • A Direct Connect gateway

    The response contains all virtual private gateways and transit gateways associated with the Direct Connect gateway.

  • A virtual private gateway

    The response contains the Direct Connect gateway.

  • A transit gateway

    The response contains the Direct Connect gateway.

  • A Direct Connect gateway and a virtual private gateway

    The response contains the association between the Direct Connect gateway and virtual private gateway.

  • A Direct Connect gateway and a transit gateway

    The response contains the association between the Direct Connect gateway and transit gateway.

  • A Direct Connect gateway and a virtual private gateway

    The response contains the association between the Direct Connect gateway and virtual private gateway.

  • A Direct Connect gateway association to a Cloud WAN core network

    The response contains the Cloud WAN core network ID that the Direct Connect gateway is associated to.

May throw DirectConnectClientException. May throw DirectConnectServerException.

Parameter associatedGatewayId : The ID of the associated gateway.

Parameter associationId : The ID of the Direct Connect gateway association.

Parameter directConnectGatewayId : The ID of the Direct Connect gateway.

Parameter maxResults : The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

If MaxResults is given a value larger than 100, only 100 results are returned.

Parameter nextToken : The token provided in the previous call to retrieve the next page.

Parameter virtualGatewayId : The ID of the virtual private gateway or transit gateway.

Implementation

Future<DescribeDirectConnectGatewayAssociationsResult>
    describeDirectConnectGatewayAssociations({
  String? associatedGatewayId,
  String? associationId,
  String? directConnectGatewayId,
  int? maxResults,
  String? nextToken,
  String? virtualGatewayId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.DescribeDirectConnectGatewayAssociations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (associatedGatewayId != null)
        'associatedGatewayId': associatedGatewayId,
      if (associationId != null) 'associationId': associationId,
      if (directConnectGatewayId != null)
        'directConnectGatewayId': directConnectGatewayId,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
      if (virtualGatewayId != null) 'virtualGatewayId': virtualGatewayId,
    },
  );

  return DescribeDirectConnectGatewayAssociationsResult.fromJson(
      jsonResponse.body);
}