1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getTurnstileWidget
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.getTurnstileWidget

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    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:

    AccountId string
    Identifier
    Filter GetTurnstileWidgetFilter
    Sitekey string
    Widget item identifier tag.
    AccountId string
    Identifier
    Filter GetTurnstileWidgetFilter
    Sitekey string
    Widget item identifier tag.
    accountId String
    Identifier
    filter GetTurnstileWidgetFilter
    sitekey String
    Widget item identifier tag.
    accountId string
    Identifier
    filter GetTurnstileWidgetFilter
    sitekey string
    Widget item identifier tag.
    account_id str
    Identifier
    filter GetTurnstileWidgetFilter
    sitekey str
    Widget item identifier tag.
    accountId String
    Identifier
    filter Property Map
    sitekey String
    Widget item identifier tag.

    getTurnstileWidget Result

    The following output properties are available:

    AccountId string
    Identifier
    BotFightMode bool
    If botfightmode is set to true, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only).
    ClearanceLevel 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".
    CreatedOn string
    When the widget was created.
    Domains List<string>
    EphemeralId 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".
    ModifiedOn 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 GetTurnstileWidgetFilter
    AccountId string
    Identifier
    BotFightMode bool
    If botfightmode is set to true, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only).
    ClearanceLevel 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".
    CreatedOn string
    When the widget was created.
    Domains []string
    EphemeralId 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".
    ModifiedOn 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 GetTurnstileWidgetFilter
    accountId String
    Identifier
    botFightMode Boolean
    If botfightmode is set to true, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only).
    clearanceLevel 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".
    createdOn String
    When the widget was created.
    domains List<String>
    ephemeralId 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".
    modifiedOn 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 GetTurnstileWidgetFilter
    accountId string
    Identifier
    botFightMode boolean
    If botfightmode is set to true, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only).
    clearanceLevel 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".
    createdOn string
    When the widget was created.
    domains string[]
    ephemeralId 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".
    modifiedOn 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 GetTurnstileWidgetFilter
    account_id str
    Identifier
    bot_fight_mode bool
    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 GetTurnstileWidgetFilter
    accountId String
    Identifier
    botFightMode Boolean
    If botfightmode is set to true, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only).
    clearanceLevel 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".
    createdOn String
    When the widget was created.
    domains List<String>
    ephemeralId 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".
    modifiedOn 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

    Direction string
    Direction to order widgets. Available values: "asc", "desc".
    Order string
    Field to order widgets by. Available values: "id", "sitekey", "name", "createdon", "modifiedon".
    Direction string
    Direction to order widgets. Available values: "asc", "desc".
    Order string
    Field to order widgets by. Available values: "id", "sitekey", "name", "createdon", "modifiedon".
    direction String
    Direction to order widgets. Available values: "asc", "desc".
    order String
    Field to order widgets by. Available values: "id", "sitekey", "name", "createdon", "modifiedon".
    direction string
    Direction to order widgets. Available values: "asc", "desc".
    order string
    Field to order widgets by. Available values: "id", "sitekey", "name", "createdon", "modifiedon".
    direction str
    Direction to order widgets. Available values: "asc", "desc".
    order str
    Field to order widgets by. Available values: "id", "sitekey", "name", "createdon", "modifiedon".
    direction String
    Direction to order widgets. Available values: "asc", "desc".
    order String
    Field to order widgets by. Available values: "id", "sitekey", "name", "createdon", "modifiedon".

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi