azurermApiManagementEmailTemplate
Manages a API Management Email Template.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-resources",
}
);
const azurermApiManagementExample = new azurerm.apiManagement.ApiManagement(
this,
"example_2",
{
location: azurermResourceGroupExample.location,
name: "example-apim",
publisher_email: "company@terraform.io",
publisher_name: "My Company",
resource_group_name: azurermResourceGroupExample.name,
sku_name: "Developer_1",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementExample.overrideLogicalId("example");
const azurermApiManagementEmailTemplateExample =
new azurerm.apiManagementEmailTemplate.ApiManagementEmailTemplate(
this,
"example_3",
{
api_management_name: azurermApiManagementExample.name,
body: '<!DOCTYPE html >\n<html>\n<head>\n <meta charset="UTF-8" />\n <title>Customized Letter Title</title>\n</head>\n<body>\n <p style="font-size:12pt;font-family:\'Segoe UI\'">Dear $DevFirstName $DevLastName,</p>\n</body>\n</html>\n',
resource_group_name: azurermResourceGroupExample.name,
subject:
"Customized confirmation email for your new $OrganizationName API account",
template_name: "ConfirmSignUpIdentityDefault",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementEmailTemplateExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
templateName
- (Required) The name of the Email Template. Possible values areaccountClosedDeveloper
,applicationApprovedNotificationMessage
,confirmSignUpIdentityDefault
,emailChangeIdentityDefault
,inviteUserNotificationMessage
,newCommentNotificationMessage
,newDeveloperNotificationMessage
,newIssueNotificationMessage
,passwordResetByAdminNotificationMessage
,passwordResetIdentityDefault
,purchaseDeveloperNotificationMessage
,quotaLimitApproachingDeveloperNotificationMessage
,rejectDeveloperNotificationMessage
,requestDeveloperNotificationMessage
. Changing this forces a new API Management Email Template to be created. -
apiManagementName
- (Required) The name of the API Management Service in which the Email Template should exist. Changing this forces a new API Management Email Template to be created. -
resourceGroupName
- (Required) The name of the Resource Group where the API Management Email Template should exist. Changing this forces a new API Management Email Template to be created. -
subject
- (Required) The subject of the Email. -
body
- (Required) The body of the Email. Its format has to be a well-formed HTML document.
-> NOTE: In subject
and body
predefined parameters can be used. The available parameters depend on the template. Schema to use a parameter: $
followed by the parameterName
- $<parameterName>
. The available parameters can be seen in the Notification templates section of the API-Management Service instance within the Azure Portal.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
-
id
- The ID of the API Management Email Template. -
title
- The title of the Email Template. -
description
- The description of the Email Template.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the API Management Email Template.read
- (Defaults to 5 minutes) Used when retrieving the API Management Email Template.update
- (Defaults to 30 minutes) Used when updating the API Management Email Template.delete
- (Defaults to 30 minutes) Used when deleting the API Management Email Template.
Import
API Management Email Templates can be imported using the resourceId
, e.g.