allocatePublicVirtualInterface method
- required String connectionId,
- required NewPublicVirtualInterfaceAllocation newPublicVirtualInterfaceAllocation,
- required String ownerAccount,
Provisions a public virtual interface to be owned by the specified AWS account.
The owner of a connection calls this function to provision a public virtual interface to be owned by the specified AWS account.
Virtual interfaces created using this function must be confirmed by the
owner using ConfirmPublicVirtualInterface. Until this step has been
completed, the virtual interface is in the confirming
state
and is not available to handle traffic.
When creating an IPv6 public virtual interface, omit the Amazon address and customer address. IPv6 addresses are automatically assigned from the Amazon pool of IPv6 addresses; you cannot specify custom IPv6 addresses.
May throw DuplicateTagKeysException. May throw TooManyTagsException. May throw DirectConnectServerException. May throw DirectConnectClientException.
Parameter connectionId
:
The ID of the connection on which the public virtual interface is
provisioned.
Parameter newPublicVirtualInterfaceAllocation
:
Information about the public virtual interface.
Parameter ownerAccount
:
The ID of the AWS account that owns the public virtual interface.
Implementation
Future<VirtualInterface> allocatePublicVirtualInterface({
required String connectionId,
required NewPublicVirtualInterfaceAllocation
newPublicVirtualInterfaceAllocation,
required String ownerAccount,
}) async {
ArgumentError.checkNotNull(connectionId, 'connectionId');
ArgumentError.checkNotNull(newPublicVirtualInterfaceAllocation,
'newPublicVirtualInterfaceAllocation');
ArgumentError.checkNotNull(ownerAccount, 'ownerAccount');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'OvertureService.AllocatePublicVirtualInterface'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'connectionId': connectionId,
'newPublicVirtualInterfaceAllocation':
newPublicVirtualInterfaceAllocation,
'ownerAccount': ownerAccount,
},
);
return VirtualInterface.fromJson(jsonResponse.body);
}