Skip to content

Latest commit

 

History

History
58 lines (45 loc) · 3.5 KB

how-to-get-configurations.md

File metadata and controls

58 lines (45 loc) · 3.5 KB
title description author ms.author ms.service ms.topic ms.date
Get connection configurations added by Service Connector
Get connection configurations added by Service Connector
maud-lv
malev
service-connector
how-to
07/04/2023

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:

You can run the following commands in Azure PowerShell to list configurations of a service connection.

# for Azure Web App
Get-AzServiceLinkerConfigurationForWebApp -WebApp {myWebAppName} -ResourceGroupName {myResourceGroupName} -LinkerName {myConnectionName} | Format-List

# for Azure Container App
Get-AzServiceLinkerConfigurationForContainerApp -ContainerApp {myContainerAppName} -ResourceGroupName {myResourceGroupName} -LinkerName {myConnectionName} | Format-List

# for Azure Spring App
Get-AzServiceLinkerConfigurationForSpringCloud -ServiceName {mySpringAppName} -AppName {myAppName} -ResourceGroupName {myResourceGroupName} -LinkerName {myConnectionName} | Format-List

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


Next steps

[!div class="nextstepaction"] Explore connection configurations for specific target service type