updateLag method

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

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

You can update the following LAG 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.
  • The LAG's MACsec encryption mode.

    Amazon Web Services assigns this value to each connection which is part of the LAG.

  • The tags

May throw DirectConnectClientException. May throw DirectConnectServerException.

Parameter lagId : The ID of the LAG.

Parameter encryptionMode : The LAG MAC Security (MACsec) encryption mode.

Amazon Web Services applies the value to all connections which are part 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? encryptionMode,
  String? lagName,
  int? minimumLinks,
}) async {
  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 (encryptionMode != null) 'encryptionMode': encryptionMode,
      if (lagName != null) 'lagName': lagName,
      if (minimumLinks != null) 'minimumLinks': minimumLinks,
    },
  );

  return Lag.fromJson(jsonResponse.body);
}