EnterpriseKey class

The RecaptchaEnterprise Key resource

Example Usage

Android_key

A basic test of recaptcha enterprise key that can be used by Android apps

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.recaptcha.EnterpriseKey("primary", {
    displayName: "display-name-one",
    androidSettings: {
        allowAllPackageNames: true,
        allowedPackageNames: [],
    },
    project: "my-project-name",
    testingOptions: {
        testingScore: 0.8,
    },
    labels: {
        "label-one": "value-one",
    },
});
import pulumi
import pulumi_gcp as gcp

primary = gcp.recaptcha.EnterpriseKey("primary",
    display_name="display-name-one",
    android_settings={
        "allow_all_package_names": True,
        "allowed_package_names": [],
    },
    project="my-project-name",
    testing_options={
        "testing_score": 0.8,
    },
    labels={
        "label-one": "value-one",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var primary = new Gcp.Recaptcha.EnterpriseKey("primary", new()
    {
        DisplayName = "display-name-one",
        AndroidSettings = new Gcp.Recaptcha.Inputs.EnterpriseKeyAndroidSettingsArgs
        {
            AllowAllPackageNames = true,
            AllowedPackageNames = new() { },
        },
        Project = "my-project-name",
        TestingOptions = new Gcp.Recaptcha.Inputs.EnterpriseKeyTestingOptionsArgs
        {
            TestingScore = 0.8,
        },
        Labels =
        {
            { "label-one", "value-one" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/recaptcha"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := recaptcha.NewEnterpriseKey(ctx, "primary", &recaptcha.EnterpriseKeyArgs{
			DisplayName: pulumi.String("display-name-one"),
			AndroidSettings: &recaptcha.EnterpriseKeyAndroidSettingsArgs{
				AllowAllPackageNames: pulumi.Bool(true),
				AllowedPackageNames:  pulumi.StringArray{},
			},
			Project: pulumi.String("my-project-name"),
			TestingOptions: &recaptcha.EnterpriseKeyTestingOptionsArgs{
				TestingScore: pulumi.Float64(0.8),
			},
			Labels: pulumi.StringMap{
				"label-one": pulumi.String("value-one"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_recaptcha_enterprisekey" "primary" {
  display_name = "display-name-one"
  android_settings = {
    allow_all_package_names = true
    allowed_package_names   = []
  }
  project = "my-project-name"
  testing_options = {
    testing_score = 0.8
  }
  labels = {
    "label-one" = "value-one"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.recaptcha.EnterpriseKey;
import com.pulumi.gcp.recaptcha.EnterpriseKeyArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyAndroidSettingsArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyTestingOptionsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 primary = new EnterpriseKey("primary", EnterpriseKeyArgs.builder()
            .displayName("display-name-one")
            .androidSettings(EnterpriseKeyAndroidSettingsArgs.builder()
                .allowAllPackageNames(true)
                .allowedPackageNames()
                .build())
            .project("my-project-name")
            .testingOptions(EnterpriseKeyTestingOptionsArgs.builder()
                .testingScore(0.8)
                .build())
            .labels(Map.of("label-one", "value-one"))
            .build());

    }
}
resources:
  primary:
    type: gcp:recaptcha:EnterpriseKey
    properties:
      displayName: display-name-one
      androidSettings:
        allowAllPackageNames: true
        allowedPackageNames: []
      project: my-project-name
      testingOptions:
        testingScore: 0.8
      labels:
        label-one: value-one

Ios_key

A basic test of recaptcha enterprise key that can be used by iOS apps

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.recaptcha.EnterpriseKey("primary", {
    displayName: "display-name-one",
    iosSettings: {
        allowAllBundleIds: true,
        allowedBundleIds: [],
    },
    project: "my-project-name",
    testingOptions: {
        testingScore: 1,
    },
    labels: {
        "label-one": "value-one",
    },
});
import pulumi
import pulumi_gcp as gcp

primary = gcp.recaptcha.EnterpriseKey("primary",
    display_name="display-name-one",
    ios_settings={
        "allow_all_bundle_ids": True,
        "allowed_bundle_ids": [],
    },
    project="my-project-name",
    testing_options={
        "testing_score": float(1),
    },
    labels={
        "label-one": "value-one",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var primary = new Gcp.Recaptcha.EnterpriseKey("primary", new()
    {
        DisplayName = "display-name-one",
        IosSettings = new Gcp.Recaptcha.Inputs.EnterpriseKeyIosSettingsArgs
        {
            AllowAllBundleIds = true,
            AllowedBundleIds = new() { },
        },
        Project = "my-project-name",
        TestingOptions = new Gcp.Recaptcha.Inputs.EnterpriseKeyTestingOptionsArgs
        {
            TestingScore = 1.0,
        },
        Labels =
        {
            { "label-one", "value-one" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/recaptcha"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := recaptcha.NewEnterpriseKey(ctx, "primary", &recaptcha.EnterpriseKeyArgs{
			DisplayName: pulumi.String("display-name-one"),
			IosSettings: &recaptcha.EnterpriseKeyIosSettingsArgs{
				AllowAllBundleIds: pulumi.Bool(true),
				AllowedBundleIds:  pulumi.StringArray{},
			},
			Project: pulumi.String("my-project-name"),
			TestingOptions: &recaptcha.EnterpriseKeyTestingOptionsArgs{
				TestingScore: pulumi.Float64(1),
			},
			Labels: pulumi.StringMap{
				"label-one": pulumi.String("value-one"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_recaptcha_enterprisekey" "primary" {
  display_name = "display-name-one"
  ios_settings = {
    allow_all_bundle_ids = true
    allowed_bundle_ids   = []
  }
  project = "my-project-name"
  testing_options = {
    testing_score = 1
  }
  labels = {
    "label-one" = "value-one"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.recaptcha.EnterpriseKey;
import com.pulumi.gcp.recaptcha.EnterpriseKeyArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyIosSettingsArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyTestingOptionsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 primary = new EnterpriseKey("primary", EnterpriseKeyArgs.builder()
            .displayName("display-name-one")
            .iosSettings(EnterpriseKeyIosSettingsArgs.builder()
                .allowAllBundleIds(true)
                .allowedBundleIds()
                .build())
            .project("my-project-name")
            .testingOptions(EnterpriseKeyTestingOptionsArgs.builder()
                .testingScore(1.0)
                .build())
            .labels(Map.of("label-one", "value-one"))
            .build());

    }
}
resources:
  primary:
    type: gcp:recaptcha:EnterpriseKey
    properties:
      displayName: display-name-one
      iosSettings:
        allowAllBundleIds: true
        allowedBundleIds: []
      project: my-project-name
      testingOptions:
        testingScore: 1
      labels:
        label-one: value-one

Minimal_key

A minimal test of recaptcha enterprise key

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.recaptcha.EnterpriseKey("primary", {
    displayName: "display-name-one",
    project: "my-project-name",
    webSettings: {
        integrationType: "SCORE",
        allowAllDomains: true,
    },
    labels: {},
});
import pulumi
import pulumi_gcp as gcp

primary = gcp.recaptcha.EnterpriseKey("primary",
    display_name="display-name-one",
    project="my-project-name",
    web_settings={
        "integration_type": "SCORE",
        "allow_all_domains": True,
    },
    labels={})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var primary = new Gcp.Recaptcha.EnterpriseKey("primary", new()
    {
        DisplayName = "display-name-one",
        Project = "my-project-name",
        WebSettings = new Gcp.Recaptcha.Inputs.EnterpriseKeyWebSettingsArgs
        {
            IntegrationType = "SCORE",
            AllowAllDomains = true,
        },
        Labels = new() { },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/recaptcha"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := recaptcha.NewEnterpriseKey(ctx, "primary", &recaptcha.EnterpriseKeyArgs{
			DisplayName: pulumi.String("display-name-one"),
			Project:     pulumi.String("my-project-name"),
			WebSettings: &recaptcha.EnterpriseKeyWebSettingsArgs{
				IntegrationType: pulumi.String("SCORE"),
				AllowAllDomains: pulumi.Bool(true),
			},
			Labels: pulumi.StringMap{},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_recaptcha_enterprisekey" "primary" {
  display_name = "display-name-one"
  project      = "my-project-name"
  web_settings = {
    integration_type  = "SCORE"
    allow_all_domains = true
  }
  labels = {}
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.recaptcha.EnterpriseKey;
import com.pulumi.gcp.recaptcha.EnterpriseKeyArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyWebSettingsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 primary = new EnterpriseKey("primary", EnterpriseKeyArgs.builder()
            .displayName("display-name-one")
            .project("my-project-name")
            .webSettings(EnterpriseKeyWebSettingsArgs.builder()
                .integrationType("SCORE")
                .allowAllDomains(true)
                .build())
            .labels(Map.ofEntries(
            ))
            .build());

    }
}
resources:
  primary:
    type: gcp:recaptcha:EnterpriseKey
    properties:
      displayName: display-name-one
      project: my-project-name
      webSettings:
        integrationType: SCORE
        allowAllDomains: true
      labels: {}

Waf_key

A basic test of recaptcha enterprise key that includes WAF settings

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.recaptcha.EnterpriseKey("primary", {
    displayName: "display-name-one",
    project: "my-project-name",
    testingOptions: {
        testingChallenge: "NOCAPTCHA",
        testingScore: 0.5,
    },
    wafSettings: {
        wafFeature: "CHALLENGE_PAGE",
        wafService: "CA",
    },
    webSettings: {
        integrationType: "INVISIBLE",
        allowAllDomains: true,
        allowedDomains: [],
        challengeSecurityPreference: "USABILITY",
    },
    labels: {
        "label-one": "value-one",
    },
});
import pulumi
import pulumi_gcp as gcp

primary = gcp.recaptcha.EnterpriseKey("primary",
    display_name="display-name-one",
    project="my-project-name",
    testing_options={
        "testing_challenge": "NOCAPTCHA",
        "testing_score": 0.5,
    },
    waf_settings={
        "waf_feature": "CHALLENGE_PAGE",
        "waf_service": "CA",
    },
    web_settings={
        "integration_type": "INVISIBLE",
        "allow_all_domains": True,
        "allowed_domains": [],
        "challenge_security_preference": "USABILITY",
    },
    labels={
        "label-one": "value-one",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var primary = new Gcp.Recaptcha.EnterpriseKey("primary", new()
    {
        DisplayName = "display-name-one",
        Project = "my-project-name",
        TestingOptions = new Gcp.Recaptcha.Inputs.EnterpriseKeyTestingOptionsArgs
        {
            TestingChallenge = "NOCAPTCHA",
            TestingScore = 0.5,
        },
        WafSettings = new Gcp.Recaptcha.Inputs.EnterpriseKeyWafSettingsArgs
        {
            WafFeature = "CHALLENGE_PAGE",
            WafService = "CA",
        },
        WebSettings = new Gcp.Recaptcha.Inputs.EnterpriseKeyWebSettingsArgs
        {
            IntegrationType = "INVISIBLE",
            AllowAllDomains = true,
            AllowedDomains = new() { },
            ChallengeSecurityPreference = "USABILITY",
        },
        Labels =
        {
            { "label-one", "value-one" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/recaptcha"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := recaptcha.NewEnterpriseKey(ctx, "primary", &recaptcha.EnterpriseKeyArgs{
			DisplayName: pulumi.String("display-name-one"),
			Project:     pulumi.String("my-project-name"),
			TestingOptions: &recaptcha.EnterpriseKeyTestingOptionsArgs{
				TestingChallenge: pulumi.String("NOCAPTCHA"),
				TestingScore:     pulumi.Float64(0.5),
			},
			WafSettings: &recaptcha.EnterpriseKeyWafSettingsArgs{
				WafFeature: pulumi.String("CHALLENGE_PAGE"),
				WafService: pulumi.String("CA"),
			},
			WebSettings: &recaptcha.EnterpriseKeyWebSettingsArgs{
				IntegrationType:             pulumi.String("INVISIBLE"),
				AllowAllDomains:             pulumi.Bool(true),
				AllowedDomains:              pulumi.StringArray{},
				ChallengeSecurityPreference: pulumi.String("USABILITY"),
			},
			Labels: pulumi.StringMap{
				"label-one": pulumi.String("value-one"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_recaptcha_enterprisekey" "primary" {
  display_name = "display-name-one"
  project      = "my-project-name"
  testing_options = {
    testing_challenge = "NOCAPTCHA"
    testing_score     = 0.5
  }
  waf_settings = {
    waf_feature = "CHALLENGE_PAGE"
    waf_service = "CA"
  }
  web_settings = {
    integration_type              = "INVISIBLE"
    allow_all_domains             = true
    allowed_domains               = []
    challenge_security_preference = "USABILITY"
  }
  labels = {
    "label-one" = "value-one"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.recaptcha.EnterpriseKey;
import com.pulumi.gcp.recaptcha.EnterpriseKeyArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyTestingOptionsArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyWafSettingsArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyWebSettingsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 primary = new EnterpriseKey("primary", EnterpriseKeyArgs.builder()
            .displayName("display-name-one")
            .project("my-project-name")
            .testingOptions(EnterpriseKeyTestingOptionsArgs.builder()
                .testingChallenge("NOCAPTCHA")
                .testingScore(0.5)
                .build())
            .wafSettings(EnterpriseKeyWafSettingsArgs.builder()
                .wafFeature("CHALLENGE_PAGE")
                .wafService("CA")
                .build())
            .webSettings(EnterpriseKeyWebSettingsArgs.builder()
                .integrationType("INVISIBLE")
                .allowAllDomains(true)
                .allowedDomains()
                .challengeSecurityPreference("USABILITY")
                .build())
            .labels(Map.of("label-one", "value-one"))
            .build());

    }
}
resources:
  primary:
    type: gcp:recaptcha:EnterpriseKey
    properties:
      displayName: display-name-one
      project: my-project-name
      testingOptions:
        testingChallenge: NOCAPTCHA
        testingScore: 0.5
      wafSettings:
        wafFeature: CHALLENGE_PAGE
        wafService: CA
      webSettings:
        integrationType: INVISIBLE
        allowAllDomains: true
        allowedDomains: []
        challengeSecurityPreference: USABILITY
      labels:
        label-one: value-one

Web_key

A basic test of recaptcha enterprise key that can be used by websites

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.recaptcha.EnterpriseKey("primary", {
    displayName: "display-name-one",
    project: "my-project-name",
    testingOptions: {
        testingChallenge: "NOCAPTCHA",
        testingScore: 0.5,
    },
    webSettings: {
        integrationType: "CHECKBOX",
        allowAllDomains: true,
        allowedDomains: [],
        challengeSecurityPreference: "USABILITY",
    },
    labels: {
        "label-one": "value-one",
    },
});
import pulumi
import pulumi_gcp as gcp

primary = gcp.recaptcha.EnterpriseKey("primary",
    display_name="display-name-one",
    project="my-project-name",
    testing_options={
        "testing_challenge": "NOCAPTCHA",
        "testing_score": 0.5,
    },
    web_settings={
        "integration_type": "CHECKBOX",
        "allow_all_domains": True,
        "allowed_domains": [],
        "challenge_security_preference": "USABILITY",
    },
    labels={
        "label-one": "value-one",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var primary = new Gcp.Recaptcha.EnterpriseKey("primary", new()
    {
        DisplayName = "display-name-one",
        Project = "my-project-name",
        TestingOptions = new Gcp.Recaptcha.Inputs.EnterpriseKeyTestingOptionsArgs
        {
            TestingChallenge = "NOCAPTCHA",
            TestingScore = 0.5,
        },
        WebSettings = new Gcp.Recaptcha.Inputs.EnterpriseKeyWebSettingsArgs
        {
            IntegrationType = "CHECKBOX",
            AllowAllDomains = true,
            AllowedDomains = new() { },
            ChallengeSecurityPreference = "USABILITY",
        },
        Labels =
        {
            { "label-one", "value-one" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/recaptcha"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := recaptcha.NewEnterpriseKey(ctx, "primary", &recaptcha.EnterpriseKeyArgs{
			DisplayName: pulumi.String("display-name-one"),
			Project:     pulumi.String("my-project-name"),
			TestingOptions: &recaptcha.EnterpriseKeyTestingOptionsArgs{
				TestingChallenge: pulumi.String("NOCAPTCHA"),
				TestingScore:     pulumi.Float64(0.5),
			},
			WebSettings: &recaptcha.EnterpriseKeyWebSettingsArgs{
				IntegrationType:             pulumi.String("CHECKBOX"),
				AllowAllDomains:             pulumi.Bool(true),
				AllowedDomains:              pulumi.StringArray{},
				ChallengeSecurityPreference: pulumi.String("USABILITY"),
			},
			Labels: pulumi.StringMap{
				"label-one": pulumi.String("value-one"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_recaptcha_enterprisekey" "primary" {
  display_name = "display-name-one"
  project      = "my-project-name"
  testing_options = {
    testing_challenge = "NOCAPTCHA"
    testing_score     = 0.5
  }
  web_settings = {
    integration_type              = "CHECKBOX"
    allow_all_domains             = true
    allowed_domains               = []
    challenge_security_preference = "USABILITY"
  }
  labels = {
    "label-one" = "value-one"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.recaptcha.EnterpriseKey;
import com.pulumi.gcp.recaptcha.EnterpriseKeyArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyTestingOptionsArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyWebSettingsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 primary = new EnterpriseKey("primary", EnterpriseKeyArgs.builder()
            .displayName("display-name-one")
            .project("my-project-name")
            .testingOptions(EnterpriseKeyTestingOptionsArgs.builder()
                .testingChallenge("NOCAPTCHA")
                .testingScore(0.5)
                .build())
            .webSettings(EnterpriseKeyWebSettingsArgs.builder()
                .integrationType("CHECKBOX")
                .allowAllDomains(true)
                .allowedDomains()
                .challengeSecurityPreference("USABILITY")
                .build())
            .labels(Map.of("label-one", "value-one"))
            .build());

    }
}
resources:
  primary:
    type: gcp:recaptcha:EnterpriseKey
    properties:
      displayName: display-name-one
      project: my-project-name
      testingOptions:
        testingChallenge: NOCAPTCHA
        testingScore: 0.5
      webSettings:
        integrationType: CHECKBOX
        allowAllDomains: true
        allowedDomains: []
        challengeSecurityPreference: USABILITY
      labels:
        label-one: value-one

Web_score_key

A basic test of recaptcha enterprise key with score integration type that can be used by websites

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.recaptcha.EnterpriseKey("primary", {
    displayName: "display-name-one",
    project: "my-project-name",
    testingOptions: {
        testingScore: 0.5,
    },
    webSettings: {
        integrationType: "SCORE",
        allowAllDomains: true,
        allowAmpTraffic: false,
        allowedDomains: [],
    },
    labels: {
        "label-one": "value-one",
    },
});
import pulumi
import pulumi_gcp as gcp

primary = gcp.recaptcha.EnterpriseKey("primary",
    display_name="display-name-one",
    project="my-project-name",
    testing_options={
        "testing_score": 0.5,
    },
    web_settings={
        "integration_type": "SCORE",
        "allow_all_domains": True,
        "allow_amp_traffic": False,
        "allowed_domains": [],
    },
    labels={
        "label-one": "value-one",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var primary = new Gcp.Recaptcha.EnterpriseKey("primary", new()
    {
        DisplayName = "display-name-one",
        Project = "my-project-name",
        TestingOptions = new Gcp.Recaptcha.Inputs.EnterpriseKeyTestingOptionsArgs
        {
            TestingScore = 0.5,
        },
        WebSettings = new Gcp.Recaptcha.Inputs.EnterpriseKeyWebSettingsArgs
        {
            IntegrationType = "SCORE",
            AllowAllDomains = true,
            AllowAmpTraffic = false,
            AllowedDomains = new() { },
        },
        Labels =
        {
            { "label-one", "value-one" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/recaptcha"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := recaptcha.NewEnterpriseKey(ctx, "primary", &recaptcha.EnterpriseKeyArgs{
			DisplayName: pulumi.String("display-name-one"),
			Project:     pulumi.String("my-project-name"),
			TestingOptions: &recaptcha.EnterpriseKeyTestingOptionsArgs{
				TestingScore: pulumi.Float64(0.5),
			},
			WebSettings: &recaptcha.EnterpriseKeyWebSettingsArgs{
				IntegrationType: pulumi.String("SCORE"),
				AllowAllDomains: pulumi.Bool(true),
				AllowAmpTraffic: pulumi.Bool(false),
				AllowedDomains:  pulumi.StringArray{},
			},
			Labels: pulumi.StringMap{
				"label-one": pulumi.String("value-one"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_recaptcha_enterprisekey" "primary" {
  display_name = "display-name-one"
  project      = "my-project-name"
  testing_options = {
    testing_score = 0.5
  }
  web_settings = {
    integration_type  = "SCORE"
    allow_all_domains = true
    allow_amp_traffic = false
    allowed_domains   = []
  }
  labels = {
    "label-one" = "value-one"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.recaptcha.EnterpriseKey;
import com.pulumi.gcp.recaptcha.EnterpriseKeyArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyTestingOptionsArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyWebSettingsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 primary = new EnterpriseKey("primary", EnterpriseKeyArgs.builder()
            .displayName("display-name-one")
            .project("my-project-name")
            .testingOptions(EnterpriseKeyTestingOptionsArgs.builder()
                .testingScore(0.5)
                .build())
            .webSettings(EnterpriseKeyWebSettingsArgs.builder()
                .integrationType("SCORE")
                .allowAllDomains(true)
                .allowAmpTraffic(false)
                .allowedDomains()
                .build())
            .labels(Map.of("label-one", "value-one"))
            .build());

    }
}
resources:
  primary:
    type: gcp:recaptcha:EnterpriseKey
    properties:
      displayName: display-name-one
      project: my-project-name
      testingOptions:
        testingScore: 0.5
      webSettings:
        integrationType: SCORE
        allowAllDomains: true
        allowAmpTraffic: false
        allowedDomains: []
      labels:
        label-one: value-one

Import

Key can be imported using any of these accepted formats:

  • projects/{{project}}/keys/{{name}}
  • {{project}}/{{name}}
  • {{name}}

When using the pulumi import command, Key can be imported using one of the formats above. For example:

$ pulumi import gcp:recaptcha/enterpriseKey:EnterpriseKey default projects/{{project}}/keys/{{name}}
$ pulumi import gcp:recaptcha/enterpriseKey:EnterpriseKey default {{project}}/{{name}}
$ pulumi import gcp:recaptcha/enterpriseKey:EnterpriseKey default {{name}}

Constructors

EnterpriseKey(String name, {EnterpriseKeyArgs? args, CustomResourceOptions? options})
Creates a new EnterpriseKey. name The Pulumi resource name. args Arguments used to configure this EnterpriseKey. The set of arguments for EnterpriseKey. options Resource options controlling this resource's behavior.
EnterpriseKey.reference(String urn)
Creates a typed reference to an existing EnterpriseKey resource.

Properties

androidSettings ↔ Output<EnterpriseKeyAndroidSettings?>
Settings for keys that can be used by Android apps.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
createTime ↔ Output<String>
The timestamp corresponding to the creation of this Key.
latefinal
deletionPolicy ↔ Output<String>
Whether Terraform will be prevented from destroying the resource. Defaults to "DELETE". When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
latefinal
displayName ↔ Output<String>
Human-readable display name of this key. Modifiable by user.
latefinal
effectiveLabels ↔ Output<Map<String, String>>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
iosSettings ↔ Output<EnterpriseKeyIosSettings?>
Settings for keys that can be used by iOS apps.
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
labels ↔ Output<Map<String, String>?>
See Creating and managing labels.
latefinal
name ↔ Output<String>
The resource id for the Key, which is the same as the Site Key itself.
latefinal
project ↔ Output<String>
The project for the resource
latefinal
pulumiLabels ↔ Output<Map<String, String>>
The combination of labels configured directly on the resource and default labels configured on the provider.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
testingOptions ↔ Output<EnterpriseKeyTestingOptions?>
Options for user acceptance testing.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
wafSettings ↔ Output<EnterpriseKeyWafSettings?>
Settings specific to keys that can be used for WAF (Web Application Firewall).
latefinal
webSettings ↔ Output<EnterpriseKeyWebSettings?>
Settings for keys that can be used by websites.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {EnterpriseKeyState? state, CustomResourceOptions? options}) → EnterpriseKey
Gets an existing EnterpriseKey resource's state with the given name and id.