deleteConnection method

Future<Connection> deleteConnection({
  1. required String connectionId,
})

Deletes the specified connection.

Deleting a connection only stops the Direct Connect port hour and data transfer charges. If you are partnering with any third parties to connect with the Direct Connect location, you must cancel your service with them separately.

May throw DirectConnectClientException. May throw DirectConnectServerException.

Parameter connectionId : The ID of the connection.

Implementation

Future<Connection> deleteConnection({
  required String connectionId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.DeleteConnection'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'connectionId': connectionId,
    },
  );

  return Connection.fromJson(jsonResponse.body);
}