Associates a hosted connection and its virtual interfaces with a link aggregation group (LAG) or interconnect. If the target interconnect or LAG has an existing hosted connection with a conflicting VLAN number or IP address, the operation fails. This action temporarily interrupts the hosted connection's connectivity to Amazon Web Services as it is being migrated.
Intended for use by Direct Connect Partners only.
Parameters:
-
connection_id
(ConnectionId)
–
The ID of the hosted connection.
-
parent_connection_id
(ConnectionId)
–
The ID of the interconnect or the LAG.
Raises:
Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
| async def associate_hosted_connection(
self,
connection_id: "capo_direct_connect.types.connection_id.ConnectionId",
parent_connection_id: "capo_direct_connect.types.connection_id.ConnectionId",
*,
config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> "capo_direct_connect.types.connection.Connection":
"""<p>Associates a hosted connection and its virtual interfaces with a link aggregation group (LAG) or interconnect. If the target interconnect or LAG has an existing hosted connection with a conflicting VLAN number or IP address, the operation fails. This action temporarily interrupts the hosted connection's connectivity to Amazon Web Services as it is being migrated.</p> <note> <p>Intended for use by Direct Connect Partners only.</p> </note>
Args:
connection_id: <p>The ID of the hosted connection.</p>
parent_connection_id: <p>The ID of the interconnect or the LAG.</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.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_direct_connect.types.associate_hosted_connection_request.AssociateHostedConnectionRequest]",
) -> AsyncOperationResponse["capo_direct_connect.types.connection.Connection"]:
import capo_direct_connect._operations.overture_service.associate_hosted_connection
(
output,
http_response,
) = await capo_direct_connect._operations.overture_service.associate_hosted_connection.async_associate_hosted_connection(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssociateHostedConnection")
)
input_: capo_direct_connect.types.associate_hosted_connection_request.AssociateHostedConnectionRequest = {
"connection_id": connection_id,
"parent_connection_id": parent_connection_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|