allocatePrivateVirtualInterface method
Future<VirtualInterface>
allocatePrivateVirtualInterface({
- required String connectionId,
- required NewPrivateVirtualInterfaceAllocation newPrivateVirtualInterfaceAllocation,
- required String ownerAccount,
Provisions a private virtual interface to be owned by the specified AWS 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 DuplicateTagKeysException. May throw TooManyTagsException. May throw DirectConnectServerException. May throw DirectConnectClientException.
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 AWS account that owns the virtual private interface.
Implementation
Future<VirtualInterface> allocatePrivateVirtualInterface({
required String connectionId,
required NewPrivateVirtualInterfaceAllocation
newPrivateVirtualInterfaceAllocation,
required String ownerAccount,
}) async {
ArgumentError.checkNotNull(connectionId, 'connectionId');
ArgumentError.checkNotNull(newPrivateVirtualInterfaceAllocation,
'newPrivateVirtualInterfaceAllocation');
ArgumentError.checkNotNull(ownerAccount, 'ownerAccount');
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);
}