1. Packages
  2. Okta
  3. API Docs
  4. Captcha
Okta v4.11.0 published on Tuesday, Sep 17, 2024 by Pulumi

okta.Captcha

Explore with Pulumi AI

okta logo
Okta v4.11.0 published on Tuesday, Sep 17, 2024 by Pulumi

    Creates different types of captcha. > WARNING: This feature is only available as a part of the Identity Engine. Contact support for further information. This resource allows you to create and configure a CAPTCHA.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const example = new okta.Captcha("example", {
        name: "My CAPTCHA",
        type: "HCAPTCHA",
        siteKey: "some_key",
        secretKey: "some_secret_key",
    });
    
    import pulumi
    import pulumi_okta as okta
    
    example = okta.Captcha("example",
        name="My CAPTCHA",
        type="HCAPTCHA",
        site_key="some_key",
        secret_key="some_secret_key")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v4/go/okta"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := okta.NewCaptcha(ctx, "example", &okta.CaptchaArgs{
    			Name:      pulumi.String("My CAPTCHA"),
    			Type:      pulumi.String("HCAPTCHA"),
    			SiteKey:   pulumi.String("some_key"),
    			SecretKey: pulumi.String("some_secret_key"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Okta.Captcha("example", new()
        {
            Name = "My CAPTCHA",
            Type = "HCAPTCHA",
            SiteKey = "some_key",
            SecretKey = "some_secret_key",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.Captcha;
    import com.pulumi.okta.CaptchaArgs;
    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 Captcha("example", CaptchaArgs.builder()
                .name("My CAPTCHA")
                .type("HCAPTCHA")
                .siteKey("some_key")
                .secretKey("some_secret_key")
                .build());
    
        }
    }
    
    resources:
      example:
        type: okta:Captcha
        properties:
          name: My CAPTCHA
          type: HCAPTCHA
          siteKey: some_key
          secretKey: some_secret_key
    

    Create Captcha Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Captcha(name: string, args: CaptchaArgs, opts?: CustomResourceOptions);
    @overload
    def Captcha(resource_name: str,
                args: CaptchaArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Captcha(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                secret_key: Optional[str] = None,
                site_key: Optional[str] = None,
                type: Optional[str] = None,
                name: Optional[str] = None)
    func NewCaptcha(ctx *Context, name string, args CaptchaArgs, opts ...ResourceOption) (*Captcha, error)
    public Captcha(string name, CaptchaArgs args, CustomResourceOptions? opts = null)
    public Captcha(String name, CaptchaArgs args)
    public Captcha(String name, CaptchaArgs args, CustomResourceOptions options)
    
    type: okta:Captcha
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CaptchaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CaptchaArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CaptchaArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CaptchaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CaptchaArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var captchaResource = new Okta.Captcha("captchaResource", new()
    {
        SecretKey = "string",
        SiteKey = "string",
        Type = "string",
        Name = "string",
    });
    
    example, err := okta.NewCaptcha(ctx, "captchaResource", &okta.CaptchaArgs{
    	SecretKey: pulumi.String("string"),
    	SiteKey:   pulumi.String("string"),
    	Type:      pulumi.String("string"),
    	Name:      pulumi.String("string"),
    })
    
    var captchaResource = new Captcha("captchaResource", CaptchaArgs.builder()
        .secretKey("string")
        .siteKey("string")
        .type("string")
        .name("string")
        .build());
    
    captcha_resource = okta.Captcha("captchaResource",
        secret_key="string",
        site_key="string",
        type="string",
        name="string")
    
    const captchaResource = new okta.Captcha("captchaResource", {
        secretKey: "string",
        siteKey: "string",
        type: "string",
        name: "string",
    });
    
    type: okta:Captcha
    properties:
        name: string
        secretKey: string
        siteKey: string
        type: string
    

    Captcha Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Captcha resource accepts the following input properties:

    SecretKey string
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    SiteKey string
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    Type string
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2
    Name string
    Name of the CAPTCHA
    SecretKey string
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    SiteKey string
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    Type string
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2
    Name string
    Name of the CAPTCHA
    secretKey String
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    siteKey String
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    type String
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2
    name String
    Name of the CAPTCHA
    secretKey string
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    siteKey string
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    type string
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2
    name string
    Name of the CAPTCHA
    secret_key str
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    site_key str
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    type str
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2
    name str
    Name of the CAPTCHA
    secretKey String
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    siteKey String
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    type String
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2
    name String
    Name of the CAPTCHA

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Captcha resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Captcha Resource

    Get an existing Captcha resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CaptchaState, opts?: CustomResourceOptions): Captcha
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            secret_key: Optional[str] = None,
            site_key: Optional[str] = None,
            type: Optional[str] = None) -> Captcha
    func GetCaptcha(ctx *Context, name string, id IDInput, state *CaptchaState, opts ...ResourceOption) (*Captcha, error)
    public static Captcha Get(string name, Input<string> id, CaptchaState? state, CustomResourceOptions? opts = null)
    public static Captcha get(String name, Output<String> id, CaptchaState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Name string
    Name of the CAPTCHA
    SecretKey string
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    SiteKey string
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    Type string
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2
    Name string
    Name of the CAPTCHA
    SecretKey string
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    SiteKey string
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    Type string
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2
    name String
    Name of the CAPTCHA
    secretKey String
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    siteKey String
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    type String
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2
    name string
    Name of the CAPTCHA
    secretKey string
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    siteKey string
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    type string
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2
    name str
    Name of the CAPTCHA
    secret_key str
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    site_key str
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    type str
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2
    name String
    Name of the CAPTCHA
    secretKey String
    Secret key issued from the CAPTCHA vendor to perform server-side validation for a CAPTCHA token
    siteKey String
    Site key issued from the CAPTCHA vendor to render a CAPTCHA on a page
    type String
    Type of the captcha. Valid values: HCAPTCHA, RECAPTCHA_V2

    Import

    $ pulumi import okta:index/captcha:Captcha example <captcha_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Okta v4.11.0 published on Tuesday, Sep 17, 2024 by Pulumi