1. Packages
  2. Okta
  3. API Docs
  4. CaptchaOrgWideSettings
Okta v4.7.0 published on Tuesday, Feb 13, 2024 by Pulumi

okta.CaptchaOrgWideSettings

Explore with Pulumi AI

okta logo
Okta v4.7.0 published on Tuesday, Feb 13, 2024 by Pulumi

    WARNING: This feature is only available as a part of the Identity Engine. Contact support for further information.

    This resource allows you to configure which parts of the authentication flow requires users to pass the CAPTCHA logic. CAPTCHA org-wide settings can be disabled by unsetting captcha_id and enabled_for.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleCaptcha = new Okta.Captcha("exampleCaptcha", new()
        {
            Type = "HCAPTCHA",
            SiteKey = "some_key",
            SecretKey = "some_secret_key",
        });
    
        var exampleCaptchaOrgWideSettings = new Okta.CaptchaOrgWideSettings("exampleCaptchaOrgWideSettings", new()
        {
            CaptchaId = okta_captcha.Test.Id,
            EnabledFors = new[]
            {
                "SSR",
            },
        });
    
    });
    
    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, "exampleCaptcha", &okta.CaptchaArgs{
    			Type:      pulumi.String("HCAPTCHA"),
    			SiteKey:   pulumi.String("some_key"),
    			SecretKey: pulumi.String("some_secret_key"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = okta.NewCaptchaOrgWideSettings(ctx, "exampleCaptchaOrgWideSettings", &okta.CaptchaOrgWideSettingsArgs{
    			CaptchaId: pulumi.Any(okta_captcha.Test.Id),
    			EnabledFors: pulumi.StringArray{
    				pulumi.String("SSR"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 com.pulumi.okta.CaptchaOrgWideSettings;
    import com.pulumi.okta.CaptchaOrgWideSettingsArgs;
    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 exampleCaptcha = new Captcha("exampleCaptcha", CaptchaArgs.builder()        
                .type("HCAPTCHA")
                .siteKey("some_key")
                .secretKey("some_secret_key")
                .build());
    
            var exampleCaptchaOrgWideSettings = new CaptchaOrgWideSettings("exampleCaptchaOrgWideSettings", CaptchaOrgWideSettingsArgs.builder()        
                .captchaId(okta_captcha.test().id())
                .enabledFors("SSR")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_okta as okta
    
    example_captcha = okta.Captcha("exampleCaptcha",
        type="HCAPTCHA",
        site_key="some_key",
        secret_key="some_secret_key")
    example_captcha_org_wide_settings = okta.CaptchaOrgWideSettings("exampleCaptchaOrgWideSettings",
        captcha_id=okta_captcha["test"]["id"],
        enabled_fors=["SSR"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const exampleCaptcha = new okta.Captcha("exampleCaptcha", {
        type: "HCAPTCHA",
        siteKey: "some_key",
        secretKey: "some_secret_key",
    });
    const exampleCaptchaOrgWideSettings = new okta.CaptchaOrgWideSettings("exampleCaptchaOrgWideSettings", {
        captchaId: okta_captcha.test.id,
        enabledFors: ["SSR"],
    });
    
    resources:
      exampleCaptcha:
        type: okta:Captcha
        properties:
          type: HCAPTCHA
          siteKey: some_key
          secretKey: some_secret_key
      exampleCaptchaOrgWideSettings:
        type: okta:CaptchaOrgWideSettings
        properties:
          captchaId: ${okta_captcha.test.id}
          enabledFors:
            - SSR
    

    The following example disables org-wide CAPTCHA.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleCaptcha = new Okta.Captcha("exampleCaptcha", new()
        {
            SecretKey = "some_secret_key",
            SiteKey = "some_key",
            Type = "HCAPTCHA",
        });
    
        var exampleCaptchaOrgWideSettings = new Okta.CaptchaOrgWideSettings("exampleCaptchaOrgWideSettings");
    
    });
    
    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, "exampleCaptcha", &okta.CaptchaArgs{
    			SecretKey: pulumi.String("some_secret_key"),
    			SiteKey:   pulumi.String("some_key"),
    			Type:      pulumi.String("HCAPTCHA"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = okta.NewCaptchaOrgWideSettings(ctx, "exampleCaptchaOrgWideSettings", nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 com.pulumi.okta.CaptchaOrgWideSettings;
    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 exampleCaptcha = new Captcha("exampleCaptcha", CaptchaArgs.builder()        
                .secretKey("some_secret_key")
                .siteKey("some_key")
                .type("HCAPTCHA")
                .build());
    
            var exampleCaptchaOrgWideSettings = new CaptchaOrgWideSettings("exampleCaptchaOrgWideSettings");
    
        }
    }
    
    import pulumi
    import pulumi_okta as okta
    
    example_captcha = okta.Captcha("exampleCaptcha",
        secret_key="some_secret_key",
        site_key="some_key",
        type="HCAPTCHA")
    example_captcha_org_wide_settings = okta.CaptchaOrgWideSettings("exampleCaptchaOrgWideSettings")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const exampleCaptcha = new okta.Captcha("exampleCaptcha", {
        secretKey: "some_secret_key",
        siteKey: "some_key",
        type: "HCAPTCHA",
    });
    const exampleCaptchaOrgWideSettings = new okta.CaptchaOrgWideSettings("exampleCaptchaOrgWideSettings", {});
    
    resources:
      exampleCaptcha:
        type: okta:Captcha
        properties:
          secretKey: some_secret_key
          siteKey: some_key
          type: HCAPTCHA
      exampleCaptchaOrgWideSettings:
        type: okta:CaptchaOrgWideSettings
    

    Create CaptchaOrgWideSettings Resource

    new CaptchaOrgWideSettings(name: string, args?: CaptchaOrgWideSettingsArgs, opts?: CustomResourceOptions);
    @overload
    def CaptchaOrgWideSettings(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               captcha_id: Optional[str] = None,
                               enabled_fors: Optional[Sequence[str]] = None)
    @overload
    def CaptchaOrgWideSettings(resource_name: str,
                               args: Optional[CaptchaOrgWideSettingsArgs] = None,
                               opts: Optional[ResourceOptions] = None)
    func NewCaptchaOrgWideSettings(ctx *Context, name string, args *CaptchaOrgWideSettingsArgs, opts ...ResourceOption) (*CaptchaOrgWideSettings, error)
    public CaptchaOrgWideSettings(string name, CaptchaOrgWideSettingsArgs? args = null, CustomResourceOptions? opts = null)
    public CaptchaOrgWideSettings(String name, CaptchaOrgWideSettingsArgs args)
    public CaptchaOrgWideSettings(String name, CaptchaOrgWideSettingsArgs args, CustomResourceOptions options)
    
    type: okta:CaptchaOrgWideSettings
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args CaptchaOrgWideSettingsArgs
    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 CaptchaOrgWideSettingsArgs
    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 CaptchaOrgWideSettingsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CaptchaOrgWideSettingsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CaptchaOrgWideSettingsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CaptchaOrgWideSettings 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 CaptchaOrgWideSettings resource accepts the following input properties:

    CaptchaId string
    The ID of the CAPTCHA.
    EnabledFors List<string>
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".
    CaptchaId string
    The ID of the CAPTCHA.
    EnabledFors []string
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".
    captchaId String
    The ID of the CAPTCHA.
    enabledFors List<String>
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".
    captchaId string
    The ID of the CAPTCHA.
    enabledFors string[]
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".
    captcha_id str
    The ID of the CAPTCHA.
    enabled_fors Sequence[str]
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".
    captchaId String
    The ID of the CAPTCHA.
    enabledFors List<String>
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CaptchaOrgWideSettings 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 CaptchaOrgWideSettings Resource

    Get an existing CaptchaOrgWideSettings 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?: CaptchaOrgWideSettingsState, opts?: CustomResourceOptions): CaptchaOrgWideSettings
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            captcha_id: Optional[str] = None,
            enabled_fors: Optional[Sequence[str]] = None) -> CaptchaOrgWideSettings
    func GetCaptchaOrgWideSettings(ctx *Context, name string, id IDInput, state *CaptchaOrgWideSettingsState, opts ...ResourceOption) (*CaptchaOrgWideSettings, error)
    public static CaptchaOrgWideSettings Get(string name, Input<string> id, CaptchaOrgWideSettingsState? state, CustomResourceOptions? opts = null)
    public static CaptchaOrgWideSettings get(String name, Output<String> id, CaptchaOrgWideSettingsState 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:
    CaptchaId string
    The ID of the CAPTCHA.
    EnabledFors List<string>
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".
    CaptchaId string
    The ID of the CAPTCHA.
    EnabledFors []string
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".
    captchaId String
    The ID of the CAPTCHA.
    enabledFors List<String>
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".
    captchaId string
    The ID of the CAPTCHA.
    enabledFors string[]
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".
    captcha_id str
    The ID of the CAPTCHA.
    enabled_fors Sequence[str]
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".
    captchaId String
    The ID of the CAPTCHA.
    enabledFors List<String>
    Array of pages that have CAPTCHA enabled. Valid values: "SSR", "SSPR" and "SIGN_IN".

    Import

    Org-Wide CAPTCHA settings can be imported without any parameters.

     $ pulumi import okta:index/captchaOrgWideSettings:CaptchaOrgWideSettings example _
    

    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.7.0 published on Tuesday, Feb 13, 2024 by Pulumi