Skip to main content

apps

Creates, updates, deletes, gets or lists an apps resource.

Overview

Nameapps
TypeResource
Idazure.spring_apps.apps

Fields

The following fields are returned by SELECT queries:

Success. The response describes the corresponding App.

NameDatatypeDescription
identityobjectThe Managed Identity type of the app resource
locationstringThe GEO location of the application, always the same with its parent resource
propertiesobjectProperties of the App resource

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, serviceName, appNamesyncStatusGet an App and its properties.
listselectsubscriptionId, resourceGroupName, serviceNameHandles requests to list all resources in a Service.
create_or_updateinsertsubscriptionId, resourceGroupName, serviceName, appNameCreate a new App or update an exiting App.
updateupdatesubscriptionId, resourceGroupName, serviceName, appNameOperation to update an exiting App.
deletedeletesubscriptionId, resourceGroupName, serviceName, appNameOperation to delete an App.
set_active_deploymentsexecsubscriptionId, resourceGroupName, serviceName, appNameSet existing Deployment under the app as active
validate_domainexecsubscriptionId, resourceGroupName, serviceName, appName, nameCheck the resource name is valid as well as not in use.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
appNamestringThe name of the App resource.
resourceGroupNamestringThe name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serviceNamestringThe name of the Service resource.
subscriptionIdstringGets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
syncStatusstringIndicates whether sync status

SELECT examples

Get an App and its properties.

SELECT
identity,
location,
properties
FROM azure.spring_apps.apps
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND appName = '{{ appName }}' -- required
AND syncStatus = '{{ syncStatus }}'
;

INSERT examples

Create a new App or update an exiting App.

INSERT INTO azure.spring_apps.apps (
data__properties,
data__identity,
data__location,
subscriptionId,
resourceGroupName,
serviceName,
appName
)
SELECT
'{{ properties }}',
'{{ identity }}',
'{{ location }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ appName }}'
RETURNING
identity,
location,
properties
;

UPDATE examples

Operation to update an exiting App.

UPDATE azure.spring_apps.apps
SET
data__properties = '{{ properties }}',
data__identity = '{{ identity }}',
data__location = '{{ location }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND appName = '{{ appName }}' --required
RETURNING
identity,
location,
properties;

DELETE examples

Operation to delete an App.

DELETE FROM azure.spring_apps.apps
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND appName = '{{ appName }}' --required
;

Lifecycle Methods

Set existing Deployment under the app as active

EXEC azure.spring_apps.apps.set_active_deployments 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@appName='{{ appName }}' --required
@@json=
'{
"activeDeploymentNames": "{{ activeDeploymentNames }}"
}'
;