All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.pinpoint.kotlin.EmailTemplateArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.pinpoint.kotlin

import com.pulumi.aws.pinpoint.EmailTemplateArgs.builder
import com.pulumi.aws.pinpoint.kotlin.inputs.EmailTemplateEmailTemplateArgs
import com.pulumi.aws.pinpoint.kotlin.inputs.EmailTemplateEmailTemplateArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * 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
 * ```
 * @property emailTemplates 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
 * @property tags
 * @property templateName name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.
 */
public data class EmailTemplateArgs(
    public val emailTemplates: Output>? = null,
    public val tags: Output>? = null,
    public val templateName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.pinpoint.EmailTemplateArgs =
        com.pulumi.aws.pinpoint.EmailTemplateArgs.builder()
            .emailTemplates(
                emailTemplates?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .templateName(templateName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [EmailTemplateArgs].
 */
@PulumiTagMarker
public class EmailTemplateArgsBuilder internal constructor() {
    private var emailTemplates: Output>? = null

    private var tags: Output>? = null

    private var templateName: Output? = null

    /**
     * @param value 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
     */
    @JvmName("owklcsbkrcqeluwq")
    public suspend fun emailTemplates(`value`: Output>) {
        this.emailTemplates = value
    }

    @JvmName("pmhlpdtnymgxytlx")
    public suspend fun emailTemplates(vararg values: Output) {
        this.emailTemplates = Output.all(values.asList())
    }

    /**
     * @param values 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
     */
    @JvmName("ooqecidyuauuencd")
    public suspend fun emailTemplates(values: List>) {
        this.emailTemplates = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("kdimnouyfxlfjfjw")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.
     */
    @JvmName("hjjyacklwwflhhdd")
    public suspend fun templateName(`value`: Output) {
        this.templateName = value
    }

    /**
     * @param value 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
     */
    @JvmName("kfpnbonxhbtevdcg")
    public suspend fun emailTemplates(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.emailTemplates = mapped
    }

    /**
     * @param argument 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
     */
    @JvmName("wcjoauufitnsdmis")
    public suspend fun emailTemplates(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EmailTemplateEmailTemplateArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.emailTemplates = mapped
    }

    /**
     * @param argument 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
     */
    @JvmName("ivxobxleltsjpwhy")
    public suspend fun emailTemplates(vararg argument: suspend EmailTemplateEmailTemplateArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EmailTemplateEmailTemplateArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.emailTemplates = mapped
    }

    /**
     * @param argument 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
     */
    @JvmName("udflwwaninootkbx")
    public suspend fun emailTemplates(argument: suspend EmailTemplateEmailTemplateArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EmailTemplateEmailTemplateArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.emailTemplates = mapped
    }

    /**
     * @param values 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
     */
    @JvmName("pumkptmsmuchixfr")
    public suspend fun emailTemplates(vararg values: EmailTemplateEmailTemplateArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.emailTemplates = mapped
    }

    /**
     * @param value
     */
    @JvmName("tvtlcoqfabuohedj")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values
     */
    @JvmName("tifjqvfgdaykjsuj")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.
     */
    @JvmName("ssjbxkhuqldvqfrw")
    public suspend fun templateName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.templateName = mapped
    }

    internal fun build(): EmailTemplateArgs = EmailTemplateArgs(
        emailTemplates = emailTemplates,
        tags = tags,
        templateName = templateName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy