Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 2.14 KB

deleting_gateway.md

File metadata and controls

64 lines (45 loc) · 2.14 KB
copyright lastupdated keywords subcollection
years
2020, 2024
2024-06-19
direct link
dl

{{site.data.keyword.attribute-definition-list}}

Deleting a direct link and its attached connections

{: #delete-direct-link-gateway} {: help} {: support}

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. {: shortdesc}

Deleting a direct link in the UI

{: #deleting-a-direct-link-using-the-ui} {: ui}

To delete a gateway from the {{site.data.keyword.dl_short}} table, click Delete from the Actions Actions menu 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 Delete icon next to the connection entry on the gateway's details page. Then, click Delete to confirm. {: important}

Deleting a direct link from the CLI

{: #deleting-direct-link-cli} {: 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

{: pre}

Deleting a direct link with the API

{: #deleting-direct-link-api} {: 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})

{: pre}

For more information, including Java, Node, and Go examples, see "Delete gateway" in the Direct Link API reference. {: note}