confirmPrivateVirtualInterface method

Future<ConfirmPrivateVirtualInterfaceResponse> confirmPrivateVirtualInterface({
  1. required String virtualInterfaceId,
  2. String? directConnectGatewayId,
  3. String? virtualGatewayId,
})

Accepts ownership of a private virtual interface created by another AWS account.

After the virtual interface owner makes this call, the virtual interface is created and attached to the specified virtual private gateway or Direct Connect gateway, and is made available to handle traffic.

May throw DirectConnectServerException. May throw DirectConnectClientException.

Parameter virtualInterfaceId : The ID of the virtual interface.

Parameter directConnectGatewayId : The ID of the Direct Connect gateway.

Parameter virtualGatewayId : The ID of the virtual private gateway.

Implementation

Future<ConfirmPrivateVirtualInterfaceResponse>
    confirmPrivateVirtualInterface({
  required String virtualInterfaceId,
  String? directConnectGatewayId,
  String? virtualGatewayId,
}) async {
  ArgumentError.checkNotNull(virtualInterfaceId, 'virtualInterfaceId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.ConfirmPrivateVirtualInterface'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'virtualInterfaceId': virtualInterfaceId,
      if (directConnectGatewayId != null)
        'directConnectGatewayId': directConnectGatewayId,
      if (virtualGatewayId != null) 'virtualGatewayId': virtualGatewayId,
    },
  );

  return ConfirmPrivateVirtualInterfaceResponse.fromJson(jsonResponse.body);
}