deleteConnection method
Deletes an existing Connection with the supplied identifier.
This operation will also inform the remote partner of your intention to delete your connection. Note, the partner may still require you to delete to fully clean up resources, but the network connectivity provided by the Connection will cease to exist.
Parameter identifier :
The identifier of the Connection to be deleted.
Parameter clientToken :
Idempotency token used for the request.
Implementation
Future<DeleteConnectionResponse> deleteConnection({
required String identifier,
String? clientToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'Interconnect.DeleteConnection'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'identifier': identifier,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
},
);
return DeleteConnectionResponse.fromJson(jsonResponse.body);
}