deleteNetworkConnector method

Future<DeleteNetworkConnectorResponse> deleteNetworkConnector({
  1. required String identifier,
})

Initiates deletion of a network connector. The connector transitions to DELETING state while elastic network interfaces are cleaned up asynchronously. After deletion completes, subsequent calls to GetNetworkConnector return ResourceNotFoundException.

This operation is idempotent — calling delete on a connector that is already deleting or has been deleted succeeds without error. You can delete connectors in ACTIVE or FAILED states. Before deleting a connector, ensure that no Lambda MicroVMs are using it, as they will lose VPC egress connectivity immediately.

May throw InvalidParameterValueException. May throw ResourceConflictException. May throw ResourceNotFoundException. May throw ServiceException. May throw TooManyRequestsException.

Implementation

Future<DeleteNetworkConnectorResponse> deleteNetworkConnector({
  required String identifier,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/2026-04-04/network-connectors/${Uri.encodeComponent(identifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteNetworkConnectorResponse.fromJson(response);
}