allocatePrivateVirtualInterface method
Provisions a private virtual interface to be owned by the specified Amazon Web Services account.
Virtual interfaces created using this action must be confirmed by the
owner using ConfirmPrivateVirtualInterface. Until then, the virtual
interface is in the Confirming state and is not available to
handle traffic.
May throw DirectConnectClientException.
May throw DirectConnectServerException.
May throw DuplicateTagKeysException.
May throw TooManyTagsException.
Parameter connectionId :
The ID of the connection on which the private virtual interface is
provisioned.
Parameter newPrivateVirtualInterfaceAllocation :
Information about the private virtual interface.
Parameter ownerAccount :
The ID of the Amazon Web Services account that owns the virtual private
interface.
Implementation
Future<VirtualInterface> allocatePrivateVirtualInterface({
required String connectionId,
required NewPrivateVirtualInterfaceAllocation
newPrivateVirtualInterfaceAllocation,
required String ownerAccount,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'OvertureService.AllocatePrivateVirtualInterface'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'connectionId': connectionId,
'newPrivateVirtualInterfaceAllocation':
newPrivateVirtualInterfaceAllocation,
'ownerAccount': ownerAccount,
},
);
return VirtualInterface.fromJson(jsonResponse.body);
}