Skip to main content

services

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

Overview

Nameservices
TypeResource
Idazure.communication.services

Fields

NameDatatypeDescription
communicationServiceNametextfield from the properties object
data_locationtextfield from the properties object
host_nametextfield from the properties object
identitytextManaged service identity (system assigned and/or user assigned identities)
immutable_resource_idtextfield from the properties object
linked_domainstextfield from the properties object
locationtextThe geo-location where the resource lives
notification_hub_idtextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
versiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcommunicationServiceName, resourceGroupName, subscriptionIdGet the CommunicationService and its properties.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdHandles requests to list all resources in a resource group.
list_by_subscriptionSELECTsubscriptionIdHandles requests to list all resources in a subscription.
create_or_updateINSERTcommunicationServiceName, resourceGroupName, subscriptionIdCreate a new CommunicationService or update an existing CommunicationService.
deleteDELETEcommunicationServiceName, resourceGroupName, subscriptionIdOperation to delete a CommunicationService.
updateUPDATEcommunicationServiceName, resourceGroupName, subscriptionIdOperation to update an existing CommunicationService.
check_name_availabilityEXECsubscriptionId, data__name, data__typeChecks that the CommunicationService name is valid and is not already in use.
link_notification_hubEXECcommunicationServiceName, resourceGroupName, subscriptionId, data__connectionString, data__resourceIdLinks an Azure Notification Hub to this communication service.
regenerate_keyEXECcommunicationServiceName, resourceGroupName, subscriptionIdRegenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time.

SELECT examples

Handles requests to list all resources in a subscription.

SELECT
communicationServiceName,
data_location,
host_name,
identity,
immutable_resource_id,
linked_domains,
location,
notification_hub_id,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
version
FROM azure.communication.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.communication.services (
communicationServiceName,
resourceGroupName,
subscriptionId,
tags,
location,
properties,
identity
)
SELECT
'{{ communicationServiceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ tags }}',
'{{ location }}',
'{{ properties }}',
'{{ identity }}'
;

UPDATE example

Updates a services resource.

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

DELETE example

Deletes the specified services resource.

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