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