Get connection configurations added by Service Connector

Service Connector configures connection information, such as Database connection string, while creating or updating service connections. After service connections are created, you might want to write code to consume these connection configurations in code. This page shows how to get connection configurations added by Service Connector.

There are multiple ways to get connection configurations of a service connection. You can get configuration names for specific target service type from the following articles Integrate Azure Database for PostgreSQL with Service Connector.

Or you can get connection configurations programmatically in the following ways.

You can run the following commands in Azure CLI(/cli/azure) to list configurations of a service connection.

# for Azure Web App
az webapp connection list-configuration -g <myResourceGroupName> -n <myWebAppName> --connection <myConnectionName>

# for Azure Container App
az containerapp connection list-configuration -g <myResourceGroupName> -n <myContainerAppName> --connection <myConnectionName>

# for Azure Spring App
az spring connection list-configuration --id /subscriptions/{subscription}/resourceGroups/{myResourceGroupName}/providers/Microsoft.AppPlatform/Spring/{mySpringAppName}/apps/{myAppName}/deployments/default/providers/Microsoft.ServiceLinker/linkers/{myConnectionName}

For more information, see the following articles in Azure CLI reference documentations:

Next steps