com.pulumi.cloudflare.kotlin.EmailRoutingCatchAllArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-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.
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