Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
cloudflare.getTurnstileWidget
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleTurnstileWidget = cloudflare.getTurnstileWidget({
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
sitekey: "0x4AAF00AAAABn0R22HWm-YUc",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_turnstile_widget = cloudflare.get_turnstile_widget(account_id="023e105f4ecef8ad9ca31a8372d0c353",
sitekey="0x4AAF00AAAABn0R22HWm-YUc")
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.LookupTurnstileWidget(ctx, &cloudflare.LookupTurnstileWidgetArgs{
AccountId: "023e105f4ecef8ad9ca31a8372d0c353",
Sitekey: pulumi.StringRef("0x4AAF00AAAABn0R22HWm-YUc"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleTurnstileWidget = Cloudflare.GetTurnstileWidget.Invoke(new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
Sitekey = "0x4AAF00AAAABn0R22HWm-YUc",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetTurnstileWidgetArgs;
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) {
final var exampleTurnstileWidget = CloudflareFunctions.getTurnstileWidget(GetTurnstileWidgetArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.sitekey("0x4AAF00AAAABn0R22HWm-YUc")
.build());
}
}
variables:
exampleTurnstileWidget:
fn::invoke:
function: cloudflare:getTurnstileWidget
arguments:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
sitekey: 0x4AAF00AAAABn0R22HWm-YUc
Using getTurnstileWidget
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTurnstileWidget(args: GetTurnstileWidgetArgs, opts?: InvokeOptions): Promise<GetTurnstileWidgetResult>
function getTurnstileWidgetOutput(args: GetTurnstileWidgetOutputArgs, opts?: InvokeOptions): Output<GetTurnstileWidgetResult>
def get_turnstile_widget(account_id: Optional[str] = None,
filter: Optional[GetTurnstileWidgetFilter] = None,
sitekey: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTurnstileWidgetResult
def get_turnstile_widget_output(account_id: Optional[pulumi.Input[str]] = None,
filter: Optional[pulumi.Input[GetTurnstileWidgetFilterArgs]] = None,
sitekey: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTurnstileWidgetResult]
func LookupTurnstileWidget(ctx *Context, args *LookupTurnstileWidgetArgs, opts ...InvokeOption) (*LookupTurnstileWidgetResult, error)
func LookupTurnstileWidgetOutput(ctx *Context, args *LookupTurnstileWidgetOutputArgs, opts ...InvokeOption) LookupTurnstileWidgetResultOutput
> Note: This function is named LookupTurnstileWidget
in the Go SDK.
public static class GetTurnstileWidget
{
public static Task<GetTurnstileWidgetResult> InvokeAsync(GetTurnstileWidgetArgs args, InvokeOptions? opts = null)
public static Output<GetTurnstileWidgetResult> Invoke(GetTurnstileWidgetInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTurnstileWidgetResult> getTurnstileWidget(GetTurnstileWidgetArgs args, InvokeOptions options)
public static Output<GetTurnstileWidgetResult> getTurnstileWidget(GetTurnstileWidgetArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getTurnstileWidget:getTurnstileWidget
arguments:
# arguments dictionary
The following arguments are supported:
- Account
Id string - Identifier
- Filter
Get
Turnstile Widget Filter - Sitekey string
- Widget item identifier tag.
- Account
Id string - Identifier
- Filter
Get
Turnstile Widget Filter - Sitekey string
- Widget item identifier tag.
- account
Id String - Identifier
- filter
Get
Turnstile Widget Filter - sitekey String
- Widget item identifier tag.
- account
Id string - Identifier
- filter
Get
Turnstile Widget Filter - sitekey string
- Widget item identifier tag.
- account_
id str - Identifier
- filter
Get
Turnstile Widget Filter - sitekey str
- Widget item identifier tag.
- account
Id String - Identifier
- filter Property Map
- sitekey String
- Widget item identifier tag.
getTurnstileWidget Result
The following output properties are available:
- Account
Id string - Identifier
- Bot
Fight boolMode - If botfightmode is set to
true
, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). - Clearance
Level string - If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set Available values: "no_clearance", "jschallenge", "managed", "interactive".
- Created
On string - When the widget was created.
- Domains List<string>
- Ephemeral
Id bool - Return the Ephemeral ID in /siteverify (ENT only).
- Id string
- Widget item identifier tag.
- Mode string
- Widget Mode Available values: "non-interactive", "invisible", "managed".
- Modified
On string - When the widget was modified.
- Name string
- Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used.
- Offlabel bool
- Do not show any Cloudflare branding on the widget (ENT only).
- Region string
- Region where this widget can be used. Available values: "world".
- Secret string
- Secret key for this widget.
- Sitekey string
- Widget item identifier tag.
- Filter
Get
Turnstile Widget Filter
- Account
Id string - Identifier
- Bot
Fight boolMode - If botfightmode is set to
true
, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). - Clearance
Level string - If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set Available values: "no_clearance", "jschallenge", "managed", "interactive".
- Created
On string - When the widget was created.
- Domains []string
- Ephemeral
Id bool - Return the Ephemeral ID in /siteverify (ENT only).
- Id string
- Widget item identifier tag.
- Mode string
- Widget Mode Available values: "non-interactive", "invisible", "managed".
- Modified
On string - When the widget was modified.
- Name string
- Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used.
- Offlabel bool
- Do not show any Cloudflare branding on the widget (ENT only).
- Region string
- Region where this widget can be used. Available values: "world".
- Secret string
- Secret key for this widget.
- Sitekey string
- Widget item identifier tag.
- Filter
Get
Turnstile Widget Filter
- account
Id String - Identifier
- bot
Fight BooleanMode - If botfightmode is set to
true
, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). - clearance
Level String - If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set Available values: "no_clearance", "jschallenge", "managed", "interactive".
- created
On String - When the widget was created.
- domains List<String>
- ephemeral
Id Boolean - Return the Ephemeral ID in /siteverify (ENT only).
- id String
- Widget item identifier tag.
- mode String
- Widget Mode Available values: "non-interactive", "invisible", "managed".
- modified
On String - When the widget was modified.
- name String
- Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used.
- offlabel Boolean
- Do not show any Cloudflare branding on the widget (ENT only).
- region String
- Region where this widget can be used. Available values: "world".
- secret String
- Secret key for this widget.
- sitekey String
- Widget item identifier tag.
- filter
Get
Turnstile Widget Filter
- account
Id string - Identifier
- bot
Fight booleanMode - If botfightmode is set to
true
, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). - clearance
Level string - If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set Available values: "no_clearance", "jschallenge", "managed", "interactive".
- created
On string - When the widget was created.
- domains string[]
- ephemeral
Id boolean - Return the Ephemeral ID in /siteverify (ENT only).
- id string
- Widget item identifier tag.
- mode string
- Widget Mode Available values: "non-interactive", "invisible", "managed".
- modified
On string - When the widget was modified.
- name string
- Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used.
- offlabel boolean
- Do not show any Cloudflare branding on the widget (ENT only).
- region string
- Region where this widget can be used. Available values: "world".
- secret string
- Secret key for this widget.
- sitekey string
- Widget item identifier tag.
- filter
Get
Turnstile Widget Filter
- account_
id str - Identifier
- bot_
fight_ boolmode - If botfightmode is set to
true
, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). - clearance_
level str - If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set Available values: "no_clearance", "jschallenge", "managed", "interactive".
- created_
on str - When the widget was created.
- domains Sequence[str]
- ephemeral_
id bool - Return the Ephemeral ID in /siteverify (ENT only).
- id str
- Widget item identifier tag.
- mode str
- Widget Mode Available values: "non-interactive", "invisible", "managed".
- modified_
on str - When the widget was modified.
- name str
- Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used.
- offlabel bool
- Do not show any Cloudflare branding on the widget (ENT only).
- region str
- Region where this widget can be used. Available values: "world".
- secret str
- Secret key for this widget.
- sitekey str
- Widget item identifier tag.
- filter
Get
Turnstile Widget Filter
- account
Id String - Identifier
- bot
Fight BooleanMode - If botfightmode is set to
true
, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). - clearance
Level String - If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set Available values: "no_clearance", "jschallenge", "managed", "interactive".
- created
On String - When the widget was created.
- domains List<String>
- ephemeral
Id Boolean - Return the Ephemeral ID in /siteverify (ENT only).
- id String
- Widget item identifier tag.
- mode String
- Widget Mode Available values: "non-interactive", "invisible", "managed".
- modified
On String - When the widget was modified.
- name String
- Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used.
- offlabel Boolean
- Do not show any Cloudflare branding on the widget (ENT only).
- region String
- Region where this widget can be used. Available values: "world".
- secret String
- Secret key for this widget.
- sitekey String
- Widget item identifier tag.
- filter Property Map
Supporting Types
GetTurnstileWidgetFilter
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.