1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. SecurityPolicyRule
Google Cloud Classic v7.27.0 published on Thursday, Jun 13, 2024 by Pulumi

gcp.compute.SecurityPolicyRule

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.27.0 published on Thursday, Jun 13, 2024 by Pulumi

    A rule for the SecurityPolicy.

    To get more information about SecurityPolicyRule, see:

    Example Usage

    Security Policy Rule Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const _default = new gcp.compute.SecurityPolicy("default", {
        name: "policyruletest",
        description: "basic global security policy",
        type: "CLOUD_ARMOR",
    });
    const policyRule = new gcp.compute.SecurityPolicyRule("policy_rule", {
        securityPolicy: _default.name,
        description: "new rule",
        priority: 100,
        match: {
            versionedExpr: "SRC_IPS_V1",
            config: {
                srcIpRanges: ["10.10.0.0/16"],
            },
        },
        action: "allow",
        preview: true,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.compute.SecurityPolicy("default",
        name="policyruletest",
        description="basic global security policy",
        type="CLOUD_ARMOR")
    policy_rule = gcp.compute.SecurityPolicyRule("policy_rule",
        security_policy=default.name,
        description="new rule",
        priority=100,
        match=gcp.compute.SecurityPolicyRuleMatchArgs(
            versioned_expr="SRC_IPS_V1",
            config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
                src_ip_ranges=["10.10.0.0/16"],
            ),
        ),
        action="allow",
        preview=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewSecurityPolicy(ctx, "default", &compute.SecurityPolicyArgs{
    			Name:        pulumi.String("policyruletest"),
    			Description: pulumi.String("basic global security policy"),
    			Type:        pulumi.String("CLOUD_ARMOR"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewSecurityPolicyRule(ctx, "policy_rule", &compute.SecurityPolicyRuleArgs{
    			SecurityPolicy: _default.Name,
    			Description:    pulumi.String("new rule"),
    			Priority:       pulumi.Int(100),
    			Match: &compute.SecurityPolicyRuleMatchArgs{
    				VersionedExpr: pulumi.String("SRC_IPS_V1"),
    				Config: &compute.SecurityPolicyRuleMatchConfigArgs{
    					SrcIpRanges: pulumi.StringArray{
    						pulumi.String("10.10.0.0/16"),
    					},
    				},
    			},
    			Action:  pulumi.String("allow"),
    			Preview: pulumi.Bool(true),
    		})
    		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 @default = new Gcp.Compute.SecurityPolicy("default", new()
        {
            Name = "policyruletest",
            Description = "basic global security policy",
            Type = "CLOUD_ARMOR",
        });
    
        var policyRule = new Gcp.Compute.SecurityPolicyRule("policy_rule", new()
        {
            SecurityPolicy = @default.Name,
            Description = "new rule",
            Priority = 100,
            Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
            {
                VersionedExpr = "SRC_IPS_V1",
                Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
                {
                    SrcIpRanges = new[]
                    {
                        "10.10.0.0/16",
                    },
                },
            },
            Action = "allow",
            Preview = true,
        });
    
    });
    
    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.SecurityPolicyRule;
    import com.pulumi.gcp.compute.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 default_ = new SecurityPolicy("default", SecurityPolicyArgs.builder()
                .name("policyruletest")
                .description("basic global security policy")
                .type("CLOUD_ARMOR")
                .build());
    
            var policyRule = new SecurityPolicyRule("policyRule", SecurityPolicyRuleArgs.builder()
                .securityPolicy(default_.name())
                .description("new rule")
                .priority(100)
                .match(SecurityPolicyRuleMatchArgs.builder()
                    .versionedExpr("SRC_IPS_V1")
                    .config(SecurityPolicyRuleMatchConfigArgs.builder()
                        .srcIpRanges("10.10.0.0/16")
                        .build())
                    .build())
                .action("allow")
                .preview(true)
                .build());
    
        }
    }
    
    resources:
      default:
        type: gcp:compute:SecurityPolicy
        properties:
          name: policyruletest
          description: basic global security policy
          type: CLOUD_ARMOR
      policyRule:
        type: gcp:compute:SecurityPolicyRule
        name: policy_rule
        properties:
          securityPolicy: ${default.name}
          description: new rule
          priority: 100
          match:
            versionedExpr: SRC_IPS_V1
            config:
              srcIpRanges:
                - 10.10.0.0/16
          action: allow
          preview: true
    

    Security Policy Rule Default Rule

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const _default = new gcp.compute.SecurityPolicy("default", {
        name: "policyruletest",
        description: "basic global security policy",
        type: "CLOUD_ARMOR",
    });
    // A default rule is generated when creating the security_policy resource, import is needed to patch it
    // import {
    //   id = "projects//global/securityPolicies/policyruletest/priority/2147483647"
    //   to = google_compute_security_policy_rule.default_rule
    // }
    const defaultRule = new gcp.compute.SecurityPolicyRule("default_rule", {
        securityPolicy: _default.name,
        description: "default rule",
        action: "allow",
        priority: 2147483647,
        match: {
            versionedExpr: "SRC_IPS_V1",
            config: {
                srcIpRanges: ["*"],
            },
        },
    });
    const policyRule = new gcp.compute.SecurityPolicyRule("policy_rule", {
        securityPolicy: _default.name,
        description: "new rule",
        priority: 100,
        match: {
            versionedExpr: "SRC_IPS_V1",
            config: {
                srcIpRanges: ["10.10.0.0/16"],
            },
        },
        action: "allow",
        preview: true,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.compute.SecurityPolicy("default",
        name="policyruletest",
        description="basic global security policy",
        type="CLOUD_ARMOR")
    # A default rule is generated when creating the security_policy resource, import is needed to patch it
    # import {
    #   id = "projects//global/securityPolicies/policyruletest/priority/2147483647"
    #   to = google_compute_security_policy_rule.default_rule
    # }
    default_rule = gcp.compute.SecurityPolicyRule("default_rule",
        security_policy=default.name,
        description="default rule",
        action="allow",
        priority=2147483647,
        match=gcp.compute.SecurityPolicyRuleMatchArgs(
            versioned_expr="SRC_IPS_V1",
            config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
                src_ip_ranges=["*"],
            ),
        ))
    policy_rule = gcp.compute.SecurityPolicyRule("policy_rule",
        security_policy=default.name,
        description="new rule",
        priority=100,
        match=gcp.compute.SecurityPolicyRuleMatchArgs(
            versioned_expr="SRC_IPS_V1",
            config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
                src_ip_ranges=["10.10.0.0/16"],
            ),
        ),
        action="allow",
        preview=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewSecurityPolicy(ctx, "default", &compute.SecurityPolicyArgs{
    			Name:        pulumi.String("policyruletest"),
    			Description: pulumi.String("basic global security policy"),
    			Type:        pulumi.String("CLOUD_ARMOR"),
    		})
    		if err != nil {
    			return err
    		}
    		// A default rule is generated when creating the security_policy resource, import is needed to patch it
    		//
    		//	import {
    		//	  id = "projects//global/securityPolicies/policyruletest/priority/2147483647"
    		//	  to = google_compute_security_policy_rule.default_rule
    		//	}
    		_, err = compute.NewSecurityPolicyRule(ctx, "default_rule", &compute.SecurityPolicyRuleArgs{
    			SecurityPolicy: _default.Name,
    			Description:    pulumi.String("default rule"),
    			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("*"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewSecurityPolicyRule(ctx, "policy_rule", &compute.SecurityPolicyRuleArgs{
    			SecurityPolicy: _default.Name,
    			Description:    pulumi.String("new rule"),
    			Priority:       pulumi.Int(100),
    			Match: &compute.SecurityPolicyRuleMatchArgs{
    				VersionedExpr: pulumi.String("SRC_IPS_V1"),
    				Config: &compute.SecurityPolicyRuleMatchConfigArgs{
    					SrcIpRanges: pulumi.StringArray{
    						pulumi.String("10.10.0.0/16"),
    					},
    				},
    			},
    			Action:  pulumi.String("allow"),
    			Preview: pulumi.Bool(true),
    		})
    		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 @default = new Gcp.Compute.SecurityPolicy("default", new()
        {
            Name = "policyruletest",
            Description = "basic global security policy",
            Type = "CLOUD_ARMOR",
        });
    
        // A default rule is generated when creating the security_policy resource, import is needed to patch it
        // import {
        //   id = "projects//global/securityPolicies/policyruletest/priority/2147483647"
        //   to = google_compute_security_policy_rule.default_rule
        // }
        var defaultRule = new Gcp.Compute.SecurityPolicyRule("default_rule", new()
        {
            SecurityPolicy = @default.Name,
            Description = "default rule",
            Action = "allow",
            Priority = 2147483647,
            Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
            {
                VersionedExpr = "SRC_IPS_V1",
                Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
                {
                    SrcIpRanges = new[]
                    {
                        "*",
                    },
                },
            },
        });
    
        var policyRule = new Gcp.Compute.SecurityPolicyRule("policy_rule", new()
        {
            SecurityPolicy = @default.Name,
            Description = "new rule",
            Priority = 100,
            Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
            {
                VersionedExpr = "SRC_IPS_V1",
                Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
                {
                    SrcIpRanges = new[]
                    {
                        "10.10.0.0/16",
                    },
                },
            },
            Action = "allow",
            Preview = true,
        });
    
    });
    
    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.SecurityPolicyRule;
    import com.pulumi.gcp.compute.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 default_ = new SecurityPolicy("default", SecurityPolicyArgs.builder()
                .name("policyruletest")
                .description("basic global security policy")
                .type("CLOUD_ARMOR")
                .build());
    
            // A default rule is generated when creating the security_policy resource, import is needed to patch it
            // import {
            //   id = "projects//global/securityPolicies/policyruletest/priority/2147483647"
            //   to = google_compute_security_policy_rule.default_rule
            // }
            var defaultRule = new SecurityPolicyRule("defaultRule", SecurityPolicyRuleArgs.builder()
                .securityPolicy(default_.name())
                .description("default rule")
                .action("allow")
                .priority("2147483647")
                .match(SecurityPolicyRuleMatchArgs.builder()
                    .versionedExpr("SRC_IPS_V1")
                    .config(SecurityPolicyRuleMatchConfigArgs.builder()
                        .srcIpRanges("*")
                        .build())
                    .build())
                .build());
    
            var policyRule = new SecurityPolicyRule("policyRule", SecurityPolicyRuleArgs.builder()
                .securityPolicy(default_.name())
                .description("new rule")
                .priority(100)
                .match(SecurityPolicyRuleMatchArgs.builder()
                    .versionedExpr("SRC_IPS_V1")
                    .config(SecurityPolicyRuleMatchConfigArgs.builder()
                        .srcIpRanges("10.10.0.0/16")
                        .build())
                    .build())
                .action("allow")
                .preview(true)
                .build());
    
        }
    }
    
    resources:
      default:
        type: gcp:compute:SecurityPolicy
        properties:
          name: policyruletest
          description: basic global security policy
          type: CLOUD_ARMOR
      # A default rule is generated when creating the security_policy resource, import is needed to patch it
      # import {
      #   id = "projects//global/securityPolicies/policyruletest/priority/2147483647"
      #   to = google_compute_security_policy_rule.default_rule
      # }
      defaultRule:
        type: gcp:compute:SecurityPolicyRule
        name: default_rule
        properties:
          securityPolicy: ${default.name}
          description: default rule
          action: allow
          priority: '2147483647'
          match:
            versionedExpr: SRC_IPS_V1
            config:
              srcIpRanges:
                - '*'
      policyRule:
        type: gcp:compute:SecurityPolicyRule
        name: policy_rule
        properties:
          securityPolicy: ${default.name}
          description: new rule
          priority: 100
          match:
            versionedExpr: SRC_IPS_V1
            config:
              srcIpRanges:
                - 10.10.0.0/16
          action: allow
          preview: true
    

    Security Policy Rule Multiple Rules

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const _default = new gcp.compute.SecurityPolicy("default", {
        name: "policywithmultiplerules",
        description: "basic global security policy",
        type: "CLOUD_ARMOR",
    });
    const policyRuleOne = new gcp.compute.SecurityPolicyRule("policy_rule_one", {
        securityPolicy: _default.name,
        description: "new rule one",
        priority: 100,
        match: {
            versionedExpr: "SRC_IPS_V1",
            config: {
                srcIpRanges: ["10.10.0.0/16"],
            },
        },
        action: "allow",
        preview: true,
    });
    const policyRuleTwo = new gcp.compute.SecurityPolicyRule("policy_rule_two", {
        securityPolicy: _default.name,
        description: "new rule two",
        priority: 101,
        match: {
            versionedExpr: "SRC_IPS_V1",
            config: {
                srcIpRanges: [
                    "192.168.0.0/16",
                    "10.0.0.0/8",
                ],
            },
        },
        action: "allow",
        preview: true,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.compute.SecurityPolicy("default",
        name="policywithmultiplerules",
        description="basic global security policy",
        type="CLOUD_ARMOR")
    policy_rule_one = gcp.compute.SecurityPolicyRule("policy_rule_one",
        security_policy=default.name,
        description="new rule one",
        priority=100,
        match=gcp.compute.SecurityPolicyRuleMatchArgs(
            versioned_expr="SRC_IPS_V1",
            config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
                src_ip_ranges=["10.10.0.0/16"],
            ),
        ),
        action="allow",
        preview=True)
    policy_rule_two = gcp.compute.SecurityPolicyRule("policy_rule_two",
        security_policy=default.name,
        description="new rule two",
        priority=101,
        match=gcp.compute.SecurityPolicyRuleMatchArgs(
            versioned_expr="SRC_IPS_V1",
            config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
                src_ip_ranges=[
                    "192.168.0.0/16",
                    "10.0.0.0/8",
                ],
            ),
        ),
        action="allow",
        preview=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewSecurityPolicy(ctx, "default", &compute.SecurityPolicyArgs{
    			Name:        pulumi.String("policywithmultiplerules"),
    			Description: pulumi.String("basic global security policy"),
    			Type:        pulumi.String("CLOUD_ARMOR"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewSecurityPolicyRule(ctx, "policy_rule_one", &compute.SecurityPolicyRuleArgs{
    			SecurityPolicy: _default.Name,
    			Description:    pulumi.String("new rule one"),
    			Priority:       pulumi.Int(100),
    			Match: &compute.SecurityPolicyRuleMatchArgs{
    				VersionedExpr: pulumi.String("SRC_IPS_V1"),
    				Config: &compute.SecurityPolicyRuleMatchConfigArgs{
    					SrcIpRanges: pulumi.StringArray{
    						pulumi.String("10.10.0.0/16"),
    					},
    				},
    			},
    			Action:  pulumi.String("allow"),
    			Preview: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewSecurityPolicyRule(ctx, "policy_rule_two", &compute.SecurityPolicyRuleArgs{
    			SecurityPolicy: _default.Name,
    			Description:    pulumi.String("new rule two"),
    			Priority:       pulumi.Int(101),
    			Match: &compute.SecurityPolicyRuleMatchArgs{
    				VersionedExpr: pulumi.String("SRC_IPS_V1"),
    				Config: &compute.SecurityPolicyRuleMatchConfigArgs{
    					SrcIpRanges: pulumi.StringArray{
    						pulumi.String("192.168.0.0/16"),
    						pulumi.String("10.0.0.0/8"),
    					},
    				},
    			},
    			Action:  pulumi.String("allow"),
    			Preview: pulumi.Bool(true),
    		})
    		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 @default = new Gcp.Compute.SecurityPolicy("default", new()
        {
            Name = "policywithmultiplerules",
            Description = "basic global security policy",
            Type = "CLOUD_ARMOR",
        });
    
        var policyRuleOne = new Gcp.Compute.SecurityPolicyRule("policy_rule_one", new()
        {
            SecurityPolicy = @default.Name,
            Description = "new rule one",
            Priority = 100,
            Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
            {
                VersionedExpr = "SRC_IPS_V1",
                Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
                {
                    SrcIpRanges = new[]
                    {
                        "10.10.0.0/16",
                    },
                },
            },
            Action = "allow",
            Preview = true,
        });
    
        var policyRuleTwo = new Gcp.Compute.SecurityPolicyRule("policy_rule_two", new()
        {
            SecurityPolicy = @default.Name,
            Description = "new rule two",
            Priority = 101,
            Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
            {
                VersionedExpr = "SRC_IPS_V1",
                Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
                {
                    SrcIpRanges = new[]
                    {
                        "192.168.0.0/16",
                        "10.0.0.0/8",
                    },
                },
            },
            Action = "allow",
            Preview = true,
        });
    
    });
    
    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.SecurityPolicyRule;
    import com.pulumi.gcp.compute.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 default_ = new SecurityPolicy("default", SecurityPolicyArgs.builder()
                .name("policywithmultiplerules")
                .description("basic global security policy")
                .type("CLOUD_ARMOR")
                .build());
    
            var policyRuleOne = new SecurityPolicyRule("policyRuleOne", SecurityPolicyRuleArgs.builder()
                .securityPolicy(default_.name())
                .description("new rule one")
                .priority(100)
                .match(SecurityPolicyRuleMatchArgs.builder()
                    .versionedExpr("SRC_IPS_V1")
                    .config(SecurityPolicyRuleMatchConfigArgs.builder()
                        .srcIpRanges("10.10.0.0/16")
                        .build())
                    .build())
                .action("allow")
                .preview(true)
                .build());
    
            var policyRuleTwo = new SecurityPolicyRule("policyRuleTwo", SecurityPolicyRuleArgs.builder()
                .securityPolicy(default_.name())
                .description("new rule two")
                .priority(101)
                .match(SecurityPolicyRuleMatchArgs.builder()
                    .versionedExpr("SRC_IPS_V1")
                    .config(SecurityPolicyRuleMatchConfigArgs.builder()
                        .srcIpRanges(                    
                            "192.168.0.0/16",
                            "10.0.0.0/8")
                        .build())
                    .build())
                .action("allow")
                .preview(true)
                .build());
    
        }
    }
    
    resources:
      default:
        type: gcp:compute:SecurityPolicy
        properties:
          name: policywithmultiplerules
          description: basic global security policy
          type: CLOUD_ARMOR
      policyRuleOne:
        type: gcp:compute:SecurityPolicyRule
        name: policy_rule_one
        properties:
          securityPolicy: ${default.name}
          description: new rule one
          priority: 100
          match:
            versionedExpr: SRC_IPS_V1
            config:
              srcIpRanges:
                - 10.10.0.0/16
          action: allow
          preview: true
      policyRuleTwo:
        type: gcp:compute:SecurityPolicyRule
        name: policy_rule_two
        properties:
          securityPolicy: ${default.name}
          description: new rule two
          priority: 101
          match:
            versionedExpr: SRC_IPS_V1
            config:
              srcIpRanges:
                - 192.168.0.0/16
                - 10.0.0.0/8
          action: allow
          preview: true
    

    Create SecurityPolicyRule Resource

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

    Constructor syntax

    new SecurityPolicyRule(name: string, args: SecurityPolicyRuleArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityPolicyRule(resource_name: str,
                           args: SecurityPolicyRuleInitArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityPolicyRule(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           action: Optional[str] = None,
                           priority: Optional[int] = None,
                           security_policy: Optional[str] = None,
                           description: Optional[str] = None,
                           match: Optional[SecurityPolicyRuleMatchArgs] = None,
                           preconfigured_waf_config: Optional[SecurityPolicyRulePreconfiguredWafConfigArgs] = None,
                           preview: Optional[bool] = None,
                           project: Optional[str] = None,
                           rate_limit_options: Optional[SecurityPolicyRuleRateLimitOptionsArgs] = None)
    func NewSecurityPolicyRule(ctx *Context, name string, args SecurityPolicyRuleArgs, opts ...ResourceOption) (*SecurityPolicyRule, error)
    public SecurityPolicyRule(string name, SecurityPolicyRuleArgs args, CustomResourceOptions? opts = null)
    public SecurityPolicyRule(String name, SecurityPolicyRuleArgs args)
    public SecurityPolicyRule(String name, SecurityPolicyRuleArgs args, CustomResourceOptions options)
    
    type: gcp:compute:SecurityPolicyRule
    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 SecurityPolicyRuleArgs
    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 SecurityPolicyRuleInitArgs
    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 SecurityPolicyRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityPolicyRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityPolicyRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var securityPolicyRuleResource = new Gcp.Compute.SecurityPolicyRule("securityPolicyRuleResource", new()
    {
        Action = "string",
        Priority = 0,
        SecurityPolicy = "string",
        Description = "string",
        Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
        {
            Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
            {
                SrcIpRanges = new[]
                {
                    "string",
                },
            },
            Expr = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchExprArgs
            {
                Expression = "string",
            },
            VersionedExpr = "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,
        Project = "string",
        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,
            },
        },
    });
    
    example, err := compute.NewSecurityPolicyRule(ctx, "securityPolicyRuleResource", &compute.SecurityPolicyRuleArgs{
    	Action:         pulumi.String("string"),
    	Priority:       pulumi.Int(0),
    	SecurityPolicy: pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	Match: &compute.SecurityPolicyRuleMatchArgs{
    		Config: &compute.SecurityPolicyRuleMatchConfigArgs{
    			SrcIpRanges: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		Expr: &compute.SecurityPolicyRuleMatchExprArgs{
    			Expression: pulumi.String("string"),
    		},
    		VersionedExpr: 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),
    	Project: pulumi.String("string"),
    	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),
    		},
    	},
    })
    
    var securityPolicyRuleResource = new SecurityPolicyRule("securityPolicyRuleResource", SecurityPolicyRuleArgs.builder()
        .action("string")
        .priority(0)
        .securityPolicy("string")
        .description("string")
        .match(SecurityPolicyRuleMatchArgs.builder()
            .config(SecurityPolicyRuleMatchConfigArgs.builder()
                .srcIpRanges("string")
                .build())
            .expr(SecurityPolicyRuleMatchExprArgs.builder()
                .expression("string")
                .build())
            .versionedExpr("string")
            .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)
        .project("string")
        .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())
        .build());
    
    security_policy_rule_resource = gcp.compute.SecurityPolicyRule("securityPolicyRuleResource",
        action="string",
        priority=0,
        security_policy="string",
        description="string",
        match=gcp.compute.SecurityPolicyRuleMatchArgs(
            config=gcp.compute.SecurityPolicyRuleMatchConfigArgs(
                src_ip_ranges=["string"],
            ),
            expr=gcp.compute.SecurityPolicyRuleMatchExprArgs(
                expression="string",
            ),
            versioned_expr="string",
        ),
        preconfigured_waf_config=gcp.compute.SecurityPolicyRulePreconfiguredWafConfigArgs(
            exclusions=[gcp.compute.SecurityPolicyRulePreconfiguredWafConfigExclusionArgs(
                target_rule_set="string",
                request_cookies=[gcp.compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCookyArgs(
                    operator="string",
                    value="string",
                )],
                request_headers=[gcp.compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeaderArgs(
                    operator="string",
                    value="string",
                )],
                request_query_params=[gcp.compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParamArgs(
                    operator="string",
                    value="string",
                )],
                request_uris=[gcp.compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUriArgs(
                    operator="string",
                    value="string",
                )],
                target_rule_ids=["string"],
            )],
        ),
        preview=False,
        project="string",
        rate_limit_options=gcp.compute.SecurityPolicyRuleRateLimitOptionsArgs(
            ban_duration_sec=0,
            ban_threshold=gcp.compute.SecurityPolicyRuleRateLimitOptionsBanThresholdArgs(
                count=0,
                interval_sec=0,
            ),
            conform_action="string",
            enforce_on_key="string",
            enforce_on_key_configs=[gcp.compute.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs(
                enforce_on_key_name="string",
                enforce_on_key_type="string",
            )],
            enforce_on_key_name="string",
            exceed_action="string",
            exceed_redirect_options=gcp.compute.SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs(
                target="string",
                type="string",
            ),
            rate_limit_threshold=gcp.compute.SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs(
                count=0,
                interval_sec=0,
            ),
        ))
    
    const securityPolicyRuleResource = new gcp.compute.SecurityPolicyRule("securityPolicyRuleResource", {
        action: "string",
        priority: 0,
        securityPolicy: "string",
        description: "string",
        match: {
            config: {
                srcIpRanges: ["string"],
            },
            expr: {
                expression: "string",
            },
            versionedExpr: "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,
        project: "string",
        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,
            },
        },
    });
    
    type: gcp:compute:SecurityPolicyRule
    properties:
        action: string
        description: string
        match:
            config:
                srcIpRanges:
                    - string
            expr:
                expression: 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
        project: string
        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
        securityPolicy: string
    

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

    Action string
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    Priority int
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    SecurityPolicy string
    The name of the security policy this rule belongs to.


    Description string
    An optional description of this resource. Provide this property when you create the resource.
    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.
    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
    If set to true, the specified action is not enforced.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RateLimitOptions SecurityPolicyRuleRateLimitOptions
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.
    Action string
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    Priority int
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    SecurityPolicy string
    The name of the security policy this rule belongs to.


    Description string
    An optional description of this resource. Provide this property when you create the resource.
    Match SecurityPolicyRuleMatchArgs
    A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
    PreconfiguredWafConfig SecurityPolicyRulePreconfiguredWafConfigArgs
    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
    If set to true, the specified action is not enforced.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RateLimitOptions SecurityPolicyRuleRateLimitOptionsArgs
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.
    action String
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    priority Integer
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    securityPolicy String
    The name of the security policy this rule belongs to.


    description String
    An optional description of this resource. Provide this property when you create the resource.
    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.
    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
    If set to true, the specified action is not enforced.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rateLimitOptions SecurityPolicyRuleRateLimitOptions
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.
    action string
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    priority number
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    securityPolicy string
    The name of the security policy this rule belongs to.


    description string
    An optional description of this resource. Provide this property when you create the resource.
    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.
    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
    If set to true, the specified action is not enforced.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rateLimitOptions SecurityPolicyRuleRateLimitOptions
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.
    action str
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    priority int
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    security_policy str
    The name of the security policy this rule belongs to.


    description str
    An optional description of this resource. Provide this property when you create the resource.
    match SecurityPolicyRuleMatchArgs
    A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
    preconfigured_waf_config SecurityPolicyRulePreconfiguredWafConfigArgs
    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
    If set to true, the specified action is not enforced.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rate_limit_options SecurityPolicyRuleRateLimitOptionsArgs
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.
    action String
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    priority Number
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    securityPolicy String
    The name of the security policy this rule belongs to.


    description String
    An optional description of this resource. Provide this property when you create the resource.
    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.
    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
    If set to true, the specified action is not enforced.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rateLimitOptions Property Map
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.

    Outputs

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

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

    Look up Existing SecurityPolicyRule Resource

    Get an existing SecurityPolicyRule 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?: SecurityPolicyRuleState, opts?: CustomResourceOptions): SecurityPolicyRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            description: Optional[str] = None,
            match: Optional[SecurityPolicyRuleMatchArgs] = None,
            preconfigured_waf_config: Optional[SecurityPolicyRulePreconfiguredWafConfigArgs] = None,
            preview: Optional[bool] = None,
            priority: Optional[int] = None,
            project: Optional[str] = None,
            rate_limit_options: Optional[SecurityPolicyRuleRateLimitOptionsArgs] = None,
            security_policy: Optional[str] = None) -> SecurityPolicyRule
    func GetSecurityPolicyRule(ctx *Context, name string, id IDInput, state *SecurityPolicyRuleState, opts ...ResourceOption) (*SecurityPolicyRule, error)
    public static SecurityPolicyRule Get(string name, Input<string> id, SecurityPolicyRuleState? state, CustomResourceOptions? opts = null)
    public static SecurityPolicyRule get(String name, Output<String> id, SecurityPolicyRuleState 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:
    Action string
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    Description string
    An optional description of this resource. Provide this property when you create the resource.
    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.
    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
    If set to true, the specified action is not enforced.
    Priority int
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RateLimitOptions SecurityPolicyRuleRateLimitOptions
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.
    SecurityPolicy string
    The name of the security policy this rule belongs to.


    Action string
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    Description string
    An optional description of this resource. Provide this property when you create the resource.
    Match SecurityPolicyRuleMatchArgs
    A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
    PreconfiguredWafConfig SecurityPolicyRulePreconfiguredWafConfigArgs
    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
    If set to true, the specified action is not enforced.
    Priority int
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RateLimitOptions SecurityPolicyRuleRateLimitOptionsArgs
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.
    SecurityPolicy string
    The name of the security policy this rule belongs to.


    action String
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    description String
    An optional description of this resource. Provide this property when you create the resource.
    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.
    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
    If set to true, the specified action is not enforced.
    priority Integer
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rateLimitOptions SecurityPolicyRuleRateLimitOptions
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.
    securityPolicy String
    The name of the security policy this rule belongs to.


    action string
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    description string
    An optional description of this resource. Provide this property when you create the resource.
    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.
    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
    If set to true, the specified action is not enforced.
    priority number
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rateLimitOptions SecurityPolicyRuleRateLimitOptions
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.
    securityPolicy string
    The name of the security policy this rule belongs to.


    action str
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    description str
    An optional description of this resource. Provide this property when you create the resource.
    match SecurityPolicyRuleMatchArgs
    A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
    preconfigured_waf_config SecurityPolicyRulePreconfiguredWafConfigArgs
    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
    If set to true, the specified action is not enforced.
    priority int
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rate_limit_options SecurityPolicyRuleRateLimitOptionsArgs
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.
    security_policy str
    The name of the security policy this rule belongs to.


    action String
    The Action to perform when the rule is matched. The following are the valid actions:

    • allow: allow access to target.
    • deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502.
    • rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set.
    • redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR.
    • throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this.
    description String
    An optional description of this resource. Provide this property when you create the resource.
    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.
    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
    If set to true, the specified action is not enforced.
    priority Number
    An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rateLimitOptions Property Map
    Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. Structure is documented below.
    securityPolicy String
    The name of the security policy this rule belongs to.


    Supporting Types

    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.
    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.
    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.
    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.
    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.
    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.
    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.

    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.

    Import

    SecurityPolicyRule can be imported using any of these accepted formats:

    • projects/{{project}}/global/securityPolicies/{{security_policy}}/priority/{{priority}}

    • {{project}}/{{security_policy}}/{{priority}}

    • {{security_policy}}/{{priority}}

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

    $ pulumi import gcp:compute/securityPolicyRule:SecurityPolicyRule default projects/{{project}}/global/securityPolicies/{{security_policy}}/priority/{{priority}}
    
    $ pulumi import gcp:compute/securityPolicyRule:SecurityPolicyRule default {{project}}/{{security_policy}}/{{priority}}
    
    $ pulumi import gcp:compute/securityPolicyRule:SecurityPolicyRule default {{security_policy}}/{{priority}}
    

    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 v7.27.0 published on Thursday, Jun 13, 2024 by Pulumi