email_templates
Creates, updates, deletes, gets or lists a email_templates
resource.
Overview
Name | email_templates |
Type | Resource |
Id | azure.api_management.email_templates |
Fields
- vw_email_templates
- email_templates
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
body | text | field from the properties object |
is_default | text | field from the properties object |
parameters | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serviceName | text | field from the properties object |
subject | text | field from the properties object |
subscriptionId | text | field from the properties object |
templateName | text | field from the properties object |
title | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Email Template Contract properties. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, serviceName, subscriptionId, templateName | Gets the details of the email template specified by its identifier. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Gets all email templates |
create_or_update | INSERT | resourceGroupName, serviceName, subscriptionId, templateName | Updates an Email Template. |
delete | DELETE | If-Match, resourceGroupName, serviceName, subscriptionId, templateName | Reset the Email Template to default template provided by the API Management service instance. |
update | UPDATE | If-Match, resourceGroupName, serviceName, subscriptionId, templateName | Updates API Management email template |
SELECT
examples
Gets all email templates
- vw_email_templates
- 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 }}';
SELECT
properties
FROM azure.api_management.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.email_templates (
resourceGroupName,
serviceName,
subscriptionId,
templateName,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ templateName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: subject
value: string
- name: title
value: string
- name: description
value: string
- name: body
value: string
- name: parameters
value:
- - name: name
value: string
- name: title
value: string
- name: description
value: string
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 }}';