Deleting a direct link and its attached connections
You can delete a direct link either before or after the gateway moves to the Provisioned
state. However, you cannot delete a gateway during the In review
and some In progress
states.
Deleting a direct link in the UI
To delete a gateway from the Direct Link table, click Delete from the Actions menu for the gateway that you want to delete. Alternatively, you can click Actions > Delete on the gateway's details page. Click Delete again to confirm the deletion.
If any virtual connections are attached to the gateway, you must detach them before you delete the gateway. To detach a virtual connection, click Delete next to the connection entry on the gateway's details page. Then, click Delete to confirm.
Deleting a direct link from the CLI
You can delete an existing direct link with the CLI by using the ibmcloud dl gateway-delete
command. For example, this command shows how to delete a direct link without confirmation.
ibmcloud dl gateway-delete e281b18b-0dba-49ee-9c64-aea588b7f1fd
Deleting a direct link with the API
Curl example:
DL_ENDPOINT="directlink.cloud.ibm.com"
curl -X DELETE https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID?version=2019-12-13 -H "authorization: Bearer $IAM_TOKEN"
Python example:
from ibm_cloud_networking_services import DirectLinkV1
# Initializing {direct_link} refer Authentication
direct_link.delete_gateway(id=${gatewayId})
For more information, including Java, Node, and Go examples, see "Delete gateway" in the Direct Link API reference.