Skip to main content

templates

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

Overview

Nametemplates
TypeResource
Idazure.communication_messages.templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe template's name. Required.
kindstringThe type discriminator describing a template type. Required. "whatsApp"
languagestringThe template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'. Required.
statusstringThe aggregated template status. Required. Known values are: "approved", "rejected", "pending", and "paused". (approved, rejected, pending, paused)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_templatesselectchannel_id, endpointmaxpagesizeList all templates for given Azure Communication Services channel.

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
channel_idstringThe registration ID of the channel. Required.
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
maxpagesizeinteger

SELECT examples

List all templates for given Azure Communication Services channel.

SELECT
name,
kind,
language,
status
FROM azure.communication_messages.templates
WHERE channel_id = '{{ channel_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND maxpagesize = '{{ maxpagesize }}'
;