Updating a direct link
You can update a direct link either before or after the gateway moves to the Provisioned state. However, a gateway is restricted from editing during In review, Configuring, and some in-progress states.
Updating a direct link in the UI
To edit a direct link, follow these steps:
-
Click the Direct Link name in the table to show its details. Alternatively, you can click the Actions icon at the end of the table row of a provisioned direct link to edit gateway features.sc
If your Direct Link connection was ordered through a third-party service provider (as described in IBM Cloud Getting started with IBM Cloud Direct Link), you might not be able to edit your BGP configuration as described here. The direct link's details page will display a note stating, "This direct link is read-only. Link-specific actions must be initiated through the provider portal." To edit your BGP configuration, contact your provider either directly, or through the provider's portal.
-
Click Edit link in the upper right of the Details or BGP section. A page with the current configuration shows. For example, you can update the BGP Autonomous System Number (ASN), or enable a BGP feature.
Important: Keep in mind that the following tasks result in downtime where traffic is interrupted:
- Activating and deactivating MD5 authentication, or rotating MD5 key authentication after a BGP session is established
- Activating and deactivating Bidirectional Forwarding Detection (BFD) after establishing a BGP session
- Modifying BGP ASN and BGP peer IP addresses after initial configuration
-
Update the content as needed.
If you modify the speed or routing option, the pricing changes. Any updated charges take effect during the next billing cycle.
-
Read and agree to the Direct Link prerequisites.
-
Click Submit for your changes to take effect.
Configuration updates start automatically after you click Submit. Notice that the gateway changes to Configuring state in the Direct Link table, followed by Provisioned when the update is completed.
Updating a direct link from the CLI
You can update an existing direct link with the CLI with the ibmcloud dl gateway-update
command. For example, the following command shows how to update a direct
link without confirmation.
ibmcloud dl gateway-update 8ba9e7b0-dded-400e-ad7e-6481dad0b157 --speed-mbps 5000 --name dl-gw-updated --output json
Updating direct link with the API
Curl example:
DL_ENDPOINT="directlink.cloud.ibm.com"
curl -X PATCH https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID?version=2019-12-13 -H "authorization: Bearer $IAM_TOKEN"-d '{
"name": "new_gateway_name"
}'
Python example:
Import json
From ibm_cloud_networking_services importDirectLinkV1
fromibm_cloud_networking_services.direct_link_v1 import(
GatewayMacsecConfigPatchTemplate)
fromibm_cloud_networking_services.direct_link_v1 import(
GatewayMacsecConfigPatchTemplateFallbackCak)
# Initializing {direct_link} refer Authenticationfallback_cak_template = GatewayMacsecConfigPatchTemplateFallbackCak(crn=${macsecCak})
macsec_patch_template = GatewayMacsecConfigPatchTemplate(fallback_cak=fallback_cak_template)
gateway = direct_link.update_gateway(id=${gatewayId}, macsec_config=macsec_patch_template).get_result()
print(json.dumps(gateway, indent=2))
For more information, including Java, Node, and Go examples, see "Update gateway" in the Direct Link API reference.