Skip to main content

api_portals

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

Overview

Nameapi_portals
TypeResource
Idazure.spring_apps.api_portals

Fields

The following fields are returned by SELECT queries:

Success. The response describes the corresponding API portal.

NameDatatypeDescription
propertiesobjectAPI portal properties payload
skuobjectSku of the API portal resource

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, serviceName, apiPortalNameGet the API portal and its properties.
listselectsubscriptionId, resourceGroupName, serviceNameHandles requests to list all resources in a Service.
create_or_updateinsertsubscriptionId, resourceGroupName, serviceName, apiPortalNameCreate the default API portal or update the existing API portal.
deletedeletesubscriptionId, resourceGroupName, serviceName, apiPortalNameDelete the default API portal.
validate_domainexecsubscriptionId, resourceGroupName, serviceName, apiPortalName, nameCheck the domains are 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
apiPortalNamestringThe name of API portal.
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.

SELECT examples

Get the API portal and its properties.

SELECT
properties,
sku
FROM azure.spring_apps.api_portals
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND apiPortalName = '{{ apiPortalName }}' -- required
;

INSERT examples

Create the default API portal or update the existing API portal.

INSERT INTO azure.spring_apps.api_portals (
data__properties,
data__sku,
subscriptionId,
resourceGroupName,
serviceName,
apiPortalName
)
SELECT
'{{ properties }}',
'{{ sku }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ apiPortalName }}'
RETURNING
properties,
sku
;

DELETE examples

Delete the default API portal.

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

Lifecycle Methods

Check the domains are valid as well as not in use.

EXEC azure.spring_apps.api_portals.validate_domain 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@apiPortalName='{{ apiPortalName }}' --required
@@json=
'{
"name": "{{ name }}"
}'
;