updateLag method

Future<Lag> updateLag({
  1. required String lagId,
  2. String? lagName,
  3. int? minimumLinks,
})

Updates the attributes of the specified link aggregation group (LAG).

You can update the following attributes:

  • The name of the LAG.
  • The value for the minimum number of connections that must be operational for the LAG itself to be operational.
When you create a LAG, the default value for the minimum number of operational connections is zero (0). If you update this value and the number of operational connections falls below the specified value, the LAG automatically goes down to avoid over-utilization of the remaining connections. Adjust this value with care, as it could force the LAG down if it is set higher than the current number of operational connections.

May throw DirectConnectServerException. May throw DirectConnectClientException.

Parameter lagId : The ID of the LAG.

Parameter lagName : The name of the LAG.

Parameter minimumLinks : The minimum number of physical connections that must be operational for the LAG itself to be operational.

Implementation

Future<Lag> updateLag({
  required String lagId,
  String? lagName,
  int? minimumLinks,
}) async {
  ArgumentError.checkNotNull(lagId, 'lagId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.UpdateLag'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'lagId': lagId,
      if (lagName != null) 'lagName': lagName,
      if (minimumLinks != null) 'minimumLinks': minimumLinks,
    },
  );

  return Lag.fromJson(jsonResponse.body);
}