Disassociates a connection from a link aggregation group (LAG). The connection is interrupted and re-established as a standalone connection (the connection is not deleted; to delete the connection, use the DeleteConnection request). If the LAG has associated virtual interfaces or hosted connections, they remain associated with the LAG. A disassociated connection owned by an Direct Connect Partner is automatically converted to an interconnect.
If disassociating the connection would cause the LAG to fall below its setting for minimum number of operational connections, the request fails, except when it's the last member of the LAG. If all connections are disassociated, the LAG continues to exist as an empty LAG with no physical connections.
Parameters:
Raises:
Source code in docs_src/capo_direct_connect/_services/direct_connect.py
| def disassociate_connection_from_lag(
self,
connection_id: "capo_direct_connect.types.connection_id.ConnectionId",
lag_id: "capo_direct_connect.types.lag_id.LagId",
*,
config_overrides: Optional[DirectConnectClientConfig] = None,
) -> "capo_direct_connect.types.connection.Connection":
"""<p>Disassociates a connection from a link aggregation group (LAG). The connection is interrupted and re-established as a standalone connection (the connection is not deleted; to delete the connection, use the <a>DeleteConnection</a> request). If the LAG has associated virtual interfaces or hosted connections, they remain associated with the LAG. A disassociated connection owned by an Direct Connect Partner is automatically converted to an interconnect.</p> <p>If disassociating the connection would cause the LAG to fall below its setting for minimum number of operational connections, the request fails, except when it's the last member of the LAG. If all connections are disassociated, the LAG continues to exist as an empty LAG with no physical connections. </p>
Args:
connection_id: <p>The ID of the connection.</p>
lag_id: <p>The ID of 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.
"""
def _handler(
req: "OperationRequest[capo_direct_connect.types.disassociate_connection_from_lag_request.DisassociateConnectionFromLagRequest]",
) -> OperationResponse["capo_direct_connect.types.connection.Connection"]:
import capo_direct_connect._operations.overture_service.disassociate_connection_from_lag
output, http_response = (
capo_direct_connect._operations.overture_service.disassociate_connection_from_lag.disassociate_connection_from_lag(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisassociateConnectionFromLag")
)
input_: capo_direct_connect.types.disassociate_connection_from_lag_request.DisassociateConnectionFromLagRequest = {
"connection_id": connection_id,
"lag_id": lag_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|