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

com.pulumi.awsnative.ses.kotlin.MailManagerTrafficPolicyArgs.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: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ses.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.ses.MailManagerTrafficPolicyArgs.builder
import com.pulumi.awsnative.ses.kotlin.enums.MailManagerTrafficPolicyAcceptAction
import com.pulumi.awsnative.ses.kotlin.inputs.MailManagerTrafficPolicyPolicyStatementArgs
import com.pulumi.awsnative.ses.kotlin.inputs.MailManagerTrafficPolicyPolicyStatementArgsBuilder
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.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Definition of AWS::SES::MailManagerTrafficPolicy Resource Type
 * @property defaultAction Default action instructs the traffic policy to either Allow or Deny (block) messages that fall outside of (or not addressed by) the conditions of your policy statements
 * @property maxMessageSizeBytes The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.
 * @property policyStatements Conditional statements for filtering email traffic.
 * @property tags The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
 * @property trafficPolicyName The name of the policy.
 * The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.
 */
public data class MailManagerTrafficPolicyArgs(
    public val defaultAction: Output? = null,
    public val maxMessageSizeBytes: Output? = null,
    public val policyStatements: Output>? = null,
    public val tags: Output>? = null,
    public val trafficPolicyName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ses.MailManagerTrafficPolicyArgs =
        com.pulumi.awsnative.ses.MailManagerTrafficPolicyArgs.builder()
            .defaultAction(defaultAction?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .maxMessageSizeBytes(maxMessageSizeBytes?.applyValue({ args0 -> args0 }))
            .policyStatements(
                policyStatements?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .trafficPolicyName(trafficPolicyName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [MailManagerTrafficPolicyArgs].
 */
@PulumiTagMarker
public class MailManagerTrafficPolicyArgsBuilder internal constructor() {
    private var defaultAction: Output? = null

    private var maxMessageSizeBytes: Output? = null

    private var policyStatements: Output>? = null

    private var tags: Output>? = null

    private var trafficPolicyName: Output? = null

    /**
     * @param value Default action instructs the traffic policy to either Allow or Deny (block) messages that fall outside of (or not addressed by) the conditions of your policy statements
     */
    @JvmName("xrwugrkyvflvkukt")
    public suspend fun defaultAction(`value`: Output) {
        this.defaultAction = value
    }

    /**
     * @param value The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.
     */
    @JvmName("sojpmdhljtbhyxha")
    public suspend fun maxMessageSizeBytes(`value`: Output) {
        this.maxMessageSizeBytes = value
    }

    /**
     * @param value Conditional statements for filtering email traffic.
     */
    @JvmName("atyligtaqoqysjvn")
    public suspend fun policyStatements(`value`: Output>) {
        this.policyStatements = value
    }

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

    /**
     * @param values Conditional statements for filtering email traffic.
     */
    @JvmName("kmbxqyqpbjuafmob")
    public suspend fun policyStatements(values: List>) {
        this.policyStatements = Output.all(values)
    }

    /**
     * @param value The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
     */
    @JvmName("jemhewjaothlyprl")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
     */
    @JvmName("eiexsmiwpyqeluug")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The name of the policy.
     * The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.
     */
    @JvmName("mbfjshmyaajbkije")
    public suspend fun trafficPolicyName(`value`: Output) {
        this.trafficPolicyName = value
    }

    /**
     * @param value Default action instructs the traffic policy to either Allow or Deny (block) messages that fall outside of (or not addressed by) the conditions of your policy statements
     */
    @JvmName("qbqhnptnuewfstbv")
    public suspend fun defaultAction(`value`: MailManagerTrafficPolicyAcceptAction?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultAction = mapped
    }

    /**
     * @param value The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.
     */
    @JvmName("ktwgfmqbjcqekeso")
    public suspend fun maxMessageSizeBytes(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxMessageSizeBytes = mapped
    }

    /**
     * @param value Conditional statements for filtering email traffic.
     */
    @JvmName("djpdbysrvhmaevji")
    public suspend fun policyStatements(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyStatements = mapped
    }

    /**
     * @param argument Conditional statements for filtering email traffic.
     */
    @JvmName("cfhgwourqdjwvpse")
    public suspend fun policyStatements(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            MailManagerTrafficPolicyPolicyStatementArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.policyStatements = mapped
    }

    /**
     * @param argument Conditional statements for filtering email traffic.
     */
    @JvmName("iyonyqeyymwuhjnx")
    public suspend fun policyStatements(vararg argument: suspend MailManagerTrafficPolicyPolicyStatementArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            MailManagerTrafficPolicyPolicyStatementArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.policyStatements = mapped
    }

    /**
     * @param argument Conditional statements for filtering email traffic.
     */
    @JvmName("rinvrowufolforem")
    public suspend fun policyStatements(argument: suspend MailManagerTrafficPolicyPolicyStatementArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            MailManagerTrafficPolicyPolicyStatementArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.policyStatements = mapped
    }

    /**
     * @param values Conditional statements for filtering email traffic.
     */
    @JvmName("tnunumyfgmjyapdl")
    public suspend fun policyStatements(vararg values: MailManagerTrafficPolicyPolicyStatementArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.policyStatements = mapped
    }

    /**
     * @param value The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
     */
    @JvmName("gfjsytvrcsqelnre")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
     */
    @JvmName("nuhyeaqbfnptgokm")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
     */
    @JvmName("sajghmuiqhddscba")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
     */
    @JvmName("riglikovlgscngcj")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
     */
    @JvmName("tgvieeibgoctdint")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The name of the policy.
     * The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.
     */
    @JvmName("qprdvpcmqralgert")
    public suspend fun trafficPolicyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trafficPolicyName = mapped
    }

    internal fun build(): MailManagerTrafficPolicyArgs = MailManagerTrafficPolicyArgs(
        defaultAction = defaultAction,
        maxMessageSizeBytes = maxMessageSizeBytes,
        policyStatements = policyStatements,
        tags = tags,
        trafficPolicyName = trafficPolicyName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy