Skip to main content

email_templates

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

Overview

Nameemail_templates
TypeResource
Idazure.api_management.email_templates

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
bodytextfield from the properties object
is_defaulttextfield from the properties object
parameterstextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
subjecttextfield from the properties object
subscriptionIdtextfield from the properties object
templateNametextfield from the properties object
titletextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, serviceName, subscriptionId, templateNameGets the details of the email template specified by its identifier.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionIdGets all email templates
create_or_updateINSERTresourceGroupName, serviceName, subscriptionId, templateNameUpdates an Email Template.
deleteDELETEIf-Match, resourceGroupName, serviceName, subscriptionId, templateNameReset the Email Template to default template provided by the API Management service instance.
updateUPDATEIf-Match, resourceGroupName, serviceName, subscriptionId, templateNameUpdates API Management email template

SELECT examples

Gets all email templates

SELECT
description,
body,
is_default,
parameters,
resourceGroupName,
serviceName,
subject,
subscriptionId,
templateName,
title
FROM azure.api_management.vw_email_templates
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.api_management.email_templates (
resourceGroupName,
serviceName,
subscriptionId,
templateName,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ templateName }}',
'{{ properties }}'
;

UPDATE example

Updates a email_templates resource.

/*+ update */
UPDATE azure.api_management.email_templates
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND templateName = '{{ templateName }}';

DELETE example

Deletes the specified email_templates resource.

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