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. You must specify a Direct Connect gateway, a virtual private gateway, or both. If you specify a Direct Connect gateway, the response contains all virtual private gateways associated with the Direct Connect gateway. If you specify a virtual private gateway, the response contains all Direct Connect gateways associated with the virtual private gateway. If you specify both, the response contains the association between the Direct Connect gateway and the virtual private gateway.

May throw DirectConnectServerException. May throw DirectConnectClientException.

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.

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);
}