
com.pulumi.aws.pinpoint.kotlin.EmailTemplate.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.pinpoint.kotlin
import com.pulumi.aws.pinpoint.kotlin.outputs.EmailTemplateEmailTemplate
import com.pulumi.aws.pinpoint.kotlin.outputs.EmailTemplateEmailTemplate.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [EmailTemplate].
*/
@PulumiTagMarker
public class EmailTemplateResourceBuilder internal constructor() {
public var name: String? = null
public var args: EmailTemplateArgs = EmailTemplateArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend EmailTemplateArgsBuilder.() -> Unit) {
val builder = EmailTemplateArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): EmailTemplate {
val builtJavaResource = com.pulumi.aws.pinpoint.EmailTemplate(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return EmailTemplate(builtJavaResource)
}
}
/**
* Provides a Pinpoint Email Template resource
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const test = new aws.pinpoint.EmailTemplate("test", {
* templateName: "testing",
* emailTemplates: [{
* subject: "testing",
* textPart: "we are testing template text part",
* headers: [{
* name: "testingname",
* value: "testingvalue",
* }],
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* test = aws.pinpoint.EmailTemplate("test",
* template_name="testing",
* email_templates=[{
* "subject": "testing",
* "text_part": "we are testing template text part",
* "headers": [{
* "name": "testingname",
* "value": "testingvalue",
* }],
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var test = new Aws.Pinpoint.EmailTemplate("test", new()
* {
* TemplateName = "testing",
* EmailTemplates = new[]
* {
* new Aws.Pinpoint.Inputs.EmailTemplateEmailTemplateArgs
* {
* Subject = "testing",
* TextPart = "we are testing template text part",
* Headers = new[]
* {
* new Aws.Pinpoint.Inputs.EmailTemplateEmailTemplateHeaderArgs
* {
* Name = "testingname",
* Value = "testingvalue",
* },
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pinpoint"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := pinpoint.NewEmailTemplate(ctx, "test", &pinpoint.EmailTemplateArgs{
* TemplateName: pulumi.String("testing"),
* EmailTemplates: pinpoint.EmailTemplateEmailTemplateArray{
* &pinpoint.EmailTemplateEmailTemplateArgs{
* Subject: pulumi.String("testing"),
* TextPart: pulumi.String("we are testing template text part"),
* Headers: pinpoint.EmailTemplateEmailTemplateHeaderArray{
* &pinpoint.EmailTemplateEmailTemplateHeaderArgs{
* Name: pulumi.String("testingname"),
* Value: pulumi.String("testingvalue"),
* },
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.pinpoint.EmailTemplate;
* import com.pulumi.aws.pinpoint.EmailTemplateArgs;
* import com.pulumi.aws.pinpoint.inputs.EmailTemplateEmailTemplateArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var test = new EmailTemplate("test", EmailTemplateArgs.builder()
* .templateName("testing")
* .emailTemplates(EmailTemplateEmailTemplateArgs.builder()
* .subject("testing")
* .textPart("we are testing template text part")
* .headers(EmailTemplateEmailTemplateHeaderArgs.builder()
* .name("testingname")
* .value("testingvalue")
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: aws:pinpoint:EmailTemplate
* properties:
* templateName: testing
* emailTemplates:
* - subject: testing
* textPart: we are testing template text part
* headers:
* - name: testingname
* value: testingvalue
* ```
*
* ## Import
* Using `pulumi import`, import Pinpoint Email Template using the `template_name`. For example:
* ```sh
* $ pulumi import aws:pinpoint/emailTemplate:EmailTemplate reset template_name
* ```
*/
public class EmailTemplate internal constructor(
override val javaResource: com.pulumi.aws.pinpoint.EmailTemplate,
) : KotlinCustomResource(javaResource, EmailTemplateMapper) {
/**
* Amazon Resource Name (ARN) of the message template.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Specifies the content and settings for a message template that can be used in messages that are sent through the email channel. See Email Template
*/
public val emailTemplates: Output>?
get() = javaResource.emailTemplates().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
}).orElse(null)
})
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy