describeDirectConnectGatewayAttachments method

Future<DescribeDirectConnectGatewayAttachmentsResult> describeDirectConnectGatewayAttachments({
  1. String? directConnectGatewayId,
  2. int? maxResults,
  3. String? nextToken,
  4. String? virtualInterfaceId,
})

Lists the attachments between your Direct Connect gateways and virtual interfaces. You must specify a Direct Connect gateway, a virtual interface, or both. If you specify a Direct Connect gateway, the response contains all virtual interfaces attached to the Direct Connect gateway. If you specify a virtual interface, the response contains all Direct Connect gateways attached to the virtual interface. If you specify both, the response contains the attachment between the Direct Connect gateway and the virtual interface.

May throw DirectConnectServerException. May throw DirectConnectClientException.

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 virtualInterfaceId : The ID of the virtual interface.

Implementation

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

  return DescribeDirectConnectGatewayAttachmentsResult.fromJson(
      jsonResponse.body);
}