gcp.compute.SecurityPolicyRule
Explore with Pulumi AI
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.
Constructor 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",
},
ExprOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchExprOptionsArgs
{
RecaptchaOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs
{
ActionTokenSiteKeys = new[]
{
"string",
},
SessionTokenSiteKeys = new[]
{
"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"),
},
ExprOptions: &compute.SecurityPolicyRuleMatchExprOptionsArgs{
RecaptchaOptions: &compute.SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs{
ActionTokenSiteKeys: pulumi.StringArray{
pulumi.String("string"),
},
SessionTokenSiteKeys: pulumi.StringArray{
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())
.exprOptions(SecurityPolicyRuleMatchExprOptionsArgs.builder()
.recaptchaOptions(SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs.builder()
.actionTokenSiteKeys("string")
.sessionTokenSiteKeys("string")
.build())
.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",
),
expr_options=gcp.compute.SecurityPolicyRuleMatchExprOptionsArgs(
recaptcha_options=gcp.compute.SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs(
action_token_site_keys=["string"],
session_token_site_keys=["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",
},
exprOptions: {
recaptchaOptions: {
actionTokenSiteKeys: ["string"],
sessionTokenSiteKeys: ["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
exprOptions:
recaptchaOptions:
actionTokenSiteKeys:
- string
sessionTokenSiteKeys:
- string
versionedExpr: string
preconfiguredWafConfig:
exclusions:
- requestCookies:
- operator: string
value: string
requestHeaders:
- operator: string
value: string
requestQueryParams:
- operator: string
value: string
requestUris:
- operator: string
value: string
targetRuleIds:
- string
targetRuleSet: string
preview: false
priority: 0
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.
- Security
Policy 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
Security
Policy Rule Match - 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 SecurityConfig Policy Rule Preconfigured Waf Config - 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.
- Rate
Limit SecurityOptions Policy Rule Rate Limit Options - 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.
- Security
Policy 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
Security
Policy Rule Match Args - 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 SecurityConfig Policy Rule Preconfigured Waf Config Args - 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.
- Rate
Limit SecurityOptions Policy Rule Rate Limit Options Args - 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.
- security
Policy 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
Security
Policy Rule Match - 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 SecurityConfig Policy Rule Preconfigured Waf Config - 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.
- rate
Limit SecurityOptions Policy Rule Rate Limit Options - 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.
- security
Policy 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
Security
Policy Rule Match - 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 SecurityConfig Policy Rule Preconfigured Waf Config - 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.
- rate
Limit SecurityOptions Policy Rule Rate Limit Options - 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
Security
Policy Rule Match Args - 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_ Securityconfig Policy Rule Preconfigured Waf Config Args - 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_ Securityoptions Policy Rule Rate Limit Options Args - 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.
- security
Policy 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.
- preconfigured
Waf Property MapConfig - 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.
- rate
Limit Property MapOptions - 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.
- 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
Security
Policy Rule Match - 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 SecurityConfig Policy Rule Preconfigured Waf Config - 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.
- Rate
Limit SecurityOptions Policy Rule Rate Limit Options - 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 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
Security
Policy Rule Match Args - 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 SecurityConfig Policy Rule Preconfigured Waf Config Args - 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.
- Rate
Limit SecurityOptions Policy Rule Rate Limit Options Args - 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 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
Security
Policy Rule Match - 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 SecurityConfig Policy Rule Preconfigured Waf Config - 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.
- rate
Limit SecurityOptions Policy Rule Rate Limit Options - 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 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
Security
Policy Rule Match - 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 SecurityConfig Policy Rule Preconfigured Waf Config - 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.
- rate
Limit SecurityOptions Policy Rule Rate Limit Options - 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 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
Security
Policy Rule Match Args - 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_ Securityconfig Policy Rule Preconfigured Waf Config Args - 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_ Securityoptions Policy Rule Rate Limit Options Args - 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.
- preconfigured
Waf Property MapConfig - 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.
- rate
Limit Property MapOptions - 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 String - The name of the security policy this rule belongs to.
Supporting Types
SecurityPolicyRuleMatch, SecurityPolicyRuleMatchArgs
- Config
Security
Policy Rule Match Config - 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
Security
Policy Rule Match Expr - User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
- Expr
Options SecurityPolicy Rule Match Expr Options - The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
- Versioned
Expr 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
Security
Policy Rule Match Config - 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
Security
Policy Rule Match Expr - User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
- Expr
Options SecurityPolicy Rule Match Expr Options - The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
- Versioned
Expr 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
Security
Policy Rule Match Config - 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
Security
Policy Rule Match Expr - User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
- expr
Options SecurityPolicy Rule Match Expr Options - The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
- versioned
Expr 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
Security
Policy Rule Match Config - 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
Security
Policy Rule Match Expr - User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
- expr
Options SecurityPolicy Rule Match Expr Options - The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
- versioned
Expr 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
Security
Policy Rule Match Config - 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
Security
Policy Rule Match Expr - User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
- expr_
options SecurityPolicy Rule Match Expr Options - The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
- versioned_
expr str - Preconfigured versioned expression. If this field is specified, config must also be specified.
Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding srcIpRange field in config.
Possible values are:
SRC_IPS_V1
.
- config Property Map
- The configuration options available when specifying versionedExpr. This field must be specified if versionedExpr is specified and cannot be specified if versionedExpr is not specified. Structure is documented below.
- expr Property Map
- User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.
- expr
Options Property Map - The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Structure is documented below.
- versioned
Expr 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
- Src
Ip List<string>Ranges - CIDR IP address range. Maximum number of srcIpRanges allowed is 10.
- Src
Ip []stringRanges - CIDR IP address range. Maximum number of srcIpRanges allowed is 10.
- src
Ip List<String>Ranges - CIDR IP address range. Maximum number of srcIpRanges allowed is 10.
- src
Ip string[]Ranges - CIDR IP address range. Maximum number of srcIpRanges allowed is 10.
- src_
ip_ Sequence[str]ranges - CIDR IP address range. Maximum number of srcIpRanges allowed is 10.
- src
Ip List<String>Ranges - CIDR IP address range. Maximum number of srcIpRanges allowed is 10.
SecurityPolicyRuleMatchExpr, SecurityPolicyRuleMatchExprArgs
- Expression string
- Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
- Expression string
- Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
- expression String
- Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
- expression string
- Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
- expression str
- Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
- expression String
- Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
SecurityPolicyRuleMatchExprOptions, SecurityPolicyRuleMatchExprOptionsArgs
- Recaptcha
Options SecurityPolicy Rule Match Expr Options Recaptcha Options - reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.
- Recaptcha
Options SecurityPolicy Rule Match Expr Options Recaptcha Options - reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.
- recaptcha
Options SecurityPolicy Rule Match Expr Options Recaptcha Options - reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.
- recaptcha
Options SecurityPolicy Rule Match Expr Options Recaptcha Options - reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.
- recaptcha_
options SecurityPolicy Rule Match Expr Options Recaptcha Options - reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.
- recaptcha
Options Property Map - reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field has no effect. Structure is documented below.
SecurityPolicyRuleMatchExprOptionsRecaptchaOptions, SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs
- Action
Token List<string>Site Keys - A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
- Session
Token List<string>Site Keys - A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
- Action
Token []stringSite Keys - A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
- Session
Token []stringSite Keys - A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
- action
Token List<String>Site Keys - A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
- session
Token List<String>Site Keys - A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
- action
Token string[]Site Keys - A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
- session
Token string[]Site Keys - A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
- action_
token_ Sequence[str]site_ keys - A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
- session_
token_ Sequence[str]site_ keys - A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
- action
Token List<String>Site Keys - A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
- session
Token List<String>Site Keys - A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.
SecurityPolicyRulePreconfiguredWafConfig, SecurityPolicyRulePreconfiguredWafConfigArgs
- Exclusions
List<Security
Policy Rule Preconfigured Waf Config Exclusion> - An exclusion to apply during preconfigured WAF evaluation. Structure is documented below.
- Exclusions
[]Security
Policy Rule Preconfigured Waf Config Exclusion - An exclusion to apply during preconfigured WAF evaluation. Structure is documented below.
- exclusions
List<Security
Policy Rule Preconfigured Waf Config Exclusion> - An exclusion to apply during preconfigured WAF evaluation. Structure is documented below.
- exclusions
Security
Policy Rule Preconfigured Waf Config Exclusion[] - An exclusion to apply during preconfigured WAF evaluation. Structure is documented below.
- exclusions
Sequence[Security
Policy Rule Preconfigured Waf Config Exclusion] - 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
- Target
Rule stringSet - Target WAF rule set to apply the preconfigured WAF exclusion.
- List<Security
Policy Rule Preconfigured Waf Config Exclusion Request Cooky> - Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- Request
Headers List<SecurityPolicy Rule Preconfigured Waf Config Exclusion Request Header> - Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- Request
Query List<SecurityParams Policy Rule Preconfigured Waf Config Exclusion Request Query Param> - 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 List<SecurityPolicy Rule Preconfigured Waf Config Exclusion Request Uri> - 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 List<string>Ids - 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 stringSet - Target WAF rule set to apply the preconfigured WAF exclusion.
- []Security
Policy Rule Preconfigured Waf Config Exclusion Request Cooky - Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- Request
Headers []SecurityPolicy Rule Preconfigured Waf Config Exclusion Request Header - Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- Request
Query []SecurityParams Policy Rule Preconfigured Waf Config Exclusion Request Query Param - 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 []SecurityPolicy Rule Preconfigured Waf Config Exclusion Request Uri - 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 []stringIds - 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 StringSet - Target WAF rule set to apply the preconfigured WAF exclusion.
- List<Security
Policy Rule Preconfigured Waf Config Exclusion Request Cooky> - Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- request
Headers List<SecurityPolicy Rule Preconfigured Waf Config Exclusion Request Header> - Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- request
Query List<SecurityParams Policy Rule Preconfigured Waf Config Exclusion Request Query Param> - 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 List<SecurityPolicy Rule Preconfigured Waf Config Exclusion Request Uri> - 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 List<String>Ids - 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 stringSet - Target WAF rule set to apply the preconfigured WAF exclusion.
- Security
Policy Rule Preconfigured Waf Config Exclusion Request Cooky[] - Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- request
Headers SecurityPolicy Rule Preconfigured Waf Config Exclusion Request Header[] - Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- request
Query SecurityParams Policy Rule Preconfigured Waf Config Exclusion Request Query Param[] - 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 SecurityPolicy Rule Preconfigured Waf Config Exclusion Request Uri[] - 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 string[]Ids - 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_ strset - Target WAF rule set to apply the preconfigured WAF exclusion.
- Sequence[Security
Policy Rule Preconfigured Waf Config Exclusion Request Cooky] - Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- request_
headers Sequence[SecurityPolicy Rule Preconfigured Waf Config Exclusion Request Header] - Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- request_
query_ Sequence[Securityparams Policy Rule Preconfigured Waf Config Exclusion Request Query Param] - 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[SecurityPolicy Rule Preconfigured Waf Config Exclusion Request Uri] - 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_ Sequence[str]ids - 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 StringSet - Target WAF rule set to apply the preconfigured WAF exclusion.
- List<Property Map>
- Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- request
Headers List<Property Map> - Request header whose value will be excluded from inspection during preconfigured WAF evaluation. Structure is documented below.
- request
Query List<Property Map>Params - 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 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.
- target
Rule List<String>Ids - 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
- Ban
Duration intSec - 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 SecurityPolicy Rule Rate Limit Options Ban Threshold - 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 string - Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
- Enforce
On stringKey - 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 List<SecurityKey Configs Policy Rule Rate Limit Options Enforce On Key Config> - 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 stringKey Name - 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 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.
- Exceed
Redirect SecurityOptions Policy Rule Rate Limit Options Exceed Redirect Options - 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 SecurityThreshold Policy Rule Rate Limit Options Rate Limit Threshold - Threshold at which to begin ratelimiting. Structure is documented below.
- Ban
Duration intSec - 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 SecurityPolicy Rule Rate Limit Options Ban Threshold - 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 string - Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
- Enforce
On stringKey - 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 []SecurityKey Configs Policy Rule Rate Limit Options Enforce On Key Config - 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 stringKey Name - 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 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.
- Exceed
Redirect SecurityOptions Policy Rule Rate Limit Options Exceed Redirect Options - 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 SecurityThreshold Policy Rule Rate Limit Options Rate Limit Threshold - Threshold at which to begin ratelimiting. Structure is documented below.
- ban
Duration IntegerSec - 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 SecurityPolicy Rule Rate Limit Options Ban Threshold - 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 String - Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
- enforce
On StringKey - 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 List<SecurityKey Configs Policy Rule Rate Limit Options Enforce On Key Config> - 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 StringKey Name - 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 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.
- exceed
Redirect SecurityOptions Policy Rule Rate Limit Options Exceed Redirect Options - 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 SecurityThreshold Policy Rule Rate Limit Options Rate Limit Threshold - Threshold at which to begin ratelimiting. Structure is documented below.
- ban
Duration numberSec - 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 SecurityPolicy Rule Rate Limit Options Ban Threshold - 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 string - Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
- enforce
On stringKey - 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 SecurityKey Configs Policy Rule Rate Limit Options Enforce On Key Config[] - 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 stringKey Name - 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 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.
- exceed
Redirect SecurityOptions Policy Rule Rate Limit Options Exceed Redirect Options - 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 SecurityThreshold Policy Rule Rate Limit Options Rate Limit Threshold - Threshold at which to begin ratelimiting. Structure is documented below.
- ban_
duration_ intsec - 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 SecurityPolicy Rule Rate Limit Options Ban Threshold - 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_ strkey - 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_ Sequence[Securitykey_ configs Policy Rule Rate Limit Options Enforce On Key Config] - 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_ strkey_ name - 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_ Securityoptions Policy Rule Rate Limit Options Exceed Redirect Options - 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_ Securitythreshold Policy Rule Rate Limit Options Rate Limit Threshold - Threshold at which to begin ratelimiting. Structure is documented below.
- ban
Duration NumberSec - 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 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.
- conform
Action String - Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
- enforce
On StringKey - 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 List<Property Map>Key Configs - 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 StringKey Name - 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 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.
- exceed
Redirect Property MapOptions - 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 Property MapThreshold - Threshold at which to begin ratelimiting. Structure is documented below.
SecurityPolicyRuleRateLimitOptionsBanThreshold, SecurityPolicyRuleRateLimitOptionsBanThresholdArgs
- Count int
- Number of HTTP(S) requests for calculating the threshold.
- Interval
Sec int - 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 Integer
- Number of HTTP(S) requests for calculating the threshold.
- interval
Sec Integer - Interval over which the threshold is computed.
- count number
- Number of HTTP(S) requests for calculating the threshold.
- interval
Sec 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.
- interval
Sec Number - Interval over which the threshold is computed.
SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig, SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs
- Enforce
On stringKey Name - 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 stringKey Type - 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 stringKey Name - 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 stringKey Type - 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 StringKey Name - 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 StringKey Type - 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 stringKey Name - 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 stringKey Type - 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_ strkey_ name - 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_ strkey_ type - 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 StringKey Name - 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 StringKey Type - 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
SecurityPolicyRuleRateLimitOptionsRateLimitThreshold, SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs
- Count int
- Number of HTTP(S) requests for calculating the threshold.
- Interval
Sec int - 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 Integer
- Number of HTTP(S) requests for calculating the threshold.
- interval
Sec Integer - Interval over which the threshold is computed.
- count number
- Number of HTTP(S) requests for calculating the threshold.
- interval
Sec 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.
- interval
Sec 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.