az webapp config connection-string list \
--name \
--resource-group \
--query "[?name==''].[name,value]" \
--output tsv \
| awk '{print $2}' \
| sed 's/\r//g' \
| base64 --decode
其中,
az webapp config connection-string list \
--name myapp \
--resource-group myresourcegroup \
--query "[?name=='MyConnectionString'].[name,value]" \
--output tsv \
| awk '{print $2}' \
| sed 's/\r//g' \
| base64 --decode
string connString = Environment.GetEnvironmentVariable("", EnvironmentVariableTarget.Process);
其中,
string connString = Environment.GetEnvironmentVariable("MyConnectionString", EnvironmentVariableTarget.Process);