deleteConnection method
Deletes the specified connection.
Deleting a connection only stops the AWS Direct Connect port hour and data transfer charges. If you are partnering with any third parties to connect with the AWS Direct Connect location, you must cancel your service with them separately.
May throw DirectConnectServerException. May throw DirectConnectClientException.
Parameter connectionId
:
The ID of the connection.
Implementation
Future<Connection> deleteConnection({
required String connectionId,
}) async {
ArgumentError.checkNotNull(connectionId, 'connectionId');
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);
}