This article explains how to revert a private link azure storage
account back to a public link one.
1. Re-enable the "public network access" for the storage account as shown:
2. Delete the “private endpoint” connection as shown:
2. Generate a new SAS token for the storage account
and then turn off the private link connection by using
Create or Update Storage instance API and nullifying the privateLinkServiceConnection
parameter in the API request as shown:
The
following code snippet only shows how to use the nullifying parameter in Python.
It might be different for other languages.
- import requests
- url = "https://api.mk.io/api/v1/projects/projectName/media/storage/storageAccountName"
- payload = {
- "spec": {
- "credential": {
- "sasToken": "New SAS Token"
- },
- "privateLinkServiceConnection": None,
- "type": "Microsoft.Storage",
- "url": "Storage Account URL"
- }
- }
- headers = {
- "accept": "application/json",
- "content-type": "application/json",
- "authorization": "API Token"
- }
- response = requests.put(url, json=payload, headers=headers)
- print(response.status_code)
- print(response.text)
3. Lastly, confirm
and make sure that the new SAS token is in a validated state and that all the assets
under the updated storage account are accessible.