Skip to main content

services

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

Overview

Nameservices
TypeResource
Idazure.cosmos_db.services

Fields

NameDatatypeDescription
idtextThe unique resource identifier of the database account.
nametextThe name of the database account.
accountNametextfield from the properties object
creation_timetextfield from the properties object
instance_counttextfield from the properties object
instance_sizetextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
service_typetextfield from the properties object
statustextfield from the properties object
subscriptionIdtextfield from the properties object
typetextThe type of Azure resource.

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, resourceGroupName, serviceName, subscriptionIdGets the status of service.
listSELECTaccountName, resourceGroupName, subscriptionIdGets the status of service.
createINSERTaccountName, resourceGroupName, serviceName, subscriptionIdCreates a service.
deleteDELETEaccountName, resourceGroupName, serviceName, subscriptionIdDeletes service with the given serviceName.

SELECT examples

Gets the status of service.

SELECT
id,
name,
accountName,
creation_time,
instance_count,
instance_size,
resourceGroupName,
serviceName,
service_type,
status,
subscriptionId,
type
FROM azure.cosmos_db.vw_services
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.cosmos_db.services (
accountName,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ accountName }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified services resource.

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