disassociateConnectionFromLag method

Future<Connection> disassociateConnectionFromLag(
  1. {required String connectionId,
  2. required String lagId}
)

Disassociates a connection from a link aggregation group (LAG). The connection is interrupted and re-established as a standalone connection (the connection is not deleted; to delete the connection, use the DeleteConnection request). If the LAG has associated virtual interfaces or hosted connections, they remain associated with the LAG. A disassociated connection owned by an AWS Direct Connect Partner is automatically converted to an interconnect.

If disassociating the connection would cause the LAG to fall below its setting for minimum number of operational connections, the request fails, except when it's the last member of the LAG. If all connections are disassociated, the LAG continues to exist as an empty LAG with no physical connections.

May throw DirectConnectServerException. May throw DirectConnectClientException.

Parameter connectionId : The ID of the connection.

Parameter lagId : The ID of the LAG.

Implementation

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

  return Connection.fromJson(jsonResponse.body);
}