1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. SecurityPolicy
Google Cloud Classic v8.7.0 published on Tuesday, Oct 29, 2024 by Pulumi

gcp.compute.SecurityPolicy

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.7.0 published on Tuesday, Oct 29, 2024 by Pulumi

    A Security Policy defines an IP blacklist or whitelist that protects load balanced Google Cloud services by denying or permitting traffic from specified IP ranges. For more information see the official documentation and the API.

    Security Policy is used by google_compute_backend_service.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const policy = new gcp.compute.SecurityPolicy("policy", {
        name: "my-policy",
        rules: [
            {
                action: "deny(403)",
                priority: 1000,
                match: {
                    versionedExpr: "SRC_IPS_V1",
                    config: {
                        srcIpRanges: ["9.9.9.0/24"],
                    },
                },
                description: "Deny access to IPs in 9.9.9.0/24",
            },
            {
                action: "allow",
                priority: 2147483647,
                match: {
                    versionedExpr: "SRC_IPS_V1",
                    config: {
                        srcIpRanges: ["*"],
                    },
                },
                description: "default rule",
            },
        ],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    policy = gcp.compute.SecurityPolicy("policy",
        name="my-policy",
        rules=[
            {
                "action": "deny(403)",
                "priority": 1000,
                "match": {
                    "versioned_expr": "SRC_IPS_V1",
                    "config": {
                        "src_ip_ranges": ["9.9.9.0/24"],
                    },
                },
                "description": "Deny access to IPs in 9.9.9.0/24",
            },
            {
                "action": "allow",
                "priority": 2147483647,
                "match": {
                    "versioned_expr": "SRC_IPS_V1",
                    "config": {
                        "src_ip_ranges": ["*"],
                    },
                },
                "description": "default rule",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewSecurityPolicy(ctx, "policy", &compute.SecurityPolicyArgs{
    			Name: pulumi.String("my-policy"),
    			Rules: compute.SecurityPolicyRuleTypeArray{
    				&compute.SecurityPolicyRuleTypeArgs{
    					Action:   pulumi.String("deny(403)"),
    					Priority: pulumi.Int(1000),
    					Match: &compute.SecurityPolicyRuleMatchArgs{
    						VersionedExpr: pulumi.String("SRC_IPS_V1"),
    						Config: &compute.SecurityPolicyRuleMatchConfigArgs{
    							SrcIpRanges: pulumi.StringArray{
    								pulumi.String("9.9.9.0/24"),
    							},
    						},
    					},
    					Description: pulumi.String("Deny access to IPs in 9.9.9.0/24"),
    				},
    				&compute.SecurityPolicyRuleTypeArgs{
    					Action:   pulumi.String("allow"),
    					Priority: pulumi.Int(2147483647),
    					Match: &compute.SecurityPolicyRuleMatchArgs{
    						VersionedExpr: pulumi.String("SRC_IPS_V1"),
    						Config: &compute.SecurityPolicyRuleMatchConfigArgs{
    							SrcIpRanges: pulumi.StringArray{
    								pulumi.String("*"),
    							},
    						},
    					},
    					Description: pulumi.String("default rule"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var policy = new Gcp.Compute.SecurityPolicy("policy", new()
        {
            Name = "my-policy",
            Rules = new[]
            {
                new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
                {
                    Action = "deny(403)",
                    Priority = 1000,
                    Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
                    {
                        VersionedExpr = "SRC_IPS_V1",
                        Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
                        {
                            SrcIpRanges = new[]
                            {
                                "9.9.9.0/24",
                            },
                        },
                    },
                    Description = "Deny access to IPs in 9.9.9.0/24",
                },
                new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
                {
                    Action = "allow",
                    Priority = 2147483647,
                    Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
                    {
                        VersionedExpr = "SRC_IPS_V1",
                        Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
                        {
                            SrcIpRanges = new[]
                            {
                                "*",
                            },
                        },
                    },
                    Description = "default rule",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.SecurityPolicy;
    import com.pulumi.gcp.compute.SecurityPolicyArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchConfigArgs;
    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 policy = new SecurityPolicy("policy", SecurityPolicyArgs.builder()
                .name("my-policy")
                .rules(            
                    SecurityPolicyRuleArgs.builder()
                        .action("deny(403)")
                        .priority("1000")
                        .match(SecurityPolicyRuleMatchArgs.builder()
                            .versionedExpr("SRC_IPS_V1")
                            .config(SecurityPolicyRuleMatchConfigArgs.builder()
                                .srcIpRanges("9.9.9.0/24")
                                .build())
                            .build())
                        .description("Deny access to IPs in 9.9.9.0/24")
                        .build(),
                    SecurityPolicyRuleArgs.builder()
                        .action("allow")
                        .priority("2147483647")
                        .match(SecurityPolicyRuleMatchArgs.builder()
                            .versionedExpr("SRC_IPS_V1")
                            .config(SecurityPolicyRuleMatchConfigArgs.builder()
                                .srcIpRanges("*")
                                .build())
                            .build())
                        .description("default rule")
                        .build())
                .build());
    
        }
    }
    
    resources:
      policy:
        type: gcp:compute:SecurityPolicy
        properties:
          name: my-policy
          rules:
            - action: deny(403)
              priority: '1000'
              match:
                versionedExpr: SRC_IPS_V1
                config:
                  srcIpRanges:
                    - 9.9.9.0/24
              description: Deny access to IPs in 9.9.9.0/24
            - action: allow
              priority: '2147483647'
              match:
                versionedExpr: SRC_IPS_V1
                config:
                  srcIpRanges:
                    - '*'
              description: default rule
    

    With ReCAPTCHA Configuration Options

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const primary = new gcp.recaptcha.EnterpriseKey("primary", {
        displayName: "display-name",
        labels: {
            "label-one": "value-one",
        },
        project: "my-project-name",
        webSettings: {
            integrationType: "INVISIBLE",
            allowAllDomains: true,
            allowedDomains: ["localhost"],
        },
    });
    const policy = new gcp.compute.SecurityPolicy("policy", {
        name: "my-policy",
        description: "basic security policy",
        type: "CLOUD_ARMOR",
        recaptchaOptionsConfig: {
            redirectSiteKey: primary.name,
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    primary = gcp.recaptcha.EnterpriseKey("primary",
        display_name="display-name",
        labels={
            "label-one": "value-one",
        },
        project="my-project-name",
        web_settings={
            "integration_type": "INVISIBLE",
            "allow_all_domains": True,
            "allowed_domains": ["localhost"],
        })
    policy = gcp.compute.SecurityPolicy("policy",
        name="my-policy",
        description="basic security policy",
        type="CLOUD_ARMOR",
        recaptcha_options_config={
            "redirect_site_key": primary.name,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/recaptcha"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		primary, err := recaptcha.NewEnterpriseKey(ctx, "primary", &recaptcha.EnterpriseKeyArgs{
    			DisplayName: pulumi.String("display-name"),
    			Labels: pulumi.StringMap{
    				"label-one": pulumi.String("value-one"),
    			},
    			Project: pulumi.String("my-project-name"),
    			WebSettings: &recaptcha.EnterpriseKeyWebSettingsArgs{
    				IntegrationType: pulumi.String("INVISIBLE"),
    				AllowAllDomains: pulumi.Bool(true),
    				AllowedDomains: pulumi.StringArray{
    					pulumi.String("localhost"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewSecurityPolicy(ctx, "policy", &compute.SecurityPolicyArgs{
    			Name:        pulumi.String("my-policy"),
    			Description: pulumi.String("basic security policy"),
    			Type:        pulumi.String("CLOUD_ARMOR"),
    			RecaptchaOptionsConfig: &compute.SecurityPolicyRecaptchaOptionsConfigArgs{
    				RedirectSiteKey: primary.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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",
            Labels = 
            {
                { "label-one", "value-one" },
            },
            Project = "my-project-name",
            WebSettings = new Gcp.Recaptcha.Inputs.EnterpriseKeyWebSettingsArgs
            {
                IntegrationType = "INVISIBLE",
                AllowAllDomains = true,
                AllowedDomains = new[]
                {
                    "localhost",
                },
            },
        });
    
        var policy = new Gcp.Compute.SecurityPolicy("policy", new()
        {
            Name = "my-policy",
            Description = "basic security policy",
            Type = "CLOUD_ARMOR",
            RecaptchaOptionsConfig = new Gcp.Compute.Inputs.SecurityPolicyRecaptchaOptionsConfigArgs
            {
                RedirectSiteKey = primary.Name,
            },
        });
    
    });
    
    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 com.pulumi.gcp.compute.SecurityPolicy;
    import com.pulumi.gcp.compute.SecurityPolicyArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRecaptchaOptionsConfigArgs;
    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 primary = new EnterpriseKey("primary", EnterpriseKeyArgs.builder()
                .displayName("display-name")
                .labels(Map.of("label-one", "value-one"))
                .project("my-project-name")
                .webSettings(EnterpriseKeyWebSettingsArgs.builder()
                    .integrationType("INVISIBLE")
                    .allowAllDomains(true)
                    .allowedDomains("localhost")
                    .build())
                .build());
    
            var policy = new SecurityPolicy("policy", SecurityPolicyArgs.builder()
                .name("my-policy")
                .description("basic security policy")
                .type("CLOUD_ARMOR")
                .recaptchaOptionsConfig(SecurityPolicyRecaptchaOptionsConfigArgs.builder()
                    .redirectSiteKey(primary.name())
                    .build())
                .build());
    
        }
    }
    
    resources:
      primary:
        type: gcp:recaptcha:EnterpriseKey
        properties:
          displayName: display-name
          labels:
            label-one: value-one
          project: my-project-name
          webSettings:
            integrationType: INVISIBLE
            allowAllDomains: true
            allowedDomains:
              - localhost
      policy:
        type: gcp:compute:SecurityPolicy
        properties:
          name: my-policy
          description: basic security policy
          type: CLOUD_ARMOR
          recaptchaOptionsConfig:
            redirectSiteKey: ${primary.name}
    

    With Header Actions

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const policy = new gcp.compute.SecurityPolicy("policy", {
        name: "my-policy",
        rules: [
            {
                action: "allow",
                priority: 2147483647,
                match: {
                    versionedExpr: "SRC_IPS_V1",
                    config: {
                        srcIpRanges: ["*"],
                    },
                },
                description: "default rule",
            },
            {
                action: "allow",
                priority: 1000,
                match: {
                    expr: {
                        expression: "request.path.matches(\"/login.html\") && token.recaptcha_session.score < 0.2",
                    },
                },
                headerAction: {
                    requestHeadersToAdds: [
                        {
                            headerName: "reCAPTCHA-Warning",
                            headerValue: "high",
                        },
                        {
                            headerName: "X-Resource",
                            headerValue: "test",
                        },
                    ],
                },
            },
        ],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    policy = gcp.compute.SecurityPolicy("policy",
        name="my-policy",
        rules=[
            {
                "action": "allow",
                "priority": 2147483647,
                "match": {
                    "versioned_expr": "SRC_IPS_V1",
                    "config": {
                        "src_ip_ranges": ["*"],
                    },
                },
                "description": "default rule",
            },
            {
                "action": "allow",
                "priority": 1000,
                "match": {
                    "expr": {
                        "expression": "request.path.matches(\"/login.html\") && token.recaptcha_session.score < 0.2",
                    },
                },
                "header_action": {
                    "request_headers_to_adds": [
                        {
                            "header_name": "reCAPTCHA-Warning",
                            "header_value": "high",
                        },
                        {
                            "header_name": "X-Resource",
                            "header_value": "test",
                        },
                    ],
                },
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewSecurityPolicy(ctx, "policy", &compute.SecurityPolicyArgs{
    			Name: pulumi.String("my-policy"),
    			Rules: compute.SecurityPolicyRuleTypeArray{
    				&compute.SecurityPolicyRuleTypeArgs{
    					Action:   pulumi.String("allow"),
    					Priority: pulumi.Int(2147483647),
    					Match: &compute.SecurityPolicyRuleMatchArgs{
    						VersionedExpr: pulumi.String("SRC_IPS_V1"),
    						Config: &compute.SecurityPolicyRuleMatchConfigArgs{
    							SrcIpRanges: pulumi.StringArray{
    								pulumi.String("*"),
    							},
    						},
    					},
    					Description: pulumi.String("default rule"),
    				},
    				&compute.SecurityPolicyRuleTypeArgs{
    					Action:   pulumi.String("allow"),
    					Priority: pulumi.Int(1000),
    					Match: &compute.SecurityPolicyRuleMatchArgs{
    						Expr: &compute.SecurityPolicyRuleMatchExprArgs{
    							Expression: pulumi.String("request.path.matches(\"/login.html\") && token.recaptcha_session.score < 0.2"),
    						},
    					},
    					HeaderAction: &compute.SecurityPolicyRuleHeaderActionArgs{
    						RequestHeadersToAdds: compute.SecurityPolicyRuleHeaderActionRequestHeadersToAddArray{
    							&compute.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs{
    								HeaderName:  pulumi.String("reCAPTCHA-Warning"),
    								HeaderValue: pulumi.String("high"),
    							},
    							&compute.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs{
    								HeaderName:  pulumi.String("X-Resource"),
    								HeaderValue: pulumi.String("test"),
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var policy = new Gcp.Compute.SecurityPolicy("policy", new()
        {
            Name = "my-policy",
            Rules = new[]
            {
                new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
                {
                    Action = "allow",
                    Priority = 2147483647,
                    Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
                    {
                        VersionedExpr = "SRC_IPS_V1",
                        Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
                        {
                            SrcIpRanges = new[]
                            {
                                "*",
                            },
                        },
                    },
                    Description = "default rule",
                },
                new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
                {
                    Action = "allow",
                    Priority = 1000,
                    Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
                    {
                        Expr = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchExprArgs
                        {
                            Expression = "request.path.matches(\"/login.html\") && token.recaptcha_session.score < 0.2",
                        },
                    },
                    HeaderAction = new Gcp.Compute.Inputs.SecurityPolicyRuleHeaderActionArgs
                    {
                        RequestHeadersToAdds = new[]
                        {
                            new Gcp.Compute.Inputs.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs
                            {
                                HeaderName = "reCAPTCHA-Warning",
                                HeaderValue = "high",
                            },
                            new Gcp.Compute.Inputs.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs
                            {
                                HeaderName = "X-Resource",
                                HeaderValue = "test",
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.SecurityPolicy;
    import com.pulumi.gcp.compute.SecurityPolicyArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchConfigArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchExprArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleHeaderActionArgs;
    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 policy = new SecurityPolicy("policy", SecurityPolicyArgs.builder()
                .name("my-policy")
                .rules(            
                    SecurityPolicyRuleArgs.builder()
                        .action("allow")
                        .priority("2147483647")
                        .match(SecurityPolicyRuleMatchArgs.builder()
                            .versionedExpr("SRC_IPS_V1")
                            .config(SecurityPolicyRuleMatchConfigArgs.builder()
                                .srcIpRanges("*")
                                .build())
                            .build())
                        .description("default rule")
                        .build(),
                    SecurityPolicyRuleArgs.builder()
                        .action("allow")
                        .priority("1000")
                        .match(SecurityPolicyRuleMatchArgs.builder()
                            .expr(SecurityPolicyRuleMatchExprArgs.builder()
                                .expression("request.path.matches(\"/login.html\") && token.recaptcha_session.score < 0.2")
                                .build())
                            .build())
                        .headerAction(SecurityPolicyRuleHeaderActionArgs.builder()
                            .requestHeadersToAdds(                        
                                SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs.builder()
                                    .headerName("reCAPTCHA-Warning")
                                    .headerValue("high")
                                    .build(),
                                SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs.builder()
                                    .headerName("X-Resource")
                                    .headerValue("test")
                                    .build())
                            .build())
                        .build())
                .build());
    
        }
    }
    
    resources:
      policy:
        type: gcp:compute:SecurityPolicy
        properties:
          name: my-policy
          rules:
            - action: allow
              priority: '2147483647'
              match:
                versionedExpr: SRC_IPS_V1
                config:
                  srcIpRanges:
                    - '*'
              description: default rule
            - action: allow
              priority: '1000'
              match:
                expr:
                  expression: request.path.matches("/login.html") && token.recaptcha_session.score < 0.2
              headerAction:
                requestHeadersToAdds:
                  - headerName: reCAPTCHA-Warning
                    headerValue: high
                  - headerName: X-Resource
                    headerValue: test
    

    With EnforceOnKey Value As Empty String

    A scenario example that won’t cause any conflict between enforce_on_key and enforce_on_key_configs, because enforce_on_key was specified as an empty string:

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const policy = new gcp.compute.SecurityPolicy("policy", {
        name: "%s",
        description: "throttle rule with enforce_on_key_configs",
        rules: [{
            action: "throttle",
            priority: 2147483647,
            match: {
                versionedExpr: "SRC_IPS_V1",
                config: {
                    srcIpRanges: ["*"],
                },
            },
            description: "default rule",
            rateLimitOptions: {
                conformAction: "allow",
                exceedAction: "redirect",
                enforceOnKey: "",
                enforceOnKeyConfigs: [{
                    enforceOnKeyType: "IP",
                }],
                exceedRedirectOptions: {
                    type: "EXTERNAL_302",
                    target: "<https://www.example.com>",
                },
                rateLimitThreshold: {
                    count: 10,
                    intervalSec: 60,
                },
            },
        }],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    policy = gcp.compute.SecurityPolicy("policy",
        name="%s",
        description="throttle rule with enforce_on_key_configs",
        rules=[{
            "action": "throttle",
            "priority": 2147483647,
            "match": {
                "versioned_expr": "SRC_IPS_V1",
                "config": {
                    "src_ip_ranges": ["*"],
                },
            },
            "description": "default rule",
            "rate_limit_options": {
                "conform_action": "allow",
                "exceed_action": "redirect",
                "enforce_on_key": "",
                "enforce_on_key_configs": [{
                    "enforce_on_key_type": "IP",
                }],
                "exceed_redirect_options": {
                    "type": "EXTERNAL_302",
                    "target": "<https://www.example.com>",
                },
                "rate_limit_threshold": {
                    "count": 10,
                    "interval_sec": 60,
                },
            },
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewSecurityPolicy(ctx, "policy", &compute.SecurityPolicyArgs{
    			Name:        pulumi.String("%s"),
    			Description: pulumi.String("throttle rule with enforce_on_key_configs"),
    			Rules: compute.SecurityPolicyRuleTypeArray{
    				&compute.SecurityPolicyRuleTypeArgs{
    					Action:   pulumi.String("throttle"),
    					Priority: pulumi.Int(2147483647),
    					Match: &compute.SecurityPolicyRuleMatchArgs{
    						VersionedExpr: pulumi.String("SRC_IPS_V1"),
    						Config: &compute.SecurityPolicyRuleMatchConfigArgs{
    							SrcIpRanges: pulumi.StringArray{
    								pulumi.String("*"),
    							},
    						},
    					},
    					Description: pulumi.String("default rule"),
    					RateLimitOptions: &compute.SecurityPolicyRuleRateLimitOptionsArgs{
    						ConformAction: pulumi.String("allow"),
    						ExceedAction:  pulumi.String("redirect"),
    						EnforceOnKey:  pulumi.String(""),
    						EnforceOnKeyConfigs: compute.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArray{
    							&compute.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs{
    								EnforceOnKeyType: pulumi.String("IP"),
    							},
    						},
    						ExceedRedirectOptions: &compute.SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs{
    							Type:   pulumi.String("EXTERNAL_302"),
    							Target: pulumi.String("<https://www.example.com>"),
    						},
    						RateLimitThreshold: &compute.SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs{
    							Count:       pulumi.Int(10),
    							IntervalSec: pulumi.Int(60),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var policy = new Gcp.Compute.SecurityPolicy("policy", new()
        {
            Name = "%s",
            Description = "throttle rule with enforce_on_key_configs",
            Rules = new[]
            {
                new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
                {
                    Action = "throttle",
                    Priority = 2147483647,
                    Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
                    {
                        VersionedExpr = "SRC_IPS_V1",
                        Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
                        {
                            SrcIpRanges = new[]
                            {
                                "*",
                            },
                        },
                    },
                    Description = "default rule",
                    RateLimitOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsArgs
                    {
                        ConformAction = "allow",
                        ExceedAction = "redirect",
                        EnforceOnKey = "",
                        EnforceOnKeyConfigs = new[]
                        {
                            new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs
                            {
                                EnforceOnKeyType = "IP",
                            },
                        },
                        ExceedRedirectOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs
                        {
                            Type = "EXTERNAL_302",
                            Target = "<https://www.example.com>",
                        },
                        RateLimitThreshold = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs
                        {
                            Count = 10,
                            IntervalSec = 60,
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.SecurityPolicy;
    import com.pulumi.gcp.compute.SecurityPolicyArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchConfigArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleRateLimitOptionsArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs;
    import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs;
    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 policy = new SecurityPolicy("policy", SecurityPolicyArgs.builder()
                .name("%s")
                .description("throttle rule with enforce_on_key_configs")
                .rules(SecurityPolicyRuleArgs.builder()
                    .action("throttle")
                    .priority("2147483647")
                    .match(SecurityPolicyRuleMatchArgs.builder()
                        .versionedExpr("SRC_IPS_V1")
                        .config(SecurityPolicyRuleMatchConfigArgs.builder()
                            .srcIpRanges("*")
                            .build())
                        .build())
                    .description("default rule")
                    .rateLimitOptions(SecurityPolicyRuleRateLimitOptionsArgs.builder()
                        .conformAction("allow")
                        .exceedAction("redirect")
                        .enforceOnKey("")
                        .enforceOnKeyConfigs(SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs.builder()
                            .enforceOnKeyType("IP")
                            .build())
                        .exceedRedirectOptions(SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs.builder()
                            .type("EXTERNAL_302")
                            .target("<https://www.example.com>")
                            .build())
                        .rateLimitThreshold(SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs.builder()
                            .count(10)
                            .intervalSec(60)
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      policy:
        type: gcp:compute:SecurityPolicy
        properties:
          name: '%s'
          description: throttle rule with enforce_on_key_configs
          rules:
            - action: throttle
              priority: '2147483647'
              match:
                versionedExpr: SRC_IPS_V1
                config:
                  srcIpRanges:
                    - '*'
              description: default rule
              rateLimitOptions:
                conformAction: allow
                exceedAction: redirect
                enforceOnKey:
                enforceOnKeyConfigs:
                  - enforceOnKeyType: IP
                exceedRedirectOptions:
                  type: EXTERNAL_302
                  target: <https://www.example.com>
                rateLimitThreshold:
                  count: 10
                  intervalSec: 60
    

    Create SecurityPolicy Resource

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

    Constructor syntax

    new SecurityPolicy(name: string, args?: SecurityPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityPolicy(resource_name: str,
                       args: Optional[SecurityPolicyArgs] = None,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityPolicy(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       adaptive_protection_config: Optional[SecurityPolicyAdaptiveProtectionConfigArgs] = None,
                       advanced_options_config: Optional[SecurityPolicyAdvancedOptionsConfigArgs] = None,
                       description: Optional[str] = None,
                       name: Optional[str] = None,
                       project: Optional[str] = None,
                       recaptcha_options_config: Optional[SecurityPolicyRecaptchaOptionsConfigArgs] = None,
                       rules: Optional[Sequence[SecurityPolicyRuleArgs]] = None,
                       type: Optional[str] = None)
    func NewSecurityPolicy(ctx *Context, name string, args *SecurityPolicyArgs, opts ...ResourceOption) (*SecurityPolicy, error)
    public SecurityPolicy(string name, SecurityPolicyArgs? args = null, CustomResourceOptions? opts = null)
    public SecurityPolicy(String name, SecurityPolicyArgs args)
    public SecurityPolicy(String name, SecurityPolicyArgs args, CustomResourceOptions options)
    
    type: gcp:compute:SecurityPolicy
    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 SecurityPolicyArgs
    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 SecurityPolicyArgs
    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 SecurityPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityPolicyArgs
    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 securityPolicyResource = new Gcp.Compute.SecurityPolicy("securityPolicyResource", new()
    {
        AdaptiveProtectionConfig = new Gcp.Compute.Inputs.SecurityPolicyAdaptiveProtectionConfigArgs
        {
            AutoDeployConfig = new Gcp.Compute.Inputs.SecurityPolicyAdaptiveProtectionConfigAutoDeployConfigArgs
            {
                ConfidenceThreshold = 0,
                ExpirationSec = 0,
                ImpactedBaselineThreshold = 0,
                LoadThreshold = 0,
            },
            Layer7DdosDefenseConfig = new Gcp.Compute.Inputs.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigArgs
            {
                Enable = false,
                RuleVisibility = "string",
            },
        },
        AdvancedOptionsConfig = new Gcp.Compute.Inputs.SecurityPolicyAdvancedOptionsConfigArgs
        {
            JsonCustomConfig = new Gcp.Compute.Inputs.SecurityPolicyAdvancedOptionsConfigJsonCustomConfigArgs
            {
                ContentTypes = new[]
                {
                    "string",
                },
            },
            JsonParsing = "string",
            LogLevel = "string",
            UserIpRequestHeaders = new[]
            {
                "string",
            },
        },
        Description = "string",
        Name = "string",
        Project = "string",
        RecaptchaOptionsConfig = new Gcp.Compute.Inputs.SecurityPolicyRecaptchaOptionsConfigArgs
        {
            RedirectSiteKey = "string",
        },
        Rules = new[]
        {
            new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
            {
                Action = "string",
                Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
                {
                    Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
                    {
                        SrcIpRanges = new[]
                        {
                            "string",
                        },
                    },
                    Expr = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchExprArgs
                    {
                        Expression = "string",
                    },
                    ExprOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchExprOptionsArgs
                    {
                        RecaptchaOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs
                        {
                            ActionTokenSiteKeys = new[]
                            {
                                "string",
                            },
                            SessionTokenSiteKeys = new[]
                            {
                                "string",
                            },
                        },
                    },
                    VersionedExpr = "string",
                },
                Priority = 0,
                Description = "string",
                HeaderAction = new Gcp.Compute.Inputs.SecurityPolicyRuleHeaderActionArgs
                {
                    RequestHeadersToAdds = new[]
                    {
                        new Gcp.Compute.Inputs.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs
                        {
                            HeaderName = "string",
                            HeaderValue = "string",
                        },
                    },
                },
                PreconfiguredWafConfig = new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigArgs
                {
                    Exclusions = new[]
                    {
                        new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigExclusionArgs
                        {
                            TargetRuleSet = "string",
                            RequestCookies = new[]
                            {
                                new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCookyArgs
                                {
                                    Operator = "string",
                                    Value = "string",
                                },
                            },
                            RequestHeaders = new[]
                            {
                                new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeaderArgs
                                {
                                    Operator = "string",
                                    Value = "string",
                                },
                            },
                            RequestQueryParams = new[]
                            {
                                new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParamArgs
                                {
                                    Operator = "string",
                                    Value = "string",
                                },
                            },
                            RequestUris = new[]
                            {
                                new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUriArgs
                                {
                                    Operator = "string",
                                    Value = "string",
                                },
                            },
                            TargetRuleIds = new[]
                            {
                                "string",
                            },
                        },
                    },
                },
                Preview = false,
                RateLimitOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsArgs
                {
                    BanDurationSec = 0,
                    BanThreshold = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsBanThresholdArgs
                    {
                        Count = 0,
                        IntervalSec = 0,
                    },
                    ConformAction = "string",
                    EnforceOnKey = "string",
                    EnforceOnKeyConfigs = new[]
                    {
                        new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs
                        {
                            EnforceOnKeyName = "string",
                            EnforceOnKeyType = "string",
                        },
                    },
                    EnforceOnKeyName = "string",
                    ExceedAction = "string",
                    ExceedRedirectOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs
                    {
                        Target = "string",
                        Type = "string",
                    },
                    RateLimitThreshold = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs
                    {
                        Count = 0,
                        IntervalSec = 0,
                    },
                },
                RedirectOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleRedirectOptionsArgs
                {
                    Type = "string",
                    Target = "string",
                },
            },
        },
        Type = "string",
    });
    
    example, err := compute.NewSecurityPolicy(ctx, "securityPolicyResource", &compute.SecurityPolicyArgs{
    	AdaptiveProtectionConfig: &compute.SecurityPolicyAdaptiveProtectionConfigArgs{
    		AutoDeployConfig: &compute.SecurityPolicyAdaptiveProtectionConfigAutoDeployConfigArgs{
    			ConfidenceThreshold:       pulumi.Float64(0),
    			ExpirationSec:             pulumi.Int(0),
    			ImpactedBaselineThreshold: pulumi.Float64(0),
    			LoadThreshold:             pulumi.Float64(0),
    		},
    		Layer7DdosDefenseConfig: &compute.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigArgs{
    			Enable:         pulumi.Bool(false),
    			RuleVisibility: pulumi.String("string"),
    		},
    	},
    	AdvancedOptionsConfig: &compute.SecurityPolicyAdvancedOptionsConfigArgs{
    		JsonCustomConfig: &compute.SecurityPolicyAdvancedOptionsConfigJsonCustomConfigArgs{
    			ContentTypes: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		JsonParsing: pulumi.String("string"),
    		LogLevel:    pulumi.String("string"),
    		UserIpRequestHeaders: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Project:     pulumi.String("string"),
    	RecaptchaOptionsConfig: &compute.SecurityPolicyRecaptchaOptionsConfigArgs{
    		RedirectSiteKey: pulumi.String("string"),
    	},
    	Rules: compute.SecurityPolicyRuleTypeArray{
    		&compute.SecurityPolicyRuleTypeArgs{
    			Action: pulumi.String("string"),
    			Match: &compute.SecurityPolicyRuleMatchArgs{
    				Config: &compute.SecurityPolicyRuleMatchConfigArgs{
    					SrcIpRanges: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    				Expr: &compute.SecurityPolicyRuleMatchExprArgs{
    					Expression: pulumi.String("string"),
    				},
    				ExprOptions: &compute.SecurityPolicyRuleMatchExprOptionsArgs{
    					RecaptchaOptions: &compute.SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs{
    						ActionTokenSiteKeys: pulumi.StringArray{
    							pulumi.String("string"),
    						},
    						SessionTokenSiteKeys: pulumi.StringArray{
    							pulumi.String("string"),
    						},
    					},
    				},
    				VersionedExpr: pulumi.String("string"),
    			},
    			Priority:    pulumi.Int(0),
    			Description: pulumi.String("string"),
    			HeaderAction: &compute.SecurityPolicyRuleHeaderActionArgs{
    				RequestHeadersToAdds: compute.SecurityPolicyRuleHeaderActionRequestHeadersToAddArray{
    					&compute.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs{
    						HeaderName:  pulumi.String("string"),
    						HeaderValue: pulumi.String("string"),
    					},
    				},
    			},
    			PreconfiguredWafConfig: &compute.SecurityPolicyRulePreconfiguredWafConfigArgs{
    				Exclusions: compute.SecurityPolicyRulePreconfiguredWafConfigExclusionArray{
    					&compute.SecurityPolicyRulePreconfiguredWafConfigExclusionArgs{
    						TargetRuleSet: pulumi.String("string"),
    						RequestCookies: compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCookyArray{
    							&compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCookyArgs{
    								Operator: pulumi.String("string"),
    								Value:    pulumi.String("string"),
    							},
    						},
    						RequestHeaders: compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeaderArray{
    							&compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeaderArgs{
    								Operator: pulumi.String("string"),
    								Value:    pulumi.String("string"),
    							},
    						},
    						RequestQueryParams: compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParamArray{
    							&compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParamArgs{
    								Operator: pulumi.String("string"),
    								Value:    pulumi.String("string"),
    							},
    						},
    						RequestUris: compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUriArray{
    							&compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUriArgs{
    								Operator: pulumi.String("string"),
    								Value:    pulumi.String("string"),
    							},
    						},
    						TargetRuleIds: pulumi.StringArray{
    							pulumi.String("string"),
    						},
    					},
    				},
    			},
    			Preview: pulumi.Bool(false),
    			RateLimitOptions: &compute.SecurityPolicyRuleRateLimitOptionsArgs{
    				BanDurationSec: pulumi.Int(0),
    				BanThreshold: &compute.SecurityPolicyRuleRateLimitOptionsBanThresholdArgs{
    					Count:       pulumi.Int(0),
    					IntervalSec: pulumi.Int(0),
    				},
    				ConformAction: pulumi.String("string"),
    				EnforceOnKey:  pulumi.String("string"),
    				EnforceOnKeyConfigs: compute.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArray{
    					&compute.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs{
    						EnforceOnKeyName: pulumi.String("string"),
    						EnforceOnKeyType: pulumi.String("string"),
    					},
    				},
    				EnforceOnKeyName: pulumi.String("string"),
    				ExceedAction:     pulumi.String("string"),
    				ExceedRedirectOptions: &compute.SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs{
    					Target: pulumi.String("string"),
    					Type:   pulumi.String("string"),
    				},
    				RateLimitThreshold: &compute.SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs{
    					Count:       pulumi.Int(0),
    					IntervalSec: pulumi.Int(0),
    				},
    			},
    			RedirectOptions: &compute.SecurityPolicyRuleRedirectOptionsArgs{
    				Type:   pulumi.String("string"),
    				Target: pulumi.String("string"),
    			},
    		},
    	},
    	Type: pulumi.String("string"),
    })
    
    var securityPolicyResource = new SecurityPolicy("securityPolicyResource", SecurityPolicyArgs.builder()
        .adaptiveProtectionConfig(SecurityPolicyAdaptiveProtectionConfigArgs.builder()
            .autoDeployConfig(SecurityPolicyAdaptiveProtectionConfigAutoDeployConfigArgs.builder()
                .confidenceThreshold(0)
                .expirationSec(0)
                .impactedBaselineThreshold(0)
                .loadThreshold(0)
                .build())
            .layer7DdosDefenseConfig(SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigArgs.builder()
                .enable(false)
                .ruleVisibility("string")
                .build())
            .build())
        .advancedOptionsConfig(SecurityPolicyAdvancedOptionsConfigArgs.builder()
            .jsonCustomConfig(SecurityPolicyAdvancedOptionsConfigJsonCustomConfigArgs.builder()
                .contentTypes("string")
                .build())
            .jsonParsing("string")
            .logLevel("string")
            .userIpRequestHeaders("string")
            .build())
        .description("string")
        .name("string")
        .project("string")
        .recaptchaOptionsConfig(SecurityPolicyRecaptchaOptionsConfigArgs.builder()
            .redirectSiteKey("string")
            .build())
        .rules(SecurityPolicyRuleArgs.builder()
            .action("string")
            .match(SecurityPolicyRuleMatchArgs.builder()
                .config(SecurityPolicyRuleMatchConfigArgs.builder()
                    .srcIpRanges("string")
                    .build())
                .expr(SecurityPolicyRuleMatchExprArgs.builder()
                    .expression("string")
                    .build())
                .exprOptions(SecurityPolicyRuleMatchExprOptionsArgs.builder()
                    .recaptchaOptions(SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs.builder()
                        .actionTokenSiteKeys("string")
                        .sessionTokenSiteKeys("string")
                        .build())
                    .build())
                .versionedExpr("string")
                .build())
            .priority(0)
            .description("string")
            .headerAction(SecurityPolicyRuleHeaderActionArgs.builder()
                .requestHeadersToAdds(SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs.builder()
                    .headerName("string")
                    .headerValue("string")
                    .build())
                .build())
            .preconfiguredWafConfig(SecurityPolicyRulePreconfiguredWafConfigArgs.builder()
                .exclusions(SecurityPolicyRulePreconfiguredWafConfigExclusionArgs.builder()
                    .targetRuleSet("string")
                    .requestCookies(SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCookyArgs.builder()
                        .operator("string")
                        .value("string")
                        .build())
                    .requestHeaders(SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeaderArgs.builder()
                        .operator("string")
                        .value("string")
                        .build())
                    .requestQueryParams(SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParamArgs.builder()
                        .operator("string")
                        .value("string")
                        .build())
                    .requestUris(SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUriArgs.builder()
                        .operator("string")
                        .value("string")
                        .build())
                    .targetRuleIds("string")
                    .build())
                .build())
            .preview(false)
            .rateLimitOptions(SecurityPolicyRuleRateLimitOptionsArgs.builder()
                .banDurationSec(0)
                .banThreshold(SecurityPolicyRuleRateLimitOptionsBanThresholdArgs.builder()
                    .count(0)
                    .intervalSec(0)
                    .build())
                .conformAction("string")
                .enforceOnKey("string")
                .enforceOnKeyConfigs(SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs.builder()
                    .enforceOnKeyName("string")
                    .enforceOnKeyType("string")
                    .build())
                .enforceOnKeyName("string")
                .exceedAction("string")
                .exceedRedirectOptions(SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs.builder()
                    .target("string")
                    .type("string")
                    .build())
                .rateLimitThreshold(SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs.builder()
                    .count(0)
                    .intervalSec(0)
                    .build())
                .build())
            .redirectOptions(SecurityPolicyRuleRedirectOptionsArgs.builder()
                .type("string")
                .target("string")
                .build())
            .build())
        .type("string")
        .build());
    
    security_policy_resource = gcp.compute.SecurityPolicy("securityPolicyResource",
        adaptive_protection_config={
            "autoDeployConfig": {
                "confidenceThreshold": 0,
                "expirationSec": 0,
                "impactedBaselineThreshold": 0,
                "loadThreshold": 0,
            },
            "layer7DdosDefenseConfig": {
                "enable": False,
                "ruleVisibility": "string",
            },
        },
        advanced_options_config={
            "jsonCustomConfig": {
                "contentTypes": ["string"],
            },
            "jsonParsing": "string",
            "logLevel": "string",
            "userIpRequestHeaders": ["string"],
        },
        description="string",
        name="string",
        project="string",
        recaptcha_options_config={
            "redirectSiteKey": "string",
        },
        rules=[{
            "action": "string",
            "match": {
                "config": {
                    "srcIpRanges": ["string"],
                },
                "expr": {
                    "expression": "string",
                },
                "exprOptions": {
                    "recaptchaOptions": {
                        "actionTokenSiteKeys": ["string"],
                        "sessionTokenSiteKeys": ["string"],
                    },
                },
                "versionedExpr": "string",
            },
            "priority": 0,
            "description": "string",
            "headerAction": {
                "requestHeadersToAdds": [{
                    "headerName": "string",
                    "headerValue": "string",
                }],
            },
            "preconfiguredWafConfig": {
                "exclusions": [{
                    "targetRuleSet": "string",
                    "requestCookies": [{
                        "operator": "string",
                        "value": "string",
                    }],
                    "requestHeaders": [{
                        "operator": "string",
                        "value": "string",
                    }],
                    "requestQueryParams": [{
                        "operator": "string",
                        "value": "string",
                    }],
                    "requestUris": [{
                        "operator": "string",
                        "value": "string",
                    }],
                    "targetRuleIds": ["string"],
                }],
            },
            "preview": False,
            "rateLimitOptions": {
                "banDurationSec": 0,
                "banThreshold": {
                    "count": 0,
                    "intervalSec": 0,
                },
                "conformAction": "string",
                "enforceOnKey": "string",
                "enforceOnKeyConfigs": [{
                    "enforceOnKeyName": "string",
                    "enforceOnKeyType": "string",
                }],
                "enforceOnKeyName": "string",
                "exceedAction": "string",
                "exceedRedirectOptions": {
                    "target": "string",
                    "type": "string",
                },
                "rateLimitThreshold": {
                    "count": 0,
                    "intervalSec": 0,
                },
            },
            "redirectOptions": {
                "type": "string",
                "target": "string",
            },
        }],
        type="string")
    
    const securityPolicyResource = new gcp.compute.SecurityPolicy("securityPolicyResource", {
        adaptiveProtectionConfig: {
            autoDeployConfig: {
                confidenceThreshold: 0,
                expirationSec: 0,
                impactedBaselineThreshold: 0,
                loadThreshold: 0,
            },
            layer7DdosDefenseConfig: {
                enable: false,
                ruleVisibility: "string",
            },
        },
        advancedOptionsConfig: {
            jsonCustomConfig: {
                contentTypes: ["string"],
            },
            jsonParsing: "string",
            logLevel: "string",
            userIpRequestHeaders: ["string"],
        },
        description: "string",
        name: "string",
        project: "string",
        recaptchaOptionsConfig: {
            redirectSiteKey: "string",
        },
        rules: [{
            action: "string",
            match: {
                config: {
                    srcIpRanges: ["string"],
                },
                expr: {
                    expression: "string",
                },
                exprOptions: {
                    recaptchaOptions: {
                        actionTokenSiteKeys: ["string"],
                        sessionTokenSiteKeys: ["string"],
                    },
                },
                versionedExpr: "string",
            },
            priority: 0,
            description: "string",
            headerAction: {
                requestHeadersToAdds: [{
                    headerName: "string",
                    headerValue: "string",
                }],
            },
            preconfiguredWafConfig: {
                exclusions: [{
                    targetRuleSet: "string",
                    requestCookies: [{
                        operator: "string",
                        value: "string",
                    }],
                    requestHeaders: [{
                        operator: "string",
                        value: "string",
                    }],
                    requestQueryParams: [{
                        operator: "string",
                        value: "string",
                    }],
                    requestUris: [{
                        operator: "string",
                        value: "string",
                    }],
                    targetRuleIds: ["string"],
                }],
            },
            preview: false,
            rateLimitOptions: {
                banDurationSec: 0,
                banThreshold: {
                    count: 0,
                    intervalSec: 0,
                },
                conformAction: "string",
                enforceOnKey: "string",
                enforceOnKeyConfigs: [{
                    enforceOnKeyName: "string",
                    enforceOnKeyType: "string",
                }],
                enforceOnKeyName: "string",
                exceedAction: "string",
                exceedRedirectOptions: {
                    target: "string",
                    type: "string",
                },
                rateLimitThreshold: {
                    count: 0,
                    intervalSec: 0,
                },
            },
            redirectOptions: {
                type: "string",
                target: "string",
            },
        }],
        type: "string",
    });
    
    type: gcp:compute:SecurityPolicy
    properties:
        adaptiveProtectionConfig:
            autoDeployConfig:
                confidenceThreshold: 0
                expirationSec: 0
                impactedBaselineThreshold: 0
                loadThreshold: 0
            layer7DdosDefenseConfig:
                enable: false
                ruleVisibility: string
        advancedOptionsConfig:
            jsonCustomConfig:
                contentTypes:
                    - string
            jsonParsing: string
            logLevel: string
            userIpRequestHeaders:
                - string
        description: string
        name: string
        project: string
        recaptchaOptionsConfig:
            redirectSiteKey: string
        rules:
            - action: string
              description: string
              headerAction:
                requestHeadersToAdds:
                    - headerName: string
                      headerValue: string
              match:
                config:
                    srcIpRanges:
                        - string
                expr:
                    expression: string
                exprOptions:
                    recaptchaOptions:
                        actionTokenSiteKeys:
                            - string
                        sessionTokenSiteKeys:
                            - string
                versionedExpr: string
              preconfiguredWafConfig:
                exclusions:
                    - requestCookies:
                        - operator: string
                          value: string
                      requestHeaders:
                        - operator: string
                          value: string
                      requestQueryParams:
                        - operator: string
                          value: string
                      requestUris:
                        - operator: string
                          value: string
                      targetRuleIds:
                        - string
                      targetRuleSet: string
              preview: false
              priority: 0
              rateLimitOptions:
                banDurationSec: 0
                banThreshold:
                    count: 0
                    intervalSec: 0
                conformAction: string
                enforceOnKey: string
                enforceOnKeyConfigs:
                    - enforceOnKeyName: string
                      enforceOnKeyType: string
                enforceOnKeyName: string
                exceedAction: string
                exceedRedirectOptions:
                    target: string
                    type: string
                rateLimitThreshold:
                    count: 0
                    intervalSec: 0
              redirectOptions:
                target: string
                type: string
        type: string
    

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

    AdaptiveProtectionConfig SecurityPolicyAdaptiveProtectionConfig
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    AdvancedOptionsConfig SecurityPolicyAdvancedOptionsConfig
    Advanced Configuration Options. Structure is documented below.
    Description string
    An optional description of this security policy. Max size is 2048.
    Name string
    The name of the security policy.


    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    RecaptchaOptionsConfig SecurityPolicyRecaptchaOptionsConfig
    reCAPTCHA Configuration Options. Structure is documented below.
    Rules List<SecurityPolicyRule>
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    Type string
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
    AdaptiveProtectionConfig SecurityPolicyAdaptiveProtectionConfigArgs
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    AdvancedOptionsConfig SecurityPolicyAdvancedOptionsConfigArgs
    Advanced Configuration Options. Structure is documented below.
    Description string
    An optional description of this security policy. Max size is 2048.
    Name string
    The name of the security policy.


    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    RecaptchaOptionsConfig SecurityPolicyRecaptchaOptionsConfigArgs
    reCAPTCHA Configuration Options. Structure is documented below.
    Rules []SecurityPolicyRuleTypeArgs
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    Type string
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
    adaptiveProtectionConfig SecurityPolicyAdaptiveProtectionConfig
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    advancedOptionsConfig SecurityPolicyAdvancedOptionsConfig
    Advanced Configuration Options. Structure is documented below.
    description String
    An optional description of this security policy. Max size is 2048.
    name String
    The name of the security policy.


    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.
    recaptchaOptionsConfig SecurityPolicyRecaptchaOptionsConfig
    reCAPTCHA Configuration Options. Structure is documented below.
    rules List<SecurityPolicyRule>
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    type String
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
    adaptiveProtectionConfig SecurityPolicyAdaptiveProtectionConfig
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    advancedOptionsConfig SecurityPolicyAdvancedOptionsConfig
    Advanced Configuration Options. Structure is documented below.
    description string
    An optional description of this security policy. Max size is 2048.
    name string
    The name of the security policy.


    project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    recaptchaOptionsConfig SecurityPolicyRecaptchaOptionsConfig
    reCAPTCHA Configuration Options. Structure is documented below.
    rules SecurityPolicyRule[]
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    type string
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
    adaptive_protection_config SecurityPolicyAdaptiveProtectionConfigArgs
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    advanced_options_config SecurityPolicyAdvancedOptionsConfigArgs
    Advanced Configuration Options. Structure is documented below.
    description str
    An optional description of this security policy. Max size is 2048.
    name str
    The name of the security policy.


    project str
    The project in which the resource belongs. If it is not provided, the provider project is used.
    recaptcha_options_config SecurityPolicyRecaptchaOptionsConfigArgs
    reCAPTCHA Configuration Options. Structure is documented below.
    rules Sequence[SecurityPolicyRuleArgs]
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    type str
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
    adaptiveProtectionConfig Property Map
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    advancedOptionsConfig Property Map
    Advanced Configuration Options. Structure is documented below.
    description String
    An optional description of this security policy. Max size is 2048.
    name String
    The name of the security policy.


    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.
    recaptchaOptionsConfig Property Map
    reCAPTCHA Configuration Options. Structure is documented below.
    rules List<Property Map>
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    type String
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.

    Outputs

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

    Fingerprint string
    Fingerprint of this resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    Fingerprint string
    Fingerprint of this resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    fingerprint String
    Fingerprint of this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.
    fingerprint string
    Fingerprint of this resource.
    id string
    The provider-assigned unique ID for this managed resource.
    selfLink string
    The URI of the created resource.
    fingerprint str
    Fingerprint of this resource.
    id str
    The provider-assigned unique ID for this managed resource.
    self_link str
    The URI of the created resource.
    fingerprint String
    Fingerprint of this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.

    Look up Existing SecurityPolicy Resource

    Get an existing SecurityPolicy 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?: SecurityPolicyState, opts?: CustomResourceOptions): SecurityPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            adaptive_protection_config: Optional[SecurityPolicyAdaptiveProtectionConfigArgs] = None,
            advanced_options_config: Optional[SecurityPolicyAdvancedOptionsConfigArgs] = None,
            description: Optional[str] = None,
            fingerprint: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            recaptcha_options_config: Optional[SecurityPolicyRecaptchaOptionsConfigArgs] = None,
            rules: Optional[Sequence[SecurityPolicyRuleArgs]] = None,
            self_link: Optional[str] = None,
            type: Optional[str] = None) -> SecurityPolicy
    func GetSecurityPolicy(ctx *Context, name string, id IDInput, state *SecurityPolicyState, opts ...ResourceOption) (*SecurityPolicy, error)
    public static SecurityPolicy Get(string name, Input<string> id, SecurityPolicyState? state, CustomResourceOptions? opts = null)
    public static SecurityPolicy get(String name, Output<String> id, SecurityPolicyState 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:
    AdaptiveProtectionConfig SecurityPolicyAdaptiveProtectionConfig
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    AdvancedOptionsConfig SecurityPolicyAdvancedOptionsConfig
    Advanced Configuration Options. Structure is documented below.
    Description string
    An optional description of this security policy. Max size is 2048.
    Fingerprint string
    Fingerprint of this resource.
    Name string
    The name of the security policy.


    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    RecaptchaOptionsConfig SecurityPolicyRecaptchaOptionsConfig
    reCAPTCHA Configuration Options. Structure is documented below.
    Rules List<SecurityPolicyRule>
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    SelfLink string
    The URI of the created resource.
    Type string
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
    AdaptiveProtectionConfig SecurityPolicyAdaptiveProtectionConfigArgs
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    AdvancedOptionsConfig SecurityPolicyAdvancedOptionsConfigArgs
    Advanced Configuration Options. Structure is documented below.
    Description string
    An optional description of this security policy. Max size is 2048.
    Fingerprint string
    Fingerprint of this resource.
    Name string
    The name of the security policy.


    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    RecaptchaOptionsConfig SecurityPolicyRecaptchaOptionsConfigArgs
    reCAPTCHA Configuration Options. Structure is documented below.
    Rules []SecurityPolicyRuleTypeArgs
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    SelfLink string
    The URI of the created resource.
    Type string
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
    adaptiveProtectionConfig SecurityPolicyAdaptiveProtectionConfig
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    advancedOptionsConfig SecurityPolicyAdvancedOptionsConfig
    Advanced Configuration Options. Structure is documented below.
    description String
    An optional description of this security policy. Max size is 2048.
    fingerprint String
    Fingerprint of this resource.
    name String
    The name of the security policy.


    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.
    recaptchaOptionsConfig SecurityPolicyRecaptchaOptionsConfig
    reCAPTCHA Configuration Options. Structure is documented below.
    rules List<SecurityPolicyRule>
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    selfLink String
    The URI of the created resource.
    type String
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
    adaptiveProtectionConfig SecurityPolicyAdaptiveProtectionConfig
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    advancedOptionsConfig SecurityPolicyAdvancedOptionsConfig
    Advanced Configuration Options. Structure is documented below.
    description string
    An optional description of this security policy. Max size is 2048.
    fingerprint string
    Fingerprint of this resource.
    name string
    The name of the security policy.


    project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    recaptchaOptionsConfig SecurityPolicyRecaptchaOptionsConfig
    reCAPTCHA Configuration Options. Structure is documented below.
    rules SecurityPolicyRule[]
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    selfLink string
    The URI of the created resource.
    type string
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
    adaptive_protection_config SecurityPolicyAdaptiveProtectionConfigArgs
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    advanced_options_config SecurityPolicyAdvancedOptionsConfigArgs
    Advanced Configuration Options. Structure is documented below.
    description str
    An optional description of this security policy. Max size is 2048.
    fingerprint str
    Fingerprint of this resource.
    name str
    The name of the security policy.


    project str
    The project in which the resource belongs. If it is not provided, the provider project is used.
    recaptcha_options_config SecurityPolicyRecaptchaOptionsConfigArgs
    reCAPTCHA Configuration Options. Structure is documented below.
    rules Sequence[SecurityPolicyRuleArgs]
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    self_link str
    The URI of the created resource.
    type str
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
    adaptiveProtectionConfig Property Map
    Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
    advancedOptionsConfig Property Map
    Advanced Configuration Options. Structure is documented below.
    description String
    An optional description of this security policy. Max size is 2048.
    fingerprint String
    Fingerprint of this resource.
    name String
    The name of the security policy.


    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.
    recaptchaOptionsConfig Property Map
    reCAPTCHA Configuration Options. Structure is documented below.
    rules List<Property Map>
    The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
    selfLink String
    The URI of the created resource.
    type String
    The type indicates the intended use of the security policy. This field can be set only at resource creation time.

    • CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.
    • CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.
    • CLOUD_ARMOR_INTERNAL_SERVICE - Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.

    Supporting Types

    SecurityPolicyAdaptiveProtectionConfig, SecurityPolicyAdaptiveProtectionConfigArgs

    autoDeployConfig Property Map

    Configuration for Automatically deploy Adaptive Protection suggested rules. Structure is documented below.

    The layer_7_ddos_defense_config block supports:

    layer7DdosDefenseConfig Property Map
    Configuration for Google Cloud Armor Adaptive Protection Layer 7 DDoS Defense. Structure is documented below.

    SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig, SecurityPolicyAdaptiveProtectionConfigAutoDeployConfigArgs

    ConfidenceThreshold double
    Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
    ExpirationSec int
    Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
    ImpactedBaselineThreshold double
    Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
    LoadThreshold double
    Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.
    ConfidenceThreshold float64
    Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
    ExpirationSec int
    Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
    ImpactedBaselineThreshold float64
    Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
    LoadThreshold float64
    Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.
    confidenceThreshold Double
    Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
    expirationSec Integer
    Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
    impactedBaselineThreshold Double
    Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
    loadThreshold Double
    Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.
    confidenceThreshold number
    Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
    expirationSec number
    Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
    impactedBaselineThreshold number
    Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
    loadThreshold number
    Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.
    confidence_threshold float
    Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
    expiration_sec int
    Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
    impacted_baseline_threshold float
    Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
    load_threshold float
    Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.
    confidenceThreshold Number
    Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
    expirationSec Number
    Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
    impactedBaselineThreshold Number
    Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
    loadThreshold Number
    Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.

    SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig, SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigArgs

    Enable bool
    If set to true, enables CAAP for L7 DDoS detection.
    RuleVisibility string
    Rule visibility. Supported values include: "STANDARD", "PREMIUM".
    Enable bool
    If set to true, enables CAAP for L7 DDoS detection.
    RuleVisibility string
    Rule visibility. Supported values include: "STANDARD", "PREMIUM".
    enable Boolean
    If set to true, enables CAAP for L7 DDoS detection.
    ruleVisibility String
    Rule visibility. Supported values include: "STANDARD", "PREMIUM".
    enable boolean
    If set to true, enables CAAP for L7 DDoS detection.
    ruleVisibility string
    Rule visibility. Supported values include: "STANDARD", "PREMIUM".
    enable bool
    If set to true, enables CAAP for L7 DDoS detection.
    rule_visibility str
    Rule visibility. Supported values include: "STANDARD", "PREMIUM".
    enable Boolean
    If set to true, enables CAAP for L7 DDoS detection.
    ruleVisibility String
    Rule visibility. Supported values include: "STANDARD", "PREMIUM".

    SecurityPolicyAdvancedOptionsConfig, SecurityPolicyAdvancedOptionsConfigArgs

    JsonCustomConfig SecurityPolicyAdvancedOptionsConfigJsonCustomConfig
    Custom configuration to apply the JSON parsing. Only applicable when json_parsing is set to STANDARD. Structure is documented below.
    JsonParsing string
    Whether or not to JSON parse the payload body. Defaults to DISABLED.

    • DISABLED - Don't parse JSON payloads in POST bodies.
    • STANDARD - Parse JSON payloads in POST bodies.
    • STANDARD_WITH_GRAPHQL - Parse JSON and GraphQL payloads in POST bodies.
    LogLevel string
    Log level to use. Defaults to NORMAL.

    • NORMAL - Normal log level.
    • VERBOSE - Verbose log level.
    UserIpRequestHeaders List<string>
    An optional list of case-insensitive request header names to use for resolving the callers client IP address.
    JsonCustomConfig SecurityPolicyAdvancedOptionsConfigJsonCustomConfig
    Custom configuration to apply the JSON parsing. Only applicable when json_parsing is set to STANDARD. Structure is documented below.
    JsonParsing string
    Whether or not to JSON parse the payload body. Defaults to DISABLED.

    • DISABLED - Don't parse JSON payloads in POST bodies.
    • STANDARD - Parse JSON payloads in POST bodies.
    • STANDARD_WITH_GRAPHQL - Parse JSON and GraphQL payloads in POST bodies.
    LogLevel string
    Log level to use. Defaults to NORMAL.

    • NORMAL - Normal log level.
    • VERBOSE - Verbose log level.
    UserIpRequestHeaders []string
    An optional list of case-insensitive request header names to use for resolving the callers client IP address.
    jsonCustomConfig SecurityPolicyAdvancedOptionsConfigJsonCustomConfig
    Custom configuration to apply the JSON parsing. Only applicable when json_parsing is set to STANDARD. Structure is documented below.
    jsonParsing String
    Whether or not to JSON parse the payload body. Defaults to DISABLED.

    • DISABLED - Don't parse JSON payloads in POST bodies.
    • STANDARD - Parse JSON payloads in POST bodies.
    • STANDARD_WITH_GRAPHQL - Parse JSON and GraphQL payloads in POST bodies.
    logLevel String
    Log level to use. Defaults to NORMAL.

    • NORMAL - Normal log level.
    • VERBOSE - Verbose log level.
    userIpRequestHeaders List<String>
    An optional list of case-insensitive request header names to use for resolving the callers client IP address.
    jsonCustomConfig SecurityPolicyAdvancedOptionsConfigJsonCustomConfig
    Custom configuration to apply the JSON parsing. Only applicable when json_parsing is set to STANDARD. Structure is documented below.
    jsonParsing string
    Whether or not to JSON parse the payload body. Defaults to DISABLED.

    • DISABLED - Don't parse JSON payloads in POST bodies.
    • STANDARD - Parse JSON payloads in POST bodies.
    • STANDARD_WITH_GRAPHQL - Parse JSON and GraphQL payloads in POST bodies.
    logLevel string
    Log level to use. Defaults to NORMAL.

    • NORMAL - Normal log level.
    • VERBOSE - Verbose log level.
    userIpRequestHeaders string[]
    An optional list of case-insensitive request header names to use for resolving the callers client IP address.
    json_custom_config SecurityPolicyAdvancedOptionsConfigJsonCustomConfig
    Custom configuration to apply the JSON parsing. Only applicable when json_parsing is set to STANDARD. Structure is documented below.
    json_parsing str
    Whether or not to JSON parse the payload body. Defaults to DISABLED.

    • DISABLED - Don't parse JSON payloads in POST bodies.
    • STANDARD - Parse JSON payloads in POST bodies.
    • STANDARD_WITH_GRAPHQL - Parse JSON and GraphQL payloads in POST bodies.
    log_level str
    Log level to use. Defaults to NORMAL.

    • NORMAL - Normal log level.
    • VERBOSE - Verbose log level.
    user_ip_request_headers Sequence[str]
    An optional list of case-insensitive request header names to use for resolving the callers client IP address.
    jsonCustomConfig Property Map
    Custom configuration to apply the JSON parsing. Only applicable when json_parsing is set to STANDARD. Structure is documented below.
    jsonParsing String
    Whether or not to JSON parse the payload body. Defaults to DISABLED.

    • DISABLED - Don't parse JSON payloads in POST bodies.
    • STANDARD - Parse JSON payloads in POST bodies.
    • STANDARD_WITH_GRAPHQL - Parse JSON and GraphQL payloads in POST bodies.
    logLevel String
    Log level to use. Defaults to NORMAL.

    • NORMAL - Normal log level.
    • VERBOSE - Verbose log level.
    userIpRequestHeaders List<String>
    An optional list of case-insensitive request header names to use for resolving the callers client IP address.

    SecurityPolicyAdvancedOptionsConfigJsonCustomConfig, SecurityPolicyAdvancedOptionsConfigJsonCustomConfigArgs

    ContentTypes List<string>
    A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.
    ContentTypes []string
    A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.
    contentTypes List<String>
    A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.
    contentTypes string[]
    A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.
    content_types Sequence[str]
    A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.
    contentTypes List<String>
    A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.

    SecurityPolicyRecaptchaOptionsConfig, SecurityPolicyRecaptchaOptionsConfigArgs

    RedirectSiteKey string
    A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
    RedirectSiteKey string
    A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
    redirectSiteKey String
    A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
    redirectSiteKey string
    A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
    redirect_site_key str
    A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
    redirectSiteKey String
    A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.

    SecurityPolicyRule, SecurityPolicyRuleArgs

    Action string
    Action to take when match matches the request. Valid values:
    Match SecurityPolicyRuleMatch
    A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding action is enforced. Structure is documented below.
    Priority int
    An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
    Description string
    An optional description of this rule. Max size is 64.
    HeaderAction SecurityPolicyRuleHeaderAction
    Additional actions that are performed on headers. Structure is documented below.
    PreconfiguredWafConfig SecurityPolicyRulePreconfiguredWafConfig
    Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. Structure is documented below.
    Preview bool
    When set to true, the action specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such.
    RateLimitOptions SecurityPolicyRuleRateLimitOptions
    Must be specified if the action is rate_based_ban or throttle. Cannot be specified for other actions. Structure is documented below.
    RedirectOptions SecurityPolicyRuleRedirectOptions
    Can be specified if the action is redirect. Cannot be specified for other actions. Structure is documented below.
    Action string
    Action to take when match matches the request. Valid values:
    Match SecurityPolicyRuleMatch
    A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding action is enforced. Structure is documented below.
    Priority int
    An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
    Description string
    An optional description of this rule. Max size is 64.
    HeaderAction SecurityPolicyRuleHeaderAction
    Additional actions that are performed on headers. Structure is documented below.
    PreconfiguredWafConfig SecurityPolicyRulePreconfiguredWafConfig
    Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. Structure is documented below.
    Preview bool
    When set to true, the action specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such.
    RateLimitOptions SecurityPolicyRuleRateLimitOptions
    Must be specified if the action is rate_based_ban or throttle. Cannot be specified for other actions. Structure is documented below.
    RedirectOptions SecurityPolicyRuleRedirectOptions
    Can be specified if the action is redirect. Cannot be specified for other actions. Structure is documented below.
    action String
    Action to take when match matches the request. Valid values:
    match SecurityPolicyRuleMatch
    A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding action is enforced. Structure is documented below.
    priority Integer
    An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
    description String
    An optional description of this rule. Max size is 64.
    headerAction SecurityPolicyRuleHeaderAction
    Additional actions that are performed on headers. Structure is documented below.
    preconfiguredWafConfig SecurityPolicyRulePreconfiguredWafConfig
    Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. Structure is documented below.
    preview Boolean
    When set to true, the action specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such.
    rateLimitOptions SecurityPolicyRuleRateLimitOptions
    Must be specified if the action is rate_based_ban or throttle. Cannot be specified for other actions. Structure is documented below.
    redirectOptions SecurityPolicyRuleRedirectOptions
    Can be specified if the action is redirect. Cannot be specified for other actions. Structure is documented below.
    action string
    Action to take when match matches the request. Valid values:
    match SecurityPolicyRuleMatch
    A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding action is enforced. Structure is documented below.
    priority number
    An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
    description string
    An optional description of this rule. Max size is 64.
    headerAction SecurityPolicyRuleHeaderAction
    Additional actions that are performed on headers. Structure is documented below.
    preconfiguredWafConfig SecurityPolicyRulePreconfiguredWafConfig
    Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. Structure is documented below.
    preview boolean
    When set to true, the action specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such.
    rateLimitOptions SecurityPolicyRuleRateLimitOptions
    Must be specified if the action is rate_based_ban or throttle. Cannot be specified for other actions. Structure is documented below.
    redirectOptions SecurityPolicyRuleRedirectOptions
    Can be specified if the action is redirect. Cannot be specified for other actions. Structure is documented below.
    action str
    Action to take when match matches the request. Valid values:
    match SecurityPolicyRuleMatch
    A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding action is enforced. Structure is documented below.
    priority int
    An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
    description str
    An optional description of this rule. Max size is 64.
    header_action SecurityPolicyRuleHeaderAction
    Additional actions that are performed on headers. Structure is documented below.
    preconfigured_waf_config SecurityPolicyRulePreconfiguredWafConfig
    Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. Structure is documented below.
    preview bool
    When set to true, the action specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such.
    rate_limit_options SecurityPolicyRuleRateLimitOptions
    Must be specified if the action is rate_based_ban or throttle. Cannot be specified for other actions. Structure is documented below.
    redirect_options SecurityPolicyRuleRedirectOptions
    Can be specified if the action is redirect. Cannot be specified for other actions. Structure is documented below.
    action String
    Action to take when match matches the request. Valid values:
    match Property Map
    A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding action is enforced. Structure is documented below.
    priority Number
    An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
    description String
    An optional description of this rule. Max size is 64.
    headerAction Property Map
    Additional actions that are performed on headers. Structure is documented below.
    preconfiguredWafConfig Property Map
    Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. Structure is documented below.
    preview Boolean
    When set to true, the action specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such.
    rateLimitOptions Property Map
    Must be specified if the action is rate_based_ban or throttle. Cannot be specified for other actions. Structure is documented below.
    redirectOptions Property Map
    Can be specified if the action is redirect. Cannot be specified for other actions. Structure is documented below.

    SecurityPolicyRuleHeaderAction, SecurityPolicyRuleHeaderActionArgs

    RequestHeadersToAdds List<SecurityPolicyRuleHeaderActionRequestHeadersToAdd>
    The list of request headers to add or overwrite if they're already present. Structure is documented below.
    RequestHeadersToAdds []SecurityPolicyRuleHeaderActionRequestHeadersToAdd
    The list of request headers to add or overwrite if they're already present. Structure is documented below.
    requestHeadersToAdds List<SecurityPolicyRuleHeaderActionRequestHeadersToAdd>
    The list of request headers to add or overwrite if they're already present. Structure is documented below.
    requestHeadersToAdds SecurityPolicyRuleHeaderActionRequestHeadersToAdd[]
    The list of request headers to add or overwrite if they're already present. Structure is documented below.
    request_headers_to_adds Sequence[SecurityPolicyRuleHeaderActionRequestHeadersToAdd]
    The list of request headers to add or overwrite if they're already present. Structure is documented below.
    requestHeadersToAdds List<Property Map>
    The list of request headers to add or overwrite if they're already present. Structure is documented below.

    SecurityPolicyRuleHeaderActionRequestHeadersToAdd, SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs

    HeaderName string
    The name of the header to set.
    HeaderValue string
    The value to set the named header to.
    HeaderName string
    The name of the header to set.
    HeaderValue string
    The value to set the named header to.
    headerName String
    The name of the header to set.
    headerValue String
    The value to set the named header to.
    headerName string
    The name of the header to set.
    headerValue string
    The value to set the named header to.
    header_name str
    The name of the header to set.
    header_value str
    The value to set the named header to.
    headerName String
    The name of the header to set.
    headerValue String
    The value to set the named header to.

    SecurityPolicyRuleMatch, SecurityPolicyRuleMatchArgs

    Config SecurityPolicyRuleMatchConfig
    The configuration options available when specifying versionedExpr. This field must be specified if versionedExpr is specified and cannot be specified if versionedExpr is not specified. Structure is documented below.
    Expr SecurityPolicyRuleMatchExpr
    User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
    ExprOptions SecurityPolicyRuleMatchExprOptions
    The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
    VersionedExpr string
    Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding srcIpRange field in config. Possible values are: SRC_IPS_V1.
    Config SecurityPolicyRuleMatchConfig
    The configuration options available when specifying versionedExpr. This field must be specified if versionedExpr is specified and cannot be specified if versionedExpr is not specified. Structure is documented below.
    Expr SecurityPolicyRuleMatchExpr
    User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
    ExprOptions SecurityPolicyRuleMatchExprOptions
    The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
    VersionedExpr string
    Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding srcIpRange field in config. Possible values are: SRC_IPS_V1.
    config SecurityPolicyRuleMatchConfig
    The configuration options available when specifying versionedExpr. This field must be specified if versionedExpr is specified and cannot be specified if versionedExpr is not specified. Structure is documented below.
    expr SecurityPolicyRuleMatchExpr
    User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
    exprOptions SecurityPolicyRuleMatchExprOptions
    The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
    versionedExpr String
    Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding srcIpRange field in config. Possible values are: SRC_IPS_V1.
    config SecurityPolicyRuleMatchConfig
    The configuration options available when specifying versionedExpr. This field must be specified if versionedExpr is specified and cannot be specified if versionedExpr is not specified. Structure is documented below.
    expr SecurityPolicyRuleMatchExpr
    User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
    exprOptions SecurityPolicyRuleMatchExprOptions
    The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
    versionedExpr string
    Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding srcIpRange field in config. Possible values are: SRC_IPS_V1.
    config SecurityPolicyRuleMatchConfig
    The configuration options available when specifying versionedExpr. This field must be specified if versionedExpr is specified and cannot be specified if versionedExpr is not specified. Structure is documented below.
    expr SecurityPolicyRuleMatchExpr
    User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
    expr_options SecurityPolicyRuleMatchExprOptions
    The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
    versioned_expr str
    Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding srcIpRange field in config. Possible values are: SRC_IPS_V1.
    config Property Map
    The configuration options available when specifying versionedExpr. This field must be specified if versionedExpr is specified and cannot be specified if versionedExpr is not specified. Structure is documented below.
    expr Property Map
    User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
    exprOptions Property Map
    The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
    versionedExpr String
    Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding srcIpRange field in config. Possible values are: SRC_IPS_V1.

    SecurityPolicyRuleMatchConfig, SecurityPolicyRuleMatchConfigArgs

    SrcIpRanges List<string>
    CIDR IP address range. Maximum number of srcIpRanges allowed is 10.
    SrcIpRanges []string
    CIDR IP address range. Maximum number of srcIpRanges allowed is 10.
    srcIpRanges List<String>
    CIDR IP address range. Maximum number of srcIpRanges allowed is 10.
    srcIpRanges string[]
    CIDR IP address range. Maximum number of srcIpRanges allowed is 10.
    src_ip_ranges Sequence[str]
    CIDR IP address range. Maximum number of srcIpRanges allowed is 10.
    srcIpRanges List<String>
    CIDR IP address range. Maximum number of srcIpRanges allowed is 10.

    SecurityPolicyRuleMatchExpr, SecurityPolicyRuleMatchExprArgs

    Expression string
    Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
    Expression string
    Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
    expression String
    Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
    expression string
    Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
    expression str
    Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
    expression String
    Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.

    SecurityPolicyRuleMatchExprOptions, SecurityPolicyRuleMatchExprOptionsArgs

    RecaptchaOptions SecurityPolicyRuleMatchExprOptionsRecaptchaOptions
    reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.
    RecaptchaOptions SecurityPolicyRuleMatchExprOptionsRecaptchaOptions
    reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.
    recaptchaOptions SecurityPolicyRuleMatchExprOptionsRecaptchaOptions
    reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.
    recaptchaOptions SecurityPolicyRuleMatchExprOptionsRecaptchaOptions
    reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.
    recaptcha_options SecurityPolicyRuleMatchExprOptionsRecaptchaOptions
    reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.
    recaptchaOptions Property Map
    reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.

    SecurityPolicyRuleMatchExprOptionsRecaptchaOptions, SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs

    ActionTokenSiteKeys List<string>
    A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
    SessionTokenSiteKeys List<string>
    A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
    ActionTokenSiteKeys []string
    A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
    SessionTokenSiteKeys []string
    A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
    actionTokenSiteKeys List<String>
    A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
    sessionTokenSiteKeys List<String>
    A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
    actionTokenSiteKeys string[]
    A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
    sessionTokenSiteKeys string[]
    A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
    action_token_site_keys Sequence[str]
    A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
    session_token_site_keys Sequence[str]
    A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
    actionTokenSiteKeys List<String>
    A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
    sessionTokenSiteKeys List<String>
    A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.

    SecurityPolicyRulePreconfiguredWafConfig, SecurityPolicyRulePreconfiguredWafConfigArgs

    Exclusions List<SecurityPolicyRulePreconfiguredWafConfigExclusion>
    An exclusion to apply during preconfigured WAF evaluation. Structure is documented below.
    Exclusions []SecurityPolicyRulePreconfiguredWafConfigExclusion
    An exclusion to apply during preconfigured WAF evaluation. Structure is documented below.
    exclusions List<SecurityPolicyRulePreconfiguredWafConfigExclusion>
    An exclusion to apply during preconfigured WAF evaluation. Structure is documented below.
    exclusions SecurityPolicyRulePreconfiguredWafConfigExclusion[]
    An exclusion to apply during preconfigured WAF evaluation. Structure is documented below.
    exclusions Sequence[SecurityPolicyRulePreconfiguredWafConfigExclusion]
    An exclusion to apply during preconfigured WAF evaluation. Structure is documented below.
    exclusions List<Property Map>
    An exclusion to apply during preconfigured WAF evaluation. Structure is documented below.

    SecurityPolicyRulePreconfiguredWafConfigExclusion, SecurityPolicyRulePreconfiguredWafConfigExclusionArgs

    TargetRuleSet string
    Target WAF rule set to apply the preconfigured WAF exclusion.
    RequestCookies List<SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCooky>
    Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    RequestHeaders List<SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeader>
    Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    RequestQueryParams List<SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParam>
    Request query parameter whose value will be excluded from inspection during preconfigured WAF evaluation. Note that the parameter can be in the query string or in the POST body. Structure is documented below.
    RequestUris List<SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUri>
    Request URI from the request line to be excluded from inspection during preconfigured WAF evaluation. When specifying this field, the query or fragment part should be excluded. Structure is documented below.
    TargetRuleIds List<string>
    A list of target rule IDs under the WAF rule set to apply the preconfigured WAF exclusion. If omitted, it refers to all the rule IDs under the WAF rule set.
    TargetRuleSet string
    Target WAF rule set to apply the preconfigured WAF exclusion.
    RequestCookies []SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCooky
    Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    RequestHeaders []SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeader
    Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    RequestQueryParams []SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParam
    Request query parameter whose value will be excluded from inspection during preconfigured WAF evaluation. Note that the parameter can be in the query string or in the POST body. Structure is documented below.
    RequestUris []SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUri
    Request URI from the request line to be excluded from inspection during preconfigured WAF evaluation. When specifying this field, the query or fragment part should be excluded. Structure is documented below.
    TargetRuleIds []string
    A list of target rule IDs under the WAF rule set to apply the preconfigured WAF exclusion. If omitted, it refers to all the rule IDs under the WAF rule set.
    targetRuleSet String
    Target WAF rule set to apply the preconfigured WAF exclusion.
    requestCookies List<SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCooky>
    Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    requestHeaders List<SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeader>
    Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    requestQueryParams List<SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParam>
    Request query parameter whose value will be excluded from inspection during preconfigured WAF evaluation. Note that the parameter can be in the query string or in the POST body. Structure is documented below.
    requestUris List<SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUri>
    Request URI from the request line to be excluded from inspection during preconfigured WAF evaluation. When specifying this field, the query or fragment part should be excluded. Structure is documented below.
    targetRuleIds List<String>
    A list of target rule IDs under the WAF rule set to apply the preconfigured WAF exclusion. If omitted, it refers to all the rule IDs under the WAF rule set.
    targetRuleSet string
    Target WAF rule set to apply the preconfigured WAF exclusion.
    requestCookies SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCooky[]
    Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    requestHeaders SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeader[]
    Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    requestQueryParams SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParam[]
    Request query parameter whose value will be excluded from inspection during preconfigured WAF evaluation. Note that the parameter can be in the query string or in the POST body. Structure is documented below.
    requestUris SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUri[]
    Request URI from the request line to be excluded from inspection during preconfigured WAF evaluation. When specifying this field, the query or fragment part should be excluded. Structure is documented below.
    targetRuleIds string[]
    A list of target rule IDs under the WAF rule set to apply the preconfigured WAF exclusion. If omitted, it refers to all the rule IDs under the WAF rule set.
    target_rule_set str
    Target WAF rule set to apply the preconfigured WAF exclusion.
    request_cookies Sequence[SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCooky]
    Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    request_headers Sequence[SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeader]
    Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    request_query_params Sequence[SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParam]
    Request query parameter whose value will be excluded from inspection during preconfigured WAF evaluation. Note that the parameter can be in the query string or in the POST body. Structure is documented below.
    request_uris Sequence[SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUri]
    Request URI from the request line to be excluded from inspection during preconfigured WAF evaluation. When specifying this field, the query or fragment part should be excluded. Structure is documented below.
    target_rule_ids Sequence[str]
    A list of target rule IDs under the WAF rule set to apply the preconfigured WAF exclusion. If omitted, it refers to all the rule IDs under the WAF rule set.
    targetRuleSet String
    Target WAF rule set to apply the preconfigured WAF exclusion.
    requestCookies List<Property Map>
    Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    requestHeaders List<Property Map>
    Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
    requestQueryParams List<Property Map>
    Request query parameter whose value will be excluded from inspection during preconfigured WAF evaluation. Note that the parameter can be in the query string or in the POST body. Structure is documented below.
    requestUris List<Property Map>
    Request URI from the request line to be excluded from inspection during preconfigured WAF evaluation. When specifying this field, the query or fragment part should be excluded. Structure is documented below.
    targetRuleIds List<String>
    A list of target rule IDs under the WAF rule set to apply the preconfigured WAF exclusion. If omitted, it refers to all the rule IDs under the WAF rule set.

    SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCooky, SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCookyArgs

    Operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    Value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    Operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    Value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator String
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value String
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator str
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value str
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator String
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value String
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.

    SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeader, SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeaderArgs

    Operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    Value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    Operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    Value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator String
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value String
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator str
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value str
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator String
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value String
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.

    SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParam, SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParamArgs

    Operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    Value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    Operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    Value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator String
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value String
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator str
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value str
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator String
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value String
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.

    SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUri, SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUriArgs

    Operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    Value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    Operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    Value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator String
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value String
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator string
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value string
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator str
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value str
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.
    operator String
    You can specify an exact match or a partial match by using a field operator and a field value. Available options: EQUALS: The operator matches if the field value equals the specified value. STARTS_WITH: The operator matches if the field value starts with the specified value. ENDS_WITH: The operator matches if the field value ends with the specified value. CONTAINS: The operator matches if the field value contains the specified value. EQUALS_ANY: The operator matches if the field value is any value.
    value String
    A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY.

    SecurityPolicyRuleRateLimitOptions, SecurityPolicyRuleRateLimitOptionsArgs

    BanDurationSec int
    Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
    BanThreshold SecurityPolicyRuleRateLimitOptionsBanThreshold
    Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'banDurationSec' when the number of requests that exceed the 'rateLimitThreshold' also exceed this 'banThreshold'. Structure is documented below.
    ConformAction string
    Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
    EnforceOnKey string
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.
    EnforceOnKeyConfigs List<SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig>
    If specified, any combination of values of enforceOnKeyType/enforceOnKeyName is treated as the key on which ratelimit threshold/action is enforced. You can specify up to 3 enforceOnKeyConfigs. If enforceOnKeyConfigs is specified, enforceOnKey must not be specified. Structure is documented below.
    EnforceOnKeyName string
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    ExceedAction string
    Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are deny(STATUS), where valid values for STATUS are 403, 404, 429, and 502.
    ExceedRedirectOptions SecurityPolicyRuleRateLimitOptionsExceedRedirectOptions
    Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. This field is only supported in Global Security Policies of type CLOUD_ARMOR. Structure is documented below.
    RateLimitThreshold SecurityPolicyRuleRateLimitOptionsRateLimitThreshold
    Threshold at which to begin ratelimiting. Structure is documented below.
    BanDurationSec int
    Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
    BanThreshold SecurityPolicyRuleRateLimitOptionsBanThreshold
    Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'banDurationSec' when the number of requests that exceed the 'rateLimitThreshold' also exceed this 'banThreshold'. Structure is documented below.
    ConformAction string
    Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
    EnforceOnKey string
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.
    EnforceOnKeyConfigs []SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig
    If specified, any combination of values of enforceOnKeyType/enforceOnKeyName is treated as the key on which ratelimit threshold/action is enforced. You can specify up to 3 enforceOnKeyConfigs. If enforceOnKeyConfigs is specified, enforceOnKey must not be specified. Structure is documented below.
    EnforceOnKeyName string
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    ExceedAction string
    Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are deny(STATUS), where valid values for STATUS are 403, 404, 429, and 502.
    ExceedRedirectOptions SecurityPolicyRuleRateLimitOptionsExceedRedirectOptions
    Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. This field is only supported in Global Security Policies of type CLOUD_ARMOR. Structure is documented below.
    RateLimitThreshold SecurityPolicyRuleRateLimitOptionsRateLimitThreshold
    Threshold at which to begin ratelimiting. Structure is documented below.
    banDurationSec Integer
    Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
    banThreshold SecurityPolicyRuleRateLimitOptionsBanThreshold
    Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'banDurationSec' when the number of requests that exceed the 'rateLimitThreshold' also exceed this 'banThreshold'. Structure is documented below.
    conformAction String
    Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
    enforceOnKey String
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.
    enforceOnKeyConfigs List<SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig>
    If specified, any combination of values of enforceOnKeyType/enforceOnKeyName is treated as the key on which ratelimit threshold/action is enforced. You can specify up to 3 enforceOnKeyConfigs. If enforceOnKeyConfigs is specified, enforceOnKey must not be specified. Structure is documented below.
    enforceOnKeyName String
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    exceedAction String
    Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are deny(STATUS), where valid values for STATUS are 403, 404, 429, and 502.
    exceedRedirectOptions SecurityPolicyRuleRateLimitOptionsExceedRedirectOptions
    Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. This field is only supported in Global Security Policies of type CLOUD_ARMOR. Structure is documented below.
    rateLimitThreshold SecurityPolicyRuleRateLimitOptionsRateLimitThreshold
    Threshold at which to begin ratelimiting. Structure is documented below.
    banDurationSec number
    Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
    banThreshold SecurityPolicyRuleRateLimitOptionsBanThreshold
    Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'banDurationSec' when the number of requests that exceed the 'rateLimitThreshold' also exceed this 'banThreshold'. Structure is documented below.
    conformAction string
    Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
    enforceOnKey string
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.
    enforceOnKeyConfigs SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig[]
    If specified, any combination of values of enforceOnKeyType/enforceOnKeyName is treated as the key on which ratelimit threshold/action is enforced. You can specify up to 3 enforceOnKeyConfigs. If enforceOnKeyConfigs is specified, enforceOnKey must not be specified. Structure is documented below.
    enforceOnKeyName string
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    exceedAction string
    Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are deny(STATUS), where valid values for STATUS are 403, 404, 429, and 502.
    exceedRedirectOptions SecurityPolicyRuleRateLimitOptionsExceedRedirectOptions
    Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. This field is only supported in Global Security Policies of type CLOUD_ARMOR. Structure is documented below.
    rateLimitThreshold SecurityPolicyRuleRateLimitOptionsRateLimitThreshold
    Threshold at which to begin ratelimiting. Structure is documented below.
    ban_duration_sec int
    Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
    ban_threshold SecurityPolicyRuleRateLimitOptionsBanThreshold
    Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'banDurationSec' when the number of requests that exceed the 'rateLimitThreshold' also exceed this 'banThreshold'. Structure is documented below.
    conform_action str
    Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
    enforce_on_key str
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.
    enforce_on_key_configs Sequence[SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig]
    If specified, any combination of values of enforceOnKeyType/enforceOnKeyName is treated as the key on which ratelimit threshold/action is enforced. You can specify up to 3 enforceOnKeyConfigs. If enforceOnKeyConfigs is specified, enforceOnKey must not be specified. Structure is documented below.
    enforce_on_key_name str
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    exceed_action str
    Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are deny(STATUS), where valid values for STATUS are 403, 404, 429, and 502.
    exceed_redirect_options SecurityPolicyRuleRateLimitOptionsExceedRedirectOptions
    Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. This field is only supported in Global Security Policies of type CLOUD_ARMOR. Structure is documented below.
    rate_limit_threshold SecurityPolicyRuleRateLimitOptionsRateLimitThreshold
    Threshold at which to begin ratelimiting. Structure is documented below.
    banDurationSec Number
    Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
    banThreshold Property Map
    Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'banDurationSec' when the number of requests that exceed the 'rateLimitThreshold' also exceed this 'banThreshold'. Structure is documented below.
    conformAction String
    Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
    enforceOnKey String
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.
    enforceOnKeyConfigs List<Property Map>
    If specified, any combination of values of enforceOnKeyType/enforceOnKeyName is treated as the key on which ratelimit threshold/action is enforced. You can specify up to 3 enforceOnKeyConfigs. If enforceOnKeyConfigs is specified, enforceOnKey must not be specified. Structure is documented below.
    enforceOnKeyName String
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    exceedAction String
    Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are deny(STATUS), where valid values for STATUS are 403, 404, 429, and 502.
    exceedRedirectOptions Property Map
    Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. This field is only supported in Global Security Policies of type CLOUD_ARMOR. Structure is documented below.
    rateLimitThreshold Property Map
    Threshold at which to begin ratelimiting. Structure is documented below.

    SecurityPolicyRuleRateLimitOptionsBanThreshold, SecurityPolicyRuleRateLimitOptionsBanThresholdArgs

    Count int
    Number of HTTP(S) requests for calculating the threshold.
    IntervalSec int
    Interval over which the threshold is computed.
    Count int
    Number of HTTP(S) requests for calculating the threshold.
    IntervalSec int
    Interval over which the threshold is computed.
    count Integer
    Number of HTTP(S) requests for calculating the threshold.
    intervalSec Integer
    Interval over which the threshold is computed.
    count number
    Number of HTTP(S) requests for calculating the threshold.
    intervalSec number
    Interval over which the threshold is computed.
    count int
    Number of HTTP(S) requests for calculating the threshold.
    interval_sec int
    Interval over which the threshold is computed.
    count Number
    Number of HTTP(S) requests for calculating the threshold.
    intervalSec Number
    Interval over which the threshold is computed.

    SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig, SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs

    EnforceOnKeyName string
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    EnforceOnKeyType string
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKeyConfigs" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.
    EnforceOnKeyName string
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    EnforceOnKeyType string
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKeyConfigs" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.
    enforceOnKeyName String
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    enforceOnKeyType String
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKeyConfigs" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.
    enforceOnKeyName string
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    enforceOnKeyType string
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKeyConfigs" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.
    enforce_on_key_name str
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    enforce_on_key_type str
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKeyConfigs" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.
    enforceOnKeyName String
    Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
    enforceOnKeyType String
    Determines the key to enforce the rateLimitThreshold on. Possible values are:

    • ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKeyConfigs" is not configured.
    • IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
    • HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
    • XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
    • HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
    • HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
    • SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
    • REGION_CODE: The country/region from which the request originates.
    • TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
    • USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. Possible values are: ALL, IP, HTTP_HEADER, XFF_IP, HTTP_COOKIE, HTTP_PATH, SNI, REGION_CODE, TLS_JA3_FINGERPRINT, USER_IP.

    SecurityPolicyRuleRateLimitOptionsExceedRedirectOptions, SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs

    Target string
    Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
    Type string
    Type of the redirect action.
    Target string
    Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
    Type string
    Type of the redirect action.
    target String
    Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
    type String
    Type of the redirect action.
    target string
    Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
    type string
    Type of the redirect action.
    target str
    Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
    type str
    Type of the redirect action.
    target String
    Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
    type String
    Type of the redirect action.

    SecurityPolicyRuleRateLimitOptionsRateLimitThreshold, SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs

    Count int
    Number of HTTP(S) requests for calculating the threshold.
    IntervalSec int
    Interval over which the threshold is computed.
    Count int
    Number of HTTP(S) requests for calculating the threshold.
    IntervalSec int
    Interval over which the threshold is computed.
    count Integer
    Number of HTTP(S) requests for calculating the threshold.
    intervalSec Integer
    Interval over which the threshold is computed.
    count number
    Number of HTTP(S) requests for calculating the threshold.
    intervalSec number
    Interval over which the threshold is computed.
    count int
    Number of HTTP(S) requests for calculating the threshold.
    interval_sec int
    Interval over which the threshold is computed.
    count Number
    Number of HTTP(S) requests for calculating the threshold.
    intervalSec Number
    Interval over which the threshold is computed.

    SecurityPolicyRuleRedirectOptions, SecurityPolicyRuleRedirectOptionsArgs

    Type string
    Type of redirect action.

    • EXTERNAL_302: Redirect to an external address, configured in target.
    • GOOGLE_RECAPTCHA: Redirect to Google reCAPTCHA.
    Target string
    External redirection target when EXTERNAL_302 is set in type.
    Type string
    Type of redirect action.

    • EXTERNAL_302: Redirect to an external address, configured in target.
    • GOOGLE_RECAPTCHA: Redirect to Google reCAPTCHA.
    Target string
    External redirection target when EXTERNAL_302 is set in type.
    type String
    Type of redirect action.

    • EXTERNAL_302: Redirect to an external address, configured in target.
    • GOOGLE_RECAPTCHA: Redirect to Google reCAPTCHA.
    target String
    External redirection target when EXTERNAL_302 is set in type.
    type string
    Type of redirect action.

    • EXTERNAL_302: Redirect to an external address, configured in target.
    • GOOGLE_RECAPTCHA: Redirect to Google reCAPTCHA.
    target string
    External redirection target when EXTERNAL_302 is set in type.
    type str
    Type of redirect action.

    • EXTERNAL_302: Redirect to an external address, configured in target.
    • GOOGLE_RECAPTCHA: Redirect to Google reCAPTCHA.
    target str
    External redirection target when EXTERNAL_302 is set in type.
    type String
    Type of redirect action.

    • EXTERNAL_302: Redirect to an external address, configured in target.
    • GOOGLE_RECAPTCHA: Redirect to Google reCAPTCHA.
    target String
    External redirection target when EXTERNAL_302 is set in type.

    Import

    Security policies can be imported using any of these accepted formats:

    • projects/{{project}}/global/securityPolicies/{{name}}

    • {{project}}/{{name}}

    • {{name}}

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

    $ pulumi import gcp:compute/securityPolicy:SecurityPolicy default projects/{{project}}/global/securityPolicies/{{name}}
    
    $ pulumi import gcp:compute/securityPolicy:SecurityPolicy default {{project}}/{{name}}
    
    $ pulumi import gcp:compute/securityPolicy:SecurityPolicy default {{name}}
    

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

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.7.0 published on Tuesday, Oct 29, 2024 by Pulumi