Skip to main content

services

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

Overview

Nameservices
TypeResource
Idazure.api_center.services

Fields

NameDatatypeDescription
identitytextManaged service identity (system assigned and/or user assigned identities)
locationtextThe geo-location where the resource lives
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
restoretextfield from the properties object
serviceNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, serviceName, subscriptionIdReturns details of the service.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdReturns a collection of services within the resource group.
list_by_subscriptionSELECTsubscriptionIdLists services within an Azure subscription.
create_or_updateINSERTresourceGroupName, serviceName, subscriptionIdCreates new or updates existing API.
deleteDELETEresourceGroupName, serviceName, subscriptionIdDeletes specified service.
updateUPDATEresourceGroupName, serviceName, subscriptionIdUpdates existing service.
export_metadata_schemaEXECresourceGroupName, serviceName, subscriptionIdExports the effective metadata schema.

SELECT examples

Lists services within an Azure subscription.

SELECT
identity,
location,
provisioning_state,
resourceGroupName,
restore,
serviceName,
subscriptionId,
tags
FROM azure.api_center.vw_services
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.api_center.services (
resourceGroupName,
serviceName,
subscriptionId,
properties,
identity,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ identity }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a services resource.

/*+ update */
UPDATE azure.api_center.services
SET
identity = '{{ identity }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified services resource.

/*+ delete */
DELETE FROM azure.api_center.services
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';