associateHostedConnection method

Future<Connection> associateHostedConnection({
  1. required String connectionId,
  2. required String parentConnectionId,
})

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 Amazon Web Services as it is being migrated.

May throw DirectConnectClientException. May throw DirectConnectServerException.

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 {
  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);
}