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

com.pulumi.aws.sesv2.kotlin.ConfigurationSetArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.sesv2.kotlin

import com.pulumi.aws.sesv2.ConfigurationSetArgs.builder
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetDeliveryOptionsArgs
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetDeliveryOptionsArgsBuilder
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetReputationOptionsArgs
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetReputationOptionsArgsBuilder
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetSendingOptionsArgs
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetSendingOptionsArgsBuilder
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetSuppressionOptionsArgs
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetSuppressionOptionsArgsBuilder
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetTrackingOptionsArgs
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetTrackingOptionsArgsBuilder
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetVdmOptionsArgs
import com.pulumi.aws.sesv2.kotlin.inputs.ConfigurationSetVdmOptionsArgsBuilder
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.Map
import kotlin.jvm.JvmName

/**
 * Resource for managing an AWS SESv2 (Simple Email V2) Configuration Set.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.sesv2.ConfigurationSet("example", {
 *     configurationSetName: "example",
 *     deliveryOptions: {
 *         tlsPolicy: "REQUIRE",
 *     },
 *     reputationOptions: {
 *         reputationMetricsEnabled: false,
 *     },
 *     sendingOptions: {
 *         sendingEnabled: true,
 *     },
 *     suppressionOptions: {
 *         suppressedReasons: [
 *             "BOUNCE",
 *             "COMPLAINT",
 *         ],
 *     },
 *     trackingOptions: {
 *         customRedirectDomain: "example.com",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.sesv2.ConfigurationSet("example",
 *     configuration_set_name="example",
 *     delivery_options={
 *         "tls_policy": "REQUIRE",
 *     },
 *     reputation_options={
 *         "reputation_metrics_enabled": False,
 *     },
 *     sending_options={
 *         "sending_enabled": True,
 *     },
 *     suppression_options={
 *         "suppressed_reasons": [
 *             "BOUNCE",
 *             "COMPLAINT",
 *         ],
 *     },
 *     tracking_options={
 *         "custom_redirect_domain": "example.com",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.SesV2.ConfigurationSet("example", new()
 *     {
 *         ConfigurationSetName = "example",
 *         DeliveryOptions = new Aws.SesV2.Inputs.ConfigurationSetDeliveryOptionsArgs
 *         {
 *             TlsPolicy = "REQUIRE",
 *         },
 *         ReputationOptions = new Aws.SesV2.Inputs.ConfigurationSetReputationOptionsArgs
 *         {
 *             ReputationMetricsEnabled = false,
 *         },
 *         SendingOptions = new Aws.SesV2.Inputs.ConfigurationSetSendingOptionsArgs
 *         {
 *             SendingEnabled = true,
 *         },
 *         SuppressionOptions = new Aws.SesV2.Inputs.ConfigurationSetSuppressionOptionsArgs
 *         {
 *             SuppressedReasons = new[]
 *             {
 *                 "BOUNCE",
 *                 "COMPLAINT",
 *             },
 *         },
 *         TrackingOptions = new Aws.SesV2.Inputs.ConfigurationSetTrackingOptionsArgs
 *         {
 *             CustomRedirectDomain = "example.com",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sesv2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := sesv2.NewConfigurationSet(ctx, "example", &sesv2.ConfigurationSetArgs{
 * 			ConfigurationSetName: pulumi.String("example"),
 * 			DeliveryOptions: &sesv2.ConfigurationSetDeliveryOptionsArgs{
 * 				TlsPolicy: pulumi.String("REQUIRE"),
 * 			},
 * 			ReputationOptions: &sesv2.ConfigurationSetReputationOptionsArgs{
 * 				ReputationMetricsEnabled: pulumi.Bool(false),
 * 			},
 * 			SendingOptions: &sesv2.ConfigurationSetSendingOptionsArgs{
 * 				SendingEnabled: pulumi.Bool(true),
 * 			},
 * 			SuppressionOptions: &sesv2.ConfigurationSetSuppressionOptionsArgs{
 * 				SuppressedReasons: pulumi.StringArray{
 * 					pulumi.String("BOUNCE"),
 * 					pulumi.String("COMPLAINT"),
 * 				},
 * 			},
 * 			TrackingOptions: &sesv2.ConfigurationSetTrackingOptionsArgs{
 * 				CustomRedirectDomain: pulumi.String("example.com"),
 * 			},
 * 		})
 * 		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.sesv2.ConfigurationSet;
 * import com.pulumi.aws.sesv2.ConfigurationSetArgs;
 * import com.pulumi.aws.sesv2.inputs.ConfigurationSetDeliveryOptionsArgs;
 * import com.pulumi.aws.sesv2.inputs.ConfigurationSetReputationOptionsArgs;
 * import com.pulumi.aws.sesv2.inputs.ConfigurationSetSendingOptionsArgs;
 * import com.pulumi.aws.sesv2.inputs.ConfigurationSetSuppressionOptionsArgs;
 * import com.pulumi.aws.sesv2.inputs.ConfigurationSetTrackingOptionsArgs;
 * 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 example = new ConfigurationSet("example", ConfigurationSetArgs.builder()
 *             .configurationSetName("example")
 *             .deliveryOptions(ConfigurationSetDeliveryOptionsArgs.builder()
 *                 .tlsPolicy("REQUIRE")
 *                 .build())
 *             .reputationOptions(ConfigurationSetReputationOptionsArgs.builder()
 *                 .reputationMetricsEnabled(false)
 *                 .build())
 *             .sendingOptions(ConfigurationSetSendingOptionsArgs.builder()
 *                 .sendingEnabled(true)
 *                 .build())
 *             .suppressionOptions(ConfigurationSetSuppressionOptionsArgs.builder()
 *                 .suppressedReasons(
 *                     "BOUNCE",
 *                     "COMPLAINT")
 *                 .build())
 *             .trackingOptions(ConfigurationSetTrackingOptionsArgs.builder()
 *                 .customRedirectDomain("example.com")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:sesv2:ConfigurationSet
 *     properties:
 *       configurationSetName: example
 *       deliveryOptions:
 *         tlsPolicy: REQUIRE
 *       reputationOptions:
 *         reputationMetricsEnabled: false
 *       sendingOptions:
 *         sendingEnabled: true
 *       suppressionOptions:
 *         suppressedReasons:
 *           - BOUNCE
 *           - COMPLAINT
 *       trackingOptions:
 *         customRedirectDomain: example.com
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import SESv2 (Simple Email V2) Configuration Set using the `configuration_set_name`. For example:
 * ```sh
 * $ pulumi import aws:sesv2/configurationSet:ConfigurationSet example example
 * ```
 * @property configurationSetName The name of the configuration set.
 * @property deliveryOptions An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set. See `delivery_options` Block for details.
 * @property reputationOptions An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set. See `reputation_options` Block for details.
 * @property sendingOptions An object that defines whether or not Amazon SES can send email that you send using the configuration set. See `sending_options` Block for details.
 * @property suppressionOptions An object that contains information about the suppression list preferences for your account. See `suppression_options` Block for details.
 * @property tags A map of tags to assign to the service. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property trackingOptions An object that defines the open and click tracking options for emails that you send using the configuration set. See `tracking_options` Block for details.
 * @property vdmOptions An object that defines the VDM settings that apply to emails that you send using the configuration set. See `vdm_options` Block for details.
 */
