Static Sites - Get Build Database Connections
Returns overviews of database connections for a static site build
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections?api-version=2024-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
environment
|
path | True |
string |
The stage site identifier. Regex pattern: |
name
|
path | True |
string |
Name of the static site |
resource
|
path | True |
string |
Name of the resource group to which the resource belongs. Regex pattern: |
subscription
|
path | True |
string |
Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). |
api-version
|
query | True |
string |
API Version |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
Other Status Codes |
App Service error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
List overviews of database connections for the static site build.
Sample request
Sample response
{
"value": [
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/databaseConnections/default",
"name": "default",
"type": "Microsoft.Web/staticSites/builds/databaseConnections",
"properties": {
"resourceId": "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName",
"connectionIdentity": "SystemAssigned",
"region": "West US 2"
}
}
],
"nextLink": null
}
Definitions
Name | Description |
---|---|
Database |
Static Site Database Connection resource. |
Database |
Collection of static site database connections. |
Default |
App Service error response. |
Details | |
Error |
Error model. |
Static |
A database connection configuration file |
DatabaseConnection
Static Site Database Connection resource.
Name | Type | Description |
---|---|---|
id |
string |
Resource Id. |
kind |
string |
Kind of resource. |
name |
string |
Resource Name. |
properties.configurationFiles |
A list of configuration files associated with this database connection. |
|
properties.connectionIdentity |
string |
If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. |
properties.connectionString |
string |
The connection string to use to connect to the database. |
properties.region |
string |
The region of the database resource. |
properties.resourceId |
string |
The resource id of the database. |
type |
string |
Resource type. |
DatabaseConnectionCollection
Collection of static site database connections.
Name | Type | Description |
---|---|---|
nextLink |
string |
Link to next page of resources. |
value |
Collection of resources. |
DefaultErrorResponse
App Service error response.
Name | Type | Description |
---|---|---|
error |
Error model. |
Details
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
Error
Error model.
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
details |
Details[] |
Detailed errors. |
innererror |
string |
More information to debug error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
StaticSiteDatabaseConnectionConfigurationFileOverview
A database connection configuration file
Name | Type | Description |
---|---|---|
contents |
string |
The Base64 encoding of the file contents. |
fileName |
string |
The name of the configuration file. |
type |
string |
The type of configuration file. |