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.
Parameters:
-
connection_id
(ConnectionId)
–
The ID of the connection on which the private virtual interface is provisioned.
-
owner_account
(OwnerAccount)
–
The ID of the Amazon Web Services account that owns the virtual private interface.
-
new_private_virtual_interface_allocation
(NewPrivateVirtualInterfaceAllocation)
–
Information about the private virtual interface.
Raises:
Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
| async def allocate_private_virtual_interface(
self,
connection_id: "capo_direct_connect.types.connection_id.ConnectionId",
owner_account: "capo_direct_connect.types.owner_account.OwnerAccount",
new_private_virtual_interface_allocation: "capo_direct_connect.types.new_private_virtual_interface_allocation.NewPrivateVirtualInterfaceAllocation",
*,
config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> "capo_direct_connect.types.virtual_interface.VirtualInterface":
"""<p>Provisions a private virtual interface to be owned by the specified Amazon Web Services account.</p> <p>Virtual interfaces created using this action must be confirmed by the owner using <a>ConfirmPrivateVirtualInterface</a>. Until then, the virtual interface is in the <code>Confirming</code> state and is not available to handle traffic.</p>
Args:
connection_id: <p>The ID of the connection on which the private virtual interface is provisioned.</p>
owner_account: <p>The ID of the Amazon Web Services account that owns the virtual private interface.</p>
new_private_virtual_interface_allocation: <p>Information about the private virtual interface.</p>
Raises:
capo_direct_connect.errors.direct_connect_client_exception.DirectConnectClientException: <p>One or more parameters are not valid.</p>
capo_direct_connect.errors.direct_connect_server_exception.DirectConnectServerException: <p>A server-side error occurred.</p>
capo_direct_connect.errors.duplicate_tag_keys_exception.DuplicateTagKeysException: <p>A tag key was specified more than once.</p>
capo_direct_connect.errors.limit_exceeded_exception.LimitExceededException: <p>The rate limiter limit has been exceeded for the connection. You cannot add more rate limiters to virtual interfaces on this connection.</p>
capo_direct_connect.errors.too_many_tags_exception.TooManyTagsException: <p>You have reached the limit on the number of tags that can be assigned.</p>
capo_direct_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_direct_connect.types.allocate_private_virtual_interface_request.AllocatePrivateVirtualInterfaceRequest]",
) -> AsyncOperationResponse[
"capo_direct_connect.types.virtual_interface.VirtualInterface"
]:
import capo_direct_connect._operations.overture_service.allocate_private_virtual_interface
(
output,
http_response,
) = await capo_direct_connect._operations.overture_service.allocate_private_virtual_interface.async_allocate_private_virtual_interface(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AllocatePrivateVirtualInterface")
)
input_: capo_direct_connect.types.allocate_private_virtual_interface_request.AllocatePrivateVirtualInterfaceRequest = {
"connection_id": connection_id,
"owner_account": owner_account,
"new_private_virtual_interface_allocation": new_private_virtual_interface_allocation,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|