public data class ConfigurationSetArgs(
    public val configurationSetName: Output? = null,
    public val deliveryOptions: Output? = null,
    public val reputationOptions: Output? = null,
    public val sendingOptions: Output? = null,
    public val suppressionOptions: Output? = null,
    public val tags: Output>? = null,
    public val trackingOptions: Output? = null,
    public val vdmOptions: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.sesv2.ConfigurationSetArgs =
        com.pulumi.aws.sesv2.ConfigurationSetArgs.builder()
            .configurationSetName(configurationSetName?.applyValue({ args0 -> args0 }))
            .deliveryOptions(deliveryOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .reputationOptions(reputationOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .sendingOptions(sendingOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .suppressionOptions(
                suppressionOptions?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .trackingOptions(trackingOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .vdmOptions(vdmOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ConfigurationSetArgs].
 */
@PulumiTagMarker
public class ConfigurationSetArgsBuilder internal constructor() {
    private var configurationSetName: Output? = null

    private var deliveryOptions: Output? = null

    private var reputationOptions: Output? = null

    private var sendingOptions: Output? = null

    private var suppressionOptions: Output? = null

    private var tags: Output>? = null

    private var trackingOptions: Output? = null

    private var vdmOptions: Output? = null

    /**
     * @param value The name of the configuration set.
     */
    @JvmName("vqbfcqjtoynimirn")
    public suspend fun configurationSetName(`value`: Output) {
        this.configurationSetName = value
    }

    /**
     * @param value An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set. See `delivery_options` Block for details.
     */
    @JvmName("gtumrxrjphyxocpl")
    public suspend fun deliveryOptions(`value`: Output) {
        this.deliveryOptions = value
    }

    /**
     * @param value An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set. See `reputation_options` Block for details.
     */
    @JvmName("wbxrfvjtxsatylpu")
    public suspend fun reputationOptions(`value`: Output) {
        this.reputationOptions = value
    }

    /**
     * @param value An object that defines whether or not Amazon SES can send email that you send using the configuration set. See `sending_options` Block for details.
     */
    @JvmName("bfjjvbriwgkmyxlb")
    public suspend fun sendingOptions(`value`: Output) {
        this.sendingOptions = value
    }

    /**
     * @param value An object that contains information about the suppression list preferences for your account. See `suppression_options` Block for details.
     */
    @JvmName("qkffvybitoilsbxh")
    public suspend fun suppressionOptions(`value`: Output) {
        this.suppressionOptions = value
    }

    /**
     * @param value A map of tags to assign to the service. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("hefiyuuyjhkdgayl")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value An object that defines the open and click tracking options for emails that you send using the configuration set. See `tracking_options` Block for details.
     */
    @JvmName("dhrhqladblbtirhp")
    public suspend fun trackingOptions(`value`: Output) {
        this.trackingOptions = value
    }

    /**
     * @param value An object that defines the VDM settings that apply to emails that you send using the configuration set. See `vdm_options` Block for details.
     */
    @JvmName("knbnpirhrcpmtqpp")
    public suspend fun vdmOptions(`value`: Output) {
        this.vdmOptions = value
    }

    /**
     * @param value The name of the configuration set.
     */
    @JvmName("lfqxmvfcclrffeby")
    public suspend fun configurationSetName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.configurationSetName = mapped
    }

    /**
     * @param value An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set. See `delivery_options` Block for details.
     */
    @JvmName("oslcdbuvdfsoildl")
    public suspend fun deliveryOptions(`value`: ConfigurationSetDeliveryOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deliveryOptions = mapped
    }

    /**
     * @param argument An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set. See `delivery_options` Block for details.
     */
    @JvmName("kplhltqrowhefyny")
    public suspend fun deliveryOptions(argument: suspend ConfigurationSetDeliveryOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = ConfigurationSetDeliveryOptionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.deliveryOptions = mapped
    }

    /**
     * @param value An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set. See `reputation_options` Block for details.
     */
    @JvmName("ctckuvvdqqsyiork")
    public suspend fun reputationOptions(`value`: ConfigurationSetReputationOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reputationOptions = mapped
    }

    /**
     * @param argument An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set. See `reputation_options` Block for details.
     */
    @JvmName("tqcutbvfirdunfai")
    public suspend fun reputationOptions(argument: suspend ConfigurationSetReputationOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = ConfigurationSetReputationOptionsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.reputationOptions = mapped
    }

    /**
     * @param value An object that defines whether or not Amazon SES can send email that you send using the configuration set. See `sending_options` Block for details.
     */
    @JvmName("xpjjhafnawswjhnf")
    public suspend fun sendingOptions(`value`: ConfigurationSetSendingOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sendingOptions = mapped
    }

    /**
     * @param argument An object that defines whether or not Amazon SES can send email that you send using the configuration set. See `sending_options` Block for details.
     */
    @JvmName("krhblrljsphgwxgt")
    public suspend fun sendingOptions(argument: suspend ConfigurationSetSendingOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = ConfigurationSetSendingOptionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sendingOptions = mapped
    }

    /**
     * @param value An object that contains information about the suppression list preferences for your account. See `suppression_options` Block for details.
     */
    @JvmName("ycmtjxfhquffromb")
    public suspend fun suppressionOptions(`value`: ConfigurationSetSuppressionOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.suppressionOptions = mapped
    }

    /**
     * @param argument An object that contains information about the suppression list preferences for your account. See `suppression_options` Block for details.
     */
    @JvmName("shpyeplqujkdgwfx")
    public suspend fun suppressionOptions(argument: suspend ConfigurationSetSuppressionOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = ConfigurationSetSuppressionOptionsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.suppressionOptions = mapped
    }

    /**
     * @param value A map of tags to assign to the service. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("aqsjofvtrsshydvl")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A map of tags to assign to the service. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("ldgwpmtinyhncnsm")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value An object that defines the open and click tracking options for emails that you send using the configuration set. See `tracking_options` Block for details.
     */
    @JvmName("lmcfukapsrcrtneo")
    public suspend fun trackingOptions(`value`: ConfigurationSetTrackingOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trackingOptions = mapped
    }

    /**
     * @param argument An object that defines the open and click tracking options for emails that you send using the configuration set. See `tracking_options` Block for details.
     */
    @JvmName("kdppxuwkmfismnvi")
    public suspend fun trackingOptions(argument: suspend ConfigurationSetTrackingOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = ConfigurationSetTrackingOptionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.trackingOptions = mapped
    }

    /**
     * @param value An object that defines the VDM settings that apply to emails that you send using the configuration set. See `vdm_options` Block for details.
     */
    @JvmName("cospitdwhuadgouc")
    public suspend fun vdmOptions(`value`: ConfigurationSetVdmOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vdmOptions = mapped
    }

    /**
     * @param argument An object that defines the VDM settings that apply to emails that you send using the configuration set. See `vdm_options` Block for details.
     */
    @JvmName("bojdssyxgoewpadw")
    public suspend fun vdmOptions(argument: suspend ConfigurationSetVdmOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = ConfigurationSetVdmOptionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.vdmOptions = mapped
    }

    internal fun build(): ConfigurationSetArgs = ConfigurationSetArgs(
        configurationSetName = configurationSetName,
        deliveryOptions = deliveryOptions,
        reputationOptions = reputationOptions,
        sendingOptions = sendingOptions,
        suppressionOptions = suppressionOptions,
        tags = tags,
        trackingOptions = trackingOptions,
        vdmOptions = vdmOptions,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy