associateHostedConnection method
Associates a hosted connection and its virtual interfaces with a link aggregation group (LAG) or interconnect. If the target interconnect or LAG has an existing hosted connection with a conflicting VLAN number or IP address, the operation fails. This action temporarily interrupts the hosted connection's connectivity to AWS as it is being migrated.
May throw DirectConnectServerException. May throw DirectConnectClientException.
Parameter connectionId
:
The ID of the hosted connection.
Parameter parentConnectionId
:
The ID of the interconnect or the LAG.
Implementation
Future<Connection> associateHostedConnection({
required String connectionId,
required String parentConnectionId,
}) async {
ArgumentError.checkNotNull(connectionId, 'connectionId');
ArgumentError.checkNotNull(parentConnectionId, 'parentConnectionId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'OvertureService.AssociateHostedConnection'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'connectionId': connectionId,
'parentConnectionId': parentConnectionId,
},
);
return Connection.fromJson(jsonResponse.body);
}