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

com.pulumi.cloudflare.kotlin.EmailRoutingCatchAllArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.EmailRoutingCatchAllArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.EmailRoutingCatchAllActionArgs
import com.pulumi.cloudflare.kotlin.inputs.EmailRoutingCatchAllActionArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.EmailRoutingCatchAllMatcherArgs
import com.pulumi.cloudflare.kotlin.inputs.EmailRoutingCatchAllMatcherArgsBuilder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a resource for managing Email Routing Addresses catch all behaviour.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.EmailRoutingCatchAll("example", {
 *     zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
 *     name: "example catch all",
 *     enabled: true,
 *     matchers: [{
 *         type: "all",
 *     }],
 *     actions: [{
 *         type: "forward",
 *         values: ["destinationaddress@example.net"],
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.EmailRoutingCatchAll("example",
 *     zone_id="0da42c8d2132a9ddaf714f9e7c920711",
 *     name="example catch all",
 *     enabled=True,
 *     matchers=[{
 *         "type": "all",
 *     }],
 *     actions=[{
 *         "type": "forward",
 *         "values": ["destinationaddress@example.net"],
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.EmailRoutingCatchAll("example", new()
 *     {
 *         ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
 *         Name = "example catch all",
 *         Enabled = true,
 *         Matchers = new[]
 *         {
 *             new Cloudflare.Inputs.EmailRoutingCatchAllMatcherArgs
 *             {
 *                 Type = "all",
 *             },
 *         },
 *         Actions = new[]
 *         {
 *             new Cloudflare.Inputs.EmailRoutingCatchAllActionArgs
 *             {
 *                 Type = "forward",
 *                 Values = new[]
 *                 {
 *                     "[email protected]",
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cloudflare.NewEmailRoutingCatchAll(ctx, "example", &cloudflare.EmailRoutingCatchAllArgs{
 * 			ZoneId:  pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
 * 			Name:    pulumi.String("example catch all"),
 * 			Enabled: pulumi.Bool(true),
 * 			Matchers: cloudflare.EmailRoutingCatchAllMatcherArray{
 * 				&cloudflare.EmailRoutingCatchAllMatcherArgs{
 * 					Type: pulumi.String("all"),
 * 				},
 * 			},
 * 			Actions: cloudflare.EmailRoutingCatchAllActionArray{
 * 				&cloudflare.EmailRoutingCatchAllActionArgs{
 * 					Type: pulumi.String("forward"),
 * 					Values: pulumi.StringArray{
 * 						pulumi.String("[email protected]"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.cloudflare.EmailRoutingCatchAll;
 * import com.pulumi.cloudflare.EmailRoutingCatchAllArgs;
 * import com.pulumi.cloudflare.inputs.EmailRoutingCatchAllMatcherArgs;
 * import com.pulumi.cloudflare.inputs.EmailRoutingCatchAllActionArgs;
 * 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 EmailRoutingCatchAll("example", EmailRoutingCatchAllArgs.builder()
 *             .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
 *             .name("example catch all")
 *             .enabled(true)
 *             .matchers(EmailRoutingCatchAllMatcherArgs.builder()
 *                 .type("all")
 *                 .build())
 *             .actions(EmailRoutingCatchAllActionArgs.builder()
 *                 .type("forward")
 *                 .values("[email protected]")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:EmailRoutingCatchAll
 *     properties:
 *       zoneId: 0da42c8d2132a9ddaf714f9e7c920711
 *       name: example catch all
 *       enabled: true
 *       matchers:
 *         - type: all
 *       actions:
 *         - type: forward
 *           values:
 *             - [email protected]
 * ```
 * 
 * @property actions List actions patterns.
 * @property enabled Routing rule status.
 * @property matchers Matching patterns to forward to your actions.
 * @property name Routing rule name.
 * @property zoneId The zone identifier to target for the resource.
 */
public data class EmailRoutingCatchAllArgs(
    public val actions: Output>? = null,
    public val enabled: Output? = null,
    public val matchers: Output>? = null,
    public val name: Output? = null,
    public val zoneId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.EmailRoutingCatchAllArgs =
        com.pulumi.cloudflare.EmailRoutingCatchAllArgs.builder()
            .actions(
                actions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .matchers(
                matchers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}

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

    private var enabled: Output? = null

    private var matchers: Output>? = null

    private var name: Output? = null

    private var zoneId: Output? = null

    /**
     * @param value List actions patterns.
     */
    @JvmName("pffucgsclseknpxe")
    public suspend fun actions(`value`: Output>) {
        this.actions = value
    }

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

    /**
     * @param values List actions patterns.
     */
    @JvmName("mkmcnatjqgkclynb")
    public suspend fun actions(values: List>) {
        this.actions = Output.all(values)
    }

    /**
     * @param value Routing rule status.
     */
    @JvmName("clbybhybdecwhrui")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value Matching patterns to forward to your actions.
     */
    @JvmName("bshvnaquosedqjuu")
    public suspend fun matchers(`value`: Output>) {
        this.matchers = value
    }

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

    /**
     * @param values Matching patterns to forward to your actions.
     */
    @JvmName("naxiyxtgrieecolx")
    public suspend fun matchers(values: List>) {
        this.matchers = Output.all(values)
    }

    /**
     * @param value Routing rule name.
     */
    @JvmName("yogxewpdrroewgkx")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The zone identifier to target for the resource.
     */
    @JvmName("vpjtugvklkqxawne")
    public suspend fun zoneId(`value`: Output) {
        this.zoneId = value
    }

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

    /**
     * @param argument List actions patterns.
     */
    @JvmName("unrqupeyfebikqdv")
    public suspend fun actions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EmailRoutingCatchAllActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument List actions patterns.
     */
    @JvmName("ybhfofbiehugxstn")
    public suspend fun actions(vararg argument: suspend EmailRoutingCatchAllActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EmailRoutingCatchAllActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument List actions patterns.
     */
    @JvmName("ssfpyjxitsmcmdxk")
    public suspend fun actions(argument: suspend EmailRoutingCatchAllActionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EmailRoutingCatchAllActionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param values List actions patterns.
     */
    @JvmName("ojmbwnucywpmuhge")
    public suspend fun actions(vararg values: EmailRoutingCatchAllActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param value Routing rule status.
     */
    @JvmName("ouevpiqqstyxdbnp")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value Matching patterns to forward to your actions.
     */
    @JvmName("odbdlanffogfdsub")
    public suspend fun matchers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchers = mapped
    }

    /**
     * @param argument Matching patterns to forward to your actions.
     */
    @JvmName("bruoykktmchnlayt")
    public suspend fun matchers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EmailRoutingCatchAllMatcherArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.matchers = mapped
    }

    /**
     * @param argument Matching patterns to forward to your actions.
     */
    @JvmName("eorwslxrdnkeucxc")
    public suspend fun matchers(vararg argument: suspend EmailRoutingCatchAllMatcherArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EmailRoutingCatchAllMatcherArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.matchers = mapped
    }

    /**
     * @param argument Matching patterns to forward to your actions.
     */
    @JvmName("mqkjlmjrwhglgirx")
    public suspend fun matchers(argument: suspend EmailRoutingCatchAllMatcherArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EmailRoutingCatchAllMatcherArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.matchers = mapped
    }

    /**
     * @param values Matching patterns to forward to your actions.
     */
    @JvmName("wabiarwpymljcrja")
    public suspend fun matchers(vararg values: EmailRoutingCatchAllMatcherArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchers = mapped
    }

    /**
     * @param value Routing rule name.
     */
    @JvmName("ubuemctynjxehipb")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The zone identifier to target for the resource.
     */
    @JvmName("boggntreigigryyp")
    public suspend fun zoneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneId = mapped
    }

    internal fun build(): EmailRoutingCatchAllArgs = EmailRoutingCatchAllArgs(
        actions = actions,
        enabled = enabled,
        matchers = matchers,
        name = name,
        zoneId = zoneId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy