updateConnection method
Updates the Direct Connect connection configuration.
You can update the following parameters for a connection:
- The connection name
- The connection's MAC Security (MACsec) encryption mode.
May throw DirectConnectClientException.
May throw DirectConnectServerException.
Parameter connectionId :
The ID of the connection.
You can use DescribeConnections to retrieve the connection ID.
Parameter connectionName :
The name of the connection.
Parameter encryptionMode :
The connection MAC Security (MACsec) encryption mode.
The valid values are no_encrypt, should_encrypt,
and must_encrypt.
Implementation
Future<Connection> updateConnection({
required String connectionId,
String? connectionName,
String? encryptionMode,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'OvertureService.UpdateConnection'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'connectionId': connectionId,
if (connectionName != null) 'connectionName': connectionName,
if (encryptionMode != null) 'encryptionMode': encryptionMode,
},
);
return Connection.fromJson(jsonResponse.body);
}