Skip to main content

database_connections

Creates, updates, deletes, gets or lists a database_connections resource.

Overview

Namedatabase_connections
TypeResource
Idazure.app_service.database_connections

Fields

NameDatatypeDescription
idstringResource Id.
namestringResource Name.
kindstringKind of resource.
propertiesobjectDatabaseConnection resource specific properties
typestringResource type.

Methods

NameAccessible byRequired ParamsDescription
getSELECTdatabaseConnectionName, name, resourceGroupName, subscriptionId
create_or_updateINSERTdatabaseConnectionName, name, resourceGroupName, subscriptionIdDescription for Create or update a database connection for a static site
deleteDELETEdatabaseConnectionName, name, resourceGroupName, subscriptionId
updateUPDATEdatabaseConnectionName, name, resourceGroupName, subscriptionIdDescription for Create or update a database connection for a static site

SELECT examples

SELECT
id,
name,
kind,
properties,
type
FROM azure.app_service.database_connections
WHERE databaseConnectionName = '{{ databaseConnectionName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new database_connections resource.

/*+ create */
INSERT INTO azure.app_service.database_connections (
databaseConnectionName,
name,
resourceGroupName,
subscriptionId,
kind,
properties
)
SELECT
'{{ databaseConnectionName }}',
'{{ name }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ kind }}',
'{{ properties }}'
;

UPDATE example

Updates a database_connections resource.

/*+ update */
UPDATE azure.app_service.database_connections
SET
properties = '{{ properties }}'
WHERE
databaseConnectionName = '{{ databaseConnectionName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified database_connections resource.

/*+ delete */
DELETE FROM azure.app_service.database_connections
WHERE databaseConnectionName = '{{ databaseConnectionName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';