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

com.pulumi.cloudflare.kotlin.TurnstileWidgetArgs.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.TurnstileWidgetArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The [Turnstile Widget](https://developers.cloudflare.com/turnstile/) resource allows you to manage Cloudflare Turnstile Widgets.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.TurnstileWidget("example", {
 *     accountId: "f037e56e89293a057740de681ac9abbe",
 *     name: "example widget",
 *     botFightMode: false,
 *     domains: ["example.com"],
 *     mode: "invisible",
 *     region: "world",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.TurnstileWidget("example",
 *     account_id="f037e56e89293a057740de681ac9abbe",
 *     name="example widget",
 *     bot_fight_mode=False,
 *     domains=["example.com"],
 *     mode="invisible",
 *     region="world")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.TurnstileWidget("example", new()
 *     {
 *         AccountId = "f037e56e89293a057740de681ac9abbe",
 *         Name = "example widget",
 *         BotFightMode = false,
 *         Domains = new[]
 *         {
 *             "example.com",
 *         },
 *         Mode = "invisible",
 *         Region = "world",
 *     });
 * });
 * ```
 * ```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.NewTurnstileWidget(ctx, "example", &cloudflare.TurnstileWidgetArgs{
 * 			AccountId:    pulumi.String("f037e56e89293a057740de681ac9abbe"),
 * 			Name:         pulumi.String("example widget"),
 * 			BotFightMode: pulumi.Bool(false),
 * 			Domains: pulumi.StringArray{
 * 				pulumi.String("example.com"),
 * 			},
 * 			Mode:   pulumi.String("invisible"),
 * 			Region: pulumi.String("world"),
 * 		})
 * 		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.TurnstileWidget;
 * import com.pulumi.cloudflare.TurnstileWidgetArgs;
 * 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 TurnstileWidget("example", TurnstileWidgetArgs.builder()
 *             .accountId("f037e56e89293a057740de681ac9abbe")
 *             .name("example widget")
 *             .botFightMode(false)
 *             .domains("example.com")
 *             .mode("invisible")
 *             .region("world")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:TurnstileWidget
 *     properties:
 *       accountId: f037e56e89293a057740de681ac9abbe
 *       name: example widget
 *       botFightMode: false
 *       domains:
 *         - example.com
 *       mode: invisible
 *       region: world
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/turnstileWidget:TurnstileWidget example /
 * ```
 * @property accountId The account identifier to target for the resource.
 * @property botFightMode If bot*fight*mode is set to true, Cloudflare issues computationally expensive challenges in response to malicious bots (Enterprise only).
 * @property domains Domains where the widget is deployed
 * @property mode Widget Mode. Available values: `non-interactive`, `invisible`, `managed`
 * @property name Human readable widget name.
 * @property offlabel Do not show any Cloudflare branding on the widget (Enterprise only).
 * @property region Region where this widget can be used.
 */
public data class TurnstileWidgetArgs(
    public val accountId: Output? = null,
    public val botFightMode: Output? = null,
    public val domains: Output>? = null,
    public val mode: Output? = null,
    public val name: Output? = null,
    public val offlabel: Output? = null,
    public val region: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.TurnstileWidgetArgs =
        com.pulumi.cloudflare.TurnstileWidgetArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .botFightMode(botFightMode?.applyValue({ args0 -> args0 }))
            .domains(domains?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .mode(mode?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .offlabel(offlabel?.applyValue({ args0 -> args0 }))
            .region(region?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TurnstileWidgetArgs].
 */
@PulumiTagMarker
public class TurnstileWidgetArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var botFightMode: Output? = null

    private var domains: Output>? = null

    private var mode: Output? = null

    private var name: Output? = null

    private var offlabel: Output? = null

    private var region: Output? = null

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

    /**
     * @param value If bot*fight*mode is set to true, Cloudflare issues computationally expensive challenges in response to malicious bots (Enterprise only).
     */
    @JvmName("okcfbvfvwqsmtauj")
    public suspend fun botFightMode(`value`: Output) {
        this.botFightMode = value
    }

    /**
     * @param value Domains where the widget is deployed
     */
    @JvmName("jdutywbmydabmfkj")
    public suspend fun domains(`value`: Output>) {
        this.domains = value
    }

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

    /**
     * @param values Domains where the widget is deployed
     */
    @JvmName("vkbtsqicneialfvp")
    public suspend fun domains(values: List>) {
        this.domains = Output.all(values)
    }

    /**
     * @param value Widget Mode. Available values: `non-interactive`, `invisible`, `managed`
     */
    @JvmName("tdillcwdjcikyfhc")
    public suspend fun mode(`value`: Output) {
        this.mode = value
    }

    /**
     * @param value Human readable widget name.
     */
    @JvmName("uaywyftvwngahcdf")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Do not show any Cloudflare branding on the widget (Enterprise only).
     */
    @JvmName("aktatnqmpxvsunnf")
    public suspend fun offlabel(`value`: Output) {
        this.offlabel = value
    }

    /**
     * @param value Region where this widget can be used.
     */
    @JvmName("kfeurjegdudlniwg")
    public suspend fun region(`value`: Output) {
        this.region = value
    }

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

    /**
     * @param value If bot*fight*mode is set to true, Cloudflare issues computationally expensive challenges in response to malicious bots (Enterprise only).
     */
    @JvmName("bmtayiftitxnttbv")
    public suspend fun botFightMode(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.botFightMode = mapped
    }

    /**
     * @param value Domains where the widget is deployed
     */
    @JvmName("keiqgjtehbqdwjyg")
    public suspend fun domains(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domains = mapped
    }

    /**
     * @param values Domains where the widget is deployed
     */
    @JvmName("ixstwpjtnymhkoqq")
    public suspend fun domains(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.domains = mapped
    }

    /**
     * @param value Widget Mode. Available values: `non-interactive`, `invisible`, `managed`
     */
    @JvmName("urocvxatlqwsesxh")
    public suspend fun mode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mode = mapped
    }

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

    /**
     * @param value Do not show any Cloudflare branding on the widget (Enterprise only).
     */
    @JvmName("vwdvnuxroiadmguo")
    public suspend fun offlabel(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.offlabel = mapped
    }

    /**
     * @param value Region where this widget can be used.
     */
    @JvmName("xpdpjehucnjnuiha")
    public suspend fun region(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.region = mapped
    }

    internal fun build(): TurnstileWidgetArgs = TurnstileWidgetArgs(
        accountId = accountId,
        botFightMode = botFightMode,
        domains = domains,
        mode = mode,
        name = name,
        offlabel = offlabel,
        region = region,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy