Provisions a public virtual interface to be owned by the specified Amazon Web Services account.
The owner of a connection calls this function to provision a public virtual interface to be owned by the specified Amazon Web Services 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.
Parameters:
-
connection_id
(ConnectionId)
–
The ID of the connection on which the public virtual interface is provisioned.
-
owner_account
(OwnerAccount)
–
The ID of the Amazon Web Services account that owns the public virtual interface.
-
new_public_virtual_interface_allocation
(NewPublicVirtualInterfaceAllocation)
–
Information about the public virtual interface.
Raises:
Source code in docs_src/capo_direct_connect/_services/direct_connect.py
| def allocate_public_virtual_interface(
self,
connection_id: "capo_direct_connect.types.connection_id.ConnectionId",
owner_account: "capo_direct_connect.types.owner_account.OwnerAccount",
new_public_virtual_interface_allocation: "capo_direct_connect.types.new_public_virtual_interface_allocation.NewPublicVirtualInterfaceAllocation",
*,
config_overrides: Optional[DirectConnectClientConfig] = None,
) -> "capo_direct_connect.types.virtual_interface.VirtualInterface":
"""<p>Provisions a public virtual interface to be owned by the specified Amazon Web Services account.</p> <p>The owner of a connection calls this function to provision a public virtual interface to be owned by the specified Amazon Web Services account.</p> <p>Virtual interfaces created using this function must be confirmed by the owner using <a>ConfirmPublicVirtualInterface</a>. Until this step has been completed, the virtual interface is in the <code>confirming</code> state and is not available to handle traffic.</p> <p>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.</p>
Args:
connection_id: <p>The ID of the connection on which the public virtual interface is provisioned.</p>
owner_account: <p>The ID of the Amazon Web Services account that owns the public virtual interface.</p>
new_public_virtual_interface_allocation: <p>Information about the public 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.
"""
def _handler(
req: "OperationRequest[capo_direct_connect.types.allocate_public_virtual_interface_request.AllocatePublicVirtualInterfaceRequest]",
) -> OperationResponse[
"capo_direct_connect.types.virtual_interface.VirtualInterface"
]:
import capo_direct_connect._operations.overture_service.allocate_public_virtual_interface
output, http_response = (
capo_direct_connect._operations.overture_service.allocate_public_virtual_interface.allocate_public_virtual_interface(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AllocatePublicVirtualInterface")
)
input_: capo_direct_connect.types.allocate_public_virtual_interface_request.AllocatePublicVirtualInterfaceRequest = {
"connection_id": connection_id,
"owner_account": owner_account,
"new_public_virtual_interface_allocation": new_public_virtual_interface_allocation,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|