Deletes the specified connection.
Deleting a connection only stops the Direct Connect port hour and data transfer charges. If you are partnering with any third parties to connect with the Direct Connect location, you must cancel your service with them separately.
Parameters:
Raises:
Source code in docs_src/capo_direct_connect/_services/direct_connect.py
| def delete_connection(
self,
connection_id: "capo_direct_connect.types.connection_id.ConnectionId",
*,
config_overrides: Optional[DirectConnectClientConfig] = None,
) -> "capo_direct_connect.types.connection.Connection":
"""<p>Deletes the specified connection.</p> <p>Deleting a connection only stops the Direct Connect port hour and data transfer charges. If you are partnering with any third parties to connect with the Direct Connect location, you must cancel your service with them separately.</p>
Args:
connection_id: <p>The ID of the connection.</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.delete_connection_request.DeleteConnectionRequest]",
) -> OperationResponse["capo_direct_connect.types.connection.Connection"]:
import capo_direct_connect._operations.overture_service.delete_connection
output, http_response = (
capo_direct_connect._operations.overture_service.delete_connection.delete_connection(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteConnection")
)
input_: capo_direct_connect.types.delete_connection_request.DeleteConnectionRequest = {
"connection_id": connection_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|