Skip to main content

email_templates

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

Overview

Nameemail_templates
TypeResource
Idazure.api_management.email_templates

Fields

The following fields are returned by SELECT queries:

The response body contains the specified Email template.

NameDatatypeDescription
propertiesobjectEmail Template entity contract properties.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serviceName, templateName, subscriptionIdGets the details of the email template specified by its identifier.
list_by_serviceselectresourceGroupName, serviceName, subscriptionId$filter, $top, $skipGets all email templates
create_or_updateinsertresourceGroupName, serviceName, templateName, subscriptionIdIf-MatchUpdates an Email Template.
updateupdateresourceGroupName, serviceName, templateName, If-Match, subscriptionIdUpdates API Management email template
deletedeleteresourceGroupName, serviceName, templateName, If-Match, subscriptionIdReset the Email Template to default template provided by the API Management service instance.

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
If-MatchstringETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
templateNamestringEmail Template Name Identifier.
$filterstring| Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>
$skipinteger (int32)Number of records to skip.
$topinteger (int32)Number of records to return.
If-MatchstringETag of the Entity. Not required when creating an entity, but required when updating an entity.

SELECT examples

Gets the details of the email template specified by its identifier.

SELECT
properties
FROM azure.api_management.email_templates
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND templateName = '{{ templateName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Updates an Email Template.

INSERT INTO azure.api_management.email_templates (
data__properties,
resourceGroupName,
serviceName,
templateName,
subscriptionId,
If-Match
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ templateName }}',
'{{ subscriptionId }}',
'{{ If-Match }}'
RETURNING
properties
;

UPDATE examples

Updates API Management email template

UPDATE azure.api_management.email_templates
SET
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND templateName = '{{ templateName }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
properties;

DELETE examples

Reset the Email Template to default template provided by the API Management service instance.

DELETE FROM azure.api_management.email_templates
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND templateName = '{{ templateName }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;