describeInterconnects method

Future<Interconnects> describeInterconnects({
  1. String? interconnectId,
})

Lists the interconnects owned by the AWS account or only the specified interconnect.

May throw DirectConnectServerException. May throw DirectConnectClientException.

Parameter interconnectId : The ID of the interconnect.

Implementation

Future<Interconnects> describeInterconnects({
  String? interconnectId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.DescribeInterconnects'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (interconnectId != null) 'interconnectId': interconnectId,
    },
  );

  return Interconnects.fromJson(jsonResponse.body);
}